{"version":3,"file":"jspdf.es.min.js","sources":["../src/libs/globalObject.js","../src/libs/console.js","../src/libs/FileSaver.js","../src/libs/AtobBtoa.js","../src/libs/rgbcolor.js","../src/libs/md5.js","../src/libs/rc4.js","../src/libs/pdfsecurity.js","../src/libs/pdfname.js","../src/jspdf.js","../src/modules/acroform.js","../src/libs/fontFace.js","../src/modules/addimage.js","../src/modules/annotations.js","../src/modules/arabic.js","../src/modules/autoprint.js","../src/modules/canvas.js","../src/modules/cell.js","../src/modules/javascript.js","../src/modules/context2d.js","../src/modules/filters.js","../src/modules/fileloading.js","../src/modules/html.js","../src/modules/outline.js","../src/modules/jpeg_support.js","../src/libs/png.js","../src/modules/split_text_to_size.js","../src/libs/omggif.js","../src/libs/JPEGEncoder.js","../src/libs/BMPDecoder.js","../src/libs/WebPDecoder.js","../src/modules/png_support.js","../src/modules/gif_support.js","../src/modules/bmp_support.js","../src/modules/webp_support.js","../src/modules/rgba_support.js","../src/modules/setlanguage.js","../src/modules/standard_fonts_metrics.js","../src/modules/ttfsupport.js","../src/modules/svg.js","../src/modules/total_pages.js","../src/modules/viewerpreferences.js","../src/modules/xmp_metadata.js","../src/modules/utf8.js","../src/modules/vfs.js","../src/libs/bidiEngine.js","../src/libs/ttffont.js"],"sourcesContent":["export var globalObject = (function() {\n return \"undefined\" !== typeof window\n ? window\n : \"undefined\" !== typeof global\n ? global\n : \"undefined\" !== typeof self\n ? self\n : this;\n})();\n","import { globalObject } from \"./globalObject.js\";\n\nfunction consoleLog() {\n if (globalObject.console && typeof globalObject.console.log === \"function\") {\n globalObject.console.log.apply(globalObject.console, arguments);\n }\n}\n\nfunction consoleWarn(str) {\n if (globalObject.console) {\n if (typeof globalObject.console.warn === \"function\") {\n globalObject.console.warn.apply(globalObject.console, arguments);\n } else {\n consoleLog.call(null, arguments);\n }\n }\n}\n\nfunction consoleError(str) {\n if (globalObject.console) {\n if (typeof globalObject.console.error === \"function\") {\n globalObject.console.error.apply(globalObject.console, arguments);\n } else {\n consoleLog(str);\n }\n }\n}\nexport var console = {\n log: consoleLog,\n warn: consoleWarn,\n error: consoleError\n};\n","/**\n * @license\n * FileSaver.js\n * A saveAs() FileSaver implementation.\n *\n * By Eli Grey, http://eligrey.com\n *\n * License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT)\n * source : http://purl.eligrey.com/github/FileSaver.js\n */\n\nimport { globalObject as _global } from \"./globalObject.js\";\nimport { console } from \"./console.js\";\n\nfunction bom(blob, opts) {\n if (typeof opts === \"undefined\") opts = { autoBom: false };\n else if (typeof opts !== \"object\") {\n console.warn(\"Deprecated: Expected third argument to be a object\");\n opts = { autoBom: !opts };\n }\n\n // prepend BOM for UTF-8 XML and text/* types (including HTML)\n // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n if (\n opts.autoBom &&\n /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(\n blob.type\n )\n ) {\n return new Blob([String.fromCharCode(0xfeff), blob], { type: blob.type });\n }\n return blob;\n}\n\nfunction download(url, name, opts) {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url);\n xhr.responseType = \"blob\";\n xhr.onload = function() {\n saveAs(xhr.response, name, opts);\n };\n xhr.onerror = function() {\n console.error(\"could not download file\");\n };\n xhr.send();\n}\n\nfunction corsEnabled(url) {\n var xhr = new XMLHttpRequest();\n // use sync to avoid popup blocker\n xhr.open(\"HEAD\", url, false);\n try {\n xhr.send();\n } catch (e) {}\n return xhr.status >= 200 && xhr.status <= 299;\n}\n\n// `a.click()` doesn't work for all browsers (#465)\nfunction click(node) {\n try {\n node.dispatchEvent(new MouseEvent(\"click\"));\n } catch (e) {\n var evt = document.createEvent(\"MouseEvents\");\n evt.initMouseEvent(\n \"click\",\n true,\n true,\n window,\n 0,\n 0,\n 0,\n 80,\n 20,\n false,\n false,\n false,\n false,\n 0,\n null\n );\n node.dispatchEvent(evt);\n }\n}\n\nvar saveAs =\n _global.saveAs ||\n // probably in some web worker\n (typeof window !== \"object\" || window !== _global\n ? function saveAs() {\n /* noop */\n }\n : // Use download attribute first if possible (#193 Lumia mobile) unless this is a native app\n typeof HTMLAnchorElement !== \"undefined\" &&\n \"download\" in HTMLAnchorElement.prototype\n ? function saveAs(blob, name, opts) {\n var URL = _global.URL || _global.webkitURL;\n var a = document.createElement(\"a\");\n name = name || blob.name || \"download\";\n\n a.download = name;\n a.rel = \"noopener\"; // tabnabbing\n\n // TODO: detect chrome extensions & packaged apps\n // a.target = '_blank'\n\n if (typeof blob === \"string\") {\n // Support regular links\n a.href = blob;\n if (a.origin !== location.origin) {\n corsEnabled(a.href)\n ? download(blob, name, opts)\n : click(a, (a.target = \"_blank\"));\n } else {\n click(a);\n }\n } else {\n // Support blobs\n a.href = URL.createObjectURL(blob);\n setTimeout(function() {\n URL.revokeObjectURL(a.href);\n }, 4e4); // 40s\n setTimeout(function() {\n click(a);\n }, 0);\n }\n }\n : // Use msSaveOrOpenBlob as a second approach\n \"msSaveOrOpenBlob\" in navigator\n ? function saveAs(blob, name, opts) {\n name = name || blob.name || \"download\";\n\n if (typeof blob === \"string\") {\n if (corsEnabled(blob)) {\n download(blob, name, opts);\n } else {\n var a = document.createElement(\"a\");\n a.href = blob;\n a.target = \"_blank\";\n setTimeout(function() {\n click(a);\n });\n }\n } else {\n navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n }\n }\n : // Fallback to using FileReader and a popup\n function saveAs(blob, name, opts, popup) {\n // Open a popup immediately do go around popup blocker\n // Mostly only available on user interaction and the fileReader is async so...\n popup = popup || open(\"\", \"_blank\");\n if (popup) {\n popup.document.title = popup.document.body.innerText =\n \"downloading...\";\n }\n\n if (typeof blob === \"string\") return download(blob, name, opts);\n\n var force = blob.type === \"application/octet-stream\";\n var isSafari =\n /constructor/i.test(_global.HTMLElement) || _global.safari;\n var isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n\n if (\n (isChromeIOS || (force && isSafari)) &&\n typeof FileReader === \"object\"\n ) {\n // Safari doesn't allow downloading of blob URLs\n var reader = new FileReader();\n reader.onloadend = function() {\n var url = reader.result;\n url = isChromeIOS\n ? url\n : url.replace(/^data:[^;]*;/, \"data:attachment/file;\");\n if (popup) popup.location.href = url;\n else location = url;\n popup = null; // reverse-tabnabbing #460\n };\n reader.readAsDataURL(blob);\n } else {\n var URL = _global.URL || _global.webkitURL;\n var url = URL.createObjectURL(blob);\n if (popup) popup.location = url;\n else location.href = url;\n popup = null; // reverse-tabnabbing #460\n setTimeout(function() {\n URL.revokeObjectURL(url);\n }, 4e4); // 40s\n }\n });\n\nexport { saveAs };\n","import { globalObject } from \"./globalObject.js\";\n\nvar atob, btoa;\n\n(function() {\n atob = globalObject.atob.bind(globalObject);\n btoa = globalObject.btoa.bind(globalObject);\n return;\n\n})();\n\nexport { atob, btoa };\n","/**\n * A class to parse color values\n * @author Stoyan Stefanov \n * {@link http://www.phpied.com/rgb-color-parser-in-javascript/}\n * @license Use it if you like it\n */\n\nfunction RGBColor(color_string) {\n color_string = color_string || \"\";\n this.ok = false;\n\n // strip any leading #\n if (color_string.charAt(0) == \"#\") {\n // remove # if any\n color_string = color_string.substr(1, 6);\n }\n\n color_string = color_string.replace(/ /g, \"\");\n color_string = color_string.toLowerCase();\n\n var channels;\n\n // before getting into regexps, try simple matches\n // and overwrite the input\n var simple_colors = {\n aliceblue: \"f0f8ff\",\n antiquewhite: \"faebd7\",\n aqua: \"00ffff\",\n aquamarine: \"7fffd4\",\n azure: \"f0ffff\",\n beige: \"f5f5dc\",\n bisque: \"ffe4c4\",\n black: \"000000\",\n blanchedalmond: \"ffebcd\",\n blue: \"0000ff\",\n blueviolet: \"8a2be2\",\n brown: \"a52a2a\",\n burlywood: \"deb887\",\n cadetblue: \"5f9ea0\",\n chartreuse: \"7fff00\",\n chocolate: \"d2691e\",\n coral: \"ff7f50\",\n cornflowerblue: \"6495ed\",\n cornsilk: \"fff8dc\",\n crimson: \"dc143c\",\n cyan: \"00ffff\",\n darkblue: \"00008b\",\n darkcyan: \"008b8b\",\n darkgoldenrod: \"b8860b\",\n darkgray: \"a9a9a9\",\n darkgreen: \"006400\",\n darkkhaki: \"bdb76b\",\n darkmagenta: \"8b008b\",\n darkolivegreen: \"556b2f\",\n darkorange: \"ff8c00\",\n darkorchid: \"9932cc\",\n darkred: \"8b0000\",\n darksalmon: \"e9967a\",\n darkseagreen: \"8fbc8f\",\n darkslateblue: \"483d8b\",\n darkslategray: \"2f4f4f\",\n darkturquoise: \"00ced1\",\n darkviolet: \"9400d3\",\n deeppink: \"ff1493\",\n deepskyblue: \"00bfff\",\n dimgray: \"696969\",\n dodgerblue: \"1e90ff\",\n feldspar: \"d19275\",\n firebrick: \"b22222\",\n floralwhite: \"fffaf0\",\n forestgreen: \"228b22\",\n fuchsia: \"ff00ff\",\n gainsboro: \"dcdcdc\",\n ghostwhite: \"f8f8ff\",\n gold: \"ffd700\",\n goldenrod: \"daa520\",\n gray: \"808080\",\n green: \"008000\",\n greenyellow: \"adff2f\",\n honeydew: \"f0fff0\",\n hotpink: \"ff69b4\",\n indianred: \"cd5c5c\",\n indigo: \"4b0082\",\n ivory: \"fffff0\",\n khaki: \"f0e68c\",\n lavender: \"e6e6fa\",\n lavenderblush: \"fff0f5\",\n lawngreen: \"7cfc00\",\n lemonchiffon: \"fffacd\",\n lightblue: \"add8e6\",\n lightcoral: \"f08080\",\n lightcyan: \"e0ffff\",\n lightgoldenrodyellow: \"fafad2\",\n lightgrey: \"d3d3d3\",\n lightgreen: \"90ee90\",\n lightpink: \"ffb6c1\",\n lightsalmon: \"ffa07a\",\n lightseagreen: \"20b2aa\",\n lightskyblue: \"87cefa\",\n lightslateblue: \"8470ff\",\n lightslategray: \"778899\",\n lightsteelblue: \"b0c4de\",\n lightyellow: \"ffffe0\",\n lime: \"00ff00\",\n limegreen: \"32cd32\",\n linen: \"faf0e6\",\n magenta: \"ff00ff\",\n maroon: \"800000\",\n mediumaquamarine: \"66cdaa\",\n mediumblue: \"0000cd\",\n mediumorchid: \"ba55d3\",\n mediumpurple: \"9370d8\",\n mediumseagreen: \"3cb371\",\n mediumslateblue: \"7b68ee\",\n mediumspringgreen: \"00fa9a\",\n mediumturquoise: \"48d1cc\",\n mediumvioletred: \"c71585\",\n midnightblue: \"191970\",\n mintcream: \"f5fffa\",\n mistyrose: \"ffe4e1\",\n moccasin: \"ffe4b5\",\n navajowhite: \"ffdead\",\n navy: \"000080\",\n oldlace: \"fdf5e6\",\n olive: \"808000\",\n olivedrab: \"6b8e23\",\n orange: \"ffa500\",\n orangered: \"ff4500\",\n orchid: \"da70d6\",\n palegoldenrod: \"eee8aa\",\n palegreen: \"98fb98\",\n paleturquoise: \"afeeee\",\n palevioletred: \"d87093\",\n papayawhip: \"ffefd5\",\n peachpuff: \"ffdab9\",\n peru: \"cd853f\",\n pink: \"ffc0cb\",\n plum: \"dda0dd\",\n powderblue: \"b0e0e6\",\n purple: \"800080\",\n red: \"ff0000\",\n rosybrown: \"bc8f8f\",\n royalblue: \"4169e1\",\n saddlebrown: \"8b4513\",\n salmon: \"fa8072\",\n sandybrown: \"f4a460\",\n seagreen: \"2e8b57\",\n seashell: \"fff5ee\",\n sienna: \"a0522d\",\n silver: \"c0c0c0\",\n skyblue: \"87ceeb\",\n slateblue: \"6a5acd\",\n slategray: \"708090\",\n snow: \"fffafa\",\n springgreen: \"00ff7f\",\n steelblue: \"4682b4\",\n tan: \"d2b48c\",\n teal: \"008080\",\n thistle: \"d8bfd8\",\n tomato: \"ff6347\",\n turquoise: \"40e0d0\",\n violet: \"ee82ee\",\n violetred: \"d02090\",\n wheat: \"f5deb3\",\n white: \"ffffff\",\n whitesmoke: \"f5f5f5\",\n yellow: \"ffff00\",\n yellowgreen: \"9acd32\"\n };\n color_string = simple_colors[color_string] || color_string;\n\n // array of color definition objects\n var color_defs = [\n {\n re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\n example: [\"rgb(123, 234, 45)\", \"rgb(255,234,245)\"],\n process: function(bits) {\n return [parseInt(bits[1]), parseInt(bits[2]), parseInt(bits[3])];\n }\n },\n {\n re: /^(\\w{2})(\\w{2})(\\w{2})$/,\n example: [\"#00ff00\", \"336699\"],\n process: function(bits) {\n return [\n parseInt(bits[1], 16),\n parseInt(bits[2], 16),\n parseInt(bits[3], 16)\n ];\n }\n },\n {\n re: /^(\\w{1})(\\w{1})(\\w{1})$/,\n example: [\"#fb0\", \"f0f\"],\n process: function(bits) {\n return [\n parseInt(bits[1] + bits[1], 16),\n parseInt(bits[2] + bits[2], 16),\n parseInt(bits[3] + bits[3], 16)\n ];\n }\n }\n ];\n\n // search through the definitions to find a match\n for (var i = 0; i < color_defs.length; i++) {\n var re = color_defs[i].re;\n var processor = color_defs[i].process;\n var bits = re.exec(color_string);\n if (bits) {\n channels = processor(bits);\n this.r = channels[0];\n this.g = channels[1];\n this.b = channels[2];\n this.ok = true;\n }\n }\n\n // validate/cleanup values\n this.r = this.r < 0 || isNaN(this.r) ? 0 : this.r > 255 ? 255 : this.r;\n this.g = this.g < 0 || isNaN(this.g) ? 0 : this.g > 255 ? 255 : this.g;\n this.b = this.b < 0 || isNaN(this.b) ? 0 : this.b > 255 ? 255 : this.b;\n\n // some getters\n this.toRGB = function() {\n return \"rgb(\" + this.r + \", \" + this.g + \", \" + this.b + \")\";\n };\n this.toHex = function() {\n var r = this.r.toString(16);\n var g = this.g.toString(16);\n var b = this.b.toString(16);\n if (r.length == 1) r = \"0\" + r;\n if (g.length == 1) g = \"0\" + g;\n if (b.length == 1) b = \"0\" + b;\n return \"#\" + r + g + b;\n };\n}\n\nexport { RGBColor };\n","/**\n * @license\n * Joseph Myers does not specify a particular license for his work.\n *\n * Author: Joseph Myers\n * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js\n *\n * Modified by: Owen Leong\n */\n\nfunction md5cycle(x, k) {\n var a = x[0],\n b = x[1],\n c = x[2],\n d = x[3];\n\n a = ff(a, b, c, d, k[0], 7, -680876936);\n d = ff(d, a, b, c, k[1], 12, -389564586);\n c = ff(c, d, a, b, k[2], 17, 606105819);\n b = ff(b, c, d, a, k[3], 22, -1044525330);\n a = ff(a, b, c, d, k[4], 7, -176418897);\n d = ff(d, a, b, c, k[5], 12, 1200080426);\n c = ff(c, d, a, b, k[6], 17, -1473231341);\n b = ff(b, c, d, a, k[7], 22, -45705983);\n a = ff(a, b, c, d, k[8], 7, 1770035416);\n d = ff(d, a, b, c, k[9], 12, -1958414417);\n c = ff(c, d, a, b, k[10], 17, -42063);\n b = ff(b, c, d, a, k[11], 22, -1990404162);\n a = ff(a, b, c, d, k[12], 7, 1804603682);\n d = ff(d, a, b, c, k[13], 12, -40341101);\n c = ff(c, d, a, b, k[14], 17, -1502002290);\n b = ff(b, c, d, a, k[15], 22, 1236535329);\n\n a = gg(a, b, c, d, k[1], 5, -165796510);\n d = gg(d, a, b, c, k[6], 9, -1069501632);\n c = gg(c, d, a, b, k[11], 14, 643717713);\n b = gg(b, c, d, a, k[0], 20, -373897302);\n a = gg(a, b, c, d, k[5], 5, -701558691);\n d = gg(d, a, b, c, k[10], 9, 38016083);\n c = gg(c, d, a, b, k[15], 14, -660478335);\n b = gg(b, c, d, a, k[4], 20, -405537848);\n a = gg(a, b, c, d, k[9], 5, 568446438);\n d = gg(d, a, b, c, k[14], 9, -1019803690);\n c = gg(c, d, a, b, k[3], 14, -187363961);\n b = gg(b, c, d, a, k[8], 20, 1163531501);\n a = gg(a, b, c, d, k[13], 5, -1444681467);\n d = gg(d, a, b, c, k[2], 9, -51403784);\n c = gg(c, d, a, b, k[7], 14, 1735328473);\n b = gg(b, c, d, a, k[12], 20, -1926607734);\n\n a = hh(a, b, c, d, k[5], 4, -378558);\n d = hh(d, a, b, c, k[8], 11, -2022574463);\n c = hh(c, d, a, b, k[11], 16, 1839030562);\n b = hh(b, c, d, a, k[14], 23, -35309556);\n a = hh(a, b, c, d, k[1], 4, -1530992060);\n d = hh(d, a, b, c, k[4], 11, 1272893353);\n c = hh(c, d, a, b, k[7], 16, -155497632);\n b = hh(b, c, d, a, k[10], 23, -1094730640);\n a = hh(a, b, c, d, k[13], 4, 681279174);\n d = hh(d, a, b, c, k[0], 11, -358537222);\n c = hh(c, d, a, b, k[3], 16, -722521979);\n b = hh(b, c, d, a, k[6], 23, 76029189);\n a = hh(a, b, c, d, k[9], 4, -640364487);\n d = hh(d, a, b, c, k[12], 11, -421815835);\n c = hh(c, d, a, b, k[15], 16, 530742520);\n b = hh(b, c, d, a, k[2], 23, -995338651);\n\n a = ii(a, b, c, d, k[0], 6, -198630844);\n d = ii(d, a, b, c, k[7], 10, 1126891415);\n c = ii(c, d, a, b, k[14], 15, -1416354905);\n b = ii(b, c, d, a, k[5], 21, -57434055);\n a = ii(a, b, c, d, k[12], 6, 1700485571);\n d = ii(d, a, b, c, k[3], 10, -1894986606);\n c = ii(c, d, a, b, k[10], 15, -1051523);\n b = ii(b, c, d, a, k[1], 21, -2054922799);\n a = ii(a, b, c, d, k[8], 6, 1873313359);\n d = ii(d, a, b, c, k[15], 10, -30611744);\n c = ii(c, d, a, b, k[6], 15, -1560198380);\n b = ii(b, c, d, a, k[13], 21, 1309151649);\n a = ii(a, b, c, d, k[4], 6, -145523070);\n d = ii(d, a, b, c, k[11], 10, -1120210379);\n c = ii(c, d, a, b, k[2], 15, 718787259);\n b = ii(b, c, d, a, k[9], 21, -343485551);\n\n x[0] = add32(a, x[0]);\n x[1] = add32(b, x[1]);\n x[2] = add32(c, x[2]);\n x[3] = add32(d, x[3]);\n}\n\nfunction cmn(q, a, b, x, s, t) {\n a = add32(add32(a, q), add32(x, t));\n return add32((a << s) | (a >>> (32 - s)), b);\n}\n\nfunction ff(a, b, c, d, x, s, t) {\n return cmn((b & c) | (~b & d), a, b, x, s, t);\n}\n\nfunction gg(a, b, c, d, x, s, t) {\n return cmn((b & d) | (c & ~d), a, b, x, s, t);\n}\n\nfunction hh(a, b, c, d, x, s, t) {\n return cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction ii(a, b, c, d, x, s, t) {\n return cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nfunction md51(s) {\n // txt = '';\n var n = s.length,\n state = [1732584193, -271733879, -1732584194, 271733878],\n i;\n for (i = 64; i <= s.length; i += 64) {\n md5cycle(state, md5blk(s.substring(i - 64, i)));\n }\n s = s.substring(i - 64);\n var tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n for (i = 0; i < s.length; i++)\n tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);\n tail[i >> 2] |= 0x80 << (i % 4 << 3);\n if (i > 55) {\n md5cycle(state, tail);\n for (i = 0; i < 16; i++) tail[i] = 0;\n }\n tail[14] = n * 8;\n md5cycle(state, tail);\n return state;\n}\n\n/* there needs to be support for Unicode here,\n * unless we pretend that we can redefine the MD-5\n * algorithm for multi-byte characters (perhaps\n * by adding every four 16-bit characters and\n * shortening the sum to 32 bits). Otherwise\n * I suggest performing MD-5 as if every character\n * was two bytes--e.g., 0040 0025 = @%--but then\n * how will an ordinary MD-5 sum be matched?\n * There is no way to standardize text to something\n * like UTF-8 before transformation; speed cost is\n * utterly prohibitive. The JavaScript standard\n * itself needs to look at this: it should start\n * providing access to strings as preformed UTF-8\n * 8-bit unsigned value arrays.\n */\nfunction md5blk(s) {\n /* I figured global was faster. */\n var md5blks = [],\n i; /* Andy King said do it this way. */\n for (i = 0; i < 64; i += 4) {\n md5blks[i >> 2] =\n s.charCodeAt(i) +\n (s.charCodeAt(i + 1) << 8) +\n (s.charCodeAt(i + 2) << 16) +\n (s.charCodeAt(i + 3) << 24);\n }\n return md5blks;\n}\n\nvar hex_chr = \"0123456789abcdef\".split(\"\");\n\nfunction rhex(n) {\n var s = \"\",\n j = 0;\n for (; j < 4; j++)\n s += hex_chr[(n >> (j * 8 + 4)) & 0x0f] + hex_chr[(n >> (j * 8)) & 0x0f];\n return s;\n}\n\nfunction hex(x) {\n for (var i = 0; i < x.length; i++) x[i] = rhex(x[i]);\n return x.join(\"\");\n}\n\n// Converts a 4-byte number to byte string\nfunction singleToByteString(n) {\n return String.fromCharCode(\n (n & 0xff) >> 0,\n (n & 0xff00) >> 8,\n (n & 0xff0000) >> 16,\n (n & 0xff000000) >> 24\n );\n}\n\n// Converts an array of numbers to a byte string\nfunction toByteString(x) {\n return x.map(singleToByteString).join(\"\");\n}\n\n// Returns the MD5 hash as a byte string\nfunction md5Bin(s) {\n return toByteString(md51(s));\n}\n\n// Returns MD5 hash as a hex string\nfunction md5(s) {\n return hex(md51(s));\n}\n\nvar md5Check = md5(\"hello\") != \"5d41402abc4b2a76b9719d911017c592\";\n\nfunction add32(a, b) {\n if (md5Check) {\n /* if the md5Check does not match\n the expected value, we're dealing\n with an old browser and need\n this function. */\n var lsw = (a & 0xffff) + (b & 0xffff),\n msw = (a >> 16) + (b >> 16) + (lsw >> 16);\n return (msw << 16) | (lsw & 0xffff);\n } else {\n /* this function is much faster,\n so if possible we use it. Some IEs\n are the only ones I know of that\n need the idiotic second function,\n generated by an if clause. */\n return (a + b) & 0xffffffff;\n }\n}\n\nexport { md5, md5Bin };\n","/**\r\n * @license\r\n * FPDF is released under a permissive license: there is no usage restriction.\r\n * You may embed it freely in your application (commercial or not), with or\r\n * without modifications.\r\n *\r\n * Reference: http://www.fpdf.org/en/script/script37.php\r\n */\r\n\r\nfunction repeat(str, num) {\r\n return new Array(num + 1).join(str);\r\n}\r\n\r\n/**\r\n * Converts a byte string to a hex string\r\n *\r\n * @name rc4\r\n * @function\r\n * @param {string} key Byte string of encryption key\r\n * @param {string} data Byte string of data to be encrypted\r\n * @returns {string} Encrypted string\r\n */\r\nfunction rc4(key, data) {\r\n var lastKey, lastState;\r\n if (key !== lastKey) {\r\n var k = repeat(key, ((256 / key.length) >> 0) + 1);\r\n var state = [];\r\n for (var i = 0; i < 256; i++) {\r\n state[i] = i;\r\n }\r\n var j = 0;\r\n for (var i = 0; i < 256; i++) {\r\n var t = state[i];\r\n j = (j + t + k.charCodeAt(i)) % 256;\r\n state[i] = state[j];\r\n state[j] = t;\r\n }\r\n lastKey = key;\r\n lastState = state;\r\n } else {\r\n state = lastState;\r\n }\r\n var length = data.length;\r\n var a = 0;\r\n var b = 0;\r\n var out = \"\";\r\n for (var i = 0; i < length; i++) {\r\n a = (a + 1) % 256;\r\n t = state[a];\r\n b = (b + t) % 256;\r\n state[a] = state[b];\r\n state[b] = t;\r\n k = state[(state[a] + state[b]) % 256];\r\n out += String.fromCharCode(data.charCodeAt(i) ^ k);\r\n }\r\n return out;\r\n}\r\n\r\nexport { rc4 };\r\n","/**\r\n * @license\r\n * Licensed under the MIT License.\r\n * http://opensource.org/licenses/mit-license\r\n * Author: Owen Leong (@owenl131)\r\n * Date: 15 Oct 2020\r\n * References:\r\n * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt\r\n * https://github.com/foliojs/pdfkit/blob/master/lib/security.js\r\n * http://www.fpdf.org/en/script/script37.php\r\n */\r\n\r\nimport { md5Bin } from \"./md5.js\";\r\nimport { rc4 } from \"./rc4.js\";\r\n\r\nvar permissionOptions = {\r\n print: 4,\r\n modify: 8,\r\n copy: 16,\r\n \"annot-forms\": 32\r\n};\r\n\r\n/**\r\n * Initializes encryption settings\r\n *\r\n * @name constructor\r\n * @function\r\n * @param {Array} permissions Permissions allowed for user, \"print\", \"modify\", \"copy\" and \"annot-forms\".\r\n * @param {String} userPassword Permissions apply to this user. Leaving this empty means the document\r\n * is not password protected but viewer has the above permissions.\r\n * @param {String} ownerPassword Owner has full functionalities to the file.\r\n * @param {String} fileId As hex string, should be same as the file ID in the trailer.\r\n * @example\r\n * var security = new PDFSecurity([\"print\"])\r\n */\r\nfunction PDFSecurity(permissions, userPassword, ownerPassword, fileId) {\r\n this.v = 1; // algorithm 1, future work can add in more recent encryption schemes\r\n this.r = 2; // revision 2\r\n\r\n // set flags for what functionalities the user can access\r\n let protection = 192;\r\n permissions.forEach(function(perm) {\r\n if (typeof permissionOptions.perm !== \"undefined\") {\r\n throw new Error(\"Invalid permission: \" + perm);\r\n }\r\n protection += permissionOptions[perm];\r\n });\r\n\r\n // padding is used to pad the passwords to 32 bytes, also is hashed and stored in the final PDF\r\n this.padding =\r\n \"\\x28\\xBF\\x4E\\x5E\\x4E\\x75\\x8A\\x41\\x64\\x00\\x4E\\x56\\xFF\\xFA\\x01\\x08\" +\r\n \"\\x2E\\x2E\\x00\\xB6\\xD0\\x68\\x3E\\x80\\x2F\\x0C\\xA9\\xFE\\x64\\x53\\x69\\x7A\";\r\n let paddedUserPassword = (userPassword + this.padding).substr(0, 32);\r\n let paddedOwnerPassword = (ownerPassword + this.padding).substr(0, 32);\r\n\r\n this.O = this.processOwnerPassword(paddedUserPassword, paddedOwnerPassword);\r\n this.P = -((protection ^ 255) + 1);\r\n this.encryptionKey = md5Bin(\r\n paddedUserPassword +\r\n this.O +\r\n this.lsbFirstWord(this.P) +\r\n this.hexToBytes(fileId)\r\n ).substr(0, 5);\r\n this.U = rc4(this.encryptionKey, this.padding);\r\n}\r\n\r\n/**\r\n * Breaks down a 4-byte number into its individual bytes, with the least significant bit first\r\n *\r\n * @name lsbFirstWord\r\n * @function\r\n * @param {number} data 32-bit number\r\n * @returns {Array}\r\n */\r\nPDFSecurity.prototype.lsbFirstWord = function(data) {\r\n return String.fromCharCode(\r\n (data >> 0) & 0xff,\r\n (data >> 8) & 0xff,\r\n (data >> 16) & 0xff,\r\n (data >> 24) & 0xff\r\n );\r\n};\r\n\r\n/**\r\n * Converts a byte string to a hex string\r\n *\r\n * @name toHexString\r\n * @function\r\n * @param {String} byteString Byte string\r\n * @returns {String}\r\n */\r\nPDFSecurity.prototype.toHexString = function(byteString) {\r\n return byteString\r\n .split(\"\")\r\n .map(function(byte) {\r\n return (\"0\" + (byte.charCodeAt(0) & 0xff).toString(16)).slice(-2);\r\n })\r\n .join(\"\");\r\n};\r\n\r\n/**\r\n * Converts a hex string to a byte string\r\n *\r\n * @name hexToBytes\r\n * @function\r\n * @param {String} hex Hex string\r\n * @returns {String}\r\n */\r\nPDFSecurity.prototype.hexToBytes = function(hex) {\r\n for (var bytes = [], c = 0; c < hex.length; c += 2)\r\n bytes.push(String.fromCharCode(parseInt(hex.substr(c, 2), 16)));\r\n return bytes.join(\"\");\r\n};\r\n\r\n/**\r\n * Computes the 'O' field in the encryption dictionary\r\n *\r\n * @name processOwnerPassword\r\n * @function\r\n * @param {String} paddedUserPassword Byte string of padded user password\r\n * @param {String} paddedOwnerPassword Byte string of padded owner password\r\n * @returns {String}\r\n */\r\nPDFSecurity.prototype.processOwnerPassword = function(\r\n paddedUserPassword,\r\n paddedOwnerPassword\r\n) {\r\n let key = md5Bin(paddedOwnerPassword).substr(0, 5);\r\n return rc4(key, paddedUserPassword);\r\n};\r\n\r\n/**\r\n * Returns an encryptor function which can take in a byte string and returns the encrypted version\r\n *\r\n * @name encryptor\r\n * @function\r\n * @param {number} objectId\r\n * @param {number} generation Not sure what this is for, you can set it to 0\r\n * @returns {Function}\r\n * @example\r\n * out(\"stream\");\r\n * encryptor = security.encryptor(object.id, 0);\r\n * out(encryptor(data));\r\n * out(\"endstream\");\r\n */\r\nPDFSecurity.prototype.encryptor = function(objectId, generation) {\r\n let key = md5Bin(\r\n this.encryptionKey +\r\n String.fromCharCode(\r\n objectId & 0xff,\r\n (objectId >> 8) & 0xff,\r\n (objectId >> 16) & 0xff,\r\n generation & 0xff,\r\n (generation >> 8) & 0xff\r\n )\r\n ).substr(0, 10);\r\n return function(data) {\r\n return rc4(key, data);\r\n };\r\n};\r\n\r\nexport { PDFSecurity };\r\n","/**\n * Convert string to `PDF Name Object`.\n * Detail: PDF Reference 1.3 - Chapter 3.2.4 Name Object\n * @param str\n */\nfunction toPDFName(str) {\n // eslint-disable-next-line no-control-regex\n if (/[^\\u0000-\\u00ff]/.test(str)) {\n // non ascii string\n throw new Error(\n \"Invalid PDF Name Object: \" + str + \", Only accept ASCII characters.\"\n );\n }\n var result = \"\",\n strLength = str.length;\n for (var i = 0; i < strLength; i++) {\n var charCode = str.charCodeAt(i);\n if (\n charCode < 0x21 ||\n charCode === 0x23 /* # */ ||\n charCode === 0x25 /* % */ ||\n charCode === 0x28 /* ( */ ||\n charCode === 0x29 /* ) */ ||\n charCode === 0x2f /* / */ ||\n charCode === 0x3c /* < */ ||\n charCode === 0x3e /* > */ ||\n charCode === 0x5b /* [ */ ||\n charCode === 0x5d /* ] */ ||\n charCode === 0x7b /* { */ ||\n charCode === 0x7d /* } */ ||\n charCode > 0x7e\n ) {\n // Char CharCode hexStr paddingHexStr Result\n // \"\\t\" 9 9 09 #09\n // \" \" 32 20 20 #20\n // \"©\" 169 a9 a9 #a9\n var hexStr = charCode.toString(16),\n paddingHexStr = (\"0\" + hexStr).slice(-2);\n\n result += \"#\" + paddingHexStr;\n } else {\n // Other ASCII printable characters between 0x21 <= X <= 0x7e\n result += str[i];\n }\n }\n return result;\n}\n\nexport { toPDFName };\n","/* eslint-disable no-console */\r\n\r\nimport { saveAs } from \"./libs/FileSaver.js\";\r\nimport { globalObject } from \"./libs/globalObject.js\";\r\nimport { RGBColor } from \"./libs/rgbcolor.js\";\r\nimport { btoa } from \"./libs/AtobBtoa.js\";\r\nimport { console } from \"./libs/console.js\";\r\nimport { PDFSecurity } from \"./libs/pdfsecurity.js\";\r\nimport { toPDFName } from \"./libs/pdfname.js\";\r\n/**\r\n * jsPDF's Internal PubSub Implementation.\r\n * Backward compatible rewritten on 2014 by\r\n * Diego Casorran, https://github.com/diegocr\r\n *\r\n * @class\r\n * @name PubSub\r\n * @ignore\r\n */\r\nfunction PubSub(context) {\r\n if (typeof context !== \"object\") {\r\n throw new Error(\r\n \"Invalid Context passed to initialize PubSub (jsPDF-module)\"\r\n );\r\n }\r\n var topics = {};\r\n\r\n this.subscribe = function(topic, callback, once) {\r\n once = once || false;\r\n if (\r\n typeof topic !== \"string\" ||\r\n typeof callback !== \"function\" ||\r\n typeof once !== \"boolean\"\r\n ) {\r\n throw new Error(\r\n \"Invalid arguments passed to PubSub.subscribe (jsPDF-module)\"\r\n );\r\n }\r\n\r\n if (!topics.hasOwnProperty(topic)) {\r\n topics[topic] = {};\r\n }\r\n\r\n var token = Math.random().toString(35);\r\n topics[topic][token] = [callback, !!once];\r\n\r\n return token;\r\n };\r\n\r\n this.unsubscribe = function(token) {\r\n for (var topic in topics) {\r\n if (topics[topic][token]) {\r\n delete topics[topic][token];\r\n if (Object.keys(topics[topic]).length === 0) {\r\n delete topics[topic];\r\n }\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n this.publish = function(topic) {\r\n if (topics.hasOwnProperty(topic)) {\r\n var args = Array.prototype.slice.call(arguments, 1),\r\n tokens = [];\r\n\r\n for (var token in topics[topic]) {\r\n var sub = topics[topic][token];\r\n try {\r\n sub[0].apply(context, args);\r\n } catch (ex) {\r\n if (globalObject.console) {\r\n console.error(\"jsPDF PubSub Error\", ex.message, ex);\r\n }\r\n }\r\n if (sub[1]) tokens.push(token);\r\n }\r\n if (tokens.length) tokens.forEach(this.unsubscribe);\r\n }\r\n };\r\n\r\n this.getTopics = function() {\r\n return topics;\r\n };\r\n}\r\n\r\nfunction GState(parameters) {\r\n if (!(this instanceof GState)) {\r\n return new GState(parameters);\r\n }\r\n\r\n /**\r\n * @name GState#opacity\r\n * @type {any}\r\n */\r\n /**\r\n * @name GState#stroke-opacity\r\n * @type {any}\r\n */\r\n var supported = \"opacity,stroke-opacity\".split(\",\");\r\n for (var p in parameters) {\r\n if (parameters.hasOwnProperty(p) && supported.indexOf(p) >= 0) {\r\n this[p] = parameters[p];\r\n }\r\n }\r\n /**\r\n * @name GState#id\r\n * @type {string}\r\n */\r\n this.id = \"\"; // set by addGState()\r\n /**\r\n * @name GState#objectNumber\r\n * @type {number}\r\n */\r\n this.objectNumber = -1; // will be set by putGState()\r\n}\r\n\r\nGState.prototype.equals = function equals(other) {\r\n var ignore = \"id,objectNumber,equals\";\r\n var p;\r\n if (!other || typeof other !== typeof this) return false;\r\n var count = 0;\r\n for (p in this) {\r\n if (ignore.indexOf(p) >= 0) continue;\r\n if (this.hasOwnProperty(p) && !other.hasOwnProperty(p)) return false;\r\n if (this[p] !== other[p]) return false;\r\n count++;\r\n }\r\n for (p in other) {\r\n if (other.hasOwnProperty(p) && ignore.indexOf(p) < 0) count--;\r\n }\r\n return count === 0;\r\n};\r\n\r\nfunction Pattern(gState, matrix) {\r\n this.gState = gState;\r\n this.matrix = matrix;\r\n\r\n this.id = \"\"; // set by addPattern()\r\n this.objectNumber = -1; // will be set by putPattern()\r\n}\r\n\r\nfunction ShadingPattern(type, coords, colors, gState, matrix) {\r\n if (!(this instanceof ShadingPattern)) {\r\n return new ShadingPattern(type, coords, colors, gState, matrix);\r\n }\r\n\r\n // see putPattern() for information how they are realized\r\n this.type = type === \"axial\" ? 2 : 3;\r\n this.coords = coords;\r\n this.colors = colors;\r\n\r\n Pattern.call(this, gState, matrix);\r\n}\r\n\r\nfunction TilingPattern(boundingBox, xStep, yStep, gState, matrix) {\r\n if (!(this instanceof TilingPattern)) {\r\n return new TilingPattern(boundingBox, xStep, yStep, gState, matrix);\r\n }\r\n\r\n this.boundingBox = boundingBox;\r\n this.xStep = xStep;\r\n this.yStep = yStep;\r\n\r\n this.stream = \"\"; // set by endTilingPattern();\r\n\r\n this.cloneIndex = 0;\r\n\r\n Pattern.call(this, gState, matrix);\r\n}\r\n\r\n/**\r\n * Creates new jsPDF document object instance.\r\n * @name jsPDF\r\n * @class\r\n * @param {Object} [options] - Collection of settings initializing the jsPDF-instance\r\n * @param {string} [options.orientation=portrait] - Orientation of the first page. Possible values are \"portrait\" or \"landscape\" (or shortcuts \"p\" or \"l\").
\r\n * @param {string} [options.unit=mm] Measurement unit (base unit) to be used when coordinates are specified.
\r\n * Possible values are \"pt\" (points), \"mm\", \"cm\", \"in\", \"px\", \"pc\", \"em\" or \"ex\". Note that in order to get the correct scaling for \"px\"\r\n * units, you need to enable the hotfix \"px_scaling\" by setting options.hotfixes = [\"px_scaling\"].\r\n * @param {string/Array} [options.format=a4] The format of the first page. Can be:
\r\n * Default is \"a4\". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]\r\n * @param {boolean} [options.putOnlyUsedFonts=false] Only put fonts into the PDF, which were used.\r\n * @param {boolean} [options.compress=false] Compress the generated PDF.\r\n * @param {number} [options.precision=16] Precision of the element-positions.\r\n * @param {number} [options.userUnit=1.0] Not to be confused with the base unit. Please inform yourself before you use it.\r\n * @param {string[]} [options.hotfixes] An array of strings to enable hotfixes such as correct pixel scaling.\r\n * @param {Object} [options.encryption]\r\n * @param {string} [options.encryption.userPassword] Password for the user bound by the given permissions list.\r\n * @param {string} [options.encryption.ownerPassword] Both userPassword and ownerPassword should be set for proper authentication.\r\n * @param {string[]} [options.encryption.userPermissions] Array of permissions \"print\", \"modify\", \"copy\", \"annot-forms\", accessible by the user.\r\n * @param {number|\"smart\"} [options.floatPrecision=16]\r\n * @returns {jsPDF} jsPDF-instance\r\n * @description\r\n * ```\r\n * {\r\n * orientation: 'p',\r\n * unit: 'mm',\r\n * format: 'a4',\r\n * putOnlyUsedFonts:true,\r\n * floatPrecision: 16 // or \"smart\", default is 16\r\n * }\r\n * ```\r\n *\r\n * @constructor\r\n */\r\nfunction jsPDF(options) {\r\n var orientation = typeof arguments[0] === \"string\" ? arguments[0] : \"p\";\r\n var unit = arguments[1];\r\n var format = arguments[2];\r\n var compressPdf = arguments[3];\r\n var filters = [];\r\n var userUnit = 1.0;\r\n var precision;\r\n var floatPrecision = 16;\r\n var defaultPathOperation = \"S\";\r\n var encryptionOptions = null;\r\n\r\n options = options || {};\r\n\r\n if (typeof options === \"object\") {\r\n orientation = options.orientation;\r\n unit = options.unit || unit;\r\n format = options.format || format;\r\n compressPdf = options.compress || options.compressPdf || compressPdf;\r\n encryptionOptions = options.encryption || null;\r\n if (encryptionOptions !== null) {\r\n encryptionOptions.userPassword = encryptionOptions.userPassword || \"\";\r\n encryptionOptions.ownerPassword = encryptionOptions.ownerPassword || \"\";\r\n encryptionOptions.userPermissions =\r\n encryptionOptions.userPermissions || [];\r\n }\r\n userUnit =\r\n typeof options.userUnit === \"number\" ? Math.abs(options.userUnit) : 1.0;\r\n if (typeof options.precision !== \"undefined\") {\r\n precision = options.precision;\r\n }\r\n if (typeof options.floatPrecision !== \"undefined\") {\r\n floatPrecision = options.floatPrecision;\r\n }\r\n defaultPathOperation = options.defaultPathOperation || \"S\";\r\n }\r\n\r\n filters =\r\n options.filters || (compressPdf === true ? [\"FlateEncode\"] : filters);\r\n\r\n unit = unit || \"mm\";\r\n orientation = (\"\" + (orientation || \"P\")).toLowerCase();\r\n var putOnlyUsedFonts = options.putOnlyUsedFonts || false;\r\n var usedFonts = {};\r\n\r\n var API = {\r\n internal: {},\r\n __private__: {}\r\n };\r\n\r\n API.__private__.PubSub = PubSub;\r\n\r\n var pdfVersion = \"1.3\";\r\n var getPdfVersion = (API.__private__.getPdfVersion = function() {\r\n return pdfVersion;\r\n });\r\n\r\n API.__private__.setPdfVersion = function(value) {\r\n pdfVersion = value;\r\n };\r\n\r\n // Size in pt of various paper formats\r\n var pageFormats = {\r\n a0: [2383.94, 3370.39],\r\n a1: [1683.78, 2383.94],\r\n a2: [1190.55, 1683.78],\r\n a3: [841.89, 1190.55],\r\n a4: [595.28, 841.89],\r\n a5: [419.53, 595.28],\r\n a6: [297.64, 419.53],\r\n a7: [209.76, 297.64],\r\n a8: [147.4, 209.76],\r\n a9: [104.88, 147.4],\r\n a10: [73.7, 104.88],\r\n b0: [2834.65, 4008.19],\r\n b1: [2004.09, 2834.65],\r\n b2: [1417.32, 2004.09],\r\n b3: [1000.63, 1417.32],\r\n b4: [708.66, 1000.63],\r\n b5: [498.9, 708.66],\r\n b6: [354.33, 498.9],\r\n b7: [249.45, 354.33],\r\n b8: [175.75, 249.45],\r\n b9: [124.72, 175.75],\r\n b10: [87.87, 124.72],\r\n c0: [2599.37, 3676.54],\r\n c1: [1836.85, 2599.37],\r\n c2: [1298.27, 1836.85],\r\n c3: [918.43, 1298.27],\r\n c4: [649.13, 918.43],\r\n c5: [459.21, 649.13],\r\n c6: [323.15, 459.21],\r\n c7: [229.61, 323.15],\r\n c8: [161.57, 229.61],\r\n c9: [113.39, 161.57],\r\n c10: [79.37, 113.39],\r\n dl: [311.81, 623.62],\r\n letter: [612, 792],\r\n \"government-letter\": [576, 756],\r\n legal: [612, 1008],\r\n \"junior-legal\": [576, 360],\r\n ledger: [1224, 792],\r\n tabloid: [792, 1224],\r\n \"credit-card\": [153, 243]\r\n };\r\n\r\n API.__private__.getPageFormats = function() {\r\n return pageFormats;\r\n };\r\n\r\n var getPageFormat = (API.__private__.getPageFormat = function(value) {\r\n return pageFormats[value];\r\n });\r\n\r\n format = format || \"a4\";\r\n\r\n var ApiMode = {\r\n COMPAT: \"compat\",\r\n ADVANCED: \"advanced\"\r\n };\r\n var apiMode = ApiMode.COMPAT;\r\n\r\n function advancedAPI() {\r\n // prepend global change of basis matrix\r\n // (Now, instead of converting every coordinate to the pdf coordinate system, we apply a matrix\r\n // that does this job for us (however, texts, images and similar objects must be drawn bottom up))\r\n this.saveGraphicsState();\r\n out(\r\n new Matrix(\r\n scaleFactor,\r\n 0,\r\n 0,\r\n -scaleFactor,\r\n 0,\r\n getPageHeight() * scaleFactor\r\n ).toString() + \" cm\"\r\n );\r\n this.setFontSize(this.getFontSize() / scaleFactor);\r\n\r\n // The default in MrRio's implementation is \"S\" (stroke), whereas the default in the yWorks implementation\r\n // was \"n\" (none). Although this has nothing to do with transforms, we should use the API switch here.\r\n defaultPathOperation = \"n\";\r\n\r\n apiMode = ApiMode.ADVANCED;\r\n }\r\n\r\n function compatAPI() {\r\n this.restoreGraphicsState();\r\n defaultPathOperation = \"S\";\r\n apiMode = ApiMode.COMPAT;\r\n }\r\n\r\n /**\r\n * @function combineFontStyleAndFontWeight\r\n * @param {string} fontStyle Fontstyle or variant. Example: \"italic\".\r\n * @param {number | string} fontWeight Weight of the Font. Example: \"normal\" | 400\r\n * @returns {string}\r\n * @private\r\n */\r\n var combineFontStyleAndFontWeight = (API.__private__.combineFontStyleAndFontWeight = function(\r\n fontStyle,\r\n fontWeight\r\n ) {\r\n if (\r\n (fontStyle == \"bold\" && fontWeight == \"normal\") ||\r\n (fontStyle == \"bold\" && fontWeight == 400) ||\r\n (fontStyle == \"normal\" && fontWeight == \"italic\") ||\r\n (fontStyle == \"bold\" && fontWeight == \"italic\")\r\n ) {\r\n throw new Error(\"Invalid Combination of fontweight and fontstyle\");\r\n }\r\n if (fontWeight) {\r\n fontStyle =\r\n fontWeight == 400 || fontWeight === \"normal\"\r\n ? fontStyle === \"italic\"\r\n ? \"italic\"\r\n : \"normal\"\r\n : (fontWeight == 700 || fontWeight === \"bold\") &&\r\n fontStyle === \"normal\"\r\n ? \"bold\"\r\n : (fontWeight == 700 ? \"bold\" : fontWeight) + \"\" + fontStyle;\r\n }\r\n return fontStyle;\r\n });\r\n\r\n /**\r\n * @callback ApiSwitchBody\r\n * @param {jsPDF} pdf\r\n */\r\n\r\n /**\r\n * For compatibility reasons jsPDF offers two API modes which differ in the way they convert between the the usual\r\n * screen coordinates and the PDF coordinate system.\r\n * - \"compat\": Offers full compatibility across all plugins but does not allow arbitrary transforms\r\n * - \"advanced\": Allows arbitrary transforms and more advanced features like pattern fills. Some plugins might\r\n * not support this mode, though.\r\n * Initial mode is \"compat\".\r\n *\r\n * You can either provide a callback to the body argument, which means that jsPDF will automatically switch back to\r\n * the original API mode afterwards; or you can omit the callback and switch back manually using {@link compatAPI}.\r\n *\r\n * Note, that the calls to {@link saveGraphicsState} and {@link restoreGraphicsState} need to be balanced within the\r\n * callback or between calls of this method and its counterpart {@link compatAPI}. Calls to {@link beginFormObject}\r\n * or {@link beginTilingPattern} need to be closed by their counterparts before switching back to \"compat\" API mode.\r\n *\r\n * @param {ApiSwitchBody=} body When provided, this callback will be called after the API mode has been switched.\r\n * The API mode will be switched back automatically afterwards.\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name advancedAPI\r\n */\r\n API.advancedAPI = function(body) {\r\n var doSwitch = apiMode === ApiMode.COMPAT;\r\n\r\n if (doSwitch) {\r\n advancedAPI.call(this);\r\n }\r\n\r\n if (typeof body !== \"function\") {\r\n return this;\r\n }\r\n\r\n body(this);\r\n\r\n if (doSwitch) {\r\n compatAPI.call(this);\r\n }\r\n\r\n return this;\r\n };\r\n\r\n /**\r\n * Switches to \"compat\" API mode. See {@link advancedAPI} for more details.\r\n *\r\n * @param {ApiSwitchBody=} body When provided, this callback will be called after the API mode has been switched.\r\n * The API mode will be switched back automatically afterwards.\r\n * @return {jsPDF}\r\n * @memberof jsPDF#\r\n * @name compatApi\r\n */\r\n API.compatAPI = function(body) {\r\n var doSwitch = apiMode === ApiMode.ADVANCED;\r\n\r\n if (doSwitch) {\r\n compatAPI.call(this);\r\n }\r\n\r\n if (typeof body !== \"function\") {\r\n return this;\r\n }\r\n\r\n body(this);\r\n\r\n if (doSwitch) {\r\n advancedAPI.call(this);\r\n }\r\n\r\n return this;\r\n };\r\n\r\n /**\r\n * @return {boolean} True iff the current API mode is \"advanced\". See {@link advancedAPI}.\r\n * @memberof jsPDF#\r\n * @name isAdvancedAPI\r\n */\r\n API.isAdvancedAPI = function() {\r\n return apiMode === ApiMode.ADVANCED;\r\n };\r\n\r\n var advancedApiModeTrap = function(methodName) {\r\n if (apiMode !== ApiMode.ADVANCED) {\r\n throw new Error(\r\n methodName +\r\n \" is only available in 'advanced' API mode. \" +\r\n \"You need to call advancedAPI() first.\"\r\n );\r\n }\r\n };\r\n\r\n var roundToPrecision = (API.roundToPrecision = API.__private__.roundToPrecision = function(\r\n number,\r\n parmPrecision\r\n ) {\r\n var tmpPrecision = precision || parmPrecision;\r\n if (isNaN(number) || isNaN(tmpPrecision)) {\r\n throw new Error(\"Invalid argument passed to jsPDF.roundToPrecision\");\r\n }\r\n return number.toFixed(tmpPrecision).replace(/0+$/, \"\");\r\n });\r\n\r\n // high precision float\r\n var hpf;\r\n if (typeof floatPrecision === \"number\") {\r\n hpf = API.hpf = API.__private__.hpf = function(number) {\r\n if (isNaN(number)) {\r\n throw new Error(\"Invalid argument passed to jsPDF.hpf\");\r\n }\r\n return roundToPrecision(number, floatPrecision);\r\n };\r\n } else if (floatPrecision === \"smart\") {\r\n hpf = API.hpf = API.__private__.hpf = function(number) {\r\n if (isNaN(number)) {\r\n throw new Error(\"Invalid argument passed to jsPDF.hpf\");\r\n }\r\n if (number > -1 && number < 1) {\r\n return roundToPrecision(number, 16);\r\n } else {\r\n return roundToPrecision(number, 5);\r\n }\r\n };\r\n } else {\r\n hpf = API.hpf = API.__private__.hpf = function(number) {\r\n if (isNaN(number)) {\r\n throw new Error(\"Invalid argument passed to jsPDF.hpf\");\r\n }\r\n return roundToPrecision(number, 16);\r\n };\r\n }\r\n var f2 = (API.f2 = API.__private__.f2 = function(number) {\r\n if (isNaN(number)) {\r\n throw new Error(\"Invalid argument passed to jsPDF.f2\");\r\n }\r\n return roundToPrecision(number, 2);\r\n });\r\n\r\n var f3 = (API.__private__.f3 = function(number) {\r\n if (isNaN(number)) {\r\n throw new Error(\"Invalid argument passed to jsPDF.f3\");\r\n }\r\n return roundToPrecision(number, 3);\r\n });\r\n\r\n var scale = (API.scale = API.__private__.scale = function(number) {\r\n if (isNaN(number)) {\r\n throw new Error(\"Invalid argument passed to jsPDF.scale\");\r\n }\r\n if (apiMode === ApiMode.COMPAT) {\r\n return number * scaleFactor;\r\n } else if (apiMode === ApiMode.ADVANCED) {\r\n return number;\r\n }\r\n });\r\n\r\n var transformY = function(y) {\r\n if (apiMode === ApiMode.COMPAT) {\r\n return getPageHeight() - y;\r\n } else if (apiMode === ApiMode.ADVANCED) {\r\n return y;\r\n }\r\n };\r\n\r\n var transformScaleY = function(y) {\r\n return scale(transformY(y));\r\n };\r\n\r\n /**\r\n * @name setPrecision\r\n * @memberof jsPDF#\r\n * @function\r\n * @instance\r\n * @param {string} precision\r\n * @returns {jsPDF}\r\n */\r\n API.__private__.setPrecision = API.setPrecision = function(value) {\r\n if (typeof parseInt(value, 10) === \"number\") {\r\n precision = parseInt(value, 10);\r\n }\r\n };\r\n\r\n var fileId = \"00000000000000000000000000000000\";\r\n\r\n var getFileId = (API.__private__.getFileId = function() {\r\n return fileId;\r\n });\r\n\r\n var setFileId = (API.__private__.setFileId = function(value) {\r\n if (typeof value !== \"undefined\" && /^[a-fA-F0-9]{32}$/.test(value)) {\r\n fileId = value.toUpperCase();\r\n } else {\r\n fileId = fileId\r\n .split(\"\")\r\n .map(function() {\r\n return \"ABCDEF0123456789\".charAt(Math.floor(Math.random() * 16));\r\n })\r\n .join(\"\");\r\n }\r\n\r\n if (encryptionOptions !== null) {\r\n encryption = new PDFSecurity(\r\n encryptionOptions.userPermissions,\r\n encryptionOptions.userPassword,\r\n encryptionOptions.ownerPassword,\r\n fileId\r\n );\r\n }\r\n return fileId;\r\n });\r\n\r\n /**\r\n * @name setFileId\r\n * @memberof jsPDF#\r\n * @function\r\n * @instance\r\n * @param {string} value GUID.\r\n * @returns {jsPDF}\r\n */\r\n API.setFileId = function(value) {\r\n setFileId(value);\r\n return this;\r\n };\r\n\r\n /**\r\n * @name getFileId\r\n * @memberof jsPDF#\r\n * @function\r\n * @instance\r\n *\r\n * @returns {string} GUID.\r\n */\r\n API.getFileId = function() {\r\n return getFileId();\r\n };\r\n\r\n var creationDate;\r\n\r\n var convertDateToPDFDate = (API.__private__.convertDateToPDFDate = function(\r\n parmDate\r\n ) {\r\n var result = \"\";\r\n var tzoffset = parmDate.getTimezoneOffset(),\r\n tzsign = tzoffset < 0 ? \"+\" : \"-\",\r\n tzhour = Math.floor(Math.abs(tzoffset / 60)),\r\n tzmin = Math.abs(tzoffset % 60),\r\n timeZoneString = [tzsign, padd2(tzhour), \"'\", padd2(tzmin), \"'\"].join(\"\");\r\n\r\n result = [\r\n \"D:\",\r\n parmDate.getFullYear(),\r\n padd2(parmDate.getMonth() + 1),\r\n padd2(parmDate.getDate()),\r\n padd2(parmDate.getHours()),\r\n padd2(parmDate.getMinutes()),\r\n padd2(parmDate.getSeconds()),\r\n timeZoneString\r\n ].join(\"\");\r\n return result;\r\n });\r\n\r\n var convertPDFDateToDate = (API.__private__.convertPDFDateToDate = function(\r\n parmPDFDate\r\n ) {\r\n var year = parseInt(parmPDFDate.substr(2, 4), 10);\r\n var month = parseInt(parmPDFDate.substr(6, 2), 10) - 1;\r\n var date = parseInt(parmPDFDate.substr(8, 2), 10);\r\n var hour = parseInt(parmPDFDate.substr(10, 2), 10);\r\n var minutes = parseInt(parmPDFDate.substr(12, 2), 10);\r\n var seconds = parseInt(parmPDFDate.substr(14, 2), 10);\r\n // var timeZoneHour = parseInt(parmPDFDate.substr(16, 2), 10);\r\n // var timeZoneMinutes = parseInt(parmPDFDate.substr(20, 2), 10);\r\n\r\n var resultingDate = new Date(year, month, date, hour, minutes, seconds, 0);\r\n return resultingDate;\r\n });\r\n\r\n var setCreationDate = (API.__private__.setCreationDate = function(date) {\r\n var tmpCreationDateString;\r\n var regexPDFCreationDate = /^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])'?$/;\r\n if (typeof date === \"undefined\") {\r\n date = new Date();\r\n }\r\n\r\n if (date instanceof Date) {\r\n tmpCreationDateString = convertDateToPDFDate(date);\r\n } else if (regexPDFCreationDate.test(date)) {\r\n tmpCreationDateString = date;\r\n } else {\r\n throw new Error(\"Invalid argument passed to jsPDF.setCreationDate\");\r\n }\r\n creationDate = tmpCreationDateString;\r\n return creationDate;\r\n });\r\n\r\n var getCreationDate = (API.__private__.getCreationDate = function(type) {\r\n var result = creationDate;\r\n if (type === \"jsDate\") {\r\n result = convertPDFDateToDate(creationDate);\r\n }\r\n return result;\r\n });\r\n\r\n /**\r\n * @name setCreationDate\r\n * @memberof jsPDF#\r\n * @function\r\n * @instance\r\n * @param {Object} date\r\n * @returns {jsPDF}\r\n */\r\n API.setCreationDate = function(date) {\r\n setCreationDate(date);\r\n return this;\r\n };\r\n\r\n /**\r\n * @name getCreationDate\r\n * @memberof jsPDF#\r\n * @function\r\n * @instance\r\n * @param {Object} type\r\n * @returns {Object}\r\n */\r\n API.getCreationDate = function(type) {\r\n return getCreationDate(type);\r\n };\r\n\r\n var padd2 = (API.__private__.padd2 = function(number) {\r\n return (\"0\" + parseInt(number)).slice(-2);\r\n });\r\n\r\n var padd2Hex = (API.__private__.padd2Hex = function(hexString) {\r\n hexString = hexString.toString();\r\n return (\"00\" + hexString).substr(hexString.length);\r\n });\r\n\r\n var objectNumber = 0; // 'n' Current object number\r\n var offsets = []; // List of offsets. Activated and reset by buildDocument(). Pupulated by various calls buildDocument makes.\r\n var content = [];\r\n var contentLength = 0;\r\n var additionalObjects = [];\r\n\r\n var pages = [];\r\n var currentPage;\r\n var hasCustomDestination = false;\r\n var outputDestination = content;\r\n\r\n var resetDocument = function() {\r\n //reset fields relevant for objectNumber generation and xref.\r\n objectNumber = 0;\r\n contentLength = 0;\r\n content = [];\r\n offsets = [];\r\n additionalObjects = [];\r\n\r\n rootDictionaryObjId = newObjectDeferred();\r\n resourceDictionaryObjId = newObjectDeferred();\r\n };\r\n\r\n API.__private__.setCustomOutputDestination = function(destination) {\r\n hasCustomDestination = true;\r\n outputDestination = destination;\r\n };\r\n var setOutputDestination = function(destination) {\r\n if (!hasCustomDestination) {\r\n outputDestination = destination;\r\n }\r\n };\r\n\r\n API.__private__.resetCustomOutputDestination = function() {\r\n hasCustomDestination = false;\r\n outputDestination = content;\r\n };\r\n\r\n var out = (API.__private__.out = function(string) {\r\n string = string.toString();\r\n contentLength += string.length + 1;\r\n outputDestination.push(string);\r\n\r\n return outputDestination;\r\n });\r\n\r\n var write = (API.__private__.write = function(value) {\r\n return out(\r\n arguments.length === 1\r\n ? value.toString()\r\n : Array.prototype.join.call(arguments, \" \")\r\n );\r\n });\r\n\r\n var getArrayBuffer = (API.__private__.getArrayBuffer = function(data) {\r\n var len = data.length,\r\n ab = new ArrayBuffer(len),\r\n u8 = new Uint8Array(ab);\r\n\r\n while (len--) u8[len] = data.charCodeAt(len);\r\n return ab;\r\n });\r\n\r\n var standardFonts = [\r\n [\"Helvetica\", \"helvetica\", \"normal\", \"WinAnsiEncoding\"],\r\n [\"Helvetica-Bold\", \"helvetica\", \"bold\", \"WinAnsiEncoding\"],\r\n [\"Helvetica-Oblique\", \"helvetica\", \"italic\", \"WinAnsiEncoding\"],\r\n [\"Helvetica-BoldOblique\", \"helvetica\", \"bolditalic\", \"WinAnsiEncoding\"],\r\n [\"Courier\", \"courier\", \"normal\", \"WinAnsiEncoding\"],\r\n [\"Courier-Bold\", \"courier\", \"bold\", \"WinAnsiEncoding\"],\r\n [\"Courier-Oblique\", \"courier\", \"italic\", \"WinAnsiEncoding\"],\r\n [\"Courier-BoldOblique\", \"courier\", \"bolditalic\", \"WinAnsiEncoding\"],\r\n [\"Times-Roman\", \"times\", \"normal\", \"WinAnsiEncoding\"],\r\n [\"Times-Bold\", \"times\", \"bold\", \"WinAnsiEncoding\"],\r\n [\"Times-Italic\", \"times\", \"italic\", \"WinAnsiEncoding\"],\r\n [\"Times-BoldItalic\", \"times\", \"bolditalic\", \"WinAnsiEncoding\"],\r\n [\"ZapfDingbats\", \"zapfdingbats\", \"normal\", null],\r\n [\"Symbol\", \"symbol\", \"normal\", null]\r\n ];\r\n\r\n API.__private__.getStandardFonts = function() {\r\n return standardFonts;\r\n };\r\n\r\n var activeFontSize = options.fontSize || 16;\r\n\r\n /**\r\n * Sets font size for upcoming text elements.\r\n *\r\n * @param {number} size Font size in points.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setFontSize\r\n */\r\n API.__private__.setFontSize = API.setFontSize = function(size) {\r\n if (apiMode === ApiMode.ADVANCED) {\r\n activeFontSize = size / scaleFactor;\r\n } else {\r\n activeFontSize = size;\r\n }\r\n return this;\r\n };\r\n\r\n /**\r\n * Gets the fontsize for upcoming text elements.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {number}\r\n * @memberof jsPDF#\r\n * @name getFontSize\r\n */\r\n var getFontSize = (API.__private__.getFontSize = API.getFontSize = function() {\r\n if (apiMode === ApiMode.COMPAT) {\r\n return activeFontSize;\r\n } else {\r\n return activeFontSize * scaleFactor;\r\n }\r\n });\r\n\r\n var R2L = options.R2L || false;\r\n\r\n /**\r\n * Set value of R2L functionality.\r\n *\r\n * @param {boolean} value\r\n * @function\r\n * @instance\r\n * @returns {jsPDF} jsPDF-instance\r\n * @memberof jsPDF#\r\n * @name setR2L\r\n */\r\n API.__private__.setR2L = API.setR2L = function(value) {\r\n R2L = value;\r\n return this;\r\n };\r\n\r\n /**\r\n * Get value of R2L functionality.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {boolean} jsPDF-instance\r\n * @memberof jsPDF#\r\n * @name getR2L\r\n */\r\n API.__private__.getR2L = API.getR2L = function() {\r\n return R2L;\r\n };\r\n\r\n var zoomMode; // default: 1;\r\n\r\n var setZoomMode = (API.__private__.setZoomMode = function(zoom) {\r\n var validZoomModes = [\r\n undefined,\r\n null,\r\n \"fullwidth\",\r\n \"fullheight\",\r\n \"fullpage\",\r\n \"original\"\r\n ];\r\n\r\n if (/^(?:\\d+\\.\\d*|\\d*\\.\\d+|\\d+)%$/.test(zoom)) {\r\n zoomMode = zoom;\r\n } else if (!isNaN(zoom)) {\r\n zoomMode = parseInt(zoom, 10);\r\n } else if (validZoomModes.indexOf(zoom) !== -1) {\r\n zoomMode = zoom;\r\n } else {\r\n throw new Error(\r\n 'zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. \"' +\r\n zoom +\r\n '\" is not recognized.'\r\n );\r\n }\r\n });\r\n\r\n API.__private__.getZoomMode = function() {\r\n return zoomMode;\r\n };\r\n\r\n var pageMode; // default: 'UseOutlines';\r\n var setPageMode = (API.__private__.setPageMode = function(pmode) {\r\n var validPageModes = [\r\n undefined,\r\n null,\r\n \"UseNone\",\r\n \"UseOutlines\",\r\n \"UseThumbs\",\r\n \"FullScreen\"\r\n ];\r\n\r\n if (validPageModes.indexOf(pmode) == -1) {\r\n throw new Error(\r\n 'Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. \"' +\r\n pmode +\r\n '\" is not recognized.'\r\n );\r\n }\r\n pageMode = pmode;\r\n });\r\n\r\n API.__private__.getPageMode = function() {\r\n return pageMode;\r\n };\r\n\r\n var layoutMode; // default: 'continuous';\r\n var setLayoutMode = (API.__private__.setLayoutMode = function(layout) {\r\n var validLayoutModes = [\r\n undefined,\r\n null,\r\n \"continuous\",\r\n \"single\",\r\n \"twoleft\",\r\n \"tworight\",\r\n \"two\"\r\n ];\r\n\r\n if (validLayoutModes.indexOf(layout) == -1) {\r\n throw new Error(\r\n 'Layout mode must be one of continuous, single, twoleft, tworight. \"' +\r\n layout +\r\n '\" is not recognized.'\r\n );\r\n }\r\n layoutMode = layout;\r\n });\r\n\r\n API.__private__.getLayoutMode = function() {\r\n return layoutMode;\r\n };\r\n\r\n /**\r\n * Set the display mode options of the page like zoom and layout.\r\n *\r\n * @name setDisplayMode\r\n * @memberof jsPDF#\r\n * @function\r\n * @instance\r\n * @param {integer|String} zoom You can pass an integer or percentage as\r\n * a string. 2 will scale the document up 2x, '200%' will scale up by the\r\n * same amount. You can also set it to 'fullwidth', 'fullheight',\r\n * 'fullpage', or 'original'.\r\n *\r\n * Only certain PDF readers support this, such as Adobe Acrobat.\r\n *\r\n * @param {string} layout Layout mode can be: 'continuous' - this is the\r\n * default continuous scroll. 'single' - the single page mode only shows one\r\n * page at a time. 'twoleft' - two column left mode, first page starts on\r\n * the left, and 'tworight' - pages are laid out in two columns, with the\r\n * first page on the right. This would be used for books.\r\n * @param {string} pmode 'UseOutlines' - it shows the\r\n * outline of the document on the left. 'UseThumbs' - shows thumbnails along\r\n * the left. 'FullScreen' - prompts the user to enter fullscreen mode.\r\n *\r\n * @returns {jsPDF}\r\n */\r\n API.__private__.setDisplayMode = API.setDisplayMode = function(\r\n zoom,\r\n layout,\r\n pmode\r\n ) {\r\n setZoomMode(zoom);\r\n setLayoutMode(layout);\r\n setPageMode(pmode);\r\n return this;\r\n };\r\n\r\n var documentProperties = {\r\n title: \"\",\r\n subject: \"\",\r\n author: \"\",\r\n keywords: \"\",\r\n creator: \"\"\r\n };\r\n\r\n API.__private__.getDocumentProperty = function(key) {\r\n if (Object.keys(documentProperties).indexOf(key) === -1) {\r\n throw new Error(\"Invalid argument passed to jsPDF.getDocumentProperty\");\r\n }\r\n return documentProperties[key];\r\n };\r\n\r\n API.__private__.getDocumentProperties = function() {\r\n return documentProperties;\r\n };\r\n\r\n /**\r\n * Adds a properties to the PDF document.\r\n *\r\n * @param {Object} A property_name-to-property_value object structure.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setDocumentProperties\r\n */\r\n API.__private__.setDocumentProperties = API.setProperties = API.setDocumentProperties = function(\r\n properties\r\n ) {\r\n // copying only those properties we can render.\r\n for (var property in documentProperties) {\r\n if (documentProperties.hasOwnProperty(property) && properties[property]) {\r\n documentProperties[property] = properties[property];\r\n }\r\n }\r\n return this;\r\n };\r\n\r\n API.__private__.setDocumentProperty = function(key, value) {\r\n if (Object.keys(documentProperties).indexOf(key) === -1) {\r\n throw new Error(\"Invalid arguments passed to jsPDF.setDocumentProperty\");\r\n }\r\n return (documentProperties[key] = value);\r\n };\r\n\r\n var fonts = {}; // collection of font objects, where key is fontKey - a dynamically created label for a given font.\r\n var fontmap = {}; // mapping structure fontName > fontStyle > font key - performance layer. See addFont()\r\n var activeFontKey; // will be string representing the KEY of the font as combination of fontName + fontStyle\r\n var fontStateStack = []; //\r\n var patterns = {}; // collection of pattern objects\r\n var patternMap = {}; // see fonts\r\n var gStates = {}; // collection of graphic state objects\r\n var gStatesMap = {}; // see fonts\r\n var activeGState = null;\r\n var scaleFactor; // Scale factor\r\n var page = 0;\r\n var pagesContext = [];\r\n var events = new PubSub(API);\r\n var hotfixes = options.hotfixes || [];\r\n\r\n var renderTargets = {};\r\n var renderTargetMap = {};\r\n var renderTargetStack = [];\r\n var pageX;\r\n var pageY;\r\n var pageMatrix; // only used for FormObjects\r\n\r\n /**\r\n * A matrix object for 2D homogenous transformations:
\r\n * | a b 0 |
\r\n * | c d 0 |
\r\n * | e f 1 |
\r\n * pdf multiplies matrices righthand: v' = v x m1 x m2 x ...\r\n *\r\n * @class\r\n * @name Matrix\r\n * @param {number} sx\r\n * @param {number} shy\r\n * @param {number} shx\r\n * @param {number} sy\r\n * @param {number} tx\r\n * @param {number} ty\r\n * @constructor\r\n */\r\n var Matrix = function(sx, shy, shx, sy, tx, ty) {\r\n if (!(this instanceof Matrix)) {\r\n return new Matrix(sx, shy, shx, sy, tx, ty);\r\n }\r\n\r\n if (isNaN(sx)) sx = 1;\r\n if (isNaN(shy)) shy = 0;\r\n if (isNaN(shx)) shx = 0;\r\n if (isNaN(sy)) sy = 1;\r\n if (isNaN(tx)) tx = 0;\r\n if (isNaN(ty)) ty = 0;\r\n\r\n this._matrix = [sx, shy, shx, sy, tx, ty];\r\n };\r\n\r\n /**\r\n * @name sx\r\n * @memberof Matrix#\r\n */\r\n Object.defineProperty(Matrix.prototype, \"sx\", {\r\n get: function() {\r\n return this._matrix[0];\r\n },\r\n set: function(value) {\r\n this._matrix[0] = value;\r\n }\r\n });\r\n\r\n /**\r\n * @name shy\r\n * @memberof Matrix#\r\n */\r\n Object.defineProperty(Matrix.prototype, \"shy\", {\r\n get: function() {\r\n return this._matrix[1];\r\n },\r\n set: function(value) {\r\n this._matrix[1] = value;\r\n }\r\n });\r\n\r\n /**\r\n * @name shx\r\n * @memberof Matrix#\r\n */\r\n Object.defineProperty(Matrix.prototype, \"shx\", {\r\n get: function() {\r\n return this._matrix[2];\r\n },\r\n set: function(value) {\r\n this._matrix[2] = value;\r\n }\r\n });\r\n\r\n /**\r\n * @name sy\r\n * @memberof Matrix#\r\n */\r\n Object.defineProperty(Matrix.prototype, \"sy\", {\r\n get: function() {\r\n return this._matrix[3];\r\n },\r\n set: function(value) {\r\n this._matrix[3] = value;\r\n }\r\n });\r\n\r\n /**\r\n * @name tx\r\n * @memberof Matrix#\r\n */\r\n Object.defineProperty(Matrix.prototype, \"tx\", {\r\n get: function() {\r\n return this._matrix[4];\r\n },\r\n set: function(value) {\r\n this._matrix[4] = value;\r\n }\r\n });\r\n\r\n /**\r\n * @name ty\r\n * @memberof Matrix#\r\n */\r\n Object.defineProperty(Matrix.prototype, \"ty\", {\r\n get: function() {\r\n return this._matrix[5];\r\n },\r\n set: function(value) {\r\n this._matrix[5] = value;\r\n }\r\n });\r\n\r\n Object.defineProperty(Matrix.prototype, \"a\", {\r\n get: function() {\r\n return this._matrix[0];\r\n },\r\n set: function(value) {\r\n this._matrix[0] = value;\r\n }\r\n });\r\n\r\n Object.defineProperty(Matrix.prototype, \"b\", {\r\n get: function() {\r\n return this._matrix[1];\r\n },\r\n set: function(value) {\r\n this._matrix[1] = value;\r\n }\r\n });\r\n\r\n Object.defineProperty(Matrix.prototype, \"c\", {\r\n get: function() {\r\n return this._matrix[2];\r\n },\r\n set: function(value) {\r\n this._matrix[2] = value;\r\n }\r\n });\r\n\r\n Object.defineProperty(Matrix.prototype, \"d\", {\r\n get: function() {\r\n return this._matrix[3];\r\n },\r\n set: function(value) {\r\n this._matrix[3] = value;\r\n }\r\n });\r\n\r\n Object.defineProperty(Matrix.prototype, \"e\", {\r\n get: function() {\r\n return this._matrix[4];\r\n },\r\n set: function(value) {\r\n this._matrix[4] = value;\r\n }\r\n });\r\n\r\n Object.defineProperty(Matrix.prototype, \"f\", {\r\n get: function() {\r\n return this._matrix[5];\r\n },\r\n set: function(value) {\r\n this._matrix[5] = value;\r\n }\r\n });\r\n\r\n /**\r\n * @name rotation\r\n * @memberof Matrix#\r\n */\r\n Object.defineProperty(Matrix.prototype, \"rotation\", {\r\n get: function() {\r\n return Math.atan2(this.shx, this.sx);\r\n }\r\n });\r\n\r\n /**\r\n * @name scaleX\r\n * @memberof Matrix#\r\n */\r\n Object.defineProperty(Matrix.prototype, \"scaleX\", {\r\n get: function() {\r\n return this.decompose().scale.sx;\r\n }\r\n });\r\n\r\n /**\r\n * @name scaleY\r\n * @memberof Matrix#\r\n */\r\n Object.defineProperty(Matrix.prototype, \"scaleY\", {\r\n get: function() {\r\n return this.decompose().scale.sy;\r\n }\r\n });\r\n\r\n /**\r\n * @name isIdentity\r\n * @memberof Matrix#\r\n */\r\n Object.defineProperty(Matrix.prototype, \"isIdentity\", {\r\n get: function() {\r\n if (this.sx !== 1) {\r\n return false;\r\n }\r\n if (this.shy !== 0) {\r\n return false;\r\n }\r\n if (this.shx !== 0) {\r\n return false;\r\n }\r\n if (this.sy !== 1) {\r\n return false;\r\n }\r\n if (this.tx !== 0) {\r\n return false;\r\n }\r\n if (this.ty !== 0) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n });\r\n\r\n /**\r\n * Join the Matrix Values to a String\r\n *\r\n * @function join\r\n * @param {string} separator Specifies a string to separate each pair of adjacent elements of the array. The separator is converted to a string if necessary. If omitted, the array elements are separated with a comma (\",\"). If separator is an empty string, all elements are joined without any characters in between them.\r\n * @returns {string} A string with all array elements joined.\r\n * @memberof Matrix#\r\n */\r\n Matrix.prototype.join = function(separator) {\r\n return [this.sx, this.shy, this.shx, this.sy, this.tx, this.ty]\r\n .map(hpf)\r\n .join(separator);\r\n };\r\n\r\n /**\r\n * Multiply the matrix with given Matrix\r\n *\r\n * @function multiply\r\n * @param matrix\r\n * @returns {Matrix}\r\n * @memberof Matrix#\r\n */\r\n Matrix.prototype.multiply = function(matrix) {\r\n var sx = matrix.sx * this.sx + matrix.shy * this.shx;\r\n var shy = matrix.sx * this.shy + matrix.shy * this.sy;\r\n var shx = matrix.shx * this.sx + matrix.sy * this.shx;\r\n var sy = matrix.shx * this.shy + matrix.sy * this.sy;\r\n var tx = matrix.tx * this.sx + matrix.ty * this.shx + this.tx;\r\n var ty = matrix.tx * this.shy + matrix.ty * this.sy + this.ty;\r\n\r\n return new Matrix(sx, shy, shx, sy, tx, ty);\r\n };\r\n\r\n /**\r\n * @function decompose\r\n * @memberof Matrix#\r\n */\r\n Matrix.prototype.decompose = function() {\r\n var a = this.sx;\r\n var b = this.shy;\r\n var c = this.shx;\r\n var d = this.sy;\r\n var e = this.tx;\r\n var f = this.ty;\r\n\r\n var scaleX = Math.sqrt(a * a + b * b);\r\n a /= scaleX;\r\n b /= scaleX;\r\n\r\n var shear = a * c + b * d;\r\n c -= a * shear;\r\n d -= b * shear;\r\n\r\n var scaleY = Math.sqrt(c * c + d * d);\r\n c /= scaleY;\r\n d /= scaleY;\r\n shear /= scaleY;\r\n\r\n if (a * d < b * c) {\r\n a = -a;\r\n b = -b;\r\n shear = -shear;\r\n scaleX = -scaleX;\r\n }\r\n\r\n return {\r\n scale: new Matrix(scaleX, 0, 0, scaleY, 0, 0),\r\n translate: new Matrix(1, 0, 0, 1, e, f),\r\n rotate: new Matrix(a, b, -b, a, 0, 0),\r\n skew: new Matrix(1, 0, shear, 1, 0, 0)\r\n };\r\n };\r\n\r\n /**\r\n * @function toString\r\n * @memberof Matrix#\r\n */\r\n Matrix.prototype.toString = function(parmPrecision) {\r\n return this.join(\" \");\r\n };\r\n\r\n /**\r\n * @function inversed\r\n * @memberof Matrix#\r\n */\r\n Matrix.prototype.inversed = function() {\r\n var a = this.sx,\r\n b = this.shy,\r\n c = this.shx,\r\n d = this.sy,\r\n e = this.tx,\r\n f = this.ty;\r\n\r\n var quot = 1 / (a * d - b * c);\r\n\r\n var aInv = d * quot;\r\n var bInv = -b * quot;\r\n var cInv = -c * quot;\r\n var dInv = a * quot;\r\n var eInv = -aInv * e - cInv * f;\r\n var fInv = -bInv * e - dInv * f;\r\n\r\n return new Matrix(aInv, bInv, cInv, dInv, eInv, fInv);\r\n };\r\n\r\n /**\r\n * @function applyToPoint\r\n * @memberof Matrix#\r\n */\r\n Matrix.prototype.applyToPoint = function(pt) {\r\n var x = pt.x * this.sx + pt.y * this.shx + this.tx;\r\n var y = pt.x * this.shy + pt.y * this.sy + this.ty;\r\n return new Point(x, y);\r\n };\r\n\r\n /**\r\n * @function applyToRectangle\r\n * @memberof Matrix#\r\n */\r\n Matrix.prototype.applyToRectangle = function(rect) {\r\n var pt1 = this.applyToPoint(rect);\r\n var pt2 = this.applyToPoint(new Point(rect.x + rect.w, rect.y + rect.h));\r\n return new Rectangle(pt1.x, pt1.y, pt2.x - pt1.x, pt2.y - pt1.y);\r\n };\r\n\r\n /**\r\n * Clone the Matrix\r\n *\r\n * @function clone\r\n * @memberof Matrix#\r\n * @name clone\r\n * @instance\r\n */\r\n Matrix.prototype.clone = function() {\r\n var sx = this.sx;\r\n var shy = this.shy;\r\n var shx = this.shx;\r\n var sy = this.sy;\r\n var tx = this.tx;\r\n var ty = this.ty;\r\n\r\n return new Matrix(sx, shy, shx, sy, tx, ty);\r\n };\r\n\r\n API.Matrix = Matrix;\r\n\r\n /**\r\n * Multiplies two matrices. (see {@link Matrix})\r\n * @param {Matrix} m1\r\n * @param {Matrix} m2\r\n * @memberof jsPDF#\r\n * @name matrixMult\r\n */\r\n var matrixMult = (API.matrixMult = function(m1, m2) {\r\n return m2.multiply(m1);\r\n });\r\n\r\n /**\r\n * The identity matrix (equivalent to new Matrix(1, 0, 0, 1, 0, 0)).\r\n * @type {Matrix}\r\n * @memberof! jsPDF#\r\n * @name identityMatrix\r\n */\r\n var identityMatrix = new Matrix(1, 0, 0, 1, 0, 0);\r\n API.unitMatrix = API.identityMatrix = identityMatrix;\r\n\r\n /**\r\n * Adds a new pattern for later use.\r\n * @param {String} key The key by it can be referenced later. The keys must be unique!\r\n * @param {API.Pattern} pattern The pattern\r\n */\r\n var addPattern = function(key, pattern) {\r\n // only add it if it is not already present (the keys provided by the user must be unique!)\r\n if (patternMap[key]) return;\r\n\r\n var prefix = pattern instanceof ShadingPattern ? \"Sh\" : \"P\";\r\n var patternKey = prefix + (Object.keys(patterns).length + 1).toString(10);\r\n pattern.id = patternKey;\r\n\r\n patternMap[key] = patternKey;\r\n patterns[patternKey] = pattern;\r\n\r\n events.publish(\"addPattern\", pattern);\r\n };\r\n\r\n /**\r\n * A pattern describing a shading pattern.\r\n *\r\n * Only available in \"advanced\" API mode.\r\n *\r\n * @param {String} type One of \"axial\" or \"radial\"\r\n * @param {Array} coords Either [x1, y1, x2, y2] for \"axial\" type describing the two interpolation points\r\n * or [x1, y1, r, x2, y2, r2] for \"radial\" describing inner and the outer circle.\r\n * @param {Array} colors An array of objects with the fields \"offset\" and \"color\". \"offset\" describes\r\n * the offset in parameter space [0, 1]. \"color\" is an array of length 3 describing RGB values in [0, 255].\r\n * @param {GState=} gState An additional graphics state that gets applied to the pattern (optional).\r\n * @param {Matrix=} matrix A matrix that describes the transformation between the pattern coordinate system\r\n * and the use coordinate system (optional).\r\n * @constructor\r\n * @extends API.Pattern\r\n */\r\n API.ShadingPattern = ShadingPattern;\r\n\r\n /**\r\n * A PDF Tiling pattern.\r\n *\r\n * Only available in \"advanced\" API mode.\r\n *\r\n * @param {Array.} boundingBox The bounding box at which one pattern cell gets clipped.\r\n * @param {Number} xStep Horizontal spacing between pattern cells.\r\n * @param {Number} yStep Vertical spacing between pattern cells.\r\n * @param {API.GState=} gState An additional graphics state that gets applied to the pattern (optional).\r\n * @param {Matrix=} matrix A matrix that describes the transformation between the pattern coordinate system\r\n * and the use coordinate system (optional).\r\n * @constructor\r\n * @extends API.Pattern\r\n */\r\n API.TilingPattern = TilingPattern;\r\n\r\n /**\r\n * Adds a new {@link API.ShadingPattern} for later use. Only available in \"advanced\" API mode.\r\n * @param {String} key\r\n * @param {Pattern} pattern\r\n * @function\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name addPattern\r\n */\r\n API.addShadingPattern = function(key, pattern) {\r\n advancedApiModeTrap(\"addShadingPattern()\");\r\n\r\n addPattern(key, pattern);\r\n return this;\r\n };\r\n\r\n /**\r\n * Begins a new tiling pattern. All subsequent render calls are drawn to this pattern until {@link API.endTilingPattern}\r\n * gets called. Only available in \"advanced\" API mode.\r\n * @param {API.Pattern} pattern\r\n * @memberof jsPDF#\r\n * @name beginTilingPattern\r\n */\r\n API.beginTilingPattern = function(pattern) {\r\n advancedApiModeTrap(\"beginTilingPattern()\");\r\n\r\n beginNewRenderTarget(\r\n pattern.boundingBox[0],\r\n pattern.boundingBox[1],\r\n pattern.boundingBox[2] - pattern.boundingBox[0],\r\n pattern.boundingBox[3] - pattern.boundingBox[1],\r\n pattern.matrix\r\n );\r\n };\r\n\r\n /**\r\n * Ends a tiling pattern and sets the render target to the one active before {@link API.beginTilingPattern} has been called.\r\n *\r\n * Only available in \"advanced\" API mode.\r\n *\r\n * @param {string} key A unique key that is used to reference this pattern at later use.\r\n * @param {API.Pattern} pattern The pattern to end.\r\n * @memberof jsPDF#\r\n * @name endTilingPattern\r\n */\r\n API.endTilingPattern = function(key, pattern) {\r\n advancedApiModeTrap(\"endTilingPattern()\");\r\n\r\n // retrieve the stream\r\n pattern.stream = pages[currentPage].join(\"\\n\");\r\n\r\n addPattern(key, pattern);\r\n\r\n events.publish(\"endTilingPattern\", pattern);\r\n\r\n // restore state from stack\r\n renderTargetStack.pop().restore();\r\n };\r\n\r\n var newObject = (API.__private__.newObject = function() {\r\n var oid = newObjectDeferred();\r\n newObjectDeferredBegin(oid, true);\r\n return oid;\r\n });\r\n\r\n // Does not output the object. The caller must call newObjectDeferredBegin(oid) before outputing any data\r\n var newObjectDeferred = (API.__private__.newObjectDeferred = function() {\r\n objectNumber++;\r\n offsets[objectNumber] = function() {\r\n return contentLength;\r\n };\r\n return objectNumber;\r\n });\r\n\r\n var newObjectDeferredBegin = function(oid, doOutput) {\r\n doOutput = typeof doOutput === \"boolean\" ? doOutput : false;\r\n offsets[oid] = contentLength;\r\n if (doOutput) {\r\n out(oid + \" 0 obj\");\r\n }\r\n return oid;\r\n };\r\n // Does not output the object until after the pages have been output.\r\n // Returns an object containing the objectId and content.\r\n // All pages have been added so the object ID can be estimated to start right after.\r\n // This does not modify the current objectNumber; It must be updated after the newObjects are output.\r\n var newAdditionalObject = (API.__private__.newAdditionalObject = function() {\r\n var objId = newObjectDeferred();\r\n var obj = {\r\n objId: objId,\r\n content: \"\"\r\n };\r\n additionalObjects.push(obj);\r\n return obj;\r\n });\r\n\r\n var rootDictionaryObjId = newObjectDeferred();\r\n var resourceDictionaryObjId = newObjectDeferred();\r\n\r\n /////////////////////\r\n // Private functions\r\n /////////////////////\r\n\r\n var decodeColorString = (API.__private__.decodeColorString = function(color) {\r\n var colorEncoded = color.split(\" \");\r\n if (\r\n colorEncoded.length === 2 &&\r\n (colorEncoded[1] === \"g\" || colorEncoded[1] === \"G\")\r\n ) {\r\n // convert grayscale value to rgb so that it can be converted to hex for consistency\r\n var floatVal = parseFloat(colorEncoded[0]);\r\n colorEncoded = [floatVal, floatVal, floatVal, \"r\"];\r\n } else if (\r\n colorEncoded.length === 5 &&\r\n (colorEncoded[4] === \"k\" || colorEncoded[4] === \"K\")\r\n ) {\r\n // convert CMYK values to rbg so that it can be converted to hex for consistency\r\n var red = (1.0 - colorEncoded[0]) * (1.0 - colorEncoded[3]);\r\n var green = (1.0 - colorEncoded[1]) * (1.0 - colorEncoded[3]);\r\n var blue = (1.0 - colorEncoded[2]) * (1.0 - colorEncoded[3]);\r\n\r\n colorEncoded = [red, green, blue, \"r\"];\r\n }\r\n var colorAsRGB = \"#\";\r\n for (var i = 0; i < 3; i++) {\r\n colorAsRGB += (\r\n \"0\" + Math.floor(parseFloat(colorEncoded[i]) * 255).toString(16)\r\n ).slice(-2);\r\n }\r\n return colorAsRGB;\r\n });\r\n\r\n var encodeColorString = (API.__private__.encodeColorString = function(\r\n options\r\n ) {\r\n var color;\r\n\r\n if (typeof options === \"string\") {\r\n options = {\r\n ch1: options\r\n };\r\n }\r\n var ch1 = options.ch1;\r\n var ch2 = options.ch2;\r\n var ch3 = options.ch3;\r\n var ch4 = options.ch4;\r\n var letterArray =\r\n options.pdfColorType === \"draw\" ? [\"G\", \"RG\", \"K\"] : [\"g\", \"rg\", \"k\"];\r\n\r\n if (typeof ch1 === \"string\" && ch1.charAt(0) !== \"#\") {\r\n var rgbColor = new RGBColor(ch1);\r\n if (rgbColor.ok) {\r\n ch1 = rgbColor.toHex();\r\n } else if (!/^\\d*\\.?\\d*$/.test(ch1)) {\r\n throw new Error(\r\n 'Invalid color \"' + ch1 + '\" passed to jsPDF.encodeColorString.'\r\n );\r\n }\r\n }\r\n //convert short rgb to long form\r\n if (typeof ch1 === \"string\" && /^#[0-9A-Fa-f]{3}$/.test(ch1)) {\r\n ch1 = \"#\" + ch1[1] + ch1[1] + ch1[2] + ch1[2] + ch1[3] + ch1[3];\r\n }\r\n\r\n if (typeof ch1 === \"string\" && /^#[0-9A-Fa-f]{6}$/.test(ch1)) {\r\n var hex = parseInt(ch1.substr(1), 16);\r\n ch1 = (hex >> 16) & 255;\r\n ch2 = (hex >> 8) & 255;\r\n ch3 = hex & 255;\r\n }\r\n\r\n if (\r\n typeof ch2 === \"undefined\" ||\r\n (typeof ch4 === \"undefined\" && ch1 === ch2 && ch2 === ch3)\r\n ) {\r\n // Gray color space.\r\n if (typeof ch1 === \"string\") {\r\n color = ch1 + \" \" + letterArray[0];\r\n } else {\r\n switch (options.precision) {\r\n case 2:\r\n color = f2(ch1 / 255) + \" \" + letterArray[0];\r\n break;\r\n case 3:\r\n default:\r\n color = f3(ch1 / 255) + \" \" + letterArray[0];\r\n }\r\n }\r\n } else if (typeof ch4 === \"undefined\" || typeof ch4 === \"object\") {\r\n // assume RGBA\r\n if (ch4 && !isNaN(ch4.a)) {\r\n //TODO Implement transparency.\r\n //WORKAROUND use white for now, if transparent, otherwise handle as rgb\r\n if (ch4.a === 0) {\r\n color = [\"1.\", \"1.\", \"1.\", letterArray[1]].join(\" \");\r\n return color;\r\n }\r\n }\r\n // assume RGB\r\n if (typeof ch1 === \"string\") {\r\n color = [ch1, ch2, ch3, letterArray[1]].join(\" \");\r\n } else {\r\n switch (options.precision) {\r\n case 2:\r\n color = [\r\n f2(ch1 / 255),\r\n f2(ch2 / 255),\r\n f2(ch3 / 255),\r\n letterArray[1]\r\n ].join(\" \");\r\n break;\r\n default:\r\n case 3:\r\n color = [\r\n f3(ch1 / 255),\r\n f3(ch2 / 255),\r\n f3(ch3 / 255),\r\n letterArray[1]\r\n ].join(\" \");\r\n }\r\n }\r\n } else {\r\n // assume CMYK\r\n if (typeof ch1 === \"string\") {\r\n color = [ch1, ch2, ch3, ch4, letterArray[2]].join(\" \");\r\n } else {\r\n switch (options.precision) {\r\n case 2:\r\n color = [f2(ch1), f2(ch2), f2(ch3), f2(ch4), letterArray[2]].join(\r\n \" \"\r\n );\r\n break;\r\n case 3:\r\n default:\r\n color = [f3(ch1), f3(ch2), f3(ch3), f3(ch4), letterArray[2]].join(\r\n \" \"\r\n );\r\n }\r\n }\r\n }\r\n return color;\r\n });\r\n\r\n var getFilters = (API.__private__.getFilters = function() {\r\n return filters;\r\n });\r\n\r\n var putStream = (API.__private__.putStream = function(options) {\r\n options = options || {};\r\n var data = options.data || \"\";\r\n var filters = options.filters || getFilters();\r\n var alreadyAppliedFilters = options.alreadyAppliedFilters || [];\r\n var addLength1 = options.addLength1 || false;\r\n var valueOfLength1 = data.length;\r\n var objectId = options.objectId;\r\n var encryptor = function(data) {\r\n return data;\r\n };\r\n if (encryptionOptions !== null && typeof objectId == \"undefined\") {\r\n throw new Error(\r\n \"ObjectId must be passed to putStream for file encryption\"\r\n );\r\n }\r\n if (encryptionOptions !== null) {\r\n encryptor = encryption.encryptor(objectId, 0);\r\n }\r\n\r\n var processedData = {};\r\n if (filters === true) {\r\n filters = [\"FlateEncode\"];\r\n }\r\n var keyValues = options.additionalKeyValues || [];\r\n if (typeof jsPDF.API.processDataByFilters !== \"undefined\") {\r\n processedData = jsPDF.API.processDataByFilters(data, filters);\r\n } else {\r\n processedData = { data: data, reverseChain: [] };\r\n }\r\n var filterAsString =\r\n processedData.reverseChain +\r\n (Array.isArray(alreadyAppliedFilters)\r\n ? alreadyAppliedFilters.join(\" \")\r\n : alreadyAppliedFilters.toString());\r\n\r\n if (processedData.data.length !== 0) {\r\n keyValues.push({\r\n key: \"Length\",\r\n value: processedData.data.length\r\n });\r\n if (addLength1 === true) {\r\n keyValues.push({\r\n key: \"Length1\",\r\n value: valueOfLength1\r\n });\r\n }\r\n }\r\n\r\n if (filterAsString.length != 0) {\r\n if (filterAsString.split(\"/\").length - 1 === 1) {\r\n keyValues.push({\r\n key: \"Filter\",\r\n value: filterAsString\r\n });\r\n } else {\r\n keyValues.push({\r\n key: \"Filter\",\r\n value: \"[\" + filterAsString + \"]\"\r\n });\r\n\r\n for (var j = 0; j < keyValues.length; j += 1) {\r\n if (keyValues[j].key === \"DecodeParms\") {\r\n var decodeParmsArray = [];\r\n\r\n for (\r\n var i = 0;\r\n i < processedData.reverseChain.split(\"/\").length - 1;\r\n i += 1\r\n ) {\r\n decodeParmsArray.push(\"null\");\r\n }\r\n\r\n decodeParmsArray.push(keyValues[j].value);\r\n keyValues[j].value = \"[\" + decodeParmsArray.join(\" \") + \"]\";\r\n }\r\n }\r\n }\r\n }\r\n\r\n out(\"<<\");\r\n for (var k = 0; k < keyValues.length; k++) {\r\n out(\"/\" + keyValues[k].key + \" \" + keyValues[k].value);\r\n }\r\n out(\">>\");\r\n if (processedData.data.length !== 0) {\r\n out(\"stream\");\r\n out(encryptor(processedData.data));\r\n out(\"endstream\");\r\n }\r\n });\r\n\r\n var putPage = (API.__private__.putPage = function(page) {\r\n var pageNumber = page.number;\r\n var data = page.data;\r\n var pageObjectNumber = page.objId;\r\n var pageContentsObjId = page.contentsObjId;\r\n\r\n newObjectDeferredBegin(pageObjectNumber, true);\r\n out(\"<>\");\r\n out(\"endobj\");\r\n // Page content\r\n var pageContent = data.join(\"\\n\");\r\n\r\n if (apiMode === ApiMode.ADVANCED) {\r\n // if the user forgot to switch back to COMPAT mode, we must balance the graphics stack again\r\n pageContent += \"\\nQ\";\r\n }\r\n\r\n newObjectDeferredBegin(pageContentsObjId, true);\r\n putStream({\r\n data: pageContent,\r\n filters: getFilters(),\r\n objectId: pageContentsObjId\r\n });\r\n out(\"endobj\");\r\n return pageObjectNumber;\r\n });\r\n\r\n var putPages = (API.__private__.putPages = function() {\r\n var n,\r\n i,\r\n pageObjectNumbers = [];\r\n\r\n for (n = 1; n <= page; n++) {\r\n pagesContext[n].objId = newObjectDeferred();\r\n pagesContext[n].contentsObjId = newObjectDeferred();\r\n }\r\n\r\n for (n = 1; n <= page; n++) {\r\n pageObjectNumbers.push(\r\n putPage({\r\n number: n,\r\n data: pages[n],\r\n objId: pagesContext[n].objId,\r\n contentsObjId: pagesContext[n].contentsObjId,\r\n mediaBox: pagesContext[n].mediaBox,\r\n cropBox: pagesContext[n].cropBox,\r\n bleedBox: pagesContext[n].bleedBox,\r\n trimBox: pagesContext[n].trimBox,\r\n artBox: pagesContext[n].artBox,\r\n userUnit: pagesContext[n].userUnit,\r\n rootDictionaryObjId: rootDictionaryObjId,\r\n resourceDictionaryObjId: resourceDictionaryObjId\r\n })\r\n );\r\n }\r\n newObjectDeferredBegin(rootDictionaryObjId, true);\r\n out(\"<>\");\r\n out(\"endobj\");\r\n events.publish(\"postPutPages\");\r\n });\r\n\r\n var putFont = function(font) {\r\n events.publish(\"putFont\", {\r\n font: font,\r\n out: out,\r\n newObject: newObject,\r\n putStream: putStream\r\n });\r\n\r\n if (font.isAlreadyPutted !== true) {\r\n font.objectNumber = newObject();\r\n out(\"<<\");\r\n out(\"/Type /Font\");\r\n out(\"/BaseFont /\" + toPDFName(font.postScriptName));\r\n out(\"/Subtype /Type1\");\r\n if (typeof font.encoding === \"string\") {\r\n out(\"/Encoding /\" + font.encoding);\r\n }\r\n out(\"/FirstChar 32\");\r\n out(\"/LastChar 255\");\r\n out(\">>\");\r\n out(\"endobj\");\r\n }\r\n };\r\n\r\n var putFonts = function() {\r\n for (var fontKey in fonts) {\r\n if (fonts.hasOwnProperty(fontKey)) {\r\n if (\r\n putOnlyUsedFonts === false ||\r\n (putOnlyUsedFonts === true && usedFonts.hasOwnProperty(fontKey))\r\n ) {\r\n putFont(fonts[fontKey]);\r\n }\r\n }\r\n }\r\n };\r\n\r\n var putXObject = function(xObject) {\r\n xObject.objectNumber = newObject();\r\n\r\n var options = [];\r\n options.push({ key: \"Type\", value: \"/XObject\" });\r\n options.push({ key: \"Subtype\", value: \"/Form\" });\r\n options.push({\r\n key: \"BBox\",\r\n value:\r\n \"[\" +\r\n [\r\n hpf(xObject.x),\r\n hpf(xObject.y),\r\n hpf(xObject.x + xObject.width),\r\n hpf(xObject.y + xObject.height)\r\n ].join(\" \") +\r\n \"]\"\r\n });\r\n options.push({\r\n key: \"Matrix\",\r\n value: \"[\" + xObject.matrix.toString() + \"]\"\r\n });\r\n // TODO: /Resources\r\n\r\n var stream = xObject.pages[1].join(\"\\n\");\r\n putStream({\r\n data: stream,\r\n additionalKeyValues: options,\r\n objectId: xObject.objectNumber\r\n });\r\n out(\"endobj\");\r\n };\r\n\r\n var putXObjects = function() {\r\n for (var xObjectKey in renderTargets) {\r\n if (renderTargets.hasOwnProperty(xObjectKey)) {\r\n putXObject(renderTargets[xObjectKey]);\r\n }\r\n }\r\n };\r\n\r\n var interpolateAndEncodeRGBStream = function(colors, numberSamples) {\r\n var tValues = [];\r\n var t;\r\n var dT = 1.0 / (numberSamples - 1);\r\n for (t = 0.0; t < 1.0; t += dT) {\r\n tValues.push(t);\r\n }\r\n tValues.push(1.0);\r\n // add first and last control point if not present\r\n if (colors[0].offset != 0.0) {\r\n var c0 = {\r\n offset: 0.0,\r\n color: colors[0].color\r\n };\r\n colors.unshift(c0);\r\n }\r\n if (colors[colors.length - 1].offset != 1.0) {\r\n var c1 = {\r\n offset: 1.0,\r\n color: colors[colors.length - 1].color\r\n };\r\n colors.push(c1);\r\n }\r\n var out = \"\";\r\n var index = 0;\r\n\r\n for (var i = 0; i < tValues.length; i++) {\r\n t = tValues[i];\r\n while (t > colors[index + 1].offset) index++;\r\n var a = colors[index].offset;\r\n var b = colors[index + 1].offset;\r\n var d = (t - a) / (b - a);\r\n\r\n var aColor = colors[index].color;\r\n var bColor = colors[index + 1].color;\r\n\r\n out +=\r\n padd2Hex(Math.round((1 - d) * aColor[0] + d * bColor[0]).toString(16)) +\r\n padd2Hex(Math.round((1 - d) * aColor[1] + d * bColor[1]).toString(16)) +\r\n padd2Hex(Math.round((1 - d) * aColor[2] + d * bColor[2]).toString(16));\r\n }\r\n return out.trim();\r\n };\r\n\r\n var putShadingPattern = function(pattern, numberSamples) {\r\n /*\r\n Axial patterns shade between the two points specified in coords, radial patterns between the inner\r\n and outer circle.\r\n The user can specify an array (colors) that maps t-Values in [0, 1] to RGB colors. These are now\r\n interpolated to equidistant samples and written to pdf as a sample (type 0) function.\r\n */\r\n // The number of color samples that should be used to describe the shading.\r\n // The higher, the more accurate the gradient will be.\r\n numberSamples || (numberSamples = 21);\r\n var funcObjectNumber = newObject();\r\n var stream = interpolateAndEncodeRGBStream(pattern.colors, numberSamples);\r\n\r\n var options = [];\r\n options.push({ key: \"FunctionType\", value: \"0\" });\r\n options.push({ key: \"Domain\", value: \"[0.0 1.0]\" });\r\n options.push({ key: \"Size\", value: \"[\" + numberSamples + \"]\" });\r\n options.push({ key: \"BitsPerSample\", value: \"8\" });\r\n options.push({ key: \"Range\", value: \"[0.0 1.0 0.0 1.0 0.0 1.0]\" });\r\n options.push({ key: \"Decode\", value: \"[0.0 1.0 0.0 1.0 0.0 1.0]\" });\r\n\r\n putStream({\r\n data: stream,\r\n additionalKeyValues: options,\r\n alreadyAppliedFilters: [\"/ASCIIHexDecode\"],\r\n objectId: funcObjectNumber\r\n });\r\n out(\"endobj\");\r\n\r\n pattern.objectNumber = newObject();\r\n out(\"<< /ShadingType \" + pattern.type);\r\n out(\"/ColorSpace /DeviceRGB\");\r\n var coords =\r\n \"/Coords [\" +\r\n hpf(parseFloat(pattern.coords[0])) +\r\n \" \" + // x1\r\n hpf(parseFloat(pattern.coords[1])) +\r\n \" \"; // y1\r\n if (pattern.type === 2) {\r\n // axial\r\n coords +=\r\n hpf(parseFloat(pattern.coords[2])) +\r\n \" \" + // x2\r\n hpf(parseFloat(pattern.coords[3])); // y2\r\n } else {\r\n // radial\r\n coords +=\r\n hpf(parseFloat(pattern.coords[2])) +\r\n \" \" + // r1\r\n hpf(parseFloat(pattern.coords[3])) +\r\n \" \" + // x2\r\n hpf(parseFloat(pattern.coords[4])) +\r\n \" \" + // y2\r\n hpf(parseFloat(pattern.coords[5])); // r2\r\n }\r\n coords += \"]\";\r\n out(coords);\r\n\r\n if (pattern.matrix) {\r\n out(\"/Matrix [\" + pattern.matrix.toString() + \"]\");\r\n }\r\n out(\"/Function \" + funcObjectNumber + \" 0 R\");\r\n out(\"/Extend [true true]\");\r\n out(\">>\");\r\n out(\"endobj\");\r\n };\r\n\r\n var putTilingPattern = function(pattern, deferredResourceDictionaryIds) {\r\n var resourcesObjectId = newObjectDeferred();\r\n var patternObjectId = newObject();\r\n\r\n deferredResourceDictionaryIds.push({\r\n resourcesOid: resourcesObjectId,\r\n objectOid: patternObjectId\r\n });\r\n\r\n pattern.objectNumber = patternObjectId;\r\n var options = [];\r\n options.push({ key: \"Type\", value: \"/Pattern\" });\r\n options.push({ key: \"PatternType\", value: \"1\" }); // tiling pattern\r\n options.push({ key: \"PaintType\", value: \"1\" }); // colored tiling pattern\r\n options.push({ key: \"TilingType\", value: \"1\" }); // constant spacing\r\n options.push({\r\n key: \"BBox\",\r\n value: \"[\" + pattern.boundingBox.map(hpf).join(\" \") + \"]\"\r\n });\r\n options.push({ key: \"XStep\", value: hpf(pattern.xStep) });\r\n options.push({ key: \"YStep\", value: hpf(pattern.yStep) });\r\n options.push({ key: \"Resources\", value: resourcesObjectId + \" 0 R\" });\r\n if (pattern.matrix) {\r\n options.push({\r\n key: \"Matrix\",\r\n value: \"[\" + pattern.matrix.toString() + \"]\"\r\n });\r\n }\r\n\r\n putStream({\r\n data: pattern.stream,\r\n additionalKeyValues: options,\r\n objectId: pattern.objectNumber\r\n });\r\n out(\"endobj\");\r\n };\r\n\r\n var putPatterns = function(deferredResourceDictionaryIds) {\r\n var patternKey;\r\n for (patternKey in patterns) {\r\n if (patterns.hasOwnProperty(patternKey)) {\r\n if (patterns[patternKey] instanceof ShadingPattern) {\r\n putShadingPattern(patterns[patternKey]);\r\n } else if (patterns[patternKey] instanceof TilingPattern) {\r\n putTilingPattern(patterns[patternKey], deferredResourceDictionaryIds);\r\n }\r\n }\r\n }\r\n };\r\n\r\n var putGState = function(gState) {\r\n gState.objectNumber = newObject();\r\n out(\"<<\");\r\n for (var p in gState) {\r\n switch (p) {\r\n case \"opacity\":\r\n out(\"/ca \" + f2(gState[p]));\r\n break;\r\n case \"stroke-opacity\":\r\n out(\"/CA \" + f2(gState[p]));\r\n break;\r\n }\r\n }\r\n out(\">>\");\r\n out(\"endobj\");\r\n };\r\n\r\n var putGStates = function() {\r\n var gStateKey;\r\n for (gStateKey in gStates) {\r\n if (gStates.hasOwnProperty(gStateKey)) {\r\n putGState(gStates[gStateKey]);\r\n }\r\n }\r\n };\r\n\r\n var putXobjectDict = function() {\r\n out(\"/XObject <<\");\r\n for (var xObjectKey in renderTargets) {\r\n if (\r\n renderTargets.hasOwnProperty(xObjectKey) &&\r\n renderTargets[xObjectKey].objectNumber >= 0\r\n ) {\r\n out(\r\n \"/\" +\r\n xObjectKey +\r\n \" \" +\r\n renderTargets[xObjectKey].objectNumber +\r\n \" 0 R\"\r\n );\r\n }\r\n }\r\n\r\n // Loop through images, or other data objects\r\n events.publish(\"putXobjectDict\");\r\n out(\">>\");\r\n };\r\n\r\n var putEncryptionDict = function() {\r\n encryption.oid = newObject();\r\n out(\"<<\");\r\n out(\"/Filter /Standard\");\r\n out(\"/V \" + encryption.v);\r\n out(\"/R \" + encryption.r);\r\n out(\"/U <\" + encryption.toHexString(encryption.U) + \">\");\r\n out(\"/O <\" + encryption.toHexString(encryption.O) + \">\");\r\n out(\"/P \" + encryption.P);\r\n out(\">>\");\r\n out(\"endobj\");\r\n };\r\n\r\n var putFontDict = function() {\r\n out(\"/Font <<\");\r\n\r\n for (var fontKey in fonts) {\r\n if (fonts.hasOwnProperty(fontKey)) {\r\n if (\r\n putOnlyUsedFonts === false ||\r\n (putOnlyUsedFonts === true && usedFonts.hasOwnProperty(fontKey))\r\n ) {\r\n out(\"/\" + fontKey + \" \" + fonts[fontKey].objectNumber + \" 0 R\");\r\n }\r\n }\r\n }\r\n out(\">>\");\r\n };\r\n\r\n var putShadingPatternDict = function() {\r\n if (Object.keys(patterns).length > 0) {\r\n out(\"/Shading <<\");\r\n for (var patternKey in patterns) {\r\n if (\r\n patterns.hasOwnProperty(patternKey) &&\r\n patterns[patternKey] instanceof ShadingPattern &&\r\n patterns[patternKey].objectNumber >= 0\r\n ) {\r\n out(\r\n \"/\" + patternKey + \" \" + patterns[patternKey].objectNumber + \" 0 R\"\r\n );\r\n }\r\n }\r\n\r\n events.publish(\"putShadingPatternDict\");\r\n out(\">>\");\r\n }\r\n };\r\n\r\n var putTilingPatternDict = function(objectOid) {\r\n if (Object.keys(patterns).length > 0) {\r\n out(\"/Pattern <<\");\r\n for (var patternKey in patterns) {\r\n if (\r\n patterns.hasOwnProperty(patternKey) &&\r\n patterns[patternKey] instanceof API.TilingPattern &&\r\n patterns[patternKey].objectNumber >= 0 &&\r\n patterns[patternKey].objectNumber < objectOid // prevent cyclic dependencies\r\n ) {\r\n out(\r\n \"/\" + patternKey + \" \" + patterns[patternKey].objectNumber + \" 0 R\"\r\n );\r\n }\r\n }\r\n events.publish(\"putTilingPatternDict\");\r\n out(\">>\");\r\n }\r\n };\r\n\r\n var putGStatesDict = function() {\r\n if (Object.keys(gStates).length > 0) {\r\n var gStateKey;\r\n out(\"/ExtGState <<\");\r\n for (gStateKey in gStates) {\r\n if (\r\n gStates.hasOwnProperty(gStateKey) &&\r\n gStates[gStateKey].objectNumber >= 0\r\n ) {\r\n out(\"/\" + gStateKey + \" \" + gStates[gStateKey].objectNumber + \" 0 R\");\r\n }\r\n }\r\n\r\n events.publish(\"putGStateDict\");\r\n out(\">>\");\r\n }\r\n };\r\n\r\n var putResourceDictionary = function(objectIds) {\r\n newObjectDeferredBegin(objectIds.resourcesOid, true);\r\n out(\"<<\");\r\n out(\"/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]\");\r\n putFontDict();\r\n putShadingPatternDict();\r\n putTilingPatternDict(objectIds.objectOid);\r\n putGStatesDict();\r\n putXobjectDict();\r\n out(\">>\");\r\n out(\"endobj\");\r\n };\r\n\r\n var putResources = function() {\r\n // FormObjects, Patterns etc. might use other FormObjects/Patterns/Images\r\n // which means their resource dictionaries must contain the already resolved\r\n // object ids. For this reason we defer the serialization of the resource\r\n // dicts until all objects have been serialized and have object ids.\r\n //\r\n // In order to prevent cyclic dependencies (which Adobe Reader doesn't like),\r\n // we only put all oids that are smaller than the oid of the object the\r\n // resource dict belongs to. This is correct behavior, since the streams\r\n // may only use other objects that have already been defined and thus appear\r\n // earlier in their respective collection.\r\n // Currently, this only affects tiling patterns, but a (more) correct\r\n // implementation of FormObjects would also define their own resource dicts.\r\n var deferredResourceDictionaryIds = [];\r\n\r\n putFonts();\r\n putGStates();\r\n putXObjects();\r\n putPatterns(deferredResourceDictionaryIds);\r\n\r\n events.publish(\"putResources\");\r\n deferredResourceDictionaryIds.forEach(putResourceDictionary);\r\n putResourceDictionary({\r\n resourcesOid: resourceDictionaryObjId,\r\n objectOid: Number.MAX_SAFE_INTEGER // output all objects\r\n });\r\n events.publish(\"postPutResources\");\r\n };\r\n\r\n var putAdditionalObjects = function() {\r\n events.publish(\"putAdditionalObjects\");\r\n for (var i = 0; i < additionalObjects.length; i++) {\r\n var obj = additionalObjects[i];\r\n newObjectDeferredBegin(obj.objId, true);\r\n out(obj.content);\r\n out(\"endobj\");\r\n }\r\n events.publish(\"postPutAdditionalObjects\");\r\n };\r\n\r\n var addFontToFontDictionary = function(font) {\r\n fontmap[font.fontName] = fontmap[font.fontName] || {};\r\n fontmap[font.fontName][font.fontStyle] = font.id;\r\n };\r\n\r\n var addFont = function(\r\n postScriptName,\r\n fontName,\r\n fontStyle,\r\n encoding,\r\n isStandardFont\r\n ) {\r\n var font = {\r\n id: \"F\" + (Object.keys(fonts).length + 1).toString(10),\r\n postScriptName: postScriptName,\r\n fontName: fontName,\r\n fontStyle: fontStyle,\r\n encoding: encoding,\r\n isStandardFont: isStandardFont || false,\r\n metadata: {}\r\n };\r\n\r\n events.publish(\"addFont\", {\r\n font: font,\r\n instance: this\r\n });\r\n\r\n fonts[font.id] = font;\r\n addFontToFontDictionary(font);\r\n return font.id;\r\n };\r\n\r\n var addFonts = function(arrayOfFonts) {\r\n for (var i = 0, l = standardFonts.length; i < l; i++) {\r\n var fontKey = addFont.call(\r\n this,\r\n arrayOfFonts[i][0],\r\n arrayOfFonts[i][1],\r\n arrayOfFonts[i][2],\r\n standardFonts[i][3],\r\n true\r\n );\r\n\r\n if (putOnlyUsedFonts === false) {\r\n usedFonts[fontKey] = true;\r\n }\r\n // adding aliases for standard fonts, this time matching the capitalization\r\n var parts = arrayOfFonts[i][0].split(\"-\");\r\n addFontToFontDictionary({\r\n id: fontKey,\r\n fontName: parts[0],\r\n fontStyle: parts[1] || \"\"\r\n });\r\n }\r\n events.publish(\"addFonts\", {\r\n fonts: fonts,\r\n dictionary: fontmap\r\n });\r\n };\r\n\r\n var SAFE = function __safeCall(fn) {\r\n fn.foo = function __safeCallWrapper() {\r\n try {\r\n return fn.apply(this, arguments);\r\n } catch (e) {\r\n var stack = e.stack || \"\";\r\n if (~stack.indexOf(\" at \")) stack = stack.split(\" at \")[1];\r\n var m =\r\n \"Error in function \" +\r\n stack.split(\"\\n\")[0].split(\"<\")[0] +\r\n \": \" +\r\n e.message;\r\n if (globalObject.console) {\r\n globalObject.console.error(m, e);\r\n if (globalObject.alert) alert(m);\r\n } else {\r\n throw new Error(m);\r\n }\r\n }\r\n };\r\n fn.foo.bar = fn;\r\n return fn.foo;\r\n };\r\n\r\n var to8bitStream = function(text, flags) {\r\n /**\r\n * PDF 1.3 spec:\r\n * \"For text strings encoded in Unicode, the first two bytes must be 254 followed by\r\n * 255, representing the Unicode byte order marker, U+FEFF. (This sequence conflicts\r\n * with the PDFDocEncoding character sequence thorn ydieresis, which is unlikely\r\n * to be a meaningful beginning of a word or phrase.) The remainder of the\r\n * string consists of Unicode character codes, according to the UTF-16 encoding\r\n * specified in the Unicode standard, version 2.0. Commonly used Unicode values\r\n * are represented as 2 bytes per character, with the high-order byte appearing first\r\n * in the string.\"\r\n *\r\n * In other words, if there are chars in a string with char code above 255, we\r\n * recode the string to UCS2 BE - string doubles in length and BOM is prepended.\r\n *\r\n * HOWEVER!\r\n * Actual *content* (body) text (as opposed to strings used in document properties etc)\r\n * does NOT expect BOM. There, it is treated as a literal GID (Glyph ID)\r\n *\r\n * Because of Adobe's focus on \"you subset your fonts!\" you are not supposed to have\r\n * a font that maps directly Unicode (UCS2 / UTF16BE) code to font GID, but you could\r\n * fudge it with \"Identity-H\" encoding and custom CIDtoGID map that mimics Unicode\r\n * code page. There, however, all characters in the stream are treated as GIDs,\r\n * including BOM, which is the reason we need to skip BOM in content text (i.e. that\r\n * that is tied to a font).\r\n *\r\n * To signal this \"special\" PDFEscape / to8bitStream handling mode,\r\n * API.text() function sets (unless you overwrite it with manual values\r\n * given to API.text(.., flags) )\r\n * flags.autoencode = true\r\n * flags.noBOM = true\r\n *\r\n * ===================================================================================\r\n * `flags` properties relied upon:\r\n * .sourceEncoding = string with encoding label.\r\n * \"Unicode\" by default. = encoding of the incoming text.\r\n * pass some non-existing encoding name\r\n * (ex: 'Do not touch my strings! I know what I am doing.')\r\n * to make encoding code skip the encoding step.\r\n * .outputEncoding = Either valid PDF encoding name\r\n * (must be supported by jsPDF font metrics, otherwise no encoding)\r\n * or a JS object, where key = sourceCharCode, value = outputCharCode\r\n * missing keys will be treated as: sourceCharCode === outputCharCode\r\n * .noBOM\r\n * See comment higher above for explanation for why this is important\r\n * .autoencode\r\n * See comment higher above for explanation for why this is important\r\n */\r\n\r\n var i,\r\n l,\r\n sourceEncoding,\r\n encodingBlock,\r\n outputEncoding,\r\n newtext,\r\n isUnicode,\r\n ch,\r\n bch;\r\n\r\n flags = flags || {};\r\n sourceEncoding = flags.sourceEncoding || \"Unicode\";\r\n outputEncoding = flags.outputEncoding;\r\n\r\n // This 'encoding' section relies on font metrics format\r\n // attached to font objects by, among others,\r\n // \"Willow Systems' standard_font_metrics plugin\"\r\n // see jspdf.plugin.standard_font_metrics.js for format\r\n // of the font.metadata.encoding Object.\r\n // It should be something like\r\n // .encoding = {'codePages':['WinANSI....'], 'WinANSI...':{code:code, ...}}\r\n // .widths = {0:width, code:width, ..., 'fof':divisor}\r\n // .kerning = {code:{previous_char_code:shift, ..., 'fof':-divisor},...}\r\n if (\r\n (flags.autoencode || outputEncoding) &&\r\n fonts[activeFontKey].metadata &&\r\n fonts[activeFontKey].metadata[sourceEncoding] &&\r\n fonts[activeFontKey].metadata[sourceEncoding].encoding\r\n ) {\r\n encodingBlock = fonts[activeFontKey].metadata[sourceEncoding].encoding;\r\n\r\n // each font has default encoding. Some have it clearly defined.\r\n if (!outputEncoding && fonts[activeFontKey].encoding) {\r\n outputEncoding = fonts[activeFontKey].encoding;\r\n }\r\n\r\n // Hmmm, the above did not work? Let's try again, in different place.\r\n if (!outputEncoding && encodingBlock.codePages) {\r\n outputEncoding = encodingBlock.codePages[0]; // let's say, first one is the default\r\n }\r\n\r\n if (typeof outputEncoding === \"string\") {\r\n outputEncoding = encodingBlock[outputEncoding];\r\n }\r\n // we want output encoding to be a JS Object, where\r\n // key = sourceEncoding's character code and\r\n // value = outputEncoding's character code.\r\n if (outputEncoding) {\r\n isUnicode = false;\r\n newtext = [];\r\n for (i = 0, l = text.length; i < l; i++) {\r\n ch = outputEncoding[text.charCodeAt(i)];\r\n if (ch) {\r\n newtext.push(String.fromCharCode(ch));\r\n } else {\r\n newtext.push(text[i]);\r\n }\r\n\r\n // since we are looping over chars anyway, might as well\r\n // check for residual unicodeness\r\n if (newtext[i].charCodeAt(0) >> 8) {\r\n /* more than 255 */\r\n isUnicode = true;\r\n }\r\n }\r\n text = newtext.join(\"\");\r\n }\r\n }\r\n\r\n i = text.length;\r\n // isUnicode may be set to false above. Hence the triple-equal to undefined\r\n while (isUnicode === undefined && i !== 0) {\r\n if (text.charCodeAt(i - 1) >> 8) {\r\n /* more than 255 */\r\n isUnicode = true;\r\n }\r\n i--;\r\n }\r\n if (!isUnicode) {\r\n return text;\r\n }\r\n\r\n newtext = flags.noBOM ? [] : [254, 255];\r\n for (i = 0, l = text.length; i < l; i++) {\r\n ch = text.charCodeAt(i);\r\n bch = ch >> 8; // divide by 256\r\n if (bch >> 8) {\r\n /* something left after dividing by 256 second time */\r\n throw new Error(\r\n \"Character at position \" +\r\n i +\r\n \" of string '\" +\r\n text +\r\n \"' exceeds 16bits. Cannot be encoded into UCS-2 BE\"\r\n );\r\n }\r\n newtext.push(bch);\r\n newtext.push(ch - (bch << 8));\r\n }\r\n return String.fromCharCode.apply(undefined, newtext);\r\n };\r\n\r\n var pdfEscape = (API.__private__.pdfEscape = API.pdfEscape = function(\r\n text,\r\n flags\r\n ) {\r\n /**\r\n * Replace '/', '(', and ')' with pdf-safe versions\r\n *\r\n * Doing to8bitStream does NOT make this PDF display unicode text. For that\r\n * we also need to reference a unicode font and embed it - royal pain in the rear.\r\n *\r\n * There is still a benefit to to8bitStream - PDF simply cannot handle 16bit chars,\r\n * which JavaScript Strings are happy to provide. So, while we still cannot display\r\n * 2-byte characters property, at least CONDITIONALLY converting (entire string containing)\r\n * 16bit chars to (USC-2-BE) 2-bytes per char + BOM streams we ensure that entire PDF\r\n * is still parseable.\r\n * This will allow immediate support for unicode in document properties strings.\r\n */\r\n return to8bitStream(text, flags)\r\n .replace(/\\\\/g, \"\\\\\\\\\")\r\n .replace(/\\(/g, \"\\\\(\")\r\n .replace(/\\)/g, \"\\\\)\");\r\n });\r\n\r\n var beginPage = (API.__private__.beginPage = function(format) {\r\n pages[++page] = [];\r\n pagesContext[page] = {\r\n objId: 0,\r\n contentsObjId: 0,\r\n userUnit: Number(userUnit),\r\n artBox: null,\r\n bleedBox: null,\r\n cropBox: null,\r\n trimBox: null,\r\n mediaBox: {\r\n bottomLeftX: 0,\r\n bottomLeftY: 0,\r\n topRightX: Number(format[0]),\r\n topRightY: Number(format[1])\r\n }\r\n };\r\n _setPage(page);\r\n setOutputDestination(pages[currentPage]);\r\n });\r\n\r\n var _addPage = function(parmFormat, parmOrientation) {\r\n var dimensions, width, height;\r\n\r\n orientation = parmOrientation || orientation;\r\n\r\n if (typeof parmFormat === \"string\") {\r\n dimensions = getPageFormat(parmFormat.toLowerCase());\r\n if (Array.isArray(dimensions)) {\r\n width = dimensions[0];\r\n height = dimensions[1];\r\n }\r\n }\r\n\r\n if (Array.isArray(parmFormat)) {\r\n width = parmFormat[0] * scaleFactor;\r\n height = parmFormat[1] * scaleFactor;\r\n }\r\n\r\n if (isNaN(width)) {\r\n width = format[0];\r\n height = format[1];\r\n }\r\n\r\n if (width > 14400 || height > 14400) {\r\n console.warn(\r\n \"A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400\"\r\n );\r\n width = Math.min(14400, width);\r\n height = Math.min(14400, height);\r\n }\r\n\r\n format = [width, height];\r\n\r\n switch (orientation.substr(0, 1)) {\r\n case \"l\":\r\n if (height > width) {\r\n format = [height, width];\r\n }\r\n break;\r\n case \"p\":\r\n if (width > height) {\r\n format = [height, width];\r\n }\r\n break;\r\n }\r\n\r\n beginPage(format);\r\n\r\n // Set line width\r\n setLineWidth(lineWidth);\r\n // Set draw color\r\n out(strokeColor);\r\n // resurrecting non-default line caps, joins\r\n if (lineCapID !== 0) {\r\n out(lineCapID + \" J\");\r\n }\r\n if (lineJoinID !== 0) {\r\n out(lineJoinID + \" j\");\r\n }\r\n events.publish(\"addPage\", {\r\n pageNumber: page\r\n });\r\n };\r\n\r\n var _deletePage = function(n) {\r\n if (n > 0 && n <= page) {\r\n pages.splice(n, 1);\r\n pagesContext.splice(n, 1);\r\n page--;\r\n if (currentPage > page) {\r\n currentPage = page;\r\n }\r\n this.setPage(currentPage);\r\n }\r\n };\r\n\r\n var _setPage = function(n) {\r\n if (n > 0 && n <= page) {\r\n currentPage = n;\r\n }\r\n };\r\n\r\n var getNumberOfPages = (API.__private__.getNumberOfPages = API.getNumberOfPages = function() {\r\n return pages.length - 1;\r\n });\r\n\r\n /**\r\n * Returns a document-specific font key - a label assigned to a\r\n * font name + font type combination at the time the font was added\r\n * to the font inventory.\r\n *\r\n * Font key is used as label for the desired font for a block of text\r\n * to be added to the PDF document stream.\r\n * @private\r\n * @function\r\n * @param fontName {string} can be undefined on \"falthy\" to indicate \"use current\"\r\n * @param fontStyle {string} can be undefined on \"falthy\" to indicate \"use current\"\r\n * @returns {string} Font key.\r\n * @ignore\r\n */\r\n var getFont = function(fontName, fontStyle, options) {\r\n var key = undefined,\r\n fontNameLowerCase;\r\n options = options || {};\r\n\r\n fontName =\r\n fontName !== undefined ? fontName : fonts[activeFontKey].fontName;\r\n fontStyle =\r\n fontStyle !== undefined ? fontStyle : fonts[activeFontKey].fontStyle;\r\n fontNameLowerCase = fontName.toLowerCase();\r\n\r\n if (\r\n fontmap[fontNameLowerCase] !== undefined &&\r\n fontmap[fontNameLowerCase][fontStyle] !== undefined\r\n ) {\r\n key = fontmap[fontNameLowerCase][fontStyle];\r\n } else if (\r\n fontmap[fontName] !== undefined &&\r\n fontmap[fontName][fontStyle] !== undefined\r\n ) {\r\n key = fontmap[fontName][fontStyle];\r\n } else {\r\n if (options.disableWarning === false) {\r\n console.warn(\r\n \"Unable to look up font label for font '\" +\r\n fontName +\r\n \"', '\" +\r\n fontStyle +\r\n \"'. Refer to getFontList() for available fonts.\"\r\n );\r\n }\r\n }\r\n\r\n if (!key && !options.noFallback) {\r\n key = fontmap[\"times\"][fontStyle];\r\n if (key == null) {\r\n key = fontmap[\"times\"][\"normal\"];\r\n }\r\n }\r\n return key;\r\n };\r\n\r\n var putInfo = (API.__private__.putInfo = function() {\r\n var objectId = newObject();\r\n var encryptor = function(data) {\r\n return data;\r\n };\r\n if (encryptionOptions !== null) {\r\n encryptor = encryption.encryptor(objectId, 0);\r\n }\r\n out(\"<<\");\r\n out(\"/Producer (\" + pdfEscape(encryptor(\"jsPDF \" + jsPDF.version)) + \")\");\r\n for (var key in documentProperties) {\r\n if (documentProperties.hasOwnProperty(key) && documentProperties[key]) {\r\n out(\r\n \"/\" +\r\n key.substr(0, 1).toUpperCase() +\r\n key.substr(1) +\r\n \" (\" +\r\n pdfEscape(encryptor(documentProperties[key])) +\r\n \")\"\r\n );\r\n }\r\n }\r\n out(\"/CreationDate (\" + pdfEscape(encryptor(creationDate)) + \")\");\r\n out(\">>\");\r\n out(\"endobj\");\r\n });\r\n\r\n var putCatalog = (API.__private__.putCatalog = function(options) {\r\n options = options || {};\r\n var tmpRootDictionaryObjId =\r\n options.rootDictionaryObjId || rootDictionaryObjId;\r\n newObject();\r\n out(\"<<\");\r\n out(\"/Type /Catalog\");\r\n out(\"/Pages \" + tmpRootDictionaryObjId + \" 0 R\");\r\n // PDF13ref Section 7.2.1\r\n if (!zoomMode) zoomMode = \"fullwidth\";\r\n switch (zoomMode) {\r\n case \"fullwidth\":\r\n out(\"/OpenAction [3 0 R /FitH null]\");\r\n break;\r\n case \"fullheight\":\r\n out(\"/OpenAction [3 0 R /FitV null]\");\r\n break;\r\n case \"fullpage\":\r\n out(\"/OpenAction [3 0 R /Fit]\");\r\n break;\r\n case \"original\":\r\n out(\"/OpenAction [3 0 R /XYZ null null 1]\");\r\n break;\r\n default:\r\n var pcn = \"\" + zoomMode;\r\n if (pcn.substr(pcn.length - 1) === \"%\")\r\n zoomMode = parseInt(zoomMode) / 100;\r\n if (typeof zoomMode === \"number\") {\r\n out(\"/OpenAction [3 0 R /XYZ null null \" + f2(zoomMode) + \"]\");\r\n }\r\n }\r\n if (!layoutMode) layoutMode = \"continuous\";\r\n switch (layoutMode) {\r\n case \"continuous\":\r\n out(\"/PageLayout /OneColumn\");\r\n break;\r\n case \"single\":\r\n out(\"/PageLayout /SinglePage\");\r\n break;\r\n case \"two\":\r\n case \"twoleft\":\r\n out(\"/PageLayout /TwoColumnLeft\");\r\n break;\r\n case \"tworight\":\r\n out(\"/PageLayout /TwoColumnRight\");\r\n break;\r\n }\r\n if (pageMode) {\r\n /**\r\n * A name object specifying how the document should be displayed when opened:\r\n * UseNone : Neither document outline nor thumbnail images visible -- DEFAULT\r\n * UseOutlines : Document outline visible\r\n * UseThumbs : Thumbnail images visible\r\n * FullScreen : Full-screen mode, with no menu bar, window controls, or any other window visible\r\n */\r\n out(\"/PageMode /\" + pageMode);\r\n }\r\n events.publish(\"putCatalog\");\r\n out(\">>\");\r\n out(\"endobj\");\r\n });\r\n\r\n var putTrailer = (API.__private__.putTrailer = function() {\r\n out(\"trailer\");\r\n out(\"<<\");\r\n out(\"/Size \" + (objectNumber + 1));\r\n // Root and Info must be the last and second last objects written respectively\r\n out(\"/Root \" + objectNumber + \" 0 R\");\r\n out(\"/Info \" + (objectNumber - 1) + \" 0 R\");\r\n if (encryptionOptions !== null) {\r\n out(\"/Encrypt \" + encryption.oid + \" 0 R\");\r\n }\r\n out(\"/ID [ <\" + fileId + \"> <\" + fileId + \"> ]\");\r\n out(\">>\");\r\n });\r\n\r\n var putHeader = (API.__private__.putHeader = function() {\r\n out(\"%PDF-\" + pdfVersion);\r\n out(\"%\\xBA\\xDF\\xAC\\xE0\");\r\n });\r\n\r\n var putXRef = (API.__private__.putXRef = function() {\r\n var p = \"0000000000\";\r\n\r\n out(\"xref\");\r\n out(\"0 \" + (objectNumber + 1));\r\n out(\"0000000000 65535 f \");\r\n for (var i = 1; i <= objectNumber; i++) {\r\n var offset = offsets[i];\r\n if (typeof offset === \"function\") {\r\n out((p + offsets[i]()).slice(-10) + \" 00000 n \");\r\n } else {\r\n if (typeof offsets[i] !== \"undefined\") {\r\n out((p + offsets[i]).slice(-10) + \" 00000 n \");\r\n } else {\r\n out(\"0000000000 00000 n \");\r\n }\r\n }\r\n }\r\n });\r\n\r\n var buildDocument = (API.__private__.buildDocument = function() {\r\n resetDocument();\r\n setOutputDestination(content);\r\n\r\n events.publish(\"buildDocument\");\r\n\r\n putHeader();\r\n putPages();\r\n putAdditionalObjects();\r\n putResources();\r\n if (encryptionOptions !== null) putEncryptionDict();\r\n putInfo();\r\n putCatalog();\r\n\r\n var offsetOfXRef = contentLength;\r\n putXRef();\r\n putTrailer();\r\n out(\"startxref\");\r\n out(\"\" + offsetOfXRef);\r\n out(\"%%EOF\");\r\n\r\n setOutputDestination(pages[currentPage]);\r\n\r\n return content.join(\"\\n\");\r\n });\r\n\r\n var getBlob = (API.__private__.getBlob = function(data) {\r\n return new Blob([getArrayBuffer(data)], {\r\n type: \"application/pdf\"\r\n });\r\n });\r\n\r\n /**\r\n * Generates the PDF document.\r\n *\r\n * If `type` argument is undefined, output is raw body of resulting PDF returned as a string.\r\n *\r\n * @param {string} type A string identifying one of the possible output types.
\r\n * Possible values are:
\r\n * 'arraybuffer' -> (ArrayBuffer)
\r\n * 'blob' -> (Blob)
\r\n * 'bloburi'/'bloburl' -> (string)
\r\n * 'datauristring'/'dataurlstring' -> (string)
\r\n * 'datauri'/'dataurl' -> (undefined) -> change location to generated datauristring/dataurlstring
\r\n * 'dataurlnewwindow' -> (window | null | undefined) throws error if global isn't a window object(node)
\r\n * 'pdfobjectnewwindow' -> (window | null) throws error if global isn't a window object(node)
\r\n * 'pdfjsnewwindow' -> (wind | null)\r\n * @param {Object|string} options An object providing some additional signalling to PDF generator.
\r\n * Possible options are 'filename'.
\r\n * A string can be passed instead of {filename:string} and defaults to 'generated.pdf'\r\n * @function\r\n * @instance\r\n * @returns {string|window|ArrayBuffer|Blob|jsPDF|null|undefined}\r\n * @memberof jsPDF#\r\n * @name output\r\n */\r\n var output = (API.output = API.__private__.output = SAFE(function output(\r\n type,\r\n options\r\n ) {\r\n options = options || {};\r\n\r\n if (typeof options === \"string\") {\r\n options = {\r\n filename: options\r\n };\r\n } else {\r\n options.filename = options.filename || \"generated.pdf\";\r\n }\r\n\r\n switch (type) {\r\n case undefined:\r\n return buildDocument();\r\n case \"save\":\r\n API.save(options.filename);\r\n break;\r\n case \"arraybuffer\":\r\n return getArrayBuffer(buildDocument());\r\n case \"blob\":\r\n return getBlob(buildDocument());\r\n case \"bloburi\":\r\n case \"bloburl\":\r\n // Developer is responsible of calling revokeObjectURL\r\n if (\r\n typeof globalObject.URL !== \"undefined\" &&\r\n typeof globalObject.URL.createObjectURL === \"function\"\r\n ) {\r\n return (\r\n (globalObject.URL &&\r\n globalObject.URL.createObjectURL(getBlob(buildDocument()))) ||\r\n void 0\r\n );\r\n } else {\r\n console.warn(\r\n \"bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.\"\r\n );\r\n }\r\n break;\r\n case \"datauristring\":\r\n case \"dataurlstring\":\r\n var dataURI = \"\";\r\n var pdfDocument = buildDocument();\r\n try {\r\n dataURI = btoa(pdfDocument);\r\n } catch (e) {\r\n dataURI = btoa(unescape(encodeURIComponent(pdfDocument)));\r\n }\r\n return (\r\n \"data:application/pdf;filename=\" +\r\n options.filename +\r\n \";base64,\" +\r\n dataURI\r\n );\r\n case \"pdfobjectnewwindow\":\r\n if (\r\n Object.prototype.toString.call(globalObject) === \"[object Window]\"\r\n ) {\r\n var pdfObjectUrl =\r\n \"https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js\";\r\n var integrity =\r\n ' integrity=\"sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==\" crossorigin=\"anonymous\"';\r\n\r\n if (options.pdfObjectUrl) {\r\n pdfObjectUrl = options.pdfObjectUrl;\r\n integrity = \"\";\r\n }\r\n\r\n var htmlForNewWindow =\r\n \"\" +\r\n '\";\r\n var nW = globalObject.open();\r\n\r\n if (nW !== null) {\r\n nW.document.write(htmlForNewWindow);\r\n }\r\n return nW;\r\n } else {\r\n throw new Error(\r\n \"The option pdfobjectnewwindow just works in a browser-environment.\"\r\n );\r\n }\r\n case \"pdfjsnewwindow\":\r\n if (\r\n Object.prototype.toString.call(globalObject) === \"[object Window]\"\r\n ) {\r\n var pdfJsUrl = options.pdfJsUrl || \"examples/PDF.js/web/viewer.html\";\r\n var htmlForPDFjsNewWindow =\r\n \"\" +\r\n \"\" +\r\n '' +\r\n \"\";\r\n var dataURLNewWindow = globalObject.open();\r\n if (dataURLNewWindow !== null) {\r\n dataURLNewWindow.document.write(htmlForDataURLNewWindow);\r\n dataURLNewWindow.document.title = options.filename;\r\n }\r\n if (dataURLNewWindow || typeof safari === \"undefined\")\r\n return dataURLNewWindow;\r\n } else {\r\n throw new Error(\r\n \"The option dataurlnewwindow just works in a browser-environment.\"\r\n );\r\n }\r\n break;\r\n case \"datauri\":\r\n case \"dataurl\":\r\n return (globalObject.document.location.href = this.output(\r\n \"datauristring\",\r\n options\r\n ));\r\n default:\r\n return null;\r\n }\r\n }));\r\n\r\n /**\r\n * Used to see if a supplied hotfix was requested when the pdf instance was created.\r\n * @param {string} hotfixName - The name of the hotfix to check.\r\n * @returns {boolean}\r\n */\r\n var hasHotfix = function(hotfixName) {\r\n return (\r\n Array.isArray(hotfixes) === true && hotfixes.indexOf(hotfixName) > -1\r\n );\r\n };\r\n\r\n switch (unit) {\r\n case \"pt\":\r\n scaleFactor = 1;\r\n break;\r\n case \"mm\":\r\n scaleFactor = 72 / 25.4;\r\n break;\r\n case \"cm\":\r\n scaleFactor = 72 / 2.54;\r\n break;\r\n case \"in\":\r\n scaleFactor = 72;\r\n break;\r\n case \"px\":\r\n if (hasHotfix(\"px_scaling\") == true) {\r\n scaleFactor = 72 / 96;\r\n } else {\r\n scaleFactor = 96 / 72;\r\n }\r\n break;\r\n case \"pc\":\r\n scaleFactor = 12;\r\n break;\r\n case \"em\":\r\n scaleFactor = 12;\r\n break;\r\n case \"ex\":\r\n scaleFactor = 6;\r\n break;\r\n default:\r\n if (typeof unit === \"number\") {\r\n scaleFactor = unit;\r\n } else {\r\n throw new Error(\"Invalid unit: \" + unit);\r\n }\r\n }\r\n\r\n var encryption = null;\r\n setCreationDate();\r\n setFileId();\r\n\r\n var getEncryptor = function(objectId) {\r\n if (encryptionOptions !== null) {\r\n return encryption.encryptor(objectId, 0);\r\n }\r\n return function(data) {\r\n return data;\r\n };\r\n };\r\n\r\n //---------------------------------------\r\n // Public API\r\n\r\n var getPageInfo = (API.__private__.getPageInfo = API.getPageInfo = function(\r\n pageNumberOneBased\r\n ) {\r\n if (isNaN(pageNumberOneBased) || pageNumberOneBased % 1 !== 0) {\r\n throw new Error(\"Invalid argument passed to jsPDF.getPageInfo\");\r\n }\r\n var objId = pagesContext[pageNumberOneBased].objId;\r\n return {\r\n objId: objId,\r\n pageNumber: pageNumberOneBased,\r\n pageContext: pagesContext[pageNumberOneBased]\r\n };\r\n });\r\n\r\n var getPageInfoByObjId = (API.__private__.getPageInfoByObjId = function(\r\n objId\r\n ) {\r\n if (isNaN(objId) || objId % 1 !== 0) {\r\n throw new Error(\"Invalid argument passed to jsPDF.getPageInfoByObjId\");\r\n }\r\n for (var pageNumber in pagesContext) {\r\n if (pagesContext[pageNumber].objId === objId) {\r\n break;\r\n }\r\n }\r\n return getPageInfo(pageNumber);\r\n });\r\n\r\n var getCurrentPageInfo = (API.__private__.getCurrentPageInfo = API.getCurrentPageInfo = function() {\r\n return {\r\n objId: pagesContext[currentPage].objId,\r\n pageNumber: currentPage,\r\n pageContext: pagesContext[currentPage]\r\n };\r\n });\r\n\r\n /**\r\n * Adds (and transfers the focus to) new page to the PDF document.\r\n * @param format {String/Array} The format of the new page. Can be:
  • a0 - a10
  • b0 - b10
  • c0 - c10
  • dl
  • letter
  • government-letter
  • legal
  • junior-legal
  • ledger
  • tabloid
  • credit-card

\r\n * Default is \"a4\". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]\r\n * @param orientation {string} Orientation of the new page. Possible values are \"portrait\" or \"landscape\" (or shortcuts \"p\" (Default), \"l\").\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n *\r\n * @memberof jsPDF#\r\n * @name addPage\r\n */\r\n API.addPage = function() {\r\n _addPage.apply(this, arguments);\r\n return this;\r\n };\r\n /**\r\n * Adds (and transfers the focus to) new page to the PDF document.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n *\r\n * @memberof jsPDF#\r\n * @name setPage\r\n * @param {number} page Switch the active page to the page number specified (indexed starting at 1).\r\n * @example\r\n * doc = jsPDF()\r\n * doc.addPage()\r\n * doc.addPage()\r\n * doc.text('I am on page 3', 10, 10)\r\n * doc.setPage(1)\r\n * doc.text('I am on page 1', 10, 10)\r\n */\r\n API.setPage = function() {\r\n _setPage.apply(this, arguments);\r\n setOutputDestination.call(this, pages[currentPage]);\r\n return this;\r\n };\r\n\r\n /**\r\n * @name insertPage\r\n * @memberof jsPDF#\r\n *\r\n * @function\r\n * @instance\r\n * @param {Object} beforePage\r\n * @returns {jsPDF}\r\n */\r\n API.insertPage = function(beforePage) {\r\n this.addPage();\r\n this.movePage(currentPage, beforePage);\r\n return this;\r\n };\r\n\r\n /**\r\n * @name movePage\r\n * @memberof jsPDF#\r\n * @function\r\n * @instance\r\n * @param {number} targetPage\r\n * @param {number} beforePage\r\n * @returns {jsPDF}\r\n */\r\n API.movePage = function(targetPage, beforePage) {\r\n var tmpPages, tmpPagesContext;\r\n if (targetPage > beforePage) {\r\n tmpPages = pages[targetPage];\r\n tmpPagesContext = pagesContext[targetPage];\r\n for (var i = targetPage; i > beforePage; i--) {\r\n pages[i] = pages[i - 1];\r\n pagesContext[i] = pagesContext[i - 1];\r\n }\r\n pages[beforePage] = tmpPages;\r\n pagesContext[beforePage] = tmpPagesContext;\r\n this.setPage(beforePage);\r\n } else if (targetPage < beforePage) {\r\n tmpPages = pages[targetPage];\r\n tmpPagesContext = pagesContext[targetPage];\r\n for (var j = targetPage; j < beforePage; j++) {\r\n pages[j] = pages[j + 1];\r\n pagesContext[j] = pagesContext[j + 1];\r\n }\r\n pages[beforePage] = tmpPages;\r\n pagesContext[beforePage] = tmpPagesContext;\r\n this.setPage(beforePage);\r\n }\r\n return this;\r\n };\r\n\r\n /**\r\n * Deletes a page from the PDF.\r\n * @name deletePage\r\n * @memberof jsPDF#\r\n * @function\r\n * @param {number} targetPage\r\n * @instance\r\n * @returns {jsPDF}\r\n */\r\n API.deletePage = function() {\r\n _deletePage.apply(this, arguments);\r\n return this;\r\n };\r\n\r\n /**\r\n * Adds text to page. Supports adding multiline text when 'text' argument is an Array of Strings.\r\n *\r\n * @function\r\n * @instance\r\n * @param {String|Array} text String or array of strings to be added to the page. Each line is shifted one line down per font, spacing settings declared before this call.\r\n * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.\r\n * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.\r\n * @param {Object} [options] - Collection of settings signaling how the text must be encoded.\r\n * @param {string} [options.align=left] - The alignment of the text, possible values: left, center, right, justify.\r\n * @param {string} [options.baseline=alphabetic] - Sets text baseline used when drawing the text, possible values: alphabetic, ideographic, bottom, top, middle, hanging\r\n * @param {number|Matrix} [options.angle=0] - Rotate the text clockwise or counterclockwise. Expects the angle in degree.\r\n * @param {number} [options.rotationDirection=1] - Direction of the rotation. 0 = clockwise, 1 = counterclockwise.\r\n * @param {number} [options.charSpace=0] - The space between each letter.\r\n * @param {number} [options.horizontalScale=1] - Horizontal scale of the text as a factor of the regular size.\r\n * @param {number} [options.lineHeightFactor=1.15] - The lineheight of each line.\r\n * @param {Object} [options.flags] - Flags for to8bitStream.\r\n * @param {boolean} [options.flags.noBOM=true] - Don't add BOM to Unicode-text.\r\n * @param {boolean} [options.flags.autoencode=true] - Autoencode the Text.\r\n * @param {number} [options.maxWidth=0] - Split the text by given width, 0 = no split.\r\n * @param {string} [options.renderingMode=fill] - Set how the text should be rendered, possible values: fill, stroke, fillThenStroke, invisible, fillAndAddForClipping, strokeAndAddPathForClipping, fillThenStrokeAndAddToPathForClipping, addToPathForClipping.\r\n * @param {boolean} [options.isInputVisual] - Option for the BidiEngine\r\n * @param {boolean} [options.isOutputVisual] - Option for the BidiEngine\r\n * @param {boolean} [options.isInputRtl] - Option for the BidiEngine\r\n * @param {boolean} [options.isOutputRtl] - Option for the BidiEngine\r\n * @param {boolean} [options.isSymmetricSwapping] - Option for the BidiEngine\r\n * @param {number|Matrix} transform If transform is a number the text will be rotated by this value around the anchor set by x and y.\r\n *\r\n * If it is a Matrix, this matrix gets directly applied to the text, which allows shearing\r\n * effects etc.; the x and y offsets are then applied AFTER the coordinate system has been established by this\r\n * matrix. This means passing a rotation matrix that is equivalent to some rotation angle will in general yield a\r\n * DIFFERENT result. A matrix is only allowed in \"advanced\" API mode.\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name text\r\n */\r\n API.__private__.text = API.text = function(text, x, y, options, transform) {\r\n /*\r\n * Inserts something like this into PDF\r\n * BT\r\n * /F1 16 Tf % Font name + size\r\n * 16 TL % How many units down for next line in multiline text\r\n * 0 g % color\r\n * 28.35 813.54 Td % position\r\n * (line one) Tj\r\n * T* (line two) Tj\r\n * T* (line three) Tj\r\n * ET\r\n */\r\n options = options || {};\r\n var scope = options.scope || this;\r\n var payload, da, angle, align, charSpace, maxWidth, flags, horizontalScale;\r\n\r\n // Pre-August-2012 the order of arguments was function(x, y, text, flags)\r\n // in effort to make all calls have similar signature like\r\n // function(data, coordinates... , miscellaneous)\r\n // this method had its args flipped.\r\n // code below allows backward compatibility with old arg order.\r\n if (\r\n typeof text === \"number\" &&\r\n typeof x === \"number\" &&\r\n (typeof y === \"string\" || Array.isArray(y))\r\n ) {\r\n var tmp = y;\r\n y = x;\r\n x = text;\r\n text = tmp;\r\n }\r\n\r\n var transformationMatrix;\r\n\r\n if (arguments[3] instanceof Matrix === false) {\r\n flags = arguments[3];\r\n angle = arguments[4];\r\n align = arguments[5];\r\n\r\n if (typeof flags !== \"object\" || flags === null) {\r\n if (typeof angle === \"string\") {\r\n align = angle;\r\n angle = null;\r\n }\r\n if (typeof flags === \"string\") {\r\n align = flags;\r\n flags = null;\r\n }\r\n if (typeof flags === \"number\") {\r\n angle = flags;\r\n flags = null;\r\n }\r\n options = {\r\n flags: flags,\r\n angle: angle,\r\n align: align\r\n };\r\n }\r\n } else {\r\n advancedApiModeTrap(\r\n \"The transform parameter of text() with a Matrix value\"\r\n );\r\n transformationMatrix = transform;\r\n }\r\n\r\n if (isNaN(x) || isNaN(y) || typeof text === \"undefined\" || text === null) {\r\n throw new Error(\"Invalid arguments passed to jsPDF.text\");\r\n }\r\n\r\n if (text.length === 0) {\r\n return scope;\r\n }\r\n\r\n var xtra = \"\";\r\n var isHex = false;\r\n var lineHeight =\r\n typeof options.lineHeightFactor === \"number\"\r\n ? options.lineHeightFactor\r\n : lineHeightFactor;\r\n var scaleFactor = scope.internal.scaleFactor;\r\n\r\n function ESC(s) {\r\n s = s.split(\"\\t\").join(Array(options.TabLen || 9).join(\" \"));\r\n return pdfEscape(s, flags);\r\n }\r\n\r\n function transformTextToSpecialArray(text) {\r\n //we don't want to destroy original text array, so cloning it\r\n var sa = text.concat();\r\n var da = [];\r\n var len = sa.length;\r\n var curDa;\r\n //we do array.join('text that must not be PDFescaped\")\r\n //thus, pdfEscape each component separately\r\n while (len--) {\r\n curDa = sa.shift();\r\n if (typeof curDa === \"string\") {\r\n da.push(curDa);\r\n } else {\r\n if (\r\n Array.isArray(text) &&\r\n (curDa.length === 1 ||\r\n (curDa[1] === undefined && curDa[2] === undefined))\r\n ) {\r\n da.push(curDa[0]);\r\n } else {\r\n da.push([curDa[0], curDa[1], curDa[2]]);\r\n }\r\n }\r\n }\r\n return da;\r\n }\r\n\r\n function processTextByFunction(text, processingFunction) {\r\n var result;\r\n if (typeof text === \"string\") {\r\n result = processingFunction(text)[0];\r\n } else if (Array.isArray(text)) {\r\n //we don't want to destroy original text array, so cloning it\r\n var sa = text.concat();\r\n var da = [];\r\n var len = sa.length;\r\n var curDa;\r\n var tmpResult;\r\n //we do array.join('text that must not be PDFescaped\")\r\n //thus, pdfEscape each component separately\r\n while (len--) {\r\n curDa = sa.shift();\r\n if (typeof curDa === \"string\") {\r\n da.push(processingFunction(curDa)[0]);\r\n } else if (Array.isArray(curDa) && typeof curDa[0] === \"string\") {\r\n tmpResult = processingFunction(curDa[0], curDa[1], curDa[2]);\r\n da.push([tmpResult[0], tmpResult[1], tmpResult[2]]);\r\n }\r\n }\r\n result = da;\r\n }\r\n return result;\r\n }\r\n\r\n //Check if text is of type String\r\n var textIsOfTypeString = false;\r\n var tmpTextIsOfTypeString = true;\r\n\r\n if (typeof text === \"string\") {\r\n textIsOfTypeString = true;\r\n } else if (Array.isArray(text)) {\r\n //we don't want to destroy original text array, so cloning it\r\n var sa = text.concat();\r\n da = [];\r\n var len = sa.length;\r\n var curDa;\r\n //we do array.join('text that must not be PDFescaped\")\r\n //thus, pdfEscape each component separately\r\n while (len--) {\r\n curDa = sa.shift();\r\n if (\r\n typeof curDa !== \"string\" ||\r\n (Array.isArray(curDa) && typeof curDa[0] !== \"string\")\r\n ) {\r\n tmpTextIsOfTypeString = false;\r\n }\r\n }\r\n textIsOfTypeString = tmpTextIsOfTypeString;\r\n }\r\n if (textIsOfTypeString === false) {\r\n throw new Error(\r\n 'Type of text must be string or Array. \"' +\r\n text +\r\n '\" is not recognized.'\r\n );\r\n }\r\n\r\n //If there are any newlines in text, we assume\r\n //the user wanted to print multiple lines, so break the\r\n //text up into an array. If the text is already an array,\r\n //we assume the user knows what they are doing.\r\n //Convert text into an array anyway to simplify\r\n //later code.\r\n\r\n if (typeof text === \"string\") {\r\n if (text.match(/[\\r?\\n]/)) {\r\n text = text.split(/\\r\\n|\\r|\\n/g);\r\n } else {\r\n text = [text];\r\n }\r\n }\r\n\r\n //baseline\r\n var height = activeFontSize / scope.internal.scaleFactor;\r\n var descent = height * (lineHeight - 1);\r\n\r\n switch (options.baseline) {\r\n case \"bottom\":\r\n y -= descent;\r\n break;\r\n case \"top\":\r\n y += height - descent;\r\n break;\r\n case \"hanging\":\r\n y += height - 2 * descent;\r\n break;\r\n case \"middle\":\r\n y += height / 2 - descent;\r\n break;\r\n case \"ideographic\":\r\n case \"alphabetic\":\r\n default:\r\n // do nothing, everything is fine\r\n break;\r\n }\r\n\r\n //multiline\r\n maxWidth = options.maxWidth || 0;\r\n\r\n if (maxWidth > 0) {\r\n if (typeof text === \"string\") {\r\n text = scope.splitTextToSize(text, maxWidth);\r\n } else if (Object.prototype.toString.call(text) === \"[object Array]\") {\r\n text = text.reduce(function(acc, textLine) {\r\n return acc.concat(scope.splitTextToSize(textLine, maxWidth));\r\n }, []);\r\n }\r\n }\r\n\r\n //creating Payload-Object to make text byRef\r\n payload = {\r\n text: text,\r\n x: x,\r\n y: y,\r\n options: options,\r\n mutex: {\r\n pdfEscape: pdfEscape,\r\n activeFontKey: activeFontKey,\r\n fonts: fonts,\r\n activeFontSize: activeFontSize\r\n }\r\n };\r\n events.publish(\"preProcessText\", payload);\r\n\r\n text = payload.text;\r\n options = payload.options;\r\n\r\n //angle\r\n angle = options.angle;\r\n\r\n if (\r\n transformationMatrix instanceof Matrix === false &&\r\n angle &&\r\n typeof angle === \"number\"\r\n ) {\r\n angle *= Math.PI / 180;\r\n\r\n if (options.rotationDirection === 0) {\r\n angle = -angle;\r\n }\r\n\r\n if (apiMode === ApiMode.ADVANCED) {\r\n angle = -angle;\r\n }\r\n\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n transformationMatrix = new Matrix(c, s, -s, c, 0, 0);\r\n } else if (angle && angle instanceof Matrix) {\r\n transformationMatrix = angle;\r\n }\r\n\r\n if (apiMode === ApiMode.ADVANCED && !transformationMatrix) {\r\n transformationMatrix = identityMatrix;\r\n }\r\n\r\n //charSpace\r\n\r\n charSpace = options.charSpace || activeCharSpace;\r\n\r\n if (typeof charSpace !== \"undefined\") {\r\n xtra += hpf(scale(charSpace)) + \" Tc\\n\";\r\n this.setCharSpace(this.getCharSpace() || 0);\r\n }\r\n\r\n horizontalScale = options.horizontalScale;\r\n if (typeof horizontalScale !== \"undefined\") {\r\n xtra += hpf(horizontalScale * 100) + \" Tz\\n\";\r\n }\r\n\r\n //lang\r\n\r\n var lang = options.lang;\r\n\r\n if (lang) {\r\n // xtra += \"/Lang (\" + lang +\")\\n\";\r\n }\r\n\r\n //renderingMode\r\n var renderingMode = -1;\r\n var parmRenderingMode =\r\n typeof options.renderingMode !== \"undefined\"\r\n ? options.renderingMode\r\n : options.stroke;\r\n var pageContext = scope.internal.getCurrentPageInfo().pageContext;\r\n\r\n switch (parmRenderingMode) {\r\n case 0:\r\n case false:\r\n case \"fill\":\r\n renderingMode = 0;\r\n break;\r\n case 1:\r\n case true:\r\n case \"stroke\":\r\n renderingMode = 1;\r\n break;\r\n case 2:\r\n case \"fillThenStroke\":\r\n renderingMode = 2;\r\n break;\r\n case 3:\r\n case \"invisible\":\r\n renderingMode = 3;\r\n break;\r\n case 4:\r\n case \"fillAndAddForClipping\":\r\n renderingMode = 4;\r\n break;\r\n case 5:\r\n case \"strokeAndAddPathForClipping\":\r\n renderingMode = 5;\r\n break;\r\n case 6:\r\n case \"fillThenStrokeAndAddToPathForClipping\":\r\n renderingMode = 6;\r\n break;\r\n case 7:\r\n case \"addToPathForClipping\":\r\n renderingMode = 7;\r\n break;\r\n }\r\n\r\n var usedRenderingMode =\r\n typeof pageContext.usedRenderingMode !== \"undefined\"\r\n ? pageContext.usedRenderingMode\r\n : -1;\r\n\r\n //if the coder wrote it explicitly to use a specific\r\n //renderingMode, then use it\r\n if (renderingMode !== -1) {\r\n xtra += renderingMode + \" Tr\\n\";\r\n //otherwise check if we used the rendering Mode already\r\n //if so then set the rendering Mode...\r\n } else if (usedRenderingMode !== -1) {\r\n xtra += \"0 Tr\\n\";\r\n }\r\n\r\n if (renderingMode !== -1) {\r\n pageContext.usedRenderingMode = renderingMode;\r\n }\r\n\r\n //align\r\n align = options.align || \"left\";\r\n var leading = activeFontSize * lineHeight;\r\n var pageWidth = scope.internal.pageSize.getWidth();\r\n var activeFont = fonts[activeFontKey];\r\n charSpace = options.charSpace || activeCharSpace;\r\n maxWidth = options.maxWidth || 0;\r\n\r\n var lineWidths;\r\n flags = Object.assign({ autoencode: true, noBOM: true }, options.flags);\r\n\r\n var wordSpacingPerLine = [];\r\n\r\n if (Object.prototype.toString.call(text) === \"[object Array]\") {\r\n da = transformTextToSpecialArray(text);\r\n var newY;\r\n if (align !== \"left\") {\r\n lineWidths = da.map(function(v) {\r\n return (\r\n (scope.getStringUnitWidth(v, {\r\n font: activeFont,\r\n charSpace: charSpace,\r\n fontSize: activeFontSize,\r\n doKerning: false\r\n }) *\r\n activeFontSize) /\r\n scaleFactor\r\n );\r\n });\r\n }\r\n //The first line uses the \"main\" Td setting,\r\n //and the subsequent lines are offset by the\r\n //previous line's x coordinate.\r\n var prevWidth = 0;\r\n var newX;\r\n if (align === \"right\") {\r\n //The passed in x coordinate defines the\r\n //rightmost point of the text.\r\n x -= lineWidths[0];\r\n text = [];\r\n len = da.length;\r\n for (var i = 0; i < len; i++) {\r\n if (i === 0) {\r\n newX = getHorizontalCoordinate(x);\r\n newY = getVerticalCoordinate(y);\r\n } else {\r\n newX = scale(prevWidth - lineWidths[i]);\r\n newY = -leading;\r\n }\r\n text.push([da[i], newX, newY]);\r\n prevWidth = lineWidths[i];\r\n }\r\n } else if (align === \"center\") {\r\n //The passed in x coordinate defines\r\n //the center point.\r\n x -= lineWidths[0] / 2;\r\n text = [];\r\n len = da.length;\r\n for (var j = 0; j < len; j++) {\r\n if (j === 0) {\r\n newX = getHorizontalCoordinate(x);\r\n newY = getVerticalCoordinate(y);\r\n } else {\r\n newX = scale((prevWidth - lineWidths[j]) / 2);\r\n newY = -leading;\r\n }\r\n text.push([da[j], newX, newY]);\r\n prevWidth = lineWidths[j];\r\n }\r\n } else if (align === \"left\") {\r\n text = [];\r\n len = da.length;\r\n for (var h = 0; h < len; h++) {\r\n text.push(da[h]);\r\n }\r\n } else if (align === \"justify\") {\r\n text = [];\r\n len = da.length;\r\n maxWidth = maxWidth !== 0 ? maxWidth : pageWidth;\r\n\r\n for (var l = 0; l < len; l++) {\r\n newY = l === 0 ? getVerticalCoordinate(y) : -leading;\r\n newX = l === 0 ? getHorizontalCoordinate(x) : 0;\r\n if (l < len - 1) {\r\n wordSpacingPerLine.push(\r\n hpf(\r\n scale(\r\n (maxWidth - lineWidths[l]) / (da[l].split(\" \").length - 1)\r\n )\r\n )\r\n );\r\n } else {\r\n wordSpacingPerLine.push(0);\r\n }\r\n text.push([da[l], newX, newY]);\r\n }\r\n } else {\r\n throw new Error(\r\n 'Unrecognized alignment option, use \"left\", \"center\", \"right\" or \"justify\".'\r\n );\r\n }\r\n }\r\n\r\n //R2L\r\n var doReversing = typeof options.R2L === \"boolean\" ? options.R2L : R2L;\r\n if (doReversing === true) {\r\n text = processTextByFunction(text, function(text, posX, posY) {\r\n return [\r\n text\r\n .split(\"\")\r\n .reverse()\r\n .join(\"\"),\r\n posX,\r\n posY\r\n ];\r\n });\r\n }\r\n\r\n //creating Payload-Object to make text byRef\r\n payload = {\r\n text: text,\r\n x: x,\r\n y: y,\r\n options: options,\r\n mutex: {\r\n pdfEscape: pdfEscape,\r\n activeFontKey: activeFontKey,\r\n fonts: fonts,\r\n activeFontSize: activeFontSize\r\n }\r\n };\r\n events.publish(\"postProcessText\", payload);\r\n\r\n text = payload.text;\r\n isHex = payload.mutex.isHex || false;\r\n\r\n //Escaping\r\n var activeFontEncoding = fonts[activeFontKey].encoding;\r\n\r\n if (\r\n activeFontEncoding === \"WinAnsiEncoding\" ||\r\n activeFontEncoding === \"StandardEncoding\"\r\n ) {\r\n text = processTextByFunction(text, function(text, posX, posY) {\r\n return [ESC(text), posX, posY];\r\n });\r\n }\r\n\r\n da = transformTextToSpecialArray(text);\r\n\r\n text = [];\r\n var STRING = 0;\r\n var ARRAY = 1;\r\n var variant = Array.isArray(da[0]) ? ARRAY : STRING;\r\n var posX;\r\n var posY;\r\n var content;\r\n var wordSpacing = \"\";\r\n\r\n var generatePosition = function(\r\n parmPosX,\r\n parmPosY,\r\n parmTransformationMatrix\r\n ) {\r\n var position = \"\";\r\n if (parmTransformationMatrix instanceof Matrix) {\r\n // It is kind of more intuitive to apply a plain rotation around the text anchor set by x and y\r\n // but when the user supplies an arbitrary transformation matrix, the x and y offsets should be applied\r\n // in the coordinate system established by this matrix\r\n if (typeof options.angle === \"number\") {\r\n parmTransformationMatrix = matrixMult(\r\n parmTransformationMatrix,\r\n new Matrix(1, 0, 0, 1, parmPosX, parmPosY)\r\n );\r\n } else {\r\n parmTransformationMatrix = matrixMult(\r\n new Matrix(1, 0, 0, 1, parmPosX, parmPosY),\r\n parmTransformationMatrix\r\n );\r\n }\r\n\r\n if (apiMode === ApiMode.ADVANCED) {\r\n parmTransformationMatrix = matrixMult(\r\n new Matrix(1, 0, 0, -1, 0, 0),\r\n parmTransformationMatrix\r\n );\r\n }\r\n\r\n position = parmTransformationMatrix.join(\" \") + \" Tm\\n\";\r\n } else {\r\n position = hpf(parmPosX) + \" \" + hpf(parmPosY) + \" Td\\n\";\r\n }\r\n return position;\r\n };\r\n\r\n for (var lineIndex = 0; lineIndex < da.length; lineIndex++) {\r\n wordSpacing = \"\";\r\n\r\n switch (variant) {\r\n case ARRAY:\r\n content =\r\n (isHex ? \"<\" : \"(\") + da[lineIndex][0] + (isHex ? \">\" : \")\");\r\n posX = parseFloat(da[lineIndex][1]);\r\n posY = parseFloat(da[lineIndex][2]);\r\n break;\r\n case STRING:\r\n content = (isHex ? \"<\" : \"(\") + da[lineIndex] + (isHex ? \">\" : \")\");\r\n posX = getHorizontalCoordinate(x);\r\n posY = getVerticalCoordinate(y);\r\n break;\r\n }\r\n\r\n if (\r\n typeof wordSpacingPerLine !== \"undefined\" &&\r\n typeof wordSpacingPerLine[lineIndex] !== \"undefined\"\r\n ) {\r\n wordSpacing = wordSpacingPerLine[lineIndex] + \" Tw\\n\";\r\n }\r\n\r\n if (lineIndex === 0) {\r\n text.push(\r\n wordSpacing +\r\n generatePosition(posX, posY, transformationMatrix) +\r\n content\r\n );\r\n } else if (variant === STRING) {\r\n text.push(wordSpacing + content);\r\n } else if (variant === ARRAY) {\r\n text.push(\r\n wordSpacing +\r\n generatePosition(posX, posY, transformationMatrix) +\r\n content\r\n );\r\n }\r\n }\r\n\r\n text = variant === STRING ? text.join(\" Tj\\nT* \") : text.join(\" Tj\\n\");\r\n text += \" Tj\\n\";\r\n\r\n var result = \"BT\\n/\";\r\n result += activeFontKey + \" \" + activeFontSize + \" Tf\\n\"; // font face, style, size\r\n result += hpf(activeFontSize * lineHeight) + \" TL\\n\"; // line spacing\r\n result += textColor + \"\\n\";\r\n result += xtra;\r\n result += text;\r\n result += \"ET\";\r\n\r\n out(result);\r\n usedFonts[activeFontKey] = true;\r\n return scope;\r\n };\r\n\r\n // PDF supports these path painting and clip path operators:\r\n //\r\n // S - stroke\r\n // s - close/stroke\r\n // f (F) - fill non-zero\r\n // f* - fill evenodd\r\n // B - fill stroke nonzero\r\n // B* - fill stroke evenodd\r\n // b - close fill stroke nonzero\r\n // b* - close fill stroke evenodd\r\n // n - nothing (consume path)\r\n // W - clip nonzero\r\n // W* - clip evenodd\r\n //\r\n // In order to keep the API small, we omit the close-and-fill/stroke operators and provide a separate close()\r\n // method.\r\n /**\r\n *\r\n * @name clip\r\n * @function\r\n * @instance\r\n * @param {string} rule Only possible value is 'evenodd'\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @description All .clip() after calling drawing ops with a style argument of null.\r\n */\r\n var clip = (API.__private__.clip = API.clip = function(rule) {\r\n // Call .clip() after calling drawing ops with a style argument of null\r\n // W is the PDF clipping op\r\n if (\"evenodd\" === rule) {\r\n out(\"W*\");\r\n } else {\r\n out(\"W\");\r\n }\r\n return this;\r\n });\r\n\r\n /**\r\n * @name clipEvenOdd\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @description Modify the current clip path by intersecting it with the current path using the even-odd rule. Note\r\n * that this will NOT consume the current path. In order to only use this path for clipping call\r\n * {@link API.discardPath} afterwards.\r\n */\r\n API.clipEvenOdd = function() {\r\n return clip(\"evenodd\");\r\n };\r\n\r\n /**\r\n * Consumes the current path without any effect. Mainly used in combination with {@link clip} or\r\n * {@link clipEvenOdd}. The PDF \"n\" operator.\r\n * @name discardPath\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n */\r\n API.__private__.discardPath = API.discardPath = function() {\r\n out(\"n\");\r\n return this;\r\n };\r\n\r\n var isValidStyle = (API.__private__.isValidStyle = function(style) {\r\n var validStyleVariants = [\r\n undefined,\r\n null,\r\n \"S\",\r\n \"D\",\r\n \"F\",\r\n \"DF\",\r\n \"FD\",\r\n \"f\",\r\n \"f*\",\r\n \"B\",\r\n \"B*\",\r\n \"n\"\r\n ];\r\n var result = false;\r\n if (validStyleVariants.indexOf(style) !== -1) {\r\n result = true;\r\n }\r\n return result;\r\n });\r\n\r\n API.__private__.setDefaultPathOperation = API.setDefaultPathOperation = function(\r\n operator\r\n ) {\r\n if (isValidStyle(operator)) {\r\n defaultPathOperation = operator;\r\n }\r\n return this;\r\n };\r\n\r\n var getStyle = (API.__private__.getStyle = API.getStyle = function(style) {\r\n // see path-painting operators in PDF spec\r\n var op = defaultPathOperation; // stroke\r\n\r\n switch (style) {\r\n case \"D\":\r\n case \"S\":\r\n op = \"S\"; // stroke\r\n break;\r\n case \"F\":\r\n op = \"f\"; // fill\r\n break;\r\n case \"FD\":\r\n case \"DF\":\r\n op = \"B\";\r\n break;\r\n case \"f\":\r\n case \"f*\":\r\n case \"B\":\r\n case \"B*\":\r\n /*\r\n Allow direct use of these PDF path-painting operators:\r\n - f fill using nonzero winding number rule\r\n - f* fill using even-odd rule\r\n - B fill then stroke with fill using non-zero winding number rule\r\n - B* fill then stroke with fill using even-odd rule\r\n */\r\n op = style;\r\n break;\r\n }\r\n return op;\r\n });\r\n\r\n /**\r\n * Close the current path. The PDF \"h\" operator.\r\n * @name close\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n */\r\n var close = (API.close = function() {\r\n out(\"h\");\r\n return this;\r\n });\r\n\r\n /**\r\n * Stroke the path. The PDF \"S\" operator.\r\n * @name stroke\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n */\r\n API.stroke = function() {\r\n out(\"S\");\r\n return this;\r\n };\r\n\r\n /**\r\n * Fill the current path using the nonzero winding number rule. If a pattern is provided, the path will be filled\r\n * with this pattern, otherwise with the current fill color. Equivalent to the PDF \"f\" operator.\r\n * @name fill\r\n * @function\r\n * @instance\r\n * @param {PatternData=} pattern If provided the path will be filled with this pattern\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n */\r\n API.fill = function(pattern) {\r\n fillWithOptionalPattern(\"f\", pattern);\r\n return this;\r\n };\r\n\r\n /**\r\n * Fill the current path using the even-odd rule. The PDF f* operator.\r\n * @see API.fill\r\n * @name fillEvenOdd\r\n * @function\r\n * @instance\r\n * @param {PatternData=} pattern If provided the path will be filled with this pattern\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n */\r\n API.fillEvenOdd = function(pattern) {\r\n fillWithOptionalPattern(\"f*\", pattern);\r\n return this;\r\n };\r\n\r\n /**\r\n * Fill using the nonzero winding number rule and then stroke the current Path. The PDF \"B\" operator.\r\n * @see API.fill\r\n * @name fillStroke\r\n * @function\r\n * @instance\r\n * @param {PatternData=} pattern If provided the path will be stroked with this pattern\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n */\r\n API.fillStroke = function(pattern) {\r\n fillWithOptionalPattern(\"B\", pattern);\r\n return this;\r\n };\r\n\r\n /**\r\n * Fill using the even-odd rule and then stroke the current Path. The PDF \"B\" operator.\r\n * @see API.fill\r\n * @name fillStrokeEvenOdd\r\n * @function\r\n * @instance\r\n * @param {PatternData=} pattern If provided the path will be fill-stroked with this pattern\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n */\r\n API.fillStrokeEvenOdd = function(pattern) {\r\n fillWithOptionalPattern(\"B*\", pattern);\r\n return this;\r\n };\r\n\r\n var fillWithOptionalPattern = function(style, pattern) {\r\n if (typeof pattern === \"object\") {\r\n fillWithPattern(pattern, style);\r\n } else {\r\n out(style);\r\n }\r\n };\r\n\r\n var putStyle = function(style) {\r\n if (\r\n style === null ||\r\n (apiMode === ApiMode.ADVANCED && style === undefined)\r\n ) {\r\n return;\r\n }\r\n\r\n style = getStyle(style);\r\n\r\n // stroking / filling / both the path\r\n out(style);\r\n };\r\n\r\n function cloneTilingPattern(patternKey, boundingBox, xStep, yStep, matrix) {\r\n var clone = new TilingPattern(\r\n boundingBox || this.boundingBox,\r\n xStep || this.xStep,\r\n yStep || this.yStep,\r\n this.gState,\r\n matrix || this.matrix\r\n );\r\n clone.stream = this.stream;\r\n var key = patternKey + \"$$\" + this.cloneIndex++ + \"$$\";\r\n addPattern(key, clone);\r\n return clone;\r\n }\r\n\r\n var fillWithPattern = function(patternData, style) {\r\n var patternId = patternMap[patternData.key];\r\n var pattern = patterns[patternId];\r\n\r\n if (pattern instanceof ShadingPattern) {\r\n out(\"q\");\r\n\r\n out(clipRuleFromStyle(style));\r\n\r\n if (pattern.gState) {\r\n API.setGState(pattern.gState);\r\n }\r\n out(patternData.matrix.toString() + \" cm\");\r\n out(\"/\" + patternId + \" sh\");\r\n out(\"Q\");\r\n } else if (pattern instanceof TilingPattern) {\r\n // pdf draws patterns starting at the bottom left corner and they are not affected by the global transformation,\r\n // so we must flip them\r\n var matrix = new Matrix(1, 0, 0, -1, 0, getPageHeight());\r\n\r\n if (patternData.matrix) {\r\n matrix = matrix.multiply(patternData.matrix || identityMatrix);\r\n // we cannot apply a matrix to the pattern on use so we must abuse the pattern matrix and create new instances\r\n // for each use\r\n patternId = cloneTilingPattern.call(\r\n pattern,\r\n patternData.key,\r\n patternData.boundingBox,\r\n patternData.xStep,\r\n patternData.yStep,\r\n matrix\r\n ).id;\r\n }\r\n\r\n out(\"q\");\r\n out(\"/Pattern cs\");\r\n out(\"/\" + patternId + \" scn\");\r\n\r\n if (pattern.gState) {\r\n API.setGState(pattern.gState);\r\n }\r\n\r\n out(style);\r\n out(\"Q\");\r\n }\r\n };\r\n\r\n var clipRuleFromStyle = function(style) {\r\n switch (style) {\r\n case \"f\":\r\n case \"F\":\r\n return \"W n\";\r\n case \"f*\":\r\n return \"W* n\";\r\n case \"B\":\r\n return \"W S\";\r\n case \"B*\":\r\n return \"W* S\";\r\n\r\n // these two are for compatibility reasons (in the past, calling any primitive method with a shading pattern\r\n // and \"n\"/\"S\" as style would still fill/fill and stroke the path)\r\n case \"S\":\r\n return \"W S\";\r\n case \"n\":\r\n return \"W n\";\r\n }\r\n };\r\n\r\n /**\r\n * Begin a new subpath by moving the current point to coordinates (x, y). The PDF \"m\" operator.\r\n * @param {number} x\r\n * @param {number} y\r\n * @name moveTo\r\n * @function\r\n * @instance\r\n * @memberof jsPDF#\r\n * @returns {jsPDF}\r\n */\r\n var moveTo = (API.moveTo = function(x, y) {\r\n out(hpf(scale(x)) + \" \" + hpf(transformScaleY(y)) + \" m\");\r\n return this;\r\n });\r\n\r\n /**\r\n * Append a straight line segment from the current point to the point (x, y). The PDF \"l\" operator.\r\n * @param {number} x\r\n * @param {number} y\r\n * @memberof jsPDF#\r\n * @name lineTo\r\n * @function\r\n * @instance\r\n * @memberof jsPDF#\r\n * @returns {jsPDF}\r\n */\r\n var lineTo = (API.lineTo = function(x, y) {\r\n out(hpf(scale(x)) + \" \" + hpf(transformScaleY(y)) + \" l\");\r\n return this;\r\n });\r\n\r\n /**\r\n * Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point\r\n * (x3, y3), using (x1, y1) and (x2, y2) as Bézier control points. The new current point shall be (x3, x3).\r\n * @param {number} x1\r\n * @param {number} y1\r\n * @param {number} x2\r\n * @param {number} y2\r\n * @param {number} x3\r\n * @param {number} y3\r\n * @memberof jsPDF#\r\n * @name curveTo\r\n * @function\r\n * @instance\r\n * @memberof jsPDF#\r\n * @returns {jsPDF}\r\n */\r\n var curveTo = (API.curveTo = function(x1, y1, x2, y2, x3, y3) {\r\n out(\r\n [\r\n hpf(scale(x1)),\r\n hpf(transformScaleY(y1)),\r\n hpf(scale(x2)),\r\n hpf(transformScaleY(y2)),\r\n hpf(scale(x3)),\r\n hpf(transformScaleY(y3)),\r\n \"c\"\r\n ].join(\" \")\r\n );\r\n return this;\r\n });\r\n\r\n /**\r\n * Draw a line on the current page.\r\n *\r\n * @name line\r\n * @function\r\n * @instance\r\n * @param {number} x1\r\n * @param {number} y1\r\n * @param {number} x2\r\n * @param {number} y2\r\n * @param {string} style A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument. default: 'S'\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n */\r\n API.__private__.line = API.line = function(x1, y1, x2, y2, style) {\r\n if (\r\n isNaN(x1) ||\r\n isNaN(y1) ||\r\n isNaN(x2) ||\r\n isNaN(y2) ||\r\n !isValidStyle(style)\r\n ) {\r\n throw new Error(\"Invalid arguments passed to jsPDF.line\");\r\n }\r\n if (apiMode === ApiMode.COMPAT) {\r\n return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1], style || \"S\");\r\n } else {\r\n return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1]).stroke();\r\n }\r\n };\r\n\r\n /**\r\n * @typedef {Object} PatternData\r\n * {Matrix|undefined} matrix\r\n * {Number|undefined} xStep\r\n * {Number|undefined} yStep\r\n * {Array.|undefined} boundingBox\r\n */\r\n\r\n /**\r\n * Adds series of curves (straight lines or cubic bezier curves) to canvas, starting at `x`, `y` coordinates.\r\n * All data points in `lines` are relative to last line origin.\r\n * `x`, `y` become x1,y1 for first line / curve in the set.\r\n * For lines you only need to specify [x2, y2] - (ending point) vector against x1, y1 starting point.\r\n * For bezier curves you need to specify [x2,y2,x3,y3,x4,y4] - vectors to control points 1, 2, ending point. All vectors are against the start of the curve - x1,y1.\r\n *\r\n * @example .lines([[2,2],[-2,2],[1,1,2,2,3,3],[2,1]], 212,110, [1,1], 'F', false) // line, line, bezier curve, line\r\n * @param {Array} lines Array of *vector* shifts as pairs (lines) or sextets (cubic bezier curves).\r\n * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n * @param {number} scale (Defaults to [1.0,1.0]) x,y Scaling factor for all vectors. Elements can be any floating number Sub-one makes drawing smaller. Over-one grows the drawing. Negative flips the direction.\r\n * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n * 'S' [default] - stroke,\r\n * 'F' - fill,\r\n * and 'DF' (or 'FD') - fill then stroke.\r\n * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n *\r\n * In \"advanced\" API mode this parameter is deprecated.\r\n * @param {Boolean=} closed If true, the path is closed with a straight line from the end of the last curve to the starting point.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name lines\r\n */\r\n API.__private__.lines = API.lines = function(\r\n lines,\r\n x,\r\n y,\r\n scale,\r\n style,\r\n closed\r\n ) {\r\n var scalex, scaley, i, l, leg, x2, y2, x3, y3, x4, y4, tmp;\r\n\r\n // Pre-August-2012 the order of arguments was function(x, y, lines, scale, style)\r\n // in effort to make all calls have similar signature like\r\n // function(content, coordinateX, coordinateY , miscellaneous)\r\n // this method had its args flipped.\r\n // code below allows backward compatibility with old arg order.\r\n if (typeof lines === \"number\") {\r\n tmp = y;\r\n y = x;\r\n x = lines;\r\n lines = tmp;\r\n }\r\n\r\n scale = scale || [1, 1];\r\n closed = closed || false;\r\n\r\n if (\r\n isNaN(x) ||\r\n isNaN(y) ||\r\n !Array.isArray(lines) ||\r\n !Array.isArray(scale) ||\r\n !isValidStyle(style) ||\r\n typeof closed !== \"boolean\"\r\n ) {\r\n throw new Error(\"Invalid arguments passed to jsPDF.lines\");\r\n }\r\n\r\n // starting point\r\n moveTo(x, y);\r\n\r\n scalex = scale[0];\r\n scaley = scale[1];\r\n l = lines.length;\r\n //, x2, y2 // bezier only. In page default measurement \"units\", *after* scaling\r\n //, x3, y3 // bezier only. In page default measurement \"units\", *after* scaling\r\n // ending point for all, lines and bezier. . In page default measurement \"units\", *after* scaling\r\n x4 = x; // last / ending point = starting point for first item.\r\n y4 = y; // last / ending point = starting point for first item.\r\n\r\n for (i = 0; i < l; i++) {\r\n leg = lines[i];\r\n if (leg.length === 2) {\r\n // simple line\r\n x4 = leg[0] * scalex + x4; // here last x4 was prior ending point\r\n y4 = leg[1] * scaley + y4; // here last y4 was prior ending point\r\n lineTo(x4, y4);\r\n } else {\r\n // bezier curve\r\n x2 = leg[0] * scalex + x4; // here last x4 is prior ending point\r\n y2 = leg[1] * scaley + y4; // here last y4 is prior ending point\r\n x3 = leg[2] * scalex + x4; // here last x4 is prior ending point\r\n y3 = leg[3] * scaley + y4; // here last y4 is prior ending point\r\n x4 = leg[4] * scalex + x4; // here last x4 was prior ending point\r\n y4 = leg[5] * scaley + y4; // here last y4 was prior ending point\r\n curveTo(x2, y2, x3, y3, x4, y4);\r\n }\r\n }\r\n\r\n if (closed) {\r\n close();\r\n }\r\n\r\n putStyle(style);\r\n return this;\r\n };\r\n\r\n /**\r\n * Similar to {@link API.lines} but all coordinates are interpreted as absolute coordinates instead of relative.\r\n * @param {Array} lines An array of {op: operator, c: coordinates} object, where op is one of \"m\" (move to), \"l\" (line to)\r\n * \"c\" (cubic bezier curve) and \"h\" (close (sub)path)). c is an array of coordinates. \"m\" and \"l\" expect two, \"c\"\r\n * six and \"h\" an empty array (or undefined).\r\n * @function\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name path\r\n */\r\n API.path = function(lines) {\r\n for (var i = 0; i < lines.length; i++) {\r\n var leg = lines[i];\r\n var coords = leg.c;\r\n switch (leg.op) {\r\n case \"m\":\r\n moveTo(coords[0], coords[1]);\r\n break;\r\n case \"l\":\r\n lineTo(coords[0], coords[1]);\r\n break;\r\n case \"c\":\r\n curveTo.apply(this, coords);\r\n break;\r\n case \"h\":\r\n close();\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n };\r\n\r\n /**\r\n * Adds a rectangle to PDF.\r\n *\r\n * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n * @param {number} w Width (in units declared at inception of PDF document)\r\n * @param {number} h Height (in units declared at inception of PDF document)\r\n * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n * 'S' [default] - stroke,\r\n * 'F' - fill,\r\n * and 'DF' (or 'FD') - fill then stroke.\r\n * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n *\r\n * In \"advanced\" API mode this parameter is deprecated.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name rect\r\n */\r\n API.__private__.rect = API.rect = function(x, y, w, h, style) {\r\n if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h) || !isValidStyle(style)) {\r\n throw new Error(\"Invalid arguments passed to jsPDF.rect\");\r\n }\r\n if (apiMode === ApiMode.COMPAT) {\r\n h = -h;\r\n }\r\n\r\n out(\r\n [\r\n hpf(scale(x)),\r\n hpf(transformScaleY(y)),\r\n hpf(scale(w)),\r\n hpf(scale(h)),\r\n \"re\"\r\n ].join(\" \")\r\n );\r\n\r\n putStyle(style);\r\n return this;\r\n };\r\n\r\n /**\r\n * Adds a triangle to PDF.\r\n *\r\n * @param {number} x1 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n * @param {number} y1 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n * @param {number} x2 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n * @param {number} y2 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n * @param {number} x3 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n * @param {number} y3 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n * 'S' [default] - stroke,\r\n * 'F' - fill,\r\n * and 'DF' (or 'FD') - fill then stroke.\r\n * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n *\r\n * In \"advanced\" API mode this parameter is deprecated.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name triangle\r\n */\r\n API.__private__.triangle = API.triangle = function(\r\n x1,\r\n y1,\r\n x2,\r\n y2,\r\n x3,\r\n y3,\r\n style\r\n ) {\r\n if (\r\n isNaN(x1) ||\r\n isNaN(y1) ||\r\n isNaN(x2) ||\r\n isNaN(y2) ||\r\n isNaN(x3) ||\r\n isNaN(y3) ||\r\n !isValidStyle(style)\r\n ) {\r\n throw new Error(\"Invalid arguments passed to jsPDF.triangle\");\r\n }\r\n this.lines(\r\n [\r\n [x2 - x1, y2 - y1], // vector to point 2\r\n [x3 - x2, y3 - y2], // vector to point 3\r\n [x1 - x3, y1 - y3] // closing vector back to point 1\r\n ],\r\n x1,\r\n y1, // start of path\r\n [1, 1],\r\n style,\r\n true\r\n );\r\n return this;\r\n };\r\n\r\n /**\r\n * Adds a rectangle with rounded corners to PDF.\r\n *\r\n * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n * @param {number} w Width (in units declared at inception of PDF document)\r\n * @param {number} h Height (in units declared at inception of PDF document)\r\n * @param {number} rx Radius along x axis (in units declared at inception of PDF document)\r\n * @param {number} ry Radius along y axis (in units declared at inception of PDF document)\r\n * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n * 'S' [default] - stroke,\r\n * 'F' - fill,\r\n * and 'DF' (or 'FD') - fill then stroke.\r\n * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n *\r\n * In \"advanced\" API mode this parameter is deprecated.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name roundedRect\r\n */\r\n API.__private__.roundedRect = API.roundedRect = function(\r\n x,\r\n y,\r\n w,\r\n h,\r\n rx,\r\n ry,\r\n style\r\n ) {\r\n if (\r\n isNaN(x) ||\r\n isNaN(y) ||\r\n isNaN(w) ||\r\n isNaN(h) ||\r\n isNaN(rx) ||\r\n isNaN(ry) ||\r\n !isValidStyle(style)\r\n ) {\r\n throw new Error(\"Invalid arguments passed to jsPDF.roundedRect\");\r\n }\r\n var MyArc = (4 / 3) * (Math.SQRT2 - 1);\r\n\r\n rx = Math.min(rx, w * 0.5);\r\n ry = Math.min(ry, h * 0.5);\r\n\r\n this.lines(\r\n [\r\n [w - 2 * rx, 0],\r\n [rx * MyArc, 0, rx, ry - ry * MyArc, rx, ry],\r\n [0, h - 2 * ry],\r\n [0, ry * MyArc, -(rx * MyArc), ry, -rx, ry],\r\n [-w + 2 * rx, 0],\r\n [-(rx * MyArc), 0, -rx, -(ry * MyArc), -rx, -ry],\r\n [0, -h + 2 * ry],\r\n [0, -(ry * MyArc), rx * MyArc, -ry, rx, -ry]\r\n ],\r\n x + rx,\r\n y, // start of path\r\n [1, 1],\r\n style,\r\n true\r\n );\r\n return this;\r\n };\r\n\r\n /**\r\n * Adds an ellipse to PDF.\r\n *\r\n * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n * @param {number} rx Radius along x axis (in units declared at inception of PDF document)\r\n * @param {number} ry Radius along y axis (in units declared at inception of PDF document)\r\n * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n * 'S' [default] - stroke,\r\n * 'F' - fill,\r\n * and 'DF' (or 'FD') - fill then stroke.\r\n * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n *\r\n * In \"advanced\" API mode this parameter is deprecated.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name ellipse\r\n */\r\n API.__private__.ellipse = API.ellipse = function(x, y, rx, ry, style) {\r\n if (\r\n isNaN(x) ||\r\n isNaN(y) ||\r\n isNaN(rx) ||\r\n isNaN(ry) ||\r\n !isValidStyle(style)\r\n ) {\r\n throw new Error(\"Invalid arguments passed to jsPDF.ellipse\");\r\n }\r\n var lx = (4 / 3) * (Math.SQRT2 - 1) * rx,\r\n ly = (4 / 3) * (Math.SQRT2 - 1) * ry;\r\n\r\n moveTo(x + rx, y);\r\n curveTo(x + rx, y - ly, x + lx, y - ry, x, y - ry);\r\n curveTo(x - lx, y - ry, x - rx, y - ly, x - rx, y);\r\n curveTo(x - rx, y + ly, x - lx, y + ry, x, y + ry);\r\n curveTo(x + lx, y + ry, x + rx, y + ly, x + rx, y);\r\n\r\n putStyle(style);\r\n return this;\r\n };\r\n\r\n /**\r\n * Adds an circle to PDF.\r\n *\r\n * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n * @param {number} r Radius (in units declared at inception of PDF document)\r\n * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n * 'S' [default] - stroke,\r\n * 'F' - fill,\r\n * and 'DF' (or 'FD') - fill then stroke.\r\n * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n *\r\n * In \"advanced\" API mode this parameter is deprecated.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name circle\r\n */\r\n API.__private__.circle = API.circle = function(x, y, r, style) {\r\n if (isNaN(x) || isNaN(y) || isNaN(r) || !isValidStyle(style)) {\r\n throw new Error(\"Invalid arguments passed to jsPDF.circle\");\r\n }\r\n return this.ellipse(x, y, r, r, style);\r\n };\r\n\r\n /**\r\n * Sets text font face, variant for upcoming text elements.\r\n * See output of jsPDF.getFontList() for possible font names, styles.\r\n *\r\n * @param {string} fontName Font name or family. Example: \"times\".\r\n * @param {string} fontStyle Font style or variant. Example: \"italic\".\r\n * @param {number | string} fontWeight Weight of the Font. Example: \"normal\" | 400\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setFont\r\n */\r\n API.setFont = function(fontName, fontStyle, fontWeight) {\r\n if (fontWeight) {\r\n fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);\r\n }\r\n activeFontKey = getFont(fontName, fontStyle, {\r\n disableWarning: false\r\n });\r\n return this;\r\n };\r\n\r\n /**\r\n * Gets text font face, variant for upcoming text elements.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {Object}\r\n * @memberof jsPDF#\r\n * @name getFont\r\n */\r\n var getFontEntry = (API.__private__.getFont = API.getFont = function() {\r\n return fonts[getFont.apply(API, arguments)];\r\n });\r\n\r\n /**\r\n * Returns an object - a tree of fontName to fontStyle relationships available to\r\n * active PDF document.\r\n *\r\n * @public\r\n * @function\r\n * @instance\r\n * @returns {Object} Like {'times':['normal', 'italic', ... ], 'arial':['normal', 'bold', ... ], ... }\r\n * @memberof jsPDF#\r\n * @name getFontList\r\n */\r\n API.__private__.getFontList = API.getFontList = function() {\r\n var list = {},\r\n fontName,\r\n fontStyle;\r\n\r\n for (fontName in fontmap) {\r\n if (fontmap.hasOwnProperty(fontName)) {\r\n list[fontName] = [];\r\n for (fontStyle in fontmap[fontName]) {\r\n if (fontmap[fontName].hasOwnProperty(fontStyle)) {\r\n list[fontName].push(fontStyle);\r\n }\r\n }\r\n }\r\n }\r\n return list;\r\n };\r\n\r\n /**\r\n * Add a custom font to the current instance.\r\n *\r\n * @param {string} postScriptName PDF specification full name for the font.\r\n * @param {string} id PDF-document-instance-specific label assinged to the font.\r\n * @param {string} fontStyle Style of the Font.\r\n * @param {number | string} fontWeight Weight of the Font.\r\n * @param {Object} encoding Encoding_name-to-Font_metrics_object mapping.\r\n * @function\r\n * @instance\r\n * @memberof jsPDF#\r\n * @name addFont\r\n * @returns {string} fontId\r\n */\r\n API.addFont = function(\r\n postScriptName,\r\n fontName,\r\n fontStyle,\r\n fontWeight,\r\n encoding\r\n ) {\r\n var encodingOptions = [\r\n \"StandardEncoding\",\r\n \"MacRomanEncoding\",\r\n \"Identity-H\",\r\n \"WinAnsiEncoding\"\r\n ];\r\n if (arguments[3] && encodingOptions.indexOf(arguments[3]) !== -1) {\r\n //IE 11 fix\r\n encoding = arguments[3];\r\n } else if (arguments[3] && encodingOptions.indexOf(arguments[3]) == -1) {\r\n fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);\r\n }\r\n encoding = encoding || \"Identity-H\";\r\n return addFont.call(this, postScriptName, fontName, fontStyle, encoding);\r\n };\r\n\r\n var lineWidth = options.lineWidth || 0.200025; // 2mm\r\n /**\r\n * Gets the line width, default: 0.200025.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {number} lineWidth\r\n * @memberof jsPDF#\r\n * @name getLineWidth\r\n */\r\n var getLineWidth = (API.__private__.getLineWidth = API.getLineWidth = function() {\r\n return lineWidth;\r\n });\r\n\r\n /**\r\n * Sets line width for upcoming lines.\r\n *\r\n * @param {number} width Line width (in units declared at inception of PDF document).\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setLineWidth\r\n */\r\n var setLineWidth = (API.__private__.setLineWidth = API.setLineWidth = function(\r\n width\r\n ) {\r\n lineWidth = width;\r\n out(hpf(scale(width)) + \" w\");\r\n return this;\r\n });\r\n\r\n /**\r\n * Sets the dash pattern for upcoming lines.\r\n *\r\n * To reset the settings simply call the method without any parameters.\r\n * @param {Array} dashArray An array containing 0-2 numbers. The first number sets the length of the\r\n * dashes, the second number the length of the gaps. If the second number is missing, the gaps are considered\r\n * to be as long as the dashes. An empty array means solid, unbroken lines.\r\n * @param {number} dashPhase The phase lines start with.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setLineDashPattern\r\n */\r\n API.__private__.setLineDash = jsPDF.API.setLineDash = jsPDF.API.setLineDashPattern = function(\r\n dashArray,\r\n dashPhase\r\n ) {\r\n dashArray = dashArray || [];\r\n dashPhase = dashPhase || 0;\r\n\r\n if (isNaN(dashPhase) || !Array.isArray(dashArray)) {\r\n throw new Error(\"Invalid arguments passed to jsPDF.setLineDash\");\r\n }\r\n\r\n dashArray = dashArray\r\n .map(function(x) {\r\n return hpf(scale(x));\r\n })\r\n .join(\" \");\r\n dashPhase = hpf(scale(dashPhase));\r\n\r\n out(\"[\" + dashArray + \"] \" + dashPhase + \" d\");\r\n return this;\r\n };\r\n\r\n var lineHeightFactor;\r\n\r\n var getLineHeight = (API.__private__.getLineHeight = API.getLineHeight = function() {\r\n return activeFontSize * lineHeightFactor;\r\n });\r\n\r\n API.__private__.getLineHeight = API.getLineHeight = function() {\r\n return activeFontSize * lineHeightFactor;\r\n };\r\n\r\n /**\r\n * Sets the LineHeightFactor of proportion.\r\n *\r\n * @param {number} value LineHeightFactor value. Default: 1.15.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setLineHeightFactor\r\n */\r\n var setLineHeightFactor = (API.__private__.setLineHeightFactor = API.setLineHeightFactor = function(\r\n value\r\n ) {\r\n value = value || 1.15;\r\n if (typeof value === \"number\") {\r\n lineHeightFactor = value;\r\n }\r\n return this;\r\n });\r\n\r\n /**\r\n * Gets the LineHeightFactor, default: 1.15.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {number} lineHeightFactor\r\n * @memberof jsPDF#\r\n * @name getLineHeightFactor\r\n */\r\n var getLineHeightFactor = (API.__private__.getLineHeightFactor = API.getLineHeightFactor = function() {\r\n return lineHeightFactor;\r\n });\r\n\r\n setLineHeightFactor(options.lineHeight);\r\n\r\n var getHorizontalCoordinate = (API.__private__.getHorizontalCoordinate = function(\r\n value\r\n ) {\r\n return scale(value);\r\n });\r\n\r\n var getVerticalCoordinate = (API.__private__.getVerticalCoordinate = function(\r\n value\r\n ) {\r\n if (apiMode === ApiMode.ADVANCED) {\r\n return value;\r\n } else {\r\n var pageHeight =\r\n pagesContext[currentPage].mediaBox.topRightY -\r\n pagesContext[currentPage].mediaBox.bottomLeftY;\r\n return pageHeight - scale(value);\r\n }\r\n });\r\n\r\n var getHorizontalCoordinateString = (API.__private__.getHorizontalCoordinateString = API.getHorizontalCoordinateString = function(\r\n value\r\n ) {\r\n return hpf(getHorizontalCoordinate(value));\r\n });\r\n\r\n var getVerticalCoordinateString = (API.__private__.getVerticalCoordinateString = API.getVerticalCoordinateString = function(\r\n value\r\n ) {\r\n return hpf(getVerticalCoordinate(value));\r\n });\r\n\r\n var strokeColor = options.strokeColor || \"0 G\";\r\n\r\n /**\r\n * Gets the stroke color for upcoming elements.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {string} colorAsHex\r\n * @memberof jsPDF#\r\n * @name getDrawColor\r\n */\r\n API.__private__.getStrokeColor = API.getDrawColor = function() {\r\n return decodeColorString(strokeColor);\r\n };\r\n\r\n /**\r\n * Sets the stroke color for upcoming elements.\r\n *\r\n * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n * color space is implied.\r\n *\r\n * When only ch1 is given, \"Gray\" color space is implied and it\r\n * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n * if values are communicated as String types, or in range from 0 (black)\r\n * to 255 (white) if communicated as Number type.\r\n * The RGB-like 0-255 range is provided for backward compatibility.\r\n *\r\n * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n * (max intensity) if values are communicated as String types, or\r\n * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n * as Number types.\r\n * The RGB-like 0-255 range is provided for backward compatibility.\r\n *\r\n * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n * value must be a in the range from 0.00 (0% concentration) to to\r\n * 1.00 (100% concentration)\r\n *\r\n * Because JavaScript treats fixed point numbers badly (rounds to\r\n * floating point nearest to binary representation) it is highly advised to\r\n * communicate the fractional numbers as String types, not JavaScript Number type.\r\n *\r\n * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n * @param {Number} ch2 Color channel value.\r\n * @param {Number} ch3 Color channel value.\r\n * @param {Number} ch4 Color channel value.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setDrawColor\r\n */\r\n API.__private__.setStrokeColor = API.setDrawColor = function(\r\n ch1,\r\n ch2,\r\n ch3,\r\n ch4\r\n ) {\r\n var options = {\r\n ch1: ch1,\r\n ch2: ch2,\r\n ch3: ch3,\r\n ch4: ch4,\r\n pdfColorType: \"draw\",\r\n precision: 2\r\n };\r\n\r\n strokeColor = encodeColorString(options);\r\n out(strokeColor);\r\n return this;\r\n };\r\n\r\n var fillColor = options.fillColor || \"0 g\";\r\n\r\n /**\r\n * Gets the fill color for upcoming elements.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {string} colorAsHex\r\n * @memberof jsPDF#\r\n * @name getFillColor\r\n */\r\n API.__private__.getFillColor = API.getFillColor = function() {\r\n return decodeColorString(fillColor);\r\n };\r\n\r\n /**\r\n * Sets the fill color for upcoming elements.\r\n *\r\n * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n * color space is implied.\r\n *\r\n * When only ch1 is given, \"Gray\" color space is implied and it\r\n * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n * if values are communicated as String types, or in range from 0 (black)\r\n * to 255 (white) if communicated as Number type.\r\n * The RGB-like 0-255 range is provided for backward compatibility.\r\n *\r\n * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n * (max intensity) if values are communicated as String types, or\r\n * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n * as Number types.\r\n * The RGB-like 0-255 range is provided for backward compatibility.\r\n *\r\n * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n * value must be a in the range from 0.00 (0% concentration) to to\r\n * 1.00 (100% concentration)\r\n *\r\n * Because JavaScript treats fixed point numbers badly (rounds to\r\n * floating point nearest to binary representation) it is highly advised to\r\n * communicate the fractional numbers as String types, not JavaScript Number type.\r\n *\r\n * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n * @param {Number} ch2 Color channel value.\r\n * @param {Number} ch3 Color channel value.\r\n * @param {Number} ch4 Color channel value.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setFillColor\r\n */\r\n API.__private__.setFillColor = API.setFillColor = function(\r\n ch1,\r\n ch2,\r\n ch3,\r\n ch4\r\n ) {\r\n var options = {\r\n ch1: ch1,\r\n ch2: ch2,\r\n ch3: ch3,\r\n ch4: ch4,\r\n pdfColorType: \"fill\",\r\n precision: 2\r\n };\r\n\r\n fillColor = encodeColorString(options);\r\n out(fillColor);\r\n return this;\r\n };\r\n\r\n var textColor = options.textColor || \"0 g\";\r\n /**\r\n * Gets the text color for upcoming elements.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {string} colorAsHex\r\n * @memberof jsPDF#\r\n * @name getTextColor\r\n */\r\n var getTextColor = (API.__private__.getTextColor = API.getTextColor = function() {\r\n return decodeColorString(textColor);\r\n });\r\n /**\r\n * Sets the text color for upcoming elements.\r\n *\r\n * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n * color space is implied.\r\n *\r\n * When only ch1 is given, \"Gray\" color space is implied and it\r\n * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n * if values are communicated as String types, or in range from 0 (black)\r\n * to 255 (white) if communicated as Number type.\r\n * The RGB-like 0-255 range is provided for backward compatibility.\r\n *\r\n * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n * (max intensity) if values are communicated as String types, or\r\n * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n * as Number types.\r\n * The RGB-like 0-255 range is provided for backward compatibility.\r\n *\r\n * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n * value must be a in the range from 0.00 (0% concentration) to to\r\n * 1.00 (100% concentration)\r\n *\r\n * Because JavaScript treats fixed point numbers badly (rounds to\r\n * floating point nearest to binary representation) it is highly advised to\r\n * communicate the fractional numbers as String types, not JavaScript Number type.\r\n *\r\n * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n * @param {Number} ch2 Color channel value.\r\n * @param {Number} ch3 Color channel value.\r\n * @param {Number} ch4 Color channel value.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setTextColor\r\n */\r\n API.__private__.setTextColor = API.setTextColor = function(\r\n ch1,\r\n ch2,\r\n ch3,\r\n ch4\r\n ) {\r\n var options = {\r\n ch1: ch1,\r\n ch2: ch2,\r\n ch3: ch3,\r\n ch4: ch4,\r\n pdfColorType: \"text\",\r\n precision: 3\r\n };\r\n textColor = encodeColorString(options);\r\n\r\n return this;\r\n };\r\n\r\n var activeCharSpace = options.charSpace;\r\n\r\n /**\r\n * Get global value of CharSpace.\r\n *\r\n * @function\r\n * @instance\r\n * @returns {number} charSpace\r\n * @memberof jsPDF#\r\n * @name getCharSpace\r\n */\r\n var getCharSpace = (API.__private__.getCharSpace = API.getCharSpace = function() {\r\n return parseFloat(activeCharSpace || 0);\r\n });\r\n\r\n /**\r\n * Set global value of CharSpace.\r\n *\r\n * @param {number} charSpace\r\n * @function\r\n * @instance\r\n * @returns {jsPDF} jsPDF-instance\r\n * @memberof jsPDF#\r\n * @name setCharSpace\r\n */\r\n API.__private__.setCharSpace = API.setCharSpace = function(charSpace) {\r\n if (isNaN(charSpace)) {\r\n throw new Error(\"Invalid argument passed to jsPDF.setCharSpace\");\r\n }\r\n activeCharSpace = charSpace;\r\n return this;\r\n };\r\n\r\n var lineCapID = 0;\r\n /**\r\n * Is an Object providing a mapping from human-readable to\r\n * integer flag values designating the varieties of line cap\r\n * and join styles.\r\n *\r\n * @memberof jsPDF#\r\n * @name CapJoinStyles\r\n */\r\n API.CapJoinStyles = {\r\n 0: 0,\r\n butt: 0,\r\n but: 0,\r\n miter: 0,\r\n 1: 1,\r\n round: 1,\r\n rounded: 1,\r\n circle: 1,\r\n 2: 2,\r\n projecting: 2,\r\n project: 2,\r\n square: 2,\r\n bevel: 2\r\n };\r\n\r\n /**\r\n * Sets the line cap styles.\r\n * See {jsPDF.CapJoinStyles} for variants.\r\n *\r\n * @param {String|Number} style A string or number identifying the type of line cap.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setLineCap\r\n */\r\n API.__private__.setLineCap = API.setLineCap = function(style) {\r\n var id = API.CapJoinStyles[style];\r\n if (id === undefined) {\r\n throw new Error(\r\n \"Line cap style of '\" +\r\n style +\r\n \"' is not recognized. See or extend .CapJoinStyles property for valid styles\"\r\n );\r\n }\r\n lineCapID = id;\r\n out(id + \" J\");\r\n\r\n return this;\r\n };\r\n\r\n var lineJoinID = 0;\r\n /**\r\n * Sets the line join styles.\r\n * See {jsPDF.CapJoinStyles} for variants.\r\n *\r\n * @param {String|Number} style A string or number identifying the type of line join.\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setLineJoin\r\n */\r\n API.__private__.setLineJoin = API.setLineJoin = function(style) {\r\n var id = API.CapJoinStyles[style];\r\n if (id === undefined) {\r\n throw new Error(\r\n \"Line join style of '\" +\r\n style +\r\n \"' is not recognized. See or extend .CapJoinStyles property for valid styles\"\r\n );\r\n }\r\n lineJoinID = id;\r\n out(id + \" j\");\r\n\r\n return this;\r\n };\r\n\r\n var miterLimit;\r\n /**\r\n * Sets the miterLimit property, which effects the maximum miter length.\r\n *\r\n * @param {number} length The length of the miter\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setLineMiterLimit\r\n */\r\n API.__private__.setLineMiterLimit = API.__private__.setMiterLimit = API.setLineMiterLimit = API.setMiterLimit = function(\r\n length\r\n ) {\r\n length = length || 0;\r\n if (isNaN(length)) {\r\n throw new Error(\"Invalid argument passed to jsPDF.setLineMiterLimit\");\r\n }\r\n out(hpf(scale(length)) + \" M\");\r\n\r\n return this;\r\n };\r\n\r\n /**\r\n * An object representing a pdf graphics state.\r\n * @class GState\r\n */\r\n\r\n /**\r\n *\r\n * @param parameters A parameter object that contains all properties this graphics state wants to set.\r\n * Supported are: opacity, stroke-opacity\r\n * @constructor\r\n */\r\n API.GState = GState;\r\n\r\n /**\r\n * Sets a either previously added {@link GState} (via {@link addGState}) or a new {@link GState}.\r\n * @param {String|GState} gState If type is string, a previously added GState is used, if type is GState\r\n * it will be added before use.\r\n * @function\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setGState\r\n */\r\n API.setGState = function(gState) {\r\n if (typeof gState === \"string\") {\r\n gState = gStates[gStatesMap[gState]];\r\n } else {\r\n gState = addGState(null, gState);\r\n }\r\n\r\n if (!gState.equals(activeGState)) {\r\n out(\"/\" + gState.id + \" gs\");\r\n activeGState = gState;\r\n }\r\n };\r\n\r\n /**\r\n * Adds a new Graphics State. Duplicates are automatically eliminated.\r\n * @param {String} key Might also be null, if no later reference to this gState is needed\r\n * @param {Object} gState The gState object\r\n */\r\n var addGState = function(key, gState) {\r\n // only add it if it is not already present (the keys provided by the user must be unique!)\r\n if (key && gStatesMap[key]) return;\r\n var duplicate = false;\r\n for (var s in gStates) {\r\n if (gStates.hasOwnProperty(s)) {\r\n if (gStates[s].equals(gState)) {\r\n duplicate = true;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (duplicate) {\r\n gState = gStates[s];\r\n } else {\r\n var gStateKey = \"GS\" + (Object.keys(gStates).length + 1).toString(10);\r\n gStates[gStateKey] = gState;\r\n gState.id = gStateKey;\r\n }\r\n\r\n // several user keys may point to the same GState object\r\n key && (gStatesMap[key] = gState.id);\r\n\r\n events.publish(\"addGState\", gState);\r\n\r\n return gState;\r\n };\r\n\r\n /**\r\n * Adds a new {@link GState} for later use. See {@link setGState}.\r\n * @param {String} key\r\n * @param {GState} gState\r\n * @function\r\n * @instance\r\n * @returns {jsPDF}\r\n *\r\n * @memberof jsPDF#\r\n * @name addGState\r\n */\r\n API.addGState = function(key, gState) {\r\n addGState(key, gState);\r\n return this;\r\n };\r\n\r\n /**\r\n * Saves the current graphics state (\"pushes it on the stack\"). It can be restored by {@link restoreGraphicsState}\r\n * later. Here, the general pdf graphics state is meant, also including the current transformation matrix,\r\n * fill and stroke colors etc.\r\n * @function\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name saveGraphicsState\r\n */\r\n API.saveGraphicsState = function() {\r\n out(\"q\");\r\n // as we cannot set font key and size independently we must keep track of both\r\n fontStateStack.push({\r\n key: activeFontKey,\r\n size: activeFontSize,\r\n color: textColor\r\n });\r\n return this;\r\n };\r\n\r\n /**\r\n * Restores a previously saved graphics state saved by {@link saveGraphicsState} (\"pops the stack\").\r\n * @function\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name restoreGraphicsState\r\n */\r\n API.restoreGraphicsState = function() {\r\n out(\"Q\");\r\n\r\n // restore previous font state\r\n var fontState = fontStateStack.pop();\r\n activeFontKey = fontState.key;\r\n activeFontSize = fontState.size;\r\n textColor = fontState.color;\r\n\r\n activeGState = null;\r\n\r\n return this;\r\n };\r\n\r\n /**\r\n * Appends this matrix to the left of all previously applied matrices.\r\n *\r\n * @param {Matrix} matrix\r\n * @function\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name setCurrentTransformationMatrix\r\n */\r\n API.setCurrentTransformationMatrix = function(matrix) {\r\n out(matrix.toString() + \" cm\");\r\n return this;\r\n };\r\n\r\n /**\r\n * Inserts a debug comment into the generated pdf.\r\n * @function\r\n * @instance\r\n * @param {String} text\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name comment\r\n */\r\n API.comment = function(text) {\r\n out(\"#\" + text);\r\n return this;\r\n };\r\n\r\n /**\r\n * Point\r\n */\r\n var Point = function(x, y) {\r\n var _x = x || 0;\r\n Object.defineProperty(this, \"x\", {\r\n enumerable: true,\r\n get: function() {\r\n return _x;\r\n },\r\n set: function(value) {\r\n if (!isNaN(value)) {\r\n _x = parseFloat(value);\r\n }\r\n }\r\n });\r\n\r\n var _y = y || 0;\r\n Object.defineProperty(this, \"y\", {\r\n enumerable: true,\r\n get: function() {\r\n return _y;\r\n },\r\n set: function(value) {\r\n if (!isNaN(value)) {\r\n _y = parseFloat(value);\r\n }\r\n }\r\n });\r\n\r\n var _type = \"pt\";\r\n Object.defineProperty(this, \"type\", {\r\n enumerable: true,\r\n get: function() {\r\n return _type;\r\n },\r\n set: function(value) {\r\n _type = value.toString();\r\n }\r\n });\r\n return this;\r\n };\r\n\r\n /**\r\n * Rectangle\r\n */\r\n var Rectangle = function(x, y, w, h) {\r\n Point.call(this, x, y);\r\n this.type = \"rect\";\r\n\r\n var _w = w || 0;\r\n Object.defineProperty(this, \"w\", {\r\n enumerable: true,\r\n get: function() {\r\n return _w;\r\n },\r\n set: function(value) {\r\n if (!isNaN(value)) {\r\n _w = parseFloat(value);\r\n }\r\n }\r\n });\r\n\r\n var _h = h || 0;\r\n Object.defineProperty(this, \"h\", {\r\n enumerable: true,\r\n get: function() {\r\n return _h;\r\n },\r\n set: function(value) {\r\n if (!isNaN(value)) {\r\n _h = parseFloat(value);\r\n }\r\n }\r\n });\r\n\r\n return this;\r\n };\r\n\r\n /**\r\n * FormObject/RenderTarget\r\n */\r\n\r\n var RenderTarget = function() {\r\n this.page = page;\r\n this.currentPage = currentPage;\r\n this.pages = pages.slice(0);\r\n this.pagesContext = pagesContext.slice(0);\r\n this.x = pageX;\r\n this.y = pageY;\r\n this.matrix = pageMatrix;\r\n this.width = getPageWidth(currentPage);\r\n this.height = getPageHeight(currentPage);\r\n this.outputDestination = outputDestination;\r\n\r\n this.id = \"\"; // set by endFormObject()\r\n this.objectNumber = -1; // will be set by putXObject()\r\n };\r\n\r\n RenderTarget.prototype.restore = function() {\r\n page = this.page;\r\n currentPage = this.currentPage;\r\n pagesContext = this.pagesContext;\r\n pages = this.pages;\r\n pageX = this.x;\r\n pageY = this.y;\r\n pageMatrix = this.matrix;\r\n setPageWidth(currentPage, this.width);\r\n setPageHeight(currentPage, this.height);\r\n outputDestination = this.outputDestination;\r\n };\r\n\r\n var beginNewRenderTarget = function(x, y, width, height, matrix) {\r\n // save current state\r\n renderTargetStack.push(new RenderTarget());\r\n\r\n // clear pages\r\n page = currentPage = 0;\r\n pages = [];\r\n pageX = x;\r\n pageY = y;\r\n\r\n pageMatrix = matrix;\r\n\r\n beginPage([width, height]);\r\n };\r\n\r\n var endFormObject = function(key) {\r\n // only add it if it is not already present (the keys provided by the user must be unique!)\r\n if (renderTargetMap[key]) {\r\n renderTargetStack.pop().restore();\r\n return;\r\n }\r\n\r\n // save the created xObject\r\n var newXObject = new RenderTarget();\r\n\r\n var xObjectId = \"Xo\" + (Object.keys(renderTargets).length + 1).toString(10);\r\n newXObject.id = xObjectId;\r\n\r\n renderTargetMap[key] = xObjectId;\r\n renderTargets[xObjectId] = newXObject;\r\n\r\n events.publish(\"addFormObject\", newXObject);\r\n\r\n // restore state from stack\r\n renderTargetStack.pop().restore();\r\n };\r\n\r\n /**\r\n * Starts a new pdf form object, which means that all consequent draw calls target a new independent object\r\n * until {@link endFormObject} is called. The created object can be referenced and drawn later using\r\n * {@link doFormObject}. Nested form objects are possible.\r\n * x, y, width, height set the bounding box that is used to clip the content.\r\n *\r\n * @param {number} x\r\n * @param {number} y\r\n * @param {number} width\r\n * @param {number} height\r\n * @param {Matrix} matrix The matrix that will be applied to convert the form objects coordinate system to\r\n * the parent's.\r\n * @function\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name beginFormObject\r\n */\r\n API.beginFormObject = function(x, y, width, height, matrix) {\r\n // The user can set the output target to a new form object. Nested form objects are possible.\r\n // Currently, they use the resource dictionary of the surrounding stream. This should be changed, as\r\n // the PDF-Spec states:\r\n // \"In PDF 1.2 and later versions, form XObjects may be independent of the content streams in which\r\n // they appear, and this is strongly recommended although not requiredIn PDF 1.2 and later versions,\r\n // form XObjects may be independent of the content streams in which they appear, and this is strongly\r\n // recommended although not required\"\r\n beginNewRenderTarget(x, y, width, height, matrix);\r\n return this;\r\n };\r\n\r\n /**\r\n * Completes and saves the form object.\r\n * @param {String} key The key by which this form object can be referenced.\r\n * @function\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name endFormObject\r\n */\r\n API.endFormObject = function(key) {\r\n endFormObject(key);\r\n return this;\r\n };\r\n\r\n /**\r\n * Draws the specified form object by referencing to the respective pdf XObject created with\r\n * {@link API.beginFormObject} and {@link endFormObject}.\r\n * The location is determined by matrix.\r\n *\r\n * @param {String} key The key to the form object.\r\n * @param {Matrix} matrix The matrix applied before drawing the form object.\r\n * @function\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name doFormObject\r\n */\r\n API.doFormObject = function(key, matrix) {\r\n var xObject = renderTargets[renderTargetMap[key]];\r\n out(\"q\");\r\n out(matrix.toString() + \" cm\");\r\n out(\"/\" + xObject.id + \" Do\");\r\n out(\"Q\");\r\n return this;\r\n };\r\n\r\n /**\r\n * Returns the form object specified by key.\r\n * @param key {String}\r\n * @returns {{x: number, y: number, width: number, height: number, matrix: Matrix}}\r\n * @function\r\n * @returns {jsPDF}\r\n * @memberof jsPDF#\r\n * @name getFormObject\r\n */\r\n API.getFormObject = function(key) {\r\n var xObject = renderTargets[renderTargetMap[key]];\r\n return {\r\n x: xObject.x,\r\n y: xObject.y,\r\n width: xObject.width,\r\n height: xObject.height,\r\n matrix: xObject.matrix\r\n };\r\n };\r\n\r\n /**\r\n * Saves as PDF document. An alias of jsPDF.output('save', 'filename.pdf').\r\n * Uses FileSaver.js-method saveAs.\r\n *\r\n * @memberof jsPDF#\r\n * @name save\r\n * @function\r\n * @instance\r\n * @param {string} filename The filename including extension.\r\n * @param {Object} options An Object with additional options, possible options: 'returnPromise'.\r\n * @returns {jsPDF|Promise} jsPDF-instance */\r\n API.save = function(filename, options) {\r\n filename = filename || \"generated.pdf\";\r\n\r\n options = options || {};\r\n options.returnPromise = options.returnPromise || false;\r\n\r\n if (options.returnPromise === false) {\r\n saveAs(getBlob(buildDocument()), filename);\r\n if (typeof saveAs.unload === \"function\") {\r\n if (globalObject.setTimeout) {\r\n setTimeout(saveAs.unload, 911);\r\n }\r\n }\r\n return this;\r\n } else {\r\n return new Promise(function(resolve, reject) {\r\n try {\r\n var result = saveAs(getBlob(buildDocument()), filename);\r\n if (typeof saveAs.unload === \"function\") {\r\n if (globalObject.setTimeout) {\r\n setTimeout(saveAs.unload, 911);\r\n }\r\n }\r\n resolve(result);\r\n } catch (e) {\r\n reject(e.message);\r\n }\r\n });\r\n }\r\n\r\n };\r\n\r\n // applying plugins (more methods) ON TOP of built-in API.\r\n // this is intentional as we allow plugins to override\r\n // built-ins\r\n for (var plugin in jsPDF.API) {\r\n if (jsPDF.API.hasOwnProperty(plugin)) {\r\n if (plugin === \"events\" && jsPDF.API.events.length) {\r\n (function(events, newEvents) {\r\n // jsPDF.API.events is a JS Array of Arrays\r\n // where each Array is a pair of event name, handler\r\n // Events were added by plugins to the jsPDF instantiator.\r\n // These are always added to the new instance and some ran\r\n // during instantiation.\r\n var eventname, handler_and_args, i;\r\n\r\n for (i = newEvents.length - 1; i !== -1; i--) {\r\n // subscribe takes 3 args: 'topic', function, runonce_flag\r\n // if undefined, runonce is false.\r\n // users can attach callback directly,\r\n // or they can attach an array with [callback, runonce_flag]\r\n // that's what the \"apply\" magic is for below.\r\n eventname = newEvents[i][0];\r\n handler_and_args = newEvents[i][1];\r\n events.subscribe.apply(\r\n events,\r\n [eventname].concat(\r\n typeof handler_and_args === \"function\"\r\n ? [handler_and_args]\r\n : handler_and_args\r\n )\r\n );\r\n }\r\n })(events, jsPDF.API.events);\r\n } else {\r\n API[plugin] = jsPDF.API[plugin];\r\n }\r\n }\r\n }\r\n\r\n var getPageWidth = (API.getPageWidth = function(pageNumber) {\r\n pageNumber = pageNumber || currentPage;\r\n return (\r\n (pagesContext[pageNumber].mediaBox.topRightX -\r\n pagesContext[pageNumber].mediaBox.bottomLeftX) /\r\n scaleFactor\r\n );\r\n });\r\n\r\n var setPageWidth = (API.setPageWidth = function(pageNumber, value) {\r\n pagesContext[pageNumber].mediaBox.topRightX =\r\n value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftX;\r\n });\r\n\r\n var getPageHeight = (API.getPageHeight = function(pageNumber) {\r\n pageNumber = pageNumber || currentPage;\r\n return (\r\n (pagesContext[pageNumber].mediaBox.topRightY -\r\n pagesContext[pageNumber].mediaBox.bottomLeftY) /\r\n scaleFactor\r\n );\r\n });\r\n\r\n var setPageHeight = (API.setPageHeight = function(pageNumber, value) {\r\n pagesContext[pageNumber].mediaBox.topRightY =\r\n value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftY;\r\n });\r\n\r\n /**\r\n * Object exposing internal API to plugins\r\n * @public\r\n * @ignore\r\n */\r\n API.internal = {\r\n pdfEscape: pdfEscape,\r\n getStyle: getStyle,\r\n getFont: getFontEntry,\r\n getFontSize: getFontSize,\r\n getCharSpace: getCharSpace,\r\n getTextColor: getTextColor,\r\n getLineHeight: getLineHeight,\r\n getLineHeightFactor: getLineHeightFactor,\r\n getLineWidth: getLineWidth,\r\n write: write,\r\n getHorizontalCoordinate: getHorizontalCoordinate,\r\n getVerticalCoordinate: getVerticalCoordinate,\r\n getCoordinateString: getHorizontalCoordinateString,\r\n getVerticalCoordinateString: getVerticalCoordinateString,\r\n collections: {},\r\n newObject: newObject,\r\n newAdditionalObject: newAdditionalObject,\r\n newObjectDeferred: newObjectDeferred,\r\n newObjectDeferredBegin: newObjectDeferredBegin,\r\n getFilters: getFilters,\r\n putStream: putStream,\r\n events: events,\r\n scaleFactor: scaleFactor,\r\n pageSize: {\r\n getWidth: function() {\r\n return getPageWidth(currentPage);\r\n },\r\n setWidth: function(value) {\r\n setPageWidth(currentPage, value);\r\n },\r\n getHeight: function() {\r\n return getPageHeight(currentPage);\r\n },\r\n setHeight: function(value) {\r\n setPageHeight(currentPage, value);\r\n }\r\n },\r\n encryptionOptions: encryptionOptions,\r\n encryption: encryption,\r\n getEncryptor: getEncryptor,\r\n output: output,\r\n getNumberOfPages: getNumberOfPages,\r\n pages: pages,\r\n out: out,\r\n f2: f2,\r\n f3: f3,\r\n getPageInfo: getPageInfo,\r\n getPageInfoByObjId: getPageInfoByObjId,\r\n getCurrentPageInfo: getCurrentPageInfo,\r\n getPDFVersion: getPdfVersion,\r\n Point: Point,\r\n Rectangle: Rectangle,\r\n Matrix: Matrix,\r\n hasHotfix: hasHotfix //Expose the hasHotfix check so plugins can also check them.\r\n };\r\n\r\n Object.defineProperty(API.internal.pageSize, \"width\", {\r\n get: function() {\r\n return getPageWidth(currentPage);\r\n },\r\n set: function(value) {\r\n setPageWidth(currentPage, value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(API.internal.pageSize, \"height\", {\r\n get: function() {\r\n return getPageHeight(currentPage);\r\n },\r\n set: function(value) {\r\n setPageHeight(currentPage, value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n\r\n //////////////////////////////////////////////////////\r\n // continuing initialization of jsPDF Document object\r\n //////////////////////////////////////////////////////\r\n // Add the first page automatically\r\n addFonts.call(API, standardFonts);\r\n activeFontKey = \"F1\";\r\n _addPage(format, orientation);\r\n\r\n events.publish(\"initialized\");\r\n return API;\r\n}\r\n\r\n/**\r\n * jsPDF.API is a STATIC property of jsPDF class.\r\n * jsPDF.API is an object you can add methods and properties to.\r\n * The methods / properties you add will show up in new jsPDF objects.\r\n *\r\n * One property is prepopulated. It is the 'events' Object. Plugin authors can add topics,\r\n * callbacks to this object. These will be reassigned to all new instances of jsPDF.\r\n *\r\n * @static\r\n * @public\r\n * @memberof jsPDF#\r\n * @name API\r\n *\r\n * @example\r\n * jsPDF.API.mymethod = function(){\r\n * // 'this' will be ref to internal API object. see jsPDF source\r\n * // , so you can refer to built-in methods like so:\r\n * // this.line(....)\r\n * // this.text(....)\r\n * }\r\n * var pdfdoc = new jsPDF()\r\n * pdfdoc.mymethod() // <- !!!!!!\r\n */\r\njsPDF.API = {\r\n events: []\r\n};\r\n/**\r\n * The version of jsPDF.\r\n * @name version\r\n * @type {string}\r\n * @memberof jsPDF#\r\n */\r\njsPDF.version = \"0.0.0\";\r\n\r\nexport { jsPDF, ShadingPattern, TilingPattern, GState };\r\nexport default jsPDF;\r\n","/* global jsPDF */\n/**\n * @license\n * Copyright (c) 2016 Alexander Weidt,\n * https://github.com/BiggA94\n *\n * Licensed under the MIT License. http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF AcroForm Plugin\n * @module AcroForm\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\nvar jsPDFAPI = jsPDF.API;\nvar scaleFactor = 1;\n\nvar pdfEscape = function(value) {\n return value\n .replace(/\\\\/g, \"\\\\\\\\\")\n .replace(/\\(/g, \"\\\\(\")\n .replace(/\\)/g, \"\\\\)\");\n};\nvar pdfUnescape = function(value) {\n return value\n .replace(/\\\\\\\\/g, \"\\\\\")\n .replace(/\\\\\\(/g, \"(\")\n .replace(/\\\\\\)/g, \")\");\n};\n\nvar f2 = function(number) {\n return number.toFixed(2); // Ie, %.2f\n};\n\nvar f5 = function(number) {\n return number.toFixed(5); // Ie, %.2f\n};\n\njsPDFAPI.__acroform__ = {};\nvar inherit = function(child, parent) {\n child.prototype = Object.create(parent.prototype);\n child.prototype.constructor = child;\n};\n\nvar scale = function(x) {\n return x * scaleFactor;\n};\n\nvar createFormXObject = function(formObject) {\n var xobj = new AcroFormXObject();\n var height = AcroFormAppearance.internal.getHeight(formObject) || 0;\n var width = AcroFormAppearance.internal.getWidth(formObject) || 0;\n xobj.BBox = [0, 0, Number(f2(width)), Number(f2(height))];\n return xobj;\n};\n\n/**\n * Bit-Operations\n */\nvar setBit = (jsPDFAPI.__acroform__.setBit = function(number, bitPosition) {\n number = number || 0;\n bitPosition = bitPosition || 0;\n\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error(\n \"Invalid arguments passed to jsPDF.API.__acroform__.setBit\"\n );\n }\n var bitMask = 1 << bitPosition;\n\n number |= bitMask;\n\n return number;\n});\n\nvar clearBit = (jsPDFAPI.__acroform__.clearBit = function(number, bitPosition) {\n number = number || 0;\n bitPosition = bitPosition || 0;\n\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error(\n \"Invalid arguments passed to jsPDF.API.__acroform__.clearBit\"\n );\n }\n var bitMask = 1 << bitPosition;\n\n number &= ~bitMask;\n\n return number;\n});\n\nvar getBit = (jsPDFAPI.__acroform__.getBit = function(number, bitPosition) {\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error(\n \"Invalid arguments passed to jsPDF.API.__acroform__.getBit\"\n );\n }\n return (number & (1 << bitPosition)) === 0 ? 0 : 1;\n});\n\n/*\n * Ff starts counting the bit position at 1 and not like javascript at 0\n */\nvar getBitForPdf = (jsPDFAPI.__acroform__.getBitForPdf = function(\n number,\n bitPosition\n) {\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error(\n \"Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf\"\n );\n }\n return getBit(number, bitPosition - 1);\n});\n\nvar setBitForPdf = (jsPDFAPI.__acroform__.setBitForPdf = function(\n number,\n bitPosition\n) {\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error(\n \"Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf\"\n );\n }\n return setBit(number, bitPosition - 1);\n});\n\nvar clearBitForPdf = (jsPDFAPI.__acroform__.clearBitForPdf = function(\n number,\n bitPosition\n) {\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error(\n \"Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf\"\n );\n }\n return clearBit(number, bitPosition - 1);\n});\n\nvar calculateCoordinates = (jsPDFAPI.__acroform__.calculateCoordinates = function(\n args,\n scope\n) {\n var getHorizontalCoordinate = scope.internal.getHorizontalCoordinate;\n var getVerticalCoordinate = scope.internal.getVerticalCoordinate;\n var x = args[0];\n var y = args[1];\n var w = args[2];\n var h = args[3];\n\n var coordinates = {};\n\n coordinates.lowerLeft_X = getHorizontalCoordinate(x) || 0;\n coordinates.lowerLeft_Y = getVerticalCoordinate(y + h) || 0;\n coordinates.upperRight_X = getHorizontalCoordinate(x + w) || 0;\n coordinates.upperRight_Y = getVerticalCoordinate(y) || 0;\n\n return [\n Number(f2(coordinates.lowerLeft_X)),\n Number(f2(coordinates.lowerLeft_Y)),\n Number(f2(coordinates.upperRight_X)),\n Number(f2(coordinates.upperRight_Y))\n ];\n});\n\nvar calculateAppearanceStream = function(formObject) {\n if (formObject.appearanceStreamContent) {\n return formObject.appearanceStreamContent;\n }\n\n if (!formObject.V && !formObject.DV) {\n return;\n }\n\n // else calculate it\n\n var stream = [];\n var text = formObject._V || formObject.DV;\n var calcRes = calculateX(formObject, text);\n var fontKey = formObject.scope.internal.getFont(\n formObject.fontName,\n formObject.fontStyle\n ).id;\n\n //PDF 32000-1:2008, page 444\n stream.push(\"/Tx BMC\");\n stream.push(\"q\");\n stream.push(\"BT\"); // Begin Text\n stream.push(formObject.scope.__private__.encodeColorString(formObject.color));\n stream.push(\"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf\");\n stream.push(\"1 0 0 1 0 0 Tm\"); // Transformation Matrix\n stream.push(calcRes.text);\n stream.push(\"ET\"); // End Text\n stream.push(\"Q\");\n stream.push(\"EMC\");\n\n var appearanceStreamContent = createFormXObject(formObject);\n appearanceStreamContent.scope = formObject.scope;\n appearanceStreamContent.stream = stream.join(\"\\n\");\n return appearanceStreamContent;\n};\n\nvar calculateX = function(formObject, text) {\n var maxFontSize =\n formObject.fontSize === 0 ? formObject.maxFontSize : formObject.fontSize;\n var returnValue = {\n text: \"\",\n fontSize: \"\"\n };\n // Remove Brackets\n text = text.substr(0, 1) == \"(\" ? text.substr(1) : text;\n text =\n text.substr(text.length - 1) == \")\"\n ? text.substr(0, text.length - 1)\n : text;\n // split into array of words\n var textSplit = text.split(\" \");\n if (formObject.multiline) {\n textSplit = textSplit.map(word => word.split(\"\\n\"));\n } else {\n textSplit = textSplit.map(word => [word]);\n }\n\n var fontSize = maxFontSize; // The Starting fontSize (The Maximum)\n var lineSpacing = 2;\n var borderPadding = 2;\n\n var height = AcroFormAppearance.internal.getHeight(formObject) || 0;\n height = height < 0 ? -height : height;\n var width = AcroFormAppearance.internal.getWidth(formObject) || 0;\n width = width < 0 ? -width : width;\n\n var isSmallerThanWidth = function(i, lastLine, fontSize) {\n if (i + 1 < textSplit.length) {\n var tmp = lastLine + \" \" + textSplit[i + 1][0];\n var TextWidth = calculateFontSpace(tmp, formObject, fontSize).width;\n var FieldWidth = width - 2 * borderPadding;\n return TextWidth <= FieldWidth;\n } else {\n return false;\n }\n };\n\n fontSize++;\n FontSize: while (fontSize > 0) {\n text = \"\";\n fontSize--;\n var textHeight = calculateFontSpace(\"3\", formObject, fontSize).height;\n var startY = formObject.multiline\n ? height - fontSize\n : (height - textHeight) / 2;\n startY += lineSpacing;\n var startX;\n\n var lastY = startY;\n var firstWordInLine = 0,\n lastWordInLine = 0;\n var lastLength;\n var currWord = 0;\n\n if (fontSize <= 0) {\n // In case, the Text doesn't fit at all\n fontSize = 12;\n text = \"(...) Tj\\n\";\n text +=\n \"% Width of Text: \" +\n calculateFontSpace(text, formObject, fontSize).width +\n \", FieldWidth:\" +\n width +\n \"\\n\";\n break;\n }\n\n var lastLine = \"\";\n var lineCount = 0;\n Line: for (var i = 0; i < textSplit.length; i++) {\n if (textSplit.hasOwnProperty(i)) {\n let isWithNewLine = false;\n if (textSplit[i].length !== 1 && currWord !== textSplit[i].length - 1) {\n if (\n (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n height\n ) {\n continue FontSize;\n }\n\n lastLine += textSplit[i][currWord];\n isWithNewLine = true;\n lastWordInLine = i;\n i--;\n } else {\n lastLine += textSplit[i][currWord] + \" \";\n lastLine =\n lastLine.substr(lastLine.length - 1) == \" \"\n ? lastLine.substr(0, lastLine.length - 1)\n : lastLine;\n var key = parseInt(i);\n var nextLineIsSmaller = isSmallerThanWidth(key, lastLine, fontSize);\n var isLastWord = i >= textSplit.length - 1;\n\n if (nextLineIsSmaller && !isLastWord) {\n lastLine += \" \";\n currWord = 0;\n continue; // Line\n } else if (!nextLineIsSmaller && !isLastWord) {\n if (!formObject.multiline) {\n continue FontSize;\n } else {\n if (\n (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n height\n ) {\n // If the Text is higher than the\n // FieldObject\n continue FontSize;\n }\n lastWordInLine = key;\n // go on\n }\n } else if (isLastWord) {\n lastWordInLine = key;\n } else {\n if (\n formObject.multiline &&\n (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n height\n ) {\n // If the Text is higher than the FieldObject\n continue FontSize;\n }\n }\n }\n // Remove last blank\n\n var line = \"\";\n\n for (var x = firstWordInLine; x <= lastWordInLine; x++) {\n var currLine = textSplit[x];\n if (formObject.multiline) {\n if (x === lastWordInLine) {\n line += currLine[currWord] + \" \";\n currWord = (currWord + 1) % currLine.length;\n continue;\n }\n if (x === firstWordInLine) {\n line += currLine[currLine.length - 1] + \" \";\n continue;\n }\n }\n line += currLine[0] + \" \";\n }\n\n // Remove last blank\n line =\n line.substr(line.length - 1) == \" \"\n ? line.substr(0, line.length - 1)\n : line;\n // lastLength -= blankSpace.width;\n lastLength = calculateFontSpace(line, formObject, fontSize).width;\n\n // Calculate startX\n switch (formObject.textAlign) {\n case \"right\":\n startX = width - lastLength - borderPadding;\n break;\n case \"center\":\n startX = (width - lastLength) / 2;\n break;\n case \"left\":\n default:\n startX = borderPadding;\n break;\n }\n text += f2(startX) + \" \" + f2(lastY) + \" Td\\n\";\n text += \"(\" + pdfEscape(line) + \") Tj\\n\";\n // reset X in PDF\n text += -f2(startX) + \" 0 Td\\n\";\n\n // After a Line, adjust y position\n lastY = -(fontSize + lineSpacing);\n\n // Reset for next iteration step\n lastLength = 0;\n firstWordInLine = isWithNewLine ? lastWordInLine : lastWordInLine + 1;\n lineCount++;\n\n lastLine = \"\";\n continue Line;\n }\n }\n break;\n }\n\n returnValue.text = text;\n returnValue.fontSize = fontSize;\n\n return returnValue;\n};\n\n/**\n * Small workaround for calculating the TextMetric approximately.\n *\n * @param text\n * @param fontsize\n * @returns {TextMetrics} (Has Height and Width)\n */\nvar calculateFontSpace = function(text, formObject, fontSize) {\n var font = formObject.scope.internal.getFont(\n formObject.fontName,\n formObject.fontStyle\n );\n var width =\n formObject.scope.getStringUnitWidth(text, {\n font: font,\n fontSize: parseFloat(fontSize),\n charSpace: 0\n }) * parseFloat(fontSize);\n var height =\n formObject.scope.getStringUnitWidth(\"3\", {\n font: font,\n fontSize: parseFloat(fontSize),\n charSpace: 0\n }) *\n parseFloat(fontSize) *\n 1.5;\n return { height: height, width: width };\n};\n\nvar acroformPluginTemplate = {\n fields: [],\n xForms: [],\n /**\n * acroFormDictionaryRoot contains information about the AcroForm\n * Dictionary 0: The Event-Token, the AcroFormDictionaryCallback has\n * 1: The Object ID of the Root\n */\n acroFormDictionaryRoot: null,\n /**\n * After the PDF gets evaluated, the reference to the root has to be\n * reset, this indicates, whether the root has already been printed\n * out\n */\n printedOut: false,\n internal: null,\n isInitialized: false\n};\n\nvar annotReferenceCallback = function(scope) {\n //set objId to undefined and force it to get a new objId on buildDocument\n scope.internal.acroformPlugin.acroFormDictionaryRoot.objId = undefined;\n var fields = scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields;\n for (var i in fields) {\n if (fields.hasOwnProperty(i)) {\n var formObject = fields[i];\n //set objId to undefined and force it to get a new objId on buildDocument\n formObject.objId = undefined;\n // add Annot Reference!\n if (formObject.hasAnnotation) {\n // If theres an Annotation Widget in the Form Object, put the\n // Reference in the /Annot array\n createAnnotationReference(formObject, scope);\n }\n }\n }\n};\n\nvar putForm = function(formObject) {\n if (formObject.scope.internal.acroformPlugin.printedOut) {\n formObject.scope.internal.acroformPlugin.printedOut = false;\n formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot = null;\n }\n formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(\n formObject\n );\n};\n/**\n * Create the Reference to the widgetAnnotation, so that it gets referenced\n * in the Annot[] int the+ (Requires the Annotation Plugin)\n */\nvar createAnnotationReference = function(object, scope) {\n var options = {\n type: \"reference\",\n object: object\n };\n var findEntry = function(entry) {\n return entry.type === options.type && entry.object === options.object;\n };\n if (\n scope.internal\n .getPageInfo(object.page)\n .pageContext.annotations.find(findEntry) === undefined\n ) {\n scope.internal\n .getPageInfo(object.page)\n .pageContext.annotations.push(options);\n }\n};\n\n// Callbacks\n\nvar putCatalogCallback = function(scope) {\n // Put reference to AcroForm to DocumentCatalog\n if (\n typeof scope.internal.acroformPlugin.acroFormDictionaryRoot !== \"undefined\"\n ) {\n // for safety, shouldn't normally be the case\n scope.internal.write(\n \"/AcroForm \" +\n scope.internal.acroformPlugin.acroFormDictionaryRoot.objId +\n \" \" +\n 0 +\n \" R\"\n );\n } else {\n throw new Error(\"putCatalogCallback: Root missing.\");\n }\n};\n\n/**\n * Adds /Acroform X 0 R to Document Catalog, and creates the AcroForm\n * Dictionary\n */\nvar AcroFormDictionaryCallback = function(scope) {\n // Remove event\n scope.internal.events.unsubscribe(\n scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID\n );\n delete scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID;\n scope.internal.acroformPlugin.printedOut = true;\n};\n\n/**\n * Creates the single Fields and writes them into the Document\n *\n * If fieldArray is set, use the fields that are inside it instead of the\n * fields from the AcroRoot (for the FormXObjects...)\n */\nvar createFieldCallback = function(fieldArray, scope) {\n var standardFields = !fieldArray;\n\n if (!fieldArray) {\n // in case there is no fieldArray specified, we want to print out\n // the Fields of the AcroForm\n // Print out Root\n scope.internal.newObjectDeferredBegin(\n scope.internal.acroformPlugin.acroFormDictionaryRoot.objId,\n true\n );\n scope.internal.acroformPlugin.acroFormDictionaryRoot.putStream();\n }\n\n fieldArray =\n fieldArray || scope.internal.acroformPlugin.acroFormDictionaryRoot.Kids;\n\n for (var i in fieldArray) {\n if (fieldArray.hasOwnProperty(i)) {\n var fieldObject = fieldArray[i];\n var keyValueList = [];\n var oldRect = fieldObject.Rect;\n\n if (fieldObject.Rect) {\n fieldObject.Rect = calculateCoordinates(fieldObject.Rect, scope);\n }\n\n // Start Writing the Object\n scope.internal.newObjectDeferredBegin(fieldObject.objId, true);\n\n fieldObject.DA = AcroFormAppearance.createDefaultAppearanceStream(\n fieldObject\n );\n\n if (\n typeof fieldObject === \"object\" &&\n typeof fieldObject.getKeyValueListForStream === \"function\"\n ) {\n keyValueList = fieldObject.getKeyValueListForStream();\n }\n\n fieldObject.Rect = oldRect;\n\n if (\n fieldObject.hasAppearanceStream &&\n !fieldObject.appearanceStreamContent\n ) {\n // Calculate Appearance\n var appearance = calculateAppearanceStream(fieldObject);\n keyValueList.push({ key: \"AP\", value: \"<>\" });\n\n scope.internal.acroformPlugin.xForms.push(appearance);\n }\n\n // Assume AppearanceStreamContent is a Array with N,R,D (at least\n // one of them!)\n if (fieldObject.appearanceStreamContent) {\n var appearanceStreamString = \"\";\n // Iterate over N,R and D\n for (var k in fieldObject.appearanceStreamContent) {\n if (fieldObject.appearanceStreamContent.hasOwnProperty(k)) {\n var value = fieldObject.appearanceStreamContent[k];\n appearanceStreamString += \"/\" + k + \" \";\n appearanceStreamString += \"<<\";\n if (Object.keys(value).length >= 1 || Array.isArray(value)) {\n // appearanceStream is an Array or Object!\n for (var i in value) {\n if (value.hasOwnProperty(i)) {\n var obj = value[i];\n if (typeof obj === \"function\") {\n // if Function is referenced, call it in order\n // to get the FormXObject\n obj = obj.call(scope, fieldObject);\n }\n appearanceStreamString += \"/\" + i + \" \" + obj + \" \";\n\n // In case the XForm is already used, e.g. OffState\n // of CheckBoxes, don't add it\n if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))\n scope.internal.acroformPlugin.xForms.push(obj);\n }\n }\n } else {\n obj = value;\n if (typeof obj === \"function\") {\n // if Function is referenced, call it in order to\n // get the FormXObject\n obj = obj.call(scope, fieldObject);\n }\n appearanceStreamString += \"/\" + i + \" \" + obj;\n if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))\n scope.internal.acroformPlugin.xForms.push(obj);\n }\n appearanceStreamString += \">>\";\n }\n }\n\n // appearance stream is a normal Object..\n keyValueList.push({\n key: \"AP\",\n value: \"<<\\n\" + appearanceStreamString + \">>\"\n });\n }\n\n scope.internal.putStream({\n additionalKeyValues: keyValueList,\n objectId: fieldObject.objId\n });\n\n scope.internal.out(\"endobj\");\n }\n }\n if (standardFields) {\n createXFormObjectCallback(scope.internal.acroformPlugin.xForms, scope);\n }\n};\n\nvar createXFormObjectCallback = function(fieldArray, scope) {\n for (var i in fieldArray) {\n if (fieldArray.hasOwnProperty(i)) {\n var key = i;\n var fieldObject = fieldArray[i];\n // Start Writing the Object\n scope.internal.newObjectDeferredBegin(fieldObject.objId, true);\n\n if (\n typeof fieldObject === \"object\" &&\n typeof fieldObject.putStream === \"function\"\n ) {\n fieldObject.putStream();\n }\n delete fieldArray[key];\n }\n }\n};\n\nvar initializeAcroForm = function(scope, formObject) {\n formObject.scope = scope;\n if (\n scope.internal !== undefined &&\n (scope.internal.acroformPlugin === undefined ||\n scope.internal.acroformPlugin.isInitialized === false)\n ) {\n AcroFormField.FieldNum = 0;\n scope.internal.acroformPlugin = JSON.parse(\n JSON.stringify(acroformPluginTemplate)\n );\n if (scope.internal.acroformPlugin.acroFormDictionaryRoot) {\n throw new Error(\"Exception while creating AcroformDictionary\");\n }\n scaleFactor = scope.internal.scaleFactor;\n // The Object Number of the AcroForm Dictionary\n scope.internal.acroformPlugin.acroFormDictionaryRoot = new AcroFormDictionary();\n scope.internal.acroformPlugin.acroFormDictionaryRoot.scope = scope;\n\n // add Callback for creating the AcroForm Dictionary\n scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID = scope.internal.events.subscribe(\n \"postPutResources\",\n function() {\n AcroFormDictionaryCallback(scope);\n }\n );\n\n scope.internal.events.subscribe(\"buildDocument\", function() {\n annotReferenceCallback(scope);\n }); // buildDocument\n\n // Register event, that is triggered when the DocumentCatalog is\n // written, in order to add /AcroForm\n\n scope.internal.events.subscribe(\"putCatalog\", function() {\n putCatalogCallback(scope);\n });\n\n // Register event, that creates all Fields\n scope.internal.events.subscribe(\"postPutPages\", function(fieldArray) {\n createFieldCallback(fieldArray, scope);\n });\n\n scope.internal.acroformPlugin.isInitialized = true;\n }\n};\n\n//PDF 32000-1:2008, page 26, 7.3.6\nvar arrayToPdfArray = (jsPDFAPI.__acroform__.arrayToPdfArray = function(\n array,\n objId,\n scope\n) {\n var encryptor = function(data) {\n return data;\n };\n if (Array.isArray(array)) {\n var content = \"[\";\n for (var i = 0; i < array.length; i++) {\n if (i !== 0) {\n content += \" \";\n }\n switch (typeof array[i]) {\n case \"boolean\":\n case \"number\":\n case \"object\":\n content += array[i].toString();\n break;\n case \"string\":\n if (array[i].substr(0, 1) !== \"/\") {\n if (typeof objId !== \"undefined\" && scope)\n encryptor = scope.internal.getEncryptor(objId);\n content += \"(\" + pdfEscape(encryptor(array[i].toString())) + \")\";\n } else {\n content += array[i].toString();\n }\n break;\n }\n }\n content += \"]\";\n return content;\n }\n throw new Error(\n \"Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray\"\n );\n});\nfunction getMatches(string, regex, index) {\n index || (index = 1); // default to the first capturing group\n var matches = [];\n var match;\n while ((match = regex.exec(string))) {\n matches.push(match[index]);\n }\n return matches;\n}\nvar pdfArrayToStringArray = function(array) {\n var result = [];\n if (typeof array === \"string\") {\n result = getMatches(array, /\\((.*?)\\)/g);\n }\n return result;\n};\n\nvar toPdfString = function(string, objId, scope) {\n var encryptor = function(data) {\n return data;\n };\n if (typeof objId !== \"undefined\" && scope)\n encryptor = scope.internal.getEncryptor(objId);\n string = string || \"\";\n string.toString();\n string = \"(\" + pdfEscape(encryptor(string)) + \")\";\n return string;\n};\n\n// ##########################\n// Classes\n// ##########################\n\n/**\n * @class AcroFormPDFObject\n * @classdesc A AcroFormPDFObject\n */\nvar AcroFormPDFObject = function() {\n this._objId = undefined;\n this._scope = undefined;\n\n /**\n * @name AcroFormPDFObject#objId\n * @type {any}\n */\n Object.defineProperty(this, \"objId\", {\n get: function() {\n if (typeof this._objId === \"undefined\") {\n if (typeof this.scope === \"undefined\") {\n return undefined;\n }\n this._objId = this.scope.internal.newObjectDeferred();\n }\n return this._objId;\n },\n set: function(value) {\n this._objId = value;\n }\n });\n Object.defineProperty(this, \"scope\", {\n value: this._scope,\n writable: true\n });\n};\n\n/**\n * @function AcroFormPDFObject.toString\n */\nAcroFormPDFObject.prototype.toString = function() {\n return this.objId + \" 0 R\";\n};\n\nAcroFormPDFObject.prototype.putStream = function() {\n var keyValueList = this.getKeyValueListForStream();\n this.scope.internal.putStream({\n data: this.stream,\n additionalKeyValues: keyValueList,\n objectId: this.objId\n });\n this.scope.internal.out(\"endobj\");\n};\n\n/**\n * Returns an key-value-List of all non-configurable Variables from the Object\n *\n * @name getKeyValueListForStream\n * @returns {string}\n */\nAcroFormPDFObject.prototype.getKeyValueListForStream = function() {\n var keyValueList = [];\n var keys = Object.getOwnPropertyNames(this).filter(function(key) {\n return (\n key != \"content\" &&\n key != \"appearanceStreamContent\" &&\n key != \"scope\" &&\n key != \"objId\" &&\n key.substring(0, 1) != \"_\"\n );\n });\n\n for (var i in keys) {\n if (Object.getOwnPropertyDescriptor(this, keys[i]).configurable === false) {\n var key = keys[i];\n var value = this[key];\n\n if (value) {\n if (Array.isArray(value)) {\n keyValueList.push({\n key: key,\n value: arrayToPdfArray(value, this.objId, this.scope)\n });\n } else if (value instanceof AcroFormPDFObject) {\n // In case it is a reference to another PDFObject,\n // take the reference number\n value.scope = this.scope;\n keyValueList.push({ key: key, value: value.objId + \" 0 R\" });\n } else if (typeof value !== \"function\") {\n keyValueList.push({ key: key, value: value });\n }\n }\n }\n }\n return keyValueList;\n};\n\nvar AcroFormXObject = function() {\n AcroFormPDFObject.call(this);\n\n Object.defineProperty(this, \"Type\", {\n value: \"/XObject\",\n configurable: false,\n writable: true\n });\n\n Object.defineProperty(this, \"Subtype\", {\n value: \"/Form\",\n configurable: false,\n writable: true\n });\n\n Object.defineProperty(this, \"FormType\", {\n value: 1,\n configurable: false,\n writable: true\n });\n\n var _BBox = [];\n Object.defineProperty(this, \"BBox\", {\n configurable: false,\n get: function() {\n return _BBox;\n },\n set: function(value) {\n _BBox = value;\n }\n });\n\n Object.defineProperty(this, \"Resources\", {\n value: \"2 0 R\",\n configurable: false,\n writable: true\n });\n\n var _stream;\n Object.defineProperty(this, \"stream\", {\n enumerable: false,\n configurable: true,\n set: function(value) {\n _stream = value.trim();\n },\n get: function() {\n if (_stream) {\n return _stream;\n } else {\n return null;\n }\n }\n });\n};\n\ninherit(AcroFormXObject, AcroFormPDFObject);\n\nvar AcroFormDictionary = function() {\n AcroFormPDFObject.call(this);\n\n var _Kids = [];\n\n Object.defineProperty(this, \"Kids\", {\n enumerable: false,\n configurable: true,\n get: function() {\n if (_Kids.length > 0) {\n return _Kids;\n } else {\n return undefined;\n }\n }\n });\n Object.defineProperty(this, \"Fields\", {\n enumerable: false,\n configurable: false,\n get: function() {\n return _Kids;\n }\n });\n\n // Default Appearance\n var _DA;\n Object.defineProperty(this, \"DA\", {\n enumerable: false,\n configurable: false,\n get: function() {\n if (!_DA) {\n return undefined;\n }\n var encryptor = function(data) {\n return data;\n };\n if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n return \"(\" + pdfEscape(encryptor(_DA)) + \")\";\n },\n set: function(value) {\n _DA = value;\n }\n });\n};\n\ninherit(AcroFormDictionary, AcroFormPDFObject);\n\n/**\n * The Field Object contains the Variables, that every Field needs\n *\n * @class AcroFormField\n * @classdesc An AcroForm FieldObject\n */\nvar AcroFormField = function() {\n AcroFormPDFObject.call(this);\n\n //Annotation-Flag See Table 165\n var _F = 4;\n Object.defineProperty(this, \"F\", {\n enumerable: false,\n configurable: false,\n get: function() {\n return _F;\n },\n set: function(value) {\n if (!isNaN(value)) {\n _F = value;\n } else {\n throw new Error(\n 'Invalid value \"' + value + '\" for attribute F supplied.'\n );\n }\n }\n });\n\n /**\n * (PDF 1.2) If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of wether is is displayed on the screen.\n * NOTE 2 This can be useful for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page.\n *\n * @name AcroFormField#showWhenPrinted\n * @default true\n * @type {boolean}\n */\n Object.defineProperty(this, \"showWhenPrinted\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(_F, 3));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.F = setBitForPdf(_F, 3);\n } else {\n this.F = clearBitForPdf(_F, 3);\n }\n }\n });\n\n var _Ff = 0;\n Object.defineProperty(this, \"Ff\", {\n enumerable: false,\n configurable: false,\n get: function() {\n return _Ff;\n },\n set: function(value) {\n if (!isNaN(value)) {\n _Ff = value;\n } else {\n throw new Error(\n 'Invalid value \"' + value + '\" for attribute Ff supplied.'\n );\n }\n }\n });\n\n var _Rect = [];\n Object.defineProperty(this, \"Rect\", {\n enumerable: false,\n configurable: false,\n get: function() {\n if (_Rect.length === 0) {\n return undefined;\n }\n return _Rect;\n },\n set: function(value) {\n if (typeof value !== \"undefined\") {\n _Rect = value;\n } else {\n _Rect = [];\n }\n }\n });\n\n /**\n * The x-position of the field.\n *\n * @name AcroFormField#x\n * @default null\n * @type {number}\n */\n Object.defineProperty(this, \"x\", {\n enumerable: true,\n configurable: true,\n get: function() {\n if (!_Rect || isNaN(_Rect[0])) {\n return 0;\n }\n return _Rect[0];\n },\n set: function(value) {\n _Rect[0] = value;\n }\n });\n\n /**\n * The y-position of the field.\n *\n * @name AcroFormField#y\n * @default null\n * @type {number}\n */\n Object.defineProperty(this, \"y\", {\n enumerable: true,\n configurable: true,\n get: function() {\n if (!_Rect || isNaN(_Rect[1])) {\n return 0;\n }\n return _Rect[1];\n },\n set: function(value) {\n _Rect[1] = value;\n }\n });\n\n /**\n * The width of the field.\n *\n * @name AcroFormField#width\n * @default null\n * @type {number}\n */\n Object.defineProperty(this, \"width\", {\n enumerable: true,\n configurable: true,\n get: function() {\n if (!_Rect || isNaN(_Rect[2])) {\n return 0;\n }\n return _Rect[2];\n },\n set: function(value) {\n _Rect[2] = value;\n }\n });\n\n /**\n * The height of the field.\n *\n * @name AcroFormField#height\n * @default null\n * @type {number}\n */\n Object.defineProperty(this, \"height\", {\n enumerable: true,\n configurable: true,\n get: function() {\n if (!_Rect || isNaN(_Rect[3])) {\n return 0;\n }\n return _Rect[3];\n },\n set: function(value) {\n _Rect[3] = value;\n }\n });\n\n var _FT = \"\";\n Object.defineProperty(this, \"FT\", {\n enumerable: true,\n configurable: false,\n get: function() {\n return _FT;\n },\n set: function(value) {\n switch (value) {\n case \"/Btn\":\n case \"/Tx\":\n case \"/Ch\":\n case \"/Sig\":\n _FT = value;\n break;\n default:\n throw new Error(\n 'Invalid value \"' + value + '\" for attribute FT supplied.'\n );\n }\n }\n });\n\n var _T = null;\n\n Object.defineProperty(this, \"T\", {\n enumerable: true,\n configurable: false,\n get: function() {\n if (!_T || _T.length < 1) {\n // In case of a Child from a Radio´Group, you don't need a FieldName\n if (this instanceof AcroFormChildClass) {\n return undefined;\n }\n _T = \"FieldObject\" + AcroFormField.FieldNum++;\n }\n var encryptor = function(data) {\n return data;\n };\n if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n return \"(\" + pdfEscape(encryptor(_T)) + \")\";\n },\n set: function(value) {\n _T = value.toString();\n }\n });\n\n /**\n * (Optional) The partial field name (see 12.7.3.2, “Field Names”).\n *\n * @name AcroFormField#fieldName\n * @default null\n * @type {string}\n */\n Object.defineProperty(this, \"fieldName\", {\n configurable: true,\n enumerable: true,\n get: function() {\n return _T;\n },\n set: function(value) {\n _T = value;\n }\n });\n\n var _fontName = \"helvetica\";\n /**\n * The fontName of the font to be used.\n *\n * @name AcroFormField#fontName\n * @default 'helvetica'\n * @type {string}\n */\n Object.defineProperty(this, \"fontName\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _fontName;\n },\n set: function(value) {\n _fontName = value;\n }\n });\n\n var _fontStyle = \"normal\";\n /**\n * The fontStyle of the font to be used.\n *\n * @name AcroFormField#fontStyle\n * @default 'normal'\n * @type {string}\n */\n Object.defineProperty(this, \"fontStyle\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _fontStyle;\n },\n set: function(value) {\n _fontStyle = value;\n }\n });\n\n var _fontSize = 0;\n /**\n * The fontSize of the font to be used.\n *\n * @name AcroFormField#fontSize\n * @default 0 (for auto)\n * @type {number}\n */\n Object.defineProperty(this, \"fontSize\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _fontSize;\n },\n set: function(value) {\n _fontSize = value;\n }\n });\n\n var _maxFontSize = undefined;\n /**\n * The maximum fontSize of the font to be used.\n *\n * @name AcroFormField#maxFontSize\n * @default 0 (for auto)\n * @type {number}\n */\n Object.defineProperty(this, \"maxFontSize\", {\n enumerable: true,\n configurable: true,\n get: function() {\n if (_maxFontSize === undefined) {\n // use the old default value here - the value is some kind of random as it depends on the scaleFactor (user unit)\n // (\"50\" is transformed to the \"user space\" but then used in \"pdf space\")\n return 50 / scaleFactor;\n } else {\n return _maxFontSize;\n }\n },\n set: function(value) {\n _maxFontSize = value;\n }\n });\n\n var _color = \"black\";\n /**\n * The color of the text\n *\n * @name AcroFormField#color\n * @default 'black'\n * @type {string|rgba}\n */\n Object.defineProperty(this, \"color\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _color;\n },\n set: function(value) {\n _color = value;\n }\n });\n\n var _DA = \"/F1 0 Tf 0 g\";\n // Defines the default appearance (Needed for variable Text)\n Object.defineProperty(this, \"DA\", {\n enumerable: true,\n configurable: false,\n get: function() {\n if (\n !_DA ||\n this instanceof AcroFormChildClass ||\n this instanceof AcroFormTextField\n ) {\n return undefined;\n }\n return toPdfString(_DA, this.objId, this.scope);\n },\n set: function(value) {\n value = value.toString();\n _DA = value;\n }\n });\n\n var _DV = null;\n Object.defineProperty(this, \"DV\", {\n enumerable: false,\n configurable: false,\n get: function() {\n if (!_DV) {\n return undefined;\n }\n if (this instanceof AcroFormButton === false) {\n return toPdfString(_DV, this.objId, this.scope);\n }\n return _DV;\n },\n set: function(value) {\n value = value.toString();\n if (this instanceof AcroFormButton === false) {\n if (value.substr(0, 1) === \"(\") {\n _DV = pdfUnescape(value.substr(1, value.length - 2));\n } else {\n _DV = pdfUnescape(value);\n }\n } else {\n _DV = value;\n }\n }\n });\n\n /**\n * (Optional; inheritable) The default value to which the field reverts when a reset-form action is executed (see 12.7.5.3, “Reset-Form Action”). The format of this value is the same as that of value.\n *\n * @name AcroFormField#defaultValue\n * @default null\n * @type {any}\n */\n Object.defineProperty(this, \"defaultValue\", {\n enumerable: true,\n configurable: true,\n get: function() {\n if (this instanceof AcroFormButton === true) {\n return pdfUnescape(_DV.substr(1, _DV.length - 1));\n } else {\n return _DV;\n }\n },\n set: function(value) {\n value = value.toString();\n if (this instanceof AcroFormButton === true) {\n _DV = \"/\" + value;\n } else {\n _DV = value;\n }\n }\n });\n\n var _V = null;\n Object.defineProperty(this, \"_V\", {\n enumerable: false,\n configurable: false,\n get: function() {\n if (!_V) {\n return undefined;\n }\n return _V;\n },\n set: function(value) {\n this.V = value;\n }\n });\n Object.defineProperty(this, \"V\", {\n enumerable: false,\n configurable: false,\n get: function() {\n if (!_V) {\n return undefined;\n }\n if (this instanceof AcroFormButton === false) {\n return toPdfString(_V, this.objId, this.scope);\n }\n return _V;\n },\n set: function(value) {\n value = value.toString();\n if (this instanceof AcroFormButton === false) {\n if (value.substr(0, 1) === \"(\") {\n _V = pdfUnescape(value.substr(1, value.length - 2));\n } else {\n _V = pdfUnescape(value);\n }\n } else {\n _V = value;\n }\n }\n });\n\n /**\n * (Optional; inheritable) The field’s value, whose format varies depending on the field type. See the descriptions of individual field types for further information.\n *\n * @name AcroFormField#value\n * @default null\n * @type {any}\n */\n Object.defineProperty(this, \"value\", {\n enumerable: true,\n configurable: true,\n get: function() {\n if (this instanceof AcroFormButton === true) {\n return pdfUnescape(_V.substr(1, _V.length - 1));\n } else {\n return _V;\n }\n },\n set: function(value) {\n value = value.toString();\n if (this instanceof AcroFormButton === true) {\n _V = \"/\" + value;\n } else {\n _V = value;\n }\n }\n });\n\n /**\n * Check if field has annotations\n *\n * @name AcroFormField#hasAnnotation\n * @readonly\n * @type {boolean}\n */\n Object.defineProperty(this, \"hasAnnotation\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return this.Rect;\n }\n });\n\n Object.defineProperty(this, \"Type\", {\n enumerable: true,\n configurable: false,\n get: function() {\n return this.hasAnnotation ? \"/Annot\" : null;\n }\n });\n\n Object.defineProperty(this, \"Subtype\", {\n enumerable: true,\n configurable: false,\n get: function() {\n return this.hasAnnotation ? \"/Widget\" : null;\n }\n });\n\n var _hasAppearanceStream = false;\n /**\n * true if field has an appearanceStream\n *\n * @name AcroFormField#hasAppearanceStream\n * @readonly\n * @type {boolean}\n */\n Object.defineProperty(this, \"hasAppearanceStream\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _hasAppearanceStream;\n },\n set: function(value) {\n value = Boolean(value);\n _hasAppearanceStream = value;\n }\n });\n\n /**\n * The page on which the AcroFormField is placed\n *\n * @name AcroFormField#page\n * @type {number}\n */\n var _page;\n Object.defineProperty(this, \"page\", {\n enumerable: true,\n configurable: true,\n get: function() {\n if (!_page) {\n return undefined;\n }\n return _page;\n },\n set: function(value) {\n _page = value;\n }\n });\n\n /**\n * If set, the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database.\n *\n * @name AcroFormField#readOnly\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, \"readOnly\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 1));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 1);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 1);\n }\n }\n });\n\n /**\n * If set, the field shall have a value at the time it is exported by a submitform action (see 12.7.5.2, “Submit-Form Action”).\n *\n * @name AcroFormField#required\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, \"required\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 2));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 2);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 2);\n }\n }\n });\n\n /**\n * If set, the field shall not be exported by a submit-form action (see 12.7.5.2, “Submit-Form Action”)\n *\n * @name AcroFormField#noExport\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, \"noExport\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 3));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 3);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 3);\n }\n }\n });\n\n var _Q = null;\n Object.defineProperty(this, \"Q\", {\n enumerable: true,\n configurable: false,\n get: function() {\n if (_Q === null) {\n return undefined;\n }\n return _Q;\n },\n set: function(value) {\n if ([0, 1, 2].indexOf(value) !== -1) {\n _Q = value;\n } else {\n throw new Error(\n 'Invalid value \"' + value + '\" for attribute Q supplied.'\n );\n }\n }\n });\n\n /**\n * (Optional; inheritable) A code specifying the form of quadding (justification) that shall be used in displaying the text:\n * 'left', 'center', 'right'\n *\n * @name AcroFormField#textAlign\n * @default 'left'\n * @type {string}\n */\n Object.defineProperty(this, \"textAlign\", {\n get: function() {\n var result;\n switch (_Q) {\n case 0:\n default:\n result = \"left\";\n break;\n case 1:\n result = \"center\";\n break;\n case 2:\n result = \"right\";\n break;\n }\n return result;\n },\n configurable: true,\n enumerable: true,\n set: function(value) {\n switch (value) {\n case \"right\":\n case 2:\n _Q = 2;\n break;\n case \"center\":\n case 1:\n _Q = 1;\n break;\n case \"left\":\n case 0:\n default:\n _Q = 0;\n }\n }\n });\n};\n\ninherit(AcroFormField, AcroFormPDFObject);\n\n/**\n * @class AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormChoiceField = function() {\n AcroFormField.call(this);\n // Field Type = Choice Field\n this.FT = \"/Ch\";\n // options\n this.V = \"()\";\n\n this.fontName = \"zapfdingbats\";\n // Top Index\n var _TI = 0;\n\n Object.defineProperty(this, \"TI\", {\n enumerable: true,\n configurable: false,\n get: function() {\n return _TI;\n },\n set: function(value) {\n _TI = value;\n }\n });\n\n /**\n * (Optional) For scrollable list boxes, the top index (the index in the Opt array of the first option visible in the list). Default value: 0.\n *\n * @name AcroFormChoiceField#topIndex\n * @default 0\n * @type {number}\n */\n Object.defineProperty(this, \"topIndex\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _TI;\n },\n set: function(value) {\n _TI = value;\n }\n });\n\n var _Opt = [];\n Object.defineProperty(this, \"Opt\", {\n enumerable: true,\n configurable: false,\n get: function() {\n return arrayToPdfArray(_Opt, this.objId, this.scope);\n },\n set: function(value) {\n _Opt = pdfArrayToStringArray(value);\n }\n });\n\n /**\n * @memberof AcroFormChoiceField\n * @name getOptions\n * @function\n * @instance\n * @returns {array} array of Options\n */\n this.getOptions = function() {\n return _Opt;\n };\n\n /**\n * @memberof AcroFormChoiceField\n * @name setOptions\n * @function\n * @instance\n * @param {array} value\n */\n this.setOptions = function(value) {\n _Opt = value;\n if (this.sort) {\n _Opt.sort();\n }\n };\n\n /**\n * @memberof AcroFormChoiceField\n * @name addOption\n * @function\n * @instance\n * @param {string} value\n */\n this.addOption = function(value) {\n value = value || \"\";\n value = value.toString();\n _Opt.push(value);\n if (this.sort) {\n _Opt.sort();\n }\n };\n\n /**\n * @memberof AcroFormChoiceField\n * @name removeOption\n * @function\n * @instance\n * @param {string} value\n * @param {boolean} allEntries (default: false)\n */\n this.removeOption = function(value, allEntries) {\n allEntries = allEntries || false;\n value = value || \"\";\n value = value.toString();\n\n while (_Opt.indexOf(value) !== -1) {\n _Opt.splice(_Opt.indexOf(value), 1);\n if (allEntries === false) {\n break;\n }\n }\n };\n\n /**\n * If set, the field is a combo box; if clear, the field is a list box.\n *\n * @name AcroFormChoiceField#combo\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, \"combo\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 18));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 18);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 18);\n }\n }\n });\n\n /**\n * If set, the combo box shall include an editable text box as well as a drop-down list; if clear, it shall include only a drop-down list. This flag shall be used only if the Combo flag is set.\n *\n * @name AcroFormChoiceField#edit\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, \"edit\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 19));\n },\n set: function(value) {\n //PDF 32000-1:2008, page 444\n if (this.combo === true) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 19);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 19);\n }\n }\n }\n });\n\n /**\n * If set, the field’s option items shall be sorted alphabetically. This flag is intended for use by writers, not by readers. Conforming readers shall display the options in the order in which they occur in the Opt array (see Table 231).\n *\n * @name AcroFormChoiceField#sort\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, \"sort\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 20));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 20);\n _Opt.sort();\n } else {\n this.Ff = clearBitForPdf(this.Ff, 20);\n }\n }\n });\n\n /**\n * (PDF 1.4) If set, more than one of the field’s option items may be selected simultaneously; if clear, at most one item shall be selected\n *\n * @name AcroFormChoiceField#multiSelect\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, \"multiSelect\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 22));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 22);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 22);\n }\n }\n });\n\n /**\n * (PDF 1.4) If set, text entered in the field shall not be spellchecked. This flag shall not be used unless the Combo and Edit flags are both set.\n *\n * @name AcroFormChoiceField#doNotSpellCheck\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, \"doNotSpellCheck\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 23));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 23);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 23);\n }\n }\n });\n\n /**\n * (PDF 1.5) If set, the new value shall be committed as soon as a selection is made (commonly with the pointing device). In this case, supplying a value for a field involves three actions: selecting the field for fill-in, selecting a choice for the fill-in value, and leaving that field, which finalizes or “commits” the data choice and triggers any actions associated with the entry or changing of this data. If this flag is on, then processing does not wait for leaving the field action to occur, but immediately proceeds to the third step.\n * This option enables applications to perform an action once a selection is made, without requiring the user to exit the field. If clear, the new value is not committed until the user exits the field.\n *\n * @name AcroFormChoiceField#commitOnSelChange\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, \"commitOnSelChange\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 27));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 27);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 27);\n }\n }\n });\n\n this.hasAppearanceStream = false;\n};\ninherit(AcroFormChoiceField, AcroFormField);\n\n/**\n * @class AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormListBox = function() {\n AcroFormChoiceField.call(this);\n this.fontName = \"helvetica\";\n\n //PDF 32000-1:2008, page 444\n this.combo = false;\n};\ninherit(AcroFormListBox, AcroFormChoiceField);\n\n/**\n * @class AcroFormComboBox\n * @extends AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormComboBox = function() {\n AcroFormListBox.call(this);\n this.combo = true;\n};\ninherit(AcroFormComboBox, AcroFormListBox);\n\n/**\n * @class AcroFormEditBox\n * @extends AcroFormComboBox\n * @extends AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormEditBox = function() {\n AcroFormComboBox.call(this);\n this.edit = true;\n};\ninherit(AcroFormEditBox, AcroFormComboBox);\n\n/**\n * @class AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormButton = function() {\n AcroFormField.call(this);\n this.FT = \"/Btn\";\n\n /**\n * (Radio buttons only) If set, exactly one radio button shall be selected at all times; selecting the currently selected button has no effect. If clear, clicking the selected button deselects it, leaving no button selected.\n *\n * @name AcroFormButton#noToggleToOff\n * @type {boolean}\n */\n Object.defineProperty(this, \"noToggleToOff\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 15));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 15);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 15);\n }\n }\n });\n\n /**\n * If set, the field is a set of radio buttons; if clear, the field is a checkbox. This flag may be set only if the Pushbutton flag is clear.\n *\n * @name AcroFormButton#radio\n * @type {boolean}\n */\n Object.defineProperty(this, \"radio\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 16));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 16);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 16);\n }\n }\n });\n\n /**\n * If set, the field is a pushbutton that does not retain a permanent value.\n *\n * @name AcroFormButton#pushButton\n * @type {boolean}\n */\n Object.defineProperty(this, \"pushButton\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 17));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 17);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 17);\n }\n }\n });\n\n /**\n * (PDF 1.5) If set, a group of radio buttons within a radio button field that use the same value for the on state will turn on and off in unison; that is if one is checked, they are all checked. If clear, the buttons are mutually exclusive (the same behavior as HTML radio buttons).\n *\n * @name AcroFormButton#radioIsUnison\n * @type {boolean}\n */\n Object.defineProperty(this, \"radioIsUnison\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 26));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 26);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 26);\n }\n }\n });\n\n var _MK = {};\n Object.defineProperty(this, \"MK\", {\n enumerable: false,\n configurable: false,\n get: function() {\n var encryptor = function(data) {\n return data;\n };\n if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n if (Object.keys(_MK).length !== 0) {\n var result = [];\n result.push(\"<<\");\n var key;\n for (key in _MK) {\n result.push(\"/\" + key + \" (\" + pdfEscape(encryptor(_MK[key])) + \")\");\n }\n result.push(\">>\");\n return result.join(\"\\n\");\n }\n return undefined;\n },\n set: function(value) {\n if (typeof value === \"object\") {\n _MK = value;\n }\n }\n });\n\n /**\n * From the PDF reference:\n * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.\n * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, \"Button Fields\"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, \"Button Fields\") and radio buttons (Radio Buttons in 12.7.4.2, \"Button Fields\").\n *\n * - '8' = Cross,\n * - 'l' = Circle,\n * - '' = nothing\n * @name AcroFormButton#caption\n * @type {string}\n */\n Object.defineProperty(this, \"caption\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _MK.CA || \"\";\n },\n set: function(value) {\n if (typeof value === \"string\") {\n _MK.CA = value;\n }\n }\n });\n\n var _AS;\n Object.defineProperty(this, \"AS\", {\n enumerable: false,\n configurable: false,\n get: function() {\n return _AS;\n },\n set: function(value) {\n _AS = value;\n }\n });\n\n /**\n * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, \"Appearance Streams\")\n *\n * @name AcroFormButton#appearanceState\n * @type {any}\n */\n Object.defineProperty(this, \"appearanceState\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _AS.substr(1, _AS.length - 1);\n },\n set: function(value) {\n _AS = \"/\" + value;\n }\n });\n};\ninherit(AcroFormButton, AcroFormField);\n\n/**\n * @class AcroFormPushButton\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormPushButton = function() {\n AcroFormButton.call(this);\n this.pushButton = true;\n};\ninherit(AcroFormPushButton, AcroFormButton);\n\n/**\n * @class AcroFormRadioButton\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormRadioButton = function() {\n AcroFormButton.call(this);\n this.radio = true;\n this.pushButton = false;\n\n var _Kids = [];\n Object.defineProperty(this, \"Kids\", {\n enumerable: true,\n configurable: false,\n get: function() {\n return _Kids;\n },\n set: function(value) {\n if (typeof value !== \"undefined\") {\n _Kids = value;\n } else {\n _Kids = [];\n }\n }\n });\n};\ninherit(AcroFormRadioButton, AcroFormButton);\n\n/**\n * The Child class of a RadioButton (the radioGroup) -> The single Buttons\n *\n * @class AcroFormChildClass\n * @extends AcroFormField\n * @ignore\n */\nvar AcroFormChildClass = function() {\n AcroFormField.call(this);\n\n var _parent;\n Object.defineProperty(this, \"Parent\", {\n enumerable: false,\n configurable: false,\n get: function() {\n return _parent;\n },\n set: function(value) {\n _parent = value;\n }\n });\n\n var _optionName;\n Object.defineProperty(this, \"optionName\", {\n enumerable: false,\n configurable: true,\n get: function() {\n return _optionName;\n },\n set: function(value) {\n _optionName = value;\n }\n });\n\n var _MK = {};\n Object.defineProperty(this, \"MK\", {\n enumerable: false,\n configurable: false,\n get: function() {\n var encryptor = function(data) {\n return data;\n };\n if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n var result = [];\n result.push(\"<<\");\n var key;\n for (key in _MK) {\n result.push(\"/\" + key + \" (\" + pdfEscape(encryptor(_MK[key])) + \")\");\n }\n result.push(\">>\");\n return result.join(\"\\n\");\n },\n set: function(value) {\n if (typeof value === \"object\") {\n _MK = value;\n }\n }\n });\n\n /**\n * From the PDF reference:\n * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.\n * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, \"Button Fields\"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, \"Button Fields\") and radio buttons (Radio Buttons in 12.7.4.2, \"Button Fields\").\n *\n * - '8' = Cross,\n * - 'l' = Circle,\n * - '' = nothing\n * @name AcroFormButton#caption\n * @type {string}\n */\n Object.defineProperty(this, \"caption\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _MK.CA || \"\";\n },\n set: function(value) {\n if (typeof value === \"string\") {\n _MK.CA = value;\n }\n }\n });\n\n var _AS;\n Object.defineProperty(this, \"AS\", {\n enumerable: false,\n configurable: false,\n get: function() {\n return _AS;\n },\n set: function(value) {\n _AS = value;\n }\n });\n\n /**\n * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, \"Appearance Streams\")\n *\n * @name AcroFormButton#appearanceState\n * @type {any}\n */\n Object.defineProperty(this, \"appearanceState\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _AS.substr(1, _AS.length - 1);\n },\n set: function(value) {\n _AS = \"/\" + value;\n }\n });\n this.caption = \"l\";\n this.appearanceState = \"Off\";\n // todo: set AppearanceType as variable that can be set from the\n // outside...\n this._AppearanceType = AcroFormAppearance.RadioButton.Circle;\n // The Default appearanceType is the Circle\n this.appearanceStreamContent = this._AppearanceType.createAppearanceStream(\n this.optionName\n );\n};\ninherit(AcroFormChildClass, AcroFormField);\n\nAcroFormRadioButton.prototype.setAppearance = function(appearance) {\n if (!(\"createAppearanceStream\" in appearance && \"getCA\" in appearance)) {\n throw new Error(\n \"Couldn't assign Appearance to RadioButton. Appearance was Invalid!\"\n );\n }\n for (var objId in this.Kids) {\n if (this.Kids.hasOwnProperty(objId)) {\n var child = this.Kids[objId];\n child.appearanceStreamContent = appearance.createAppearanceStream(\n child.optionName\n );\n child.caption = appearance.getCA();\n }\n }\n};\n\nAcroFormRadioButton.prototype.createOption = function(name) {\n // Create new Child for RadioGroup\n var child = new AcroFormChildClass();\n child.Parent = this;\n child.optionName = name;\n // Add to Parent\n this.Kids.push(child);\n\n addField.call(this.scope, child);\n\n return child;\n};\n\n/**\n * @class AcroFormCheckBox\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormCheckBox = function() {\n AcroFormButton.call(this);\n\n this.fontName = \"zapfdingbats\";\n this.caption = \"3\";\n this.appearanceState = \"On\";\n this.value = \"On\";\n this.textAlign = \"center\";\n this.appearanceStreamContent = AcroFormAppearance.CheckBox.createAppearanceStream();\n};\ninherit(AcroFormCheckBox, AcroFormButton);\n\n/**\n * @class AcroFormTextField\n * @extends AcroFormField\n */\nvar AcroFormTextField = function() {\n AcroFormField.call(this);\n this.FT = \"/Tx\";\n\n /**\n * If set, the field may contain multiple lines of text; if clear, the field’s text shall be restricted to a single line.\n *\n * @name AcroFormTextField#multiline\n * @type {boolean}\n */\n Object.defineProperty(this, \"multiline\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 13));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 13);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 13);\n }\n }\n });\n\n /**\n * (PDF 1.4) If set, the text entered in the field represents the pathname of a file whose contents shall be submitted as the value of the field.\n *\n * @name AcroFormTextField#fileSelect\n * @type {boolean}\n */\n Object.defineProperty(this, \"fileSelect\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 21));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 21);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 21);\n }\n }\n });\n\n /**\n * (PDF 1.4) If set, text entered in the field shall not be spell-checked.\n *\n * @name AcroFormTextField#doNotSpellCheck\n * @type {boolean}\n */\n Object.defineProperty(this, \"doNotSpellCheck\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 23));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 23);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 23);\n }\n }\n });\n\n /**\n * (PDF 1.4) If set, the field shall not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than fits within its annotation rectangle. Once the field is full, no further text shall be accepted for interactive form filling; for noninteractive form filling, the filler should take care not to add more character than will visibly fit in the defined area.\n *\n * @name AcroFormTextField#doNotScroll\n * @type {boolean}\n */\n Object.defineProperty(this, \"doNotScroll\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 24));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 24);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 24);\n }\n }\n });\n\n /**\n * (PDF 1.5) May be set only if the MaxLen entry is present in the text field dictionary (see Table 229) and if the Multiline, Password, and FileSelect flags are clear. If set, the field shall be automatically divided into as many equally spaced positions, or combs, as the value of MaxLen, and the text is laid out into those combs.\n *\n * @name AcroFormTextField#comb\n * @type {boolean}\n */\n Object.defineProperty(this, \"comb\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 25));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 25);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 25);\n }\n }\n });\n\n /**\n * (PDF 1.5) If set, the value of this field shall be a rich text string (see 12.7.3.4, “Rich Text Strings”). If the field has a value, the RV entry of the field dictionary (Table 222) shall specify the rich text string.\n *\n * @name AcroFormTextField#richText\n * @type {boolean}\n */\n Object.defineProperty(this, \"richText\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 26));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 26);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 26);\n }\n }\n });\n\n var _MaxLen = null;\n Object.defineProperty(this, \"MaxLen\", {\n enumerable: true,\n configurable: false,\n get: function() {\n return _MaxLen;\n },\n set: function(value) {\n _MaxLen = value;\n }\n });\n\n /**\n * (Optional; inheritable) The maximum length of the field’s text, in characters.\n *\n * @name AcroFormTextField#maxLength\n * @type {number}\n */\n Object.defineProperty(this, \"maxLength\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return _MaxLen;\n },\n set: function(value) {\n if (Number.isInteger(value)) {\n _MaxLen = value;\n }\n }\n });\n\n Object.defineProperty(this, \"hasAppearanceStream\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return this.V || this.DV;\n }\n });\n};\ninherit(AcroFormTextField, AcroFormField);\n\n/**\n * @class AcroFormPasswordField\n * @extends AcroFormTextField\n * @extends AcroFormField\n */\nvar AcroFormPasswordField = function() {\n AcroFormTextField.call(this);\n\n /**\n * If set, the field is intended for entering a secure password that should not be echoed visibly to the screen. Characters typed from the keyboard shall instead be echoed in some unreadable form, such as asterisks or bullet characters.\n * NOTE To protect password confidentiality, readers should never store the value of the text field in the PDF file if this flag is set.\n *\n * @name AcroFormTextField#password\n * @type {boolean}\n */\n Object.defineProperty(this, \"password\", {\n enumerable: true,\n configurable: true,\n get: function() {\n return Boolean(getBitForPdf(this.Ff, 14));\n },\n set: function(value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 14);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 14);\n }\n }\n });\n this.password = true;\n};\ninherit(AcroFormPasswordField, AcroFormTextField);\n\n// Contains Methods for creating standard appearances\nvar AcroFormAppearance = {\n CheckBox: {\n createAppearanceStream: function() {\n var appearance = {\n N: {\n On: AcroFormAppearance.CheckBox.YesNormal\n },\n D: {\n On: AcroFormAppearance.CheckBox.YesPushDown,\n Off: AcroFormAppearance.CheckBox.OffPushDown\n }\n };\n\n return appearance;\n },\n /**\n * Returns the standard On Appearance for a CheckBox\n *\n * @returns {AcroFormXObject}\n */\n YesPushDown: function(formObject) {\n var xobj = createFormXObject(formObject);\n xobj.scope = formObject.scope;\n var stream = [];\n var fontKey = formObject.scope.internal.getFont(\n formObject.fontName,\n formObject.fontStyle\n ).id;\n var encodedColor = formObject.scope.__private__.encodeColorString(\n formObject.color\n );\n var calcRes = calculateX(formObject, formObject.caption);\n stream.push(\"0.749023 g\");\n stream.push(\n \"0 0 \" +\n f2(AcroFormAppearance.internal.getWidth(formObject)) +\n \" \" +\n f2(AcroFormAppearance.internal.getHeight(formObject)) +\n \" re\"\n );\n stream.push(\"f\");\n stream.push(\"BMC\");\n stream.push(\"q\");\n stream.push(\"0 0 1 rg\");\n stream.push(\n \"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf \" + encodedColor\n );\n stream.push(\"BT\");\n stream.push(calcRes.text);\n stream.push(\"ET\");\n stream.push(\"Q\");\n stream.push(\"EMC\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n\n YesNormal: function(formObject) {\n var xobj = createFormXObject(formObject);\n xobj.scope = formObject.scope;\n var fontKey = formObject.scope.internal.getFont(\n formObject.fontName,\n formObject.fontStyle\n ).id;\n var encodedColor = formObject.scope.__private__.encodeColorString(\n formObject.color\n );\n var stream = [];\n var height = AcroFormAppearance.internal.getHeight(formObject);\n var width = AcroFormAppearance.internal.getWidth(formObject);\n var calcRes = calculateX(formObject, formObject.caption);\n stream.push(\"1 g\");\n stream.push(\"0 0 \" + f2(width) + \" \" + f2(height) + \" re\");\n stream.push(\"f\");\n stream.push(\"q\");\n stream.push(\"0 0 1 rg\");\n stream.push(\"0 0 \" + f2(width - 1) + \" \" + f2(height - 1) + \" re\");\n stream.push(\"W\");\n stream.push(\"n\");\n stream.push(\"0 g\");\n stream.push(\"BT\");\n stream.push(\n \"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf \" + encodedColor\n );\n stream.push(calcRes.text);\n stream.push(\"ET\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n\n /**\n * Returns the standard Off Appearance for a CheckBox\n *\n * @returns {AcroFormXObject}\n */\n OffPushDown: function(formObject) {\n var xobj = createFormXObject(formObject);\n xobj.scope = formObject.scope;\n var stream = [];\n stream.push(\"0.749023 g\");\n stream.push(\n \"0 0 \" +\n f2(AcroFormAppearance.internal.getWidth(formObject)) +\n \" \" +\n f2(AcroFormAppearance.internal.getHeight(formObject)) +\n \" re\"\n );\n stream.push(\"f\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n }\n },\n\n RadioButton: {\n Circle: {\n createAppearanceStream: function(name) {\n var appearanceStreamContent = {\n D: {\n Off: AcroFormAppearance.RadioButton.Circle.OffPushDown\n },\n N: {}\n };\n appearanceStreamContent.N[name] =\n AcroFormAppearance.RadioButton.Circle.YesNormal;\n appearanceStreamContent.D[name] =\n AcroFormAppearance.RadioButton.Circle.YesPushDown;\n return appearanceStreamContent;\n },\n getCA: function() {\n return \"l\";\n },\n\n YesNormal: function(formObject) {\n var xobj = createFormXObject(formObject);\n xobj.scope = formObject.scope;\n var stream = [];\n // Make the Radius of the Circle relative to min(height, width) of formObject\n var DotRadius =\n AcroFormAppearance.internal.getWidth(formObject) <=\n AcroFormAppearance.internal.getHeight(formObject)\n ? AcroFormAppearance.internal.getWidth(formObject) / 4\n : AcroFormAppearance.internal.getHeight(formObject) / 4;\n // The Borderpadding...\n DotRadius = Number((DotRadius * 0.9).toFixed(5));\n var c = AcroFormAppearance.internal.Bezier_C;\n var DotRadiusBezier = Number((DotRadius * c).toFixed(5));\n /*\n * The Following is a Circle created with Bezier-Curves.\n */\n stream.push(\"q\");\n stream.push(\n \"1 0 0 1 \" +\n f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n \" \" +\n f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n \" cm\"\n );\n stream.push(DotRadius + \" 0 m\");\n stream.push(\n DotRadius +\n \" \" +\n DotRadiusBezier +\n \" \" +\n DotRadiusBezier +\n \" \" +\n DotRadius +\n \" 0 \" +\n DotRadius +\n \" c\"\n );\n stream.push(\n \"-\" +\n DotRadiusBezier +\n \" \" +\n DotRadius +\n \" -\" +\n DotRadius +\n \" \" +\n DotRadiusBezier +\n \" -\" +\n DotRadius +\n \" 0 c\"\n );\n stream.push(\n \"-\" +\n DotRadius +\n \" -\" +\n DotRadiusBezier +\n \" -\" +\n DotRadiusBezier +\n \" -\" +\n DotRadius +\n \" 0 -\" +\n DotRadius +\n \" c\"\n );\n stream.push(\n DotRadiusBezier +\n \" -\" +\n DotRadius +\n \" \" +\n DotRadius +\n \" -\" +\n DotRadiusBezier +\n \" \" +\n DotRadius +\n \" 0 c\"\n );\n stream.push(\"f\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n YesPushDown: function(formObject) {\n var xobj = createFormXObject(formObject);\n xobj.scope = formObject.scope;\n var stream = [];\n var DotRadius =\n AcroFormAppearance.internal.getWidth(formObject) <=\n AcroFormAppearance.internal.getHeight(formObject)\n ? AcroFormAppearance.internal.getWidth(formObject) / 4\n : AcroFormAppearance.internal.getHeight(formObject) / 4;\n // The Borderpadding...\n DotRadius = Number((DotRadius * 0.9).toFixed(5));\n // Save results for later use; no need to waste\n // processor ticks on doing math\n var k = Number((DotRadius * 2).toFixed(5));\n var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n var dc = Number(\n (DotRadius * AcroFormAppearance.internal.Bezier_C).toFixed(5)\n );\n\n stream.push(\"0.749023 g\");\n stream.push(\"q\");\n stream.push(\n \"1 0 0 1 \" +\n f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n \" \" +\n f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n \" cm\"\n );\n stream.push(k + \" 0 m\");\n stream.push(k + \" \" + kc + \" \" + kc + \" \" + k + \" 0 \" + k + \" c\");\n stream.push(\n \"-\" + kc + \" \" + k + \" -\" + k + \" \" + kc + \" -\" + k + \" 0 c\"\n );\n stream.push(\n \"-\" + k + \" -\" + kc + \" -\" + kc + \" -\" + k + \" 0 -\" + k + \" c\"\n );\n stream.push(kc + \" -\" + k + \" \" + k + \" -\" + kc + \" \" + k + \" 0 c\");\n stream.push(\"f\");\n stream.push(\"Q\");\n stream.push(\"0 g\");\n stream.push(\"q\");\n stream.push(\n \"1 0 0 1 \" +\n f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n \" \" +\n f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n \" cm\"\n );\n stream.push(DotRadius + \" 0 m\");\n stream.push(\n \"\" +\n DotRadius +\n \" \" +\n dc +\n \" \" +\n dc +\n \" \" +\n DotRadius +\n \" 0 \" +\n DotRadius +\n \" c\"\n );\n stream.push(\n \"-\" +\n dc +\n \" \" +\n DotRadius +\n \" -\" +\n DotRadius +\n \" \" +\n dc +\n \" -\" +\n DotRadius +\n \" 0 c\"\n );\n stream.push(\n \"-\" +\n DotRadius +\n \" -\" +\n dc +\n \" -\" +\n dc +\n \" -\" +\n DotRadius +\n \" 0 -\" +\n DotRadius +\n \" c\"\n );\n stream.push(\n dc +\n \" -\" +\n DotRadius +\n \" \" +\n DotRadius +\n \" -\" +\n dc +\n \" \" +\n DotRadius +\n \" 0 c\"\n );\n stream.push(\"f\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n OffPushDown: function(formObject) {\n var xobj = createFormXObject(formObject);\n xobj.scope = formObject.scope;\n var stream = [];\n var DotRadius =\n AcroFormAppearance.internal.getWidth(formObject) <=\n AcroFormAppearance.internal.getHeight(formObject)\n ? AcroFormAppearance.internal.getWidth(formObject) / 4\n : AcroFormAppearance.internal.getHeight(formObject) / 4;\n // The Borderpadding...\n DotRadius = Number((DotRadius * 0.9).toFixed(5));\n // Save results for later use; no need to waste\n // processor ticks on doing math\n var k = Number((DotRadius * 2).toFixed(5));\n var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n\n stream.push(\"0.749023 g\");\n stream.push(\"q\");\n stream.push(\n \"1 0 0 1 \" +\n f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n \" \" +\n f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n \" cm\"\n );\n stream.push(k + \" 0 m\");\n stream.push(k + \" \" + kc + \" \" + kc + \" \" + k + \" 0 \" + k + \" c\");\n stream.push(\n \"-\" + kc + \" \" + k + \" -\" + k + \" \" + kc + \" -\" + k + \" 0 c\"\n );\n stream.push(\n \"-\" + k + \" -\" + kc + \" -\" + kc + \" -\" + k + \" 0 -\" + k + \" c\"\n );\n stream.push(kc + \" -\" + k + \" \" + k + \" -\" + kc + \" \" + k + \" 0 c\");\n stream.push(\"f\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n }\n },\n\n Cross: {\n /**\n * Creates the Actual AppearanceDictionary-References\n *\n * @param {string} name\n * @returns {Object}\n * @ignore\n */\n createAppearanceStream: function(name) {\n var appearanceStreamContent = {\n D: {\n Off: AcroFormAppearance.RadioButton.Cross.OffPushDown\n },\n N: {}\n };\n appearanceStreamContent.N[name] =\n AcroFormAppearance.RadioButton.Cross.YesNormal;\n appearanceStreamContent.D[name] =\n AcroFormAppearance.RadioButton.Cross.YesPushDown;\n return appearanceStreamContent;\n },\n getCA: function() {\n return \"8\";\n },\n\n YesNormal: function(formObject) {\n var xobj = createFormXObject(formObject);\n xobj.scope = formObject.scope;\n var stream = [];\n var cross = AcroFormAppearance.internal.calculateCross(formObject);\n stream.push(\"q\");\n stream.push(\n \"1 1 \" +\n f2(AcroFormAppearance.internal.getWidth(formObject) - 2) +\n \" \" +\n f2(AcroFormAppearance.internal.getHeight(formObject) - 2) +\n \" re\"\n );\n stream.push(\"W\");\n stream.push(\"n\");\n stream.push(f2(cross.x1.x) + \" \" + f2(cross.x1.y) + \" m\");\n stream.push(f2(cross.x2.x) + \" \" + f2(cross.x2.y) + \" l\");\n stream.push(f2(cross.x4.x) + \" \" + f2(cross.x4.y) + \" m\");\n stream.push(f2(cross.x3.x) + \" \" + f2(cross.x3.y) + \" l\");\n stream.push(\"s\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n YesPushDown: function(formObject) {\n var xobj = createFormXObject(formObject);\n xobj.scope = formObject.scope;\n var cross = AcroFormAppearance.internal.calculateCross(formObject);\n var stream = [];\n stream.push(\"0.749023 g\");\n stream.push(\n \"0 0 \" +\n f2(AcroFormAppearance.internal.getWidth(formObject)) +\n \" \" +\n f2(AcroFormAppearance.internal.getHeight(formObject)) +\n \" re\"\n );\n stream.push(\"f\");\n stream.push(\"q\");\n stream.push(\n \"1 1 \" +\n f2(AcroFormAppearance.internal.getWidth(formObject) - 2) +\n \" \" +\n f2(AcroFormAppearance.internal.getHeight(formObject) - 2) +\n \" re\"\n );\n stream.push(\"W\");\n stream.push(\"n\");\n stream.push(f2(cross.x1.x) + \" \" + f2(cross.x1.y) + \" m\");\n stream.push(f2(cross.x2.x) + \" \" + f2(cross.x2.y) + \" l\");\n stream.push(f2(cross.x4.x) + \" \" + f2(cross.x4.y) + \" m\");\n stream.push(f2(cross.x3.x) + \" \" + f2(cross.x3.y) + \" l\");\n stream.push(\"s\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n OffPushDown: function(formObject) {\n var xobj = createFormXObject(formObject);\n xobj.scope = formObject.scope;\n var stream = [];\n stream.push(\"0.749023 g\");\n stream.push(\n \"0 0 \" +\n f2(AcroFormAppearance.internal.getWidth(formObject)) +\n \" \" +\n f2(AcroFormAppearance.internal.getHeight(formObject)) +\n \" re\"\n );\n stream.push(\"f\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n }\n }\n },\n\n /**\n * Returns the standard Appearance\n *\n * @returns {AcroFormXObject}\n */\n createDefaultAppearanceStream: function(formObject) {\n // Set Helvetica to Standard Font (size: auto)\n // Color: Black\n var fontKey = formObject.scope.internal.getFont(\n formObject.fontName,\n formObject.fontStyle\n ).id;\n var encodedColor = formObject.scope.__private__.encodeColorString(\n formObject.color\n );\n var fontSize = formObject.fontSize;\n var result = \"/\" + fontKey + \" \" + fontSize + \" Tf \" + encodedColor;\n return result;\n }\n};\n\nAcroFormAppearance.internal = {\n Bezier_C: 0.551915024494,\n\n calculateCross: function(formObject) {\n var width = AcroFormAppearance.internal.getWidth(formObject);\n var height = AcroFormAppearance.internal.getHeight(formObject);\n var a = Math.min(width, height);\n\n var cross = {\n x1: {\n // upperLeft\n x: (width - a) / 2,\n y: (height - a) / 2 + a // height - borderPadding\n },\n x2: {\n // lowerRight\n x: (width - a) / 2 + a,\n y: (height - a) / 2 // borderPadding\n },\n x3: {\n // lowerLeft\n x: (width - a) / 2,\n y: (height - a) / 2 // borderPadding\n },\n x4: {\n // upperRight\n x: (width - a) / 2 + a,\n y: (height - a) / 2 + a // height - borderPadding\n }\n };\n\n return cross;\n }\n};\nAcroFormAppearance.internal.getWidth = function(formObject) {\n var result = 0;\n if (typeof formObject === \"object\") {\n result = scale(formObject.Rect[2]);\n }\n return result;\n};\nAcroFormAppearance.internal.getHeight = function(formObject) {\n var result = 0;\n if (typeof formObject === \"object\") {\n result = scale(formObject.Rect[3]);\n }\n return result;\n};\n\n// Public:\n\n/**\n * Add an AcroForm-Field to the jsPDF-instance\n *\n * @name addField\n * @function\n * @instance\n * @param {Object} fieldObject\n * @returns {jsPDF}\n */\nvar addField = (jsPDFAPI.addField = function(fieldObject) {\n initializeAcroForm(this, fieldObject);\n\n if (fieldObject instanceof AcroFormField) {\n putForm(fieldObject);\n } else {\n throw new Error(\"Invalid argument passed to jsPDF.addField.\");\n }\n fieldObject.page = fieldObject.scope.internal.getCurrentPageInfo().pageNumber;\n return this;\n});\n\njsPDFAPI.AcroFormChoiceField = AcroFormChoiceField;\njsPDFAPI.AcroFormListBox = AcroFormListBox;\njsPDFAPI.AcroFormComboBox = AcroFormComboBox;\njsPDFAPI.AcroFormEditBox = AcroFormEditBox;\njsPDFAPI.AcroFormButton = AcroFormButton;\njsPDFAPI.AcroFormPushButton = AcroFormPushButton;\njsPDFAPI.AcroFormRadioButton = AcroFormRadioButton;\njsPDFAPI.AcroFormCheckBox = AcroFormCheckBox;\njsPDFAPI.AcroFormTextField = AcroFormTextField;\njsPDFAPI.AcroFormPasswordField = AcroFormPasswordField;\njsPDFAPI.AcroFormAppearance = AcroFormAppearance;\n\njsPDFAPI.AcroForm = {\n ChoiceField: AcroFormChoiceField,\n ListBox: AcroFormListBox,\n ComboBox: AcroFormComboBox,\n EditBox: AcroFormEditBox,\n Button: AcroFormButton,\n PushButton: AcroFormPushButton,\n RadioButton: AcroFormRadioButton,\n CheckBox: AcroFormCheckBox,\n TextField: AcroFormTextField,\n PasswordField: AcroFormPasswordField,\n Appearance: AcroFormAppearance\n};\n\njsPDF.AcroForm = {\n ChoiceField: AcroFormChoiceField,\n ListBox: AcroFormListBox,\n ComboBox: AcroFormComboBox,\n EditBox: AcroFormEditBox,\n Button: AcroFormButton,\n PushButton: AcroFormPushButton,\n RadioButton: AcroFormRadioButton,\n CheckBox: AcroFormCheckBox,\n TextField: AcroFormTextField,\n PasswordField: AcroFormPasswordField,\n Appearance: AcroFormAppearance\n};\n\nvar AcroForm = jsPDF.AcroForm;\n\nexport {\n AcroForm,\n AcroFormChoiceField,\n AcroFormListBox,\n AcroFormComboBox,\n AcroFormEditBox,\n AcroFormButton,\n AcroFormPushButton,\n AcroFormRadioButton,\n AcroFormCheckBox,\n AcroFormTextField,\n AcroFormPasswordField,\n AcroFormAppearance\n};\n","function toLookup(arr) {\n return arr.reduce(function(lookup, name, index) {\n lookup[name] = index;\n\n return lookup;\n }, {});\n}\n\nvar fontStyleOrder = {\n italic: [\"italic\", \"oblique\", \"normal\"],\n oblique: [\"oblique\", \"italic\", \"normal\"],\n normal: [\"normal\", \"oblique\", \"italic\"]\n};\n\nvar fontStretchOrder = [\n \"ultra-condensed\",\n \"extra-condensed\",\n \"condensed\",\n \"semi-condensed\",\n \"normal\",\n \"semi-expanded\",\n \"expanded\",\n \"extra-expanded\",\n \"ultra-expanded\"\n];\n\n// For a given font-stretch value, we need to know where to start our search\n// from in the fontStretchOrder list.\nvar fontStretchLookup = toLookup(fontStretchOrder);\n\nvar fontWeights = [100, 200, 300, 400, 500, 600, 700, 800, 900];\nvar fontWeightsLookup = toLookup(fontWeights);\n\nfunction normalizeFontStretch(stretch) {\n stretch = stretch || \"normal\";\n\n return typeof fontStretchLookup[stretch] === \"number\" ? stretch : \"normal\";\n}\n\nfunction normalizeFontStyle(style) {\n style = style || \"normal\";\n\n return fontStyleOrder[style] ? style : \"normal\";\n}\n\nfunction normalizeFontWeight(weight) {\n if (!weight) {\n return 400;\n }\n\n if (typeof weight === \"number\") {\n // Ignore values which aren't valid font-weights.\n return weight >= 100 && weight <= 900 && weight % 100 === 0 ? weight : 400;\n }\n\n if (/^\\d00$/.test(weight)) {\n return parseInt(weight);\n }\n\n switch (weight) {\n case \"bold\":\n return 700;\n\n case \"normal\":\n default:\n return 400;\n }\n}\n\nexport function normalizeFontFace(fontFace) {\n var family = fontFace.family.replace(/\"|'/g, \"\").toLowerCase();\n\n var style = normalizeFontStyle(fontFace.style);\n var weight = normalizeFontWeight(fontFace.weight);\n var stretch = normalizeFontStretch(fontFace.stretch);\n\n return {\n family: family,\n style: style,\n weight: weight,\n stretch: stretch,\n src: fontFace.src || [],\n\n // The ref property maps this font-face to the font\n // added by the .addFont() method.\n ref: fontFace.ref || {\n name: family,\n style: [stretch, style, weight].join(\" \")\n }\n };\n}\n\n/**\n * Turns a list of font-faces into a map, for easier lookup when resolving\n * fonts.\n * @private\n */\nexport function buildFontFaceMap(fontFaces) {\n var map = {};\n\n for (var i = 0; i < fontFaces.length; ++i) {\n var normalized = normalizeFontFace(fontFaces[i]);\n\n var name = normalized.family;\n var stretch = normalized.stretch;\n var style = normalized.style;\n var weight = normalized.weight;\n\n map[name] = map[name] || {};\n\n map[name][stretch] = map[name][stretch] || {};\n map[name][stretch][style] = map[name][stretch][style] || {};\n map[name][stretch][style][weight] = normalized;\n }\n\n return map;\n}\n\n/**\n * Searches a map of stretches, weights, etc. in the given direction and\n * then, if no match has been found, in the opposite directions.\n *\n * @param {Object.} matchingSet A map of the various font variations.\n * @param {any[]} order The order of the different variations\n * @param {number} pivot The starting point of the search in the order list.\n * @param {number} dir The initial direction of the search (desc = -1, asc = 1)\n * @private\n */\n\nfunction searchFromPivot(matchingSet, order, pivot, dir) {\n var i;\n\n for (i = pivot; i >= 0 && i < order.length; i += dir) {\n if (matchingSet[order[i]]) {\n return matchingSet[order[i]];\n }\n }\n\n for (i = pivot; i >= 0 && i < order.length; i -= dir) {\n if (matchingSet[order[i]]) {\n return matchingSet[order[i]];\n }\n }\n}\n\nfunction resolveFontStretch(stretch, matchingSet) {\n if (matchingSet[stretch]) {\n return matchingSet[stretch];\n }\n\n var pivot = fontStretchLookup[stretch];\n\n // If the font-stretch value is normal or more condensed, we want to\n // start with a descending search, otherwise we should do ascending.\n var dir = pivot <= fontStretchLookup[\"normal\"] ? -1 : 1;\n var match = searchFromPivot(matchingSet, fontStretchOrder, pivot, dir);\n\n if (!match) {\n // Since a font-family cannot exist without having at least one stretch value\n // we should never reach this point.\n throw new Error(\n \"Could not find a matching font-stretch value for \" + stretch\n );\n }\n\n return match;\n}\n\nfunction resolveFontStyle(fontStyle, matchingSet) {\n if (matchingSet[fontStyle]) {\n return matchingSet[fontStyle];\n }\n\n var ordering = fontStyleOrder[fontStyle];\n\n for (var i = 0; i < ordering.length; ++i) {\n if (matchingSet[ordering[i]]) {\n return matchingSet[ordering[i]];\n }\n }\n\n // Since a font-family cannot exist without having at least one style value\n // we should never reach this point.\n throw new Error(\"Could not find a matching font-style for \" + fontStyle);\n}\n\nfunction resolveFontWeight(weight, matchingSet) {\n if (matchingSet[weight]) {\n return matchingSet[weight];\n }\n\n if (weight === 400 && matchingSet[500]) {\n return matchingSet[500];\n }\n\n if (weight === 500 && matchingSet[400]) {\n return matchingSet[400];\n }\n\n var pivot = fontWeightsLookup[weight];\n\n // If the font-stretch value is normal or more condensed, we want to\n // start with a descending search, otherwise we should do ascending.\n var dir = weight < 400 ? -1 : 1;\n var match = searchFromPivot(matchingSet, fontWeights, pivot, dir);\n\n if (!match) {\n // Since a font-family cannot exist without having at least one stretch value\n // we should never reach this point.\n throw new Error(\n \"Could not find a matching font-weight for value \" + weight\n );\n }\n\n return match;\n}\n\nvar defaultGenericFontFamilies = {\n \"sans-serif\": \"helvetica\",\n fixed: \"courier\",\n monospace: \"courier\",\n terminal: \"courier\",\n cursive: \"times\",\n fantasy: \"times\",\n serif: \"times\"\n};\n\nvar systemFonts = {\n caption: \"times\",\n icon: \"times\",\n menu: \"times\",\n \"message-box\": \"times\",\n \"small-caption\": \"times\",\n \"status-bar\": \"times\"\n};\n\nfunction ruleToString(rule) {\n return [rule.stretch, rule.style, rule.weight, rule.family].join(\" \");\n}\n\nexport function resolveFontFace(fontFaceMap, rules, opts) {\n opts = opts || {};\n\n var defaultFontFamily = opts.defaultFontFamily || \"times\";\n var genericFontFamilies = Object.assign(\n {},\n defaultGenericFontFamilies,\n opts.genericFontFamilies || {}\n );\n\n var rule = null;\n var matches = null;\n\n for (var i = 0; i < rules.length; ++i) {\n rule = normalizeFontFace(rules[i]);\n\n if (genericFontFamilies[rule.family]) {\n rule.family = genericFontFamilies[rule.family];\n }\n\n if (fontFaceMap.hasOwnProperty(rule.family)) {\n matches = fontFaceMap[rule.family];\n\n break;\n }\n }\n\n // Always fallback to a known font family.\n matches = matches || fontFaceMap[defaultFontFamily];\n\n if (!matches) {\n // At this point we should definitiely have a font family, but if we\n // don't there is something wrong with our configuration\n throw new Error(\n \"Could not find a font-family for the rule '\" +\n ruleToString(rule) +\n \"' and default family '\" +\n defaultFontFamily +\n \"'.\"\n );\n }\n\n matches = resolveFontStretch(rule.stretch, matches);\n matches = resolveFontStyle(rule.style, matches);\n matches = resolveFontWeight(rule.weight, matches);\n\n if (!matches) {\n // We should've fount\n throw new Error(\n \"Failed to resolve a font for the rule '\" + ruleToString(rule) + \"'.\"\n );\n }\n\n return matches;\n}\n\n/**\n * Builds a style id for use with the addFont() method.\n * @param {FontFace} font\n * @private\n */\nexport function toStyleName(font) {\n return [font.weight, font.style, font.stretch].join(\" \");\n}\n\nfunction eatWhiteSpace(input) {\n return input.trimLeft();\n}\n\nfunction parseQuotedFontFamily(input, quote) {\n var index = 0;\n\n while (index < input.length) {\n var current = input.charAt(index);\n\n if (current === quote) {\n return [input.substring(0, index), input.substring(index + 1)];\n }\n\n index += 1;\n }\n\n // Unexpected end of input\n return null;\n}\n\nfunction parseNonQuotedFontFamily(input) {\n // It implements part of the identifier parser here: https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n //\n // NOTE: This parser pretty much ignores escaped identifiers and that there is a thing called unicode.\n //\n // Breakdown of regexp:\n // -[a-z_] - when identifier starts with a hyphen, you're not allowed to have another hyphen or a digit\n // [a-z_] - allow a-z and underscore at beginning of input\n // [a-z0-9_-]* - after that, anything goes\n var match = input.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);\n\n // non quoted value contains illegal characters\n if (match === null) {\n return null;\n }\n\n return [match[0], input.substring(match[0].length)];\n}\n\nvar defaultFont = [\"times\"];\n\nexport function parseFontFamily(input) {\n var result = [];\n var ch, parsed;\n var remaining = input.trim();\n\n if (remaining === \"\") {\n return defaultFont;\n }\n\n if (remaining in systemFonts) {\n return [systemFonts[remaining]];\n }\n\n while (remaining !== \"\") {\n parsed = null;\n remaining = eatWhiteSpace(remaining);\n ch = remaining.charAt(0);\n\n switch (ch) {\n case '\"':\n case \"'\":\n parsed = parseQuotedFontFamily(remaining.substring(1), ch);\n break;\n\n default:\n parsed = parseNonQuotedFontFamily(remaining);\n break;\n }\n\n if (parsed === null) {\n return defaultFont;\n }\n\n result.push(parsed[0]);\n\n remaining = eatWhiteSpace(parsed[1]);\n\n // We expect end of input or a comma separator here\n if (remaining !== \"\" && remaining.charAt(0) !== \",\") {\n return defaultFont;\n }\n\n remaining = remaining.replace(/^,/, \"\");\n }\n\n return result;\n}\n","/** @license\n * jsPDF addImage plugin\n * Copyright (c) 2012 Jason Siefken, https://github.com/siefkenj/\n * 2013 Chris Dowling, https://github.com/gingerchris\n * 2013 Trinh Ho, https://github.com/ineedfat\n * 2013 Edwin Alejandro Perez, https://github.com/eaparango\n * 2013 Norah Smith, https://github.com/burnburnrocket\n * 2014 Diego Casorran, https://github.com/diegocr\n * 2014 James Robb, https://github.com/jamesbrobb\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n/**\n * @name addImage\n * @module\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { atob, btoa } from \"../libs/AtobBtoa.js\";\n\n(function(jsPDFAPI) {\n \"use strict\";\n\n var namespace = \"addImage_\";\n jsPDFAPI.__addimage__ = {};\n\n var UNKNOWN = \"UNKNOWN\";\n\n // Heuristic selection of a good batch for large array .apply. Not limiting make the call overflow.\n // With too small batch iteration will be slow as more calls are made,\n // higher values cause larger and slower garbage collection.\n var ARRAY_APPLY_BATCH = 8192;\n\n var imageFileTypeHeaders = {\n PNG: [[0x89, 0x50, 0x4e, 0x47]],\n TIFF: [\n [0x4d, 0x4d, 0x00, 0x2a], //Motorola\n [0x49, 0x49, 0x2a, 0x00] //Intel\n ],\n JPEG: [\n [\n 0xff,\n 0xd8,\n 0xff,\n 0xe0,\n undefined,\n undefined,\n 0x4a,\n 0x46,\n 0x49,\n 0x46,\n 0x00\n ], //JFIF\n [\n 0xff,\n 0xd8,\n 0xff,\n 0xe1,\n undefined,\n undefined,\n 0x45,\n 0x78,\n 0x69,\n 0x66,\n 0x00,\n 0x00\n ], //Exif\n [0xff, 0xd8, 0xff, 0xdb], //JPEG RAW\n [0xff, 0xd8, 0xff, 0xee] //EXIF RAW\n ],\n JPEG2000: [[0x00, 0x00, 0x00, 0x0c, 0x6a, 0x50, 0x20, 0x20]],\n GIF87a: [[0x47, 0x49, 0x46, 0x38, 0x37, 0x61]],\n GIF89a: [[0x47, 0x49, 0x46, 0x38, 0x39, 0x61]],\n WEBP: [\n [\n 0x52,\n 0x49,\n 0x46,\n 0x46,\n undefined,\n undefined,\n undefined,\n undefined,\n 0x57,\n 0x45,\n 0x42,\n 0x50\n ]\n ],\n BMP: [\n [0x42, 0x4d], //BM - Windows 3.1x, 95, NT, ... etc.\n [0x42, 0x41], //BA - OS/2 struct bitmap array\n [0x43, 0x49], //CI - OS/2 struct color icon\n [0x43, 0x50], //CP - OS/2 const color pointer\n [0x49, 0x43], //IC - OS/2 struct icon\n [0x50, 0x54] //PT - OS/2 pointer\n ]\n };\n\n /**\n * Recognize filetype of Image by magic-bytes\n *\n * https://en.wikipedia.org/wiki/List_of_file_signatures\n *\n * @name getImageFileTypeByImageData\n * @public\n * @function\n * @param {string|arraybuffer} imageData imageData as binary String or arraybuffer\n * @param {string} format format of file if filetype-recognition fails, e.g. 'JPEG'\n *\n * @returns {string} filetype of Image\n */\n var getImageFileTypeByImageData = (jsPDFAPI.__addimage__.getImageFileTypeByImageData = function(\n imageData,\n fallbackFormat\n ) {\n fallbackFormat = fallbackFormat || UNKNOWN;\n var i;\n var j;\n var result = UNKNOWN;\n var headerSchemata;\n var compareResult;\n var fileType;\n\n if (\n fallbackFormat === \"RGBA\" ||\n (imageData.data !== undefined &&\n imageData.data instanceof Uint8ClampedArray &&\n \"height\" in imageData &&\n \"width\" in imageData)\n ) {\n return \"RGBA\";\n }\n\n if (isArrayBufferView(imageData)) {\n for (fileType in imageFileTypeHeaders) {\n headerSchemata = imageFileTypeHeaders[fileType];\n for (i = 0; i < headerSchemata.length; i += 1) {\n compareResult = true;\n for (j = 0; j < headerSchemata[i].length; j += 1) {\n if (headerSchemata[i][j] === undefined) {\n continue;\n }\n if (headerSchemata[i][j] !== imageData[j]) {\n compareResult = false;\n break;\n }\n }\n if (compareResult === true) {\n result = fileType;\n break;\n }\n }\n }\n } else {\n for (fileType in imageFileTypeHeaders) {\n headerSchemata = imageFileTypeHeaders[fileType];\n for (i = 0; i < headerSchemata.length; i += 1) {\n compareResult = true;\n for (j = 0; j < headerSchemata[i].length; j += 1) {\n if (headerSchemata[i][j] === undefined) {\n continue;\n }\n if (headerSchemata[i][j] !== imageData.charCodeAt(j)) {\n compareResult = false;\n break;\n }\n }\n if (compareResult === true) {\n result = fileType;\n break;\n }\n }\n }\n }\n\n if (result === UNKNOWN && fallbackFormat !== UNKNOWN) {\n result = fallbackFormat;\n }\n return result;\n });\n\n // Image functionality ported from pdf.js\n var putImage = function(image) {\n var out = this.internal.write;\n var putStream = this.internal.putStream;\n var getFilters = this.internal.getFilters;\n\n var filter = getFilters();\n while (filter.indexOf(\"FlateEncode\") !== -1) {\n filter.splice(filter.indexOf(\"FlateEncode\"), 1);\n }\n\n image.objectId = this.internal.newObject();\n\n var additionalKeyValues = [];\n additionalKeyValues.push({ key: \"Type\", value: \"/XObject\" });\n additionalKeyValues.push({ key: \"Subtype\", value: \"/Image\" });\n additionalKeyValues.push({ key: \"Width\", value: image.width });\n additionalKeyValues.push({ key: \"Height\", value: image.height });\n\n if (image.colorSpace === color_spaces.INDEXED) {\n additionalKeyValues.push({\n key: \"ColorSpace\",\n value:\n \"[/Indexed /DeviceRGB \" +\n // if an indexed png defines more than one colour with transparency, we've created a sMask\n (image.palette.length / 3 - 1) +\n \" \" +\n (\"sMask\" in image && typeof image.sMask !== \"undefined\"\n ? image.objectId + 2\n : image.objectId + 1) +\n \" 0 R]\"\n });\n } else {\n additionalKeyValues.push({\n key: \"ColorSpace\",\n value: \"/\" + image.colorSpace\n });\n if (image.colorSpace === color_spaces.DEVICE_CMYK) {\n additionalKeyValues.push({ key: \"Decode\", value: \"[1 0 1 0 1 0 1 0]\" });\n }\n }\n additionalKeyValues.push({\n key: \"BitsPerComponent\",\n value: image.bitsPerComponent\n });\n if (\n \"decodeParameters\" in image &&\n typeof image.decodeParameters !== \"undefined\"\n ) {\n additionalKeyValues.push({\n key: \"DecodeParms\",\n value: \"<<\" + image.decodeParameters + \">>\"\n });\n }\n if (\"transparency\" in image && Array.isArray(image.transparency)) {\n var transparency = \"\",\n i = 0,\n len = image.transparency.length;\n for (; i < len; i++)\n transparency +=\n image.transparency[i] + \" \" + image.transparency[i] + \" \";\n\n additionalKeyValues.push({\n key: \"Mask\",\n value: \"[\" + transparency + \"]\"\n });\n }\n if (typeof image.sMask !== \"undefined\") {\n additionalKeyValues.push({\n key: \"SMask\",\n value: image.objectId + 1 + \" 0 R\"\n });\n }\n\n var alreadyAppliedFilters =\n typeof image.filter !== \"undefined\" ? [\"/\" + image.filter] : undefined;\n\n putStream({\n data: image.data,\n additionalKeyValues: additionalKeyValues,\n alreadyAppliedFilters: alreadyAppliedFilters,\n objectId: image.objectId\n });\n\n out(\"endobj\");\n\n // Soft mask\n if (\"sMask\" in image && typeof image.sMask !== \"undefined\") {\n var decodeParameters =\n \"/Predictor \" +\n image.predictor +\n \" /Colors 1 /BitsPerComponent \" +\n image.bitsPerComponent +\n \" /Columns \" +\n image.width;\n var sMask = {\n width: image.width,\n height: image.height,\n colorSpace: \"DeviceGray\",\n bitsPerComponent: image.bitsPerComponent,\n decodeParameters: decodeParameters,\n data: image.sMask\n };\n if (\"filter\" in image) {\n sMask.filter = image.filter;\n }\n putImage.call(this, sMask);\n }\n\n //Palette\n if (image.colorSpace === color_spaces.INDEXED) {\n var objId = this.internal.newObject();\n //out('<< /Filter / ' + img['f'] +' /Length ' + img['pal'].length + '>>');\n //putStream(zlib.compress(img['pal']));\n putStream({\n data: arrayBufferToBinaryString(new Uint8Array(image.palette)),\n objectId: objId\n });\n out(\"endobj\");\n }\n };\n var putResourcesCallback = function() {\n var images = this.internal.collections[namespace + \"images\"];\n for (var i in images) {\n putImage.call(this, images[i]);\n }\n };\n var putXObjectsDictCallback = function() {\n var images = this.internal.collections[namespace + \"images\"],\n out = this.internal.write,\n image;\n for (var i in images) {\n image = images[i];\n out(\"/I\" + image.index, image.objectId, \"0\", \"R\");\n }\n };\n\n var checkCompressValue = function(value) {\n if (value && typeof value === \"string\") value = value.toUpperCase();\n return value in jsPDFAPI.image_compression ? value : image_compression.NONE;\n };\n\n var initialize = function() {\n if (!this.internal.collections[namespace + \"images\"]) {\n this.internal.collections[namespace + \"images\"] = {};\n this.internal.events.subscribe(\"putResources\", putResourcesCallback);\n this.internal.events.subscribe(\"putXobjectDict\", putXObjectsDictCallback);\n }\n };\n\n var getImages = function() {\n var images = this.internal.collections[namespace + \"images\"];\n initialize.call(this);\n return images;\n };\n var getImageIndex = function() {\n return Object.keys(this.internal.collections[namespace + \"images\"]).length;\n };\n var notDefined = function(value) {\n return typeof value === \"undefined\" || value === null || value.length === 0;\n };\n var generateAliasFromImageData = function(imageData) {\n if (typeof imageData === \"string\" || isArrayBufferView(imageData)) {\n return sHashCode(imageData);\n } else if (isArrayBufferView(imageData.data)) {\n return sHashCode(imageData.data);\n }\n\n return null;\n };\n\n var isImageTypeSupported = function(type) {\n return typeof jsPDFAPI[\"process\" + type.toUpperCase()] === \"function\";\n };\n\n var isDOMElement = function(object) {\n return typeof object === \"object\" && object.nodeType === 1;\n };\n\n var getImageDataFromElement = function(element, format) {\n //if element is an image which uses data url definition, just return the dataurl\n if (element.nodeName === \"IMG\" && element.hasAttribute(\"src\")) {\n var src = \"\" + element.getAttribute(\"src\");\n\n //is base64 encoded dataUrl, directly process it\n if (src.indexOf(\"data:image/\") === 0) {\n return atob(\n unescape(src)\n .split(\"base64,\")\n .pop()\n );\n }\n\n //it is probably an url, try to load it\n var tmpImageData = jsPDFAPI.loadFile(src, true);\n if (tmpImageData !== undefined) {\n return tmpImageData;\n }\n }\n\n if (element.nodeName === \"CANVAS\") {\n if (element.width === 0 || element.height === 0) {\n throw new Error(\n \"Given canvas must have data. Canvas width: \" +\n element.width +\n \", height: \" +\n element.height\n );\n }\n var mimeType;\n switch (format) {\n case \"PNG\":\n mimeType = \"image/png\";\n break;\n case \"WEBP\":\n mimeType = \"image/webp\";\n break;\n case \"JPEG\":\n case \"JPG\":\n default:\n mimeType = \"image/jpeg\";\n break;\n }\n return atob(\n element\n .toDataURL(mimeType, 1.0)\n .split(\"base64,\")\n .pop()\n );\n }\n };\n\n var checkImagesForAlias = function(alias) {\n var images = this.internal.collections[namespace + \"images\"];\n if (images) {\n for (var e in images) {\n if (alias === images[e].alias) {\n return images[e];\n }\n }\n }\n };\n\n var determineWidthAndHeight = function(width, height, image) {\n if (!width && !height) {\n width = -96;\n height = -96;\n }\n if (width < 0) {\n width = (-1 * image.width * 72) / width / this.internal.scaleFactor;\n }\n if (height < 0) {\n height = (-1 * image.height * 72) / height / this.internal.scaleFactor;\n }\n if (width === 0) {\n width = (height * image.width) / image.height;\n }\n if (height === 0) {\n height = (width * image.height) / image.width;\n }\n\n return [width, height];\n };\n\n var writeImageToPDF = function(x, y, width, height, image, rotation) {\n var dims = determineWidthAndHeight.call(this, width, height, image),\n coord = this.internal.getCoordinateString,\n vcoord = this.internal.getVerticalCoordinateString;\n\n var images = getImages.call(this);\n\n width = dims[0];\n height = dims[1];\n images[image.index] = image;\n\n if (rotation) {\n rotation *= Math.PI / 180;\n var c = Math.cos(rotation);\n var s = Math.sin(rotation);\n //like in pdf Reference do it 4 digits instead of 2\n var f4 = function(number) {\n return number.toFixed(4);\n };\n var rotationTransformationMatrix = [\n f4(c),\n f4(s),\n f4(s * -1),\n f4(c),\n 0,\n 0,\n \"cm\"\n ];\n }\n this.internal.write(\"q\"); //Save graphics state\n if (rotation) {\n this.internal.write(\n [1, \"0\", \"0\", 1, coord(x), vcoord(y + height), \"cm\"].join(\" \")\n ); //Translate\n this.internal.write(rotationTransformationMatrix.join(\" \")); //Rotate\n this.internal.write(\n [coord(width), \"0\", \"0\", coord(height), \"0\", \"0\", \"cm\"].join(\" \")\n ); //Scale\n } else {\n this.internal.write(\n [\n coord(width),\n \"0\",\n \"0\",\n coord(height),\n coord(x),\n vcoord(y + height),\n \"cm\"\n ].join(\" \")\n ); //Translate and Scale\n }\n\n if (this.isAdvancedAPI()) {\n // draw image bottom up when in \"advanced\" API mode\n this.internal.write([1, 0, 0, -1, 0, 0, \"cm\"].join(\" \"));\n }\n\n this.internal.write(\"/I\" + image.index + \" Do\"); //Paint Image\n this.internal.write(\"Q\"); //Restore graphics state\n };\n\n /**\n * COLOR SPACES\n */\n var color_spaces = (jsPDFAPI.color_spaces = {\n DEVICE_RGB: \"DeviceRGB\",\n DEVICE_GRAY: \"DeviceGray\",\n DEVICE_CMYK: \"DeviceCMYK\",\n CAL_GREY: \"CalGray\",\n CAL_RGB: \"CalRGB\",\n LAB: \"Lab\",\n ICC_BASED: \"ICCBased\",\n INDEXED: \"Indexed\",\n PATTERN: \"Pattern\",\n SEPARATION: \"Separation\",\n DEVICE_N: \"DeviceN\"\n });\n\n /**\n * DECODE METHODS\n */\n jsPDFAPI.decode = {\n DCT_DECODE: \"DCTDecode\",\n FLATE_DECODE: \"FlateDecode\",\n LZW_DECODE: \"LZWDecode\",\n JPX_DECODE: \"JPXDecode\",\n JBIG2_DECODE: \"JBIG2Decode\",\n ASCII85_DECODE: \"ASCII85Decode\",\n ASCII_HEX_DECODE: \"ASCIIHexDecode\",\n RUN_LENGTH_DECODE: \"RunLengthDecode\",\n CCITT_FAX_DECODE: \"CCITTFaxDecode\"\n };\n\n /**\n * IMAGE COMPRESSION TYPES\n */\n var image_compression = (jsPDFAPI.image_compression = {\n NONE: \"NONE\",\n FAST: \"FAST\",\n MEDIUM: \"MEDIUM\",\n SLOW: \"SLOW\"\n });\n\n /**\n * @name sHashCode\n * @function\n * @param {string} data\n * @returns {string}\n */\n var sHashCode = (jsPDFAPI.__addimage__.sHashCode = function(data) {\n var hash = 0,\n i,\n len;\n\n if (typeof data === \"string\") {\n len = data.length;\n for (i = 0; i < len; i++) {\n hash = (hash << 5) - hash + data.charCodeAt(i);\n hash |= 0; // Convert to 32bit integer\n }\n } else if (isArrayBufferView(data)) {\n len = data.byteLength / 2;\n for (i = 0; i < len; i++) {\n hash = (hash << 5) - hash + data[i];\n hash |= 0; // Convert to 32bit integer\n }\n }\n return hash;\n });\n\n /**\n * Validates if given String is a valid Base64-String\n *\n * @name validateStringAsBase64\n * @public\n * @function\n * @param {String} possible Base64-String\n *\n * @returns {boolean}\n */\n var validateStringAsBase64 = (jsPDFAPI.__addimage__.validateStringAsBase64 = function(\n possibleBase64String\n ) {\n possibleBase64String = possibleBase64String || \"\";\n possibleBase64String.toString().trim();\n\n var result = true;\n\n if (possibleBase64String.length === 0) {\n result = false;\n }\n\n if (possibleBase64String.length % 4 !== 0) {\n result = false;\n }\n\n if (\n /^[A-Za-z0-9+/]+$/.test(\n possibleBase64String.substr(0, possibleBase64String.length - 2)\n ) === false\n ) {\n result = false;\n }\n\n if (\n /^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(\n possibleBase64String.substr(-2)\n ) === false\n ) {\n result = false;\n }\n return result;\n });\n\n /**\n * Strips out and returns info from a valid base64 data URI\n *\n * @name extractImageFromDataUrl\n * @function\n * @param {string} dataUrl a valid data URI of format 'data:[][;base64],'\n * @returns {Array}an Array containing the following\n * [0] the complete data URI\n * [1] \n * [2] format - the second part of the mime-type i.e 'png' in 'image/png'\n * [4] \n */\n var extractImageFromDataUrl = (jsPDFAPI.__addimage__.extractImageFromDataUrl = function(\n dataUrl\n ) {\n dataUrl = dataUrl || \"\";\n var dataUrlParts = dataUrl.split(\"base64,\");\n var result = null;\n\n if (dataUrlParts.length === 2) {\n var extractedInfo = /^data:(\\w*\\/\\w*);*(charset=(?!charset=)[\\w=-]*)*;*$/.exec(\n dataUrlParts[0]\n );\n if (Array.isArray(extractedInfo)) {\n result = {\n mimeType: extractedInfo[1],\n charset: extractedInfo[2],\n data: dataUrlParts[1]\n };\n }\n }\n return result;\n });\n\n /**\n * Check to see if ArrayBuffer is supported\n *\n * @name supportsArrayBuffer\n * @function\n * @returns {boolean}\n */\n var supportsArrayBuffer = (jsPDFAPI.__addimage__.supportsArrayBuffer = function() {\n return (\n typeof ArrayBuffer !== \"undefined\" && typeof Uint8Array !== \"undefined\"\n );\n });\n\n /**\n * Tests supplied object to determine if ArrayBuffer\n *\n * @name isArrayBuffer\n * @function\n * @param {Object} object an Object\n *\n * @returns {boolean}\n */\n jsPDFAPI.__addimage__.isArrayBuffer = function(object) {\n return supportsArrayBuffer() && object instanceof ArrayBuffer;\n };\n\n /**\n * Tests supplied object to determine if it implements the ArrayBufferView (TypedArray) interface\n *\n * @name isArrayBufferView\n * @function\n * @param {Object} object an Object\n * @returns {boolean}\n */\n var isArrayBufferView = (jsPDFAPI.__addimage__.isArrayBufferView = function(\n object\n ) {\n return (\n supportsArrayBuffer() &&\n typeof Uint32Array !== \"undefined\" &&\n (object instanceof Int8Array ||\n object instanceof Uint8Array ||\n (typeof Uint8ClampedArray !== \"undefined\" &&\n object instanceof Uint8ClampedArray) ||\n object instanceof Int16Array ||\n object instanceof Uint16Array ||\n object instanceof Int32Array ||\n object instanceof Uint32Array ||\n object instanceof Float32Array ||\n object instanceof Float64Array)\n );\n });\n\n /**\n * Convert Binary String to ArrayBuffer\n *\n * @name binaryStringToUint8Array\n * @public\n * @function\n * @param {string} BinaryString with ImageData\n * @returns {Uint8Array}\n */\n var binaryStringToUint8Array = (jsPDFAPI.__addimage__.binaryStringToUint8Array = function(\n binary_string\n ) {\n var len = binary_string.length;\n var bytes = new Uint8Array(len);\n for (var i = 0; i < len; i++) {\n bytes[i] = binary_string.charCodeAt(i);\n }\n return bytes;\n });\n\n /**\n * Convert the Buffer to a Binary String\n *\n * @name arrayBufferToBinaryString\n * @public\n * @function\n * @param {ArrayBuffer|ArrayBufferView} ArrayBuffer buffer or bufferView with ImageData\n *\n * @returns {String}\n */\n var arrayBufferToBinaryString = (jsPDFAPI.__addimage__.arrayBufferToBinaryString = function(\n buffer\n ) {\n var out = \"\";\n // There are calls with both ArrayBuffer and already converted Uint8Array or other BufferView.\n // Do not copy the array if input is already an array.\n var buf = isArrayBufferView(buffer) ? buffer : new Uint8Array(buffer);\n for (var i = 0; i < buf.length; i += ARRAY_APPLY_BATCH) {\n // Limit the amount of characters being parsed to prevent overflow.\n // Note that while TextDecoder would be faster, it does not have the same\n // functionality as fromCharCode with any provided encodings as of 3/2021.\n out += String.fromCharCode.apply(\n null,\n buf.subarray(i, i + ARRAY_APPLY_BATCH)\n );\n }\n return out;\n });\n\n /**\n * Possible parameter for addImage, an RGBA buffer with size.\n *\n * @typedef {Object} RGBAData\n * @property {Uint8ClampedArray} data - Single dimensional array of RGBA values. For example from canvas getImageData.\n * @property {number} width - Image width as the data does not carry this information in itself.\n * @property {number} height - Image height as the data does not carry this information in itself.\n */\n\n /**\n * Adds an Image to the PDF.\n *\n * @name addImage\n * @public\n * @function\n * @param {string|HTMLImageElement|HTMLCanvasElement|Uint8Array|RGBAData} imageData imageData as base64 encoded DataUrl or Image-HTMLElement or Canvas-HTMLElement or object containing RGBA array (like output from canvas.getImageData).\n * @param {string} format format of file if filetype-recognition fails or in case of a Canvas-Element needs to be specified (default for Canvas is JPEG), e.g. 'JPEG', 'PNG', 'WEBP'\n * @param {number} x x Coordinate (in units declared at inception of PDF document) against left edge of the page\n * @param {number} y y Coordinate (in units declared at inception of PDF document) against upper edge of the page\n * @param {number} width width of the image (in units declared at inception of PDF document)\n * @param {number} height height of the Image (in units declared at inception of PDF document)\n * @param {string} alias alias of the image (if used multiple times)\n * @param {string} compression compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'\n * @param {number} rotation rotation of the image in degrees (0-359)\n *\n * @returns jsPDF\n */\n jsPDFAPI.addImage = function() {\n var imageData, format, x, y, w, h, alias, compression, rotation;\n\n imageData = arguments[0];\n if (typeof arguments[1] === \"number\") {\n format = UNKNOWN;\n x = arguments[1];\n y = arguments[2];\n w = arguments[3];\n h = arguments[4];\n alias = arguments[5];\n compression = arguments[6];\n rotation = arguments[7];\n } else {\n format = arguments[1];\n x = arguments[2];\n y = arguments[3];\n w = arguments[4];\n h = arguments[5];\n alias = arguments[6];\n compression = arguments[7];\n rotation = arguments[8];\n }\n\n if (\n typeof imageData === \"object\" &&\n !isDOMElement(imageData) &&\n \"imageData\" in imageData\n ) {\n var options = imageData;\n\n imageData = options.imageData;\n format = options.format || format || UNKNOWN;\n x = options.x || x || 0;\n y = options.y || y || 0;\n w = options.w || options.width || w;\n h = options.h || options.height || h;\n alias = options.alias || alias;\n compression = options.compression || compression;\n rotation = options.rotation || options.angle || rotation;\n }\n\n //If compression is not explicitly set, determine if we should use compression\n var filter = this.internal.getFilters();\n if (compression === undefined && filter.indexOf(\"FlateEncode\") !== -1) {\n compression = \"SLOW\";\n }\n\n if (isNaN(x) || isNaN(y)) {\n throw new Error(\"Invalid coordinates passed to jsPDF.addImage\");\n }\n\n initialize.call(this);\n\n var image = processImageData.call(\n this,\n imageData,\n format,\n alias,\n compression\n );\n\n writeImageToPDF.call(this, x, y, w, h, image, rotation);\n\n return this;\n };\n\n var processImageData = function(imageData, format, alias, compression) {\n var result, dataAsBinaryString;\n\n if (\n typeof imageData === \"string\" &&\n getImageFileTypeByImageData(imageData) === UNKNOWN\n ) {\n imageData = unescape(imageData);\n var tmpImageData = convertBase64ToBinaryString(imageData, false);\n\n if (tmpImageData !== \"\") {\n imageData = tmpImageData;\n } else {\n tmpImageData = jsPDFAPI.loadFile(imageData, true);\n if (tmpImageData !== undefined) {\n imageData = tmpImageData;\n }\n }\n }\n\n if (isDOMElement(imageData)) {\n imageData = getImageDataFromElement(imageData, format);\n }\n\n format = getImageFileTypeByImageData(imageData, format);\n if (!isImageTypeSupported(format)) {\n throw new Error(\n \"addImage does not support files of type '\" +\n format +\n \"', please ensure that a plugin for '\" +\n format +\n \"' support is added.\"\n );\n }\n\n // now do the heavy lifting\n\n if (notDefined(alias)) {\n alias = generateAliasFromImageData(imageData);\n }\n result = checkImagesForAlias.call(this, alias);\n\n if (!result) {\n if (supportsArrayBuffer()) {\n // no need to convert if imageData is already uint8array\n if (!(imageData instanceof Uint8Array) && format !== \"RGBA\") {\n dataAsBinaryString = imageData;\n imageData = binaryStringToUint8Array(imageData);\n }\n }\n\n result = this[\"process\" + format.toUpperCase()](\n imageData,\n getImageIndex.call(this),\n alias,\n checkCompressValue(compression),\n dataAsBinaryString\n );\n }\n\n if (!result) {\n throw new Error(\"An unknown error occurred whilst processing the image.\");\n }\n return result;\n };\n\n /**\n * @name convertBase64ToBinaryString\n * @function\n * @param {string} stringData\n * @returns {string} binary string\n */\n var convertBase64ToBinaryString = (jsPDFAPI.__addimage__.convertBase64ToBinaryString = function(\n stringData,\n throwError\n ) {\n throwError = typeof throwError === \"boolean\" ? throwError : true;\n var base64Info;\n var imageData = \"\";\n var rawData;\n\n if (typeof stringData === \"string\") {\n base64Info = extractImageFromDataUrl(stringData);\n rawData = base64Info !== null ? base64Info.data : stringData;\n\n try {\n imageData = atob(rawData);\n } catch (e) {\n if (throwError) {\n if (!validateStringAsBase64(rawData)) {\n throw new Error(\n \"Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString \"\n );\n } else {\n throw new Error(\n \"atob-Error in jsPDF.convertBase64ToBinaryString \" + e.message\n );\n }\n }\n }\n }\n return imageData;\n });\n\n /**\n * @name getImageProperties\n * @function\n * @param {Object} imageData\n * @returns {Object}\n */\n jsPDFAPI.getImageProperties = function(imageData) {\n var image;\n var tmpImageData = \"\";\n var format;\n\n if (isDOMElement(imageData)) {\n imageData = getImageDataFromElement(imageData);\n }\n\n if (\n typeof imageData === \"string\" &&\n getImageFileTypeByImageData(imageData) === UNKNOWN\n ) {\n tmpImageData = convertBase64ToBinaryString(imageData, false);\n\n if (tmpImageData === \"\") {\n tmpImageData = jsPDFAPI.loadFile(imageData) || \"\";\n }\n imageData = tmpImageData;\n }\n\n format = getImageFileTypeByImageData(imageData);\n if (!isImageTypeSupported(format)) {\n throw new Error(\n \"addImage does not support files of type '\" +\n format +\n \"', please ensure that a plugin for '\" +\n format +\n \"' support is added.\"\n );\n }\n\n if (supportsArrayBuffer() && !(imageData instanceof Uint8Array)) {\n imageData = binaryStringToUint8Array(imageData);\n }\n\n image = this[\"process\" + format.toUpperCase()](imageData);\n\n if (!image) {\n throw new Error(\"An unknown error occurred whilst processing the image\");\n }\n\n image.fileType = format;\n\n return image;\n };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF Annotations PlugIn\n *\n * There are many types of annotations in a PDF document. Annotations are placed\n * on a page at a particular location. They are not 'attached' to an object.\n *
\n * This plugin current supports
\n *
  • Goto Page (set pageNumber and top in options)\n *
  • Goto Name (set name and top in options)\n *
  • Goto URL (set url in options)\n *

    \n * \tThe destination magnification factor can also be specified when goto is a page number or a named destination. (see documentation below)\n * (set magFactor in options). XYZ is the default.\n *

    \n *

    \n * Links, Text, Popup, and FreeText are supported.\n *

    \n *

    \n * Options In PDF spec Not Implemented Yet\n *

  • link border\n *
  • named target\n *
  • page coordinates\n *
  • destination page scaling and layout\n *
  • actions other than URL and GotoPage\n *
  • background / hover actions\n *

    \n * @name annotations\n * @module\n */\n\n/*\n Destination Magnification Factors\n See PDF 1.3 Page 386 for meanings and options\n\n [supported]\n\tXYZ (options; left top zoom)\n\tFit (no options)\n\tFitH (options: top)\n\tFitV (options: left)\n\n\t[not supported]\n\tFitR\n\tFitB\n\tFitBH\n\tFitBV\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n(function(jsPDFAPI) {\n \"use strict\";\n\n var notEmpty = function(obj) {\n if (typeof obj != \"undefined\") {\n if (obj != \"\") {\n return true;\n }\n }\n };\n\n jsPDF.API.events.push([\n \"addPage\",\n function(addPageData) {\n var pageInfo = this.internal.getPageInfo(addPageData.pageNumber);\n pageInfo.pageContext.annotations = [];\n }\n ]);\n\n jsPDFAPI.events.push([\n \"putPage\",\n function(putPageData) {\n var getHorizontalCoordinateString = this.internal.getCoordinateString;\n var getVerticalCoordinateString = this.internal\n .getVerticalCoordinateString;\n var pageInfo = this.internal.getPageInfoByObjId(putPageData.objId);\n var pageAnnos = putPageData.pageContext.annotations;\n\n var anno, rect, line;\n var found = false;\n for (var a = 0; a < pageAnnos.length && !found; a++) {\n anno = pageAnnos[a];\n switch (anno.type) {\n case \"link\":\n if (\n notEmpty(anno.options.url) ||\n notEmpty(anno.options.pageNumber)\n ) {\n found = true;\n }\n break;\n case \"reference\":\n case \"text\":\n case \"freetext\":\n found = true;\n break;\n }\n }\n if (found == false) {\n return;\n }\n\n this.internal.write(\"/Annots [\");\n for (var i = 0; i < pageAnnos.length; i++) {\n anno = pageAnnos[i];\n var escape = this.internal.pdfEscape;\n var encryptor = this.internal.getEncryptor(putPageData.objId);\n\n switch (anno.type) {\n case \"reference\":\n // References to Widget Annotations (for AcroForm Fields)\n this.internal.write(\" \" + anno.object.objId + \" 0 R \");\n break;\n case \"text\":\n // Create a an object for both the text and the popup\n var objText = this.internal.newAdditionalObject();\n var objPopup = this.internal.newAdditionalObject();\n var encryptorText = this.internal.getEncryptor(objText.objId);\n\n var title = anno.title || \"Note\";\n rect =\n \"/Rect [\" +\n getHorizontalCoordinateString(anno.bounds.x) +\n \" \" +\n getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n \" \" +\n getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) +\n \" \" +\n getVerticalCoordinateString(anno.bounds.y) +\n \"] \";\n\n line =\n \"<>\";\n objText.content = line;\n\n var parent = objText.objId + \" 0 R\";\n var popoff = 30;\n rect =\n \"/Rect [\" +\n getHorizontalCoordinateString(anno.bounds.x + popoff) +\n \" \" +\n getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n \" \" +\n getHorizontalCoordinateString(\n anno.bounds.x + anno.bounds.w + popoff\n ) +\n \" \" +\n getVerticalCoordinateString(anno.bounds.y) +\n \"] \";\n line =\n \"<>\";\n objPopup.content = line;\n\n this.internal.write(objText.objId, \"0 R\", objPopup.objId, \"0 R\");\n\n break;\n case \"freetext\":\n rect =\n \"/Rect [\" +\n getHorizontalCoordinateString(anno.bounds.x) +\n \" \" +\n getVerticalCoordinateString(anno.bounds.y) +\n \" \" +\n getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) +\n \" \" +\n getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n \"] \";\n var color = anno.color || \"#000000\";\n line =\n \"<>\";\n this.internal.write(line);\n break;\n case \"link\":\n if (anno.options.name) {\n var loc = this.annotations._nameMap[anno.options.name];\n anno.options.pageNumber = loc.page;\n anno.options.top = loc.y;\n } else {\n if (!anno.options.top) {\n anno.options.top = 0;\n }\n }\n\n rect =\n \"/Rect [\" +\n anno.finalBounds.x +\n \" \" +\n anno.finalBounds.y +\n \" \" +\n anno.finalBounds.w +\n \" \" +\n anno.finalBounds.h +\n \"] \";\n\n line = \"\";\n if (anno.options.url) {\n line =\n \"<>\";\n } else if (anno.options.pageNumber) {\n // first page is 0\n var info = this.internal.getPageInfo(anno.options.pageNumber);\n line =\n \"<>\";\n this.internal.write(line);\n }\n break;\n }\n }\n this.internal.write(\"]\");\n }\n ]);\n\n /**\n * @name createAnnotation\n * @function\n * @param {Object} options\n */\n jsPDFAPI.createAnnotation = function(options) {\n var pageInfo = this.internal.getCurrentPageInfo();\n switch (options.type) {\n case \"link\":\n this.link(\n options.bounds.x,\n options.bounds.y,\n options.bounds.w,\n options.bounds.h,\n options\n );\n break;\n case \"text\":\n case \"freetext\":\n pageInfo.pageContext.annotations.push(options);\n break;\n }\n };\n\n /**\n * Create a link\n *\n * valid options\n *
  • pageNumber or url [required]\n *

    If pageNumber is specified, top and zoom may also be specified

    \n * @name link\n * @function\n * @param {number} x\n * @param {number} y\n * @param {number} w\n * @param {number} h\n * @param {Object} options\n */\n jsPDFAPI.link = function(x, y, w, h, options) {\n var pageInfo = this.internal.getCurrentPageInfo();\n var getHorizontalCoordinateString = this.internal.getCoordinateString;\n var getVerticalCoordinateString = this.internal.getVerticalCoordinateString;\n\n pageInfo.pageContext.annotations.push({\n finalBounds: {\n x: getHorizontalCoordinateString(x),\n y: getVerticalCoordinateString(y),\n w: getHorizontalCoordinateString(x + w),\n h: getVerticalCoordinateString(y + h)\n },\n options: options,\n type: \"link\"\n });\n };\n\n /**\n * Currently only supports single line text.\n * Returns the width of the text/link\n *\n * @name textWithLink\n * @function\n * @param {string} text\n * @param {number} x\n * @param {number} y\n * @param {Object} options\n * @returns {number} width the width of the text/link\n */\n jsPDFAPI.textWithLink = function(text, x, y, options) {\n var totalLineWidth = this.getTextWidth(text);\n var lineHeight = this.internal.getLineHeight() / this.internal.scaleFactor;\n var linkHeight, linkWidth;\n\n // Checking if maxWidth option is passed to determine lineWidth and number of lines for each line\n if (options.maxWidth !== undefined) {\n var { maxWidth } = options;\n linkWidth = maxWidth;\n var numOfLines = this.splitTextToSize(text, linkWidth).length;\n linkHeight = Math.ceil(lineHeight * numOfLines);\n } else {\n linkWidth = totalLineWidth;\n linkHeight = lineHeight;\n }\n\n this.text(text, x, y, options);\n\n //TODO We really need the text baseline height to do this correctly.\n // Or ability to draw text on top, bottom, center, or baseline.\n y += lineHeight * 0.2;\n //handle x position based on the align option\n if (options.align === \"center\") {\n x = x - totalLineWidth / 2; //since starting from center move the x position by half of text width\n }\n if (options.align === \"right\") {\n x = x - totalLineWidth;\n }\n this.link(x, y - lineHeight, linkWidth, linkHeight, options);\n return totalLineWidth;\n };\n\n //TODO move into external library\n /**\n * @name getTextWidth\n * @function\n * @param {string} text\n * @returns {number} txtWidth\n */\n jsPDFAPI.getTextWidth = function(text) {\n var fontSize = this.internal.getFontSize();\n var txtWidth =\n (this.getStringUnitWidth(text) * fontSize) / this.internal.scaleFactor;\n return txtWidth;\n };\n\n return this;\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2017 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF arabic parser PlugIn\n *\n * @name arabic\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n /**\n * Arabic shape substitutions: char code => (isolated, final, initial, medial).\n * Arabic Substition A\n */\n var arabicSubstitionA = {\n 0x0621: [0xfe80], // ARABIC LETTER HAMZA\n 0x0622: [0xfe81, 0xfe82], // ARABIC LETTER ALEF WITH MADDA ABOVE\n 0x0623: [0xfe83, 0xfe84], // ARABIC LETTER ALEF WITH HAMZA ABOVE\n 0x0624: [0xfe85, 0xfe86], // ARABIC LETTER WAW WITH HAMZA ABOVE\n 0x0625: [0xfe87, 0xfe88], // ARABIC LETTER ALEF WITH HAMZA BELOW\n 0x0626: [0xfe89, 0xfe8a, 0xfe8b, 0xfe8c], // ARABIC LETTER YEH WITH HAMZA ABOVE\n 0x0627: [0xfe8d, 0xfe8e], // ARABIC LETTER ALEF\n 0x0628: [0xfe8f, 0xfe90, 0xfe91, 0xfe92], // ARABIC LETTER BEH\n 0x0629: [0xfe93, 0xfe94], // ARABIC LETTER TEH MARBUTA\n 0x062a: [0xfe95, 0xfe96, 0xfe97, 0xfe98], // ARABIC LETTER TEH\n 0x062b: [0xfe99, 0xfe9a, 0xfe9b, 0xfe9c], // ARABIC LETTER THEH\n 0x062c: [0xfe9d, 0xfe9e, 0xfe9f, 0xfea0], // ARABIC LETTER JEEM\n 0x062d: [0xfea1, 0xfea2, 0xfea3, 0xfea4], // ARABIC LETTER HAH\n 0x062e: [0xfea5, 0xfea6, 0xfea7, 0xfea8], // ARABIC LETTER KHAH\n 0x062f: [0xfea9, 0xfeaa], // ARABIC LETTER DAL\n 0x0630: [0xfeab, 0xfeac], // ARABIC LETTER THAL\n 0x0631: [0xfead, 0xfeae], // ARABIC LETTER REH\n 0x0632: [0xfeaf, 0xfeb0], // ARABIC LETTER ZAIN\n 0x0633: [0xfeb1, 0xfeb2, 0xfeb3, 0xfeb4], // ARABIC LETTER SEEN\n 0x0634: [0xfeb5, 0xfeb6, 0xfeb7, 0xfeb8], // ARABIC LETTER SHEEN\n 0x0635: [0xfeb9, 0xfeba, 0xfebb, 0xfebc], // ARABIC LETTER SAD\n 0x0636: [0xfebd, 0xfebe, 0xfebf, 0xfec0], // ARABIC LETTER DAD\n 0x0637: [0xfec1, 0xfec2, 0xfec3, 0xfec4], // ARABIC LETTER TAH\n 0x0638: [0xfec5, 0xfec6, 0xfec7, 0xfec8], // ARABIC LETTER ZAH\n 0x0639: [0xfec9, 0xfeca, 0xfecb, 0xfecc], // ARABIC LETTER AIN\n 0x063a: [0xfecd, 0xfece, 0xfecf, 0xfed0], // ARABIC LETTER GHAIN\n 0x0641: [0xfed1, 0xfed2, 0xfed3, 0xfed4], // ARABIC LETTER FEH\n 0x0642: [0xfed5, 0xfed6, 0xfed7, 0xfed8], // ARABIC LETTER QAF\n 0x0643: [0xfed9, 0xfeda, 0xfedb, 0xfedc], // ARABIC LETTER KAF\n 0x0644: [0xfedd, 0xfede, 0xfedf, 0xfee0], // ARABIC LETTER LAM\n 0x0645: [0xfee1, 0xfee2, 0xfee3, 0xfee4], // ARABIC LETTER MEEM\n 0x0646: [0xfee5, 0xfee6, 0xfee7, 0xfee8], // ARABIC LETTER NOON\n 0x0647: [0xfee9, 0xfeea, 0xfeeb, 0xfeec], // ARABIC LETTER HEH\n 0x0648: [0xfeed, 0xfeee], // ARABIC LETTER WAW\n 0x0649: [0xfeef, 0xfef0, 64488, 64489], // ARABIC LETTER ALEF MAKSURA\n 0x064a: [0xfef1, 0xfef2, 0xfef3, 0xfef4], // ARABIC LETTER YEH\n 0x0671: [0xfb50, 0xfb51], // ARABIC LETTER ALEF WASLA\n 0x0677: [0xfbdd], // ARABIC LETTER U WITH HAMZA ABOVE\n 0x0679: [0xfb66, 0xfb67, 0xfb68, 0xfb69], // ARABIC LETTER TTEH\n 0x067a: [0xfb5e, 0xfb5f, 0xfb60, 0xfb61], // ARABIC LETTER TTEHEH\n 0x067b: [0xfb52, 0xfb53, 0xfb54, 0xfb55], // ARABIC LETTER BEEH\n 0x067e: [0xfb56, 0xfb57, 0xfb58, 0xfb59], // ARABIC LETTER PEH\n 0x067f: [0xfb62, 0xfb63, 0xfb64, 0xfb65], // ARABIC LETTER TEHEH\n 0x0680: [0xfb5a, 0xfb5b, 0xfb5c, 0xfb5d], // ARABIC LETTER BEHEH\n 0x0683: [0xfb76, 0xfb77, 0xfb78, 0xfb79], // ARABIC LETTER NYEH\n 0x0684: [0xfb72, 0xfb73, 0xfb74, 0xfb75], // ARABIC LETTER DYEH\n 0x0686: [0xfb7a, 0xfb7b, 0xfb7c, 0xfb7d], // ARABIC LETTER TCHEH\n 0x0687: [0xfb7e, 0xfb7f, 0xfb80, 0xfb81], // ARABIC LETTER TCHEHEH\n 0x0688: [0xfb88, 0xfb89], // ARABIC LETTER DDAL\n 0x068c: [0xfb84, 0xfb85], // ARABIC LETTER DAHAL\n 0x068d: [0xfb82, 0xfb83], // ARABIC LETTER DDAHAL\n 0x068e: [0xfb86, 0xfb87], // ARABIC LETTER DUL\n 0x0691: [0xfb8c, 0xfb8d], // ARABIC LETTER RREH\n 0x0698: [0xfb8a, 0xfb8b], // ARABIC LETTER JEH\n 0x06a4: [0xfb6a, 0xfb6b, 0xfb6c, 0xfb6d], // ARABIC LETTER VEH\n 0x06a6: [0xfb6e, 0xfb6f, 0xfb70, 0xfb71], // ARABIC LETTER PEHEH\n 0x06a9: [0xfb8e, 0xfb8f, 0xfb90, 0xfb91], // ARABIC LETTER KEHEH\n 0x06ad: [0xfbd3, 0xfbd4, 0xfbd5, 0xfbd6], // ARABIC LETTER NG\n 0x06af: [0xfb92, 0xfb93, 0xfb94, 0xfb95], // ARABIC LETTER GAF\n 0x06b1: [0xfb9a, 0xfb9b, 0xfb9c, 0xfb9d], // ARABIC LETTER NGOEH\n 0x06b3: [0xfb96, 0xfb97, 0xfb98, 0xfb99], // ARABIC LETTER GUEH\n 0x06ba: [0xfb9e, 0xfb9f], // ARABIC LETTER NOON GHUNNA\n 0x06bb: [0xfba0, 0xfba1, 0xfba2, 0xfba3], // ARABIC LETTER RNOON\n 0x06be: [0xfbaa, 0xfbab, 0xfbac, 0xfbad], // ARABIC LETTER HEH DOACHASHMEE\n 0x06c0: [0xfba4, 0xfba5], // ARABIC LETTER HEH WITH YEH ABOVE\n 0x06c1: [0xfba6, 0xfba7, 0xfba8, 0xfba9], // ARABIC LETTER HEH GOAL\n 0x06c5: [0xfbe0, 0xfbe1], // ARABIC LETTER KIRGHIZ OE\n 0x06c6: [0xfbd9, 0xfbda], // ARABIC LETTER OE\n 0x06c7: [0xfbd7, 0xfbd8], // ARABIC LETTER U\n 0x06c8: [0xfbdb, 0xfbdc], // ARABIC LETTER YU\n 0x06c9: [0xfbe2, 0xfbe3], // ARABIC LETTER KIRGHIZ YU\n 0x06cb: [0xfbde, 0xfbdf], // ARABIC LETTER VE\n 0x06cc: [0xfbfc, 0xfbfd, 0xfbfe, 0xfbff], // ARABIC LETTER FARSI YEH\n 0x06d0: [0xfbe4, 0xfbe5, 0xfbe6, 0xfbe7], //ARABIC LETTER E\n 0x06d2: [0xfbae, 0xfbaf], // ARABIC LETTER YEH BARREE\n 0x06d3: [0xfbb0, 0xfbb1] // ARABIC LETTER YEH BARREE WITH HAMZA ABOVE\n };\n\n /*\n var ligaturesSubstitutionA = {\n 0xFBEA: []// ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF ISOLATED FORM\n };\n */\n\n var ligatures = {\n 0xfedf: {\n 0xfe82: 0xfef5, // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM\n 0xfe84: 0xfef7, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM\n 0xfe88: 0xfef9, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM\n 0xfe8e: 0xfefb // ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM\n },\n 0xfee0: {\n 0xfe82: 0xfef6, // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM\n 0xfe84: 0xfef8, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM\n 0xfe88: 0xfefa, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM\n 0xfe8e: 0xfefc // ARABIC LIGATURE LAM WITH ALEF FINAL FORM\n },\n 0xfe8d: { 0xfedf: { 0xfee0: { 0xfeea: 0xfdf2 } } }, // ALLAH\n 0x0651: {\n 0x064c: 0xfc5e, // Shadda + Dammatan\n 0x064d: 0xfc5f, // Shadda + Kasratan\n 0x064e: 0xfc60, // Shadda + Fatha\n 0x064f: 0xfc61, // Shadda + Damma\n 0x0650: 0xfc62 // Shadda + Kasra\n }\n };\n\n var arabic_diacritics = {\n 1612: 64606, // Shadda + Dammatan\n 1613: 64607, // Shadda + Kasratan\n 1614: 64608, // Shadda + Fatha\n 1615: 64609, // Shadda + Damma\n 1616: 64610 // Shadda + Kasra\n };\n\n var alfletter = [1570, 1571, 1573, 1575];\n\n var noChangeInForm = -1;\n var isolatedForm = 0;\n var finalForm = 1;\n var initialForm = 2;\n var medialForm = 3;\n\n jsPDFAPI.__arabicParser__ = {};\n\n //private\n var isInArabicSubstitutionA = (jsPDFAPI.__arabicParser__.isInArabicSubstitutionA = function(\n letter\n ) {\n return typeof arabicSubstitionA[letter.charCodeAt(0)] !== \"undefined\";\n });\n\n var isArabicLetter = (jsPDFAPI.__arabicParser__.isArabicLetter = function(\n letter\n ) {\n return (\n typeof letter === \"string\" &&\n /^[\\u0600-\\u06FF\\u0750-\\u077F\\u08A0-\\u08FF\\uFB50-\\uFDFF\\uFE70-\\uFEFF]+$/.test(\n letter\n )\n );\n });\n\n var isArabicEndLetter = (jsPDFAPI.__arabicParser__.isArabicEndLetter = function(\n letter\n ) {\n return (\n isArabicLetter(letter) &&\n isInArabicSubstitutionA(letter) &&\n arabicSubstitionA[letter.charCodeAt(0)].length <= 2\n );\n });\n\n var isArabicAlfLetter = (jsPDFAPI.__arabicParser__.isArabicAlfLetter = function(\n letter\n ) {\n return (\n isArabicLetter(letter) && alfletter.indexOf(letter.charCodeAt(0)) >= 0\n );\n });\n\n jsPDFAPI.__arabicParser__.arabicLetterHasIsolatedForm = function(letter) {\n return (\n isArabicLetter(letter) &&\n isInArabicSubstitutionA(letter) &&\n arabicSubstitionA[letter.charCodeAt(0)].length >= 1\n );\n };\n\n var arabicLetterHasFinalForm = (jsPDFAPI.__arabicParser__.arabicLetterHasFinalForm = function(\n letter\n ) {\n return (\n isArabicLetter(letter) &&\n isInArabicSubstitutionA(letter) &&\n arabicSubstitionA[letter.charCodeAt(0)].length >= 2\n );\n });\n\n jsPDFAPI.__arabicParser__.arabicLetterHasInitialForm = function(letter) {\n return (\n isArabicLetter(letter) &&\n isInArabicSubstitutionA(letter) &&\n arabicSubstitionA[letter.charCodeAt(0)].length >= 3\n );\n };\n\n var arabicLetterHasMedialForm = (jsPDFAPI.__arabicParser__.arabicLetterHasMedialForm = function(\n letter\n ) {\n return (\n isArabicLetter(letter) &&\n isInArabicSubstitutionA(letter) &&\n arabicSubstitionA[letter.charCodeAt(0)].length == 4\n );\n });\n\n var resolveLigatures = (jsPDFAPI.__arabicParser__.resolveLigatures = function(\n letters\n ) {\n var i = 0;\n var tmpLigatures = ligatures;\n var result = \"\";\n var effectedLetters = 0;\n\n for (i = 0; i < letters.length; i += 1) {\n if (typeof tmpLigatures[letters.charCodeAt(i)] !== \"undefined\") {\n effectedLetters++;\n tmpLigatures = tmpLigatures[letters.charCodeAt(i)];\n\n if (typeof tmpLigatures === \"number\") {\n result += String.fromCharCode(tmpLigatures);\n tmpLigatures = ligatures;\n effectedLetters = 0;\n }\n if (i === letters.length - 1) {\n tmpLigatures = ligatures;\n result += letters.charAt(i - (effectedLetters - 1));\n i = i - (effectedLetters - 1);\n effectedLetters = 0;\n }\n } else {\n tmpLigatures = ligatures;\n result += letters.charAt(i - effectedLetters);\n i = i - effectedLetters;\n effectedLetters = 0;\n }\n }\n\n return result;\n });\n\n jsPDFAPI.__arabicParser__.isArabicDiacritic = function(letter) {\n return (\n letter !== undefined &&\n arabic_diacritics[letter.charCodeAt(0)] !== undefined\n );\n };\n\n var getCorrectForm = (jsPDFAPI.__arabicParser__.getCorrectForm = function(\n currentChar,\n beforeChar,\n nextChar\n ) {\n if (!isArabicLetter(currentChar)) {\n return -1;\n }\n\n if (isInArabicSubstitutionA(currentChar) === false) {\n return noChangeInForm;\n }\n if (\n !arabicLetterHasFinalForm(currentChar) ||\n (!isArabicLetter(beforeChar) && !isArabicLetter(nextChar)) ||\n (!isArabicLetter(nextChar) && isArabicEndLetter(beforeChar)) ||\n (isArabicEndLetter(currentChar) && !isArabicLetter(beforeChar)) ||\n (isArabicEndLetter(currentChar) && isArabicAlfLetter(beforeChar)) ||\n (isArabicEndLetter(currentChar) && isArabicEndLetter(beforeChar))\n ) {\n return isolatedForm;\n }\n\n if (\n arabicLetterHasMedialForm(currentChar) &&\n isArabicLetter(beforeChar) &&\n !isArabicEndLetter(beforeChar) &&\n isArabicLetter(nextChar) &&\n arabicLetterHasFinalForm(nextChar)\n ) {\n return medialForm;\n }\n\n if (isArabicEndLetter(currentChar) || !isArabicLetter(nextChar)) {\n return finalForm;\n }\n return initialForm;\n });\n\n /**\n * @name processArabic\n * @function\n * @param {string} text\n * @returns {string}\n */\n var parseArabic = function(text) {\n text = text || \"\";\n\n var result = \"\";\n var i = 0;\n var j = 0;\n var position = 0;\n var currentLetter = \"\";\n var prevLetter = \"\";\n var nextLetter = \"\";\n\n var words = text.split(\"\\\\s+\");\n var newWords = [];\n for (i = 0; i < words.length; i += 1) {\n newWords.push(\"\");\n for (j = 0; j < words[i].length; j += 1) {\n currentLetter = words[i][j];\n prevLetter = words[i][j - 1];\n nextLetter = words[i][j + 1];\n if (isArabicLetter(currentLetter)) {\n position = getCorrectForm(currentLetter, prevLetter, nextLetter);\n if (position !== -1) {\n newWords[i] += String.fromCharCode(\n arabicSubstitionA[currentLetter.charCodeAt(0)][position]\n );\n } else {\n newWords[i] += currentLetter;\n }\n } else {\n newWords[i] += currentLetter;\n }\n }\n\n newWords[i] = resolveLigatures(newWords[i]);\n }\n result = newWords.join(\" \");\n\n return result;\n };\n\n var processArabic = (jsPDFAPI.__arabicParser__.processArabic = jsPDFAPI.processArabic = function() {\n var text =\n typeof arguments[0] === \"string\" ? arguments[0] : arguments[0].text;\n var tmpText = [];\n var result;\n\n if (Array.isArray(text)) {\n var i = 0;\n tmpText = [];\n for (i = 0; i < text.length; i += 1) {\n if (Array.isArray(text[i])) {\n tmpText.push([parseArabic(text[i][0]), text[i][1], text[i][2]]);\n } else {\n tmpText.push([parseArabic(text[i])]);\n }\n }\n result = tmpText;\n } else {\n result = parseArabic(text);\n }\n if (typeof arguments[0] === \"string\") {\n return result;\n } else {\n arguments[0].text = result;\n return arguments[0];\n }\n });\n\n jsPDFAPI.events.push([\"preProcessText\", processArabic]);\n})(jsPDF.API);\n","/** @license\n * jsPDF Autoprint Plugin\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name autoprint\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n /**\n * Makes the PDF automatically open the print-Dialog when opened in a PDF-viewer.\n *\n * @name autoPrint\n * @function\n * @param {Object} options (optional) Set the attribute variant to 'non-conform' (default) or 'javascript' to activate different methods of automatic printing when opening in a PDF-viewer .\n * @returns {jsPDF}\n * @example\n * var doc = new jsPDF();\n * doc.text(10, 10, 'This is a test');\n * doc.autoPrint({variant: 'non-conform'});\n * doc.save('autoprint.pdf');\n */\n jsPDFAPI.autoPrint = function(options) {\n \"use strict\";\n var refAutoPrintTag;\n options = options || {};\n options.variant = options.variant || \"non-conform\";\n\n switch (options.variant) {\n case \"javascript\":\n //https://github.com/Rob--W/pdf.js/commit/c676ecb5a0f54677b9f3340c3ef2cf42225453bb\n this.addJS(\"print({});\");\n break;\n case \"non-conform\":\n default:\n this.internal.events.subscribe(\"postPutResources\", function() {\n refAutoPrintTag = this.internal.newObject();\n this.internal.out(\"<<\");\n this.internal.out(\"/S /Named\");\n this.internal.out(\"/Type /Action\");\n this.internal.out(\"/N /Print\");\n this.internal.out(\">>\");\n this.internal.out(\"endobj\");\n });\n\n this.internal.events.subscribe(\"putCatalog\", function() {\n this.internal.out(\"/OpenAction \" + refAutoPrintTag + \" 0 R\");\n });\n break;\n }\n return this;\n };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF Canvas PlugIn\n * This plugin mimics the HTML5 Canvas\n *\n * The goal is to provide a way for current canvas users to print directly to a PDF.\n * @name canvas\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n /**\n * @class Canvas\n * @classdesc A Canvas Wrapper for jsPDF\n */\n var Canvas = function() {\n var jsPdfInstance = undefined;\n Object.defineProperty(this, \"pdf\", {\n get: function() {\n return jsPdfInstance;\n },\n set: function(value) {\n jsPdfInstance = value;\n }\n });\n\n var _width = 150;\n /**\n * The height property is a positive integer reflecting the height HTML attribute of the element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 150 is used.\n * This is one of the two properties, the other being width, that controls the size of the canvas.\n *\n * @name width\n */\n Object.defineProperty(this, \"width\", {\n get: function() {\n return _width;\n },\n set: function(value) {\n if (isNaN(value) || Number.isInteger(value) === false || value < 0) {\n _width = 150;\n } else {\n _width = value;\n }\n if (this.getContext(\"2d\").pageWrapXEnabled) {\n this.getContext(\"2d\").pageWrapX = _width + 1;\n }\n }\n });\n\n var _height = 300;\n /**\n * The width property is a positive integer reflecting the width HTML attribute of the element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 300 is used.\n * This is one of the two properties, the other being height, that controls the size of the canvas.\n *\n * @name height\n */\n Object.defineProperty(this, \"height\", {\n get: function() {\n return _height;\n },\n set: function(value) {\n if (isNaN(value) || Number.isInteger(value) === false || value < 0) {\n _height = 300;\n } else {\n _height = value;\n }\n if (this.getContext(\"2d\").pageWrapYEnabled) {\n this.getContext(\"2d\").pageWrapY = _height + 1;\n }\n }\n });\n\n var _childNodes = [];\n Object.defineProperty(this, \"childNodes\", {\n get: function() {\n return _childNodes;\n },\n set: function(value) {\n _childNodes = value;\n }\n });\n\n var _style = {};\n Object.defineProperty(this, \"style\", {\n get: function() {\n return _style;\n },\n set: function(value) {\n _style = value;\n }\n });\n\n Object.defineProperty(this, \"parentNode\", {});\n };\n\n /**\n * The getContext() method returns a drawing context on the canvas, or null if the context identifier is not supported.\n *\n * @name getContext\n * @function\n * @param {string} contextType Is a String containing the context identifier defining the drawing context associated to the canvas. Possible value is \"2d\", leading to the creation of a Context2D object representing a two-dimensional rendering context.\n * @param {object} contextAttributes\n */\n Canvas.prototype.getContext = function(contextType, contextAttributes) {\n contextType = contextType || \"2d\";\n var key;\n\n if (contextType !== \"2d\") {\n return null;\n }\n for (key in contextAttributes) {\n if (this.pdf.context2d.hasOwnProperty(key)) {\n this.pdf.context2d[key] = contextAttributes[key];\n }\n }\n this.pdf.context2d._canvas = this;\n return this.pdf.context2d;\n };\n\n /**\n * The toDataURL() method is just a stub to throw an error if accidently called.\n *\n * @name toDataURL\n * @function\n */\n Canvas.prototype.toDataURL = function() {\n throw new Error(\"toDataURL is not implemented.\");\n };\n\n jsPDFAPI.events.push([\n \"initialized\",\n function() {\n this.canvas = new Canvas();\n this.canvas.pdf = this;\n }\n ]);\n\n return this;\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com\n * 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br\n * 2013 Lee Driscoll, https://github.com/lsdriscoll\n * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria\n * 2014 James Hall, james@parall.ax\n * 2014 Diego Casorran, https://github.com/diegocr\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name cell\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n var NO_MARGINS = { left: 0, top: 0, bottom: 0, right: 0 };\n\n var px2pt = (0.264583 * 72) / 25.4;\n var printingHeaderRow = false;\n\n var _initialize = function() {\n if (typeof this.internal.__cell__ === \"undefined\") {\n this.internal.__cell__ = {};\n this.internal.__cell__.padding = 3;\n this.internal.__cell__.headerFunction = undefined;\n this.internal.__cell__.margins = Object.assign({}, NO_MARGINS);\n this.internal.__cell__.margins.width = this.getPageWidth();\n _reset.call(this);\n }\n };\n\n var _reset = function() {\n this.internal.__cell__.lastCell = new Cell();\n this.internal.__cell__.pages = 1;\n };\n\n var Cell = function() {\n var _x = arguments[0];\n Object.defineProperty(this, \"x\", {\n enumerable: true,\n get: function() {\n return _x;\n },\n set: function(value) {\n _x = value;\n }\n });\n var _y = arguments[1];\n Object.defineProperty(this, \"y\", {\n enumerable: true,\n get: function() {\n return _y;\n },\n set: function(value) {\n _y = value;\n }\n });\n var _width = arguments[2];\n Object.defineProperty(this, \"width\", {\n enumerable: true,\n get: function() {\n return _width;\n },\n set: function(value) {\n _width = value;\n }\n });\n var _height = arguments[3];\n Object.defineProperty(this, \"height\", {\n enumerable: true,\n get: function() {\n return _height;\n },\n set: function(value) {\n _height = value;\n }\n });\n var _text = arguments[4];\n Object.defineProperty(this, \"text\", {\n enumerable: true,\n get: function() {\n return _text;\n },\n set: function(value) {\n _text = value;\n }\n });\n var _lineNumber = arguments[5];\n Object.defineProperty(this, \"lineNumber\", {\n enumerable: true,\n get: function() {\n return _lineNumber;\n },\n set: function(value) {\n _lineNumber = value;\n }\n });\n var _align = arguments[6];\n Object.defineProperty(this, \"align\", {\n enumerable: true,\n get: function() {\n return _align;\n },\n set: function(value) {\n _align = value;\n }\n });\n\n return this;\n };\n\n Cell.prototype.clone = function() {\n return new Cell(\n this.x,\n this.y,\n this.width,\n this.height,\n this.text,\n this.lineNumber,\n this.align\n );\n };\n\n Cell.prototype.toArray = function() {\n return [\n this.x,\n this.y,\n this.width,\n this.height,\n this.text,\n this.lineNumber,\n this.align\n ];\n };\n\n /**\n * @name setHeaderFunction\n * @function\n * @param {function} func\n */\n jsPDFAPI.setHeaderFunction = function(func) {\n _initialize.call(this);\n this.internal.__cell__.headerFunction =\n typeof func === \"function\" ? func : undefined;\n return this;\n };\n\n /**\n * @name getTextDimensions\n * @function\n * @param {string} txt\n * @returns {Object} dimensions\n */\n jsPDFAPI.getTextDimensions = function(text, options) {\n _initialize.call(this);\n options = options || {};\n var fontSize = options.fontSize || this.getFontSize();\n var font = options.font || this.getFont();\n var scaleFactor = options.scaleFactor || this.internal.scaleFactor;\n var width = 0;\n var amountOfLines = 0;\n var height = 0;\n var tempWidth = 0;\n var scope = this;\n\n if (!Array.isArray(text) && typeof text !== \"string\") {\n if (typeof text === \"number\") {\n text = String(text);\n } else {\n throw new Error(\n \"getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.\"\n );\n }\n }\n\n const maxWidth = options.maxWidth;\n if (maxWidth > 0) {\n if (typeof text === \"string\") {\n text = this.splitTextToSize(text, maxWidth);\n } else if (Object.prototype.toString.call(text) === \"[object Array]\") {\n text = text.reduce(function(acc, textLine) {\n return acc.concat(scope.splitTextToSize(textLine, maxWidth));\n }, []);\n }\n } else {\n // Without the else clause, it will not work if you do not pass along maxWidth\n text = Array.isArray(text) ? text : [text];\n }\n\n for (var i = 0; i < text.length; i++) {\n tempWidth = this.getStringUnitWidth(text[i], { font: font }) * fontSize;\n if (width < tempWidth) {\n width = tempWidth;\n }\n }\n\n if (width !== 0) {\n amountOfLines = text.length;\n }\n\n width = width / scaleFactor;\n height = Math.max(\n (amountOfLines * fontSize * this.getLineHeightFactor() -\n fontSize * (this.getLineHeightFactor() - 1)) /\n scaleFactor,\n 0\n );\n return { w: width, h: height };\n };\n\n /**\n * @name cellAddPage\n * @function\n */\n jsPDFAPI.cellAddPage = function() {\n _initialize.call(this);\n\n this.addPage();\n\n var margins = this.internal.__cell__.margins || NO_MARGINS;\n this.internal.__cell__.lastCell = new Cell(\n margins.left,\n margins.top,\n undefined,\n undefined\n );\n this.internal.__cell__.pages += 1;\n\n return this;\n };\n\n /**\n * @name cell\n * @function\n * @param {number} x\n * @param {number} y\n * @param {number} width\n * @param {number} height\n * @param {string} text\n * @param {number} lineNumber lineNumber\n * @param {string} align\n * @return {jsPDF} jsPDF-instance\n */\n var cell = (jsPDFAPI.cell = function() {\n var currentCell;\n\n if (arguments[0] instanceof Cell) {\n currentCell = arguments[0];\n } else {\n currentCell = new Cell(\n arguments[0],\n arguments[1],\n arguments[2],\n arguments[3],\n arguments[4],\n arguments[5]\n );\n }\n _initialize.call(this);\n var lastCell = this.internal.__cell__.lastCell;\n var padding = this.internal.__cell__.padding;\n var margins = this.internal.__cell__.margins || NO_MARGINS;\n var tableHeaderRow = this.internal.__cell__.tableHeaderRow;\n var printHeaders = this.internal.__cell__.printHeaders;\n // If this is not the first cell, we must change its position\n if (typeof lastCell.lineNumber !== \"undefined\") {\n if (lastCell.lineNumber === currentCell.lineNumber) {\n //Same line\n currentCell.x = (lastCell.x || 0) + (lastCell.width || 0);\n currentCell.y = lastCell.y || 0;\n } else {\n //New line\n if (\n lastCell.y + lastCell.height + currentCell.height + margins.bottom >\n this.getPageHeight()\n ) {\n this.cellAddPage();\n currentCell.y = margins.top;\n if (printHeaders && tableHeaderRow) {\n this.printHeaderRow(currentCell.lineNumber, true);\n currentCell.y += tableHeaderRow[0].height;\n }\n } else {\n currentCell.y = lastCell.y + lastCell.height || currentCell.y;\n }\n }\n }\n\n if (typeof currentCell.text[0] !== \"undefined\") {\n this.rect(\n currentCell.x,\n currentCell.y,\n currentCell.width,\n currentCell.height,\n printingHeaderRow === true ? \"FD\" : undefined\n );\n if (currentCell.align === \"right\") {\n this.text(\n currentCell.text,\n currentCell.x + currentCell.width - padding,\n currentCell.y + padding,\n { align: \"right\", baseline: \"top\" }\n );\n } else if (currentCell.align === \"center\") {\n this.text(\n currentCell.text,\n currentCell.x + currentCell.width / 2,\n currentCell.y + padding,\n {\n align: \"center\",\n baseline: \"top\",\n maxWidth: currentCell.width - padding - padding\n }\n );\n } else {\n this.text(\n currentCell.text,\n currentCell.x + padding,\n currentCell.y + padding,\n {\n align: \"left\",\n baseline: \"top\",\n maxWidth: currentCell.width - padding - padding\n }\n );\n }\n }\n this.internal.__cell__.lastCell = currentCell;\n return this;\n });\n\n /**\n * Create a table from a set of data.\n * @name table\n * @function\n * @param {Integer} [x] : left-position for top-left corner of table\n * @param {Integer} [y] top-position for top-left corner of table\n * @param {Object[]} [data] An array of objects containing key-value pairs corresponding to a row of data.\n * @param {String[]} [headers] Omit or null to auto-generate headers at a performance cost\n\n * @param {Object} [config.printHeaders] True to print column headers at the top of every page\n * @param {Object} [config.autoSize] True to dynamically set the column widths to match the widest cell value\n * @param {Object} [config.margins] margin values for left, top, bottom, and width\n * @param {Object} [config.fontSize] Integer fontSize to use (optional)\n * @param {Object} [config.padding] cell-padding in pt to use (optional)\n * @param {Object} [config.headerBackgroundColor] default is #c8c8c8 (optional)\n * @param {Object} [config.headerTextColor] default is #000 (optional)\n * @param {Object} [config.rowStart] callback to handle before print each row (optional)\n * @param {Object} [config.cellStart] callback to handle before print each cell (optional)\n * @returns {jsPDF} jsPDF-instance\n */\n\n jsPDFAPI.table = function(x, y, data, headers, config) {\n _initialize.call(this);\n if (!data) {\n throw new Error(\"No data for PDF table.\");\n }\n\n config = config || {};\n\n var headerNames = [],\n headerLabels = [],\n headerAligns = [],\n i,\n columnMatrix = {},\n columnWidths = {},\n column,\n columnMinWidths = [],\n j,\n tableHeaderConfigs = [],\n //set up defaults. If a value is provided in config, defaults will be overwritten:\n autoSize = config.autoSize || false,\n printHeaders = config.printHeaders === false ? false : true,\n fontSize =\n config.css && typeof config.css[\"font-size\"] !== \"undefined\"\n ? config.css[\"font-size\"] * 16\n : config.fontSize || 12,\n margins =\n config.margins ||\n Object.assign({ width: this.getPageWidth() }, NO_MARGINS),\n padding = typeof config.padding === \"number\" ? config.padding : 3,\n headerBackgroundColor = config.headerBackgroundColor || \"#c8c8c8\",\n headerTextColor = config.headerTextColor || \"#000\";\n\n _reset.call(this);\n\n this.internal.__cell__.printHeaders = printHeaders;\n this.internal.__cell__.margins = margins;\n this.internal.__cell__.table_font_size = fontSize;\n this.internal.__cell__.padding = padding;\n this.internal.__cell__.headerBackgroundColor = headerBackgroundColor;\n this.internal.__cell__.headerTextColor = headerTextColor;\n this.setFontSize(fontSize);\n\n // Set header values\n if (headers === undefined || headers === null) {\n // No headers defined so we derive from data\n headerNames = Object.keys(data[0]);\n headerLabels = headerNames;\n headerAligns = headerNames.map(function() {\n return \"left\";\n });\n } else if (Array.isArray(headers) && typeof headers[0] === \"object\") {\n headerNames = headers.map(function(header) {\n return header.name;\n });\n headerLabels = headers.map(function(header) {\n return header.prompt || header.name || \"\";\n });\n headerAligns = headers.map(function(header) {\n return header.align || \"left\";\n });\n // Split header configs into names and prompts\n for (i = 0; i < headers.length; i += 1) {\n columnWidths[headers[i].name] = headers[i].width * px2pt;\n }\n } else if (Array.isArray(headers) && typeof headers[0] === \"string\") {\n headerNames = headers;\n headerLabels = headerNames;\n headerAligns = headerNames.map(function() {\n return \"left\";\n });\n }\n\n if (\n autoSize ||\n (Array.isArray(headers) && typeof headers[0] === \"string\")\n ) {\n var headerName;\n for (i = 0; i < headerNames.length; i += 1) {\n headerName = headerNames[i];\n\n // Create a matrix of columns e.g., {column_title: [row1_Record, row2_Record]}\n\n columnMatrix[headerName] = data.map(function(rec) {\n return rec[headerName];\n });\n\n // get header width\n this.setFont(undefined, \"bold\");\n columnMinWidths.push(\n this.getTextDimensions(headerLabels[i], {\n fontSize: this.internal.__cell__.table_font_size,\n scaleFactor: this.internal.scaleFactor\n }).w\n );\n column = columnMatrix[headerName];\n\n // get cell widths\n this.setFont(undefined, \"normal\");\n for (j = 0; j < column.length; j += 1) {\n columnMinWidths.push(\n this.getTextDimensions(column[j], {\n fontSize: this.internal.__cell__.table_font_size,\n scaleFactor: this.internal.scaleFactor\n }).w\n );\n }\n\n // get final column width\n columnWidths[headerName] =\n Math.max.apply(null, columnMinWidths) + padding + padding;\n\n //have to reset\n columnMinWidths = [];\n }\n }\n\n // -- Construct the table\n\n if (printHeaders) {\n var row = {};\n for (i = 0; i < headerNames.length; i += 1) {\n row[headerNames[i]] = {};\n row[headerNames[i]].text = headerLabels[i];\n row[headerNames[i]].align = headerAligns[i];\n }\n\n var rowHeight = calculateLineHeight.call(this, row, columnWidths);\n\n // Construct the header row\n tableHeaderConfigs = headerNames.map(function(value) {\n return new Cell(\n x,\n y,\n columnWidths[value],\n rowHeight,\n row[value].text,\n undefined,\n row[value].align\n );\n });\n\n // Store the table header config\n this.setTableHeaderRow(tableHeaderConfigs);\n\n // Print the header for the start of the table\n this.printHeaderRow(1, false);\n }\n\n // Construct the data rows\n\n var align = headers.reduce(function(pv, cv) {\n pv[cv.name] = cv.align;\n return pv;\n }, {});\n for (i = 0; i < data.length; i += 1) {\n if (\"rowStart\" in config && config.rowStart instanceof Function) {\n config.rowStart(\n {\n row: i,\n data: data[i]\n },\n this\n );\n }\n var lineHeight = calculateLineHeight.call(this, data[i], columnWidths);\n\n for (j = 0; j < headerNames.length; j += 1) {\n var cellData = data[i][headerNames[j]];\n if (\"cellStart\" in config && config.cellStart instanceof Function) {\n config.cellStart(\n {\n row: i,\n col: j,\n data: cellData\n },\n this\n );\n }\n cell.call(\n this,\n new Cell(\n x,\n y,\n columnWidths[headerNames[j]],\n lineHeight,\n cellData,\n i + 2,\n align[headerNames[j]]\n )\n );\n }\n }\n this.internal.__cell__.table_x = x;\n this.internal.__cell__.table_y = y;\n return this;\n };\n\n /**\n * Calculate the height for containing the highest column\n *\n * @name calculateLineHeight\n * @function\n * @param {Object[]} model is the line of data we want to calculate the height of\n * @param {Integer[]} columnWidths is size of each column\n * @returns {number} lineHeight\n * @private\n */\n var calculateLineHeight = function calculateLineHeight(model, columnWidths) {\n var padding = this.internal.__cell__.padding;\n var fontSize = this.internal.__cell__.table_font_size;\n var scaleFactor = this.internal.scaleFactor;\n\n return Object.keys(model)\n .map(function(key) {\n var value = model[key];\n return this.splitTextToSize(\n value.hasOwnProperty(\"text\") ? value.text : value,\n columnWidths[key] - padding - padding\n );\n }, this)\n .map(function(value) {\n return (\n (this.getLineHeightFactor() * value.length * fontSize) / scaleFactor +\n padding +\n padding\n );\n }, this)\n .reduce(function(pv, cv) {\n return Math.max(pv, cv);\n }, 0);\n };\n\n /**\n * Store the config for outputting a table header\n *\n * @name setTableHeaderRow\n * @function\n * @param {Object[]} config\n * An array of cell configs that would define a header row: Each config matches the config used by jsPDFAPI.cell\n * except the lineNumber parameter is excluded\n */\n jsPDFAPI.setTableHeaderRow = function(config) {\n _initialize.call(this);\n this.internal.__cell__.tableHeaderRow = config;\n };\n\n /**\n * Output the store header row\n *\n * @name printHeaderRow\n * @function\n * @param {number} lineNumber The line number to output the header at\n * @param {boolean} new_page\n */\n jsPDFAPI.printHeaderRow = function(lineNumber, new_page) {\n _initialize.call(this);\n if (!this.internal.__cell__.tableHeaderRow) {\n throw new Error(\"Property tableHeaderRow does not exist.\");\n }\n\n var tableHeaderCell;\n\n printingHeaderRow = true;\n if (typeof this.internal.__cell__.headerFunction === \"function\") {\n var position = this.internal.__cell__.headerFunction(\n this,\n this.internal.__cell__.pages\n );\n this.internal.__cell__.lastCell = new Cell(\n position[0],\n position[1],\n position[2],\n position[3],\n undefined,\n -1\n );\n }\n this.setFont(undefined, \"bold\");\n\n var tempHeaderConf = [];\n for (var i = 0; i < this.internal.__cell__.tableHeaderRow.length; i += 1) {\n tableHeaderCell = this.internal.__cell__.tableHeaderRow[i].clone();\n if (new_page) {\n tableHeaderCell.y = this.internal.__cell__.margins.top || 0;\n tempHeaderConf.push(tableHeaderCell);\n }\n tableHeaderCell.lineNumber = lineNumber;\n var currentTextColor = this.getTextColor();\n this.setTextColor(this.internal.__cell__.headerTextColor);\n this.setFillColor(this.internal.__cell__.headerBackgroundColor);\n cell.call(this, tableHeaderCell);\n this.setTextColor(currentTextColor);\n }\n if (tempHeaderConf.length > 0) {\n this.setTableHeaderRow(tempHeaderConf);\n }\n this.setFont(undefined, \"normal\");\n printingHeaderRow = false;\n };\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF JavaScript plugin\n *\n * @name javascript\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n var jsNamesObj, jsJsObj, text;\n /**\n * @name addJS\n * @function\n * @param {string} javascript The javascript to be embedded into the PDF-file.\n * @returns {jsPDF}\n */\n jsPDFAPI.addJS = function(javascript) {\n text = javascript;\n this.internal.events.subscribe(\"postPutResources\", function() {\n jsNamesObj = this.internal.newObject();\n this.internal.out(\"<<\");\n this.internal.out(\"/Names [(EmbeddedJS) \" + (jsNamesObj + 1) + \" 0 R]\");\n this.internal.out(\">>\");\n this.internal.out(\"endobj\");\n\n jsJsObj = this.internal.newObject();\n this.internal.out(\"<<\");\n this.internal.out(\"/S /JavaScript\");\n this.internal.out(\"/JS (\" + text + \")\");\n this.internal.out(\">>\");\n this.internal.out(\"endobj\");\n });\n this.internal.events.subscribe(\"putCatalog\", function() {\n if (jsNamesObj !== undefined && jsJsObj !== undefined) {\n this.internal.out(\"/Names <>\");\n }\n });\n return this;\n };\n})(jsPDF.API);\n","/* eslint-disable no-fallthrough */\r\n/* eslint-disable no-console */\r\n/**\r\n * @license\r\n * jsPDF Context2D PlugIn Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv\r\n *\r\n * Licensed under the MIT License. http://opensource.org/licenses/mit-license\r\n */\r\n\r\nimport { jsPDF } from \"../jspdf.js\";\r\nimport { RGBColor } from \"../libs/rgbcolor.js\";\r\nimport { console } from \"../libs/console.js\";\r\nimport {\r\n buildFontFaceMap,\r\n parseFontFamily,\r\n resolveFontFace\r\n} from \"../libs/fontFace.js\";\r\n\r\n/**\r\n * This plugin mimics the HTML5 CanvasRenderingContext2D.\r\n *\r\n * The goal is to provide a way for current canvas implementations to print directly to a PDF.\r\n *\r\n * @name context2d\r\n * @module\r\n */\r\n(function(jsPDFAPI) {\r\n \"use strict\";\r\n var ContextLayer = function(ctx) {\r\n ctx = ctx || {};\r\n this.isStrokeTransparent = ctx.isStrokeTransparent || false;\r\n this.strokeOpacity = ctx.strokeOpacity || 1;\r\n this.strokeStyle = ctx.strokeStyle || \"#000000\";\r\n this.fillStyle = ctx.fillStyle || \"#000000\";\r\n this.isFillTransparent = ctx.isFillTransparent || false;\r\n this.fillOpacity = ctx.fillOpacity || 1;\r\n this.font = ctx.font || \"10px sans-serif\";\r\n this.textBaseline = ctx.textBaseline || \"alphabetic\";\r\n this.textAlign = ctx.textAlign || \"left\";\r\n this.lineWidth = ctx.lineWidth || 1;\r\n this.lineJoin = ctx.lineJoin || \"miter\";\r\n this.lineCap = ctx.lineCap || \"butt\";\r\n this.path = ctx.path || [];\r\n this.transform =\r\n typeof ctx.transform !== \"undefined\"\r\n ? ctx.transform.clone()\r\n : new Matrix();\r\n this.globalCompositeOperation = ctx.globalCompositeOperation || \"normal\";\r\n this.globalAlpha = ctx.globalAlpha || 1.0;\r\n this.clip_path = ctx.clip_path || [];\r\n this.currentPoint = ctx.currentPoint || new Point();\r\n this.miterLimit = ctx.miterLimit || 10.0;\r\n this.lastPoint = ctx.lastPoint || new Point();\r\n this.lineDashOffset = ctx.lineDashOffset || 0.0;\r\n this.lineDash = ctx.lineDash || [];\r\n this.margin = ctx.margin || [0, 0, 0, 0];\r\n this.prevPageLastElemOffset = ctx.prevPageLastElemOffset || 0;\r\n\r\n this.ignoreClearRect =\r\n typeof ctx.ignoreClearRect === \"boolean\" ? ctx.ignoreClearRect : true;\r\n return this;\r\n };\r\n\r\n //stub\r\n var f2,\r\n getHorizontalCoordinateString,\r\n getVerticalCoordinateString,\r\n getHorizontalCoordinate,\r\n getVerticalCoordinate,\r\n Point,\r\n Rectangle,\r\n Matrix,\r\n _ctx;\r\n jsPDFAPI.events.push([\r\n \"initialized\",\r\n function() {\r\n this.context2d = new Context2D(this);\r\n\r\n f2 = this.internal.f2;\r\n getHorizontalCoordinateString = this.internal.getCoordinateString;\r\n getVerticalCoordinateString = this.internal.getVerticalCoordinateString;\r\n getHorizontalCoordinate = this.internal.getHorizontalCoordinate;\r\n getVerticalCoordinate = this.internal.getVerticalCoordinate;\r\n Point = this.internal.Point;\r\n Rectangle = this.internal.Rectangle;\r\n Matrix = this.internal.Matrix;\r\n _ctx = new ContextLayer();\r\n }\r\n ]);\r\n\r\n var Context2D = function(pdf) {\r\n Object.defineProperty(this, \"canvas\", {\r\n get: function() {\r\n return { parentNode: false, style: false };\r\n }\r\n });\r\n\r\n var _pdf = pdf;\r\n Object.defineProperty(this, \"pdf\", {\r\n get: function() {\r\n return _pdf;\r\n }\r\n });\r\n\r\n var _pageWrapXEnabled = false;\r\n /**\r\n * @name pageWrapXEnabled\r\n * @type {boolean}\r\n * @default false\r\n */\r\n Object.defineProperty(this, \"pageWrapXEnabled\", {\r\n get: function() {\r\n return _pageWrapXEnabled;\r\n },\r\n set: function(value) {\r\n _pageWrapXEnabled = Boolean(value);\r\n }\r\n });\r\n\r\n var _pageWrapYEnabled = false;\r\n /**\r\n * @name pageWrapYEnabled\r\n * @type {boolean}\r\n * @default true\r\n */\r\n Object.defineProperty(this, \"pageWrapYEnabled\", {\r\n get: function() {\r\n return _pageWrapYEnabled;\r\n },\r\n set: function(value) {\r\n _pageWrapYEnabled = Boolean(value);\r\n }\r\n });\r\n\r\n var _posX = 0;\r\n /**\r\n * @name posX\r\n * @type {number}\r\n * @default 0\r\n */\r\n Object.defineProperty(this, \"posX\", {\r\n get: function() {\r\n return _posX;\r\n },\r\n set: function(value) {\r\n if (!isNaN(value)) {\r\n _posX = value;\r\n }\r\n }\r\n });\r\n\r\n var _posY = 0;\r\n /**\r\n * @name posY\r\n * @type {number}\r\n * @default 0\r\n */\r\n Object.defineProperty(this, \"posY\", {\r\n get: function() {\r\n return _posY;\r\n },\r\n set: function(value) {\r\n if (!isNaN(value)) {\r\n _posY = value;\r\n }\r\n }\r\n });\r\n\r\n /**\r\n * Gets or sets the page margin when using auto paging. Has no effect when {@link autoPaging} is off.\r\n * @name margin\r\n * @type {number|number[]}\r\n * @default [0, 0, 0, 0]\r\n */\r\n Object.defineProperty(this, \"margin\", {\r\n get: function() {\r\n return _ctx.margin;\r\n },\r\n set: function(value) {\r\n var margin;\r\n if (typeof value === \"number\") {\r\n margin = [value, value, value, value];\r\n } else {\r\n margin = new Array(4);\r\n margin[0] = value[0];\r\n margin[1] = value.length >= 2 ? value[1] : margin[0];\r\n margin[2] = value.length >= 3 ? value[2] : margin[0];\r\n margin[3] = value.length >= 4 ? value[3] : margin[1];\r\n }\r\n _ctx.margin = margin;\r\n }\r\n });\r\n\r\n var _autoPaging = false;\r\n /**\r\n * Gets or sets the auto paging mode. When auto paging is enabled, the context2d will automatically draw on the\r\n * next page if a shape or text chunk doesn't fit entirely on the current page. The context2d will create new\r\n * pages if required.\r\n *\r\n * Context2d supports different modes:\r\n *
      \r\n *
    • \r\n * false: Auto paging is disabled.\r\n *
    • \r\n *
    • \r\n * true or 'slice': Will cut shapes or text chunks across page breaks. Will possibly\r\n * slice text in half, making it difficult to read.\r\n *
    • \r\n *
    • \r\n * 'text': Trys not to cut text in half across page breaks. Works best for documents consisting\r\n * mostly of a single column of text.\r\n *
    • \r\n *
    \r\n * @name Context2D#autoPaging\r\n * @type {boolean|\"slice\"|\"text\"}\r\n * @default false\r\n */\r\n Object.defineProperty(this, \"autoPaging\", {\r\n get: function() {\r\n return _autoPaging;\r\n },\r\n set: function(value) {\r\n _autoPaging = value;\r\n }\r\n });\r\n\r\n var lastBreak = 0;\r\n /**\r\n * @name lastBreak\r\n * @type {number}\r\n * @default 0\r\n */\r\n Object.defineProperty(this, \"lastBreak\", {\r\n get: function() {\r\n return lastBreak;\r\n },\r\n set: function(value) {\r\n lastBreak = value;\r\n }\r\n });\r\n\r\n var pageBreaks = [];\r\n /**\r\n * Y Position of page breaks.\r\n * @name pageBreaks\r\n * @type {number}\r\n * @default 0\r\n */\r\n Object.defineProperty(this, \"pageBreaks\", {\r\n get: function() {\r\n return pageBreaks;\r\n },\r\n set: function(value) {\r\n pageBreaks = value;\r\n }\r\n });\r\n\r\n /**\r\n * @name ctx\r\n * @type {object}\r\n * @default {}\r\n */\r\n Object.defineProperty(this, \"ctx\", {\r\n get: function() {\r\n return _ctx;\r\n },\r\n set: function(value) {\r\n if (value instanceof ContextLayer) {\r\n _ctx = value;\r\n }\r\n }\r\n });\r\n\r\n /**\r\n * @name path\r\n * @type {array}\r\n * @default []\r\n */\r\n Object.defineProperty(this, \"path\", {\r\n get: function() {\r\n return _ctx.path;\r\n },\r\n set: function(value) {\r\n _ctx.path = value;\r\n }\r\n });\r\n\r\n /**\r\n * @name ctxStack\r\n * @type {array}\r\n * @default []\r\n */\r\n var _ctxStack = [];\r\n Object.defineProperty(this, \"ctxStack\", {\r\n get: function() {\r\n return _ctxStack;\r\n },\r\n set: function(value) {\r\n _ctxStack = value;\r\n }\r\n });\r\n\r\n /**\r\n * Sets or returns the color, gradient, or pattern used to fill the drawing\r\n *\r\n * @name fillStyle\r\n * @default #000000\r\n * @property {(color|gradient|pattern)} value The color of the drawing. Default value is #000000
    \r\n * A gradient object (linear or radial) used to fill the drawing (not supported by context2d)
    \r\n * A pattern object to use to fill the drawing (not supported by context2d)\r\n */\r\n Object.defineProperty(this, \"fillStyle\", {\r\n get: function() {\r\n return this.ctx.fillStyle;\r\n },\r\n set: function(value) {\r\n var rgba;\r\n rgba = getRGBA(value);\r\n\r\n this.ctx.fillStyle = rgba.style;\r\n this.ctx.isFillTransparent = rgba.a === 0;\r\n this.ctx.fillOpacity = rgba.a;\r\n\r\n this.pdf.setFillColor(rgba.r, rgba.g, rgba.b, { a: rgba.a });\r\n this.pdf.setTextColor(rgba.r, rgba.g, rgba.b, { a: rgba.a });\r\n }\r\n });\r\n\r\n /**\r\n * Sets or returns the color, gradient, or pattern used for strokes\r\n *\r\n * @name strokeStyle\r\n * @default #000000\r\n * @property {color} color A CSS color value that indicates the stroke color of the drawing. Default value is #000000 (not supported by context2d)\r\n * @property {gradient} gradient A gradient object (linear or radial) used to create a gradient stroke (not supported by context2d)\r\n * @property {pattern} pattern A pattern object used to create a pattern stroke (not supported by context2d)\r\n */\r\n Object.defineProperty(this, \"strokeStyle\", {\r\n get: function() {\r\n return this.ctx.strokeStyle;\r\n },\r\n set: function(value) {\r\n var rgba = getRGBA(value);\r\n\r\n this.ctx.strokeStyle = rgba.style;\r\n this.ctx.isStrokeTransparent = rgba.a === 0;\r\n this.ctx.strokeOpacity = rgba.a;\r\n\r\n if (rgba.a === 0) {\r\n this.pdf.setDrawColor(255, 255, 255);\r\n } else if (rgba.a === 1) {\r\n this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);\r\n } else {\r\n this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);\r\n }\r\n }\r\n });\r\n\r\n /**\r\n * Sets or returns the style of the end caps for a line\r\n *\r\n * @name lineCap\r\n * @default butt\r\n * @property {(butt|round|square)} lineCap butt A flat edge is added to each end of the line
    \r\n * round A rounded end cap is added to each end of the line
    \r\n * square A square end cap is added to each end of the line
    \r\n */\r\n Object.defineProperty(this, \"lineCap\", {\r\n get: function() {\r\n return this.ctx.lineCap;\r\n },\r\n set: function(value) {\r\n if ([\"butt\", \"round\", \"square\"].indexOf(value) !== -1) {\r\n this.ctx.lineCap = value;\r\n this.pdf.setLineCap(value);\r\n }\r\n }\r\n });\r\n\r\n /**\r\n * Sets or returns the current line width\r\n *\r\n * @name lineWidth\r\n * @default 1\r\n * @property {number} lineWidth The current line width, in pixels\r\n */\r\n Object.defineProperty(this, \"lineWidth\", {\r\n get: function() {\r\n return this.ctx.lineWidth;\r\n },\r\n set: function(value) {\r\n if (!isNaN(value)) {\r\n this.ctx.lineWidth = value;\r\n this.pdf.setLineWidth(value);\r\n }\r\n }\r\n });\r\n\r\n /**\r\n * Sets or returns the type of corner created, when two lines meet\r\n */\r\n Object.defineProperty(this, \"lineJoin\", {\r\n get: function() {\r\n return this.ctx.lineJoin;\r\n },\r\n set: function(value) {\r\n if ([\"bevel\", \"round\", \"miter\"].indexOf(value) !== -1) {\r\n this.ctx.lineJoin = value;\r\n this.pdf.setLineJoin(value);\r\n }\r\n }\r\n });\r\n\r\n /**\r\n * A number specifying the miter limit ratio in coordinate space units. Zero, negative, Infinity, and NaN values are ignored. The default value is 10.0.\r\n *\r\n * @name miterLimit\r\n * @default 10\r\n */\r\n Object.defineProperty(this, \"miterLimit\", {\r\n get: function() {\r\n return this.ctx.miterLimit;\r\n },\r\n set: function(value) {\r\n if (!isNaN(value)) {\r\n this.ctx.miterLimit = value;\r\n this.pdf.setMiterLimit(value);\r\n }\r\n }\r\n });\r\n\r\n Object.defineProperty(this, \"textBaseline\", {\r\n get: function() {\r\n return this.ctx.textBaseline;\r\n },\r\n set: function(value) {\r\n this.ctx.textBaseline = value;\r\n }\r\n });\r\n\r\n Object.defineProperty(this, \"textAlign\", {\r\n get: function() {\r\n return this.ctx.textAlign;\r\n },\r\n set: function(value) {\r\n if ([\"right\", \"end\", \"center\", \"left\", \"start\"].indexOf(value) !== -1) {\r\n this.ctx.textAlign = value;\r\n }\r\n }\r\n });\r\n\r\n var _fontFaceMap = null;\r\n\r\n function getFontFaceMap(pdf, fontFaces) {\r\n if (_fontFaceMap === null) {\r\n var fontMap = pdf.getFontList();\r\n\r\n var convertedFontFaces = convertToFontFaces(fontMap);\r\n\r\n _fontFaceMap = buildFontFaceMap(convertedFontFaces.concat(fontFaces));\r\n }\r\n\r\n return _fontFaceMap;\r\n }\r\n\r\n function convertToFontFaces(fontMap) {\r\n var fontFaces = [];\r\n\r\n Object.keys(fontMap).forEach(function(family) {\r\n var styles = fontMap[family];\r\n\r\n styles.forEach(function(style) {\r\n var fontFace = null;\r\n\r\n switch (style) {\r\n case \"bold\":\r\n fontFace = {\r\n family: family,\r\n weight: \"bold\"\r\n };\r\n break;\r\n\r\n case \"italic\":\r\n fontFace = {\r\n family: family,\r\n style: \"italic\"\r\n };\r\n break;\r\n\r\n case \"bolditalic\":\r\n fontFace = {\r\n family: family,\r\n weight: \"bold\",\r\n style: \"italic\"\r\n };\r\n break;\r\n\r\n case \"\":\r\n case \"normal\":\r\n fontFace = {\r\n family: family\r\n };\r\n break;\r\n }\r\n\r\n // If font-face is still null here, it is a font with some styling we don't recognize and\r\n // cannot map or it is a font added via the fontFaces option of .html().\r\n if (fontFace !== null) {\r\n fontFace.ref = {\r\n name: family,\r\n style: style\r\n };\r\n\r\n fontFaces.push(fontFace);\r\n }\r\n });\r\n });\r\n\r\n return fontFaces;\r\n }\r\n\r\n var _fontFaces = null;\r\n /**\r\n * A map of available font-faces, as passed in the options of\r\n * .html(). If set a limited implementation of the font style matching\r\n * algorithm defined by https://www.w3.org/TR/css-fonts-3/#font-matching-algorithm\r\n * will be used. If not set it will fallback to previous behavior.\r\n */\r\n\r\n Object.defineProperty(this, \"fontFaces\", {\r\n get: function() {\r\n return _fontFaces;\r\n },\r\n set: function(value) {\r\n _fontFaceMap = null;\r\n _fontFaces = value;\r\n }\r\n });\r\n\r\n Object.defineProperty(this, \"font\", {\r\n get: function() {\r\n return this.ctx.font;\r\n },\r\n set: function(value) {\r\n this.ctx.font = value;\r\n var rx, matches;\r\n\r\n //source: https://stackoverflow.com/a/10136041\r\n // eslint-disable-next-line no-useless-escape\r\n rx = /^\\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;\r\n matches = rx.exec(value);\r\n if (matches !== null) {\r\n var fontStyle = matches[1];\r\n var fontVariant = matches[2];\r\n var fontWeight = matches[3];\r\n var fontSize = matches[4];\r\n var lineHeight = matches[5];\r\n var fontFamily = matches[6];\r\n } else {\r\n return;\r\n }\r\n var rxFontSize = /^([.\\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i;\r\n var fontSizeUnit = rxFontSize.exec(fontSize)[2];\r\n\r\n if (\"px\" === fontSizeUnit) {\r\n fontSize = Math.floor(\r\n parseFloat(fontSize) * this.pdf.internal.scaleFactor\r\n );\r\n } else if (\"em\" === fontSizeUnit) {\r\n fontSize = Math.floor(parseFloat(fontSize) * this.pdf.getFontSize());\r\n } else {\r\n fontSize = Math.floor(\r\n parseFloat(fontSize) * this.pdf.internal.scaleFactor\r\n );\r\n }\r\n\r\n this.pdf.setFontSize(fontSize);\r\n var parts = parseFontFamily(fontFamily);\r\n\r\n if (this.fontFaces) {\r\n var fontFaceMap = getFontFaceMap(this.pdf, this.fontFaces);\r\n\r\n var rules = parts.map(function(ff) {\r\n return {\r\n family: ff,\r\n stretch: \"normal\", // TODO: Extract font-stretch from font rule (perhaps write proper parser for it?)\r\n weight: fontWeight,\r\n style: fontStyle\r\n };\r\n });\r\n\r\n var font = resolveFontFace(fontFaceMap, rules);\r\n this.pdf.setFont(font.ref.name, font.ref.style);\r\n return;\r\n }\r\n\r\n var style = \"\";\r\n if (\r\n fontWeight === \"bold\" ||\r\n parseInt(fontWeight, 10) >= 700 ||\r\n fontStyle === \"bold\"\r\n ) {\r\n style = \"bold\";\r\n }\r\n\r\n if (fontStyle === \"italic\") {\r\n style += \"italic\";\r\n }\r\n\r\n if (style.length === 0) {\r\n style = \"normal\";\r\n }\r\n var jsPdfFontName = \"\";\r\n\r\n var fallbackFonts = {\r\n arial: \"Helvetica\",\r\n Arial: \"Helvetica\",\r\n verdana: \"Helvetica\",\r\n Verdana: \"Helvetica\",\r\n helvetica: \"Helvetica\",\r\n Helvetica: \"Helvetica\",\r\n \"sans-serif\": \"Helvetica\",\r\n fixed: \"Courier\",\r\n monospace: \"Courier\",\r\n terminal: \"Courier\",\r\n cursive: \"Times\",\r\n fantasy: \"Times\",\r\n serif: \"Times\"\r\n };\r\n\r\n for (var i = 0; i < parts.length; i++) {\r\n if (\r\n this.pdf.internal.getFont(parts[i], style, {\r\n noFallback: true,\r\n disableWarning: true\r\n }) !== undefined\r\n ) {\r\n jsPdfFontName = parts[i];\r\n break;\r\n } else if (\r\n style === \"bolditalic\" &&\r\n this.pdf.internal.getFont(parts[i], \"bold\", {\r\n noFallback: true,\r\n disableWarning: true\r\n }) !== undefined\r\n ) {\r\n jsPdfFontName = parts[i];\r\n style = \"bold\";\r\n } else if (\r\n this.pdf.internal.getFont(parts[i], \"normal\", {\r\n noFallback: true,\r\n disableWarning: true\r\n }) !== undefined\r\n ) {\r\n jsPdfFontName = parts[i];\r\n style = \"normal\";\r\n break;\r\n }\r\n }\r\n if (jsPdfFontName === \"\") {\r\n for (var j = 0; j < parts.length; j++) {\r\n if (fallbackFonts[parts[j]]) {\r\n jsPdfFontName = fallbackFonts[parts[j]];\r\n break;\r\n }\r\n }\r\n }\r\n jsPdfFontName = jsPdfFontName === \"\" ? \"Times\" : jsPdfFontName;\r\n this.pdf.setFont(jsPdfFontName, style);\r\n }\r\n });\r\n\r\n Object.defineProperty(this, \"globalCompositeOperation\", {\r\n get: function() {\r\n return this.ctx.globalCompositeOperation;\r\n },\r\n set: function(value) {\r\n this.ctx.globalCompositeOperation = value;\r\n }\r\n });\r\n\r\n Object.defineProperty(this, \"globalAlpha\", {\r\n get: function() {\r\n return this.ctx.globalAlpha;\r\n },\r\n set: function(value) {\r\n this.ctx.globalAlpha = value;\r\n }\r\n });\r\n\r\n /**\r\n * A float specifying the amount of the line dash offset. The default value is 0.0.\r\n *\r\n * @name lineDashOffset\r\n * @default 0.0\r\n */\r\n Object.defineProperty(this, \"lineDashOffset\", {\r\n get: function() {\r\n return this.ctx.lineDashOffset;\r\n },\r\n set: function(value) {\r\n this.ctx.lineDashOffset = value;\r\n setLineDash.call(this);\r\n }\r\n });\r\n\r\n // Not HTML API\r\n Object.defineProperty(this, \"lineDash\", {\r\n get: function() {\r\n return this.ctx.lineDash;\r\n },\r\n set: function(value) {\r\n this.ctx.lineDash = value;\r\n setLineDash.call(this);\r\n }\r\n });\r\n\r\n // Not HTML API\r\n Object.defineProperty(this, \"ignoreClearRect\", {\r\n get: function() {\r\n return this.ctx.ignoreClearRect;\r\n },\r\n set: function(value) {\r\n this.ctx.ignoreClearRect = Boolean(value);\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Sets the line dash pattern used when stroking lines.\r\n * @name setLineDash\r\n * @function\r\n * @description It uses an array of values that specify alternating lengths of lines and gaps which describe the pattern.\r\n */\r\n Context2D.prototype.setLineDash = function(dashArray) {\r\n this.lineDash = dashArray;\r\n };\r\n\r\n /**\r\n * gets the current line dash pattern.\r\n * @name getLineDash\r\n * @function\r\n * @returns {Array} An Array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units). If the number, when setting the elements, is odd, the elements of the array get copied and concatenated. For example, setting the line dash to [5, 15, 25] will result in getting back [5, 15, 25, 5, 15, 25].\r\n */\r\n Context2D.prototype.getLineDash = function() {\r\n if (this.lineDash.length % 2) {\r\n // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getLineDash#return_value\r\n return this.lineDash.concat(this.lineDash);\r\n } else {\r\n // The copied value is returned to prevent contamination from outside.\r\n return this.lineDash.slice();\r\n }\r\n };\r\n\r\n Context2D.prototype.fill = function() {\r\n pathPreProcess.call(this, \"fill\", false);\r\n };\r\n\r\n /**\r\n * Actually draws the path you have defined\r\n *\r\n * @name stroke\r\n * @function\r\n * @description The stroke() method actually draws the path you have defined with all those moveTo() and lineTo() methods. The default color is black.\r\n */\r\n Context2D.prototype.stroke = function() {\r\n pathPreProcess.call(this, \"stroke\", false);\r\n };\r\n\r\n /**\r\n * Begins a path, or resets the current\r\n *\r\n * @name beginPath\r\n * @function\r\n * @description The beginPath() method begins a path, or resets the current path.\r\n */\r\n Context2D.prototype.beginPath = function() {\r\n this.path = [\r\n {\r\n type: \"begin\"\r\n }\r\n ];\r\n };\r\n\r\n /**\r\n * Moves the path to the specified point in the canvas, without creating a line\r\n *\r\n * @name moveTo\r\n * @function\r\n * @param x {Number} The x-coordinate of where to move the path to\r\n * @param y {Number} The y-coordinate of where to move the path to\r\n */\r\n Context2D.prototype.moveTo = function(x, y) {\r\n if (isNaN(x) || isNaN(y)) {\r\n console.error(\"jsPDF.context2d.moveTo: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.moveTo\");\r\n }\r\n\r\n var pt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n\r\n this.path.push({\r\n type: \"mt\",\r\n x: pt.x,\r\n y: pt.y\r\n });\r\n this.ctx.lastPoint = new Point(x, y);\r\n };\r\n\r\n /**\r\n * Creates a path from the current point back to the starting point\r\n *\r\n * @name closePath\r\n * @function\r\n * @description The closePath() method creates a path from the current point back to the starting point.\r\n */\r\n Context2D.prototype.closePath = function() {\r\n var pathBegin = new Point(0, 0);\r\n var i = 0;\r\n for (i = this.path.length - 1; i !== -1; i--) {\r\n if (this.path[i].type === \"begin\") {\r\n if (\r\n typeof this.path[i + 1] === \"object\" &&\r\n typeof this.path[i + 1].x === \"number\"\r\n ) {\r\n pathBegin = new Point(this.path[i + 1].x, this.path[i + 1].y);\r\n break;\r\n }\r\n }\r\n }\r\n this.path.push({\r\n type: \"close\"\r\n });\r\n this.ctx.lastPoint = new Point(pathBegin.x, pathBegin.y);\r\n };\r\n\r\n /**\r\n * Adds a new point and creates a line to that point from the last specified point in the canvas\r\n *\r\n * @name lineTo\r\n * @function\r\n * @param x The x-coordinate of where to create the line to\r\n * @param y The y-coordinate of where to create the line to\r\n * @description The lineTo() method adds a new point and creates a line TO that point FROM the last specified point in the canvas (this method does not draw the line).\r\n */\r\n Context2D.prototype.lineTo = function(x, y) {\r\n if (isNaN(x) || isNaN(y)) {\r\n console.error(\"jsPDF.context2d.lineTo: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.lineTo\");\r\n }\r\n\r\n var pt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n\r\n this.path.push({\r\n type: \"lt\",\r\n x: pt.x,\r\n y: pt.y\r\n });\r\n this.ctx.lastPoint = new Point(pt.x, pt.y);\r\n };\r\n\r\n /**\r\n * Clips a region of any shape and size from the original canvas\r\n *\r\n * @name clip\r\n * @function\r\n * @description The clip() method clips a region of any shape and size from the original canvas.\r\n */\r\n Context2D.prototype.clip = function() {\r\n this.ctx.clip_path = JSON.parse(JSON.stringify(this.path));\r\n pathPreProcess.call(this, null, true);\r\n };\r\n\r\n /**\r\n * Creates a cubic Bézier curve\r\n *\r\n * @name quadraticCurveTo\r\n * @function\r\n * @param cpx {Number} The x-coordinate of the Bézier control point\r\n * @param cpy {Number} The y-coordinate of the Bézier control point\r\n * @param x {Number} The x-coordinate of the ending point\r\n * @param y {Number} The y-coordinate of the ending point\r\n * @description The quadraticCurveTo() method adds a point to the current path by using the specified control points that represent a quadratic Bézier curve.

    A quadratic Bézier curve requires two points. The first point is a control point that is used in the quadratic Bézier calculation and the second point is the ending point for the curve. The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.\r\n */\r\n Context2D.prototype.quadraticCurveTo = function(cpx, cpy, x, y) {\r\n if (isNaN(x) || isNaN(y) || isNaN(cpx) || isNaN(cpy)) {\r\n console.error(\r\n \"jsPDF.context2d.quadraticCurveTo: Invalid arguments\",\r\n arguments\r\n );\r\n throw new Error(\r\n \"Invalid arguments passed to jsPDF.context2d.quadraticCurveTo\"\r\n );\r\n }\r\n\r\n var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));\r\n var pt1 = this.ctx.transform.applyToPoint(new Point(cpx, cpy));\r\n\r\n this.path.push({\r\n type: \"qct\",\r\n x1: pt1.x,\r\n y1: pt1.y,\r\n x: pt0.x,\r\n y: pt0.y\r\n });\r\n this.ctx.lastPoint = new Point(pt0.x, pt0.y);\r\n };\r\n\r\n /**\r\n * Creates a cubic Bézier curve\r\n *\r\n * @name bezierCurveTo\r\n * @function\r\n * @param cp1x {Number} The x-coordinate of the first Bézier control point\r\n * @param cp1y {Number} The y-coordinate of the first Bézier control point\r\n * @param cp2x {Number} The x-coordinate of the second Bézier control point\r\n * @param cp2y {Number} The y-coordinate of the second Bézier control point\r\n * @param x {Number} The x-coordinate of the ending point\r\n * @param y {Number} The y-coordinate of the ending point\r\n * @description The bezierCurveTo() method adds a point to the current path by using the specified control points that represent a cubic Bézier curve.

    A cubic bezier curve requires three points. The first two points are control points that are used in the cubic Bézier calculation and the last point is the ending point for the curve. The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.\r\n */\r\n Context2D.prototype.bezierCurveTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {\r\n if (\r\n isNaN(x) ||\r\n isNaN(y) ||\r\n isNaN(cp1x) ||\r\n isNaN(cp1y) ||\r\n isNaN(cp2x) ||\r\n isNaN(cp2y)\r\n ) {\r\n console.error(\r\n \"jsPDF.context2d.bezierCurveTo: Invalid arguments\",\r\n arguments\r\n );\r\n throw new Error(\r\n \"Invalid arguments passed to jsPDF.context2d.bezierCurveTo\"\r\n );\r\n }\r\n var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));\r\n var pt1 = this.ctx.transform.applyToPoint(new Point(cp1x, cp1y));\r\n var pt2 = this.ctx.transform.applyToPoint(new Point(cp2x, cp2y));\r\n\r\n this.path.push({\r\n type: \"bct\",\r\n x1: pt1.x,\r\n y1: pt1.y,\r\n x2: pt2.x,\r\n y2: pt2.y,\r\n x: pt0.x,\r\n y: pt0.y\r\n });\r\n this.ctx.lastPoint = new Point(pt0.x, pt0.y);\r\n };\r\n\r\n /**\r\n * Creates an arc/curve (used to create circles, or parts of circles)\r\n *\r\n * @name arc\r\n * @function\r\n * @param x {Number} The x-coordinate of the center of the circle\r\n * @param y {Number} The y-coordinate of the center of the circle\r\n * @param radius {Number} The radius of the circle\r\n * @param startAngle {Number} The starting angle, in radians (0 is at the 3 o'clock position of the arc's circle)\r\n * @param endAngle {Number} The ending angle, in radians\r\n * @param counterclockwise {Boolean} Optional. Specifies whether the drawing should be counterclockwise or clockwise. False is default, and indicates clockwise, while true indicates counter-clockwise.\r\n * @description The arc() method creates an arc/curve (used to create circles, or parts of circles).\r\n */\r\n Context2D.prototype.arc = function(\r\n x,\r\n y,\r\n radius,\r\n startAngle,\r\n endAngle,\r\n counterclockwise\r\n ) {\r\n if (\r\n isNaN(x) ||\r\n isNaN(y) ||\r\n isNaN(radius) ||\r\n isNaN(startAngle) ||\r\n isNaN(endAngle)\r\n ) {\r\n console.error(\"jsPDF.context2d.arc: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.arc\");\r\n }\r\n counterclockwise = Boolean(counterclockwise);\r\n\r\n if (!this.ctx.transform.isIdentity) {\r\n var xpt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n x = xpt.x;\r\n y = xpt.y;\r\n\r\n var x_radPt = this.ctx.transform.applyToPoint(new Point(0, radius));\r\n var x_radPt0 = this.ctx.transform.applyToPoint(new Point(0, 0));\r\n radius = Math.sqrt(\r\n Math.pow(x_radPt.x - x_radPt0.x, 2) +\r\n Math.pow(x_radPt.y - x_radPt0.y, 2)\r\n );\r\n }\r\n if (Math.abs(endAngle - startAngle) >= 2 * Math.PI) {\r\n startAngle = 0;\r\n endAngle = 2 * Math.PI;\r\n }\r\n\r\n this.path.push({\r\n type: \"arc\",\r\n x: x,\r\n y: y,\r\n radius: radius,\r\n startAngle: startAngle,\r\n endAngle: endAngle,\r\n counterclockwise: counterclockwise\r\n });\r\n // this.ctx.lastPoint(new Point(pt.x,pt.y));\r\n };\r\n\r\n /**\r\n * Creates an arc/curve between two tangents\r\n *\r\n * @name arcTo\r\n * @function\r\n * @param x1 {Number} The x-coordinate of the first tangent\r\n * @param y1 {Number} The y-coordinate of the first tangent\r\n * @param x2 {Number} The x-coordinate of the second tangent\r\n * @param y2 {Number} The y-coordinate of the second tangent\r\n * @param radius The radius of the arc\r\n * @description The arcTo() method creates an arc/curve between two tangents on the canvas.\r\n */\r\n // eslint-disable-next-line no-unused-vars\r\n Context2D.prototype.arcTo = function(x1, y1, x2, y2, radius) {\r\n throw new Error(\"arcTo not implemented.\");\r\n };\r\n\r\n /**\r\n * Creates a rectangle\r\n *\r\n * @name rect\r\n * @function\r\n * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n * @param w {Number} The width of the rectangle, in pixels\r\n * @param h {Number} The height of the rectangle, in pixels\r\n * @description The rect() method creates a rectangle.\r\n */\r\n Context2D.prototype.rect = function(x, y, w, h) {\r\n if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n console.error(\"jsPDF.context2d.rect: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.rect\");\r\n }\r\n this.moveTo(x, y);\r\n this.lineTo(x + w, y);\r\n this.lineTo(x + w, y + h);\r\n this.lineTo(x, y + h);\r\n this.lineTo(x, y);\r\n this.lineTo(x + w, y);\r\n this.lineTo(x, y);\r\n };\r\n\r\n /**\r\n * Draws a \"filled\" rectangle\r\n *\r\n * @name fillRect\r\n * @function\r\n * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n * @param w {Number} The width of the rectangle, in pixels\r\n * @param h {Number} The height of the rectangle, in pixels\r\n * @description The fillRect() method draws a \"filled\" rectangle. The default color of the fill is black.\r\n */\r\n Context2D.prototype.fillRect = function(x, y, w, h) {\r\n if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n console.error(\"jsPDF.context2d.fillRect: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.fillRect\");\r\n }\r\n if (isFillTransparent.call(this)) {\r\n return;\r\n }\r\n var tmp = {};\r\n if (this.lineCap !== \"butt\") {\r\n tmp.lineCap = this.lineCap;\r\n this.lineCap = \"butt\";\r\n }\r\n if (this.lineJoin !== \"miter\") {\r\n tmp.lineJoin = this.lineJoin;\r\n this.lineJoin = \"miter\";\r\n }\r\n\r\n this.beginPath();\r\n this.rect(x, y, w, h);\r\n this.fill();\r\n\r\n if (tmp.hasOwnProperty(\"lineCap\")) {\r\n this.lineCap = tmp.lineCap;\r\n }\r\n if (tmp.hasOwnProperty(\"lineJoin\")) {\r\n this.lineJoin = tmp.lineJoin;\r\n }\r\n };\r\n\r\n /**\r\n * Draws a rectangle (no fill)\r\n *\r\n * @name strokeRect\r\n * @function\r\n * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n * @param w {Number} The width of the rectangle, in pixels\r\n * @param h {Number} The height of the rectangle, in pixels\r\n * @description The strokeRect() method draws a rectangle (no fill). The default color of the stroke is black.\r\n */\r\n Context2D.prototype.strokeRect = function strokeRect(x, y, w, h) {\r\n if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n console.error(\"jsPDF.context2d.strokeRect: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.strokeRect\");\r\n }\r\n if (isStrokeTransparent.call(this)) {\r\n return;\r\n }\r\n this.beginPath();\r\n this.rect(x, y, w, h);\r\n this.stroke();\r\n };\r\n\r\n /**\r\n * Clears the specified pixels within a given rectangle\r\n *\r\n * @name clearRect\r\n * @function\r\n * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n * @param w {Number} The width of the rectangle to clear, in pixels\r\n * @param h {Number} The height of the rectangle to clear, in pixels\r\n * @description We cannot clear PDF commands that were already written to PDF, so we use white instead.
    \r\n * As a special case, read a special flag (ignoreClearRect) and do nothing if it is set.\r\n * This results in all calls to clearRect() to do nothing, and keep the canvas transparent.\r\n * This flag is stored in the save/restore context and is managed the same way as other drawing states.\r\n *\r\n */\r\n Context2D.prototype.clearRect = function(x, y, w, h) {\r\n if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n console.error(\"jsPDF.context2d.clearRect: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.clearRect\");\r\n }\r\n if (this.ignoreClearRect) {\r\n return;\r\n }\r\n\r\n this.fillStyle = \"#ffffff\";\r\n this.fillRect(x, y, w, h);\r\n };\r\n\r\n /**\r\n * Saves the state of the current context\r\n *\r\n * @name save\r\n * @function\r\n */\r\n Context2D.prototype.save = function(doStackPush) {\r\n doStackPush = typeof doStackPush === \"boolean\" ? doStackPush : true;\r\n var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {\r\n this.pdf.setPage(i + 1);\r\n this.pdf.internal.out(\"q\");\r\n }\r\n this.pdf.setPage(tmpPageNumber);\r\n\r\n if (doStackPush) {\r\n this.ctx.fontSize = this.pdf.internal.getFontSize();\r\n var ctx = new ContextLayer(this.ctx);\r\n this.ctxStack.push(this.ctx);\r\n this.ctx = ctx;\r\n }\r\n };\r\n\r\n /**\r\n * Returns previously saved path state and attributes\r\n *\r\n * @name restore\r\n * @function\r\n */\r\n Context2D.prototype.restore = function(doStackPop) {\r\n doStackPop = typeof doStackPop === \"boolean\" ? doStackPop : true;\r\n var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {\r\n this.pdf.setPage(i + 1);\r\n this.pdf.internal.out(\"Q\");\r\n }\r\n this.pdf.setPage(tmpPageNumber);\r\n\r\n if (doStackPop && this.ctxStack.length !== 0) {\r\n this.ctx = this.ctxStack.pop();\r\n this.fillStyle = this.ctx.fillStyle;\r\n this.strokeStyle = this.ctx.strokeStyle;\r\n this.font = this.ctx.font;\r\n this.lineCap = this.ctx.lineCap;\r\n this.lineWidth = this.ctx.lineWidth;\r\n this.lineJoin = this.ctx.lineJoin;\r\n this.lineDash = this.ctx.lineDash;\r\n this.lineDashOffset = this.ctx.lineDashOffset;\r\n }\r\n };\r\n\r\n /**\r\n * @name toDataURL\r\n * @function\r\n */\r\n Context2D.prototype.toDataURL = function() {\r\n throw new Error(\"toDataUrl not implemented.\");\r\n };\r\n\r\n //helper functions\r\n\r\n /**\r\n * Get the decimal values of r, g, b and a\r\n *\r\n * @name getRGBA\r\n * @function\r\n * @private\r\n * @ignore\r\n */\r\n var getRGBA = function(style) {\r\n var rxRgb = /rgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/;\r\n var rxRgba = /rgba\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*([\\d.]+)\\s*\\)/;\r\n var rxTransparent = /transparent|rgba\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*0+\\s*\\)/;\r\n\r\n var r, g, b, a;\r\n\r\n if (style.isCanvasGradient === true) {\r\n style = style.getColor();\r\n }\r\n\r\n if (!style) {\r\n return { r: 0, g: 0, b: 0, a: 0, style: style };\r\n }\r\n\r\n if (rxTransparent.test(style)) {\r\n r = 0;\r\n g = 0;\r\n b = 0;\r\n a = 0;\r\n } else {\r\n var matches = rxRgb.exec(style);\r\n if (matches !== null) {\r\n r = parseInt(matches[1]);\r\n g = parseInt(matches[2]);\r\n b = parseInt(matches[3]);\r\n a = 1;\r\n } else {\r\n matches = rxRgba.exec(style);\r\n if (matches !== null) {\r\n r = parseInt(matches[1]);\r\n g = parseInt(matches[2]);\r\n b = parseInt(matches[3]);\r\n a = parseFloat(matches[4]);\r\n } else {\r\n a = 1;\r\n\r\n if (typeof style === \"string\" && style.charAt(0) !== \"#\") {\r\n var rgbColor = new RGBColor(style);\r\n if (rgbColor.ok) {\r\n style = rgbColor.toHex();\r\n } else {\r\n style = \"#000000\";\r\n }\r\n }\r\n\r\n if (style.length === 4) {\r\n r = style.substring(1, 2);\r\n r += r;\r\n g = style.substring(2, 3);\r\n g += g;\r\n b = style.substring(3, 4);\r\n b += b;\r\n } else {\r\n r = style.substring(1, 3);\r\n g = style.substring(3, 5);\r\n b = style.substring(5, 7);\r\n }\r\n r = parseInt(r, 16);\r\n g = parseInt(g, 16);\r\n b = parseInt(b, 16);\r\n }\r\n }\r\n }\r\n return { r: r, g: g, b: b, a: a, style: style };\r\n };\r\n\r\n /**\r\n * @name isFillTransparent\r\n * @function\r\n * @private\r\n * @ignore\r\n * @returns {Boolean}\r\n */\r\n var isFillTransparent = function() {\r\n return this.ctx.isFillTransparent || this.globalAlpha == 0;\r\n };\r\n\r\n /**\r\n * @name isStrokeTransparent\r\n * @function\r\n * @private\r\n * @ignore\r\n * @returns {Boolean}\r\n */\r\n var isStrokeTransparent = function() {\r\n return Boolean(this.ctx.isStrokeTransparent || this.globalAlpha == 0);\r\n };\r\n\r\n /**\r\n * Draws \"filled\" text on the canvas\r\n *\r\n * @name fillText\r\n * @function\r\n * @param text {String} Specifies the text that will be written on the canvas\r\n * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)\r\n * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)\r\n * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels\r\n * @description The fillText() method draws filled text on the canvas. The default color of the text is black.\r\n */\r\n Context2D.prototype.fillText = function(text, x, y, maxWidth) {\r\n if (isNaN(x) || isNaN(y) || typeof text !== \"string\") {\r\n console.error(\"jsPDF.context2d.fillText: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.fillText\");\r\n }\r\n maxWidth = isNaN(maxWidth) ? undefined : maxWidth;\r\n if (isFillTransparent.call(this)) {\r\n return;\r\n }\r\n\r\n var degs = rad2deg(this.ctx.transform.rotation);\r\n\r\n // We only use X axis as scale hint\r\n var scale = this.ctx.transform.scaleX;\r\n\r\n putText.call(this, {\r\n text: text,\r\n x: x,\r\n y: y,\r\n scale: scale,\r\n angle: degs,\r\n align: this.textAlign,\r\n maxWidth: maxWidth\r\n });\r\n };\r\n\r\n /**\r\n * Draws text on the canvas (no fill)\r\n *\r\n * @name strokeText\r\n * @function\r\n * @param text {String} Specifies the text that will be written on the canvas\r\n * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)\r\n * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)\r\n * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels\r\n * @description The strokeText() method draws text (with no fill) on the canvas. The default color of the text is black.\r\n */\r\n Context2D.prototype.strokeText = function(text, x, y, maxWidth) {\r\n if (isNaN(x) || isNaN(y) || typeof text !== \"string\") {\r\n console.error(\"jsPDF.context2d.strokeText: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.strokeText\");\r\n }\r\n if (isStrokeTransparent.call(this)) {\r\n return;\r\n }\r\n\r\n maxWidth = isNaN(maxWidth) ? undefined : maxWidth;\r\n\r\n var degs = rad2deg(this.ctx.transform.rotation);\r\n var scale = this.ctx.transform.scaleX;\r\n\r\n putText.call(this, {\r\n text: text,\r\n x: x,\r\n y: y,\r\n scale: scale,\r\n renderingMode: \"stroke\",\r\n angle: degs,\r\n align: this.textAlign,\r\n maxWidth: maxWidth\r\n });\r\n };\r\n\r\n /**\r\n * Returns an object that contains the width of the specified text\r\n *\r\n * @name measureText\r\n * @function\r\n * @param text {String} The text to be measured\r\n * @description The measureText() method returns an object that contains the width of the specified text, in pixels.\r\n * @returns {Number}\r\n */\r\n Context2D.prototype.measureText = function(text) {\r\n if (typeof text !== \"string\") {\r\n console.error(\r\n \"jsPDF.context2d.measureText: Invalid arguments\",\r\n arguments\r\n );\r\n throw new Error(\r\n \"Invalid arguments passed to jsPDF.context2d.measureText\"\r\n );\r\n }\r\n var pdf = this.pdf;\r\n var k = this.pdf.internal.scaleFactor;\r\n\r\n var fontSize = pdf.internal.getFontSize();\r\n var txtWidth =\r\n (pdf.getStringUnitWidth(text) * fontSize) / pdf.internal.scaleFactor;\r\n txtWidth *= Math.round(((k * 96) / 72) * 10000) / 10000;\r\n\r\n var TextMetrics = function(options) {\r\n options = options || {};\r\n var _width = options.width || 0;\r\n Object.defineProperty(this, \"width\", {\r\n get: function() {\r\n return _width;\r\n }\r\n });\r\n return this;\r\n };\r\n return new TextMetrics({ width: txtWidth });\r\n };\r\n\r\n //Transformations\r\n\r\n /**\r\n * Scales the current drawing bigger or smaller\r\n *\r\n * @name scale\r\n * @function\r\n * @param scalewidth {Number} Scales the width of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)\r\n * @param scaleheight {Number} Scales the height of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)\r\n * @description The scale() method scales the current drawing, bigger or smaller.\r\n */\r\n Context2D.prototype.scale = function(scalewidth, scaleheight) {\r\n if (isNaN(scalewidth) || isNaN(scaleheight)) {\r\n console.error(\"jsPDF.context2d.scale: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.scale\");\r\n }\r\n var matrix = new Matrix(scalewidth, 0.0, 0.0, scaleheight, 0.0, 0.0);\r\n this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n };\r\n\r\n /**\r\n * Rotates the current drawing\r\n *\r\n * @name rotate\r\n * @function\r\n * @param angle {Number} The rotation angle, in radians.\r\n * @description To calculate from degrees to radians: degrees*Math.PI/180.
    \r\n * Example: to rotate 5 degrees, specify the following: 5*Math.PI/180\r\n */\r\n Context2D.prototype.rotate = function(angle) {\r\n if (isNaN(angle)) {\r\n console.error(\"jsPDF.context2d.rotate: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.rotate\");\r\n }\r\n var matrix = new Matrix(\r\n Math.cos(angle),\r\n Math.sin(angle),\r\n -Math.sin(angle),\r\n Math.cos(angle),\r\n 0.0,\r\n 0.0\r\n );\r\n this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n };\r\n\r\n /**\r\n * Remaps the (0,0) position on the canvas\r\n *\r\n * @name translate\r\n * @function\r\n * @param x {Number} The value to add to horizontal (x) coordinates\r\n * @param y {Number} The value to add to vertical (y) coordinates\r\n * @description The translate() method remaps the (0,0) position on the canvas.\r\n */\r\n Context2D.prototype.translate = function(x, y) {\r\n if (isNaN(x) || isNaN(y)) {\r\n console.error(\"jsPDF.context2d.translate: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.translate\");\r\n }\r\n var matrix = new Matrix(1.0, 0.0, 0.0, 1.0, x, y);\r\n this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n };\r\n\r\n /**\r\n * Replaces the current transformation matrix for the drawing\r\n *\r\n * @name transform\r\n * @function\r\n * @param a {Number} Horizontal scaling\r\n * @param b {Number} Horizontal skewing\r\n * @param c {Number} Vertical skewing\r\n * @param d {Number} Vertical scaling\r\n * @param e {Number} Horizontal moving\r\n * @param f {Number} Vertical moving\r\n * @description Each object on the canvas has a current transformation matrix.

    The transform() method replaces the current transformation matrix. It multiplies the current transformation matrix with the matrix described by:



    a c e

    b d f

    0 0 1

    In other words, the transform() method lets you scale, rotate, move, and skew the current context.\r\n */\r\n Context2D.prototype.transform = function(a, b, c, d, e, f) {\r\n if (isNaN(a) || isNaN(b) || isNaN(c) || isNaN(d) || isNaN(e) || isNaN(f)) {\r\n console.error(\"jsPDF.context2d.transform: Invalid arguments\", arguments);\r\n throw new Error(\"Invalid arguments passed to jsPDF.context2d.transform\");\r\n }\r\n var matrix = new Matrix(a, b, c, d, e, f);\r\n this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n };\r\n\r\n /**\r\n * Resets the current transform to the identity matrix. Then runs transform()\r\n *\r\n * @name setTransform\r\n * @function\r\n * @param a {Number} Horizontal scaling\r\n * @param b {Number} Horizontal skewing\r\n * @param c {Number} Vertical skewing\r\n * @param d {Number} Vertical scaling\r\n * @param e {Number} Horizontal moving\r\n * @param f {Number} Vertical moving\r\n * @description Each object on the canvas has a current transformation matrix.

    The setTransform() method resets the current transform to the identity matrix, and then runs transform() with the same arguments.

    In other words, the setTransform() method lets you scale, rotate, move, and skew the current context.\r\n */\r\n Context2D.prototype.setTransform = function(a, b, c, d, e, f) {\r\n a = isNaN(a) ? 1 : a;\r\n b = isNaN(b) ? 0 : b;\r\n c = isNaN(c) ? 0 : c;\r\n d = isNaN(d) ? 1 : d;\r\n e = isNaN(e) ? 0 : e;\r\n f = isNaN(f) ? 0 : f;\r\n this.ctx.transform = new Matrix(a, b, c, d, e, f);\r\n };\r\n\r\n /**\r\n * Should only be used if pageWrapYEnabled is true\r\n *\r\n * @name setPageByYPosition\r\n * @function\r\n * @private\r\n * @ignore\r\n * @returns One-based Page Number\r\n */\r\n var setPageByYPosition = function(y) {\r\n if (this.pageWrapYEnabled) {\r\n this.lastBreak = 0;\r\n var manualBreaks = 0;\r\n var autoBreaks = 0;\r\n for (var i = 0; i < this.pageBreaks.length; i++) {\r\n if (y >= this.pageBreaks[i]) {\r\n manualBreaks++;\r\n if (this.lastBreak === 0) {\r\n autoBreaks++;\r\n }\r\n var spaceBetweenLastBreak = this.pageBreaks[i] - this.lastBreak;\r\n this.lastBreak = this.pageBreaks[i];\r\n var pagesSinceLastBreak = Math.floor(\r\n spaceBetweenLastBreak / this.pageWrapY\r\n );\r\n autoBreaks += pagesSinceLastBreak;\r\n }\r\n }\r\n if (this.lastBreak === 0) {\r\n var pagesSinceLastBreak = Math.floor(y / this.pageWrapY) + 1;\r\n autoBreaks += pagesSinceLastBreak;\r\n }\r\n return autoBreaks + manualBreaks;\r\n } else {\r\n return this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n }\r\n };\r\n\r\n var hasMargins = function() {\r\n return (\r\n this.margin[0] > 0 ||\r\n this.margin[1] > 0 ||\r\n this.margin[2] > 0 ||\r\n this.margin[3] > 0\r\n );\r\n };\r\n\r\n /**\r\n * Draws an image, canvas, or video onto the canvas\r\n *\r\n * @function\r\n * @param img {} Specifies the image, canvas, or video element to use\r\n * @param sx {Number} Optional. The x coordinate where to start clipping\r\n * @param sy {Number} Optional. The y coordinate where to start clipping\r\n * @param swidth {Number} Optional. The width of the clipped image\r\n * @param sheight {Number} Optional. The height of the clipped image\r\n * @param x {Number} The x coordinate where to place the image on the canvas\r\n * @param y {Number} The y coordinate where to place the image on the canvas\r\n * @param width {Number} Optional. The width of the image to use (stretch or reduce the image)\r\n * @param height {Number} Optional. The height of the image to use (stretch or reduce the image)\r\n */\r\n Context2D.prototype.drawImage = function(\r\n img,\r\n sx,\r\n sy,\r\n swidth,\r\n sheight,\r\n x,\r\n y,\r\n width,\r\n height\r\n ) {\r\n var imageProperties = this.pdf.getImageProperties(img);\r\n var factorX = 1;\r\n var factorY = 1;\r\n var isClip;\r\n\r\n var clipFactorX = 1;\r\n var clipFactorY = 1;\r\n\r\n if (typeof swidth !== \"undefined\" && typeof width !== \"undefined\") {\r\n isClip = true;\r\n clipFactorX = width / swidth;\r\n clipFactorY = height / sheight;\r\n factorX = ((imageProperties.width / swidth) * width) / swidth;\r\n factorY = ((imageProperties.height / sheight) * height) / sheight;\r\n }\r\n\r\n //is sx and sy are set and x and y not, set x and y with values of sx and sy\r\n if (typeof x === \"undefined\") {\r\n x = sx;\r\n y = sy;\r\n sx = 0;\r\n sy = 0;\r\n }\r\n\r\n if (typeof swidth !== \"undefined\" && typeof width === \"undefined\") {\r\n width = swidth;\r\n height = sheight;\r\n }\r\n if (typeof swidth === \"undefined\" && typeof width === \"undefined\") {\r\n width = imageProperties.width;\r\n height = imageProperties.height;\r\n }\r\n\r\n var decomposedTransformationMatrix = this.ctx.transform.decompose();\r\n var angle = rad2deg(decomposedTransformationMatrix.rotate.shx);\r\n var matrix = new Matrix();\r\n matrix = matrix.multiply(decomposedTransformationMatrix.translate);\r\n matrix = matrix.multiply(decomposedTransformationMatrix.skew);\r\n matrix = matrix.multiply(decomposedTransformationMatrix.scale);\r\n var xRect = matrix.applyToRectangle(\r\n new Rectangle(\r\n x - sx * clipFactorX,\r\n y - sy * clipFactorY,\r\n swidth * factorX,\r\n sheight * factorY\r\n )\r\n );\r\n var pageArray = getPagesByPath.call(this, xRect);\r\n var pages = [];\r\n for (var ii = 0; ii < pageArray.length; ii += 1) {\r\n if (pages.indexOf(pageArray[ii]) === -1) {\r\n pages.push(pageArray[ii]);\r\n }\r\n }\r\n\r\n sortPages(pages);\r\n\r\n var clipPath;\r\n if (this.autoPaging) {\r\n var min = pages[0];\r\n var max = pages[pages.length - 1];\r\n for (var i = min; i < max + 1; i++) {\r\n this.pdf.setPage(i);\r\n\r\n var pageWidthMinusMargins =\r\n this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];\r\n var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n var firstPageHeight =\r\n this.pdf.internal.pageSize.height -\r\n this.posY -\r\n this.margin[0] -\r\n this.margin[2];\r\n var pageHeightMinusMargins =\r\n this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n var previousPageHeightSum =\r\n i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;\r\n\r\n if (this.ctx.clip_path.length !== 0) {\r\n var tmpPaths = this.path;\r\n clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n this.path = pathPositionRedo(\r\n clipPath,\r\n this.posX + this.margin[3],\r\n -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n );\r\n drawPaths.call(this, \"fill\", true);\r\n this.path = tmpPaths;\r\n }\r\n var tmpRect = JSON.parse(JSON.stringify(xRect));\r\n tmpRect = pathPositionRedo(\r\n [tmpRect],\r\n this.posX + this.margin[3],\r\n -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n )[0];\r\n\r\n const needsClipping = (i > min || i < max) && hasMargins.call(this);\r\n\r\n if (needsClipping) {\r\n this.pdf.saveGraphicsState();\r\n this.pdf\r\n .rect(\r\n this.margin[3],\r\n this.margin[0],\r\n pageWidthMinusMargins,\r\n pageHeightMinusMargins,\r\n null\r\n )\r\n .clip()\r\n .discardPath();\r\n }\r\n this.pdf.addImage(\r\n img,\r\n \"JPEG\",\r\n tmpRect.x,\r\n tmpRect.y,\r\n tmpRect.w,\r\n tmpRect.h,\r\n null,\r\n null,\r\n angle\r\n );\r\n if (needsClipping) {\r\n this.pdf.restoreGraphicsState();\r\n }\r\n }\r\n } else {\r\n this.pdf.addImage(\r\n img,\r\n \"JPEG\",\r\n xRect.x,\r\n xRect.y,\r\n xRect.w,\r\n xRect.h,\r\n null,\r\n null,\r\n angle\r\n );\r\n }\r\n };\r\n\r\n var getPagesByPath = function(path, pageWrapX, pageWrapY) {\r\n var result = [];\r\n pageWrapX = pageWrapX || this.pdf.internal.pageSize.width;\r\n pageWrapY =\r\n pageWrapY ||\r\n this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n var yOffset = this.posY + this.ctx.prevPageLastElemOffset;\r\n\r\n switch (path.type) {\r\n default:\r\n case \"mt\":\r\n case \"lt\":\r\n result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);\r\n break;\r\n case \"arc\":\r\n result.push(\r\n Math.floor((path.y + yOffset - path.radius) / pageWrapY) + 1\r\n );\r\n result.push(\r\n Math.floor((path.y + yOffset + path.radius) / pageWrapY) + 1\r\n );\r\n break;\r\n case \"qct\":\r\n var rectOfQuadraticCurve = getQuadraticCurveBoundary(\r\n this.ctx.lastPoint.x,\r\n this.ctx.lastPoint.y,\r\n path.x1,\r\n path.y1,\r\n path.x,\r\n path.y\r\n );\r\n result.push(\r\n Math.floor((rectOfQuadraticCurve.y + yOffset) / pageWrapY) + 1\r\n );\r\n result.push(\r\n Math.floor(\r\n (rectOfQuadraticCurve.y + rectOfQuadraticCurve.h + yOffset) /\r\n pageWrapY\r\n ) + 1\r\n );\r\n break;\r\n case \"bct\":\r\n var rectOfBezierCurve = getBezierCurveBoundary(\r\n this.ctx.lastPoint.x,\r\n this.ctx.lastPoint.y,\r\n path.x1,\r\n path.y1,\r\n path.x2,\r\n path.y2,\r\n path.x,\r\n path.y\r\n );\r\n result.push(\r\n Math.floor((rectOfBezierCurve.y + yOffset) / pageWrapY) + 1\r\n );\r\n result.push(\r\n Math.floor(\r\n (rectOfBezierCurve.y + rectOfBezierCurve.h + yOffset) / pageWrapY\r\n ) + 1\r\n );\r\n break;\r\n case \"rect\":\r\n result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);\r\n result.push(Math.floor((path.y + path.h + yOffset) / pageWrapY) + 1);\r\n }\r\n\r\n for (var i = 0; i < result.length; i += 1) {\r\n while (this.pdf.internal.getNumberOfPages() < result[i]) {\r\n addPage.call(this);\r\n }\r\n }\r\n return result;\r\n };\r\n\r\n var addPage = function() {\r\n var fillStyle = this.fillStyle;\r\n var strokeStyle = this.strokeStyle;\r\n var font = this.font;\r\n var lineCap = this.lineCap;\r\n var lineWidth = this.lineWidth;\r\n var lineJoin = this.lineJoin;\r\n this.pdf.addPage();\r\n this.fillStyle = fillStyle;\r\n this.strokeStyle = strokeStyle;\r\n this.font = font;\r\n this.lineCap = lineCap;\r\n this.lineWidth = lineWidth;\r\n this.lineJoin = lineJoin;\r\n };\r\n\r\n var pathPositionRedo = function(paths, x, y) {\r\n for (var i = 0; i < paths.length; i++) {\r\n switch (paths[i].type) {\r\n case \"bct\":\r\n paths[i].x2 += x;\r\n paths[i].y2 += y;\r\n case \"qct\":\r\n paths[i].x1 += x;\r\n paths[i].y1 += y;\r\n case \"mt\":\r\n case \"lt\":\r\n case \"arc\":\r\n default:\r\n paths[i].x += x;\r\n paths[i].y += y;\r\n }\r\n }\r\n return paths;\r\n };\r\n\r\n var sortPages = function(pages) {\r\n return pages.sort(function(a, b) {\r\n return a - b;\r\n });\r\n };\r\n\r\n var pathPreProcess = function(rule, isClip) {\r\n var fillStyle = this.fillStyle;\r\n var strokeStyle = this.strokeStyle;\r\n var lineCap = this.lineCap;\r\n var oldLineWidth = this.lineWidth;\r\n var lineWidth = Math.abs(oldLineWidth * this.ctx.transform.scaleX);\r\n var lineJoin = this.lineJoin;\r\n\r\n var origPath = JSON.parse(JSON.stringify(this.path));\r\n var xPath = JSON.parse(JSON.stringify(this.path));\r\n var clipPath;\r\n var tmpPath;\r\n var pages = [];\r\n\r\n for (var i = 0; i < xPath.length; i++) {\r\n if (typeof xPath[i].x !== \"undefined\") {\r\n var page = getPagesByPath.call(this, xPath[i]);\r\n\r\n for (var ii = 0; ii < page.length; ii += 1) {\r\n if (pages.indexOf(page[ii]) === -1) {\r\n pages.push(page[ii]);\r\n }\r\n }\r\n }\r\n }\r\n\r\n for (var j = 0; j < pages.length; j++) {\r\n while (this.pdf.internal.getNumberOfPages() < pages[j]) {\r\n addPage.call(this);\r\n }\r\n }\r\n sortPages(pages);\r\n\r\n if (this.autoPaging) {\r\n var min = pages[0];\r\n var max = pages[pages.length - 1];\r\n for (var k = min; k < max + 1; k++) {\r\n this.pdf.setPage(k);\r\n\r\n this.fillStyle = fillStyle;\r\n this.strokeStyle = strokeStyle;\r\n this.lineCap = lineCap;\r\n this.lineWidth = lineWidth;\r\n this.lineJoin = lineJoin;\r\n\r\n var pageWidthMinusMargins =\r\n this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];\r\n var topMargin = k === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n var firstPageHeight =\r\n this.pdf.internal.pageSize.height -\r\n this.posY -\r\n this.margin[0] -\r\n this.margin[2];\r\n var pageHeightMinusMargins =\r\n this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n var previousPageHeightSum =\r\n k === 1 ? 0 : firstPageHeight + (k - 2) * pageHeightMinusMargins;\r\n\r\n if (this.ctx.clip_path.length !== 0) {\r\n var tmpPaths = this.path;\r\n clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n this.path = pathPositionRedo(\r\n clipPath,\r\n this.posX + this.margin[3],\r\n -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n );\r\n drawPaths.call(this, rule, true);\r\n this.path = tmpPaths;\r\n }\r\n tmpPath = JSON.parse(JSON.stringify(origPath));\r\n this.path = pathPositionRedo(\r\n tmpPath,\r\n this.posX + this.margin[3],\r\n -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n );\r\n if (isClip === false || k === 0) {\r\n const needsClipping = (k > min || k < max) && hasMargins.call(this);\r\n if (needsClipping) {\r\n this.pdf.saveGraphicsState();\r\n this.pdf\r\n .rect(\r\n this.margin[3],\r\n this.margin[0],\r\n pageWidthMinusMargins,\r\n pageHeightMinusMargins,\r\n null\r\n )\r\n .clip()\r\n .discardPath();\r\n }\r\n drawPaths.call(this, rule, isClip);\r\n if (needsClipping) {\r\n this.pdf.restoreGraphicsState();\r\n }\r\n }\r\n this.lineWidth = oldLineWidth;\r\n }\r\n } else {\r\n this.lineWidth = lineWidth;\r\n drawPaths.call(this, rule, isClip);\r\n this.lineWidth = oldLineWidth;\r\n }\r\n this.path = origPath;\r\n };\r\n\r\n /**\r\n * Processes the paths\r\n *\r\n * @function\r\n * @param rule {String}\r\n * @param isClip {Boolean}\r\n * @private\r\n * @ignore\r\n */\r\n var drawPaths = function(rule, isClip) {\r\n if (rule === \"stroke\" && !isClip && isStrokeTransparent.call(this)) {\r\n return;\r\n }\r\n\r\n if (rule !== \"stroke\" && !isClip && isFillTransparent.call(this)) {\r\n return;\r\n }\r\n\r\n var moves = [];\r\n\r\n //var alpha = (this.ctx.fillOpacity < 1) ? this.ctx.fillOpacity : this.ctx.globalAlpha;\r\n var delta;\r\n var xPath = this.path;\r\n for (var i = 0; i < xPath.length; i++) {\r\n var pt = xPath[i];\r\n\r\n switch (pt.type) {\r\n case \"begin\":\r\n moves.push({\r\n begin: true\r\n });\r\n break;\r\n\r\n case \"close\":\r\n moves.push({\r\n close: true\r\n });\r\n break;\r\n\r\n case \"mt\":\r\n moves.push({\r\n start: pt,\r\n deltas: [],\r\n abs: []\r\n });\r\n break;\r\n\r\n case \"lt\":\r\n var iii = moves.length;\r\n if (xPath[i - 1] && !isNaN(xPath[i - 1].x)) {\r\n delta = [pt.x - xPath[i - 1].x, pt.y - xPath[i - 1].y];\r\n if (iii > 0) {\r\n for (iii; iii >= 0; iii--) {\r\n if (\r\n moves[iii - 1].close !== true &&\r\n moves[iii - 1].begin !== true\r\n ) {\r\n moves[iii - 1].deltas.push(delta);\r\n moves[iii - 1].abs.push(pt);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n break;\r\n\r\n case \"bct\":\r\n delta = [\r\n pt.x1 - xPath[i - 1].x,\r\n pt.y1 - xPath[i - 1].y,\r\n pt.x2 - xPath[i - 1].x,\r\n pt.y2 - xPath[i - 1].y,\r\n pt.x - xPath[i - 1].x,\r\n pt.y - xPath[i - 1].y\r\n ];\r\n moves[moves.length - 1].deltas.push(delta);\r\n break;\r\n\r\n case \"qct\":\r\n var x1 = xPath[i - 1].x + (2.0 / 3.0) * (pt.x1 - xPath[i - 1].x);\r\n var y1 = xPath[i - 1].y + (2.0 / 3.0) * (pt.y1 - xPath[i - 1].y);\r\n var x2 = pt.x + (2.0 / 3.0) * (pt.x1 - pt.x);\r\n var y2 = pt.y + (2.0 / 3.0) * (pt.y1 - pt.y);\r\n var x3 = pt.x;\r\n var y3 = pt.y;\r\n delta = [\r\n x1 - xPath[i - 1].x,\r\n y1 - xPath[i - 1].y,\r\n x2 - xPath[i - 1].x,\r\n y2 - xPath[i - 1].y,\r\n x3 - xPath[i - 1].x,\r\n y3 - xPath[i - 1].y\r\n ];\r\n moves[moves.length - 1].deltas.push(delta);\r\n break;\r\n\r\n case \"arc\":\r\n moves.push({\r\n deltas: [],\r\n abs: [],\r\n arc: true\r\n });\r\n\r\n if (Array.isArray(moves[moves.length - 1].abs)) {\r\n moves[moves.length - 1].abs.push(pt);\r\n }\r\n break;\r\n }\r\n }\r\n var style;\r\n if (!isClip) {\r\n if (rule === \"stroke\") {\r\n style = \"stroke\";\r\n } else {\r\n style = \"fill\";\r\n }\r\n } else {\r\n style = null;\r\n }\r\n\r\n var began = false;\r\n for (var k = 0; k < moves.length; k++) {\r\n if (moves[k].arc) {\r\n var arcs = moves[k].abs;\r\n\r\n for (var ii = 0; ii < arcs.length; ii++) {\r\n var arc = arcs[ii];\r\n\r\n if (arc.type === \"arc\") {\r\n drawArc.call(\r\n this,\r\n arc.x,\r\n arc.y,\r\n arc.radius,\r\n arc.startAngle,\r\n arc.endAngle,\r\n arc.counterclockwise,\r\n undefined,\r\n isClip,\r\n !began\r\n );\r\n } else {\r\n drawLine.call(this, arc.x, arc.y);\r\n }\r\n began = true;\r\n }\r\n } else if (moves[k].close === true) {\r\n this.pdf.internal.out(\"h\");\r\n began = false;\r\n } else if (moves[k].begin !== true) {\r\n var x = moves[k].start.x;\r\n var y = moves[k].start.y;\r\n drawLines.call(this, moves[k].deltas, x, y);\r\n began = true;\r\n }\r\n }\r\n\r\n if (style) {\r\n putStyle.call(this, style);\r\n }\r\n if (isClip) {\r\n doClip.call(this);\r\n }\r\n };\r\n\r\n var getBaseline = function(y) {\r\n var height =\r\n this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;\r\n var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);\r\n switch (this.ctx.textBaseline) {\r\n case \"bottom\":\r\n return y - descent;\r\n case \"top\":\r\n return y + height - descent;\r\n case \"hanging\":\r\n return y + height - 2 * descent;\r\n case \"middle\":\r\n return y + height / 2 - descent;\r\n case \"ideographic\":\r\n // TODO not implemented\r\n return y;\r\n case \"alphabetic\":\r\n default:\r\n return y;\r\n }\r\n };\r\n\r\n var getTextBottom = function(yBaseLine) {\r\n var height =\r\n this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;\r\n var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);\r\n return yBaseLine + descent;\r\n };\r\n\r\n Context2D.prototype.createLinearGradient = function createLinearGradient() {\r\n var canvasGradient = function canvasGradient() {};\r\n\r\n canvasGradient.colorStops = [];\r\n canvasGradient.addColorStop = function(offset, color) {\r\n this.colorStops.push([offset, color]);\r\n };\r\n\r\n canvasGradient.getColor = function() {\r\n if (this.colorStops.length === 0) {\r\n return \"#000000\";\r\n }\r\n\r\n return this.colorStops[0][1];\r\n };\r\n\r\n canvasGradient.isCanvasGradient = true;\r\n return canvasGradient;\r\n };\r\n Context2D.prototype.createPattern = function createPattern() {\r\n return this.createLinearGradient();\r\n };\r\n Context2D.prototype.createRadialGradient = function createRadialGradient() {\r\n return this.createLinearGradient();\r\n };\r\n\r\n /**\r\n *\r\n * @param x Edge point X\r\n * @param y Edge point Y\r\n * @param r Radius\r\n * @param a1 start angle\r\n * @param a2 end angle\r\n * @param counterclockwise\r\n * @param style\r\n * @param isClip\r\n */\r\n var drawArc = function(\r\n x,\r\n y,\r\n r,\r\n a1,\r\n a2,\r\n counterclockwise,\r\n style,\r\n isClip,\r\n includeMove\r\n ) {\r\n // http://hansmuller-flex.blogspot.com/2011/10/more-about-approximating-circular-arcs.html\r\n var curves = createArc.call(this, r, a1, a2, counterclockwise);\r\n\r\n for (var i = 0; i < curves.length; i++) {\r\n var curve = curves[i];\r\n if (i === 0) {\r\n if (includeMove) {\r\n doMove.call(this, curve.x1 + x, curve.y1 + y);\r\n } else {\r\n drawLine.call(this, curve.x1 + x, curve.y1 + y);\r\n }\r\n }\r\n drawCurve.call(\r\n this,\r\n x,\r\n y,\r\n curve.x2,\r\n curve.y2,\r\n curve.x3,\r\n curve.y3,\r\n curve.x4,\r\n curve.y4\r\n );\r\n }\r\n\r\n if (!isClip) {\r\n putStyle.call(this, style);\r\n } else {\r\n doClip.call(this);\r\n }\r\n };\r\n\r\n var putStyle = function(style) {\r\n switch (style) {\r\n case \"stroke\":\r\n this.pdf.internal.out(\"S\");\r\n break;\r\n case \"fill\":\r\n this.pdf.internal.out(\"f\");\r\n break;\r\n }\r\n };\r\n\r\n var doClip = function() {\r\n this.pdf.clip();\r\n this.pdf.discardPath();\r\n };\r\n\r\n var doMove = function(x, y) {\r\n this.pdf.internal.out(\r\n getHorizontalCoordinateString(x) +\r\n \" \" +\r\n getVerticalCoordinateString(y) +\r\n \" m\"\r\n );\r\n };\r\n\r\n var putText = function(options) {\r\n var textAlign;\r\n switch (options.align) {\r\n case \"right\":\r\n case \"end\":\r\n textAlign = \"right\";\r\n break;\r\n case \"center\":\r\n textAlign = \"center\";\r\n break;\r\n case \"left\":\r\n case \"start\":\r\n default:\r\n textAlign = \"left\";\r\n break;\r\n }\r\n\r\n var textDimensions = this.pdf.getTextDimensions(options.text);\r\n var yBaseLine = getBaseline.call(this, options.y);\r\n var yBottom = getTextBottom.call(this, yBaseLine);\r\n var yTop = yBottom - textDimensions.h;\r\n\r\n var pt = this.ctx.transform.applyToPoint(new Point(options.x, yBaseLine));\r\n var decomposedTransformationMatrix = this.ctx.transform.decompose();\r\n var matrix = new Matrix();\r\n matrix = matrix.multiply(decomposedTransformationMatrix.translate);\r\n matrix = matrix.multiply(decomposedTransformationMatrix.skew);\r\n matrix = matrix.multiply(decomposedTransformationMatrix.scale);\r\n\r\n var baselineRect = this.ctx.transform.applyToRectangle(\r\n new Rectangle(options.x, yBaseLine, textDimensions.w, textDimensions.h)\r\n );\r\n var textBounds = matrix.applyToRectangle(\r\n new Rectangle(options.x, yTop, textDimensions.w, textDimensions.h)\r\n );\r\n var pageArray = getPagesByPath.call(this, textBounds);\r\n var pages = [];\r\n for (var ii = 0; ii < pageArray.length; ii += 1) {\r\n if (pages.indexOf(pageArray[ii]) === -1) {\r\n pages.push(pageArray[ii]);\r\n }\r\n }\r\n\r\n sortPages(pages);\r\n\r\n var clipPath, oldSize, oldLineWidth;\r\n if (this.autoPaging) {\r\n var min = pages[0];\r\n var max = pages[pages.length - 1];\r\n for (var i = min; i < max + 1; i++) {\r\n this.pdf.setPage(i);\r\n\r\n var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n var firstPageHeight =\r\n this.pdf.internal.pageSize.height -\r\n this.posY -\r\n this.margin[0] -\r\n this.margin[2];\r\n var pageHeightMinusBottomMargin =\r\n this.pdf.internal.pageSize.height - this.margin[2];\r\n var pageHeightMinusMargins =\r\n pageHeightMinusBottomMargin - this.margin[0];\r\n var pageWidthMinusRightMargin =\r\n this.pdf.internal.pageSize.width - this.margin[1];\r\n var pageWidthMinusMargins = pageWidthMinusRightMargin - this.margin[3];\r\n var previousPageHeightSum =\r\n i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;\r\n\r\n if (this.ctx.clip_path.length !== 0) {\r\n var tmpPaths = this.path;\r\n clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n this.path = pathPositionRedo(\r\n clipPath,\r\n this.posX + this.margin[3],\r\n -1 * previousPageHeightSum + topMargin\r\n );\r\n drawPaths.call(this, \"fill\", true);\r\n this.path = tmpPaths;\r\n }\r\n var textBoundsOnPage = pathPositionRedo(\r\n [JSON.parse(JSON.stringify(textBounds))],\r\n this.posX + this.margin[3],\r\n -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n )[0];\r\n\r\n if (options.scale >= 0.01) {\r\n oldSize = this.pdf.internal.getFontSize();\r\n this.pdf.setFontSize(oldSize * options.scale);\r\n oldLineWidth = this.lineWidth;\r\n this.lineWidth = oldLineWidth * options.scale;\r\n }\r\n\r\n var doSlice = this.autoPaging !== \"text\";\r\n\r\n if (\r\n doSlice ||\r\n textBoundsOnPage.y + textBoundsOnPage.h <= pageHeightMinusBottomMargin\r\n ) {\r\n if (\r\n doSlice ||\r\n (textBoundsOnPage.y >= topMargin &&\r\n textBoundsOnPage.x <= pageWidthMinusRightMargin)\r\n ) {\r\n var croppedText = doSlice\r\n ? options.text\r\n : this.pdf.splitTextToSize(\r\n options.text,\r\n options.maxWidth ||\r\n pageWidthMinusRightMargin - textBoundsOnPage.x\r\n )[0];\r\n var baseLineRectOnPage = pathPositionRedo(\r\n [JSON.parse(JSON.stringify(baselineRect))],\r\n this.posX + this.margin[3],\r\n -previousPageHeightSum +\r\n topMargin +\r\n this.ctx.prevPageLastElemOffset\r\n )[0];\r\n\r\n const needsClipping =\r\n doSlice && (i > min || i < max) && hasMargins.call(this);\r\n\r\n if (needsClipping) {\r\n this.pdf.saveGraphicsState();\r\n this.pdf\r\n .rect(\r\n this.margin[3],\r\n this.margin[0],\r\n pageWidthMinusMargins,\r\n pageHeightMinusMargins,\r\n null\r\n )\r\n .clip()\r\n .discardPath();\r\n }\r\n\r\n this.pdf.text(\r\n croppedText,\r\n baseLineRectOnPage.x,\r\n baseLineRectOnPage.y,\r\n {\r\n angle: options.angle,\r\n align: textAlign,\r\n renderingMode: options.renderingMode\r\n }\r\n );\r\n\r\n if (needsClipping) {\r\n this.pdf.restoreGraphicsState();\r\n }\r\n }\r\n } else {\r\n // This text is the last element of the page, but it got cut off due to the margin\r\n // so we render it in the next page\r\n\r\n if (textBoundsOnPage.y < pageHeightMinusBottomMargin) {\r\n // As a result, all other elements have their y offset increased\r\n this.ctx.prevPageLastElemOffset +=\r\n pageHeightMinusBottomMargin - textBoundsOnPage.y;\r\n }\r\n }\r\n\r\n if (options.scale >= 0.01) {\r\n this.pdf.setFontSize(oldSize);\r\n this.lineWidth = oldLineWidth;\r\n }\r\n }\r\n } else {\r\n if (options.scale >= 0.01) {\r\n oldSize = this.pdf.internal.getFontSize();\r\n this.pdf.setFontSize(oldSize * options.scale);\r\n oldLineWidth = this.lineWidth;\r\n this.lineWidth = oldLineWidth * options.scale;\r\n }\r\n this.pdf.text(options.text, pt.x + this.posX, pt.y + this.posY, {\r\n angle: options.angle,\r\n align: textAlign,\r\n renderingMode: options.renderingMode,\r\n maxWidth: options.maxWidth\r\n });\r\n\r\n if (options.scale >= 0.01) {\r\n this.pdf.setFontSize(oldSize);\r\n this.lineWidth = oldLineWidth;\r\n }\r\n }\r\n };\r\n\r\n var drawLine = function(x, y, prevX, prevY) {\r\n prevX = prevX || 0;\r\n prevY = prevY || 0;\r\n\r\n this.pdf.internal.out(\r\n getHorizontalCoordinateString(x + prevX) +\r\n \" \" +\r\n getVerticalCoordinateString(y + prevY) +\r\n \" l\"\r\n );\r\n };\r\n\r\n var drawLines = function(lines, x, y) {\r\n return this.pdf.lines(lines, x, y, null, null);\r\n };\r\n\r\n var drawCurve = function(x, y, x1, y1, x2, y2, x3, y3) {\r\n this.pdf.internal.out(\r\n [\r\n f2(getHorizontalCoordinate(x1 + x)),\r\n f2(getVerticalCoordinate(y1 + y)),\r\n f2(getHorizontalCoordinate(x2 + x)),\r\n f2(getVerticalCoordinate(y2 + y)),\r\n f2(getHorizontalCoordinate(x3 + x)),\r\n f2(getVerticalCoordinate(y3 + y)),\r\n \"c\"\r\n ].join(\" \")\r\n );\r\n };\r\n\r\n /**\r\n * Return a array of objects that represent bezier curves which approximate the circular arc centered at the origin, from startAngle to endAngle (radians) with the specified radius.\r\n *\r\n * Each bezier curve is an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.\r\n * @function createArc\r\n */\r\n var createArc = function(radius, startAngle, endAngle, anticlockwise) {\r\n var EPSILON = 0.00001; // Roughly 1/1000th of a degree, see below\r\n var twoPi = Math.PI * 2;\r\n var halfPi = Math.PI / 2.0;\r\n\r\n while (startAngle > endAngle) {\r\n startAngle = startAngle - twoPi;\r\n }\r\n var totalAngle = Math.abs(endAngle - startAngle);\r\n if (totalAngle < twoPi) {\r\n if (anticlockwise) {\r\n totalAngle = twoPi - totalAngle;\r\n }\r\n }\r\n\r\n // Compute the sequence of arc curves, up to PI/2 at a time.\r\n var curves = [];\r\n\r\n // clockwise or counterclockwise\r\n var sgn = anticlockwise ? -1 : +1;\r\n\r\n var a1 = startAngle;\r\n for (; totalAngle > EPSILON; ) {\r\n var remain = sgn * Math.min(totalAngle, halfPi);\r\n var a2 = a1 + remain;\r\n curves.push(createSmallArc.call(this, radius, a1, a2));\r\n totalAngle -= Math.abs(a2 - a1);\r\n a1 = a2;\r\n }\r\n\r\n return curves;\r\n };\r\n\r\n /**\r\n * Cubic bezier approximation of a circular arc centered at the origin, from (radians) a1 to a2, where a2-a1 < pi/2. The arc's radius is r.\r\n *\r\n * Returns an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.\r\n *\r\n * This algorithm is based on the approach described in: A. Riškus, \"Approximation of a Cubic Bezier Curve by Circular Arcs and Vice Versa,\" Information Technology and Control, 35(4), 2006 pp. 371-378.\r\n */\r\n var createSmallArc = function(r, a1, a2) {\r\n var a = (a2 - a1) / 2.0;\r\n\r\n var x4 = r * Math.cos(a);\r\n var y4 = r * Math.sin(a);\r\n var x1 = x4;\r\n var y1 = -y4;\r\n\r\n var q1 = x1 * x1 + y1 * y1;\r\n var q2 = q1 + x1 * x4 + y1 * y4;\r\n var k2 = ((4 / 3) * (Math.sqrt(2 * q1 * q2) - q2)) / (x1 * y4 - y1 * x4);\r\n\r\n var x2 = x1 - k2 * y1;\r\n var y2 = y1 + k2 * x1;\r\n var x3 = x2;\r\n var y3 = -y2;\r\n\r\n var ar = a + a1;\r\n var cos_ar = Math.cos(ar);\r\n var sin_ar = Math.sin(ar);\r\n\r\n return {\r\n x1: r * Math.cos(a1),\r\n y1: r * Math.sin(a1),\r\n x2: x2 * cos_ar - y2 * sin_ar,\r\n y2: x2 * sin_ar + y2 * cos_ar,\r\n x3: x3 * cos_ar - y3 * sin_ar,\r\n y3: x3 * sin_ar + y3 * cos_ar,\r\n x4: r * Math.cos(a2),\r\n y4: r * Math.sin(a2)\r\n };\r\n };\r\n\r\n var rad2deg = function(value) {\r\n return (value * 180) / Math.PI;\r\n };\r\n\r\n var getQuadraticCurveBoundary = function(sx, sy, cpx, cpy, ex, ey) {\r\n var midX1 = sx + (cpx - sx) * 0.5;\r\n var midY1 = sy + (cpy - sy) * 0.5;\r\n var midX2 = ex + (cpx - ex) * 0.5;\r\n var midY2 = ey + (cpy - ey) * 0.5;\r\n var resultX1 = Math.min(sx, ex, midX1, midX2);\r\n var resultX2 = Math.max(sx, ex, midX1, midX2);\r\n var resultY1 = Math.min(sy, ey, midY1, midY2);\r\n var resultY2 = Math.max(sy, ey, midY1, midY2);\r\n return new Rectangle(\r\n resultX1,\r\n resultY1,\r\n resultX2 - resultX1,\r\n resultY2 - resultY1\r\n );\r\n };\r\n\r\n //De Casteljau algorithm\r\n var getBezierCurveBoundary = function(ax, ay, bx, by, cx, cy, dx, dy) {\r\n var tobx = bx - ax;\r\n var toby = by - ay;\r\n var tocx = cx - bx;\r\n var tocy = cy - by;\r\n var todx = dx - cx;\r\n var tody = dy - cy;\r\n var precision = 40;\r\n var d,\r\n i,\r\n px,\r\n py,\r\n qx,\r\n qy,\r\n rx,\r\n ry,\r\n tx,\r\n ty,\r\n sx,\r\n sy,\r\n x,\r\n y,\r\n minx,\r\n miny,\r\n maxx,\r\n maxy,\r\n toqx,\r\n toqy,\r\n torx,\r\n tory,\r\n totx,\r\n toty;\r\n for (i = 0; i < precision + 1; i++) {\r\n d = i / precision;\r\n px = ax + d * tobx;\r\n py = ay + d * toby;\r\n qx = bx + d * tocx;\r\n qy = by + d * tocy;\r\n rx = cx + d * todx;\r\n ry = cy + d * tody;\r\n toqx = qx - px;\r\n toqy = qy - py;\r\n torx = rx - qx;\r\n tory = ry - qy;\r\n\r\n sx = px + d * toqx;\r\n sy = py + d * toqy;\r\n tx = qx + d * torx;\r\n ty = qy + d * tory;\r\n totx = tx - sx;\r\n toty = ty - sy;\r\n\r\n x = sx + d * totx;\r\n y = sy + d * toty;\r\n if (i == 0) {\r\n minx = x;\r\n miny = y;\r\n maxx = x;\r\n maxy = y;\r\n } else {\r\n minx = Math.min(minx, x);\r\n miny = Math.min(miny, y);\r\n maxx = Math.max(maxx, x);\r\n maxy = Math.max(maxy, y);\r\n }\r\n }\r\n return new Rectangle(\r\n Math.round(minx),\r\n Math.round(miny),\r\n Math.round(maxx - minx),\r\n Math.round(maxy - miny)\r\n );\r\n };\r\n\r\n var getPrevLineDashValue = function(lineDash, lineDashOffset) {\r\n return JSON.stringify({\r\n lineDash: lineDash,\r\n lineDashOffset: lineDashOffset\r\n });\r\n };\r\n\r\n var setLineDash = function() {\r\n // Avoid unnecessary line dash declarations.\r\n if (\r\n !this.prevLineDash &&\r\n !this.ctx.lineDash.length &&\r\n !this.ctx.lineDashOffset\r\n ) {\r\n return;\r\n }\r\n\r\n // Avoid unnecessary line dash declarations.\r\n const nextLineDash = getPrevLineDashValue(\r\n this.ctx.lineDash,\r\n this.ctx.lineDashOffset\r\n );\r\n if (this.prevLineDash !== nextLineDash) {\r\n this.pdf.setLineDash(this.ctx.lineDash, this.ctx.lineDashOffset);\r\n this.prevLineDash = nextLineDash;\r\n }\r\n };\r\n})(jsPDF.API);\r\n","/**\n * @license\n * jsPDF filters PlugIn\n * Copyright (c) 2014 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { zlibSync } from \"../libs/fflate.js\";\n\n(function(jsPDFAPI) {\n \"use strict\";\n\n var ASCII85Encode = function(a) {\n var b, c, d, e, f, g, h, i, j, k;\n // eslint-disable-next-line no-control-regex\n for (\n !/[^\\x00-\\xFF]/.test(a),\n b = \"\\x00\\x00\\x00\\x00\".slice(a.length % 4 || 4),\n a += b,\n c = [],\n d = 0,\n e = a.length;\n e > d;\n d += 4\n )\n (f =\n (a.charCodeAt(d) << 24) +\n (a.charCodeAt(d + 1) << 16) +\n (a.charCodeAt(d + 2) << 8) +\n a.charCodeAt(d + 3)),\n 0 !== f\n ? ((k = f % 85),\n (f = (f - k) / 85),\n (j = f % 85),\n (f = (f - j) / 85),\n (i = f % 85),\n (f = (f - i) / 85),\n (h = f % 85),\n (f = (f - h) / 85),\n (g = f % 85),\n c.push(g + 33, h + 33, i + 33, j + 33, k + 33))\n : c.push(122);\n return (\n (function(a, b) {\n for (var c = b; c > 0; c--) a.pop();\n })(c, b.length),\n String.fromCharCode.apply(String, c) + \"~>\"\n );\n };\n\n var ASCII85Decode = function(a) {\n var c,\n d,\n e,\n f,\n g,\n h = String,\n l = \"length\",\n w = 255,\n x = \"charCodeAt\",\n y = \"slice\",\n z = \"replace\";\n for (\n \"~>\" === a[y](-2),\n a = a[y](0, -2)\n [z](/\\s/g, \"\")\n [z](\"z\", \"!!!!!\"),\n c = \"uuuuu\"[y](a[l] % 5 || 5),\n a += c,\n e = [],\n f = 0,\n g = a[l];\n g > f;\n f += 5\n )\n (d =\n 52200625 * (a[x](f) - 33) +\n 614125 * (a[x](f + 1) - 33) +\n 7225 * (a[x](f + 2) - 33) +\n 85 * (a[x](f + 3) - 33) +\n (a[x](f + 4) - 33)),\n e.push(w & (d >> 24), w & (d >> 16), w & (d >> 8), w & d);\n return (\n (function(a, b) {\n for (var c = b; c > 0; c--) a.pop();\n })(e, c[l]),\n h.fromCharCode.apply(h, e)\n );\n };\n\n var ASCIIHexEncode = function(value) {\n return (\n value\n .split(\"\")\n .map(function(value) {\n return (\"0\" + value.charCodeAt().toString(16)).slice(-2);\n })\n .join(\"\") + \">\"\n );\n };\n\n var ASCIIHexDecode = function(value) {\n var regexCheckIfHex = new RegExp(/^([0-9A-Fa-f]{2})+$/);\n value = value.replace(/\\s/g, \"\");\n if (value.indexOf(\">\") !== -1) {\n value = value.substr(0, value.indexOf(\">\"));\n }\n if (value.length % 2) {\n value += \"0\";\n }\n if (regexCheckIfHex.test(value) === false) {\n return \"\";\n }\n var result = \"\";\n for (var i = 0; i < value.length; i += 2) {\n result += String.fromCharCode(\"0x\" + (value[i] + value[i + 1]));\n }\n return result;\n };\n /*\n var FlatePredictors = {\n None: 1,\n TIFF: 2,\n PNG_None: 10,\n PNG_Sub: 11,\n PNG_Up: 12,\n PNG_Average: 13,\n PNG_Paeth: 14,\n PNG_Optimum: 15\n };\n */\n\n var FlateEncode = function(data) {\n var arr = new Uint8Array(data.length);\n var i = data.length;\n while (i--) {\n arr[i] = data.charCodeAt(i);\n }\n arr = zlibSync(arr);\n data = arr.reduce(function(data, byte) {\n return data + String.fromCharCode(byte);\n }, \"\");\n return data;\n };\n\n jsPDFAPI.processDataByFilters = function(origData, filterChain) {\n \"use strict\";\n var i = 0;\n var data = origData || \"\";\n var reverseChain = [];\n filterChain = filterChain || [];\n\n if (typeof filterChain === \"string\") {\n filterChain = [filterChain];\n }\n\n for (i = 0; i < filterChain.length; i += 1) {\n switch (filterChain[i]) {\n case \"ASCII85Decode\":\n case \"/ASCII85Decode\":\n data = ASCII85Decode(data);\n reverseChain.push(\"/ASCII85Encode\");\n break;\n case \"ASCII85Encode\":\n case \"/ASCII85Encode\":\n data = ASCII85Encode(data);\n reverseChain.push(\"/ASCII85Decode\");\n break;\n case \"ASCIIHexDecode\":\n case \"/ASCIIHexDecode\":\n data = ASCIIHexDecode(data);\n reverseChain.push(\"/ASCIIHexEncode\");\n break;\n case \"ASCIIHexEncode\":\n case \"/ASCIIHexEncode\":\n data = ASCIIHexEncode(data);\n reverseChain.push(\"/ASCIIHexDecode\");\n break;\n case \"FlateEncode\":\n case \"/FlateEncode\":\n data = FlateEncode(data);\n reverseChain.push(\"/FlateDecode\");\n break;\n default:\n throw new Error(\n 'The filter: \"' + filterChain[i] + '\" is not implemented'\n );\n }\n }\n\n return { data: data, reverseChain: reverseChain.reverse().join(\" \") };\n };\n})(jsPDF.API);\n","/**\n * @license\n * jsPDF fileloading PlugIn\n * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name fileloading\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n /**\n * @name loadFile\n * @function\n * @param {string} url\n * @param {boolean} sync\n * @param {function} callback\n * @returns {string|undefined} result\n */\n jsPDFAPI.loadFile = function(url, sync, callback) {\n return browserRequest(url, sync, callback);\n\n };\n\n /**\n * @name loadImageFile\n * @function\n * @param {string} path\n * @param {boolean} sync\n * @param {function} callback\n */\n jsPDFAPI.loadImageFile = jsPDFAPI.loadFile;\n\n function browserRequest(url, sync, callback) {\n sync = sync === false ? false : true;\n callback = typeof callback === \"function\" ? callback : function() {};\n var result = undefined;\n\n var xhr = function(url, sync, callback) {\n var request = new XMLHttpRequest();\n var i = 0;\n\n var sanitizeUnicode = function(data) {\n var dataLength = data.length;\n var charArray = [];\n var StringFromCharCode = String.fromCharCode;\n\n //Transform Unicode to ASCII\n for (i = 0; i < dataLength; i += 1) {\n charArray.push(StringFromCharCode(data.charCodeAt(i) & 0xff));\n }\n return charArray.join(\"\");\n };\n\n request.open(\"GET\", url, !sync);\n // XHR binary charset opt by Marcus Granado 2006 [http://mgran.blogspot.com]\n request.overrideMimeType(\"text/plain; charset=x-user-defined\");\n\n if (sync === false) {\n request.onload = function() {\n if (request.status === 200) {\n callback(sanitizeUnicode(this.responseText));\n } else {\n callback(undefined);\n }\n };\n }\n request.send(null);\n\n if (sync && request.status === 200) {\n return sanitizeUnicode(request.responseText);\n }\n };\n try {\n result = xhr(url, sync, callback);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n return result;\n }\n\n function nodeReadFile(url, sync, callback) {\n sync = sync === false ? false : true;\n var result = undefined;\n\n var fs = require(\"fs\");\n var path = require(\"path\");\n\n url = path.resolve(url);\n if (sync) {\n try {\n result = fs.readFileSync(url, { encoding: \"latin1\" });\n } catch (e) {\n return undefined;\n }\n } else {\n fs.readFile(url, { encoding: \"latin1\" }, function(err, data) {\n if (!callback) {\n return;\n }\n if (err) {\n callback(undefined);\n }\n callback(data);\n });\n }\n\n return result;\n }\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2018 Erik Koopmans\n * Released under the MIT License.\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { normalizeFontFace } from \"../libs/fontFace.js\";\nimport { globalObject } from \"../libs/globalObject.js\";\n\n/**\n * jsPDF html PlugIn\n *\n * @name html\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n function loadHtml2Canvas() {\n return (function() {\n if (globalObject[\"html2canvas\"]) {\n return Promise.resolve(globalObject[\"html2canvas\"]);\n }\n\n return import(\"html2canvas\");\n\n })()\n .catch(function(e) {\n return Promise.reject(new Error(\"Could not load html2canvas: \" + e));\n })\n .then(function(html2canvas) {\n return html2canvas.default ? html2canvas.default : html2canvas;\n });\n }\n\n function loadDomPurify() {\n return (function() {\n if (globalObject[\"DOMPurify\"]) {\n return Promise.resolve(globalObject[\"DOMPurify\"]);\n }\n\n return import(\"dompurify\");\n\n })()\n .catch(function(e) {\n return Promise.reject(new Error(\"Could not load dompurify: \" + e));\n })\n .then(function(dompurify) {\n return dompurify.default ? dompurify.default : dompurify;\n });\n }\n\n /**\n * Determine the type of a variable/object.\n *\n * @private\n * @ignore\n */\n var objType = function(obj) {\n var type = typeof obj;\n if (type === \"undefined\") return \"undefined\";\n else if (type === \"string\" || obj instanceof String) return \"string\";\n else if (type === \"number\" || obj instanceof Number) return \"number\";\n else if (type === \"function\" || obj instanceof Function) return \"function\";\n else if (!!obj && obj.constructor === Array) return \"array\";\n else if (obj && obj.nodeType === 1) return \"element\";\n else if (type === \"object\") return \"object\";\n else return \"unknown\";\n };\n\n /**\n * Create an HTML element with optional className, innerHTML, and style.\n *\n * @private\n * @ignore\n */\n var createElement = function(tagName, opt) {\n var el = document.createElement(tagName);\n if (opt.className) el.className = opt.className;\n if (opt.innerHTML && opt.dompurify) {\n el.innerHTML = opt.dompurify.sanitize(opt.innerHTML);\n }\n for (var key in opt.style) {\n el.style[key] = opt.style[key];\n }\n return el;\n };\n\n /**\n * Deep-clone a node and preserve contents/properties.\n *\n * @private\n * @ignore\n */\n var cloneNode = function(node, javascriptEnabled) {\n // Recursively clone the node.\n var clone =\n node.nodeType === 3\n ? document.createTextNode(node.nodeValue)\n : node.cloneNode(false);\n for (var child = node.firstChild; child; child = child.nextSibling) {\n if (\n javascriptEnabled === true ||\n child.nodeType !== 1 ||\n child.nodeName !== \"SCRIPT\"\n ) {\n clone.appendChild(cloneNode(child, javascriptEnabled));\n }\n }\n\n if (node.nodeType === 1) {\n // Preserve contents/properties of special nodes.\n if (node.nodeName === \"CANVAS\") {\n clone.width = node.width;\n clone.height = node.height;\n clone.getContext(\"2d\").drawImage(node, 0, 0);\n } else if (node.nodeName === \"TEXTAREA\" || node.nodeName === \"SELECT\") {\n clone.value = node.value;\n }\n\n // Preserve the node's scroll position when it loads.\n clone.addEventListener(\n \"load\",\n function() {\n clone.scrollTop = node.scrollTop;\n clone.scrollLeft = node.scrollLeft;\n },\n true\n );\n }\n\n // Return the cloned node.\n return clone;\n };\n\n /* ----- CONSTRUCTOR ----- */\n\n var Worker = function Worker(opt) {\n // Create the root parent for the proto chain, and the starting Worker.\n var root = Object.assign(\n Worker.convert(Promise.resolve()),\n JSON.parse(JSON.stringify(Worker.template))\n );\n var self = Worker.convert(Promise.resolve(), root);\n\n // Set progress, optional settings, and return.\n self = self.setProgress(1, Worker, 1, [Worker]);\n self = self.set(opt);\n return self;\n };\n\n // Boilerplate for subclassing Promise.\n Worker.prototype = Object.create(Promise.prototype);\n Worker.prototype.constructor = Worker;\n\n // Converts/casts promises into Workers.\n Worker.convert = function convert(promise, inherit) {\n // Uses prototypal inheritance to receive changes made to ancestors' properties.\n promise.__proto__ = inherit || Worker.prototype;\n return promise;\n };\n\n Worker.template = {\n prop: {\n src: null,\n container: null,\n overlay: null,\n canvas: null,\n img: null,\n pdf: null,\n pageSize: null,\n callback: function() {}\n },\n progress: {\n val: 0,\n state: null,\n n: 0,\n stack: []\n },\n opt: {\n filename: \"file.pdf\",\n margin: [0, 0, 0, 0],\n enableLinks: true,\n x: 0,\n y: 0,\n html2canvas: {},\n jsPDF: {},\n backgroundColor: \"transparent\"\n }\n };\n\n /* ----- FROM / TO ----- */\n\n Worker.prototype.from = function from(src, type) {\n function getType(src) {\n switch (objType(src)) {\n case \"string\":\n return \"string\";\n case \"element\":\n return src.nodeName.toLowerCase() === \"canvas\" ? \"canvas\" : \"element\";\n default:\n return \"unknown\";\n }\n }\n\n return this.then(function from_main() {\n type = type || getType(src);\n switch (type) {\n case \"string\":\n return this.then(loadDomPurify).then(function(dompurify) {\n return this.set({\n src: createElement(\"div\", {\n innerHTML: src,\n dompurify: dompurify\n })\n });\n });\n case \"element\":\n return this.set({ src: src });\n case \"canvas\":\n return this.set({ canvas: src });\n case \"img\":\n return this.set({ img: src });\n default:\n return this.error(\"Unknown source type.\");\n }\n });\n };\n\n Worker.prototype.to = function to(target) {\n // Route the 'to' request to the appropriate method.\n switch (target) {\n case \"container\":\n return this.toContainer();\n case \"canvas\":\n return this.toCanvas();\n case \"img\":\n return this.toImg();\n case \"pdf\":\n return this.toPdf();\n default:\n return this.error(\"Invalid target.\");\n }\n };\n\n Worker.prototype.toContainer = function toContainer() {\n // Set up function prerequisites.\n var prereqs = [\n function checkSrc() {\n return (\n this.prop.src || this.error(\"Cannot duplicate - no source HTML.\")\n );\n },\n function checkPageSize() {\n return this.prop.pageSize || this.setPageSize();\n }\n ];\n return this.thenList(prereqs).then(function toContainer_main() {\n // Define the CSS styles for the container and its overlay parent.\n var overlayCSS = {\n position: \"fixed\",\n overflow: \"hidden\",\n zIndex: 1000,\n left: \"-100000px\",\n right: 0,\n bottom: 0,\n top: 0\n };\n var containerCSS = {\n position: \"relative\",\n display: \"inline-block\",\n width:\n (typeof this.opt.width === \"number\" &&\n !isNaN(this.opt.width) &&\n typeof this.opt.windowWidth === \"number\" &&\n !isNaN(this.opt.windowWidth)\n ? this.opt.windowWidth\n : Math.max(\n this.prop.src.clientWidth,\n this.prop.src.scrollWidth,\n this.prop.src.offsetWidth\n )) + \"px\",\n left: 0,\n right: 0,\n top: 0,\n margin: \"auto\",\n backgroundColor: this.opt.backgroundColor\n }; // Set the overlay to hidden (could be changed in the future to provide a print preview).\n\n var source = cloneNode(\n this.prop.src,\n this.opt.html2canvas.javascriptEnabled\n );\n\n if (source.tagName === \"BODY\") {\n containerCSS.height =\n Math.max(\n document.body.scrollHeight,\n document.body.offsetHeight,\n document.documentElement.clientHeight,\n document.documentElement.scrollHeight,\n document.documentElement.offsetHeight\n ) + \"px\";\n }\n\n this.prop.overlay = createElement(\"div\", {\n className: \"html2pdf__overlay\",\n style: overlayCSS\n });\n this.prop.container = createElement(\"div\", {\n className: \"html2pdf__container\",\n style: containerCSS\n });\n this.prop.container.appendChild(source);\n this.prop.container.firstChild.appendChild(\n createElement(\"div\", {\n style: {\n clear: \"both\",\n border: \"0 none transparent\",\n margin: 0,\n padding: 0,\n height: 0\n }\n })\n );\n this.prop.container.style.float = \"none\";\n this.prop.overlay.appendChild(this.prop.container);\n document.body.appendChild(this.prop.overlay);\n this.prop.container.firstChild.style.position = \"relative\";\n this.prop.container.height =\n Math.max(\n this.prop.container.firstChild.clientHeight,\n this.prop.container.firstChild.scrollHeight,\n this.prop.container.firstChild.offsetHeight\n ) + \"px\";\n });\n };\n\n Worker.prototype.toCanvas = function toCanvas() {\n // Set up function prerequisites.\n var prereqs = [\n function checkContainer() {\n return (\n document.body.contains(this.prop.container) || this.toContainer()\n );\n }\n ];\n\n // Fulfill prereqs then create the canvas.\n return this.thenList(prereqs)\n .then(loadHtml2Canvas)\n .then(function toCanvas_main(html2canvas) {\n // Handle old-fashioned 'onrendered' argument.\n var options = Object.assign({}, this.opt.html2canvas);\n delete options.onrendered;\n\n return html2canvas(this.prop.container, options);\n })\n .then(function toCanvas_post(canvas) {\n // Handle old-fashioned 'onrendered' argument.\n var onRendered = this.opt.html2canvas.onrendered || function() {};\n onRendered(canvas);\n\n this.prop.canvas = canvas;\n document.body.removeChild(this.prop.overlay);\n });\n };\n\n Worker.prototype.toContext2d = function toContext2d() {\n // Set up function prerequisites.\n var prereqs = [\n function checkContainer() {\n return (\n document.body.contains(this.prop.container) || this.toContainer()\n );\n }\n ];\n\n // Fulfill prereqs then create the canvas.\n return this.thenList(prereqs)\n .then(loadHtml2Canvas)\n .then(function toContext2d_main(html2canvas) {\n // Handle old-fashioned 'onrendered' argument.\n\n var pdf = this.opt.jsPDF;\n var fontFaces = this.opt.fontFaces;\n\n var scale =\n typeof this.opt.width === \"number\" &&\n !isNaN(this.opt.width) &&\n typeof this.opt.windowWidth === \"number\" &&\n !isNaN(this.opt.windowWidth)\n ? this.opt.width / this.opt.windowWidth\n : 1;\n\n var options = Object.assign(\n {\n async: true,\n allowTaint: true,\n scale: scale,\n scrollX: this.opt.scrollX || 0,\n scrollY: this.opt.scrollY || 0,\n backgroundColor: \"#ffffff\",\n imageTimeout: 15000,\n logging: true,\n proxy: null,\n removeContainer: true,\n foreignObjectRendering: false,\n useCORS: false\n },\n this.opt.html2canvas\n );\n delete options.onrendered;\n\n pdf.context2d.autoPaging =\n typeof this.opt.autoPaging === \"undefined\"\n ? true\n : this.opt.autoPaging;\n pdf.context2d.posX = this.opt.x;\n pdf.context2d.posY = this.opt.y;\n pdf.context2d.margin = this.opt.margin;\n pdf.context2d.fontFaces = fontFaces;\n\n if (fontFaces) {\n for (var i = 0; i < fontFaces.length; ++i) {\n var font = fontFaces[i];\n var src = font.src.find(function(src) {\n return src.format === \"truetype\";\n });\n\n if (src) {\n pdf.addFont(src.url, font.ref.name, font.ref.style);\n }\n }\n }\n\n options.windowHeight = options.windowHeight || 0;\n options.windowHeight =\n options.windowHeight == 0\n ? Math.max(\n this.prop.container.clientHeight,\n this.prop.container.scrollHeight,\n this.prop.container.offsetHeight\n )\n : options.windowHeight;\n\n pdf.context2d.save(true);\n return html2canvas(this.prop.container, options);\n })\n .then(function toContext2d_post(canvas) {\n this.opt.jsPDF.context2d.restore(true);\n\n // Handle old-fashioned 'onrendered' argument.\n var onRendered = this.opt.html2canvas.onrendered || function() {};\n onRendered(canvas);\n\n this.prop.canvas = canvas;\n document.body.removeChild(this.prop.overlay);\n });\n };\n\n Worker.prototype.toImg = function toImg() {\n // Set up function prerequisites.\n var prereqs = [\n function checkCanvas() {\n return this.prop.canvas || this.toCanvas();\n }\n ];\n\n // Fulfill prereqs then create the image.\n return this.thenList(prereqs).then(function toImg_main() {\n var imgData = this.prop.canvas.toDataURL(\n \"image/\" + this.opt.image.type,\n this.opt.image.quality\n );\n this.prop.img = document.createElement(\"img\");\n this.prop.img.src = imgData;\n });\n };\n\n Worker.prototype.toPdf = function toPdf() {\n // Set up function prerequisites.\n var prereqs = [\n function checkContext2d() {\n return this.toContext2d();\n }\n //function checkCanvas() { return this.prop.canvas || this.toCanvas(); }\n ];\n\n // Fulfill prereqs then create the image.\n return this.thenList(prereqs).then(function toPdf_main() {\n // Create local copies of frequently used properties.\n this.prop.pdf = this.prop.pdf || this.opt.jsPDF;\n });\n };\n\n /* ----- OUTPUT / SAVE ----- */\n\n Worker.prototype.output = function output(type, options, src) {\n // Redirect requests to the correct function (outputPdf / outputImg).\n src = src || \"pdf\";\n if (src.toLowerCase() === \"img\" || src.toLowerCase() === \"image\") {\n return this.outputImg(type, options);\n } else {\n return this.outputPdf(type, options);\n }\n };\n\n Worker.prototype.outputPdf = function outputPdf(type, options) {\n // Set up function prerequisites.\n var prereqs = [\n function checkPdf() {\n return this.prop.pdf || this.toPdf();\n }\n ];\n\n // Fulfill prereqs then perform the appropriate output.\n return this.thenList(prereqs).then(function outputPdf_main() {\n /* Currently implemented output types:\n * https://rawgit.com/MrRio/jsPDF/master/docs/jspdf.js.html#line992\n * save(options), arraybuffer, blob, bloburi/bloburl,\n * datauristring/dataurlstring, dataurlnewwindow, datauri/dataurl\n */\n return this.prop.pdf.output(type, options);\n });\n };\n\n Worker.prototype.outputImg = function outputImg(type) {\n // Set up function prerequisites.\n var prereqs = [\n function checkImg() {\n return this.prop.img || this.toImg();\n }\n ];\n\n // Fulfill prereqs then perform the appropriate output.\n return this.thenList(prereqs).then(function outputImg_main() {\n switch (type) {\n case undefined:\n case \"img\":\n return this.prop.img;\n case \"datauristring\":\n case \"dataurlstring\":\n return this.prop.img.src;\n case \"datauri\":\n case \"dataurl\":\n return (document.location.href = this.prop.img.src);\n default:\n throw 'Image output type \"' + type + '\" is not supported.';\n }\n });\n };\n\n Worker.prototype.save = function save(filename) {\n // Set up function prerequisites.\n var prereqs = [\n function checkPdf() {\n return this.prop.pdf || this.toPdf();\n }\n ];\n\n // Fulfill prereqs, update the filename (if provided), and save the PDF.\n return this.thenList(prereqs)\n .set(filename ? { filename: filename } : null)\n .then(function save_main() {\n this.prop.pdf.save(this.opt.filename);\n });\n };\n\n Worker.prototype.doCallback = function doCallback() {\n // Set up function prerequisites.\n var prereqs = [\n function checkPdf() {\n return this.prop.pdf || this.toPdf();\n }\n ];\n\n // Fulfill prereqs, update the filename (if provided), and save the PDF.\n return this.thenList(prereqs).then(function doCallback_main() {\n this.prop.callback(this.prop.pdf);\n });\n };\n\n /* ----- SET / GET ----- */\n\n Worker.prototype.set = function set(opt) {\n // TODO: Implement ordered pairs?\n\n // Silently ignore invalid or empty input.\n if (objType(opt) !== \"object\") {\n return this;\n }\n\n // Build an array of setter functions to queue.\n var fns = Object.keys(opt || {}).map(function(key) {\n if (key in Worker.template.prop) {\n // Set pre-defined properties.\n return function set_prop() {\n this.prop[key] = opt[key];\n };\n } else {\n switch (key) {\n case \"margin\":\n return this.setMargin.bind(this, opt.margin);\n case \"jsPDF\":\n return function set_jsPDF() {\n this.opt.jsPDF = opt.jsPDF;\n return this.setPageSize();\n };\n case \"pageSize\":\n return this.setPageSize.bind(this, opt.pageSize);\n default:\n // Set any other properties in opt.\n return function set_opt() {\n this.opt[key] = opt[key];\n };\n }\n }\n }, this);\n\n // Set properties within the promise chain.\n return this.then(function set_main() {\n return this.thenList(fns);\n });\n };\n\n Worker.prototype.get = function get(key, cbk) {\n return this.then(function get_main() {\n // Fetch the requested property, either as a predefined prop or in opt.\n var val = key in Worker.template.prop ? this.prop[key] : this.opt[key];\n return cbk ? cbk(val) : val;\n });\n };\n\n Worker.prototype.setMargin = function setMargin(margin) {\n return this.then(function setMargin_main() {\n // Parse the margin property.\n switch (objType(margin)) {\n case \"number\":\n margin = [margin, margin, margin, margin];\n // eslint-disable-next-line no-fallthrough\n case \"array\":\n if (margin.length === 2) {\n margin = [margin[0], margin[1], margin[0], margin[1]];\n }\n if (margin.length === 4) {\n break;\n }\n // eslint-disable-next-line no-fallthrough\n default:\n return this.error(\"Invalid margin array.\");\n }\n\n // Set the margin property, then update pageSize.\n this.opt.margin = margin;\n }).then(this.setPageSize);\n };\n\n Worker.prototype.setPageSize = function setPageSize(pageSize) {\n function toPx(val, k) {\n return Math.floor(((val * k) / 72) * 96);\n }\n\n return this.then(function setPageSize_main() {\n // Retrieve page-size based on jsPDF settings, if not explicitly provided.\n pageSize = pageSize || jsPDF.getPageSize(this.opt.jsPDF);\n\n // Add 'inner' field if not present.\n if (!pageSize.hasOwnProperty(\"inner\")) {\n pageSize.inner = {\n width: pageSize.width - this.opt.margin[1] - this.opt.margin[3],\n height: pageSize.height - this.opt.margin[0] - this.opt.margin[2]\n };\n pageSize.inner.px = {\n width: toPx(pageSize.inner.width, pageSize.k),\n height: toPx(pageSize.inner.height, pageSize.k)\n };\n pageSize.inner.ratio = pageSize.inner.height / pageSize.inner.width;\n }\n\n // Attach pageSize to this.\n this.prop.pageSize = pageSize;\n });\n };\n\n Worker.prototype.setProgress = function setProgress(val, state, n, stack) {\n // Immediately update all progress values.\n if (val != null) this.progress.val = val;\n if (state != null) this.progress.state = state;\n if (n != null) this.progress.n = n;\n if (stack != null) this.progress.stack = stack;\n this.progress.ratio = this.progress.val / this.progress.state;\n\n // Return this for command chaining.\n return this;\n };\n\n Worker.prototype.updateProgress = function updateProgress(\n val,\n state,\n n,\n stack\n ) {\n // Immediately update all progress values, using setProgress.\n return this.setProgress(\n val ? this.progress.val + val : null,\n state ? state : null,\n n ? this.progress.n + n : null,\n stack ? this.progress.stack.concat(stack) : null\n );\n };\n\n /* ----- PROMISE MAPPING ----- */\n\n Worker.prototype.then = function then(onFulfilled, onRejected) {\n // Wrap `this` for encapsulation.\n var self = this;\n\n return this.thenCore(onFulfilled, onRejected, function then_main(\n onFulfilled,\n onRejected\n ) {\n // Update progress while queuing, calling, and resolving `then`.\n self.updateProgress(null, null, 1, [onFulfilled]);\n return Promise.prototype.then\n .call(this, function then_pre(val) {\n self.updateProgress(null, onFulfilled);\n return val;\n })\n .then(onFulfilled, onRejected)\n .then(function then_post(val) {\n self.updateProgress(1);\n return val;\n });\n });\n };\n\n Worker.prototype.thenCore = function thenCore(\n onFulfilled,\n onRejected,\n thenBase\n ) {\n // Handle optional thenBase parameter.\n thenBase = thenBase || Promise.prototype.then;\n\n // Wrap `this` for encapsulation and bind it to the promise handlers.\n var self = this;\n if (onFulfilled) {\n onFulfilled = onFulfilled.bind(self);\n }\n if (onRejected) {\n onRejected = onRejected.bind(self);\n }\n\n // Cast self into a Promise to avoid polyfills recursively defining `then`.\n var isNative =\n Promise.toString().indexOf(\"[native code]\") !== -1 &&\n Promise.name === \"Promise\";\n var selfPromise = isNative\n ? self\n : Worker.convert(Object.assign({}, self), Promise.prototype);\n\n // Return the promise, after casting it into a Worker and preserving props.\n var returnVal = thenBase.call(selfPromise, onFulfilled, onRejected);\n return Worker.convert(returnVal, self.__proto__);\n };\n\n Worker.prototype.thenExternal = function thenExternal(\n onFulfilled,\n onRejected\n ) {\n // Call `then` and return a standard promise (exits the Worker chain).\n return Promise.prototype.then.call(this, onFulfilled, onRejected);\n };\n\n Worker.prototype.thenList = function thenList(fns) {\n // Queue a series of promise 'factories' into the promise chain.\n var self = this;\n fns.forEach(function thenList_forEach(fn) {\n self = self.thenCore(fn);\n });\n return self;\n };\n\n Worker.prototype[\"catch\"] = function(onRejected) {\n // Bind `this` to the promise handler, call `catch`, and return a Worker.\n if (onRejected) {\n onRejected = onRejected.bind(this);\n }\n var returnVal = Promise.prototype[\"catch\"].call(this, onRejected);\n return Worker.convert(returnVal, this);\n };\n\n Worker.prototype.catchExternal = function catchExternal(onRejected) {\n // Call `catch` and return a standard promise (exits the Worker chain).\n return Promise.prototype[\"catch\"].call(this, onRejected);\n };\n\n Worker.prototype.error = function error(msg) {\n // Throw the error in the Promise chain.\n return this.then(function error_main() {\n throw new Error(msg);\n });\n };\n\n /* ----- ALIASES ----- */\n\n Worker.prototype.using = Worker.prototype.set;\n Worker.prototype.saveAs = Worker.prototype.save;\n Worker.prototype.export = Worker.prototype.output;\n Worker.prototype.run = Worker.prototype.then;\n\n // Get dimensions of a PDF page, as determined by jsPDF.\n jsPDF.getPageSize = function(orientation, unit, format) {\n // Decode options object\n if (typeof orientation === \"object\") {\n var options = orientation;\n orientation = options.orientation;\n unit = options.unit || unit;\n format = options.format || format;\n }\n\n // Default options\n unit = unit || \"mm\";\n format = format || \"a4\";\n orientation = (\"\" + (orientation || \"P\")).toLowerCase();\n var format_as_string = (\"\" + format).toLowerCase();\n\n // Size in pt of various paper formats\n var pageFormats = {\n a0: [2383.94, 3370.39],\n a1: [1683.78, 2383.94],\n a2: [1190.55, 1683.78],\n a3: [841.89, 1190.55],\n a4: [595.28, 841.89],\n a5: [419.53, 595.28],\n a6: [297.64, 419.53],\n a7: [209.76, 297.64],\n a8: [147.4, 209.76],\n a9: [104.88, 147.4],\n a10: [73.7, 104.88],\n b0: [2834.65, 4008.19],\n b1: [2004.09, 2834.65],\n b2: [1417.32, 2004.09],\n b3: [1000.63, 1417.32],\n b4: [708.66, 1000.63],\n b5: [498.9, 708.66],\n b6: [354.33, 498.9],\n b7: [249.45, 354.33],\n b8: [175.75, 249.45],\n b9: [124.72, 175.75],\n b10: [87.87, 124.72],\n c0: [2599.37, 3676.54],\n c1: [1836.85, 2599.37],\n c2: [1298.27, 1836.85],\n c3: [918.43, 1298.27],\n c4: [649.13, 918.43],\n c5: [459.21, 649.13],\n c6: [323.15, 459.21],\n c7: [229.61, 323.15],\n c8: [161.57, 229.61],\n c9: [113.39, 161.57],\n c10: [79.37, 113.39],\n dl: [311.81, 623.62],\n letter: [612, 792],\n \"government-letter\": [576, 756],\n legal: [612, 1008],\n \"junior-legal\": [576, 360],\n ledger: [1224, 792],\n tabloid: [792, 1224],\n \"credit-card\": [153, 243]\n };\n\n var k;\n // Unit conversion\n switch (unit) {\n case \"pt\":\n k = 1;\n break;\n case \"mm\":\n k = 72 / 25.4;\n break;\n case \"cm\":\n k = 72 / 2.54;\n break;\n case \"in\":\n k = 72;\n break;\n case \"px\":\n k = 72 / 96;\n break;\n case \"pc\":\n k = 12;\n break;\n case \"em\":\n k = 12;\n break;\n case \"ex\":\n k = 6;\n break;\n default:\n throw \"Invalid unit: \" + unit;\n }\n var pageHeight = 0;\n var pageWidth = 0;\n\n // Dimensions are stored as user units and converted to points on output\n if (pageFormats.hasOwnProperty(format_as_string)) {\n pageHeight = pageFormats[format_as_string][1] / k;\n pageWidth = pageFormats[format_as_string][0] / k;\n } else {\n try {\n pageHeight = format[1];\n pageWidth = format[0];\n } catch (err) {\n throw new Error(\"Invalid format: \" + format);\n }\n }\n\n var tmp;\n // Handle page orientation\n if (orientation === \"p\" || orientation === \"portrait\") {\n orientation = \"p\";\n if (pageWidth > pageHeight) {\n tmp = pageWidth;\n pageWidth = pageHeight;\n pageHeight = tmp;\n }\n } else if (orientation === \"l\" || orientation === \"landscape\") {\n orientation = \"l\";\n if (pageHeight > pageWidth) {\n tmp = pageWidth;\n pageWidth = pageHeight;\n pageHeight = tmp;\n }\n } else {\n throw \"Invalid orientation: \" + orientation;\n }\n\n // Return information (k is the unit conversion ratio from pts)\n var info = {\n width: pageWidth,\n height: pageHeight,\n unit: unit,\n k: k,\n orientation: orientation\n };\n return info;\n };\n\n /**\n * @typedef FontFace\n *\n * The font-face type implements an interface similar to that of the font-face CSS rule,\n * and is used by jsPDF to match fonts when the font property of CanvasRenderingContext2D\n * is updated.\n *\n * All properties expect values similar to those in the font-face CSS rule. A difference\n * is the font-family, which do not need to be enclosed in double-quotes when containing\n * spaces like in CSS.\n *\n * @property {string} family The name of the font-family.\n * @property {string|undefined} style The style that this font-face defines, e.g. 'italic'.\n * @property {string|number|undefined} weight The weight of the font, either as a string or a number (400, 500, 600, e.g.)\n * @property {string|undefined} stretch The stretch of the font, e.g. condensed, normal, expanded.\n * @property {Object[]} src A list of URLs from where fonts of various formats can be fetched.\n * @property {string} [src] url A URL to a font of a specific format.\n * @property {string} [src] format Format of the font referenced by the URL.\n */\n\n /**\n * Generate a PDF from an HTML element or string using.\n *\n * @name html\n * @function\n * @param {HTMLElement|string} source The source HTMLElement or a string containing HTML.\n * @param {Object} [options] Collection of settings\n * @param {function} [options.callback] The mandatory callback-function gets as first parameter the current jsPDF instance\n * @param {(number|number[])=} [options.margin] Page margins [top, right, bottom, left]. Default is 0.\n * @param {(boolean|'slice'|'text')=} [options.autoPaging] The auto paging mode.\n *
      \n *
    • \n * false: Auto paging is disabled.\n *
    • \n *
    • \n * true or 'slice': Will cut shapes or text chunks across page breaks. Will possibly\n * slice text in half, making it difficult to read.\n *
    • \n *
    • \n * 'text': Trys not to cut text in half across page breaks. Works best for documents consisting\n * mostly of a single column of text.\n *
    • \n *
    \n * Default is true.\n * @param {string} [options.filename] name of the file\n * @param {HTMLOptionImage} [options.image] image settings when converting HTML to image\n * @param {Html2CanvasOptions} [options.html2canvas] html2canvas options\n * @param {FontFace[]} [options.fontFaces] A list of font-faces to match when resolving fonts. Fonts will be added to the PDF based on the specified URL. If omitted, the font match algorithm falls back to old algorithm.\n * @param {jsPDF} [options.jsPDF] jsPDF instance\n * @param {number=} [options.x] x position on the PDF document in jsPDF units.\n * @param {number=} [options.y] y position on the PDF document in jsPDF units.\n * @param {number=} [options.width] The target width in the PDF document in jsPDF units. The rendered element will be\n * scaled such that it fits into the specified width. Has no effect if either the html2canvas.scale is\n * specified or the windowWidth option is NOT specified.\n * @param {number=} [options.windowWidth] The window width in CSS pixels. In contrast to the\n * html2canvas.windowWidth option, this option affects the actual container size while rendering and\n * does NOT affect CSS media queries. This option only has an effect, if the width option is also specified.\n *\n * @example\n * var doc = new jsPDF();\n *\n * doc.html(document.body, {\n * callback: function (doc) {\n * doc.save();\n * },\n * x: 10,\n * y: 10\n * });\n */\n jsPDFAPI.html = function(src, options) {\n \"use strict\";\n\n options = options || {};\n options.callback = options.callback || function() {};\n options.html2canvas = options.html2canvas || {};\n options.html2canvas.canvas = options.html2canvas.canvas || this.canvas;\n options.jsPDF = options.jsPDF || this;\n options.fontFaces = options.fontFaces\n ? options.fontFaces.map(normalizeFontFace)\n : null;\n\n // Create a new worker with the given options.\n var worker = new Worker(options);\n\n if (!options.worker) {\n // If worker is not set to true, perform the traditional 'simple' operation.\n return worker.from(src).doCallback();\n } else {\n // Otherwise, return the worker for new Promise-based operation.\n return worker;\n }\n };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF Outline PlugIn\n *\n * Generates a PDF Outline\n * @name outline\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n var namesOid;\n //var destsGoto = [];\n\n jsPDFAPI.events.push([\n \"postPutResources\",\n function() {\n var pdf = this;\n var rx = /^(\\d+) 0 obj$/;\n\n // Write action goto objects for each page\n // this.outline.destsGoto = [];\n // for (var i = 0; i < totalPages; i++) {\n // var id = pdf.internal.newObject();\n // this.outline.destsGoto.push(id);\n // pdf.internal.write(\"<> endobj\");\n // }\n //\n // for (var i = 0; i < dests.length; i++) {\n // pdf.internal.write(\"(page_\" + (i + 1) + \")\" + dests[i] + \" 0\n // R\");\n // }\n //\n if (this.outline.root.children.length > 0) {\n var lines = pdf.outline.render().split(/\\r\\n/);\n for (var i = 0; i < lines.length; i++) {\n var line = lines[i];\n var m = rx.exec(line);\n if (m != null) {\n var oid = m[1];\n pdf.internal.newObjectDeferredBegin(oid, false);\n }\n pdf.internal.write(line);\n }\n }\n\n // This code will write named destination for each page reference\n // (page_1, etc)\n if (this.outline.createNamedDestinations) {\n var totalPages = this.internal.pages.length;\n // WARNING: this assumes jsPDF starts on page 3 and pageIDs\n // follow 5, 7, 9, etc\n // Write destination objects for each page\n var dests = [];\n for (var i = 0; i < totalPages; i++) {\n var id = pdf.internal.newObject();\n dests.push(id);\n var info = pdf.internal.getPageInfo(i + 1);\n pdf.internal.write(\n \"<< /D[\" + info.objId + \" 0 R /XYZ null null null]>> endobj\"\n );\n }\n\n // assign a name for each destination\n var names2Oid = pdf.internal.newObject();\n pdf.internal.write(\"<< /Names [ \");\n for (var i = 0; i < dests.length; i++) {\n pdf.internal.write(\"(page_\" + (i + 1) + \")\" + dests[i] + \" 0 R\");\n }\n pdf.internal.write(\" ] >>\", \"endobj\");\n\n // var kids = pdf.internal.newObject();\n // pdf.internal.write('<< /Kids [ ' + names2Oid + ' 0 R');\n // pdf.internal.write(' ] >>', 'endobj');\n\n namesOid = pdf.internal.newObject();\n pdf.internal.write(\"<< /Dests \" + names2Oid + \" 0 R\");\n pdf.internal.write(\">>\", \"endobj\");\n }\n }\n ]);\n\n jsPDFAPI.events.push([\n \"putCatalog\",\n function() {\n var pdf = this;\n if (pdf.outline.root.children.length > 0) {\n pdf.internal.write(\n \"/Outlines\",\n this.outline.makeRef(this.outline.root)\n );\n if (this.outline.createNamedDestinations) {\n pdf.internal.write(\"/Names \" + namesOid + \" 0 R\");\n }\n // Open with Bookmarks showing\n // pdf.internal.write(\"/PageMode /UseOutlines\");\n }\n }\n ]);\n\n jsPDFAPI.events.push([\n \"initialized\",\n function() {\n var pdf = this;\n\n pdf.outline = {\n createNamedDestinations: false,\n root: {\n children: []\n }\n };\n\n /**\n * Options: pageNumber\n */\n pdf.outline.add = function(parent, title, options) {\n var item = {\n title: title,\n options: options,\n children: []\n };\n if (parent == null) {\n parent = this.root;\n }\n parent.children.push(item);\n return item;\n };\n\n pdf.outline.render = function() {\n this.ctx = {};\n this.ctx.val = \"\";\n this.ctx.pdf = pdf;\n\n this.genIds_r(this.root);\n this.renderRoot(this.root);\n this.renderItems(this.root);\n\n return this.ctx.val;\n };\n\n pdf.outline.genIds_r = function(node) {\n node.id = pdf.internal.newObjectDeferred();\n for (var i = 0; i < node.children.length; i++) {\n this.genIds_r(node.children[i]);\n }\n };\n\n pdf.outline.renderRoot = function(node) {\n this.objStart(node);\n this.line(\"/Type /Outlines\");\n if (node.children.length > 0) {\n this.line(\"/First \" + this.makeRef(node.children[0]));\n this.line(\n \"/Last \" + this.makeRef(node.children[node.children.length - 1])\n );\n }\n this.line(\n \"/Count \" +\n this.count_r(\n {\n count: 0\n },\n node\n )\n );\n this.objEnd();\n };\n\n pdf.outline.renderItems = function(node) {\n var getVerticalCoordinateString = this.ctx.pdf.internal\n .getVerticalCoordinateString;\n for (var i = 0; i < node.children.length; i++) {\n var item = node.children[i];\n this.objStart(item);\n\n this.line(\"/Title \" + this.makeString(item.title));\n\n this.line(\"/Parent \" + this.makeRef(node));\n if (i > 0) {\n this.line(\"/Prev \" + this.makeRef(node.children[i - 1]));\n }\n if (i < node.children.length - 1) {\n this.line(\"/Next \" + this.makeRef(node.children[i + 1]));\n }\n if (item.children.length > 0) {\n this.line(\"/First \" + this.makeRef(item.children[0]));\n this.line(\n \"/Last \" + this.makeRef(item.children[item.children.length - 1])\n );\n }\n\n var count = (this.count = this.count_r(\n {\n count: 0\n },\n item\n ));\n if (count > 0) {\n this.line(\"/Count \" + count);\n }\n\n if (item.options) {\n if (item.options.pageNumber) {\n // Explicit Destination\n //WARNING this assumes page ids are 3,5,7, etc.\n var info = pdf.internal.getPageInfo(item.options.pageNumber);\n this.line(\n \"/Dest \" +\n \"[\" +\n info.objId +\n \" 0 R /XYZ 0 \" +\n getVerticalCoordinateString(0) +\n \" 0]\"\n );\n // this line does not work on all clients (pageNumber instead of page ref)\n //this.line('/Dest ' + '[' + (item.options.pageNumber - 1) + ' /XYZ 0 ' + this.ctx.pdf.internal.pageSize.getHeight() + ' 0]');\n\n // Named Destination\n // this.line('/Dest (page_' + (item.options.pageNumber) + ')');\n\n // Action Destination\n // var id = pdf.internal.newObject();\n // pdf.internal.write('<> endobj');\n // this.line('/A ' + id + ' 0 R' );\n }\n }\n this.objEnd();\n }\n for (var z = 0; z < node.children.length; z++) {\n this.renderItems(node.children[z]);\n }\n };\n\n pdf.outline.line = function(text) {\n this.ctx.val += text + \"\\r\\n\";\n };\n\n pdf.outline.makeRef = function(node) {\n return node.id + \" 0 R\";\n };\n\n pdf.outline.makeString = function(val) {\n return \"(\" + pdf.internal.pdfEscape(val) + \")\";\n };\n\n pdf.outline.objStart = function(node) {\n this.ctx.val += \"\\r\\n\" + node.id + \" 0 obj\" + \"\\r\\n<<\\r\\n\";\n };\n\n pdf.outline.objEnd = function() {\n this.ctx.val += \">> \\r\\n\" + \"endobj\" + \"\\r\\n\";\n };\n\n pdf.outline.count_r = function(ctx, node) {\n for (var i = 0; i < node.children.length; i++) {\n ctx.count++;\n this.count_r(ctx, node.children[i]);\n }\n return ctx.count;\n };\n }\n ]);\n\n return this;\n})(jsPDF.API);\n","/**\n * @license\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF jpeg Support PlugIn\n *\n * @name jpeg_support\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n /**\n * 0xc0 (SOF) Huffman - Baseline DCT\n * 0xc1 (SOF) Huffman - Extended sequential DCT\n * 0xc2 Progressive DCT (SOF2)\n * 0xc3 Spatial (sequential) lossless (SOF3)\n * 0xc4 Differential sequential DCT (SOF5)\n * 0xc5 Differential progressive DCT (SOF6)\n * 0xc6 Differential spatial (SOF7)\n * 0xc7\n */\n var markers = [0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7];\n\n //takes a string imgData containing the raw bytes of\n //a jpeg image and returns [width, height]\n //Algorithm from: http://www.64lines.com/jpeg-width-height\n var getJpegInfo = function(imgData) {\n var width, height, numcomponents;\n var blockLength = imgData.charCodeAt(4) * 256 + imgData.charCodeAt(5);\n var len = imgData.length;\n var result = { width: 0, height: 0, numcomponents: 1 };\n for (var i = 4; i < len; i += 2) {\n i += blockLength;\n if (markers.indexOf(imgData.charCodeAt(i + 1)) !== -1) {\n height = imgData.charCodeAt(i + 5) * 256 + imgData.charCodeAt(i + 6);\n width = imgData.charCodeAt(i + 7) * 256 + imgData.charCodeAt(i + 8);\n numcomponents = imgData.charCodeAt(i + 9);\n result = { width: width, height: height, numcomponents: numcomponents };\n break;\n } else {\n blockLength =\n imgData.charCodeAt(i + 2) * 256 + imgData.charCodeAt(i + 3);\n }\n }\n return result;\n };\n\n /**\n * @ignore\n */\n jsPDFAPI.processJPEG = function(\n data,\n index,\n alias,\n compression,\n dataAsBinaryString,\n colorSpace\n ) {\n var filter = this.decode.DCT_DECODE,\n bpc = 8,\n dims,\n result = null;\n\n if (\n typeof data === \"string\" ||\n this.__addimage__.isArrayBuffer(data) ||\n this.__addimage__.isArrayBufferView(data)\n ) {\n // if we already have a stored binary string rep use that\n data = dataAsBinaryString || data;\n data = this.__addimage__.isArrayBuffer(data)\n ? new Uint8Array(data)\n : data;\n data = this.__addimage__.isArrayBufferView(data)\n ? this.__addimage__.arrayBufferToBinaryString(data)\n : data;\n\n dims = getJpegInfo(data);\n switch (dims.numcomponents) {\n case 1:\n colorSpace = this.color_spaces.DEVICE_GRAY;\n break;\n case 4:\n colorSpace = this.color_spaces.DEVICE_CMYK;\n break;\n case 3:\n colorSpace = this.color_spaces.DEVICE_RGB;\n break;\n }\n\n result = {\n data: data,\n width: dims.width,\n height: dims.height,\n colorSpace: colorSpace,\n bitsPerComponent: bpc,\n filter: filter,\n index: index,\n alias: alias\n };\n }\n return result;\n };\n})(jsPDF.API);\n","// Generated by CoffeeScript 1.4.0\n\n/**\n * @license\n * PNG.js\n * Copyright (c) 2011 Devon Govett\n * MIT LICENSE\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this\n * software and associated documentation files (the \"Software\"), to deal in the Software\n * without restriction, including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons\n * to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or\n * substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING\n * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\nimport { unzlibSync } from \"./fflate.js\";\nimport { globalObject } from \"./globalObject.js\";\n\nvar PNG = (function() {\n var APNG_BLEND_OP_OVER,\n APNG_BLEND_OP_SOURCE,\n APNG_DISPOSE_OP_BACKGROUND,\n APNG_DISPOSE_OP_NONE,\n APNG_DISPOSE_OP_PREVIOUS,\n makeImage,\n scratchCanvas,\n scratchCtx;\n\n APNG_DISPOSE_OP_NONE = 0;\n\n APNG_DISPOSE_OP_BACKGROUND = 1;\n\n APNG_DISPOSE_OP_PREVIOUS = 2;\n\n APNG_BLEND_OP_SOURCE = 0;\n\n APNG_BLEND_OP_OVER = 1;\n\n function PNG(data) {\n var chunkSize,\n colors,\n palLen,\n delayDen,\n delayNum,\n frame,\n i,\n index,\n key,\n section,\n palShort,\n text,\n _i,\n _j,\n _ref;\n this.data = data;\n this.pos = 8;\n this.palette = [];\n this.imgData = [];\n this.transparency = {};\n this.animation = null;\n this.text = {};\n frame = null;\n while (true) {\n chunkSize = this.readUInt32();\n section = function() {\n var _i, _results;\n _results = [];\n for (i = _i = 0; _i < 4; i = ++_i) {\n _results.push(String.fromCharCode(this.data[this.pos++]));\n }\n return _results;\n }\n .call(this)\n .join(\"\");\n switch (section) {\n case \"IHDR\":\n this.width = this.readUInt32();\n this.height = this.readUInt32();\n this.bits = this.data[this.pos++];\n this.colorType = this.data[this.pos++];\n this.compressionMethod = this.data[this.pos++];\n this.filterMethod = this.data[this.pos++];\n this.interlaceMethod = this.data[this.pos++];\n break;\n case \"acTL\":\n this.animation = {\n numFrames: this.readUInt32(),\n numPlays: this.readUInt32() || Infinity,\n frames: []\n };\n break;\n case \"PLTE\":\n this.palette = this.read(chunkSize);\n break;\n case \"fcTL\":\n if (frame) {\n this.animation.frames.push(frame);\n }\n this.pos += 4;\n frame = {\n width: this.readUInt32(),\n height: this.readUInt32(),\n xOffset: this.readUInt32(),\n yOffset: this.readUInt32()\n };\n delayNum = this.readUInt16();\n delayDen = this.readUInt16() || 100;\n frame.delay = (1000 * delayNum) / delayDen;\n frame.disposeOp = this.data[this.pos++];\n frame.blendOp = this.data[this.pos++];\n frame.data = [];\n break;\n case \"IDAT\":\n case \"fdAT\":\n if (section === \"fdAT\") {\n this.pos += 4;\n chunkSize -= 4;\n }\n data = (frame != null ? frame.data : void 0) || this.imgData;\n for (\n i = _i = 0;\n 0 <= chunkSize ? _i < chunkSize : _i > chunkSize;\n i = 0 <= chunkSize ? ++_i : --_i\n ) {\n data.push(this.data[this.pos++]);\n }\n break;\n case \"tRNS\":\n this.transparency = {};\n switch (this.colorType) {\n case 3:\n palLen = this.palette.length / 3;\n this.transparency.indexed = this.read(chunkSize);\n if (this.transparency.indexed.length > palLen)\n throw new Error(\"More transparent colors than palette size\");\n /*\n * According to the PNG spec trns should be increased to the same size as palette if shorter\n */\n //palShort = 255 - this.transparency.indexed.length;\n palShort = palLen - this.transparency.indexed.length;\n if (palShort > 0) {\n for (\n i = _j = 0;\n 0 <= palShort ? _j < palShort : _j > palShort;\n i = 0 <= palShort ? ++_j : --_j\n ) {\n this.transparency.indexed.push(255);\n }\n }\n break;\n case 0:\n this.transparency.grayscale = this.read(chunkSize)[0];\n break;\n case 2:\n this.transparency.rgb = this.read(chunkSize);\n }\n break;\n case \"tEXt\":\n text = this.read(chunkSize);\n index = text.indexOf(0);\n key = String.fromCharCode.apply(String, text.slice(0, index));\n this.text[key] = String.fromCharCode.apply(\n String,\n text.slice(index + 1)\n );\n break;\n case \"IEND\":\n if (frame) {\n this.animation.frames.push(frame);\n }\n this.colors = function() {\n switch (this.colorType) {\n case 0:\n case 3:\n case 4:\n return 1;\n case 2:\n case 6:\n return 3;\n }\n }.call(this);\n this.hasAlphaChannel = (_ref = this.colorType) === 4 || _ref === 6;\n colors = this.colors + (this.hasAlphaChannel ? 1 : 0);\n this.pixelBitlength = this.bits * colors;\n this.colorSpace = function() {\n switch (this.colors) {\n case 1:\n return \"DeviceGray\";\n case 3:\n return \"DeviceRGB\";\n }\n }.call(this);\n this.imgData = new Uint8Array(this.imgData);\n return;\n default:\n this.pos += chunkSize;\n }\n this.pos += 4;\n if (this.pos > this.data.length) {\n throw new Error(\"Incomplete or corrupt PNG file\");\n }\n }\n }\n\n PNG.prototype.read = function(bytes) {\n var i, _i, _results;\n _results = [];\n for (\n i = _i = 0;\n 0 <= bytes ? _i < bytes : _i > bytes;\n i = 0 <= bytes ? ++_i : --_i\n ) {\n _results.push(this.data[this.pos++]);\n }\n return _results;\n };\n\n PNG.prototype.readUInt32 = function() {\n var b1, b2, b3, b4;\n b1 = this.data[this.pos++] << 24;\n b2 = this.data[this.pos++] << 16;\n b3 = this.data[this.pos++] << 8;\n b4 = this.data[this.pos++];\n return b1 | b2 | b3 | b4;\n };\n\n PNG.prototype.readUInt16 = function() {\n var b1, b2;\n b1 = this.data[this.pos++] << 8;\n b2 = this.data[this.pos++];\n return b1 | b2;\n };\n\n PNG.prototype.decodePixels = function(data) {\n var pixelBytes = this.pixelBitlength / 8;\n var fullPixels = new Uint8Array(this.width * this.height * pixelBytes);\n var pos = 0;\n var _this = this;\n\n if (data == null) {\n data = this.imgData;\n }\n if (data.length === 0) {\n return new Uint8Array(0);\n }\n\n data = unzlibSync(data);\n function pass(x0, y0, dx, dy) {\n var abyte,\n c,\n col,\n i,\n left,\n length,\n p,\n pa,\n paeth,\n pb,\n pc,\n pixels,\n row,\n scanlineLength,\n upper,\n upperLeft,\n _i,\n _j,\n _k,\n _l,\n _m;\n var w = Math.ceil((_this.width - x0) / dx),\n h = Math.ceil((_this.height - y0) / dy);\n var isFull = _this.width == w && _this.height == h;\n scanlineLength = pixelBytes * w;\n pixels = isFull ? fullPixels : new Uint8Array(scanlineLength * h);\n length = data.length;\n row = 0;\n c = 0;\n while (row < h && pos < length) {\n switch (data[pos++]) {\n case 0:\n for (i = _i = 0; _i < scanlineLength; i = _i += 1) {\n pixels[c++] = data[pos++];\n }\n break;\n case 1:\n for (i = _j = 0; _j < scanlineLength; i = _j += 1) {\n abyte = data[pos++];\n left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n pixels[c++] = (abyte + left) % 256;\n }\n break;\n case 2:\n for (i = _k = 0; _k < scanlineLength; i = _k += 1) {\n abyte = data[pos++];\n col = (i - (i % pixelBytes)) / pixelBytes;\n upper =\n row &&\n pixels[\n (row - 1) * scanlineLength +\n col * pixelBytes +\n (i % pixelBytes)\n ];\n pixels[c++] = (upper + abyte) % 256;\n }\n break;\n case 3:\n for (i = _l = 0; _l < scanlineLength; i = _l += 1) {\n abyte = data[pos++];\n col = (i - (i % pixelBytes)) / pixelBytes;\n left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n upper =\n row &&\n pixels[\n (row - 1) * scanlineLength +\n col * pixelBytes +\n (i % pixelBytes)\n ];\n pixels[c++] = (abyte + Math.floor((left + upper) / 2)) % 256;\n }\n break;\n case 4:\n for (i = _m = 0; _m < scanlineLength; i = _m += 1) {\n abyte = data[pos++];\n col = (i - (i % pixelBytes)) / pixelBytes;\n left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n if (row === 0) {\n upper = upperLeft = 0;\n } else {\n upper =\n pixels[\n (row - 1) * scanlineLength +\n col * pixelBytes +\n (i % pixelBytes)\n ];\n upperLeft =\n col &&\n pixels[\n (row - 1) * scanlineLength +\n (col - 1) * pixelBytes +\n (i % pixelBytes)\n ];\n }\n p = left + upper - upperLeft;\n pa = Math.abs(p - left);\n pb = Math.abs(p - upper);\n pc = Math.abs(p - upperLeft);\n if (pa <= pb && pa <= pc) {\n paeth = left;\n } else if (pb <= pc) {\n paeth = upper;\n } else {\n paeth = upperLeft;\n }\n pixels[c++] = (abyte + paeth) % 256;\n }\n break;\n default:\n throw new Error(\"Invalid filter algorithm: \" + data[pos - 1]);\n }\n if (!isFull) {\n var fullPos = ((y0 + row * dy) * _this.width + x0) * pixelBytes;\n var partPos = row * scanlineLength;\n for (i = 0; i < w; i += 1) {\n for (var j = 0; j < pixelBytes; j += 1)\n fullPixels[fullPos++] = pixels[partPos++];\n fullPos += (dx - 1) * pixelBytes;\n }\n }\n row++;\n }\n }\n if (_this.interlaceMethod == 1) {\n /*\n 1 6 4 6 2 6 4 6\n 7 7 7 7 7 7 7 7\n 5 6 5 6 5 6 5 6\n 7 7 7 7 7 7 7 7\n 3 6 4 6 3 6 4 6\n 7 7 7 7 7 7 7 7\n 5 6 5 6 5 6 5 6\n 7 7 7 7 7 7 7 7\n */\n pass(0, 0, 8, 8); // 1\n /* NOTE these seem to follow the pattern:\n * pass(x, 0, 2*x, 2*x);\n * pass(0, x, x, 2*x);\n * with x being 4, 2, 1.\n */\n pass(4, 0, 8, 8); // 2\n pass(0, 4, 4, 8); // 3\n\n pass(2, 0, 4, 4); // 4\n pass(0, 2, 2, 4); // 5\n\n pass(1, 0, 2, 2); // 6\n pass(0, 1, 1, 2); // 7\n } else {\n pass(0, 0, 1, 1);\n }\n return fullPixels;\n };\n\n PNG.prototype.decodePalette = function() {\n var c, i, length, palette, pos, ret, transparency, _i, _ref, _ref1;\n palette = this.palette;\n transparency = this.transparency.indexed || [];\n ret = new Uint8Array((transparency.length || 0) + palette.length);\n pos = 0;\n length = palette.length;\n c = 0;\n for (i = _i = 0, _ref = length; _i < _ref; i = _i += 3) {\n ret[pos++] = palette[i];\n ret[pos++] = palette[i + 1];\n ret[pos++] = palette[i + 2];\n ret[pos++] = (_ref1 = transparency[c++]) != null ? _ref1 : 255;\n }\n return ret;\n };\n\n PNG.prototype.copyToImageData = function(imageData, pixels) {\n var alpha, colors, data, i, input, j, k, length, palette, v, _ref;\n colors = this.colors;\n palette = null;\n alpha = this.hasAlphaChannel;\n if (this.palette.length) {\n palette =\n (_ref = this._decodedPalette) != null\n ? _ref\n : (this._decodedPalette = this.decodePalette());\n colors = 4;\n alpha = true;\n }\n data = imageData.data || imageData;\n length = data.length;\n input = palette || pixels;\n i = j = 0;\n if (colors === 1) {\n while (i < length) {\n k = palette ? pixels[i / 4] * 4 : j;\n v = input[k++];\n data[i++] = v;\n data[i++] = v;\n data[i++] = v;\n data[i++] = alpha ? input[k++] : 255;\n j = k;\n }\n } else {\n while (i < length) {\n k = palette ? pixels[i / 4] * 4 : j;\n data[i++] = input[k++];\n data[i++] = input[k++];\n data[i++] = input[k++];\n data[i++] = alpha ? input[k++] : 255;\n j = k;\n }\n }\n };\n\n PNG.prototype.decode = function() {\n var ret;\n ret = new Uint8Array(this.width * this.height * 4);\n this.copyToImageData(ret, this.decodePixels());\n return ret;\n };\n\n var hasBrowserCanvas = function() {\n if (Object.prototype.toString.call(globalObject) === \"[object Window]\") {\n try {\n scratchCanvas = globalObject.document.createElement(\"canvas\");\n scratchCtx = scratchCanvas.getContext(\"2d\");\n } catch (e) {\n return false;\n }\n return true;\n }\n return false;\n };\n\n hasBrowserCanvas();\n\n makeImage = function(imageData) {\n if (hasBrowserCanvas() === true) {\n var img;\n scratchCtx.width = imageData.width;\n scratchCtx.height = imageData.height;\n scratchCtx.clearRect(0, 0, imageData.width, imageData.height);\n scratchCtx.putImageData(imageData, 0, 0);\n img = new Image();\n img.src = scratchCanvas.toDataURL();\n return img;\n }\n throw new Error(\"This method requires a Browser with Canvas-capability.\");\n };\n\n PNG.prototype.decodeFrames = function(ctx) {\n var frame, i, imageData, pixels, _i, _len, _ref, _results;\n if (!this.animation) {\n return;\n }\n _ref = this.animation.frames;\n _results = [];\n for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {\n frame = _ref[i];\n imageData = ctx.createImageData(frame.width, frame.height);\n pixels = this.decodePixels(new Uint8Array(frame.data));\n this.copyToImageData(imageData, pixels);\n frame.imageData = imageData;\n _results.push((frame.image = makeImage(imageData)));\n }\n return _results;\n };\n\n PNG.prototype.renderFrame = function(ctx, number) {\n var frame, frames, prev;\n frames = this.animation.frames;\n frame = frames[number];\n prev = frames[number - 1];\n if (number === 0) {\n ctx.clearRect(0, 0, this.width, this.height);\n }\n if (\n (prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_BACKGROUND\n ) {\n ctx.clearRect(prev.xOffset, prev.yOffset, prev.width, prev.height);\n } else if (\n (prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_PREVIOUS\n ) {\n ctx.putImageData(prev.imageData, prev.xOffset, prev.yOffset);\n }\n if (frame.blendOp === APNG_BLEND_OP_SOURCE) {\n ctx.clearRect(frame.xOffset, frame.yOffset, frame.width, frame.height);\n }\n return ctx.drawImage(frame.image, frame.xOffset, frame.yOffset);\n };\n\n PNG.prototype.animate = function(ctx) {\n var doFrame,\n frameNumber,\n frames,\n numFrames,\n numPlays,\n _ref,\n _this = this;\n frameNumber = 0;\n (_ref = this.animation),\n (numFrames = _ref.numFrames),\n (frames = _ref.frames),\n (numPlays = _ref.numPlays);\n return (doFrame = function() {\n var f, frame;\n f = frameNumber++ % numFrames;\n frame = frames[f];\n _this.renderFrame(ctx, f);\n if (numFrames > 1 && frameNumber / numFrames < numPlays) {\n return (_this.animation._timeout = setTimeout(doFrame, frame.delay));\n }\n })();\n };\n\n PNG.prototype.stopAnimation = function() {\n var _ref;\n return clearTimeout(\n (_ref = this.animation) != null ? _ref._timeout : void 0\n );\n };\n\n PNG.prototype.render = function(canvas) {\n var ctx, data;\n if (canvas._png) {\n canvas._png.stopAnimation();\n }\n canvas._png = this;\n canvas.width = this.width;\n canvas.height = this.height;\n ctx = canvas.getContext(\"2d\");\n if (this.animation) {\n this.decodeFrames(ctx);\n return this.animate(ctx);\n } else {\n data = ctx.createImageData(this.width, this.height);\n this.copyToImageData(data, this.decodePixels());\n return ctx.putImageData(data, 0, 0);\n }\n };\n\n return PNG;\n})();\n\nexport { PNG };\n","/** @license\n * MIT license.\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n * 2014 Diego Casorran, https://github.com/diegocr\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF split_text_to_size plugin\n *\n * @name split_text_to_size\n * @module\n */\n(function(API) {\n \"use strict\";\n /**\n * Returns an array of length matching length of the 'word' string, with each\n * cell occupied by the width of the char in that position.\n *\n * @name getCharWidthsArray\n * @function\n * @param {string} text\n * @param {Object} options\n * @returns {Array}\n */\n var getCharWidthsArray = (API.getCharWidthsArray = function(text, options) {\n options = options || {};\n\n var activeFont = options.font || this.internal.getFont();\n var fontSize = options.fontSize || this.internal.getFontSize();\n var charSpace = options.charSpace || this.internal.getCharSpace();\n\n var widths = options.widths\n ? options.widths\n : activeFont.metadata.Unicode.widths;\n var widthsFractionOf = widths.fof ? widths.fof : 1;\n var kerning = options.kerning\n ? options.kerning\n : activeFont.metadata.Unicode.kerning;\n var kerningFractionOf = kerning.fof ? kerning.fof : 1;\n var doKerning = options.doKerning === false ? false : true;\n var kerningValue = 0;\n\n var i;\n var length = text.length;\n var char_code;\n var prior_char_code = 0; //for kerning\n var default_char_width = widths[0] || widthsFractionOf;\n var output = [];\n\n for (i = 0; i < length; i++) {\n char_code = text.charCodeAt(i);\n\n if (typeof activeFont.metadata.widthOfString === \"function\") {\n output.push(\n (activeFont.metadata.widthOfGlyph(\n activeFont.metadata.characterToGlyph(char_code)\n ) +\n charSpace * (1000 / fontSize) || 0) / 1000\n );\n } else {\n if (\n doKerning &&\n typeof kerning[char_code] === \"object\" &&\n !isNaN(parseInt(kerning[char_code][prior_char_code], 10))\n ) {\n kerningValue =\n kerning[char_code][prior_char_code] / kerningFractionOf;\n } else {\n kerningValue = 0;\n }\n output.push(\n (widths[char_code] || default_char_width) / widthsFractionOf +\n kerningValue\n );\n }\n prior_char_code = char_code;\n }\n\n return output;\n });\n\n /**\n * Returns a widths of string in a given font, if the font size is set as 1 point.\n *\n * In other words, this is \"proportional\" value. For 1 unit of font size, the length\n * of the string will be that much.\n *\n * Multiply by font size to get actual width in *points*\n * Then divide by 72 to get inches or divide by (72/25.6) to get 'mm' etc.\n *\n * @name getStringUnitWidth\n * @public\n * @function\n * @param {string} text\n * @param {string} options\n * @returns {number} result\n */\n var getStringUnitWidth = (API.getStringUnitWidth = function(text, options) {\n options = options || {};\n\n var fontSize = options.fontSize || this.internal.getFontSize();\n var font = options.font || this.internal.getFont();\n var charSpace = options.charSpace || this.internal.getCharSpace();\n var result = 0;\n\n if (API.processArabic) {\n text = API.processArabic(text);\n }\n\n if (typeof font.metadata.widthOfString === \"function\") {\n result =\n font.metadata.widthOfString(text, fontSize, charSpace) / fontSize;\n } else {\n result = getCharWidthsArray\n .apply(this, arguments)\n .reduce(function(pv, cv) {\n return pv + cv;\n }, 0);\n }\n return result;\n });\n\n /**\n returns array of lines\n */\n var splitLongWord = function(word, widths_array, firstLineMaxLen, maxLen) {\n var answer = [];\n\n // 1st, chop off the piece that can fit on the hanging line.\n var i = 0,\n l = word.length,\n workingLen = 0;\n while (i !== l && workingLen + widths_array[i] < firstLineMaxLen) {\n workingLen += widths_array[i];\n i++;\n }\n // this is first line.\n answer.push(word.slice(0, i));\n\n // 2nd. Split the rest into maxLen pieces.\n var startOfLine = i;\n workingLen = 0;\n while (i !== l) {\n if (workingLen + widths_array[i] > maxLen) {\n answer.push(word.slice(startOfLine, i));\n workingLen = 0;\n startOfLine = i;\n }\n workingLen += widths_array[i];\n i++;\n }\n if (startOfLine !== i) {\n answer.push(word.slice(startOfLine, i));\n }\n\n return answer;\n };\n\n // Note, all sizing inputs for this function must be in \"font measurement units\"\n // By default, for PDF, it's \"point\".\n var splitParagraphIntoLines = function(text, maxlen, options) {\n // at this time works only on Western scripts, ones with space char\n // separating the words. Feel free to expand.\n\n if (!options) {\n options = {};\n }\n\n var line = [],\n lines = [line],\n line_length = options.textIndent || 0,\n separator_length = 0,\n current_word_length = 0,\n word,\n widths_array,\n words = text.split(\" \"),\n spaceCharWidth = getCharWidthsArray.apply(this, [\" \", options])[0],\n i,\n l,\n tmp,\n lineIndent;\n\n if (options.lineIndent === -1) {\n lineIndent = words[0].length + 2;\n } else {\n lineIndent = options.lineIndent || 0;\n }\n if (lineIndent) {\n var pad = Array(lineIndent).join(\" \"),\n wrds = [];\n words.map(function(wrd) {\n wrd = wrd.split(/\\s*\\n/);\n if (wrd.length > 1) {\n wrds = wrds.concat(\n wrd.map(function(wrd, idx) {\n return (idx && wrd.length ? \"\\n\" : \"\") + wrd;\n })\n );\n } else {\n wrds.push(wrd[0]);\n }\n });\n words = wrds;\n lineIndent = getStringUnitWidth.apply(this, [pad, options]);\n }\n\n for (i = 0, l = words.length; i < l; i++) {\n var force = 0;\n\n word = words[i];\n if (lineIndent && word[0] == \"\\n\") {\n word = word.substr(1);\n force = 1;\n }\n widths_array = getCharWidthsArray.apply(this, [word, options]);\n current_word_length = widths_array.reduce(function(pv, cv) {\n return pv + cv;\n }, 0);\n\n if (\n line_length + separator_length + current_word_length > maxlen ||\n force\n ) {\n if (current_word_length > maxlen) {\n // this happens when you have space-less long URLs for example.\n // we just chop these to size. We do NOT insert hiphens\n tmp = splitLongWord.apply(this, [\n word,\n widths_array,\n maxlen - (line_length + separator_length),\n maxlen\n ]);\n // first line we add to existing line object\n line.push(tmp.shift()); // it's ok to have extra space indicator there\n // last line we make into new line object\n line = [tmp.pop()];\n // lines in the middle we apped to lines object as whole lines\n while (tmp.length) {\n lines.push([tmp.shift()]); // single fragment occupies whole line\n }\n current_word_length = widths_array\n .slice(word.length - (line[0] ? line[0].length : 0))\n .reduce(function(pv, cv) {\n return pv + cv;\n }, 0);\n } else {\n // just put it on a new line\n line = [word];\n }\n\n // now we attach new line to lines\n lines.push(line);\n line_length = current_word_length + lineIndent;\n separator_length = spaceCharWidth;\n } else {\n line.push(word);\n\n line_length += separator_length + current_word_length;\n separator_length = spaceCharWidth;\n }\n }\n\n var postProcess;\n if (lineIndent) {\n postProcess = function(ln, idx) {\n return (idx ? pad : \"\") + ln.join(\" \");\n };\n } else {\n postProcess = function(ln) {\n return ln.join(\" \");\n };\n }\n\n return lines.map(postProcess);\n };\n\n /**\n * Splits a given string into an array of strings. Uses 'size' value\n * (in measurement units declared as default for the jsPDF instance)\n * and the font's \"widths\" and \"Kerning\" tables, where available, to\n * determine display length of a given string for a given font.\n *\n * We use character's 100% of unit size (height) as width when Width\n * table or other default width is not available.\n *\n * @name splitTextToSize\n * @public\n * @function\n * @param {string} text Unencoded, regular JavaScript (Unicode, UTF-16 / UCS-2) string.\n * @param {number} size Nominal number, measured in units default to this instance of jsPDF.\n * @param {Object} options Optional flags needed for chopper to do the right thing.\n * @returns {Array} array Array with strings chopped to size.\n */\n API.splitTextToSize = function(text, maxlen, options) {\n \"use strict\";\n\n options = options || {};\n\n var fsize = options.fontSize || this.internal.getFontSize(),\n newOptions = function(options) {\n var widths = {\n 0: 1\n },\n kerning = {};\n\n if (!options.widths || !options.kerning) {\n var f = this.internal.getFont(options.fontName, options.fontStyle),\n encoding = \"Unicode\";\n // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE\n // Actual JavaScript-native String's 16bit char codes used.\n // no multi-byte logic here\n\n if (f.metadata[encoding]) {\n return {\n widths: f.metadata[encoding].widths || widths,\n kerning: f.metadata[encoding].kerning || kerning\n };\n } else {\n return {\n font: f.metadata,\n fontSize: this.internal.getFontSize(),\n charSpace: this.internal.getCharSpace()\n };\n }\n } else {\n return {\n widths: options.widths,\n kerning: options.kerning\n };\n }\n }.call(this, options);\n\n // first we split on end-of-line chars\n var paragraphs;\n if (Array.isArray(text)) {\n paragraphs = text;\n } else {\n paragraphs = String(text).split(/\\r?\\n/);\n }\n\n // now we convert size (max length of line) into \"font size units\"\n // at present time, the \"font size unit\" is always 'point'\n // 'proportional' means, \"in proportion to font size\"\n var fontUnit_maxLen = (1.0 * this.internal.scaleFactor * maxlen) / fsize;\n // at this time, fsize is always in \"points\" regardless of the default measurement unit of the doc.\n // this may change in the future?\n // until then, proportional_maxlen is likely to be in 'points'\n\n // If first line is to be indented (shorter or longer) than maxLen\n // we indicate that by using CSS-style \"text-indent\" option.\n // here it's in font units too (which is likely 'points')\n // it can be negative (which makes the first line longer than maxLen)\n newOptions.textIndent = options.textIndent\n ? (options.textIndent * 1.0 * this.internal.scaleFactor) / fsize\n : 0;\n newOptions.lineIndent = options.lineIndent;\n\n var i,\n l,\n output = [];\n for (i = 0, l = paragraphs.length; i < l; i++) {\n output = output.concat(\n splitParagraphIntoLines.apply(this, [\n paragraphs[i],\n fontUnit_maxLen,\n newOptions\n ])\n );\n }\n\n return output;\n };\n})(jsPDF.API);\n","/**\n * @license\n * (c) Dean McNamee , 2013.\n *\n * https://github.com/deanm/omggif\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n *\n * omggif is a JavaScript implementation of a GIF 89a encoder and decoder,\n * including animation and compression. It does not rely on any specific\n * underlying system, so should run in the browser, Node, or Plask.\n */\n\n\"use strict\";\n\nimport { console } from \"./console.js\";\n\nfunction GifWriter(buf, width, height, gopts) {\n var p = 0;\n\n var gopts = gopts === undefined ? {} : gopts;\n var loop_count = gopts.loop === undefined ? null : gopts.loop;\n var global_palette = gopts.palette === undefined ? null : gopts.palette;\n\n if (width <= 0 || height <= 0 || width > 65535 || height > 65535)\n throw new Error(\"Width/Height invalid.\");\n\n function check_palette_and_num_colors(palette) {\n var num_colors = palette.length;\n if (num_colors < 2 || num_colors > 256 || num_colors & (num_colors - 1)) {\n throw new Error(\n \"Invalid code/color length, must be power of 2 and 2 .. 256.\"\n );\n }\n return num_colors;\n }\n\n // - Header.\n buf[p++] = 0x47;\n buf[p++] = 0x49;\n buf[p++] = 0x46; // GIF\n buf[p++] = 0x38;\n buf[p++] = 0x39;\n buf[p++] = 0x61; // 89a\n\n // Handling of Global Color Table (palette) and background index.\n var gp_num_colors_pow2 = 0;\n var background = 0;\n if (global_palette !== null) {\n var gp_num_colors = check_palette_and_num_colors(global_palette);\n while ((gp_num_colors >>= 1)) ++gp_num_colors_pow2;\n gp_num_colors = 1 << gp_num_colors_pow2;\n --gp_num_colors_pow2;\n if (gopts.background !== undefined) {\n background = gopts.background;\n if (background >= gp_num_colors)\n throw new Error(\"Background index out of range.\");\n // The GIF spec states that a background index of 0 should be ignored, so\n // this is probably a mistake and you really want to set it to another\n // slot in the palette. But actually in the end most browsers, etc end\n // up ignoring this almost completely (including for dispose background).\n if (background === 0)\n throw new Error(\"Background index explicitly passed as 0.\");\n }\n }\n\n // - Logical Screen Descriptor.\n // NOTE(deanm): w/h apparently ignored by implementations, but set anyway.\n buf[p++] = width & 0xff;\n buf[p++] = (width >> 8) & 0xff;\n buf[p++] = height & 0xff;\n buf[p++] = (height >> 8) & 0xff;\n // NOTE: Indicates 0-bpp original color resolution (unused?).\n buf[p++] = (global_palette !== null ? 0x80 : 0) | gp_num_colors_pow2; // Global Color Table Flag. // NOTE: No sort flag (unused?).\n buf[p++] = background; // Background Color Index.\n buf[p++] = 0; // Pixel aspect ratio (unused?).\n\n // - Global Color Table\n if (global_palette !== null) {\n for (var i = 0, il = global_palette.length; i < il; ++i) {\n var rgb = global_palette[i];\n buf[p++] = (rgb >> 16) & 0xff;\n buf[p++] = (rgb >> 8) & 0xff;\n buf[p++] = rgb & 0xff;\n }\n }\n\n if (loop_count !== null) {\n // Netscape block for looping.\n if (loop_count < 0 || loop_count > 65535)\n throw new Error(\"Loop count invalid.\");\n // Extension code, label, and length.\n buf[p++] = 0x21;\n buf[p++] = 0xff;\n buf[p++] = 0x0b;\n // NETSCAPE2.0\n buf[p++] = 0x4e;\n buf[p++] = 0x45;\n buf[p++] = 0x54;\n buf[p++] = 0x53;\n buf[p++] = 0x43;\n buf[p++] = 0x41;\n buf[p++] = 0x50;\n buf[p++] = 0x45;\n buf[p++] = 0x32;\n buf[p++] = 0x2e;\n buf[p++] = 0x30;\n // Sub-block\n buf[p++] = 0x03;\n buf[p++] = 0x01;\n buf[p++] = loop_count & 0xff;\n buf[p++] = (loop_count >> 8) & 0xff;\n buf[p++] = 0x00; // Terminator.\n }\n\n var ended = false;\n\n this.addFrame = function(x, y, w, h, indexed_pixels, opts) {\n if (ended === true) {\n --p;\n ended = false;\n } // Un-end.\n\n opts = opts === undefined ? {} : opts;\n\n // TODO(deanm): Bounds check x, y. Do they need to be within the virtual\n // canvas width/height, I imagine?\n if (x < 0 || y < 0 || x > 65535 || y > 65535)\n throw new Error(\"x/y invalid.\");\n\n if (w <= 0 || h <= 0 || w > 65535 || h > 65535)\n throw new Error(\"Width/Height invalid.\");\n\n if (indexed_pixels.length < w * h)\n throw new Error(\"Not enough pixels for the frame size.\");\n\n var using_local_palette = true;\n var palette = opts.palette;\n if (palette === undefined || palette === null) {\n using_local_palette = false;\n palette = global_palette;\n }\n\n if (palette === undefined || palette === null)\n throw new Error(\"Must supply either a local or global palette.\");\n\n var num_colors = check_palette_and_num_colors(palette);\n\n // Compute the min_code_size (power of 2), destroying num_colors.\n var min_code_size = 0;\n while ((num_colors >>= 1)) ++min_code_size;\n num_colors = 1 << min_code_size; // Now we can easily get it back.\n\n var delay = opts.delay === undefined ? 0 : opts.delay;\n\n // From the spec:\n // 0 - No disposal specified. The decoder is\n // not required to take any action.\n // 1 - Do not dispose. The graphic is to be left\n // in place.\n // 2 - Restore to background color. The area used by the\n // graphic must be restored to the background color.\n // 3 - Restore to previous. The decoder is required to\n // restore the area overwritten by the graphic with\n // what was there prior to rendering the graphic.\n // 4-7 - To be defined.\n // NOTE(deanm): Dispose background doesn't really work, apparently most\n // browsers ignore the background palette index and clear to transparency.\n var disposal = opts.disposal === undefined ? 0 : opts.disposal;\n if (disposal < 0 || disposal > 3)\n // 4-7 is reserved.\n throw new Error(\"Disposal out of range.\");\n\n var use_transparency = false;\n var transparent_index = 0;\n if (opts.transparent !== undefined && opts.transparent !== null) {\n use_transparency = true;\n transparent_index = opts.transparent;\n if (transparent_index < 0 || transparent_index >= num_colors)\n throw new Error(\"Transparent color index.\");\n }\n\n if (disposal !== 0 || use_transparency || delay !== 0) {\n // - Graphics Control Extension\n buf[p++] = 0x21;\n buf[p++] = 0xf9; // Extension / Label.\n buf[p++] = 4; // Byte size.\n\n buf[p++] = (disposal << 2) | (use_transparency === true ? 1 : 0);\n buf[p++] = delay & 0xff;\n buf[p++] = (delay >> 8) & 0xff;\n buf[p++] = transparent_index; // Transparent color index.\n buf[p++] = 0; // Block Terminator.\n }\n\n // - Image Descriptor\n buf[p++] = 0x2c; // Image Seperator.\n buf[p++] = x & 0xff;\n buf[p++] = (x >> 8) & 0xff; // Left.\n buf[p++] = y & 0xff;\n buf[p++] = (y >> 8) & 0xff; // Top.\n buf[p++] = w & 0xff;\n buf[p++] = (w >> 8) & 0xff;\n buf[p++] = h & 0xff;\n buf[p++] = (h >> 8) & 0xff;\n // NOTE: No sort flag (unused?).\n // TODO(deanm): Support interlace.\n buf[p++] = using_local_palette === true ? 0x80 | (min_code_size - 1) : 0;\n\n // - Local Color Table\n if (using_local_palette === true) {\n for (var i = 0, il = palette.length; i < il; ++i) {\n var rgb = palette[i];\n buf[p++] = (rgb >> 16) & 0xff;\n buf[p++] = (rgb >> 8) & 0xff;\n buf[p++] = rgb & 0xff;\n }\n }\n\n p = GifWriterOutputLZWCodeStream(\n buf,\n p,\n min_code_size < 2 ? 2 : min_code_size,\n indexed_pixels\n );\n\n return p;\n };\n\n this.end = function() {\n if (ended === false) {\n buf[p++] = 0x3b; // Trailer.\n ended = true;\n }\n return p;\n };\n\n this.getOutputBuffer = function() {\n return buf;\n };\n this.setOutputBuffer = function(v) {\n buf = v;\n };\n this.getOutputBufferPosition = function() {\n return p;\n };\n this.setOutputBufferPosition = function(v) {\n p = v;\n };\n}\n\n// Main compression routine, palette indexes -> LZW code stream.\n// |index_stream| must have at least one entry.\nfunction GifWriterOutputLZWCodeStream(buf, p, min_code_size, index_stream) {\n buf[p++] = min_code_size;\n var cur_subblock = p++; // Pointing at the length field.\n\n var clear_code = 1 << min_code_size;\n var code_mask = clear_code - 1;\n var eoi_code = clear_code + 1;\n var next_code = eoi_code + 1;\n\n var cur_code_size = min_code_size + 1; // Number of bits per code.\n var cur_shift = 0;\n // We have at most 12-bit codes, so we should have to hold a max of 19\n // bits here (and then we would write out).\n var cur = 0;\n\n function emit_bytes_to_buffer(bit_block_size) {\n while (cur_shift >= bit_block_size) {\n buf[p++] = cur & 0xff;\n cur >>= 8;\n cur_shift -= 8;\n if (p === cur_subblock + 256) {\n // Finished a subblock.\n buf[cur_subblock] = 255;\n cur_subblock = p++;\n }\n }\n }\n\n function emit_code(c) {\n cur |= c << cur_shift;\n cur_shift += cur_code_size;\n emit_bytes_to_buffer(8);\n }\n\n // I am not an expert on the topic, and I don't want to write a thesis.\n // However, it is good to outline here the basic algorithm and the few data\n // structures and optimizations here that make this implementation fast.\n // The basic idea behind LZW is to build a table of previously seen runs\n // addressed by a short id (herein called output code). All data is\n // referenced by a code, which represents one or more values from the\n // original input stream. All input bytes can be referenced as the same\n // value as an output code. So if you didn't want any compression, you\n // could more or less just output the original bytes as codes (there are\n // some details to this, but it is the idea). In order to achieve\n // compression, values greater then the input range (codes can be up to\n // 12-bit while input only 8-bit) represent a sequence of previously seen\n // inputs. The decompressor is able to build the same mapping while\n // decoding, so there is always a shared common knowledge between the\n // encoding and decoder, which is also important for \"timing\" aspects like\n // how to handle variable bit width code encoding.\n //\n // One obvious but very important consequence of the table system is there\n // is always a unique id (at most 12-bits) to map the runs. 'A' might be\n // 4, then 'AA' might be 10, 'AAA' 11, 'AAAA' 12, etc. This relationship\n // can be used for an effecient lookup strategy for the code mapping. We\n // need to know if a run has been seen before, and be able to map that run\n // to the output code. Since we start with known unique ids (input bytes),\n // and then from those build more unique ids (table entries), we can\n // continue this chain (almost like a linked list) to always have small\n // integer values that represent the current byte chains in the encoder.\n // This means instead of tracking the input bytes (AAAABCD) to know our\n // current state, we can track the table entry for AAAABC (it is guaranteed\n // to exist by the nature of the algorithm) and the next character D.\n // Therefor the tuple of (table_entry, byte) is guaranteed to also be\n // unique. This allows us to create a simple lookup key for mapping input\n // sequences to codes (table indices) without having to store or search\n // any of the code sequences. So if 'AAAA' has a table entry of 12, the\n // tuple of ('AAAA', K) for any input byte K will be unique, and can be our\n // key. This leads to a integer value at most 20-bits, which can always\n // fit in an SMI value and be used as a fast sparse array / object key.\n\n // Output code for the current contents of the index buffer.\n var ib_code = index_stream[0] & code_mask; // Load first input index.\n var code_table = {}; // Key'd on our 20-bit \"tuple\".\n\n emit_code(clear_code); // Spec says first code should be a clear code.\n\n // First index already loaded, process the rest of the stream.\n for (var i = 1, il = index_stream.length; i < il; ++i) {\n var k = index_stream[i] & code_mask;\n var cur_key = (ib_code << 8) | k; // (prev, k) unique tuple.\n var cur_code = code_table[cur_key]; // buffer + k.\n\n // Check if we have to create a new code table entry.\n if (cur_code === undefined) {\n // We don't have buffer + k.\n // Emit index buffer (without k).\n // This is an inline version of emit_code, because this is the core\n // writing routine of the compressor (and V8 cannot inline emit_code\n // because it is a closure here in a different context). Additionally\n // we can call emit_byte_to_buffer less often, because we can have\n // 30-bits (from our 31-bit signed SMI), and we know our codes will only\n // be 12-bits, so can safely have 18-bits there without overflow.\n // emit_code(ib_code);\n cur |= ib_code << cur_shift;\n cur_shift += cur_code_size;\n while (cur_shift >= 8) {\n buf[p++] = cur & 0xff;\n cur >>= 8;\n cur_shift -= 8;\n if (p === cur_subblock + 256) {\n // Finished a subblock.\n buf[cur_subblock] = 255;\n cur_subblock = p++;\n }\n }\n\n if (next_code === 4096) {\n // Table full, need a clear.\n emit_code(clear_code);\n next_code = eoi_code + 1;\n cur_code_size = min_code_size + 1;\n code_table = {};\n } else {\n // Table not full, insert a new entry.\n // Increase our variable bit code sizes if necessary. This is a bit\n // tricky as it is based on \"timing\" between the encoding and\n // decoder. From the encoders perspective this should happen after\n // we've already emitted the index buffer and are about to create the\n // first table entry that would overflow our current code bit size.\n if (next_code >= 1 << cur_code_size) ++cur_code_size;\n code_table[cur_key] = next_code++; // Insert into code table.\n }\n\n ib_code = k; // Index buffer to single input k.\n } else {\n ib_code = cur_code; // Index buffer to sequence in code table.\n }\n }\n\n emit_code(ib_code); // There will still be something in the index buffer.\n emit_code(eoi_code); // End Of Information.\n\n // Flush / finalize the sub-blocks stream to the buffer.\n emit_bytes_to_buffer(1);\n\n // Finish the sub-blocks, writing out any unfinished lengths and\n // terminating with a sub-block of length 0. If we have already started\n // but not yet used a sub-block it can just become the terminator.\n if (cur_subblock + 1 === p) {\n // Started but unused.\n buf[cur_subblock] = 0;\n } else {\n // Started and used, write length and additional terminator block.\n buf[cur_subblock] = p - cur_subblock - 1;\n buf[p++] = 0;\n }\n return p;\n}\n\nfunction GifReader(buf) {\n var p = 0;\n\n // - Header (GIF87a or GIF89a).\n if (\n buf[p++] !== 0x47 ||\n buf[p++] !== 0x49 ||\n buf[p++] !== 0x46 ||\n buf[p++] !== 0x38 ||\n ((buf[p++] + 1) & 0xfd) !== 0x38 ||\n buf[p++] !== 0x61\n ) {\n throw new Error(\"Invalid GIF 87a/89a header.\");\n }\n\n // - Logical Screen Descriptor.\n var width = buf[p++] | (buf[p++] << 8);\n var height = buf[p++] | (buf[p++] << 8);\n var pf0 = buf[p++]; // .\n var global_palette_flag = pf0 >> 7;\n var num_global_colors_pow2 = pf0 & 0x7;\n var num_global_colors = 1 << (num_global_colors_pow2 + 1);\n var background = buf[p++];\n buf[p++]; // Pixel aspect ratio (unused?).\n\n var global_palette_offset = null;\n var global_palette_size = null;\n\n if (global_palette_flag) {\n global_palette_offset = p;\n global_palette_size = num_global_colors;\n p += num_global_colors * 3; // Seek past palette.\n }\n\n var no_eof = true;\n\n var frames = [];\n\n var delay = 0;\n var transparent_index = null;\n var disposal = 0; // 0 - No disposal specified.\n var loop_count = null;\n\n this.width = width;\n this.height = height;\n\n while (no_eof && p < buf.length) {\n switch (buf[p++]) {\n case 0x21: // Graphics Control Extension Block\n switch (buf[p++]) {\n case 0xff: // Application specific block\n // Try if it's a Netscape block (with animation loop counter).\n if (\n buf[p] !== 0x0b || // 21 FF already read, check block size.\n // NETSCAPE2.0\n (buf[p + 1] == 0x4e &&\n buf[p + 2] == 0x45 &&\n buf[p + 3] == 0x54 &&\n buf[p + 4] == 0x53 &&\n buf[p + 5] == 0x43 &&\n buf[p + 6] == 0x41 &&\n buf[p + 7] == 0x50 &&\n buf[p + 8] == 0x45 &&\n buf[p + 9] == 0x32 &&\n buf[p + 10] == 0x2e &&\n buf[p + 11] == 0x30 &&\n // Sub-block\n buf[p + 12] == 0x03 &&\n buf[p + 13] == 0x01 &&\n buf[p + 16] == 0)\n ) {\n p += 14;\n loop_count = buf[p++] | (buf[p++] << 8);\n p++; // Skip terminator.\n } else {\n // We don't know what it is, just try to get past it.\n p += 12;\n while (true) {\n // Seek through subblocks.\n var block_size = buf[p++];\n // Bad block size (ex: undefined from an out of bounds read).\n if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n if (block_size === 0) break; // 0 size is terminator\n p += block_size;\n }\n }\n break;\n\n case 0xf9: // Graphics Control Extension\n if (buf[p++] !== 0x4 || buf[p + 4] !== 0)\n throw new Error(\"Invalid graphics extension block.\");\n var pf1 = buf[p++];\n delay = buf[p++] | (buf[p++] << 8);\n transparent_index = buf[p++];\n if ((pf1 & 1) === 0) transparent_index = null;\n disposal = (pf1 >> 2) & 0x7;\n p++; // Skip terminator.\n break;\n\n case 0xfe: // Comment Extension.\n while (true) {\n // Seek through subblocks.\n var block_size = buf[p++];\n // Bad block size (ex: undefined from an out of bounds read).\n if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n if (block_size === 0) break; // 0 size is terminator\n // console.log(buf.slice(p, p+block_size).toString('ascii'));\n p += block_size;\n }\n break;\n\n default:\n throw new Error(\n \"Unknown graphic control label: 0x\" + buf[p - 1].toString(16)\n );\n }\n break;\n\n case 0x2c: // Image Descriptor.\n var x = buf[p++] | (buf[p++] << 8);\n var y = buf[p++] | (buf[p++] << 8);\n var w = buf[p++] | (buf[p++] << 8);\n var h = buf[p++] | (buf[p++] << 8);\n var pf2 = buf[p++];\n var local_palette_flag = pf2 >> 7;\n var interlace_flag = (pf2 >> 6) & 1;\n var num_local_colors_pow2 = pf2 & 0x7;\n var num_local_colors = 1 << (num_local_colors_pow2 + 1);\n var palette_offset = global_palette_offset;\n var palette_size = global_palette_size;\n var has_local_palette = false;\n if (local_palette_flag) {\n var has_local_palette = true;\n palette_offset = p; // Override with local palette.\n palette_size = num_local_colors;\n p += num_local_colors * 3; // Seek past palette.\n }\n\n var data_offset = p;\n\n p++; // codesize\n while (true) {\n var block_size = buf[p++];\n // Bad block size (ex: undefined from an out of bounds read).\n if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n if (block_size === 0) break; // 0 size is terminator\n p += block_size;\n }\n\n frames.push({\n x: x,\n y: y,\n width: w,\n height: h,\n has_local_palette: has_local_palette,\n palette_offset: palette_offset,\n palette_size: palette_size,\n data_offset: data_offset,\n data_length: p - data_offset,\n transparent_index: transparent_index,\n interlaced: !!interlace_flag,\n delay: delay,\n disposal: disposal\n });\n break;\n\n case 0x3b: // Trailer Marker (end of file).\n no_eof = false;\n break;\n\n default:\n throw new Error(\"Unknown gif block: 0x\" + buf[p - 1].toString(16));\n break;\n }\n }\n\n this.numFrames = function() {\n return frames.length;\n };\n\n this.loopCount = function() {\n return loop_count;\n };\n\n this.frameInfo = function(frame_num) {\n if (frame_num < 0 || frame_num >= frames.length)\n throw new Error(\"Frame index out of range.\");\n return frames[frame_num];\n };\n\n this.decodeAndBlitFrameBGRA = function(frame_num, pixels) {\n var frame = this.frameInfo(frame_num);\n var num_pixels = frame.width * frame.height;\n var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.\n GifReaderLZWOutputIndexStream(\n buf,\n frame.data_offset,\n index_stream,\n num_pixels\n );\n var palette_offset = frame.palette_offset;\n\n // NOTE(deanm): It seems to be much faster to compare index to 256 than\n // to === null. Not sure why, but CompareStub_EQ_STRICT shows up high in\n // the profile, not sure if it's related to using a Uint8Array.\n var trans = frame.transparent_index;\n if (trans === null) trans = 256;\n\n // We are possibly just blitting to a portion of the entire frame.\n // That is a subrect within the framerect, so the additional pixels\n // must be skipped over after we finished a scanline.\n var framewidth = frame.width;\n var framestride = width - framewidth;\n var xleft = framewidth; // Number of subrect pixels left in scanline.\n\n // Output indices of the top left and bottom right corners of the subrect.\n var opbeg = (frame.y * width + frame.x) * 4;\n var opend = ((frame.y + frame.height) * width + frame.x) * 4;\n var op = opbeg;\n\n var scanstride = framestride * 4;\n\n // Use scanstride to skip past the rows when interlacing. This is skipping\n // 7 rows for the first two passes, then 3 then 1.\n if (frame.interlaced === true) {\n scanstride += width * 4 * 7; // Pass 1.\n }\n\n var interlaceskip = 8; // Tracking the row interval in the current pass.\n\n for (var i = 0, il = index_stream.length; i < il; ++i) {\n var index = index_stream[i];\n\n if (xleft === 0) {\n // Beginning of new scan line\n op += scanstride;\n xleft = framewidth;\n if (op >= opend) {\n // Catch the wrap to switch passes when interlacing.\n scanstride = framestride * 4 + width * 4 * (interlaceskip - 1);\n // interlaceskip / 2 * 4 is interlaceskip << 1.\n op = opbeg + (framewidth + framestride) * (interlaceskip << 1);\n interlaceskip >>= 1;\n }\n }\n\n if (index === trans) {\n op += 4;\n } else {\n var r = buf[palette_offset + index * 3];\n var g = buf[palette_offset + index * 3 + 1];\n var b = buf[palette_offset + index * 3 + 2];\n pixels[op++] = b;\n pixels[op++] = g;\n pixels[op++] = r;\n pixels[op++] = 255;\n }\n --xleft;\n }\n };\n\n // I will go to copy and paste hell one day...\n this.decodeAndBlitFrameRGBA = function(frame_num, pixels) {\n var frame = this.frameInfo(frame_num);\n var num_pixels = frame.width * frame.height;\n var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.\n GifReaderLZWOutputIndexStream(\n buf,\n frame.data_offset,\n index_stream,\n num_pixels\n );\n var palette_offset = frame.palette_offset;\n\n // NOTE(deanm): It seems to be much faster to compare index to 256 than\n // to === null. Not sure why, but CompareStub_EQ_STRICT shows up high in\n // the profile, not sure if it's related to using a Uint8Array.\n var trans = frame.transparent_index;\n if (trans === null) trans = 256;\n\n // We are possibly just blitting to a portion of the entire frame.\n // That is a subrect within the framerect, so the additional pixels\n // must be skipped over after we finished a scanline.\n var framewidth = frame.width;\n var framestride = width - framewidth;\n var xleft = framewidth; // Number of subrect pixels left in scanline.\n\n // Output indices of the top left and bottom right corners of the subrect.\n var opbeg = (frame.y * width + frame.x) * 4;\n var opend = ((frame.y + frame.height) * width + frame.x) * 4;\n var op = opbeg;\n\n var scanstride = framestride * 4;\n\n // Use scanstride to skip past the rows when interlacing. This is skipping\n // 7 rows for the first two passes, then 3 then 1.\n if (frame.interlaced === true) {\n scanstride += width * 4 * 7; // Pass 1.\n }\n\n var interlaceskip = 8; // Tracking the row interval in the current pass.\n\n for (var i = 0, il = index_stream.length; i < il; ++i) {\n var index = index_stream[i];\n\n if (xleft === 0) {\n // Beginning of new scan line\n op += scanstride;\n xleft = framewidth;\n if (op >= opend) {\n // Catch the wrap to switch passes when interlacing.\n scanstride = framestride * 4 + width * 4 * (interlaceskip - 1);\n // interlaceskip / 2 * 4 is interlaceskip << 1.\n op = opbeg + (framewidth + framestride) * (interlaceskip << 1);\n interlaceskip >>= 1;\n }\n }\n\n if (index === trans) {\n op += 4;\n } else {\n var r = buf[palette_offset + index * 3];\n var g = buf[palette_offset + index * 3 + 1];\n var b = buf[palette_offset + index * 3 + 2];\n pixels[op++] = r;\n pixels[op++] = g;\n pixels[op++] = b;\n pixels[op++] = 255;\n }\n --xleft;\n }\n };\n}\n\nfunction GifReaderLZWOutputIndexStream(code_stream, p, output, output_length) {\n var min_code_size = code_stream[p++];\n\n var clear_code = 1 << min_code_size;\n var eoi_code = clear_code + 1;\n var next_code = eoi_code + 1;\n\n var cur_code_size = min_code_size + 1; // Number of bits per code.\n // NOTE: This shares the same name as the encoder, but has a different\n // meaning here. Here this masks each code coming from the code stream.\n var code_mask = (1 << cur_code_size) - 1;\n var cur_shift = 0;\n var cur = 0;\n\n var op = 0; // Output pointer.\n\n var subblock_size = code_stream[p++];\n\n // TODO(deanm): Would using a TypedArray be any faster? At least it would\n // solve the fast mode / backing store uncertainty.\n // var code_table = Array(4096);\n var code_table = new Int32Array(4096); // Can be signed, we only use 20 bits.\n\n var prev_code = null; // Track code-1.\n\n while (true) {\n // Read up to two bytes, making sure we always 12-bits for max sized code.\n while (cur_shift < 16) {\n if (subblock_size === 0) break; // No more data to be read.\n\n cur |= code_stream[p++] << cur_shift;\n cur_shift += 8;\n\n if (subblock_size === 1) {\n // Never let it get to 0 to hold logic above.\n subblock_size = code_stream[p++]; // Next subblock.\n } else {\n --subblock_size;\n }\n }\n\n // TODO(deanm): We should never really get here, we should have received\n // and EOI.\n if (cur_shift < cur_code_size) break;\n\n var code = cur & code_mask;\n cur >>= cur_code_size;\n cur_shift -= cur_code_size;\n\n // TODO(deanm): Maybe should check that the first code was a clear code,\n // at least this is what you're supposed to do. But actually our encoder\n // now doesn't emit a clear code first anyway.\n if (code === clear_code) {\n // We don't actually have to clear the table. This could be a good idea\n // for greater error checking, but we don't really do any anyway. We\n // will just track it with next_code and overwrite old entries.\n\n next_code = eoi_code + 1;\n cur_code_size = min_code_size + 1;\n code_mask = (1 << cur_code_size) - 1;\n\n // Don't update prev_code ?\n prev_code = null;\n continue;\n } else if (code === eoi_code) {\n break;\n }\n\n // We have a similar situation as the decoder, where we want to store\n // variable length entries (code table entries), but we want to do in a\n // faster manner than an array of arrays. The code below stores sort of a\n // linked list within the code table, and then \"chases\" through it to\n // construct the dictionary entries. When a new entry is created, just the\n // last byte is stored, and the rest (prefix) of the entry is only\n // referenced by its table entry. Then the code chases through the\n // prefixes until it reaches a single byte code. We have to chase twice,\n // first to compute the length, and then to actually copy the data to the\n // output (backwards, since we know the length). The alternative would be\n // storing something in an intermediate stack, but that doesn't make any\n // more sense. I implemented an approach where it also stored the length\n // in the code table, although it's a bit tricky because you run out of\n // bits (12 + 12 + 8), but I didn't measure much improvements (the table\n // entries are generally not the long). Even when I created benchmarks for\n // very long table entries the complexity did not seem worth it.\n // The code table stores the prefix entry in 12 bits and then the suffix\n // byte in 8 bits, so each entry is 20 bits.\n\n var chase_code = code < next_code ? code : prev_code;\n\n // Chase what we will output, either {CODE} or {CODE-1}.\n var chase_length = 0;\n var chase = chase_code;\n while (chase > clear_code) {\n chase = code_table[chase] >> 8;\n ++chase_length;\n }\n\n var k = chase;\n\n var op_end = op + chase_length + (chase_code !== code ? 1 : 0);\n if (op_end > output_length) {\n console.log(\"Warning, gif stream longer than expected.\");\n return;\n }\n\n // Already have the first byte from the chase, might as well write it fast.\n output[op++] = k;\n\n op += chase_length;\n var b = op; // Track pointer, writing backwards.\n\n if (chase_code !== code)\n // The case of emitting {CODE-1} + k.\n output[op++] = k;\n\n chase = chase_code;\n while (chase_length--) {\n chase = code_table[chase];\n output[--b] = chase & 0xff; // Write backwards.\n chase >>= 8; // Pull down to the prefix code.\n }\n\n if (prev_code !== null && next_code < 4096) {\n code_table[next_code++] = (prev_code << 8) | k;\n // TODO(deanm): Figure out this clearing vs code growth logic better. I\n // have an feeling that it should just happen somewhere else, for now it\n // is awkward between when we grow past the max and then hit a clear code.\n // For now just check if we hit the max 12-bits (then a clear code should\n // follow, also of course encoded in 12-bits).\n if (next_code >= code_mask + 1 && cur_code_size < 12) {\n ++cur_code_size;\n code_mask = (code_mask << 1) | 1;\n }\n }\n\n prev_code = code;\n }\n\n if (op !== output_length) {\n console.log(\"Warning, gif stream shorter than expected.\");\n }\n\n return output;\n}\n\nexport { GifReader, GifWriter };\n","/**\n * @license\n Copyright (c) 2008, Adobe Systems Incorporated\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without \n modification, are permitted provided that the following conditions are\n met:\n\n * Redistributions of source code must retain the above copyright notice, \n this list of conditions and the following disclaimer.\n \n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the \n documentation and/or other materials provided with the distribution.\n \n * Neither the name of Adobe Systems Incorporated nor the names of its \n contributors may be used to endorse or promote products derived from \n this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\n IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \n CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n/*\nJPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009\n\nBasic GUI blocking jpeg encoder\n*/\n\nfunction JPEGEncoder(quality) {\n var ffloor = Math.floor;\n var YTable = new Array(64);\n var UVTable = new Array(64);\n var fdtbl_Y = new Array(64);\n var fdtbl_UV = new Array(64);\n var YDC_HT;\n var UVDC_HT;\n var YAC_HT;\n var UVAC_HT;\n\n var bitcode = new Array(65535);\n var category = new Array(65535);\n var outputfDCTQuant = new Array(64);\n var DU = new Array(64);\n var byteout = [];\n var bytenew = 0;\n var bytepos = 7;\n\n var YDU = new Array(64);\n var UDU = new Array(64);\n var VDU = new Array(64);\n var clt = new Array(256);\n var RGB_YUV_TABLE = new Array(2048);\n var currentQuality;\n\n var ZigZag = [\n 0,\n 1,\n 5,\n 6,\n 14,\n 15,\n 27,\n 28,\n 2,\n 4,\n 7,\n 13,\n 16,\n 26,\n 29,\n 42,\n 3,\n 8,\n 12,\n 17,\n 25,\n 30,\n 41,\n 43,\n 9,\n 11,\n 18,\n 24,\n 31,\n 40,\n 44,\n 53,\n 10,\n 19,\n 23,\n 32,\n 39,\n 45,\n 52,\n 54,\n 20,\n 22,\n 33,\n 38,\n 46,\n 51,\n 55,\n 60,\n 21,\n 34,\n 37,\n 47,\n 50,\n 56,\n 59,\n 61,\n 35,\n 36,\n 48,\n 49,\n 57,\n 58,\n 62,\n 63\n ];\n\n var std_dc_luminance_nrcodes = [\n 0,\n 0,\n 1,\n 5,\n 1,\n 1,\n 1,\n 1,\n 1,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0\n ];\n var std_dc_luminance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n var std_ac_luminance_nrcodes = [\n 0,\n 0,\n 2,\n 1,\n 3,\n 3,\n 2,\n 4,\n 3,\n 5,\n 5,\n 4,\n 4,\n 0,\n 0,\n 1,\n 0x7d\n ];\n var std_ac_luminance_values = [\n 0x01,\n 0x02,\n 0x03,\n 0x00,\n 0x04,\n 0x11,\n 0x05,\n 0x12,\n 0x21,\n 0x31,\n 0x41,\n 0x06,\n 0x13,\n 0x51,\n 0x61,\n 0x07,\n 0x22,\n 0x71,\n 0x14,\n 0x32,\n 0x81,\n 0x91,\n 0xa1,\n 0x08,\n 0x23,\n 0x42,\n 0xb1,\n 0xc1,\n 0x15,\n 0x52,\n 0xd1,\n 0xf0,\n 0x24,\n 0x33,\n 0x62,\n 0x72,\n 0x82,\n 0x09,\n 0x0a,\n 0x16,\n 0x17,\n 0x18,\n 0x19,\n 0x1a,\n 0x25,\n 0x26,\n 0x27,\n 0x28,\n 0x29,\n 0x2a,\n 0x34,\n 0x35,\n 0x36,\n 0x37,\n 0x38,\n 0x39,\n 0x3a,\n 0x43,\n 0x44,\n 0x45,\n 0x46,\n 0x47,\n 0x48,\n 0x49,\n 0x4a,\n 0x53,\n 0x54,\n 0x55,\n 0x56,\n 0x57,\n 0x58,\n 0x59,\n 0x5a,\n 0x63,\n 0x64,\n 0x65,\n 0x66,\n 0x67,\n 0x68,\n 0x69,\n 0x6a,\n 0x73,\n 0x74,\n 0x75,\n 0x76,\n 0x77,\n 0x78,\n 0x79,\n 0x7a,\n 0x83,\n 0x84,\n 0x85,\n 0x86,\n 0x87,\n 0x88,\n 0x89,\n 0x8a,\n 0x92,\n 0x93,\n 0x94,\n 0x95,\n 0x96,\n 0x97,\n 0x98,\n 0x99,\n 0x9a,\n 0xa2,\n 0xa3,\n 0xa4,\n 0xa5,\n 0xa6,\n 0xa7,\n 0xa8,\n 0xa9,\n 0xaa,\n 0xb2,\n 0xb3,\n 0xb4,\n 0xb5,\n 0xb6,\n 0xb7,\n 0xb8,\n 0xb9,\n 0xba,\n 0xc2,\n 0xc3,\n 0xc4,\n 0xc5,\n 0xc6,\n 0xc7,\n 0xc8,\n 0xc9,\n 0xca,\n 0xd2,\n 0xd3,\n 0xd4,\n 0xd5,\n 0xd6,\n 0xd7,\n 0xd8,\n 0xd9,\n 0xda,\n 0xe1,\n 0xe2,\n 0xe3,\n 0xe4,\n 0xe5,\n 0xe6,\n 0xe7,\n 0xe8,\n 0xe9,\n 0xea,\n 0xf1,\n 0xf2,\n 0xf3,\n 0xf4,\n 0xf5,\n 0xf6,\n 0xf7,\n 0xf8,\n 0xf9,\n 0xfa\n ];\n\n var std_dc_chrominance_nrcodes = [\n 0,\n 0,\n 3,\n 1,\n 1,\n 1,\n 1,\n 1,\n 1,\n 1,\n 1,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0\n ];\n var std_dc_chrominance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n var std_ac_chrominance_nrcodes = [\n 0,\n 0,\n 2,\n 1,\n 2,\n 4,\n 4,\n 3,\n 4,\n 7,\n 5,\n 4,\n 4,\n 0,\n 1,\n 2,\n 0x77\n ];\n var std_ac_chrominance_values = [\n 0x00,\n 0x01,\n 0x02,\n 0x03,\n 0x11,\n 0x04,\n 0x05,\n 0x21,\n 0x31,\n 0x06,\n 0x12,\n 0x41,\n 0x51,\n 0x07,\n 0x61,\n 0x71,\n 0x13,\n 0x22,\n 0x32,\n 0x81,\n 0x08,\n 0x14,\n 0x42,\n 0x91,\n 0xa1,\n 0xb1,\n 0xc1,\n 0x09,\n 0x23,\n 0x33,\n 0x52,\n 0xf0,\n 0x15,\n 0x62,\n 0x72,\n 0xd1,\n 0x0a,\n 0x16,\n 0x24,\n 0x34,\n 0xe1,\n 0x25,\n 0xf1,\n 0x17,\n 0x18,\n 0x19,\n 0x1a,\n 0x26,\n 0x27,\n 0x28,\n 0x29,\n 0x2a,\n 0x35,\n 0x36,\n 0x37,\n 0x38,\n 0x39,\n 0x3a,\n 0x43,\n 0x44,\n 0x45,\n 0x46,\n 0x47,\n 0x48,\n 0x49,\n 0x4a,\n 0x53,\n 0x54,\n 0x55,\n 0x56,\n 0x57,\n 0x58,\n 0x59,\n 0x5a,\n 0x63,\n 0x64,\n 0x65,\n 0x66,\n 0x67,\n 0x68,\n 0x69,\n 0x6a,\n 0x73,\n 0x74,\n 0x75,\n 0x76,\n 0x77,\n 0x78,\n 0x79,\n 0x7a,\n 0x82,\n 0x83,\n 0x84,\n 0x85,\n 0x86,\n 0x87,\n 0x88,\n 0x89,\n 0x8a,\n 0x92,\n 0x93,\n 0x94,\n 0x95,\n 0x96,\n 0x97,\n 0x98,\n 0x99,\n 0x9a,\n 0xa2,\n 0xa3,\n 0xa4,\n 0xa5,\n 0xa6,\n 0xa7,\n 0xa8,\n 0xa9,\n 0xaa,\n 0xb2,\n 0xb3,\n 0xb4,\n 0xb5,\n 0xb6,\n 0xb7,\n 0xb8,\n 0xb9,\n 0xba,\n 0xc2,\n 0xc3,\n 0xc4,\n 0xc5,\n 0xc6,\n 0xc7,\n 0xc8,\n 0xc9,\n 0xca,\n 0xd2,\n 0xd3,\n 0xd4,\n 0xd5,\n 0xd6,\n 0xd7,\n 0xd8,\n 0xd9,\n 0xda,\n 0xe2,\n 0xe3,\n 0xe4,\n 0xe5,\n 0xe6,\n 0xe7,\n 0xe8,\n 0xe9,\n 0xea,\n 0xf2,\n 0xf3,\n 0xf4,\n 0xf5,\n 0xf6,\n 0xf7,\n 0xf8,\n 0xf9,\n 0xfa\n ];\n\n function initQuantTables(sf) {\n var YQT = [\n 16,\n 11,\n 10,\n 16,\n 24,\n 40,\n 51,\n 61,\n 12,\n 12,\n 14,\n 19,\n 26,\n 58,\n 60,\n 55,\n 14,\n 13,\n 16,\n 24,\n 40,\n 57,\n 69,\n 56,\n 14,\n 17,\n 22,\n 29,\n 51,\n 87,\n 80,\n 62,\n 18,\n 22,\n 37,\n 56,\n 68,\n 109,\n 103,\n 77,\n 24,\n 35,\n 55,\n 64,\n 81,\n 104,\n 113,\n 92,\n 49,\n 64,\n 78,\n 87,\n 103,\n 121,\n 120,\n 101,\n 72,\n 92,\n 95,\n 98,\n 112,\n 100,\n 103,\n 99\n ];\n\n for (var i = 0; i < 64; i++) {\n var t = ffloor((YQT[i] * sf + 50) / 100);\n t = Math.min(Math.max(t, 1), 255);\n YTable[ZigZag[i]] = t;\n }\n var UVQT = [\n 17,\n 18,\n 24,\n 47,\n 99,\n 99,\n 99,\n 99,\n 18,\n 21,\n 26,\n 66,\n 99,\n 99,\n 99,\n 99,\n 24,\n 26,\n 56,\n 99,\n 99,\n 99,\n 99,\n 99,\n 47,\n 66,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99\n ];\n for (var j = 0; j < 64; j++) {\n var u = ffloor((UVQT[j] * sf + 50) / 100);\n u = Math.min(Math.max(u, 1), 255);\n UVTable[ZigZag[j]] = u;\n }\n var aasf = [\n 1.0,\n 1.387039845,\n 1.306562965,\n 1.175875602,\n 1.0,\n 0.785694958,\n 0.5411961,\n 0.275899379\n ];\n var k = 0;\n for (var row = 0; row < 8; row++) {\n for (var col = 0; col < 8; col++) {\n fdtbl_Y[k] = 1.0 / (YTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);\n fdtbl_UV[k] = 1.0 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);\n k++;\n }\n }\n }\n\n function computeHuffmanTbl(nrcodes, std_table) {\n var codevalue = 0;\n var pos_in_table = 0;\n var HT = new Array();\n for (var k = 1; k <= 16; k++) {\n for (var j = 1; j <= nrcodes[k]; j++) {\n HT[std_table[pos_in_table]] = [];\n HT[std_table[pos_in_table]][0] = codevalue;\n HT[std_table[pos_in_table]][1] = k;\n pos_in_table++;\n codevalue++;\n }\n codevalue *= 2;\n }\n return HT;\n }\n\n function initHuffmanTbl() {\n YDC_HT = computeHuffmanTbl(\n std_dc_luminance_nrcodes,\n std_dc_luminance_values\n );\n UVDC_HT = computeHuffmanTbl(\n std_dc_chrominance_nrcodes,\n std_dc_chrominance_values\n );\n YAC_HT = computeHuffmanTbl(\n std_ac_luminance_nrcodes,\n std_ac_luminance_values\n );\n UVAC_HT = computeHuffmanTbl(\n std_ac_chrominance_nrcodes,\n std_ac_chrominance_values\n );\n }\n\n function initCategoryNumber() {\n var nrlower = 1;\n var nrupper = 2;\n for (var cat = 1; cat <= 15; cat++) {\n //Positive numbers\n for (var nr = nrlower; nr < nrupper; nr++) {\n category[32767 + nr] = cat;\n bitcode[32767 + nr] = [];\n bitcode[32767 + nr][1] = cat;\n bitcode[32767 + nr][0] = nr;\n }\n //Negative numbers\n for (var nrneg = -(nrupper - 1); nrneg <= -nrlower; nrneg++) {\n category[32767 + nrneg] = cat;\n bitcode[32767 + nrneg] = [];\n bitcode[32767 + nrneg][1] = cat;\n bitcode[32767 + nrneg][0] = nrupper - 1 + nrneg;\n }\n nrlower <<= 1;\n nrupper <<= 1;\n }\n }\n\n function initRGBYUVTable() {\n for (var i = 0; i < 256; i++) {\n RGB_YUV_TABLE[i] = 19595 * i;\n RGB_YUV_TABLE[(i + 256) >> 0] = 38470 * i;\n RGB_YUV_TABLE[(i + 512) >> 0] = 7471 * i + 0x8000;\n RGB_YUV_TABLE[(i + 768) >> 0] = -11059 * i;\n RGB_YUV_TABLE[(i + 1024) >> 0] = -21709 * i;\n RGB_YUV_TABLE[(i + 1280) >> 0] = 32768 * i + 0x807fff;\n RGB_YUV_TABLE[(i + 1536) >> 0] = -27439 * i;\n RGB_YUV_TABLE[(i + 1792) >> 0] = -5329 * i;\n }\n }\n\n // IO functions\n function writeBits(bs) {\n var value = bs[0];\n var posval = bs[1] - 1;\n while (posval >= 0) {\n if (value & (1 << posval)) {\n bytenew |= 1 << bytepos;\n }\n posval--;\n bytepos--;\n if (bytepos < 0) {\n if (bytenew == 0xff) {\n writeByte(0xff);\n writeByte(0);\n } else {\n writeByte(bytenew);\n }\n bytepos = 7;\n bytenew = 0;\n }\n }\n }\n\n function writeByte(value) {\n //byteout.push(clt[value]); // write char directly instead of converting later\n byteout.push(value);\n }\n\n function writeWord(value) {\n writeByte((value >> 8) & 0xff);\n writeByte(value & 0xff);\n }\n\n // DCT & quantization core\n function fDCTQuant(data, fdtbl) {\n var d0, d1, d2, d3, d4, d5, d6, d7;\n /* Pass 1: process rows. */\n var dataOff = 0;\n var i;\n var I8 = 8;\n var I64 = 64;\n for (i = 0; i < I8; ++i) {\n d0 = data[dataOff];\n d1 = data[dataOff + 1];\n d2 = data[dataOff + 2];\n d3 = data[dataOff + 3];\n d4 = data[dataOff + 4];\n d5 = data[dataOff + 5];\n d6 = data[dataOff + 6];\n d7 = data[dataOff + 7];\n\n var tmp0 = d0 + d7;\n var tmp7 = d0 - d7;\n var tmp1 = d1 + d6;\n var tmp6 = d1 - d6;\n var tmp2 = d2 + d5;\n var tmp5 = d2 - d5;\n var tmp3 = d3 + d4;\n var tmp4 = d3 - d4;\n\n /* Even part */\n var tmp10 = tmp0 + tmp3; /* phase 2 */\n var tmp13 = tmp0 - tmp3;\n var tmp11 = tmp1 + tmp2;\n var tmp12 = tmp1 - tmp2;\n\n data[dataOff] = tmp10 + tmp11; /* phase 3 */\n data[dataOff + 4] = tmp10 - tmp11;\n\n var z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n data[dataOff + 2] = tmp13 + z1; /* phase 5 */\n data[dataOff + 6] = tmp13 - z1;\n\n /* Odd part */\n tmp10 = tmp4 + tmp5; /* phase 2 */\n tmp11 = tmp5 + tmp6;\n tmp12 = tmp6 + tmp7;\n\n /* The rotator is modified from fig 4-8 to avoid extra negations. */\n var z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n var z2 = 0.5411961 * tmp10 + z5; /* c2-c6 */\n var z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n var z3 = tmp11 * 0.707106781; /* c4 */\n\n var z11 = tmp7 + z3; /* phase 5 */\n var z13 = tmp7 - z3;\n\n data[dataOff + 5] = z13 + z2; /* phase 6 */\n data[dataOff + 3] = z13 - z2;\n data[dataOff + 1] = z11 + z4;\n data[dataOff + 7] = z11 - z4;\n\n dataOff += 8; /* advance pointer to next row */\n }\n\n /* Pass 2: process columns. */\n dataOff = 0;\n for (i = 0; i < I8; ++i) {\n d0 = data[dataOff];\n d1 = data[dataOff + 8];\n d2 = data[dataOff + 16];\n d3 = data[dataOff + 24];\n d4 = data[dataOff + 32];\n d5 = data[dataOff + 40];\n d6 = data[dataOff + 48];\n d7 = data[dataOff + 56];\n\n var tmp0p2 = d0 + d7;\n var tmp7p2 = d0 - d7;\n var tmp1p2 = d1 + d6;\n var tmp6p2 = d1 - d6;\n var tmp2p2 = d2 + d5;\n var tmp5p2 = d2 - d5;\n var tmp3p2 = d3 + d4;\n var tmp4p2 = d3 - d4;\n\n /* Even part */\n var tmp10p2 = tmp0p2 + tmp3p2; /* phase 2 */\n var tmp13p2 = tmp0p2 - tmp3p2;\n var tmp11p2 = tmp1p2 + tmp2p2;\n var tmp12p2 = tmp1p2 - tmp2p2;\n\n data[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n data[dataOff + 32] = tmp10p2 - tmp11p2;\n\n var z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n data[dataOff + 16] = tmp13p2 + z1p2; /* phase 5 */\n data[dataOff + 48] = tmp13p2 - z1p2;\n\n /* Odd part */\n tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n tmp11p2 = tmp5p2 + tmp6p2;\n tmp12p2 = tmp6p2 + tmp7p2;\n\n /* The rotator is modified from fig 4-8 to avoid extra negations. */\n var z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n var z2p2 = 0.5411961 * tmp10p2 + z5p2; /* c2-c6 */\n var z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n var z3p2 = tmp11p2 * 0.707106781; /* c4 */\n\n var z11p2 = tmp7p2 + z3p2; /* phase 5 */\n var z13p2 = tmp7p2 - z3p2;\n\n data[dataOff + 40] = z13p2 + z2p2; /* phase 6 */\n data[dataOff + 24] = z13p2 - z2p2;\n data[dataOff + 8] = z11p2 + z4p2;\n data[dataOff + 56] = z11p2 - z4p2;\n\n dataOff++; /* advance pointer to next column */\n }\n\n // Quantize/descale the coefficients\n var fDCTQuant;\n for (i = 0; i < I64; ++i) {\n // Apply the quantization and scaling factor & Round to nearest integer\n fDCTQuant = data[i] * fdtbl[i];\n outputfDCTQuant[i] =\n fDCTQuant > 0.0 ? (fDCTQuant + 0.5) | 0 : (fDCTQuant - 0.5) | 0;\n //outputfDCTQuant[i] = fround(fDCTQuant);\n }\n return outputfDCTQuant;\n }\n\n function writeAPP0() {\n writeWord(0xffe0); // marker\n writeWord(16); // length\n writeByte(0x4a); // J\n writeByte(0x46); // F\n writeByte(0x49); // I\n writeByte(0x46); // F\n writeByte(0); // = \"JFIF\",'\\0'\n writeByte(1); // versionhi\n writeByte(1); // versionlo\n writeByte(0); // xyunits\n writeWord(1); // xdensity\n writeWord(1); // ydensity\n writeByte(0); // thumbnwidth\n writeByte(0); // thumbnheight\n }\n\n function writeSOF0(width, height) {\n writeWord(0xffc0); // marker\n writeWord(17); // length, truecolor YUV JPG\n writeByte(8); // precision\n writeWord(height);\n writeWord(width);\n writeByte(3); // nrofcomponents\n writeByte(1); // IdY\n writeByte(0x11); // HVY\n writeByte(0); // QTY\n writeByte(2); // IdU\n writeByte(0x11); // HVU\n writeByte(1); // QTU\n writeByte(3); // IdV\n writeByte(0x11); // HVV\n writeByte(1); // QTV\n }\n\n function writeDQT() {\n writeWord(0xffdb); // marker\n writeWord(132); // length\n writeByte(0);\n for (var i = 0; i < 64; i++) {\n writeByte(YTable[i]);\n }\n writeByte(1);\n for (var j = 0; j < 64; j++) {\n writeByte(UVTable[j]);\n }\n }\n\n function writeDHT() {\n writeWord(0xffc4); // marker\n writeWord(0x01a2); // length\n\n writeByte(0); // HTYDCinfo\n for (var i = 0; i < 16; i++) {\n writeByte(std_dc_luminance_nrcodes[i + 1]);\n }\n for (var j = 0; j <= 11; j++) {\n writeByte(std_dc_luminance_values[j]);\n }\n\n writeByte(0x10); // HTYACinfo\n for (var k = 0; k < 16; k++) {\n writeByte(std_ac_luminance_nrcodes[k + 1]);\n }\n for (var l = 0; l <= 161; l++) {\n writeByte(std_ac_luminance_values[l]);\n }\n\n writeByte(1); // HTUDCinfo\n for (var m = 0; m < 16; m++) {\n writeByte(std_dc_chrominance_nrcodes[m + 1]);\n }\n for (var n = 0; n <= 11; n++) {\n writeByte(std_dc_chrominance_values[n]);\n }\n\n writeByte(0x11); // HTUACinfo\n for (var o = 0; o < 16; o++) {\n writeByte(std_ac_chrominance_nrcodes[o + 1]);\n }\n for (var p = 0; p <= 161; p++) {\n writeByte(std_ac_chrominance_values[p]);\n }\n }\n\n function writeSOS() {\n writeWord(0xffda); // marker\n writeWord(12); // length\n writeByte(3); // nrofcomponents\n writeByte(1); // IdY\n writeByte(0); // HTY\n writeByte(2); // IdU\n writeByte(0x11); // HTU\n writeByte(3); // IdV\n writeByte(0x11); // HTV\n writeByte(0); // Ss\n writeByte(0x3f); // Se\n writeByte(0); // Bf\n }\n\n function processDU(CDU, fdtbl, DC, HTDC, HTAC) {\n var EOB = HTAC[0x00];\n var M16zeroes = HTAC[0xf0];\n var pos;\n var I16 = 16;\n var I63 = 63;\n var I64 = 64;\n var DU_DCT = fDCTQuant(CDU, fdtbl);\n //ZigZag reorder\n for (var j = 0; j < I64; ++j) {\n DU[ZigZag[j]] = DU_DCT[j];\n }\n var Diff = DU[0] - DC;\n DC = DU[0];\n //Encode DC\n if (Diff == 0) {\n writeBits(HTDC[0]); // Diff might be 0\n } else {\n pos = 32767 + Diff;\n writeBits(HTDC[category[pos]]);\n writeBits(bitcode[pos]);\n }\n //Encode ACs\n var end0pos = 63; // was const... which is crazy\n while (end0pos > 0 && DU[end0pos] == 0) {\n end0pos--;\n }\n //end0pos = first element in reverse order !=0\n if (end0pos == 0) {\n writeBits(EOB);\n return DC;\n }\n var i = 1;\n var lng;\n while (i <= end0pos) {\n var startpos = i;\n while (DU[i] == 0 && i <= end0pos) {\n ++i;\n }\n var nrzeroes = i - startpos;\n if (nrzeroes >= I16) {\n lng = nrzeroes >> 4;\n for (var nrmarker = 1; nrmarker <= lng; ++nrmarker)\n writeBits(M16zeroes);\n nrzeroes = nrzeroes & 0xf;\n }\n pos = 32767 + DU[i];\n writeBits(HTAC[(nrzeroes << 4) + category[pos]]);\n writeBits(bitcode[pos]);\n i++;\n }\n if (end0pos != I63) {\n writeBits(EOB);\n }\n return DC;\n }\n\n function initCharLookupTable() {\n var sfcc = String.fromCharCode;\n for (var i = 0; i < 256; i++) {\n ///// ACHTUNG // 255\n clt[i] = sfcc(i);\n }\n }\n\n this.encode = function(\n image,\n quality // image data object\n ) {\n if (quality) setQuality(quality);\n\n // Initialize bit writer\n byteout = new Array();\n bytenew = 0;\n bytepos = 7;\n\n // Add JPEG headers\n writeWord(0xffd8); // SOI\n writeAPP0();\n writeDQT();\n writeSOF0(image.width, image.height);\n writeDHT();\n writeSOS();\n\n // Encode 8x8 macroblocks\n var DCY = 0;\n var DCU = 0;\n var DCV = 0;\n\n bytenew = 0;\n bytepos = 7;\n\n this.encode.displayName = \"_encode_\";\n\n var imageData = image.data;\n var width = image.width;\n var height = image.height;\n\n var quadWidth = width * 4;\n\n var x,\n y = 0;\n var r, g, b;\n var start, p, col, row, pos;\n while (y < height) {\n x = 0;\n while (x < quadWidth) {\n start = quadWidth * y + x;\n col = -1;\n row = 0;\n\n for (pos = 0; pos < 64; pos++) {\n row = pos >> 3; // /8\n col = (pos & 7) * 4; // %8\n p = start + row * quadWidth + col;\n\n if (y + row >= height) {\n // padding bottom\n p -= quadWidth * (y + 1 + row - height);\n }\n\n if (x + col >= quadWidth) {\n // padding right\n p -= x + col - quadWidth + 4;\n }\n\n r = imageData[p++];\n g = imageData[p++];\n b = imageData[p++];\n\n /* // calculate YUV values dynamically\n\t\t\t\t\tYDU[pos]=((( 0.29900)*r+( 0.58700)*g+( 0.11400)*b))-128; //-0x80\n\t\t\t\t\tUDU[pos]=(((-0.16874)*r+(-0.33126)*g+( 0.50000)*b));\n\t\t\t\t\tVDU[pos]=((( 0.50000)*r+(-0.41869)*g+(-0.08131)*b));\n\t\t\t\t\t*/\n\n // use lookup table (slightly faster)\n YDU[pos] =\n ((RGB_YUV_TABLE[r] +\n RGB_YUV_TABLE[(g + 256) >> 0] +\n RGB_YUV_TABLE[(b + 512) >> 0]) >>\n 16) -\n 128;\n UDU[pos] =\n ((RGB_YUV_TABLE[(r + 768) >> 0] +\n RGB_YUV_TABLE[(g + 1024) >> 0] +\n RGB_YUV_TABLE[(b + 1280) >> 0]) >>\n 16) -\n 128;\n VDU[pos] =\n ((RGB_YUV_TABLE[(r + 1280) >> 0] +\n RGB_YUV_TABLE[(g + 1536) >> 0] +\n RGB_YUV_TABLE[(b + 1792) >> 0]) >>\n 16) -\n 128;\n }\n\n DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);\n DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);\n DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);\n x += 32;\n }\n y += 8;\n }\n\n ////////////////////////////////////////////////////////////////\n\n // Do the bit alignment of the EOI marker\n if (bytepos >= 0) {\n var fillbits = [];\n fillbits[1] = bytepos + 1;\n fillbits[0] = (1 << (bytepos + 1)) - 1;\n writeBits(fillbits);\n }\n\n writeWord(0xffd9); //EOI\n\n return new Uint8Array(byteout);\n };\n\n function setQuality(quality) {\n quality = Math.min(Math.max(quality, 1), 100);\n\n if (currentQuality == quality) return; // don't recalc if unchanged\n\n var sf =\n quality < 50 ? Math.floor(5000 / quality) : Math.floor(200 - quality * 2);\n\n initQuantTables(sf);\n currentQuality = quality;\n //console.log('Quality set to: '+quality +'%');\n }\n\n function init() {\n quality = quality || 50;\n // Create tables\n initCharLookupTable();\n initHuffmanTbl();\n initCategoryNumber();\n initRGBYUVTable();\n\n setQuality(quality);\n }\n init();\n}\n\nexport { JPEGEncoder };\n","/**\n * @author shaozilee\n *\n * Bmp format decoder,support 1bit 4bit 8bit 24bit bmp\n *\n */\n\nimport { console } from \"./console.js\";\n\nfunction BmpDecoder(buffer, is_with_alpha) {\n this.pos = 0;\n this.buffer = buffer;\n this.datav = new DataView(buffer.buffer);\n this.is_with_alpha = !!is_with_alpha;\n this.bottom_up = true;\n this.flag =\n String.fromCharCode(this.buffer[0]) + String.fromCharCode(this.buffer[1]);\n this.pos += 2;\n if ([\"BM\", \"BA\", \"CI\", \"CP\", \"IC\", \"PT\"].indexOf(this.flag) === -1)\n throw new Error(\"Invalid BMP File\");\n this.parseHeader();\n this.parseBGR();\n}\n\nBmpDecoder.prototype.parseHeader = function() {\n this.fileSize = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n this.reserved = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n this.offset = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n this.headerSize = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n this.width = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n this.height = this.datav.getInt32(this.pos, true);\n this.pos += 4;\n this.planes = this.datav.getUint16(this.pos, true);\n this.pos += 2;\n this.bitPP = this.datav.getUint16(this.pos, true);\n this.pos += 2;\n this.compress = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n this.rawSize = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n this.hr = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n this.vr = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n this.colors = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n this.importantColors = this.datav.getUint32(this.pos, true);\n this.pos += 4;\n\n if (this.bitPP === 16 && this.is_with_alpha) {\n this.bitPP = 15;\n }\n if (this.bitPP < 15) {\n var len = this.colors === 0 ? 1 << this.bitPP : this.colors;\n this.palette = new Array(len);\n for (var i = 0; i < len; i++) {\n var blue = this.datav.getUint8(this.pos++, true);\n var green = this.datav.getUint8(this.pos++, true);\n var red = this.datav.getUint8(this.pos++, true);\n var quad = this.datav.getUint8(this.pos++, true);\n this.palette[i] = {\n red: red,\n green: green,\n blue: blue,\n quad: quad\n };\n }\n }\n if (this.height < 0) {\n this.height *= -1;\n this.bottom_up = false;\n }\n};\n\nBmpDecoder.prototype.parseBGR = function() {\n this.pos = this.offset;\n try {\n var bitn = \"bit\" + this.bitPP;\n var len = this.width * this.height * 4;\n this.data = new Uint8Array(len);\n\n this[bitn]();\n } catch (e) {\n console.log(\"bit decode error:\" + e);\n }\n};\n\nBmpDecoder.prototype.bit1 = function() {\n var xlen = Math.ceil(this.width / 8);\n var mode = xlen % 4;\n var y;\n for (y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y;\n for (var x = 0; x < xlen; x++) {\n var b = this.datav.getUint8(this.pos++, true);\n var location = line * this.width * 4 + x * 8 * 4;\n for (var i = 0; i < 8; i++) {\n if (x * 8 + i < this.width) {\n var rgb = this.palette[(b >> (7 - i)) & 0x1];\n this.data[location + i * 4] = rgb.blue;\n this.data[location + i * 4 + 1] = rgb.green;\n this.data[location + i * 4 + 2] = rgb.red;\n this.data[location + i * 4 + 3] = 0xff;\n } else {\n break;\n }\n }\n }\n\n if (mode !== 0) {\n this.pos += 4 - mode;\n }\n }\n};\n\nBmpDecoder.prototype.bit4 = function() {\n var xlen = Math.ceil(this.width / 2);\n var mode = xlen % 4;\n for (var y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y;\n for (var x = 0; x < xlen; x++) {\n var b = this.datav.getUint8(this.pos++, true);\n var location = line * this.width * 4 + x * 2 * 4;\n\n var before = b >> 4;\n var after = b & 0x0f;\n\n var rgb = this.palette[before];\n this.data[location] = rgb.blue;\n this.data[location + 1] = rgb.green;\n this.data[location + 2] = rgb.red;\n this.data[location + 3] = 0xff;\n\n if (x * 2 + 1 >= this.width) break;\n\n rgb = this.palette[after];\n this.data[location + 4] = rgb.blue;\n this.data[location + 4 + 1] = rgb.green;\n this.data[location + 4 + 2] = rgb.red;\n this.data[location + 4 + 3] = 0xff;\n }\n\n if (mode !== 0) {\n this.pos += 4 - mode;\n }\n }\n};\n\nBmpDecoder.prototype.bit8 = function() {\n var mode = this.width % 4;\n for (var y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y;\n for (var x = 0; x < this.width; x++) {\n var b = this.datav.getUint8(this.pos++, true);\n var location = line * this.width * 4 + x * 4;\n if (b < this.palette.length) {\n var rgb = this.palette[b];\n this.data[location] = rgb.red;\n this.data[location + 1] = rgb.green;\n this.data[location + 2] = rgb.blue;\n this.data[location + 3] = 0xff;\n } else {\n this.data[location] = 0xff;\n this.data[location + 1] = 0xff;\n this.data[location + 2] = 0xff;\n this.data[location + 3] = 0xff;\n }\n }\n if (mode !== 0) {\n this.pos += 4 - mode;\n }\n }\n};\n\nBmpDecoder.prototype.bit15 = function() {\n var dif_w = this.width % 3;\n var _11111 = parseInt(\"11111\", 2),\n _1_5 = _11111;\n for (var y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y;\n for (var x = 0; x < this.width; x++) {\n var B = this.datav.getUint16(this.pos, true);\n this.pos += 2;\n var blue = (((B & _1_5) / _1_5) * 255) | 0;\n var green = ((((B >> 5) & _1_5) / _1_5) * 255) | 0;\n var red = ((((B >> 10) & _1_5) / _1_5) * 255) | 0;\n var alpha = B >> 15 ? 0xff : 0x00;\n\n var location = line * this.width * 4 + x * 4;\n this.data[location] = red;\n this.data[location + 1] = green;\n this.data[location + 2] = blue;\n this.data[location + 3] = alpha;\n }\n //skip extra bytes\n this.pos += dif_w;\n }\n};\n\nBmpDecoder.prototype.bit16 = function() {\n var dif_w = this.width % 3;\n var _11111 = parseInt(\"11111\", 2),\n _1_5 = _11111;\n var _111111 = parseInt(\"111111\", 2),\n _1_6 = _111111;\n for (var y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y;\n for (var x = 0; x < this.width; x++) {\n var B = this.datav.getUint16(this.pos, true);\n this.pos += 2;\n var alpha = 0xff;\n var blue = (((B & _1_5) / _1_5) * 255) | 0;\n var green = ((((B >> 5) & _1_6) / _1_6) * 255) | 0;\n var red = (((B >> 11) / _1_5) * 255) | 0;\n\n var location = line * this.width * 4 + x * 4;\n this.data[location] = red;\n this.data[location + 1] = green;\n this.data[location + 2] = blue;\n this.data[location + 3] = alpha;\n }\n //skip extra bytes\n this.pos += dif_w;\n }\n};\n\nBmpDecoder.prototype.bit24 = function() {\n //when height > 0\n for (var y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y;\n for (var x = 0; x < this.width; x++) {\n var blue = this.datav.getUint8(this.pos++, true);\n var green = this.datav.getUint8(this.pos++, true);\n var red = this.datav.getUint8(this.pos++, true);\n var location = line * this.width * 4 + x * 4;\n this.data[location] = red;\n this.data[location + 1] = green;\n this.data[location + 2] = blue;\n this.data[location + 3] = 0xff;\n }\n //skip extra bytes\n this.pos += this.width % 4;\n }\n};\n\n/**\n * add 32bit decode func\n * @author soubok\n */\nBmpDecoder.prototype.bit32 = function() {\n //when height > 0\n for (var y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y;\n for (var x = 0; x < this.width; x++) {\n var blue = this.datav.getUint8(this.pos++, true);\n var green = this.datav.getUint8(this.pos++, true);\n var red = this.datav.getUint8(this.pos++, true);\n var alpha = this.datav.getUint8(this.pos++, true);\n var location = line * this.width * 4 + x * 4;\n this.data[location] = red;\n this.data[location + 1] = green;\n this.data[location + 2] = blue;\n this.data[location + 3] = alpha;\n }\n //skip extra bytes\n //this.pos += (this.width % 4);\n }\n};\n\nBmpDecoder.prototype.getData = function() {\n return this.data;\n};\n\nexport { BmpDecoder };\n","function WebPDecoder(imageData) {\n /** @license\n * Copyright 2011 Google Inc.\n *\n * This code is licensed under the same terms as WebM:\n * Software License Agreement: http://www.webmproject.org/license/software/\n * Additional IP Rights Grant: http://www.webmproject.org/license/additional/\n * -----------------------------------------------------------------------------\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * -----------------------------------------------------------------------------\n *\n * Copyright 2011-2017 Dominik Homberger\n * Libwebp Javascript / libwebpjs - the libwebp implementation in javascript (v0.6.0)\n *\n * Author: Dominik Homberger (dominik.homberger@gmail.com)\n */\n\n var self = this;\n var UpsampleRgbLinePair,\n UpsampleBgrLinePair,\n UpsampleRgbaLinePair,\n UpsampleBgraLinePair,\n UpsampleArgbLinePair,\n UpsampleArgbLinePair,\n UpsampleRgba4444LinePair,\n UpsampleRgb565LinePair;\n\n function x(F) {\n if (!F) throw Error(\"assert :P\");\n }\n function fa(F, L, J) {\n for (var H = 0; 4 > H; H++) if (F[L + H] != J.charCodeAt(H)) return !0;\n return !1;\n }\n function I(F, L, J, H, Z) {\n for (var O = 0; O < Z; O++) F[L + O] = J[H + O];\n }\n function M(F, L, J, H) {\n for (var Z = 0; Z < H; Z++) F[L + Z] = J;\n }\n function V(F) {\n return new Int32Array(F);\n }\n function wa(F, L) {\n for (var J = [], H = 0; H < F; H++) J.push(new L());\n return J;\n }\n function wb() {\n function F(J, H, Z) {\n for (var O = Z[H], L = 0; L < O; L++) {\n J.push(Z.length > H + 1 ? [] : 0);\n if (Z.length < H + 1) break;\n F(J[L], H + 1, Z);\n }\n }\n var L = [];\n F(L, 0, [3, 11]);\n return L;\n }\n function Ed(F, L) {\n function J(H, O, F) {\n for (var Z = F[O], ma = 0; ma < Z; ma++) {\n H.push(F.length > O + 1 ? [] : new L());\n if (F.length < O + 1) break;\n J(H[ma], O + 1, F);\n }\n }\n var H = [];\n J(H, 0, F);\n return H;\n }\n var _WebPDecoder = function() {\n var self = this;\n function F() {\n V(55);\n }\n function L(a, b) {\n for (var c = (1 << (b - 1)) >>> 0; a & c; ) c >>>= 1;\n return c ? (a & (c - 1)) + c : a;\n }\n function J(a, b, c, d, e) {\n x(!(d % c));\n do (d -= c), (a[b + d] = e);\n while (0 < d);\n }\n function H(a, b, c, d, e, f) {\n var g = b,\n h = 1 << c,\n k,\n l,\n m = V(16),\n n = V(16);\n x(0 != e);\n x(null != d);\n x(null != a);\n x(0 < c);\n for (l = 0; l < e; ++l) {\n if (15 < d[l]) return 0;\n ++m[d[l]];\n }\n if (m[0] == e) return 0;\n n[1] = 0;\n for (k = 1; 15 > k; ++k) {\n if (m[k] > 1 << k) return 0;\n n[k + 1] = n[k] + m[k];\n }\n for (l = 0; l < e; ++l) (k = d[l]), 0 < d[l] && (f[n[k]++] = l);\n if (1 == n[15])\n return (d = new O()), (d.g = 0), (d.value = f[0]), J(a, g, 1, h, d), h;\n var r = -1,\n q = h - 1,\n t = 0,\n v = 1,\n p = 1,\n u,\n w = 1 << c;\n l = 0;\n k = 1;\n for (e = 2; k <= c; ++k, e <<= 1) {\n p <<= 1;\n v += p;\n p -= m[k];\n if (0 > p) return 0;\n for (; 0 < m[k]; --m[k])\n (d = new O()),\n (d.g = k),\n (d.value = f[l++]),\n J(a, g + t, e, w, d),\n (t = L(t, k));\n }\n k = c + 1;\n for (e = 2; 15 >= k; ++k, e <<= 1) {\n p <<= 1;\n v += p;\n p -= m[k];\n if (0 > p) return 0;\n for (; 0 < m[k]; --m[k]) {\n d = new O();\n if ((t & q) != r) {\n g += w;\n r = k;\n for (u = 1 << (r - c); 15 > r; ) {\n u -= m[r];\n if (0 >= u) break;\n ++r;\n u <<= 1;\n }\n u = r - c;\n w = 1 << u;\n h += w;\n r = t & q;\n a[b + r].g = u + c;\n a[b + r].value = g - b - r;\n }\n d.g = k - c;\n d.value = f[l++];\n J(a, g + (t >> c), e, w, d);\n t = L(t, k);\n }\n }\n return v != 2 * n[15] - 1 ? 0 : h;\n }\n function Z(a, b, c, d, e) {\n x(2328 >= e);\n if (512 >= e) var f = V(512);\n else if (((f = V(e)), null == f)) return 0;\n return H(a, b, c, d, e, f);\n }\n function O() {\n this.value = this.g = 0;\n }\n function Fd() {\n this.value = this.g = 0;\n }\n function Ub() {\n this.G = wa(5, O);\n this.H = V(5);\n this.jc = this.Qb = this.qb = this.nd = 0;\n this.pd = wa(xb, Fd);\n }\n function ma(a, b, c, d) {\n x(null != a);\n x(null != b);\n x(2147483648 > d);\n a.Ca = 254;\n a.I = 0;\n a.b = -8;\n a.Ka = 0;\n a.oa = b;\n a.pa = c;\n a.Jd = b;\n a.Yc = c + d;\n a.Zc = 4 <= d ? c + d - 4 + 1 : c;\n Qa(a);\n }\n function na(a, b) {\n for (var c = 0; 0 < b--; ) c |= K(a, 128) << b;\n return c;\n }\n function ca(a, b) {\n var c = na(a, b);\n return G(a) ? -c : c;\n }\n function cb(a, b, c, d) {\n var e,\n f = 0;\n x(null != a);\n x(null != b);\n x(4294967288 > d);\n a.Sb = d;\n a.Ra = 0;\n a.u = 0;\n a.h = 0;\n 4 < d && (d = 4);\n for (e = 0; e < d; ++e) f += b[c + e] << (8 * e);\n a.Ra = f;\n a.bb = d;\n a.oa = b;\n a.pa = c;\n }\n function Vb(a) {\n for (; 8 <= a.u && a.bb < a.Sb; )\n (a.Ra >>>= 8),\n (a.Ra += (a.oa[a.pa + a.bb] << (ob - 8)) >>> 0),\n ++a.bb,\n (a.u -= 8);\n db(a) && ((a.h = 1), (a.u = 0));\n }\n function D(a, b) {\n x(0 <= b);\n if (!a.h && b <= Gd) {\n var c = pb(a) & Hd[b];\n a.u += b;\n Vb(a);\n return c;\n }\n a.h = 1;\n return (a.u = 0);\n }\n function Wb() {\n this.b = this.Ca = this.I = 0;\n this.oa = [];\n this.pa = 0;\n this.Jd = [];\n this.Yc = 0;\n this.Zc = [];\n this.Ka = 0;\n }\n function Ra() {\n this.Ra = 0;\n this.oa = [];\n this.h = this.u = this.bb = this.Sb = this.pa = 0;\n }\n function pb(a) {\n return (a.Ra >>> (a.u & (ob - 1))) >>> 0;\n }\n function db(a) {\n x(a.bb <= a.Sb);\n return a.h || (a.bb == a.Sb && a.u > ob);\n }\n function qb(a, b) {\n a.u = b;\n a.h = db(a);\n }\n function Sa(a) {\n a.u >= Xb && (x(a.u >= Xb), Vb(a));\n }\n function Qa(a) {\n x(null != a && null != a.oa);\n a.pa < a.Zc\n ? ((a.I = (a.oa[a.pa++] | (a.I << 8)) >>> 0), (a.b += 8))\n : (x(null != a && null != a.oa),\n a.pa < a.Yc\n ? ((a.b += 8), (a.I = a.oa[a.pa++] | (a.I << 8)))\n : a.Ka\n ? (a.b = 0)\n : ((a.I <<= 8), (a.b += 8), (a.Ka = 1)));\n }\n function G(a) {\n return na(a, 1);\n }\n function K(a, b) {\n var c = a.Ca;\n 0 > a.b && Qa(a);\n var d = a.b,\n e = (c * b) >>> 8,\n f = (a.I >>> d > e) + 0;\n f ? ((c -= e), (a.I -= ((e + 1) << d) >>> 0)) : (c = e + 1);\n d = c;\n for (e = 0; 256 <= d; ) (e += 8), (d >>= 8);\n d = 7 ^ (e + Id[d]);\n a.b -= d;\n a.Ca = (c << d) - 1;\n return f;\n }\n function ra(a, b, c) {\n a[b + 0] = (c >> 24) & 255;\n a[b + 1] = (c >> 16) & 255;\n a[b + 2] = (c >> 8) & 255;\n a[b + 3] = (c >> 0) & 255;\n }\n function Ta(a, b) {\n return (a[b + 0] << 0) | (a[b + 1] << 8);\n }\n function Yb(a, b) {\n return Ta(a, b) | (a[b + 2] << 16);\n }\n function Ha(a, b) {\n return Ta(a, b) | (Ta(a, b + 2) << 16);\n }\n function Zb(a, b) {\n var c = 1 << b;\n x(null != a);\n x(0 < b);\n a.X = V(c);\n if (null == a.X) return 0;\n a.Mb = 32 - b;\n a.Xa = b;\n return 1;\n }\n function $b(a, b) {\n x(null != a);\n x(null != b);\n x(a.Xa == b.Xa);\n I(b.X, 0, a.X, 0, 1 << b.Xa);\n }\n function ac() {\n this.X = [];\n this.Xa = this.Mb = 0;\n }\n function bc(a, b, c, d) {\n x(null != c);\n x(null != d);\n var e = c[0],\n f = d[0];\n 0 == e && (e = (a * f + b / 2) / b);\n 0 == f && (f = (b * e + a / 2) / a);\n if (0 >= e || 0 >= f) return 0;\n c[0] = e;\n d[0] = f;\n return 1;\n }\n function xa(a, b) {\n return (a + (1 << b) - 1) >>> b;\n }\n function yb(a, b) {\n return (\n (((((a & 4278255360) + (b & 4278255360)) >>> 0) & 4278255360) +\n ((((a & 16711935) + (b & 16711935)) >>> 0) & 16711935)) >>>\n 0\n );\n }\n function X(a, b) {\n self[b] = function(b, d, e, f, g, h, k) {\n var c;\n for (c = 0; c < g; ++c) {\n var m = self[a](h[k + c - 1], e, f + c);\n h[k + c] = yb(b[d + c], m);\n }\n };\n }\n function Jd() {\n this.ud = this.hd = this.jd = 0;\n }\n function aa(a, b) {\n return ((((a ^ b) & 4278124286) >>> 1) + (a & b)) >>> 0;\n }\n function sa(a) {\n if (0 <= a && 256 > a) return a;\n if (0 > a) return 0;\n if (255 < a) return 255;\n }\n function eb(a, b) {\n return sa(a + ((a - b + 0.5) >> 1));\n }\n function Ia(a, b, c) {\n return Math.abs(b - c) - Math.abs(a - c);\n }\n function cc(a, b, c, d, e, f, g) {\n d = f[g - 1];\n for (c = 0; c < e; ++c) f[g + c] = d = yb(a[b + c], d);\n }\n function Kd(a, b, c, d, e) {\n var f;\n for (f = 0; f < c; ++f) {\n var g = a[b + f],\n h = (g >> 8) & 255,\n k = g & 16711935,\n k = k + ((h << 16) + h),\n k = k & 16711935;\n d[e + f] = ((g & 4278255360) + k) >>> 0;\n }\n }\n function dc(a, b) {\n b.jd = (a >> 0) & 255;\n b.hd = (a >> 8) & 255;\n b.ud = (a >> 16) & 255;\n }\n function Ld(a, b, c, d, e, f) {\n var g;\n for (g = 0; g < d; ++g) {\n var h = b[c + g],\n k = h >>> 8,\n l = h >>> 16,\n m = h,\n l = l + ((((a.jd << 24) >> 24) * ((k << 24) >> 24)) >>> 5),\n l = l & 255,\n m = m + ((((a.hd << 24) >> 24) * ((k << 24) >> 24)) >>> 5),\n m = m + ((((a.ud << 24) >> 24) * ((l << 24) >> 24)) >>> 5),\n m = m & 255;\n e[f + g] = (h & 4278255360) + (l << 16) + m;\n }\n }\n function ec(a, b, c, d, e) {\n self[b] = function(a, b, c, k, l, m, n, r, q) {\n for (k = n; k < r; ++k)\n for (n = 0; n < q; ++n) l[m++] = e(c[d(a[b++])]);\n };\n self[a] = function(a, b, h, k, l, m, n) {\n var f = 8 >> a.b,\n g = a.Ea,\n t = a.K[0],\n v = a.w;\n if (8 > f)\n for (a = (1 << a.b) - 1, v = (1 << f) - 1; b < h; ++b) {\n var p = 0,\n u;\n for (u = 0; u < g; ++u)\n u & a || (p = d(k[l++])), (m[n++] = e(t[p & v])), (p >>= f);\n }\n else self[\"VP8LMapColor\" + c](k, l, t, v, m, n, b, h, g);\n };\n }\n function Md(a, b, c, d, e) {\n for (c = b + c; b < c; ) {\n var f = a[b++];\n d[e++] = (f >> 16) & 255;\n d[e++] = (f >> 8) & 255;\n d[e++] = (f >> 0) & 255;\n }\n }\n function Nd(a, b, c, d, e) {\n for (c = b + c; b < c; ) {\n var f = a[b++];\n d[e++] = (f >> 16) & 255;\n d[e++] = (f >> 8) & 255;\n d[e++] = (f >> 0) & 255;\n d[e++] = (f >> 24) & 255;\n }\n }\n function Od(a, b, c, d, e) {\n for (c = b + c; b < c; ) {\n var f = a[b++],\n g = ((f >> 16) & 240) | ((f >> 12) & 15),\n f = ((f >> 0) & 240) | ((f >> 28) & 15);\n d[e++] = g;\n d[e++] = f;\n }\n }\n function Pd(a, b, c, d, e) {\n for (c = b + c; b < c; ) {\n var f = a[b++],\n g = ((f >> 16) & 248) | ((f >> 13) & 7),\n f = ((f >> 5) & 224) | ((f >> 3) & 31);\n d[e++] = g;\n d[e++] = f;\n }\n }\n function Qd(a, b, c, d, e) {\n for (c = b + c; b < c; ) {\n var f = a[b++];\n d[e++] = (f >> 0) & 255;\n d[e++] = (f >> 8) & 255;\n d[e++] = (f >> 16) & 255;\n }\n }\n function fb(a, b, c, d, e, f) {\n if (0 == f)\n for (c = b + c; b < c; )\n (f = a[b++]),\n ra(\n d,\n ((f[0] >> 24) |\n ((f[1] >> 8) & 65280) |\n ((f[2] << 8) & 16711680) |\n (f[3] << 24)) >>>\n 0\n ),\n (e += 32);\n else I(d, e, a, b, c);\n }\n function gb(a, b) {\n self[b][0] = self[a + \"0\"];\n self[b][1] = self[a + \"1\"];\n self[b][2] = self[a + \"2\"];\n self[b][3] = self[a + \"3\"];\n self[b][4] = self[a + \"4\"];\n self[b][5] = self[a + \"5\"];\n self[b][6] = self[a + \"6\"];\n self[b][7] = self[a + \"7\"];\n self[b][8] = self[a + \"8\"];\n self[b][9] = self[a + \"9\"];\n self[b][10] = self[a + \"10\"];\n self[b][11] = self[a + \"11\"];\n self[b][12] = self[a + \"12\"];\n self[b][13] = self[a + \"13\"];\n self[b][14] = self[a + \"0\"];\n self[b][15] = self[a + \"0\"];\n }\n function hb(a) {\n return a == zb || a == Ab || a == Ja || a == Bb;\n }\n function Rd() {\n this.eb = [];\n this.size = this.A = this.fb = 0;\n }\n function Sd() {\n this.y = [];\n this.f = [];\n this.ea = [];\n this.F = [];\n 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;\n }\n function Cb() {\n this.Rd = this.height = this.width = this.S = 0;\n this.f = {};\n this.f.RGBA = new Rd();\n this.f.kb = new Sd();\n this.sd = null;\n }\n function Td() {\n this.width = [0];\n this.height = [0];\n this.Pd = [0];\n this.Qd = [0];\n this.format = [0];\n }\n function Ud() {\n 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;\n }\n function Vd(a) {\n alert(\"todo:WebPSamplerProcessPlane\");\n return a.T;\n }\n function Wd(a, b) {\n var c = a.T,\n d = b.ba.f.RGBA,\n e = d.eb,\n f = d.fb + a.ka * d.A,\n g = P[b.ba.S],\n h = a.y,\n k = a.O,\n l = a.f,\n m = a.N,\n n = a.ea,\n r = a.W,\n q = b.cc,\n t = b.dc,\n v = b.Mc,\n p = b.Nc,\n u = a.ka,\n w = a.ka + a.T,\n y = a.U,\n A = (y + 1) >> 1;\n 0 == u\n ? g(h, k, null, null, l, m, n, r, l, m, n, r, e, f, null, null, y)\n : (g(b.ec, b.fc, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y),\n ++c);\n for (; u + 2 < w; u += 2)\n (q = l),\n (t = m),\n (v = n),\n (p = r),\n (m += a.Rc),\n (r += a.Rc),\n (f += 2 * d.A),\n (k += 2 * a.fa),\n g(h, k - a.fa, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y);\n k += a.fa;\n a.j + w < a.o\n ? (I(b.ec, b.fc, h, k, y),\n I(b.cc, b.dc, l, m, A),\n I(b.Mc, b.Nc, n, r, A),\n c--)\n : w & 1 ||\n g(\n h,\n k,\n null,\n null,\n l,\n m,\n n,\n r,\n l,\n m,\n n,\n r,\n e,\n f + d.A,\n null,\n null,\n y\n );\n return c;\n }\n function Xd(a, b, c) {\n var d = a.F,\n e = [a.J];\n if (null != d) {\n var f = a.U,\n g = b.ba.S,\n h = g == ya || g == Ja;\n b = b.ba.f.RGBA;\n var k = [0],\n l = a.ka;\n k[0] = a.T;\n a.Kb &&\n (0 == l ? --k[0] : (--l, (e[0] -= a.width)),\n a.j + a.ka + a.T == a.o && (k[0] = a.o - a.j - l));\n var m = b.eb,\n l = b.fb + l * b.A;\n a = fc(d, e[0], a.width, f, k, m, l + (h ? 0 : 3), b.A);\n x(c == k);\n a && hb(g) && za(m, l, h, f, k, b.A);\n }\n return 0;\n }\n function gc(a) {\n var b = a.ma,\n c = b.ba.S,\n d = 11 > c,\n e = c == Ua || c == Va || c == ya || c == Db || 12 == c || hb(c);\n b.memory = null;\n b.Ib = null;\n b.Jb = null;\n b.Nd = null;\n if (!hc(b.Oa, a, e ? 11 : 12)) return 0;\n e && hb(c) && ic();\n if (a.da) alert(\"todo:use_scaling\");\n else {\n if (d) {\n if (((b.Ib = Vd), a.Kb)) {\n c = (a.U + 1) >> 1;\n b.memory = V(a.U + 2 * c);\n if (null == b.memory) return 0;\n b.ec = b.memory;\n b.fc = 0;\n b.cc = b.ec;\n b.dc = b.fc + a.U;\n b.Mc = b.cc;\n b.Nc = b.dc + c;\n b.Ib = Wd;\n ic();\n }\n } else alert(\"todo:EmitYUV\");\n e && ((b.Jb = Xd), d && Aa());\n }\n if (d && !jc) {\n for (a = 0; 256 > a; ++a)\n (Yd[a] = (89858 * (a - 128) + Ba) >> Wa),\n (Zd[a] = -22014 * (a - 128) + Ba),\n ($d[a] = -45773 * (a - 128)),\n (ae[a] = (113618 * (a - 128) + Ba) >> Wa);\n for (a = ta; a < Eb; ++a)\n (b = (76283 * (a - 16) + Ba) >> Wa),\n (be[a - ta] = ga(b, 255)),\n (ce[a - ta] = ga((b + 8) >> 4, 15));\n jc = 1;\n }\n return 1;\n }\n function kc(a) {\n var b = a.ma,\n c = a.U,\n d = a.T;\n x(!(a.ka & 1));\n if (0 >= c || 0 >= d) return 0;\n c = b.Ib(a, b);\n null != b.Jb && b.Jb(a, b, c);\n b.Dc += c;\n return 1;\n }\n function lc(a) {\n a.ma.memory = null;\n }\n function mc(a, b, c, d) {\n if (47 != D(a, 8)) return 0;\n b[0] = D(a, 14) + 1;\n c[0] = D(a, 14) + 1;\n d[0] = D(a, 1);\n return 0 != D(a, 3) ? 0 : !a.h;\n }\n function ib(a, b) {\n if (4 > a) return a + 1;\n var c = (a - 2) >> 1;\n return ((2 + (a & 1)) << c) + D(b, c) + 1;\n }\n function nc(a, b) {\n if (120 < b) return b - 120;\n var c = de[b - 1],\n c = (c >> 4) * a + (8 - (c & 15));\n return 1 <= c ? c : 1;\n }\n function ua(a, b, c) {\n var d = pb(c);\n b += d & 255;\n var e = a[b].g - 8;\n 0 < e &&\n (qb(c, c.u + 8),\n (d = pb(c)),\n (b += a[b].value),\n (b += d & ((1 << e) - 1)));\n qb(c, c.u + a[b].g);\n return a[b].value;\n }\n function ub(a, b, c) {\n c.g += a.g;\n c.value += (a.value << b) >>> 0;\n x(8 >= c.g);\n return a.g;\n }\n function ha(a, b, c) {\n var d = a.xc;\n b = 0 == d ? 0 : a.vc[a.md * (c >> d) + (b >> d)];\n x(b < a.Wb);\n return a.Ya[b];\n }\n function oc(a, b, c, d) {\n var e = a.ab,\n f = a.c * b,\n g = a.C;\n b = g + b;\n var h = c,\n k = d;\n d = a.Ta;\n for (c = a.Ua; 0 < e--; ) {\n var l = a.gc[e],\n m = g,\n n = b,\n r = h,\n q = k,\n k = d,\n h = c,\n t = l.Ea;\n x(m < n);\n x(n <= l.nc);\n switch (l.hc) {\n case 2:\n pc(r, q, (n - m) * t, k, h);\n break;\n case 0:\n var v = l,\n p = m,\n u = n,\n w = k,\n y = h,\n A = v.Ea;\n 0 == p &&\n (ee(r, q, null, null, 1, w, y),\n cc(r, q + 1, 0, 0, A - 1, w, y + 1),\n (q += A),\n (y += A),\n ++p);\n for (\n var E = 1 << v.b,\n B = E - 1,\n C = xa(A, v.b),\n N = v.K,\n v = v.w + (p >> v.b) * C;\n p < u;\n\n ) {\n var z = N,\n Q = v,\n S = 1;\n for (fe(r, q, w, y - A, 1, w, y); S < A; ) {\n var K = qc[(z[Q++] >> 8) & 15],\n D = (S & ~B) + E;\n D > A && (D = A);\n K(r, q + +S, w, y + S - A, D - S, w, y + S);\n S = D;\n }\n q += A;\n y += A;\n ++p;\n p & B || (v += C);\n }\n n != l.nc && I(k, h - t, k, h + (n - m - 1) * t, t);\n break;\n case 1:\n t = r;\n u = q;\n r = l.Ea;\n q = 1 << l.b;\n w = q - 1;\n y = r & ~w;\n A = r - y;\n p = xa(r, l.b);\n E = l.K;\n for (l = l.w + (m >> l.b) * p; m < n; ) {\n B = E;\n C = l;\n N = new Jd();\n v = u + y;\n for (z = u + r; u < v; )\n dc(B[C++], N), Fb(N, t, u, q, k, h), (u += q), (h += q);\n u < z &&\n (dc(B[C++], N), Fb(N, t, u, A, k, h), (u += A), (h += A));\n ++m;\n m & w || (l += p);\n }\n break;\n case 3:\n if (r == k && q == h && 0 < l.b) {\n y = (n - m) * xa(l.Ea, l.b);\n t = h + (n - m) * t - y;\n u = k;\n r = t;\n q = k;\n w = h;\n A = y;\n p = [];\n for (y = A - 1; 0 <= y; --y) p[y] = q[w + y];\n for (y = A - 1; 0 <= y; --y) u[r + y] = p[y];\n rc(l, m, n, k, t, k, h);\n } else rc(l, m, n, r, q, k, h);\n }\n h = d;\n k = c;\n }\n k != c && I(d, c, h, k, f);\n }\n function ge(a, b) {\n var c = a.V,\n d = a.Ba + a.c * a.C,\n e = b - a.C;\n x(b <= a.l.o);\n x(16 >= e);\n if (0 < e) {\n var f = a.l,\n g = a.Ta,\n h = a.Ua,\n k = f.width;\n oc(a, e, c, d);\n h = [h];\n c = a.C;\n d = b;\n e = h;\n x(c < d);\n x(f.v < f.va);\n d > f.o && (d = f.o);\n if (c < f.j) {\n var l = f.j - c,\n c = f.j;\n e[0] += l * k;\n }\n c >= d\n ? (c = 0)\n : ((e[0] += 4 * f.v),\n (f.ka = c - f.j),\n (f.U = f.va - f.v),\n (f.T = d - c),\n (c = 1));\n if (c) {\n h = h[0];\n c = a.ca;\n if (11 > c.S) {\n for (\n var m = c.f.RGBA,\n d = c.S,\n e = f.U,\n f = f.T,\n l = m.eb,\n n = m.A,\n r = f,\n m = m.fb + a.Ma * m.A;\n 0 < r--;\n\n ) {\n var q = g,\n t = h,\n v = e,\n p = l,\n u = m;\n switch (d) {\n case Ca:\n sc(q, t, v, p, u);\n break;\n case Ua:\n Gb(q, t, v, p, u);\n break;\n case zb:\n Gb(q, t, v, p, u);\n za(p, u, 0, v, 1, 0);\n break;\n case tc:\n uc(q, t, v, p, u);\n break;\n case Va:\n fb(q, t, v, p, u, 1);\n break;\n case Ab:\n fb(q, t, v, p, u, 1);\n za(p, u, 0, v, 1, 0);\n break;\n case ya:\n fb(q, t, v, p, u, 0);\n break;\n case Ja:\n fb(q, t, v, p, u, 0);\n za(p, u, 1, v, 1, 0);\n break;\n case Db:\n Hb(q, t, v, p, u);\n break;\n case Bb:\n Hb(q, t, v, p, u);\n vc(p, u, v, 1, 0);\n break;\n case wc:\n xc(q, t, v, p, u);\n break;\n default:\n x(0);\n }\n h += k;\n m += n;\n }\n a.Ma += f;\n } else alert(\"todo:EmitRescaledRowsYUVA\");\n x(a.Ma <= c.height);\n }\n }\n a.C = b;\n x(a.C <= a.i);\n }\n function yc(a) {\n var b;\n if (0 < a.ua) return 0;\n for (b = 0; b < a.Wb; ++b) {\n var c = a.Ya[b].G,\n d = a.Ya[b].H;\n if (\n 0 < c[1][d[1] + 0].g ||\n 0 < c[2][d[2] + 0].g ||\n 0 < c[3][d[3] + 0].g\n )\n return 0;\n }\n return 1;\n }\n function zc(a, b, c, d, e, f) {\n if (0 != a.Z) {\n var g = a.qd,\n h = a.rd;\n for (x(null != ia[a.Z]); b < c; ++b)\n ia[a.Z](g, h, d, e, d, e, f), (g = d), (h = e), (e += f);\n a.qd = g;\n a.rd = h;\n }\n }\n function Ib(a, b) {\n var c = a.l.ma,\n d = 0 == c.Z || 1 == c.Z ? a.l.j : a.C,\n d = a.C < d ? d : a.C;\n x(b <= a.l.o);\n if (b > d) {\n var e = a.l.width,\n f = c.ca,\n g = c.tb + e * d,\n h = a.V,\n k = a.Ba + a.c * d,\n l = a.gc;\n x(1 == a.ab);\n x(3 == l[0].hc);\n he(l[0], d, b, h, k, f, g);\n zc(c, d, b, f, g, e);\n }\n a.C = a.Ma = b;\n }\n function Jb(a, b, c, d, e, f, g) {\n var h = a.$ / d,\n k = a.$ % d,\n l = a.m,\n m = a.s,\n n = c + a.$,\n r = n;\n e = c + d * e;\n var q = c + d * f,\n t = 280 + m.ua,\n v = a.Pb ? h : 16777216,\n p = 0 < m.ua ? m.Wa : null,\n u = m.wc,\n w = n < q ? ha(m, k, h) : null;\n x(a.C < f);\n x(q <= e);\n var y = !1;\n a: for (;;) {\n for (; y || n < q; ) {\n var A = 0;\n if (h >= v) {\n var v = a,\n E = n - c;\n x(v.Pb);\n v.wd = v.m;\n v.xd = E;\n 0 < v.s.ua && $b(v.s.Wa, v.s.vb);\n v = h + ie;\n }\n k & u || (w = ha(m, k, h));\n x(null != w);\n w.Qb && ((b[n] = w.qb), (y = !0));\n if (!y)\n if ((Sa(l), w.jc)) {\n var A = l,\n E = b,\n B = n,\n C = w.pd[pb(A) & (xb - 1)];\n x(w.jc);\n 256 > C.g\n ? (qb(A, A.u + C.g), (E[B] = C.value), (A = 0))\n : (qb(A, A.u + C.g - 256), x(256 <= C.value), (A = C.value));\n 0 == A && (y = !0);\n } else A = ua(w.G[0], w.H[0], l);\n if (l.h) break;\n if (y || 256 > A) {\n if (!y)\n if (w.nd) b[n] = (w.qb | (A << 8)) >>> 0;\n else {\n Sa(l);\n y = ua(w.G[1], w.H[1], l);\n Sa(l);\n E = ua(w.G[2], w.H[2], l);\n B = ua(w.G[3], w.H[3], l);\n if (l.h) break;\n b[n] = ((B << 24) | (y << 16) | (A << 8) | E) >>> 0;\n }\n y = !1;\n ++n;\n ++k;\n if (\n k >= d &&\n ((k = 0),\n ++h,\n null != g && h <= f && !(h % 16) && g(a, h),\n null != p)\n )\n for (; r < n; )\n (A = b[r++]),\n (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n } else if (280 > A) {\n A = ib(A - 256, l);\n E = ua(w.G[4], w.H[4], l);\n Sa(l);\n E = ib(E, l);\n E = nc(d, E);\n if (l.h) break;\n if (n - c < E || e - n < A) break a;\n else for (B = 0; B < A; ++B) b[n + B] = b[n + B - E];\n n += A;\n for (k += A; k >= d; )\n (k -= d), ++h, null != g && h <= f && !(h % 16) && g(a, h);\n x(n <= e);\n k & u && (w = ha(m, k, h));\n if (null != p)\n for (; r < n; )\n (A = b[r++]),\n (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n } else if (A < t) {\n y = A - 280;\n for (x(null != p); r < n; )\n (A = b[r++]), (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n A = n;\n E = p;\n x(!(y >>> E.Xa));\n b[A] = E.X[y];\n y = !0;\n } else break a;\n y || x(l.h == db(l));\n }\n if (a.Pb && l.h && n < e)\n x(a.m.h),\n (a.a = 5),\n (a.m = a.wd),\n (a.$ = a.xd),\n 0 < a.s.ua && $b(a.s.vb, a.s.Wa);\n else if (l.h) break a;\n else null != g && g(a, h > f ? f : h), (a.a = 0), (a.$ = n - c);\n return 1;\n }\n a.a = 3;\n return 0;\n }\n function Ac(a) {\n x(null != a);\n a.vc = null;\n a.yc = null;\n a.Ya = null;\n var b = a.Wa;\n null != b && (b.X = null);\n a.vb = null;\n x(null != a);\n }\n function Bc() {\n var a = new je();\n if (null == a) return null;\n a.a = 0;\n a.xb = Cc;\n gb(\"Predictor\", \"VP8LPredictors\");\n gb(\"Predictor\", \"VP8LPredictors_C\");\n gb(\"PredictorAdd\", \"VP8LPredictorsAdd\");\n gb(\"PredictorAdd\", \"VP8LPredictorsAdd_C\");\n pc = Kd;\n Fb = Ld;\n sc = Md;\n Gb = Nd;\n Hb = Od;\n xc = Pd;\n uc = Qd;\n self.VP8LMapColor32b = ke;\n self.VP8LMapColor8b = le;\n return a;\n }\n function rb(a, b, c, d, e) {\n var f = 1,\n g = [a],\n h = [b],\n k = d.m,\n l = d.s,\n m = null,\n n = 0;\n a: for (;;) {\n if (c)\n for (; f && D(k, 1); ) {\n var r = g,\n q = h,\n t = d,\n v = 1,\n p = t.m,\n u = t.gc[t.ab],\n w = D(p, 2);\n if (t.Oc & (1 << w)) f = 0;\n else {\n t.Oc |= 1 << w;\n u.hc = w;\n u.Ea = r[0];\n u.nc = q[0];\n u.K = [null];\n ++t.ab;\n x(4 >= t.ab);\n switch (w) {\n case 0:\n case 1:\n u.b = D(p, 3) + 2;\n v = rb(xa(u.Ea, u.b), xa(u.nc, u.b), 0, t, u.K);\n u.K = u.K[0];\n break;\n case 3:\n var y = D(p, 8) + 1,\n A = 16 < y ? 0 : 4 < y ? 1 : 2 < y ? 2 : 3;\n r[0] = xa(u.Ea, A);\n u.b = A;\n var v = rb(y, 1, 0, t, u.K),\n E;\n if ((E = v)) {\n var B,\n C = y,\n N = u,\n z = 1 << (8 >> N.b),\n Q = V(z);\n if (null == Q) E = 0;\n else {\n var S = N.K[0],\n K = N.w;\n Q[0] = N.K[0][0];\n for (B = 1; B < 1 * C; ++B) Q[B] = yb(S[K + B], Q[B - 1]);\n for (; B < 4 * z; ++B) Q[B] = 0;\n N.K[0] = null;\n N.K[0] = Q;\n E = 1;\n }\n }\n v = E;\n break;\n case 2:\n break;\n default:\n x(0);\n }\n f = v;\n }\n }\n g = g[0];\n h = h[0];\n if (f && D(k, 1) && ((n = D(k, 4)), (f = 1 <= n && 11 >= n), !f)) {\n d.a = 3;\n break a;\n }\n var H;\n if ((H = f))\n b: {\n var F = d,\n G = g,\n L = h,\n J = n,\n T = c,\n Da,\n ba,\n X = F.m,\n R = F.s,\n P = [null],\n U,\n W = 1,\n aa = 0,\n na = me[J];\n c: for (;;) {\n if (T && D(X, 1)) {\n var ca = D(X, 3) + 2,\n ga = xa(G, ca),\n ka = xa(L, ca),\n qa = ga * ka;\n if (!rb(ga, ka, 0, F, P)) break c;\n P = P[0];\n R.xc = ca;\n for (Da = 0; Da < qa; ++Da) {\n var ia = (P[Da] >> 8) & 65535;\n P[Da] = ia;\n ia >= W && (W = ia + 1);\n }\n }\n if (X.h) break c;\n for (ba = 0; 5 > ba; ++ba) {\n var Y = Dc[ba];\n !ba && 0 < J && (Y += 1 << J);\n aa < Y && (aa = Y);\n }\n var ma = wa(W * na, O);\n var ua = W,\n va = wa(ua, Ub);\n if (null == va) var la = null;\n else x(65536 >= ua), (la = va);\n var ha = V(aa);\n if (null == la || null == ha || null == ma) {\n F.a = 1;\n break c;\n }\n var pa = ma;\n for (Da = U = 0; Da < W; ++Da) {\n var ja = la[Da],\n da = ja.G,\n ea = ja.H,\n Fa = 0,\n ra = 1,\n Ha = 0;\n for (ba = 0; 5 > ba; ++ba) {\n Y = Dc[ba];\n da[ba] = pa;\n ea[ba] = U;\n !ba && 0 < J && (Y += 1 << J);\n d: {\n var sa,\n za = Y,\n ta = F,\n oa = ha,\n db = pa,\n eb = U,\n Ia = 0,\n Ka = ta.m,\n fb = D(Ka, 1);\n M(oa, 0, 0, za);\n if (fb) {\n var gb = D(Ka, 1) + 1,\n hb = D(Ka, 1),\n Ja = D(Ka, 0 == hb ? 1 : 8);\n oa[Ja] = 1;\n 2 == gb && ((Ja = D(Ka, 8)), (oa[Ja] = 1));\n var ya = 1;\n } else {\n var Ua = V(19),\n Va = D(Ka, 4) + 4;\n if (19 < Va) {\n ta.a = 3;\n var Aa = 0;\n break d;\n }\n for (sa = 0; sa < Va; ++sa) Ua[ne[sa]] = D(Ka, 3);\n var Ba = void 0,\n sb = void 0,\n Wa = ta,\n ib = Ua,\n Ca = za,\n Xa = oa,\n Oa = 0,\n La = Wa.m,\n Ya = 8,\n Za = wa(128, O);\n e: for (;;) {\n if (!Z(Za, 0, 7, ib, 19)) break e;\n if (D(La, 1)) {\n var kb = 2 + 2 * D(La, 3),\n Ba = 2 + D(La, kb);\n if (Ba > Ca) break e;\n } else Ba = Ca;\n for (sb = 0; sb < Ca && Ba--; ) {\n Sa(La);\n var $a = Za[0 + (pb(La) & 127)];\n qb(La, La.u + $a.g);\n var jb = $a.value;\n if (16 > jb) (Xa[sb++] = jb), 0 != jb && (Ya = jb);\n else {\n var lb = 16 == jb,\n ab = jb - 16,\n mb = oe[ab],\n bb = D(La, pe[ab]) + mb;\n if (sb + bb > Ca) break e;\n else\n for (var nb = lb ? Ya : 0; 0 < bb--; )\n Xa[sb++] = nb;\n }\n }\n Oa = 1;\n break e;\n }\n Oa || (Wa.a = 3);\n ya = Oa;\n }\n (ya = ya && !Ka.h) && (Ia = Z(db, eb, 8, oa, za));\n ya && 0 != Ia ? (Aa = Ia) : ((ta.a = 3), (Aa = 0));\n }\n if (0 == Aa) break c;\n ra && 1 == qe[ba] && (ra = 0 == pa[U].g);\n Fa += pa[U].g;\n U += Aa;\n if (3 >= ba) {\n var Pa = ha[0],\n tb;\n for (tb = 1; tb < Y; ++tb) ha[tb] > Pa && (Pa = ha[tb]);\n Ha += Pa;\n }\n }\n ja.nd = ra;\n ja.Qb = 0;\n ra &&\n ((ja.qb =\n ((da[3][ea[3] + 0].value << 24) |\n (da[1][ea[1] + 0].value << 16) |\n da[2][ea[2] + 0].value) >>>\n 0),\n 0 == Fa &&\n 256 > da[0][ea[0] + 0].value &&\n ((ja.Qb = 1), (ja.qb += da[0][ea[0] + 0].value << 8)));\n ja.jc = !ja.Qb && 6 > Ha;\n if (ja.jc) {\n var Ga,\n Ea = ja;\n for (Ga = 0; Ga < xb; ++Ga) {\n var Ma = Ga,\n Na = Ea.pd[Ma],\n vb = Ea.G[0][Ea.H[0] + Ma];\n 256 <= vb.value\n ? ((Na.g = vb.g + 256), (Na.value = vb.value))\n : ((Na.g = 0),\n (Na.value = 0),\n (Ma >>= ub(vb, 8, Na)),\n (Ma >>= ub(Ea.G[1][Ea.H[1] + Ma], 16, Na)),\n (Ma >>= ub(Ea.G[2][Ea.H[2] + Ma], 0, Na)),\n ub(Ea.G[3][Ea.H[3] + Ma], 24, Na));\n }\n }\n }\n R.vc = P;\n R.Wb = W;\n R.Ya = la;\n R.yc = ma;\n H = 1;\n break b;\n }\n H = 0;\n }\n f = H;\n if (!f) {\n d.a = 3;\n break a;\n }\n if (0 < n) {\n if (((l.ua = 1 << n), !Zb(l.Wa, n))) {\n d.a = 1;\n f = 0;\n break a;\n }\n } else l.ua = 0;\n var Qa = d,\n cb = g,\n ob = h,\n Ra = Qa.s,\n Ta = Ra.xc;\n Qa.c = cb;\n Qa.i = ob;\n Ra.md = xa(cb, Ta);\n Ra.wc = 0 == Ta ? -1 : (1 << Ta) - 1;\n if (c) {\n d.xb = re;\n break a;\n }\n m = V(g * h);\n if (null == m) {\n d.a = 1;\n f = 0;\n break a;\n }\n f = (f = Jb(d, m, 0, g, h, h, null)) && !k.h;\n break a;\n }\n f\n ? (null != e ? (e[0] = m) : (x(null == m), x(c)), (d.$ = 0), c || Ac(l))\n : Ac(l);\n return f;\n }\n function Ec(a, b) {\n var c = a.c * a.i,\n d = c + b + 16 * b;\n x(a.c <= b);\n a.V = V(d);\n if (null == a.V) return (a.Ta = null), (a.Ua = 0), (a.a = 1), 0;\n a.Ta = a.V;\n a.Ua = a.Ba + c + b;\n return 1;\n }\n function se(a, b) {\n var c = a.C,\n d = b - c,\n e = a.V,\n f = a.Ba + a.c * c;\n for (x(b <= a.l.o); 0 < d; ) {\n var g = 16 < d ? 16 : d,\n h = a.l.ma,\n k = a.l.width,\n l = k * g,\n m = h.ca,\n n = h.tb + k * c,\n r = a.Ta,\n q = a.Ua;\n oc(a, g, e, f);\n Fc(r, q, m, n, l);\n zc(h, c, c + g, m, n, k);\n d -= g;\n e += g * a.c;\n c += g;\n }\n x(c == b);\n a.C = a.Ma = b;\n }\n function te(a, b) {\n var c = [0],\n d = [0],\n e = [0];\n a: for (;;) {\n if (null == a) return 0;\n if (null == b) return (a.a = 2), 0;\n a.l = b;\n a.a = 0;\n cb(a.m, b.data, b.w, b.ha);\n if (!mc(a.m, c, d, e)) {\n a.a = 3;\n break a;\n }\n a.xb = Cc;\n b.width = c[0];\n b.height = d[0];\n if (!rb(c[0], d[0], 1, a, null)) break a;\n return 1;\n }\n x(0 != a.a);\n return 0;\n }\n function ue() {\n this.ub = this.yd = this.td = this.Rb = 0;\n }\n function ve() {\n this.Kd = this.Ld = this.Ud = this.Td = this.i = this.c = 0;\n }\n function we() {\n this.Fb = this.Bb = this.Cb = 0;\n this.Zb = V(4);\n this.Lb = V(4);\n }\n function Gc() {\n this.Yb = wb();\n }\n function xe() {\n this.jb = V(3);\n this.Wc = Ed([4, 8], Gc);\n this.Xc = Ed([4, 17], Gc);\n }\n function ye() {\n this.Pc = this.wb = this.Tb = this.zd = 0;\n this.vd = new V(4);\n this.od = new V(4);\n }\n function Xa() {\n this.ld = this.La = this.dd = this.tc = 0;\n }\n function Hc() {\n this.Na = this.la = 0;\n }\n function ze() {\n this.Sc = [0, 0];\n this.Eb = [0, 0];\n this.Qc = [0, 0];\n this.ia = this.lc = 0;\n }\n function Kb() {\n this.ad = V(384);\n this.Za = 0;\n this.Ob = V(16);\n this.$b = this.Ad = this.ia = this.Gc = this.Hc = this.Dd = 0;\n }\n function Ae() {\n this.uc = this.M = this.Nb = 0;\n this.wa = Array(new Xa());\n this.Y = 0;\n this.ya = Array(new Kb());\n this.aa = 0;\n this.l = new Oa();\n }\n function Ic() {\n this.y = V(16);\n this.f = V(8);\n this.ea = V(8);\n }\n function Be() {\n this.cb = this.a = 0;\n this.sc = \"\";\n this.m = new Wb();\n this.Od = new ue();\n this.Kc = new ve();\n this.ed = new ye();\n this.Qa = new we();\n this.Ic = this.$c = this.Aa = 0;\n this.D = new Ae();\n this.Xb = this.Va = this.Hb = this.zb = this.yb = this.Ub = this.za = 0;\n this.Jc = wa(8, Wb);\n this.ia = 0;\n new F();\n this.pb = wa(4, ze);\n this.Pa = new xe();\n this.Bd = this.kc = 0;\n this.Ac = [];\n this.Bc = 0;\n this.zc = [0, 0, 0, 0];\n this.Gd = Array(new Ic());\n this.Hd = 0;\n this.rb = Array(new Hc());\n this.sb = 0;\n this.wa = Array(new Xa());\n this.Y = 0;\n this.oc = [];\n this.pc = 0;\n this.sa = [];\n this.ta = 0;\n this.qa = [];\n this.ra = 0;\n this.Ha = [];\n this.B = this.R = this.Ia = 0;\n this.Ec = [];\n this.M = this.ja = this.Vb = this.Fc = 0;\n this.ya = Array(new Kb());\n this.L = this.aa = 0;\n this.gd = Ed([4, 2], Xa);\n this.ga = null;\n this.Fa = [];\n this.Cc = this.qc = this.P = 0;\n this.Gb = [];\n this.Uc = 0;\n this.mb = [];\n this.nb = 0;\n this.rc = [];\n this.Ga = this.Vc = 0;\n }\n function ga(a, b) {\n return 0 > a ? 0 : a > b ? b : a;\n }\n function Oa() {\n this.T = this.U = this.ka = this.height = this.width = 0;\n this.y = [];\n this.f = [];\n this.ea = [];\n this.Rc = this.fa = this.W = this.N = this.O = 0;\n this.ma = \"void\";\n this.put = \"VP8IoPutHook\";\n this.ac = \"VP8IoSetupHook\";\n this.bc = \"VP8IoTeardownHook\";\n this.ha = this.Kb = 0;\n this.data = [];\n this.hb = this.ib = this.da = this.o = this.j = this.va = this.v = this.Da = this.ob = this.w = 0;\n this.F = [];\n this.J = 0;\n }\n function Ce() {\n var a = new Be();\n null != a &&\n ((a.a = 0), (a.sc = \"OK\"), (a.cb = 0), (a.Xb = 0), oa || (oa = De));\n return a;\n }\n function T(a, b, c) {\n 0 == a.a && ((a.a = b), (a.sc = c), (a.cb = 0));\n return 0;\n }\n function Jc(a, b, c) {\n return 3 <= c && 157 == a[b + 0] && 1 == a[b + 1] && 42 == a[b + 2];\n }\n function Kc(a, b) {\n if (null == a) return 0;\n a.a = 0;\n a.sc = \"OK\";\n if (null == b) return T(a, 2, \"null VP8Io passed to VP8GetHeaders()\");\n var c = b.data;\n var d = b.w;\n var e = b.ha;\n if (4 > e) return T(a, 7, \"Truncated header.\");\n var f = c[d + 0] | (c[d + 1] << 8) | (c[d + 2] << 16);\n var g = a.Od;\n g.Rb = !(f & 1);\n g.td = (f >> 1) & 7;\n g.yd = (f >> 4) & 1;\n g.ub = f >> 5;\n if (3 < g.td) return T(a, 3, \"Incorrect keyframe parameters.\");\n if (!g.yd) return T(a, 4, \"Frame not displayable.\");\n d += 3;\n e -= 3;\n var h = a.Kc;\n if (g.Rb) {\n if (7 > e) return T(a, 7, \"cannot parse picture header\");\n if (!Jc(c, d, e)) return T(a, 3, \"Bad code word\");\n h.c = ((c[d + 4] << 8) | c[d + 3]) & 16383;\n h.Td = c[d + 4] >> 6;\n h.i = ((c[d + 6] << 8) | c[d + 5]) & 16383;\n h.Ud = c[d + 6] >> 6;\n d += 7;\n e -= 7;\n a.za = (h.c + 15) >> 4;\n a.Ub = (h.i + 15) >> 4;\n b.width = h.c;\n b.height = h.i;\n b.Da = 0;\n b.j = 0;\n b.v = 0;\n b.va = b.width;\n b.o = b.height;\n b.da = 0;\n b.ib = b.width;\n b.hb = b.height;\n b.U = b.width;\n b.T = b.height;\n f = a.Pa;\n M(f.jb, 0, 255, f.jb.length);\n f = a.Qa;\n x(null != f);\n f.Cb = 0;\n f.Bb = 0;\n f.Fb = 1;\n M(f.Zb, 0, 0, f.Zb.length);\n M(f.Lb, 0, 0, f.Lb);\n }\n if (g.ub > e) return T(a, 7, \"bad partition length\");\n f = a.m;\n ma(f, c, d, g.ub);\n d += g.ub;\n e -= g.ub;\n g.Rb && ((h.Ld = G(f)), (h.Kd = G(f)));\n h = a.Qa;\n var k = a.Pa,\n l;\n x(null != f);\n x(null != h);\n h.Cb = G(f);\n if (h.Cb) {\n h.Bb = G(f);\n if (G(f)) {\n h.Fb = G(f);\n for (l = 0; 4 > l; ++l) h.Zb[l] = G(f) ? ca(f, 7) : 0;\n for (l = 0; 4 > l; ++l) h.Lb[l] = G(f) ? ca(f, 6) : 0;\n }\n if (h.Bb) for (l = 0; 3 > l; ++l) k.jb[l] = G(f) ? na(f, 8) : 255;\n } else h.Bb = 0;\n if (f.Ka) return T(a, 3, \"cannot parse segment header\");\n h = a.ed;\n h.zd = G(f);\n h.Tb = na(f, 6);\n h.wb = na(f, 3);\n h.Pc = G(f);\n if (h.Pc && G(f)) {\n for (k = 0; 4 > k; ++k) G(f) && (h.vd[k] = ca(f, 6));\n for (k = 0; 4 > k; ++k) G(f) && (h.od[k] = ca(f, 6));\n }\n a.L = 0 == h.Tb ? 0 : h.zd ? 1 : 2;\n if (f.Ka) return T(a, 3, \"cannot parse filter header\");\n l = d;\n var m = e;\n e = l;\n d = l + m;\n h = m;\n a.Xb = (1 << na(a.m, 2)) - 1;\n k = a.Xb;\n if (m < 3 * k) c = 7;\n else {\n l += 3 * k;\n h -= 3 * k;\n for (m = 0; m < k; ++m) {\n var n = c[e + 0] | (c[e + 1] << 8) | (c[e + 2] << 16);\n n > h && (n = h);\n ma(a.Jc[+m], c, l, n);\n l += n;\n h -= n;\n e += 3;\n }\n ma(a.Jc[+k], c, l, h);\n c = l < d ? 0 : 5;\n }\n if (0 != c) return T(a, c, \"cannot parse partitions\");\n l = a.m;\n c = na(l, 7);\n e = G(l) ? ca(l, 4) : 0;\n d = G(l) ? ca(l, 4) : 0;\n h = G(l) ? ca(l, 4) : 0;\n k = G(l) ? ca(l, 4) : 0;\n l = G(l) ? ca(l, 4) : 0;\n m = a.Qa;\n for (n = 0; 4 > n; ++n) {\n if (m.Cb) {\n var r = m.Zb[n];\n m.Fb || (r += c);\n } else if (0 < n) {\n a.pb[n] = a.pb[0];\n continue;\n } else r = c;\n var q = a.pb[n];\n q.Sc[0] = Lb[ga(r + e, 127)];\n q.Sc[1] = Mb[ga(r + 0, 127)];\n q.Eb[0] = 2 * Lb[ga(r + d, 127)];\n q.Eb[1] = (101581 * Mb[ga(r + h, 127)]) >> 16;\n 8 > q.Eb[1] && (q.Eb[1] = 8);\n q.Qc[0] = Lb[ga(r + k, 117)];\n q.Qc[1] = Mb[ga(r + l, 127)];\n q.lc = r + l;\n }\n if (!g.Rb) return T(a, 4, \"Not a key frame.\");\n G(f);\n g = a.Pa;\n for (c = 0; 4 > c; ++c) {\n for (e = 0; 8 > e; ++e)\n for (d = 0; 3 > d; ++d)\n for (h = 0; 11 > h; ++h)\n (k = K(f, Ee[c][e][d][h]) ? na(f, 8) : Fe[c][e][d][h]),\n (g.Wc[c][e].Yb[d][h] = k);\n for (e = 0; 17 > e; ++e) g.Xc[c][e] = g.Wc[c][Ge[e]];\n }\n a.kc = G(f);\n a.kc && (a.Bd = na(f, 8));\n return (a.cb = 1);\n }\n function De(a, b, c, d, e, f, g) {\n var h = b[e].Yb[c];\n for (c = 0; 16 > e; ++e) {\n if (!K(a, h[c + 0])) return e;\n for (; !K(a, h[c + 1]); )\n if (((h = b[++e].Yb[0]), (c = 0), 16 == e)) return 16;\n var k = b[e + 1].Yb;\n if (K(a, h[c + 2])) {\n var l = a,\n m = h,\n n = c;\n var r = 0;\n if (K(l, m[n + 3]))\n if (K(l, m[n + 6])) {\n h = 0;\n r = K(l, m[n + 8]);\n m = K(l, m[n + 9 + r]);\n n = 2 * r + m;\n r = 0;\n for (m = He[n]; m[h]; ++h) r += r + K(l, m[h]);\n r += 3 + (8 << n);\n } else\n K(l, m[n + 7])\n ? ((r = 7 + 2 * K(l, 165)), (r += K(l, 145)))\n : (r = 5 + K(l, 159));\n else K(l, m[n + 4]) ? (r = 3 + K(l, m[n + 5])) : (r = 2);\n h = k[2];\n } else (r = 1), (h = k[1]);\n k = g + Ie[e];\n l = a;\n 0 > l.b && Qa(l);\n var m = l.b,\n n = l.Ca >> 1,\n q = (n - (l.I >> m)) >> 31;\n --l.b;\n l.Ca += q;\n l.Ca |= 1;\n l.I -= ((n + 1) & q) << m;\n f[k] = ((r ^ q) - q) * d[(0 < e) + 0];\n }\n return 16;\n }\n function Lc(a) {\n var b = a.rb[a.sb - 1];\n b.la = 0;\n b.Na = 0;\n M(a.zc, 0, 0, a.zc.length);\n a.ja = 0;\n }\n function Je(a, b) {\n for (a.M = 0; a.M < a.Va; ++a.M) {\n var c = a.Jc[a.M & a.Xb],\n d = a.m,\n e = a,\n f;\n for (f = 0; f < e.za; ++f) {\n var g = d;\n var h = e;\n var k = h.Ac,\n l = h.Bc + 4 * f,\n m = h.zc,\n n = h.ya[h.aa + f];\n h.Qa.Bb\n ? (n.$b = K(g, h.Pa.jb[0])\n ? 2 + K(g, h.Pa.jb[2])\n : K(g, h.Pa.jb[1]))\n : (n.$b = 0);\n h.kc && (n.Ad = K(g, h.Bd));\n n.Za = !K(g, 145) + 0;\n if (n.Za) {\n var r = n.Ob,\n q = 0;\n for (h = 0; 4 > h; ++h) {\n var t = m[0 + h];\n var v;\n for (v = 0; 4 > v; ++v) {\n t = Ke[k[l + v]][t];\n for (var p = Mc[K(g, t[0])]; 0 < p; )\n p = Mc[2 * p + K(g, t[p])];\n t = -p;\n k[l + v] = t;\n }\n I(r, q, k, l, 4);\n q += 4;\n m[0 + h] = t;\n }\n } else\n (t = K(g, 156) ? (K(g, 128) ? 1 : 3) : K(g, 163) ? 2 : 0),\n (n.Ob[0] = t),\n M(k, l, t, 4),\n M(m, 0, t, 4);\n n.Dd = K(g, 142) ? (K(g, 114) ? (K(g, 183) ? 1 : 3) : 2) : 0;\n }\n if (e.m.Ka) return T(a, 7, \"Premature end-of-partition0 encountered.\");\n for (; a.ja < a.za; ++a.ja) {\n d = a;\n e = c;\n g = d.rb[d.sb - 1];\n k = d.rb[d.sb + d.ja];\n f = d.ya[d.aa + d.ja];\n if ((l = d.kc ? f.Ad : 0))\n (g.la = k.la = 0),\n f.Za || (g.Na = k.Na = 0),\n (f.Hc = 0),\n (f.Gc = 0),\n (f.ia = 0);\n else {\n var u,\n w,\n g = k,\n k = e,\n l = d.Pa.Xc,\n m = d.ya[d.aa + d.ja],\n n = d.pb[m.$b];\n h = m.ad;\n r = 0;\n q = d.rb[d.sb - 1];\n t = v = 0;\n M(h, r, 0, 384);\n if (m.Za) {\n var y = 0;\n var A = l[3];\n } else {\n p = V(16);\n var E = g.Na + q.Na;\n E = oa(k, l[1], E, n.Eb, 0, p, 0);\n g.Na = q.Na = (0 < E) + 0;\n if (1 < E) Nc(p, 0, h, r);\n else {\n var B = (p[0] + 3) >> 3;\n for (p = 0; 256 > p; p += 16) h[r + p] = B;\n }\n y = 1;\n A = l[0];\n }\n var C = g.la & 15;\n var N = q.la & 15;\n for (p = 0; 4 > p; ++p) {\n var z = N & 1;\n for (B = w = 0; 4 > B; ++B)\n (E = z + (C & 1)),\n (E = oa(k, A, E, n.Sc, y, h, r)),\n (z = E > y),\n (C = (C >> 1) | (z << 7)),\n (w = (w << 2) | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0])),\n (r += 16);\n C >>= 4;\n N = (N >> 1) | (z << 7);\n v = ((v << 8) | w) >>> 0;\n }\n A = C;\n y = N >> 4;\n for (u = 0; 4 > u; u += 2) {\n w = 0;\n C = g.la >> (4 + u);\n N = q.la >> (4 + u);\n for (p = 0; 2 > p; ++p) {\n z = N & 1;\n for (B = 0; 2 > B; ++B)\n (E = z + (C & 1)),\n (E = oa(k, l[2], E, n.Qc, 0, h, r)),\n (z = 0 < E),\n (C = (C >> 1) | (z << 3)),\n (w = (w << 2) | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0])),\n (r += 16);\n C >>= 2;\n N = (N >> 1) | (z << 5);\n }\n t |= w << (4 * u);\n A |= (C << 4) << u;\n y |= (N & 240) << u;\n }\n g.la = A;\n q.la = y;\n m.Hc = v;\n m.Gc = t;\n m.ia = t & 43690 ? 0 : n.ia;\n l = !(v | t);\n }\n 0 < d.L &&\n ((d.wa[d.Y + d.ja] = d.gd[f.$b][f.Za]),\n (d.wa[d.Y + d.ja].La |= !l));\n if (e.Ka) return T(a, 7, \"Premature end-of-file encountered.\");\n }\n Lc(a);\n c = a;\n d = b;\n e = 1;\n f = c.D;\n g = 0 < c.L && c.M >= c.zb && c.M <= c.Va;\n if (0 == c.Aa)\n a: {\n (f.M = c.M), (f.uc = g), Oc(c, f), (e = 1);\n w = c.D;\n f = w.Nb;\n t = Ya[c.L];\n g = t * c.R;\n k = (t / 2) * c.B;\n p = 16 * f * c.R;\n B = 8 * f * c.B;\n l = c.sa;\n m = c.ta - g + p;\n n = c.qa;\n h = c.ra - k + B;\n r = c.Ha;\n q = c.Ia - k + B;\n C = w.M;\n N = 0 == C;\n v = C >= c.Va - 1;\n 2 == c.Aa && Oc(c, w);\n if (w.uc)\n for (E = c, z = E.D.M, x(E.D.uc), w = E.yb; w < E.Hb; ++w) {\n var Q = E;\n y = w;\n A = z;\n var S = Q.D,\n D = S.Nb;\n u = Q.R;\n var S = S.wa[S.Y + y],\n F = Q.sa,\n H = Q.ta + 16 * D * u + 16 * y,\n J = S.dd,\n G = S.tc;\n if (0 != G)\n if ((x(3 <= G), 1 == Q.L))\n 0 < y && Pc(F, H, u, G + 4),\n S.La && Qc(F, H, u, G),\n 0 < A && Rc(F, H, u, G + 4),\n S.La && Sc(F, H, u, G);\n else {\n var L = Q.B,\n O = Q.qa,\n P = Q.ra + 8 * D * L + 8 * y,\n R = Q.Ha,\n Q = Q.Ia + 8 * D * L + 8 * y,\n D = S.ld;\n 0 < y &&\n (Tc(F, H, u, G + 4, J, D),\n Uc(O, P, R, Q, L, G + 4, J, D));\n S.La && (Vc(F, H, u, G, J, D), Wc(O, P, R, Q, L, G, J, D));\n 0 < A &&\n (Xc(F, H, u, G + 4, J, D),\n Yc(O, P, R, Q, L, G + 4, J, D));\n S.La && (Zc(F, H, u, G, J, D), $c(O, P, R, Q, L, G, J, D));\n }\n }\n c.ia && alert(\"todo:DitherRow\");\n if (null != d.put) {\n w = 16 * C;\n C = 16 * (C + 1);\n N\n ? ((d.y = c.sa),\n (d.O = c.ta + p),\n (d.f = c.qa),\n (d.N = c.ra + B),\n (d.ea = c.Ha),\n (d.W = c.Ia + B))\n : ((w -= t),\n (d.y = l),\n (d.O = m),\n (d.f = n),\n (d.N = h),\n (d.ea = r),\n (d.W = q));\n v || (C -= t);\n C > d.o && (C = d.o);\n d.F = null;\n d.J = null;\n if (\n null != c.Fa &&\n 0 < c.Fa.length &&\n w < C &&\n ((d.J = Le(c, d, w, C - w)),\n (d.F = c.mb),\n null == d.F && 0 == d.F.length)\n ) {\n e = T(c, 3, \"Could not decode alpha data.\");\n break a;\n }\n w < d.j &&\n ((t = d.j - w),\n (w = d.j),\n x(!(t & 1)),\n (d.O += c.R * t),\n (d.N += c.B * (t >> 1)),\n (d.W += c.B * (t >> 1)),\n null != d.F && (d.J += d.width * t));\n w < C &&\n ((d.O += d.v),\n (d.N += d.v >> 1),\n (d.W += d.v >> 1),\n null != d.F && (d.J += d.v),\n (d.ka = w - d.j),\n (d.U = d.va - d.v),\n (d.T = C - w),\n (e = d.put(d)));\n }\n f + 1 != c.Ic ||\n v ||\n (I(c.sa, c.ta - g, l, m + 16 * c.R, g),\n I(c.qa, c.ra - k, n, h + 8 * c.B, k),\n I(c.Ha, c.Ia - k, r, q + 8 * c.B, k));\n }\n if (!e) return T(a, 6, \"Output aborted.\");\n }\n return 1;\n }\n function Me(a, b) {\n if (null == a) return 0;\n if (null == b) return T(a, 2, \"NULL VP8Io parameter in VP8Decode().\");\n if (!a.cb && !Kc(a, b)) return 0;\n x(a.cb);\n if (null == b.ac || b.ac(b)) {\n b.ob && (a.L = 0);\n var c = Ya[a.L];\n 2 == a.L\n ? ((a.yb = 0), (a.zb = 0))\n : ((a.yb = (b.v - c) >> 4),\n (a.zb = (b.j - c) >> 4),\n 0 > a.yb && (a.yb = 0),\n 0 > a.zb && (a.zb = 0));\n a.Va = (b.o + 15 + c) >> 4;\n a.Hb = (b.va + 15 + c) >> 4;\n a.Hb > a.za && (a.Hb = a.za);\n a.Va > a.Ub && (a.Va = a.Ub);\n if (0 < a.L) {\n var d = a.ed;\n for (c = 0; 4 > c; ++c) {\n var e;\n if (a.Qa.Cb) {\n var f = a.Qa.Lb[c];\n a.Qa.Fb || (f += d.Tb);\n } else f = d.Tb;\n for (e = 0; 1 >= e; ++e) {\n var g = a.gd[c][e],\n h = f;\n d.Pc && ((h += d.vd[0]), e && (h += d.od[0]));\n h = 0 > h ? 0 : 63 < h ? 63 : h;\n if (0 < h) {\n var k = h;\n 0 < d.wb &&\n ((k = 4 < d.wb ? k >> 2 : k >> 1),\n k > 9 - d.wb && (k = 9 - d.wb));\n 1 > k && (k = 1);\n g.dd = k;\n g.tc = 2 * h + k;\n g.ld = 40 <= h ? 2 : 15 <= h ? 1 : 0;\n } else g.tc = 0;\n g.La = e;\n }\n }\n }\n c = 0;\n } else T(a, 6, \"Frame setup failed\"), (c = a.a);\n if ((c = 0 == c)) {\n if (c) {\n a.$c = 0;\n 0 < a.Aa || (a.Ic = Ne);\n b: {\n c = a.Ic;\n var k = a.za,\n d = 4 * k,\n l = 32 * k,\n m = k + 1,\n n = 0 < a.L ? k * (0 < a.Aa ? 2 : 1) : 0,\n r = (2 == a.Aa ? 2 : 1) * k;\n e = ((3 * (16 * c + Ya[a.L])) / 2) * l;\n f = null != a.Fa && 0 < a.Fa.length ? a.Kc.c * a.Kc.i : 0;\n g = d + 832 + e + f;\n if (g != g) c = 0;\n else {\n if (g > a.Vb) {\n a.Vb = 0;\n a.Ec = V(g);\n a.Fc = 0;\n if (null == a.Ec) {\n c = T(a, 1, \"no memory during frame initialization.\");\n break b;\n }\n a.Vb = g;\n }\n g = a.Ec;\n h = a.Fc;\n a.Ac = g;\n a.Bc = h;\n h += d;\n a.Gd = wa(l, Ic);\n a.Hd = 0;\n a.rb = wa(m + 1, Hc);\n a.sb = 1;\n a.wa = n ? wa(n, Xa) : null;\n a.Y = 0;\n a.D.Nb = 0;\n a.D.wa = a.wa;\n a.D.Y = a.Y;\n 0 < a.Aa && (a.D.Y += k);\n x(!0);\n a.oc = g;\n a.pc = h;\n h += 832;\n a.ya = wa(r, Kb);\n a.aa = 0;\n a.D.ya = a.ya;\n a.D.aa = a.aa;\n 2 == a.Aa && (a.D.aa += k);\n a.R = 16 * k;\n a.B = 8 * k;\n l = Ya[a.L];\n k = l * a.R;\n l = (l / 2) * a.B;\n a.sa = g;\n a.ta = h + k;\n a.qa = a.sa;\n a.ra = a.ta + 16 * c * a.R + l;\n a.Ha = a.qa;\n a.Ia = a.ra + 8 * c * a.B + l;\n a.$c = 0;\n h += e;\n a.mb = f ? g : null;\n a.nb = f ? h : null;\n x(h + f <= a.Fc + a.Vb);\n Lc(a);\n M(a.Ac, a.Bc, 0, d);\n c = 1;\n }\n }\n if (c) {\n b.ka = 0;\n b.y = a.sa;\n b.O = a.ta;\n b.f = a.qa;\n b.N = a.ra;\n b.ea = a.Ha;\n b.Vd = a.Ia;\n b.fa = a.R;\n b.Rc = a.B;\n b.F = null;\n b.J = 0;\n if (!ad) {\n for (c = -255; 255 >= c; ++c) bd[255 + c] = 0 > c ? -c : c;\n for (c = -1020; 1020 >= c; ++c)\n cd[1020 + c] = -128 > c ? -128 : 127 < c ? 127 : c;\n for (c = -112; 112 >= c; ++c)\n dd[112 + c] = -16 > c ? -16 : 15 < c ? 15 : c;\n for (c = -255; 510 >= c; ++c)\n ed[255 + c] = 0 > c ? 0 : 255 < c ? 255 : c;\n ad = 1;\n }\n Nc = Oe;\n Za = Pe;\n Nb = Qe;\n pa = Re;\n Ob = Se;\n fd = Te;\n Xc = Ue;\n Tc = Ve;\n Yc = We;\n Uc = Xe;\n Zc = Ye;\n Vc = Ze;\n $c = $e;\n Wc = af;\n Rc = gd;\n Pc = hd;\n Sc = bf;\n Qc = cf;\n W[0] = df;\n W[1] = ef;\n W[2] = ff;\n W[3] = gf;\n W[4] = hf;\n W[5] = jf;\n W[6] = kf;\n W[7] = lf;\n W[8] = mf;\n W[9] = nf;\n Y[0] = of;\n Y[1] = pf;\n Y[2] = qf;\n Y[3] = rf;\n Y[4] = sf;\n Y[5] = tf;\n Y[6] = uf;\n ka[0] = vf;\n ka[1] = wf;\n ka[2] = xf;\n ka[3] = yf;\n ka[4] = zf;\n ka[5] = Af;\n ka[6] = Bf;\n c = 1;\n } else c = 0;\n }\n c && (c = Je(a, b));\n null != b.bc && b.bc(b);\n c &= 1;\n }\n if (!c) return 0;\n a.cb = 0;\n return c;\n }\n function qa(a, b, c, d, e) {\n e = a[b + c + 32 * d] + (e >> 3);\n a[b + c + 32 * d] = e & -256 ? (0 > e ? 0 : 255) : e;\n }\n function kb(a, b, c, d, e, f) {\n qa(a, b, 0, c, d + e);\n qa(a, b, 1, c, d + f);\n qa(a, b, 2, c, d - f);\n qa(a, b, 3, c, d - e);\n }\n function da(a) {\n return ((20091 * a) >> 16) + a;\n }\n function id(a, b, c, d) {\n var e = 0,\n f;\n var g = V(16);\n for (f = 0; 4 > f; ++f) {\n var h = a[b + 0] + a[b + 8];\n var k = a[b + 0] - a[b + 8];\n var l = ((35468 * a[b + 4]) >> 16) - da(a[b + 12]);\n var m = da(a[b + 4]) + ((35468 * a[b + 12]) >> 16);\n g[e + 0] = h + m;\n g[e + 1] = k + l;\n g[e + 2] = k - l;\n g[e + 3] = h - m;\n e += 4;\n b++;\n }\n for (f = e = 0; 4 > f; ++f)\n (a = g[e + 0] + 4),\n (h = a + g[e + 8]),\n (k = a - g[e + 8]),\n (l = ((35468 * g[e + 4]) >> 16) - da(g[e + 12])),\n (m = da(g[e + 4]) + ((35468 * g[e + 12]) >> 16)),\n qa(c, d, 0, 0, h + m),\n qa(c, d, 1, 0, k + l),\n qa(c, d, 2, 0, k - l),\n qa(c, d, 3, 0, h - m),\n e++,\n (d += 32);\n }\n function Te(a, b, c, d) {\n var e = a[b + 0] + 4,\n f = (35468 * a[b + 4]) >> 16,\n g = da(a[b + 4]),\n h = (35468 * a[b + 1]) >> 16;\n a = da(a[b + 1]);\n kb(c, d, 0, e + g, a, h);\n kb(c, d, 1, e + f, a, h);\n kb(c, d, 2, e - f, a, h);\n kb(c, d, 3, e - g, a, h);\n }\n function Pe(a, b, c, d, e) {\n id(a, b, c, d);\n e && id(a, b + 16, c, d + 4);\n }\n function Qe(a, b, c, d) {\n Za(a, b + 0, c, d, 1);\n Za(a, b + 32, c, d + 128, 1);\n }\n function Re(a, b, c, d) {\n a = a[b + 0] + 4;\n var e;\n for (e = 0; 4 > e; ++e) for (b = 0; 4 > b; ++b) qa(c, d, b, e, a);\n }\n function Se(a, b, c, d) {\n a[b + 0] && pa(a, b + 0, c, d);\n a[b + 16] && pa(a, b + 16, c, d + 4);\n a[b + 32] && pa(a, b + 32, c, d + 128);\n a[b + 48] && pa(a, b + 48, c, d + 128 + 4);\n }\n function Oe(a, b, c, d) {\n var e = V(16),\n f;\n for (f = 0; 4 > f; ++f) {\n var g = a[b + 0 + f] + a[b + 12 + f];\n var h = a[b + 4 + f] + a[b + 8 + f];\n var k = a[b + 4 + f] - a[b + 8 + f];\n var l = a[b + 0 + f] - a[b + 12 + f];\n e[0 + f] = g + h;\n e[8 + f] = g - h;\n e[4 + f] = l + k;\n e[12 + f] = l - k;\n }\n for (f = 0; 4 > f; ++f)\n (a = e[0 + 4 * f] + 3),\n (g = a + e[3 + 4 * f]),\n (h = e[1 + 4 * f] + e[2 + 4 * f]),\n (k = e[1 + 4 * f] - e[2 + 4 * f]),\n (l = a - e[3 + 4 * f]),\n (c[d + 0] = (g + h) >> 3),\n (c[d + 16] = (l + k) >> 3),\n (c[d + 32] = (g - h) >> 3),\n (c[d + 48] = (l - k) >> 3),\n (d += 64);\n }\n function Pb(a, b, c) {\n var d = b - 32,\n e = R,\n f = 255 - a[d - 1],\n g;\n for (g = 0; g < c; ++g) {\n var h = e,\n k = f + a[b - 1],\n l;\n for (l = 0; l < c; ++l) a[b + l] = h[k + a[d + l]];\n b += 32;\n }\n }\n function ef(a, b) {\n Pb(a, b, 4);\n }\n function wf(a, b) {\n Pb(a, b, 8);\n }\n function pf(a, b) {\n Pb(a, b, 16);\n }\n function qf(a, b) {\n var c;\n for (c = 0; 16 > c; ++c) I(a, b + 32 * c, a, b - 32, 16);\n }\n function rf(a, b) {\n var c;\n for (c = 16; 0 < c; --c) M(a, b, a[b - 1], 16), (b += 32);\n }\n function $a(a, b, c) {\n var d;\n for (d = 0; 16 > d; ++d) M(b, c + 32 * d, a, 16);\n }\n function of(a, b) {\n var c = 16,\n d;\n for (d = 0; 16 > d; ++d) c += a[b - 1 + 32 * d] + a[b + d - 32];\n $a(c >> 5, a, b);\n }\n function sf(a, b) {\n var c = 8,\n d;\n for (d = 0; 16 > d; ++d) c += a[b - 1 + 32 * d];\n $a(c >> 4, a, b);\n }\n function tf(a, b) {\n var c = 8,\n d;\n for (d = 0; 16 > d; ++d) c += a[b + d - 32];\n $a(c >> 4, a, b);\n }\n function uf(a, b) {\n $a(128, a, b);\n }\n function z(a, b, c) {\n return (a + 2 * b + c + 2) >> 2;\n }\n function ff(a, b) {\n var c = b - 32,\n c = new Uint8Array([\n z(a[c - 1], a[c + 0], a[c + 1]),\n z(a[c + 0], a[c + 1], a[c + 2]),\n z(a[c + 1], a[c + 2], a[c + 3]),\n z(a[c + 2], a[c + 3], a[c + 4])\n ]),\n d;\n for (d = 0; 4 > d; ++d) I(a, b + 32 * d, c, 0, c.length);\n }\n function gf(a, b) {\n var c = a[b - 1],\n d = a[b - 1 + 32],\n e = a[b - 1 + 64],\n f = a[b - 1 + 96];\n ra(a, b + 0, 16843009 * z(a[b - 1 - 32], c, d));\n ra(a, b + 32, 16843009 * z(c, d, e));\n ra(a, b + 64, 16843009 * z(d, e, f));\n ra(a, b + 96, 16843009 * z(e, f, f));\n }\n function df(a, b) {\n var c = 4,\n d;\n for (d = 0; 4 > d; ++d) c += a[b + d - 32] + a[b - 1 + 32 * d];\n c >>= 3;\n for (d = 0; 4 > d; ++d) M(a, b + 32 * d, c, 4);\n }\n function hf(a, b) {\n var c = a[b - 1 + 0],\n d = a[b - 1 + 32],\n e = a[b - 1 + 64],\n f = a[b - 1 - 32],\n g = a[b + 0 - 32],\n h = a[b + 1 - 32],\n k = a[b + 2 - 32],\n l = a[b + 3 - 32];\n a[b + 0 + 96] = z(d, e, a[b - 1 + 96]);\n a[b + 1 + 96] = a[b + 0 + 64] = z(c, d, e);\n a[b + 2 + 96] = a[b + 1 + 64] = a[b + 0 + 32] = z(f, c, d);\n a[b + 3 + 96] = a[b + 2 + 64] = a[b + 1 + 32] = a[b + 0 + 0] = z(g, f, c);\n a[b + 3 + 64] = a[b + 2 + 32] = a[b + 1 + 0] = z(h, g, f);\n a[b + 3 + 32] = a[b + 2 + 0] = z(k, h, g);\n a[b + 3 + 0] = z(l, k, h);\n }\n function kf(a, b) {\n var c = a[b + 1 - 32],\n d = a[b + 2 - 32],\n e = a[b + 3 - 32],\n f = a[b + 4 - 32],\n g = a[b + 5 - 32],\n h = a[b + 6 - 32],\n k = a[b + 7 - 32];\n a[b + 0 + 0] = z(a[b + 0 - 32], c, d);\n a[b + 1 + 0] = a[b + 0 + 32] = z(c, d, e);\n a[b + 2 + 0] = a[b + 1 + 32] = a[b + 0 + 64] = z(d, e, f);\n a[b + 3 + 0] = a[b + 2 + 32] = a[b + 1 + 64] = a[b + 0 + 96] = z(e, f, g);\n a[b + 3 + 32] = a[b + 2 + 64] = a[b + 1 + 96] = z(f, g, h);\n a[b + 3 + 64] = a[b + 2 + 96] = z(g, h, k);\n a[b + 3 + 96] = z(h, k, k);\n }\n function jf(a, b) {\n var c = a[b - 1 + 0],\n d = a[b - 1 + 32],\n e = a[b - 1 + 64],\n f = a[b - 1 - 32],\n g = a[b + 0 - 32],\n h = a[b + 1 - 32],\n k = a[b + 2 - 32],\n l = a[b + 3 - 32];\n a[b + 0 + 0] = a[b + 1 + 64] = (f + g + 1) >> 1;\n a[b + 1 + 0] = a[b + 2 + 64] = (g + h + 1) >> 1;\n a[b + 2 + 0] = a[b + 3 + 64] = (h + k + 1) >> 1;\n a[b + 3 + 0] = (k + l + 1) >> 1;\n a[b + 0 + 96] = z(e, d, c);\n a[b + 0 + 64] = z(d, c, f);\n a[b + 0 + 32] = a[b + 1 + 96] = z(c, f, g);\n a[b + 1 + 32] = a[b + 2 + 96] = z(f, g, h);\n a[b + 2 + 32] = a[b + 3 + 96] = z(g, h, k);\n a[b + 3 + 32] = z(h, k, l);\n }\n function lf(a, b) {\n var c = a[b + 0 - 32],\n d = a[b + 1 - 32],\n e = a[b + 2 - 32],\n f = a[b + 3 - 32],\n g = a[b + 4 - 32],\n h = a[b + 5 - 32],\n k = a[b + 6 - 32],\n l = a[b + 7 - 32];\n a[b + 0 + 0] = (c + d + 1) >> 1;\n a[b + 1 + 0] = a[b + 0 + 64] = (d + e + 1) >> 1;\n a[b + 2 + 0] = a[b + 1 + 64] = (e + f + 1) >> 1;\n a[b + 3 + 0] = a[b + 2 + 64] = (f + g + 1) >> 1;\n a[b + 0 + 32] = z(c, d, e);\n a[b + 1 + 32] = a[b + 0 + 96] = z(d, e, f);\n a[b + 2 + 32] = a[b + 1 + 96] = z(e, f, g);\n a[b + 3 + 32] = a[b + 2 + 96] = z(f, g, h);\n a[b + 3 + 64] = z(g, h, k);\n a[b + 3 + 96] = z(h, k, l);\n }\n function nf(a, b) {\n var c = a[b - 1 + 0],\n d = a[b - 1 + 32],\n e = a[b - 1 + 64],\n f = a[b - 1 + 96];\n a[b + 0 + 0] = (c + d + 1) >> 1;\n a[b + 2 + 0] = a[b + 0 + 32] = (d + e + 1) >> 1;\n a[b + 2 + 32] = a[b + 0 + 64] = (e + f + 1) >> 1;\n a[b + 1 + 0] = z(c, d, e);\n a[b + 3 + 0] = a[b + 1 + 32] = z(d, e, f);\n a[b + 3 + 32] = a[b + 1 + 64] = z(e, f, f);\n a[b + 3 + 64] = a[b + 2 + 64] = a[b + 0 + 96] = a[b + 1 + 96] = a[\n b + 2 + 96\n ] = a[b + 3 + 96] = f;\n }\n function mf(a, b) {\n var c = a[b - 1 + 0],\n d = a[b - 1 + 32],\n e = a[b - 1 + 64],\n f = a[b - 1 + 96],\n g = a[b - 1 - 32],\n h = a[b + 0 - 32],\n k = a[b + 1 - 32],\n l = a[b + 2 - 32];\n a[b + 0 + 0] = a[b + 2 + 32] = (c + g + 1) >> 1;\n a[b + 0 + 32] = a[b + 2 + 64] = (d + c + 1) >> 1;\n a[b + 0 + 64] = a[b + 2 + 96] = (e + d + 1) >> 1;\n a[b + 0 + 96] = (f + e + 1) >> 1;\n a[b + 3 + 0] = z(h, k, l);\n a[b + 2 + 0] = z(g, h, k);\n a[b + 1 + 0] = a[b + 3 + 32] = z(c, g, h);\n a[b + 1 + 32] = a[b + 3 + 64] = z(d, c, g);\n a[b + 1 + 64] = a[b + 3 + 96] = z(e, d, c);\n a[b + 1 + 96] = z(f, e, d);\n }\n function xf(a, b) {\n var c;\n for (c = 0; 8 > c; ++c) I(a, b + 32 * c, a, b - 32, 8);\n }\n function yf(a, b) {\n var c;\n for (c = 0; 8 > c; ++c) M(a, b, a[b - 1], 8), (b += 32);\n }\n function lb(a, b, c) {\n var d;\n for (d = 0; 8 > d; ++d) M(b, c + 32 * d, a, 8);\n }\n function vf(a, b) {\n var c = 8,\n d;\n for (d = 0; 8 > d; ++d) c += a[b + d - 32] + a[b - 1 + 32 * d];\n lb(c >> 4, a, b);\n }\n function Af(a, b) {\n var c = 4,\n d;\n for (d = 0; 8 > d; ++d) c += a[b + d - 32];\n lb(c >> 3, a, b);\n }\n function zf(a, b) {\n var c = 4,\n d;\n for (d = 0; 8 > d; ++d) c += a[b - 1 + 32 * d];\n lb(c >> 3, a, b);\n }\n function Bf(a, b) {\n lb(128, a, b);\n }\n function ab(a, b, c) {\n var d = a[b - c],\n e = a[b + 0],\n f = 3 * (e - d) + Qb[1020 + a[b - 2 * c] - a[b + c]],\n g = mb[112 + ((f + 4) >> 3)];\n a[b - c] = R[255 + d + mb[112 + ((f + 3) >> 3)]];\n a[b + 0] = R[255 + e - g];\n }\n function jd(a, b, c, d) {\n var e = a[b + 0],\n f = a[b + c];\n return U[255 + a[b - 2 * c] - a[b - c]] > d || U[255 + f - e] > d;\n }\n function kd(a, b, c, d) {\n return (\n 4 * U[255 + a[b - c] - a[b + 0]] + U[255 + a[b - 2 * c] - a[b + c]] <= d\n );\n }\n function ld(a, b, c, d, e) {\n var f = a[b - 3 * c],\n g = a[b - 2 * c],\n h = a[b - c],\n k = a[b + 0],\n l = a[b + c],\n m = a[b + 2 * c],\n n = a[b + 3 * c];\n return 4 * U[255 + h - k] + U[255 + g - l] > d\n ? 0\n : U[255 + a[b - 4 * c] - f] <= e &&\n U[255 + f - g] <= e &&\n U[255 + g - h] <= e &&\n U[255 + n - m] <= e &&\n U[255 + m - l] <= e &&\n U[255 + l - k] <= e;\n }\n function gd(a, b, c, d) {\n var e = 2 * d + 1;\n for (d = 0; 16 > d; ++d) kd(a, b + d, c, e) && ab(a, b + d, c);\n }\n function hd(a, b, c, d) {\n var e = 2 * d + 1;\n for (d = 0; 16 > d; ++d) kd(a, b + d * c, 1, e) && ab(a, b + d * c, 1);\n }\n function bf(a, b, c, d) {\n var e;\n for (e = 3; 0 < e; --e) (b += 4 * c), gd(a, b, c, d);\n }\n function cf(a, b, c, d) {\n var e;\n for (e = 3; 0 < e; --e) (b += 4), hd(a, b, c, d);\n }\n function ea(a, b, c, d, e, f, g, h) {\n for (f = 2 * f + 1; 0 < e--; ) {\n if (ld(a, b, c, f, g))\n if (jd(a, b, c, h)) ab(a, b, c);\n else {\n var k = a,\n l = b,\n m = c,\n n = k[l - 2 * m],\n r = k[l - m],\n q = k[l + 0],\n t = k[l + m],\n v = k[l + 2 * m],\n p = Qb[1020 + 3 * (q - r) + Qb[1020 + n - t]],\n u = (27 * p + 63) >> 7,\n w = (18 * p + 63) >> 7,\n p = (9 * p + 63) >> 7;\n k[l - 3 * m] = R[255 + k[l - 3 * m] + p];\n k[l - 2 * m] = R[255 + n + w];\n k[l - m] = R[255 + r + u];\n k[l + 0] = R[255 + q - u];\n k[l + m] = R[255 + t - w];\n k[l + 2 * m] = R[255 + v - p];\n }\n b += d;\n }\n }\n function Fa(a, b, c, d, e, f, g, h) {\n for (f = 2 * f + 1; 0 < e--; ) {\n if (ld(a, b, c, f, g))\n if (jd(a, b, c, h)) ab(a, b, c);\n else {\n var k = a,\n l = b,\n m = c,\n n = k[l - m],\n r = k[l + 0],\n q = k[l + m],\n t = 3 * (r - n),\n v = mb[112 + ((t + 4) >> 3)],\n t = mb[112 + ((t + 3) >> 3)],\n p = (v + 1) >> 1;\n k[l - 2 * m] = R[255 + k[l - 2 * m] + p];\n k[l - m] = R[255 + n + t];\n k[l + 0] = R[255 + r - v];\n k[l + m] = R[255 + q - p];\n }\n b += d;\n }\n }\n function Ue(a, b, c, d, e, f) {\n ea(a, b, c, 1, 16, d, e, f);\n }\n function Ve(a, b, c, d, e, f) {\n ea(a, b, 1, c, 16, d, e, f);\n }\n function Ye(a, b, c, d, e, f) {\n var g;\n for (g = 3; 0 < g; --g) (b += 4 * c), Fa(a, b, c, 1, 16, d, e, f);\n }\n function Ze(a, b, c, d, e, f) {\n var g;\n for (g = 3; 0 < g; --g) (b += 4), Fa(a, b, 1, c, 16, d, e, f);\n }\n function We(a, b, c, d, e, f, g, h) {\n ea(a, b, e, 1, 8, f, g, h);\n ea(c, d, e, 1, 8, f, g, h);\n }\n function Xe(a, b, c, d, e, f, g, h) {\n ea(a, b, 1, e, 8, f, g, h);\n ea(c, d, 1, e, 8, f, g, h);\n }\n function $e(a, b, c, d, e, f, g, h) {\n Fa(a, b + 4 * e, e, 1, 8, f, g, h);\n Fa(c, d + 4 * e, e, 1, 8, f, g, h);\n }\n function af(a, b, c, d, e, f, g, h) {\n Fa(a, b + 4, 1, e, 8, f, g, h);\n Fa(c, d + 4, 1, e, 8, f, g, h);\n }\n function Cf() {\n this.ba = new Cb();\n this.ec = [];\n this.cc = [];\n this.Mc = [];\n this.Dc = this.Nc = this.dc = this.fc = 0;\n this.Oa = new Ud();\n this.memory = 0;\n this.Ib = \"OutputFunc\";\n this.Jb = \"OutputAlphaFunc\";\n this.Nd = \"OutputRowFunc\";\n }\n function md() {\n this.data = [];\n this.offset = this.kd = this.ha = this.w = 0;\n this.na = [];\n this.xa = this.gb = this.Ja = this.Sa = this.P = 0;\n }\n function Df() {\n this.nc = this.Ea = this.b = this.hc = 0;\n this.K = [];\n this.w = 0;\n }\n function Ef() {\n this.ua = 0;\n this.Wa = new ac();\n this.vb = new ac();\n this.md = this.xc = this.wc = 0;\n this.vc = [];\n this.Wb = 0;\n this.Ya = new Ub();\n this.yc = new O();\n }\n function je() {\n this.xb = this.a = 0;\n this.l = new Oa();\n this.ca = new Cb();\n this.V = [];\n this.Ba = 0;\n this.Ta = [];\n this.Ua = 0;\n this.m = new Ra();\n this.Pb = 0;\n this.wd = new Ra();\n this.Ma = this.$ = this.C = this.i = this.c = this.xd = 0;\n this.s = new Ef();\n this.ab = 0;\n this.gc = wa(4, Df);\n this.Oc = 0;\n }\n function Ff() {\n this.Lc = this.Z = this.$a = this.i = this.c = 0;\n this.l = new Oa();\n this.ic = 0;\n this.ca = [];\n this.tb = 0;\n this.qd = null;\n this.rd = 0;\n }\n function Rb(a, b, c, d, e, f, g) {\n a = null == a ? 0 : a[b + 0];\n for (b = 0; b < g; ++b) (e[f + b] = (a + c[d + b]) & 255), (a = e[f + b]);\n }\n function Gf(a, b, c, d, e, f, g) {\n if (null == a) Rb(null, null, c, d, e, f, g);\n else {\n var h;\n for (h = 0; h < g; ++h) e[f + h] = (a[b + h] + c[d + h]) & 255;\n }\n }\n function Hf(a, b, c, d, e, f, g) {\n if (null == a) Rb(null, null, c, d, e, f, g);\n else {\n var h = a[b + 0],\n k = h,\n l = h,\n m;\n for (m = 0; m < g; ++m)\n (h = a[b + m]),\n (k = l + h - k),\n (l = (c[d + m] + (k & -256 ? (0 > k ? 0 : 255) : k)) & 255),\n (k = h),\n (e[f + m] = l);\n }\n }\n function Le(a, b, c, d) {\n var e = b.width,\n f = b.o;\n x(null != a && null != b);\n if (0 > c || 0 >= d || c + d > f) return null;\n if (!a.Cc) {\n if (null == a.ga) {\n a.ga = new Ff();\n var g;\n (g = null == a.ga) ||\n ((g = b.width * b.o),\n x(0 == a.Gb.length),\n (a.Gb = V(g)),\n (a.Uc = 0),\n null == a.Gb\n ? (g = 0)\n : ((a.mb = a.Gb), (a.nb = a.Uc), (a.rc = null), (g = 1)),\n (g = !g));\n if (!g) {\n g = a.ga;\n var h = a.Fa,\n k = a.P,\n l = a.qc,\n m = a.mb,\n n = a.nb,\n r = k + 1,\n q = l - 1,\n t = g.l;\n x(null != h && null != m && null != b);\n ia[0] = null;\n ia[1] = Rb;\n ia[2] = Gf;\n ia[3] = Hf;\n g.ca = m;\n g.tb = n;\n g.c = b.width;\n g.i = b.height;\n x(0 < g.c && 0 < g.i);\n if (1 >= l) b = 0;\n else if (\n ((g.$a = (h[k + 0] >> 0) & 3),\n (g.Z = (h[k + 0] >> 2) & 3),\n (g.Lc = (h[k + 0] >> 4) & 3),\n (k = (h[k + 0] >> 6) & 3),\n 0 > g.$a || 1 < g.$a || 4 <= g.Z || 1 < g.Lc || k)\n )\n b = 0;\n else if (\n ((t.put = kc),\n (t.ac = gc),\n (t.bc = lc),\n (t.ma = g),\n (t.width = b.width),\n (t.height = b.height),\n (t.Da = b.Da),\n (t.v = b.v),\n (t.va = b.va),\n (t.j = b.j),\n (t.o = b.o),\n g.$a)\n )\n b: {\n x(1 == g.$a), (b = Bc());\n c: for (;;) {\n if (null == b) {\n b = 0;\n break b;\n }\n x(null != g);\n g.mc = b;\n b.c = g.c;\n b.i = g.i;\n b.l = g.l;\n b.l.ma = g;\n b.l.width = g.c;\n b.l.height = g.i;\n b.a = 0;\n cb(b.m, h, r, q);\n if (!rb(g.c, g.i, 1, b, null)) break c;\n 1 == b.ab && 3 == b.gc[0].hc && yc(b.s)\n ? ((g.ic = 1),\n (h = b.c * b.i),\n (b.Ta = null),\n (b.Ua = 0),\n (b.V = V(h)),\n (b.Ba = 0),\n null == b.V ? ((b.a = 1), (b = 0)) : (b = 1))\n : ((g.ic = 0), (b = Ec(b, g.c)));\n if (!b) break c;\n b = 1;\n break b;\n }\n g.mc = null;\n b = 0;\n }\n else b = q >= g.c * g.i;\n g = !b;\n }\n if (g) return null;\n 1 != a.ga.Lc ? (a.Ga = 0) : (d = f - c);\n }\n x(null != a.ga);\n x(c + d <= f);\n a: {\n h = a.ga;\n b = h.c;\n f = h.l.o;\n if (0 == h.$a) {\n r = a.rc;\n q = a.Vc;\n t = a.Fa;\n k = a.P + 1 + c * b;\n l = a.mb;\n m = a.nb + c * b;\n x(k <= a.P + a.qc);\n if (0 != h.Z)\n for (x(null != ia[h.Z]), g = 0; g < d; ++g)\n ia[h.Z](r, q, t, k, l, m, b),\n (r = l),\n (q = m),\n (m += b),\n (k += b);\n else\n for (g = 0; g < d; ++g)\n I(l, m, t, k, b), (r = l), (q = m), (m += b), (k += b);\n a.rc = r;\n a.Vc = q;\n } else {\n x(null != h.mc);\n b = c + d;\n g = h.mc;\n x(null != g);\n x(b <= g.i);\n if (g.C >= b) b = 1;\n else if ((h.ic || Aa(), h.ic)) {\n var h = g.V,\n r = g.Ba,\n q = g.c,\n v = g.i,\n t = 1,\n k = g.$ / q,\n l = g.$ % q,\n m = g.m,\n n = g.s,\n p = g.$,\n u = q * v,\n w = q * b,\n y = n.wc,\n A = p < w ? ha(n, l, k) : null;\n x(p <= u);\n x(b <= v);\n x(yc(n));\n c: for (;;) {\n for (; !m.h && p < w; ) {\n l & y || (A = ha(n, l, k));\n x(null != A);\n Sa(m);\n v = ua(A.G[0], A.H[0], m);\n if (256 > v)\n (h[r + p] = v),\n ++p,\n ++l,\n l >= q && ((l = 0), ++k, k <= b && !(k % 16) && Ib(g, k));\n else if (280 > v) {\n var v = ib(v - 256, m);\n var E = ua(A.G[4], A.H[4], m);\n Sa(m);\n E = ib(E, m);\n E = nc(q, E);\n if (p >= E && u - p >= v) {\n var B;\n for (B = 0; B < v; ++B) h[r + p + B] = h[r + p + B - E];\n } else {\n t = 0;\n break c;\n }\n p += v;\n for (l += v; l >= q; )\n (l -= q), ++k, k <= b && !(k % 16) && Ib(g, k);\n p < w && l & y && (A = ha(n, l, k));\n } else {\n t = 0;\n break c;\n }\n x(m.h == db(m));\n }\n Ib(g, k > b ? b : k);\n break c;\n }\n !t || (m.h && p < u) ? ((t = 0), (g.a = m.h ? 5 : 3)) : (g.$ = p);\n b = t;\n } else b = Jb(g, g.V, g.Ba, g.c, g.i, b, se);\n if (!b) {\n d = 0;\n break a;\n }\n }\n c + d >= f && (a.Cc = 1);\n d = 1;\n }\n if (!d) return null;\n if (\n a.Cc &&\n ((d = a.ga), null != d && (d.mc = null), (a.ga = null), 0 < a.Ga)\n )\n return alert(\"todo:WebPDequantizeLevels\"), null;\n }\n return a.nb + c * e;\n }\n function If(a, b, c, d, e, f) {\n for (; 0 < e--; ) {\n var g = a,\n h = b + (c ? 1 : 0),\n k = a,\n l = b + (c ? 0 : 3),\n m;\n for (m = 0; m < d; ++m) {\n var n = k[l + 4 * m];\n 255 != n &&\n ((n *= 32897),\n (g[h + 4 * m + 0] = (g[h + 4 * m + 0] * n) >> 23),\n (g[h + 4 * m + 1] = (g[h + 4 * m + 1] * n) >> 23),\n (g[h + 4 * m + 2] = (g[h + 4 * m + 2] * n) >> 23));\n }\n b += f;\n }\n }\n function Jf(a, b, c, d, e) {\n for (; 0 < d--; ) {\n var f;\n for (f = 0; f < c; ++f) {\n var g = a[b + 2 * f + 0],\n h = a[b + 2 * f + 1],\n k = h & 15,\n l = 4369 * k,\n h = (((h & 240) | (h >> 4)) * l) >> 16;\n a[b + 2 * f + 0] =\n (((((g & 240) | (g >> 4)) * l) >> 16) & 240) |\n ((((((g & 15) | (g << 4)) * l) >> 16) >> 4) & 15);\n a[b + 2 * f + 1] = (h & 240) | k;\n }\n b += e;\n }\n }\n function Kf(a, b, c, d, e, f, g, h) {\n var k = 255,\n l,\n m;\n for (m = 0; m < e; ++m) {\n for (l = 0; l < d; ++l) {\n var n = a[b + l];\n f[g + 4 * l] = n;\n k &= n;\n }\n b += c;\n g += h;\n }\n return 255 != k;\n }\n function Lf(a, b, c, d, e) {\n var f;\n for (f = 0; f < e; ++f) c[d + f] = a[b + f] >> 8;\n }\n function Aa() {\n za = If;\n vc = Jf;\n fc = Kf;\n Fc = Lf;\n }\n function va(a, b, c) {\n self[a] = function(a, e, f, g, h, k, l, m, n, r, q, t, v, p, u, w, y) {\n var d,\n E = (y - 1) >> 1;\n var B = h[k + 0] | (l[m + 0] << 16);\n var C = n[r + 0] | (q[t + 0] << 16);\n x(null != a);\n var z = (3 * B + C + 131074) >> 2;\n b(a[e + 0], z & 255, z >> 16, v, p);\n null != f &&\n ((z = (3 * C + B + 131074) >> 2),\n b(f[g + 0], z & 255, z >> 16, u, w));\n for (d = 1; d <= E; ++d) {\n var D = h[k + d] | (l[m + d] << 16);\n var G = n[r + d] | (q[t + d] << 16);\n var F = B + D + C + G + 524296;\n var H = (F + 2 * (D + C)) >> 3;\n F = (F + 2 * (B + G)) >> 3;\n z = (H + B) >> 1;\n B = (F + D) >> 1;\n b(a[e + 2 * d - 1], z & 255, z >> 16, v, p + (2 * d - 1) * c);\n b(a[e + 2 * d - 0], B & 255, B >> 16, v, p + (2 * d - 0) * c);\n null != f &&\n ((z = (F + C) >> 1),\n (B = (H + G) >> 1),\n b(f[g + 2 * d - 1], z & 255, z >> 16, u, w + (2 * d - 1) * c),\n b(f[g + 2 * d + 0], B & 255, B >> 16, u, w + (2 * d + 0) * c));\n B = D;\n C = G;\n }\n y & 1 ||\n ((z = (3 * B + C + 131074) >> 2),\n b(a[e + y - 1], z & 255, z >> 16, v, p + (y - 1) * c),\n null != f &&\n ((z = (3 * C + B + 131074) >> 2),\n b(f[g + y - 1], z & 255, z >> 16, u, w + (y - 1) * c)));\n };\n }\n function ic() {\n P[Ca] = Mf;\n P[Ua] = nd;\n P[tc] = Nf;\n P[Va] = od;\n P[ya] = pd;\n P[Db] = qd;\n P[wc] = Of;\n P[zb] = nd;\n P[Ab] = od;\n P[Ja] = pd;\n P[Bb] = qd;\n }\n function Sb(a) {\n return a & ~Pf ? (0 > a ? 0 : 255) : a >> rd;\n }\n function bb(a, b) {\n return Sb(((19077 * a) >> 8) + ((26149 * b) >> 8) - 14234);\n }\n function nb(a, b, c) {\n return Sb(\n ((19077 * a) >> 8) - ((6419 * b) >> 8) - ((13320 * c) >> 8) + 8708\n );\n }\n function Pa(a, b) {\n return Sb(((19077 * a) >> 8) + ((33050 * b) >> 8) - 17685);\n }\n function Ga(a, b, c, d, e) {\n d[e + 0] = bb(a, c);\n d[e + 1] = nb(a, b, c);\n d[e + 2] = Pa(a, b);\n }\n function Tb(a, b, c, d, e) {\n d[e + 0] = Pa(a, b);\n d[e + 1] = nb(a, b, c);\n d[e + 2] = bb(a, c);\n }\n function sd(a, b, c, d, e) {\n var f = nb(a, b, c);\n b = ((f << 3) & 224) | (Pa(a, b) >> 3);\n d[e + 0] = (bb(a, c) & 248) | (f >> 5);\n d[e + 1] = b;\n }\n function td(a, b, c, d, e) {\n var f = (Pa(a, b) & 240) | 15;\n d[e + 0] = (bb(a, c) & 240) | (nb(a, b, c) >> 4);\n d[e + 1] = f;\n }\n function ud(a, b, c, d, e) {\n d[e + 0] = 255;\n Ga(a, b, c, d, e + 1);\n }\n function vd(a, b, c, d, e) {\n Tb(a, b, c, d, e);\n d[e + 3] = 255;\n }\n function wd(a, b, c, d, e) {\n Ga(a, b, c, d, e);\n d[e + 3] = 255;\n }\n function ga(a, b) {\n return 0 > a ? 0 : a > b ? b : a;\n }\n function la(a, b, c) {\n self[a] = function(a, e, f, g, h, k, l, m, n) {\n for (var d = m + (n & -2) * c; m != d; )\n b(a[e + 0], f[g + 0], h[k + 0], l, m),\n b(a[e + 1], f[g + 0], h[k + 0], l, m + c),\n (e += 2),\n ++g,\n ++k,\n (m += 2 * c);\n n & 1 && b(a[e + 0], f[g + 0], h[k + 0], l, m);\n };\n }\n function xd(a, b, c) {\n return 0 == c ? (0 == a ? (0 == b ? 6 : 5) : 0 == b ? 4 : 0) : c;\n }\n function yd(a, b, c, d, e) {\n switch (a >>> 30) {\n case 3:\n Za(b, c, d, e, 0);\n break;\n case 2:\n fd(b, c, d, e);\n break;\n case 1:\n pa(b, c, d, e);\n }\n }\n function Oc(a, b) {\n var c,\n d,\n e = b.M,\n f = b.Nb,\n g = a.oc,\n h = a.pc + 40,\n k = a.oc,\n l = a.pc + 584,\n m = a.oc,\n n = a.pc + 600;\n for (c = 0; 16 > c; ++c) g[h + 32 * c - 1] = 129;\n for (c = 0; 8 > c; ++c)\n (k[l + 32 * c - 1] = 129), (m[n + 32 * c - 1] = 129);\n 0 < e\n ? (g[h - 1 - 32] = k[l - 1 - 32] = m[n - 1 - 32] = 129)\n : (M(g, h - 32 - 1, 127, 21),\n M(k, l - 32 - 1, 127, 9),\n M(m, n - 32 - 1, 127, 9));\n for (d = 0; d < a.za; ++d) {\n var r = b.ya[b.aa + d];\n if (0 < d) {\n for (c = -1; 16 > c; ++c) I(g, h + 32 * c - 4, g, h + 32 * c + 12, 4);\n for (c = -1; 8 > c; ++c)\n I(k, l + 32 * c - 4, k, l + 32 * c + 4, 4),\n I(m, n + 32 * c - 4, m, n + 32 * c + 4, 4);\n }\n var q = a.Gd,\n t = a.Hd + d,\n v = r.ad,\n p = r.Hc;\n 0 < e &&\n (I(g, h - 32, q[t].y, 0, 16),\n I(k, l - 32, q[t].f, 0, 8),\n I(m, n - 32, q[t].ea, 0, 8));\n if (r.Za) {\n var u = g;\n var w = h - 32 + 16;\n 0 < e &&\n (d >= a.za - 1\n ? M(u, w, q[t].y[15], 4)\n : I(u, w, q[t + 1].y, 0, 4));\n for (c = 0; 4 > c; c++)\n u[w + 128 + c] = u[w + 256 + c] = u[w + 384 + c] = u[w + 0 + c];\n for (c = 0; 16 > c; ++c, p <<= 2)\n (u = g), (w = h + zd[c]), W[r.Ob[c]](u, w), yd(p, v, 16 * +c, u, w);\n } else if (((u = xd(d, e, r.Ob[0])), Y[u](g, h), 0 != p))\n for (c = 0; 16 > c; ++c, p <<= 2) yd(p, v, 16 * +c, g, h + zd[c]);\n c = r.Gc;\n u = xd(d, e, r.Dd);\n ka[u](k, l);\n ka[u](m, n);\n r = c >> 0;\n p = v;\n u = k;\n w = l;\n r & 255 && (r & 170 ? Nb(p, 256, u, w) : Ob(p, 256, u, w));\n c >>= 8;\n r = m;\n p = n;\n c & 255 && (c & 170 ? Nb(v, 320, r, p) : Ob(v, 320, r, p));\n e < a.Ub - 1 &&\n (I(q[t].y, 0, g, h + 480, 16),\n I(q[t].f, 0, k, l + 224, 8),\n I(q[t].ea, 0, m, n + 224, 8));\n c = 8 * f * a.B;\n q = a.sa;\n t = a.ta + 16 * d + 16 * f * a.R;\n v = a.qa;\n r = a.ra + 8 * d + c;\n p = a.Ha;\n u = a.Ia + 8 * d + c;\n for (c = 0; 16 > c; ++c) I(q, t + c * a.R, g, h + 32 * c, 16);\n for (c = 0; 8 > c; ++c)\n I(v, r + c * a.B, k, l + 32 * c, 8),\n I(p, u + c * a.B, m, n + 32 * c, 8);\n }\n }\n function Ad(a, b, c, d, e, f, g, h, k) {\n var l = [0],\n m = [0],\n n = 0,\n r = null != k ? k.kd : 0,\n q = null != k ? k : new md();\n if (null == a || 12 > c) return 7;\n q.data = a;\n q.w = b;\n q.ha = c;\n b = [b];\n c = [c];\n q.gb = [q.gb];\n a: {\n var t = b;\n var v = c;\n var p = q.gb;\n x(null != a);\n x(null != v);\n x(null != p);\n p[0] = 0;\n if (12 <= v[0] && !fa(a, t[0], \"RIFF\")) {\n if (fa(a, t[0] + 8, \"WEBP\")) {\n p = 3;\n break a;\n }\n var u = Ha(a, t[0] + 4);\n if (12 > u || 4294967286 < u) {\n p = 3;\n break a;\n }\n if (r && u > v[0] - 8) {\n p = 7;\n break a;\n }\n p[0] = u;\n t[0] += 12;\n v[0] -= 12;\n }\n p = 0;\n }\n if (0 != p) return p;\n u = 0 < q.gb[0];\n for (c = c[0]; ; ) {\n t = [0];\n n = [n];\n a: {\n var w = a;\n v = b;\n p = c;\n var y = n,\n A = l,\n z = m,\n B = t;\n y[0] = 0;\n if (8 > p[0]) p = 7;\n else {\n if (!fa(w, v[0], \"VP8X\")) {\n if (10 != Ha(w, v[0] + 4)) {\n p = 3;\n break a;\n }\n if (18 > p[0]) {\n p = 7;\n break a;\n }\n var C = Ha(w, v[0] + 8);\n var D = 1 + Yb(w, v[0] + 12);\n w = 1 + Yb(w, v[0] + 15);\n if (2147483648 <= D * w) {\n p = 3;\n break a;\n }\n null != B && (B[0] = C);\n null != A && (A[0] = D);\n null != z && (z[0] = w);\n v[0] += 18;\n p[0] -= 18;\n y[0] = 1;\n }\n p = 0;\n }\n }\n n = n[0];\n t = t[0];\n if (0 != p) return p;\n v = !!(t & 2);\n if (!u && n) return 3;\n null != f && (f[0] = !!(t & 16));\n null != g && (g[0] = v);\n null != h && (h[0] = 0);\n g = l[0];\n t = m[0];\n if (n && v && null == k) {\n p = 0;\n break;\n }\n if (4 > c) {\n p = 7;\n break;\n }\n if ((u && n) || (!u && !n && !fa(a, b[0], \"ALPH\"))) {\n c = [c];\n q.na = [q.na];\n q.P = [q.P];\n q.Sa = [q.Sa];\n a: {\n C = a;\n p = b;\n u = c;\n var y = q.gb,\n A = q.na,\n z = q.P,\n B = q.Sa;\n D = 22;\n x(null != C);\n x(null != u);\n w = p[0];\n var F = u[0];\n x(null != A);\n x(null != B);\n A[0] = null;\n z[0] = null;\n for (B[0] = 0; ; ) {\n p[0] = w;\n u[0] = F;\n if (8 > F) {\n p = 7;\n break a;\n }\n var G = Ha(C, w + 4);\n if (4294967286 < G) {\n p = 3;\n break a;\n }\n var H = (8 + G + 1) & -2;\n D += H;\n if (0 < y && D > y) {\n p = 3;\n break a;\n }\n if (!fa(C, w, \"VP8 \") || !fa(C, w, \"VP8L\")) {\n p = 0;\n break a;\n }\n if (F[0] < H) {\n p = 7;\n break a;\n }\n fa(C, w, \"ALPH\") || ((A[0] = C), (z[0] = w + 8), (B[0] = G));\n w += H;\n F -= H;\n }\n }\n c = c[0];\n q.na = q.na[0];\n q.P = q.P[0];\n q.Sa = q.Sa[0];\n if (0 != p) break;\n }\n c = [c];\n q.Ja = [q.Ja];\n q.xa = [q.xa];\n a: if (\n ((y = a),\n (p = b),\n (u = c),\n (A = q.gb[0]),\n (z = q.Ja),\n (B = q.xa),\n (C = p[0]),\n (w = !fa(y, C, \"VP8 \")),\n (D = !fa(y, C, \"VP8L\")),\n x(null != y),\n x(null != u),\n x(null != z),\n x(null != B),\n 8 > u[0])\n )\n p = 7;\n else {\n if (w || D) {\n y = Ha(y, C + 4);\n if (12 <= A && y > A - 12) {\n p = 3;\n break a;\n }\n if (r && y > u[0] - 8) {\n p = 7;\n break a;\n }\n z[0] = y;\n p[0] += 8;\n u[0] -= 8;\n B[0] = D;\n } else\n (B[0] = 5 <= u[0] && 47 == y[C + 0] && !(y[C + 4] >> 5)),\n (z[0] = u[0]);\n p = 0;\n }\n c = c[0];\n q.Ja = q.Ja[0];\n q.xa = q.xa[0];\n b = b[0];\n if (0 != p) break;\n if (4294967286 < q.Ja) return 3;\n null == h || v || (h[0] = q.xa ? 2 : 1);\n g = [g];\n t = [t];\n if (q.xa) {\n if (5 > c) {\n p = 7;\n break;\n }\n h = g;\n r = t;\n v = f;\n null == a || 5 > c\n ? (a = 0)\n : 5 <= c && 47 == a[b + 0] && !(a[b + 4] >> 5)\n ? ((u = [0]),\n (y = [0]),\n (A = [0]),\n (z = new Ra()),\n cb(z, a, b, c),\n mc(z, u, y, A)\n ? (null != h && (h[0] = u[0]),\n null != r && (r[0] = y[0]),\n null != v && (v[0] = A[0]),\n (a = 1))\n : (a = 0))\n : (a = 0);\n } else {\n if (10 > c) {\n p = 7;\n break;\n }\n h = t;\n null == a || 10 > c || !Jc(a, b + 3, c - 3)\n ? (a = 0)\n : ((r = a[b + 0] | (a[b + 1] << 8) | (a[b + 2] << 16)),\n (v = ((a[b + 7] << 8) | a[b + 6]) & 16383),\n (a = ((a[b + 9] << 8) | a[b + 8]) & 16383),\n r & 1 ||\n 3 < ((r >> 1) & 7) ||\n !((r >> 4) & 1) ||\n r >> 5 >= q.Ja ||\n !v ||\n !a\n ? (a = 0)\n : (g && (g[0] = v), h && (h[0] = a), (a = 1)));\n }\n if (!a) return 3;\n g = g[0];\n t = t[0];\n if (n && (l[0] != g || m[0] != t)) return 3;\n null != k &&\n ((k[0] = q),\n (k.offset = b - k.w),\n x(4294967286 > b - k.w),\n x(k.offset == k.ha - c));\n break;\n }\n return 0 == p || (7 == p && n && null == k)\n ? (null != f && (f[0] |= null != q.na && 0 < q.na.length),\n null != d && (d[0] = g),\n null != e && (e[0] = t),\n 0)\n : p;\n }\n function hc(a, b, c) {\n var d = b.width,\n e = b.height,\n f = 0,\n g = 0,\n h = d,\n k = e;\n b.Da = null != a && 0 < a.Da;\n if (\n b.Da &&\n ((h = a.cd),\n (k = a.bd),\n (f = a.v),\n (g = a.j),\n 11 > c || ((f &= -2), (g &= -2)),\n 0 > f || 0 > g || 0 >= h || 0 >= k || f + h > d || g + k > e)\n )\n return 0;\n b.v = f;\n b.j = g;\n b.va = f + h;\n b.o = g + k;\n b.U = h;\n b.T = k;\n b.da = null != a && 0 < a.da;\n if (b.da) {\n c = [a.ib];\n f = [a.hb];\n if (!bc(h, k, c, f)) return 0;\n b.ib = c[0];\n b.hb = f[0];\n }\n b.ob = null != a && a.ob;\n b.Kb = null == a || !a.Sd;\n b.da && ((b.ob = b.ib < (3 * d) / 4 && b.hb < (3 * e) / 4), (b.Kb = 0));\n return 1;\n }\n function Bd(a) {\n if (null == a) return 2;\n if (11 > a.S) {\n var b = a.f.RGBA;\n b.fb += (a.height - 1) * b.A;\n b.A = -b.A;\n } else\n (b = a.f.kb),\n (a = a.height),\n (b.O += (a - 1) * b.fa),\n (b.fa = -b.fa),\n (b.N += ((a - 1) >> 1) * b.Ab),\n (b.Ab = -b.Ab),\n (b.W += ((a - 1) >> 1) * b.Db),\n (b.Db = -b.Db),\n null != b.F && ((b.J += (a - 1) * b.lb), (b.lb = -b.lb));\n return 0;\n }\n function Cd(a, b, c, d) {\n if (null == d || 0 >= a || 0 >= b) return 2;\n if (null != c) {\n if (c.Da) {\n var e = c.cd,\n f = c.bd,\n g = c.v & -2,\n h = c.j & -2;\n if (0 > g || 0 > h || 0 >= e || 0 >= f || g + e > a || h + f > b)\n return 2;\n a = e;\n b = f;\n }\n if (c.da) {\n e = [c.ib];\n f = [c.hb];\n if (!bc(a, b, e, f)) return 2;\n a = e[0];\n b = f[0];\n }\n }\n d.width = a;\n d.height = b;\n a: {\n var k = d.width;\n var l = d.height;\n a = d.S;\n if (0 >= k || 0 >= l || !(a >= Ca && 13 > a)) a = 2;\n else {\n if (0 >= d.Rd && null == d.sd) {\n var g = (f = e = b = 0),\n h = k * Dd[a],\n m = h * l;\n 11 > a ||\n ((b = (k + 1) / 2),\n (f = ((l + 1) / 2) * b),\n 12 == a && ((e = k), (g = e * l)));\n l = V(m + 2 * f + g);\n if (null == l) {\n a = 1;\n break a;\n }\n d.sd = l;\n 11 > a\n ? ((k = d.f.RGBA),\n (k.eb = l),\n (k.fb = 0),\n (k.A = h),\n (k.size = m))\n : ((k = d.f.kb),\n (k.y = l),\n (k.O = 0),\n (k.fa = h),\n (k.Fd = m),\n (k.f = l),\n (k.N = 0 + m),\n (k.Ab = b),\n (k.Cd = f),\n (k.ea = l),\n (k.W = 0 + m + f),\n (k.Db = b),\n (k.Ed = f),\n 12 == a && ((k.F = l), (k.J = 0 + m + 2 * f)),\n (k.Tc = g),\n (k.lb = e));\n }\n b = 1;\n e = d.S;\n f = d.width;\n g = d.height;\n if (e >= Ca && 13 > e)\n if (11 > e)\n (a = d.f.RGBA),\n (h = Math.abs(a.A)),\n (b &= h * (g - 1) + f <= a.size),\n (b &= h >= f * Dd[e]),\n (b &= null != a.eb);\n else {\n a = d.f.kb;\n h = (f + 1) / 2;\n m = (g + 1) / 2;\n k = Math.abs(a.fa);\n var l = Math.abs(a.Ab),\n n = Math.abs(a.Db),\n r = Math.abs(a.lb),\n q = r * (g - 1) + f;\n b &= k * (g - 1) + f <= a.Fd;\n b &= l * (m - 1) + h <= a.Cd;\n b &= n * (m - 1) + h <= a.Ed;\n b = b & (k >= f) & (l >= h) & (n >= h);\n b &= null != a.y;\n b &= null != a.f;\n b &= null != a.ea;\n 12 == e && ((b &= r >= f), (b &= q <= a.Tc), (b &= null != a.F));\n }\n else b = 0;\n a = b ? 0 : 2;\n }\n }\n if (0 != a) return a;\n null != c && c.fd && (a = Bd(d));\n return a;\n }\n var xb = 64,\n Hd = [\n 0,\n 1,\n 3,\n 7,\n 15,\n 31,\n 63,\n 127,\n 255,\n 511,\n 1023,\n 2047,\n 4095,\n 8191,\n 16383,\n 32767,\n 65535,\n 131071,\n 262143,\n 524287,\n 1048575,\n 2097151,\n 4194303,\n 8388607,\n 16777215\n ],\n Gd = 24,\n ob = 32,\n Xb = 8,\n Id = [\n 0,\n 0,\n 1,\n 1,\n 2,\n 2,\n 2,\n 2,\n 3,\n 3,\n 3,\n 3,\n 3,\n 3,\n 3,\n 3,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 4,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7,\n 7\n ];\n X(\"Predictor0\", \"PredictorAdd0\");\n self.Predictor0 = function() {\n return 4278190080;\n };\n self.Predictor1 = function(a) {\n return a;\n };\n self.Predictor2 = function(a, b, c) {\n return b[c + 0];\n };\n self.Predictor3 = function(a, b, c) {\n return b[c + 1];\n };\n self.Predictor4 = function(a, b, c) {\n return b[c - 1];\n };\n self.Predictor5 = function(a, b, c) {\n return aa(aa(a, b[c + 1]), b[c + 0]);\n };\n self.Predictor6 = function(a, b, c) {\n return aa(a, b[c - 1]);\n };\n self.Predictor7 = function(a, b, c) {\n return aa(a, b[c + 0]);\n };\n self.Predictor8 = function(a, b, c) {\n return aa(b[c - 1], b[c + 0]);\n };\n self.Predictor9 = function(a, b, c) {\n return aa(b[c + 0], b[c + 1]);\n };\n self.Predictor10 = function(a, b, c) {\n return aa(aa(a, b[c - 1]), aa(b[c + 0], b[c + 1]));\n };\n self.Predictor11 = function(a, b, c) {\n var d = b[c + 0];\n b = b[c - 1];\n return 0 >=\n Ia((d >> 24) & 255, (a >> 24) & 255, (b >> 24) & 255) +\n Ia((d >> 16) & 255, (a >> 16) & 255, (b >> 16) & 255) +\n Ia((d >> 8) & 255, (a >> 8) & 255, (b >> 8) & 255) +\n Ia(d & 255, a & 255, b & 255)\n ? d\n : a;\n };\n self.Predictor12 = function(a, b, c) {\n var d = b[c + 0];\n b = b[c - 1];\n return (\n ((sa(((a >> 24) & 255) + ((d >> 24) & 255) - ((b >> 24) & 255)) << 24) |\n (sa(((a >> 16) & 255) + ((d >> 16) & 255) - ((b >> 16) & 255)) <<\n 16) |\n (sa(((a >> 8) & 255) + ((d >> 8) & 255) - ((b >> 8) & 255)) << 8) |\n sa((a & 255) + (d & 255) - (b & 255))) >>>\n 0\n );\n };\n self.Predictor13 = function(a, b, c) {\n var d = b[c - 1];\n a = aa(a, b[c + 0]);\n return (\n ((eb((a >> 24) & 255, (d >> 24) & 255) << 24) |\n (eb((a >> 16) & 255, (d >> 16) & 255) << 16) |\n (eb((a >> 8) & 255, (d >> 8) & 255) << 8) |\n eb((a >> 0) & 255, (d >> 0) & 255)) >>>\n 0\n );\n };\n var ee = self.PredictorAdd0;\n self.PredictorAdd1 = cc;\n X(\"Predictor2\", \"PredictorAdd2\");\n X(\"Predictor3\", \"PredictorAdd3\");\n X(\"Predictor4\", \"PredictorAdd4\");\n X(\"Predictor5\", \"PredictorAdd5\");\n X(\"Predictor6\", \"PredictorAdd6\");\n X(\"Predictor7\", \"PredictorAdd7\");\n X(\"Predictor8\", \"PredictorAdd8\");\n X(\"Predictor9\", \"PredictorAdd9\");\n X(\"Predictor10\", \"PredictorAdd10\");\n X(\"Predictor11\", \"PredictorAdd11\");\n X(\"Predictor12\", \"PredictorAdd12\");\n X(\"Predictor13\", \"PredictorAdd13\");\n var fe = self.PredictorAdd2;\n ec(\n \"ColorIndexInverseTransform\",\n \"MapARGB\",\n \"32b\",\n function(a) {\n return (a >> 8) & 255;\n },\n function(a) {\n return a;\n }\n );\n ec(\n \"VP8LColorIndexInverseTransformAlpha\",\n \"MapAlpha\",\n \"8b\",\n function(a) {\n return a;\n },\n function(a) {\n return (a >> 8) & 255;\n }\n );\n var rc = self.ColorIndexInverseTransform,\n ke = self.MapARGB,\n he = self.VP8LColorIndexInverseTransformAlpha,\n le = self.MapAlpha,\n pc,\n qc = (self.VP8LPredictorsAdd = []);\n qc.length = 16;\n (self.VP8LPredictors = []).length = 16;\n (self.VP8LPredictorsAdd_C = []).length = 16;\n (self.VP8LPredictors_C = []).length = 16;\n var Fb,\n sc,\n Gb,\n Hb,\n xc,\n uc,\n bd = V(511),\n cd = V(2041),\n dd = V(225),\n ed = V(767),\n ad = 0,\n Qb = cd,\n mb = dd,\n R = ed,\n U = bd,\n Ca = 0,\n Ua = 1,\n tc = 2,\n Va = 3,\n ya = 4,\n Db = 5,\n wc = 6,\n zb = 7,\n Ab = 8,\n Ja = 9,\n Bb = 10,\n pe = [2, 3, 7],\n oe = [3, 3, 11],\n Dc = [280, 256, 256, 256, 40],\n qe = [0, 1, 1, 1, 0],\n ne = [17, 18, 0, 1, 2, 3, 4, 5, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],\n de = [\n 24,\n 7,\n 23,\n 25,\n 40,\n 6,\n 39,\n 41,\n 22,\n 26,\n 38,\n 42,\n 56,\n 5,\n 55,\n 57,\n 21,\n 27,\n 54,\n 58,\n 37,\n 43,\n 72,\n 4,\n 71,\n 73,\n 20,\n 28,\n 53,\n 59,\n 70,\n 74,\n 36,\n 44,\n 88,\n 69,\n 75,\n 52,\n 60,\n 3,\n 87,\n 89,\n 19,\n 29,\n 86,\n 90,\n 35,\n 45,\n 68,\n 76,\n 85,\n 91,\n 51,\n 61,\n 104,\n 2,\n 103,\n 105,\n 18,\n 30,\n 102,\n 106,\n 34,\n 46,\n 84,\n 92,\n 67,\n 77,\n 101,\n 107,\n 50,\n 62,\n 120,\n 1,\n 119,\n 121,\n 83,\n 93,\n 17,\n 31,\n 100,\n 108,\n 66,\n 78,\n 118,\n 122,\n 33,\n 47,\n 117,\n 123,\n 49,\n 63,\n 99,\n 109,\n 82,\n 94,\n 0,\n 116,\n 124,\n 65,\n 79,\n 16,\n 32,\n 98,\n 110,\n 48,\n 115,\n 125,\n 81,\n 95,\n 64,\n 114,\n 126,\n 97,\n 111,\n 80,\n 113,\n 127,\n 96,\n 112\n ],\n me = [\n 2954,\n 2956,\n 2958,\n 2962,\n 2970,\n 2986,\n 3018,\n 3082,\n 3212,\n 3468,\n 3980,\n 5004\n ],\n ie = 8,\n Lb = [\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 10,\n 11,\n 12,\n 13,\n 14,\n 15,\n 16,\n 17,\n 17,\n 18,\n 19,\n 20,\n 20,\n 21,\n 21,\n 22,\n 22,\n 23,\n 23,\n 24,\n 25,\n 25,\n 26,\n 27,\n 28,\n 29,\n 30,\n 31,\n 32,\n 33,\n 34,\n 35,\n 36,\n 37,\n 37,\n 38,\n 39,\n 40,\n 41,\n 42,\n 43,\n 44,\n 45,\n 46,\n 46,\n 47,\n 48,\n 49,\n 50,\n 51,\n 52,\n 53,\n 54,\n 55,\n 56,\n 57,\n 58,\n 59,\n 60,\n 61,\n 62,\n 63,\n 64,\n 65,\n 66,\n 67,\n 68,\n 69,\n 70,\n 71,\n 72,\n 73,\n 74,\n 75,\n 76,\n 76,\n 77,\n 78,\n 79,\n 80,\n 81,\n 82,\n 83,\n 84,\n 85,\n 86,\n 87,\n 88,\n 89,\n 91,\n 93,\n 95,\n 96,\n 98,\n 100,\n 101,\n 102,\n 104,\n 106,\n 108,\n 110,\n 112,\n 114,\n 116,\n 118,\n 122,\n 124,\n 126,\n 128,\n 130,\n 132,\n 134,\n 136,\n 138,\n 140,\n 143,\n 145,\n 148,\n 151,\n 154,\n 157\n ],\n Mb = [\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 12,\n 13,\n 14,\n 15,\n 16,\n 17,\n 18,\n 19,\n 20,\n 21,\n 22,\n 23,\n 24,\n 25,\n 26,\n 27,\n 28,\n 29,\n 30,\n 31,\n 32,\n 33,\n 34,\n 35,\n 36,\n 37,\n 38,\n 39,\n 40,\n 41,\n 42,\n 43,\n 44,\n 45,\n 46,\n 47,\n 48,\n 49,\n 50,\n 51,\n 52,\n 53,\n 54,\n 55,\n 56,\n 57,\n 58,\n 60,\n 62,\n 64,\n 66,\n 68,\n 70,\n 72,\n 74,\n 76,\n 78,\n 80,\n 82,\n 84,\n 86,\n 88,\n 90,\n 92,\n 94,\n 96,\n 98,\n 100,\n 102,\n 104,\n 106,\n 108,\n 110,\n 112,\n 114,\n 116,\n 119,\n 122,\n 125,\n 128,\n 131,\n 134,\n 137,\n 140,\n 143,\n 146,\n 149,\n 152,\n 155,\n 158,\n 161,\n 164,\n 167,\n 170,\n 173,\n 177,\n 181,\n 185,\n 189,\n 193,\n 197,\n 201,\n 205,\n 209,\n 213,\n 217,\n 221,\n 225,\n 229,\n 234,\n 239,\n 245,\n 249,\n 254,\n 259,\n 264,\n 269,\n 274,\n 279,\n 284\n ],\n oa = null,\n He = [\n [173, 148, 140, 0],\n [176, 155, 140, 135, 0],\n [180, 157, 141, 134, 130, 0],\n [254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0]\n ],\n Ie = [0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15],\n Mc = [-0, 1, -1, 2, -2, 3, 4, 6, -3, 5, -4, -5, -6, 7, -7, 8, -8, -9],\n Fe = [\n [\n [\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n ],\n [\n [253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128],\n [189, 129, 242, 255, 227, 213, 255, 219, 128, 128, 128],\n [106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128]\n ],\n [\n [1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128],\n [181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128],\n [78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128]\n ],\n [\n [1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128],\n [184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128],\n [77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128]\n ],\n [\n [1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128],\n [170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128],\n [37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128]\n ],\n [\n [1, 204, 254, 255, 245, 255, 128, 128, 128, 128, 128],\n [207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128],\n [102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128]\n ],\n [\n [1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128],\n [177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128],\n [80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128]\n ],\n [\n [1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n ]\n ],\n [\n [\n [198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62],\n [131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1],\n [68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128]\n ],\n [\n [1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128],\n [184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128],\n [81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128]\n ],\n [\n [1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128],\n [99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128],\n [23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128]\n ],\n [\n [1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128],\n [109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128],\n [44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128]\n ],\n [\n [1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128],\n [94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128],\n [22, 100, 174, 245, 186, 161, 255, 199, 128, 128, 128]\n ],\n [\n [1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128],\n [124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128],\n [35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128]\n ],\n [\n [1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128],\n [121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128],\n [45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128]\n ],\n [\n [1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128],\n [203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128],\n [137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128]\n ]\n ],\n [\n [\n [253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128],\n [175, 13, 224, 243, 193, 185, 249, 198, 255, 255, 128],\n [73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128]\n ],\n [\n [1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128],\n [239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128],\n [155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128]\n ],\n [\n [1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128],\n [201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128],\n [69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128]\n ],\n [\n [1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128],\n [223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128],\n [141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128]\n ],\n [\n [1, 16, 248, 255, 255, 128, 128, 128, 128, 128, 128],\n [190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128],\n [149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n ],\n [\n [1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n ],\n [\n [1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128],\n [213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128],\n [55, 93, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n ],\n [\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n ]\n ],\n [\n [\n [202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255],\n [126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128],\n [61, 46, 138, 219, 151, 178, 240, 170, 255, 216, 128]\n ],\n [\n [1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128],\n [166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128],\n [39, 77, 162, 232, 172, 180, 245, 178, 255, 255, 128]\n ],\n [\n [1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128],\n [124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128],\n [24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128]\n ],\n [\n [1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128],\n [149, 150, 226, 252, 216, 205, 255, 171, 128, 128, 128],\n [28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128]\n ],\n [\n [1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128],\n [123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128],\n [20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128]\n ],\n [\n [1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128],\n [168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128],\n [47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128]\n ],\n [\n [1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128],\n [141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128],\n [42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128]\n ],\n [\n [1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n [238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n ]\n ]\n ],\n Ke = [\n [\n [231, 120, 48, 89, 115, 113, 120, 152, 112],\n [152, 179, 64, 126, 170, 118, 46, 70, 95],\n [175, 69, 143, 80, 85, 82, 72, 155, 103],\n [56, 58, 10, 171, 218, 189, 17, 13, 152],\n [114, 26, 17, 163, 44, 195, 21, 10, 173],\n [121, 24, 80, 195, 26, 62, 44, 64, 85],\n [144, 71, 10, 38, 171, 213, 144, 34, 26],\n [170, 46, 55, 19, 136, 160, 33, 206, 71],\n [63, 20, 8, 114, 114, 208, 12, 9, 226],\n [81, 40, 11, 96, 182, 84, 29, 16, 36]\n ],\n [\n [134, 183, 89, 137, 98, 101, 106, 165, 148],\n [72, 187, 100, 130, 157, 111, 32, 75, 80],\n [66, 102, 167, 99, 74, 62, 40, 234, 128],\n [41, 53, 9, 178, 241, 141, 26, 8, 107],\n [74, 43, 26, 146, 73, 166, 49, 23, 157],\n [65, 38, 105, 160, 51, 52, 31, 115, 128],\n [104, 79, 12, 27, 217, 255, 87, 17, 7],\n [87, 68, 71, 44, 114, 51, 15, 186, 23],\n [47, 41, 14, 110, 182, 183, 21, 17, 194],\n [66, 45, 25, 102, 197, 189, 23, 18, 22]\n ],\n [\n [88, 88, 147, 150, 42, 46, 45, 196, 205],\n [43, 97, 183, 117, 85, 38, 35, 179, 61],\n [39, 53, 200, 87, 26, 21, 43, 232, 171],\n [56, 34, 51, 104, 114, 102, 29, 93, 77],\n [39, 28, 85, 171, 58, 165, 90, 98, 64],\n [34, 22, 116, 206, 23, 34, 43, 166, 73],\n [107, 54, 32, 26, 51, 1, 81, 43, 31],\n [68, 25, 106, 22, 64, 171, 36, 225, 114],\n [34, 19, 21, 102, 132, 188, 16, 76, 124],\n [62, 18, 78, 95, 85, 57, 50, 48, 51]\n ],\n [\n [193, 101, 35, 159, 215, 111, 89, 46, 111],\n [60, 148, 31, 172, 219, 228, 21, 18, 111],\n [112, 113, 77, 85, 179, 255, 38, 120, 114],\n [40, 42, 1, 196, 245, 209, 10, 25, 109],\n [88, 43, 29, 140, 166, 213, 37, 43, 154],\n [61, 63, 30, 155, 67, 45, 68, 1, 209],\n [100, 80, 8, 43, 154, 1, 51, 26, 71],\n [142, 78, 78, 16, 255, 128, 34, 197, 171],\n [41, 40, 5, 102, 211, 183, 4, 1, 221],\n [51, 50, 17, 168, 209, 192, 23, 25, 82]\n ],\n [\n [138, 31, 36, 171, 27, 166, 38, 44, 229],\n [67, 87, 58, 169, 82, 115, 26, 59, 179],\n [63, 59, 90, 180, 59, 166, 93, 73, 154],\n [40, 40, 21, 116, 143, 209, 34, 39, 175],\n [47, 15, 16, 183, 34, 223, 49, 45, 183],\n [46, 17, 33, 183, 6, 98, 15, 32, 183],\n [57, 46, 22, 24, 128, 1, 54, 17, 37],\n [65, 32, 73, 115, 28, 128, 23, 128, 205],\n [40, 3, 9, 115, 51, 192, 18, 6, 223],\n [87, 37, 9, 115, 59, 77, 64, 21, 47]\n ],\n [\n [104, 55, 44, 218, 9, 54, 53, 130, 226],\n [64, 90, 70, 205, 40, 41, 23, 26, 57],\n [54, 57, 112, 184, 5, 41, 38, 166, 213],\n [30, 34, 26, 133, 152, 116, 10, 32, 134],\n [39, 19, 53, 221, 26, 114, 32, 73, 255],\n [31, 9, 65, 234, 2, 15, 1, 118, 73],\n [75, 32, 12, 51, 192, 255, 160, 43, 51],\n [88, 31, 35, 67, 102, 85, 55, 186, 85],\n [56, 21, 23, 111, 59, 205, 45, 37, 192],\n [55, 38, 70, 124, 73, 102, 1, 34, 98]\n ],\n [\n [125, 98, 42, 88, 104, 85, 117, 175, 82],\n [95, 84, 53, 89, 128, 100, 113, 101, 45],\n [75, 79, 123, 47, 51, 128, 81, 171, 1],\n [57, 17, 5, 71, 102, 57, 53, 41, 49],\n [38, 33, 13, 121, 57, 73, 26, 1, 85],\n [41, 10, 67, 138, 77, 110, 90, 47, 114],\n [115, 21, 2, 10, 102, 255, 166, 23, 6],\n [101, 29, 16, 10, 85, 128, 101, 196, 26],\n [57, 18, 10, 102, 102, 213, 34, 20, 43],\n [117, 20, 15, 36, 163, 128, 68, 1, 26]\n ],\n [\n [102, 61, 71, 37, 34, 53, 31, 243, 192],\n [69, 60, 71, 38, 73, 119, 28, 222, 37],\n [68, 45, 128, 34, 1, 47, 11, 245, 171],\n [62, 17, 19, 70, 146, 85, 55, 62, 70],\n [37, 43, 37, 154, 100, 163, 85, 160, 1],\n [63, 9, 92, 136, 28, 64, 32, 201, 85],\n [75, 15, 9, 9, 64, 255, 184, 119, 16],\n [86, 6, 28, 5, 64, 255, 25, 248, 1],\n [56, 8, 17, 132, 137, 255, 55, 116, 128],\n [58, 15, 20, 82, 135, 57, 26, 121, 40]\n ],\n [\n [164, 50, 31, 137, 154, 133, 25, 35, 218],\n [51, 103, 44, 131, 131, 123, 31, 6, 158],\n [86, 40, 64, 135, 148, 224, 45, 183, 128],\n [22, 26, 17, 131, 240, 154, 14, 1, 209],\n [45, 16, 21, 91, 64, 222, 7, 1, 197],\n [56, 21, 39, 155, 60, 138, 23, 102, 213],\n [83, 12, 13, 54, 192, 255, 68, 47, 28],\n [85, 26, 85, 85, 128, 128, 32, 146, 171],\n [18, 11, 7, 63, 144, 171, 4, 4, 246],\n [35, 27, 10, 146, 174, 171, 12, 26, 128]\n ],\n [\n [190, 80, 35, 99, 180, 80, 126, 54, 45],\n [85, 126, 47, 87, 176, 51, 41, 20, 32],\n [101, 75, 128, 139, 118, 146, 116, 128, 85],\n [56, 41, 15, 176, 236, 85, 37, 9, 62],\n [71, 30, 17, 119, 118, 255, 17, 18, 138],\n [101, 38, 60, 138, 55, 70, 43, 26, 142],\n [146, 36, 19, 30, 171, 255, 97, 27, 20],\n [138, 45, 61, 62, 219, 1, 81, 188, 64],\n [32, 41, 20, 117, 151, 142, 20, 21, 163],\n [112, 19, 12, 61, 195, 128, 48, 4, 24]\n ]\n ],\n Ee = [\n [\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n [249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n [234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255],\n [250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255],\n [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ]\n ],\n [\n [\n [217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255],\n [234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255]\n ],\n [\n [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ]\n ],\n [\n [\n [186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255],\n [234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255],\n [251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255]\n ],\n [\n [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ]\n ],\n [\n [\n [248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255],\n [248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n [246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n [252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n [248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n [253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n [252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ],\n [\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n ]\n ]\n ],\n Ge = [0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 0],\n Nc,\n Y = [],\n W = [],\n ka = [],\n Za,\n fd,\n Nb,\n pa,\n Ob,\n Xc,\n Tc,\n Yc,\n Uc,\n Zc,\n Vc,\n $c,\n Wc,\n Rc,\n Pc,\n Sc,\n Qc,\n re = 1,\n Cc = 2,\n ia = [],\n za,\n vc,\n fc,\n Fc,\n P = [];\n va(\"UpsampleRgbLinePair\", Ga, 3);\n va(\"UpsampleBgrLinePair\", Tb, 3);\n va(\"UpsampleRgbaLinePair\", wd, 4);\n va(\"UpsampleBgraLinePair\", vd, 4);\n va(\"UpsampleArgbLinePair\", ud, 4);\n va(\"UpsampleRgba4444LinePair\", td, 2);\n va(\"UpsampleRgb565LinePair\", sd, 2);\n var Mf = self.UpsampleRgbLinePair,\n Nf = self.UpsampleBgrLinePair,\n nd = self.UpsampleRgbaLinePair,\n od = self.UpsampleBgraLinePair,\n pd = self.UpsampleArgbLinePair,\n qd = self.UpsampleRgba4444LinePair,\n Of = self.UpsampleRgb565LinePair,\n Wa = 16,\n Ba = 1 << (Wa - 1),\n ta = -227,\n Eb = 482,\n rd = 6,\n Pf = (256 << rd) - 1,\n jc = 0,\n Yd = V(256),\n ae = V(256),\n $d = V(256),\n Zd = V(256),\n be = V(Eb - ta),\n ce = V(Eb - ta);\n la(\"YuvToRgbRow\", Ga, 3);\n la(\"YuvToBgrRow\", Tb, 3);\n la(\"YuvToRgbaRow\", wd, 4);\n la(\"YuvToBgraRow\", vd, 4);\n la(\"YuvToArgbRow\", ud, 4);\n la(\"YuvToRgba4444Row\", td, 2);\n la(\"YuvToRgb565Row\", sd, 2);\n var zd = [\n 0,\n 4,\n 8,\n 12,\n 128,\n 132,\n 136,\n 140,\n 256,\n 260,\n 264,\n 268,\n 384,\n 388,\n 392,\n 396\n ],\n Ya = [0, 2, 8],\n Qf = [8, 7, 6, 4, 4, 2, 2, 2, 1, 1, 1, 1],\n Ne = 1;\n this.WebPDecodeRGBA = function(a, b, c, d, e) {\n var f = Ua;\n var g = new Cf(),\n h = new Cb();\n g.ba = h;\n h.S = f;\n h.width = [h.width];\n h.height = [h.height];\n var k = h.width;\n var l = h.height,\n m = new Td();\n if (null == m || null == a) var n = 2;\n else\n x(null != m),\n (n = Ad(a, b, c, m.width, m.height, m.Pd, m.Qd, m.format, null));\n 0 != n\n ? (k = 0)\n : (null != k && (k[0] = m.width[0]),\n null != l && (l[0] = m.height[0]),\n (k = 1));\n if (k) {\n h.width = h.width[0];\n h.height = h.height[0];\n null != d && (d[0] = h.width);\n null != e && (e[0] = h.height);\n b: {\n d = new Oa();\n e = new md();\n e.data = a;\n e.w = b;\n e.ha = c;\n e.kd = 1;\n b = [0];\n x(null != e);\n a = Ad(e.data, e.w, e.ha, null, null, null, b, null, e);\n (0 == a || 7 == a) && b[0] && (a = 4);\n b = a;\n if (0 == b) {\n x(null != g);\n d.data = e.data;\n d.w = e.w + e.offset;\n d.ha = e.ha - e.offset;\n d.put = kc;\n d.ac = gc;\n d.bc = lc;\n d.ma = g;\n if (e.xa) {\n a = Bc();\n if (null == a) {\n g = 1;\n break b;\n }\n if (te(a, d)) {\n b = Cd(d.width, d.height, g.Oa, g.ba);\n if ((d = 0 == b)) {\n c: {\n d = a;\n d: for (;;) {\n if (null == d) {\n d = 0;\n break c;\n }\n x(null != d.s.yc);\n x(null != d.s.Ya);\n x(0 < d.s.Wb);\n c = d.l;\n x(null != c);\n e = c.ma;\n x(null != e);\n if (0 != d.xb) {\n d.ca = e.ba;\n d.tb = e.tb;\n x(null != d.ca);\n if (!hc(e.Oa, c, Va)) {\n d.a = 2;\n break d;\n }\n if (!Ec(d, c.width)) break d;\n if (c.da) break d;\n (c.da || hb(d.ca.S)) && Aa();\n 11 > d.ca.S ||\n (alert(\"todo:WebPInitConvertARGBToYUV\"),\n null != d.ca.f.kb.F && Aa());\n if (\n d.Pb &&\n 0 < d.s.ua &&\n null == d.s.vb.X &&\n !Zb(d.s.vb, d.s.Wa.Xa)\n ) {\n d.a = 1;\n break d;\n }\n d.xb = 0;\n }\n if (!Jb(d, d.V, d.Ba, d.c, d.i, c.o, ge)) break d;\n e.Dc = d.Ma;\n d = 1;\n break c;\n }\n x(0 != d.a);\n d = 0;\n }\n d = !d;\n }\n d && (b = a.a);\n } else b = a.a;\n } else {\n a = new Ce();\n if (null == a) {\n g = 1;\n break b;\n }\n a.Fa = e.na;\n a.P = e.P;\n a.qc = e.Sa;\n if (Kc(a, d)) {\n if (((b = Cd(d.width, d.height, g.Oa, g.ba)), 0 == b)) {\n a.Aa = 0;\n c = g.Oa;\n e = a;\n x(null != e);\n if (null != c) {\n k = c.Md;\n k = 0 > k ? 0 : 100 < k ? 255 : (255 * k) / 100;\n if (0 < k) {\n for (l = m = 0; 4 > l; ++l)\n (n = e.pb[l]),\n 12 > n.lc &&\n (n.ia = (k * Qf[0 > n.lc ? 0 : n.lc]) >> 3),\n (m |= n.ia);\n m && (alert(\"todo:VP8InitRandom\"), (e.ia = 1));\n }\n e.Ga = c.Id;\n 100 < e.Ga ? (e.Ga = 100) : 0 > e.Ga && (e.Ga = 0);\n }\n Me(a, d) || (b = a.a);\n }\n } else b = a.a;\n }\n 0 == b && null != g.Oa && g.Oa.fd && (b = Bd(g.ba));\n }\n g = b;\n }\n f = 0 != g ? null : 11 > f ? h.f.RGBA.eb : h.f.kb.y;\n } else f = null;\n return f;\n };\n var Dd = [3, 4, 3, 4, 4, 2, 2, 4, 4, 4, 2, 1, 1];\n };\n new _WebPDecoder();\n\n /** @license\n * Copyright (c) 2017 Dominik Homberger\n\nPermission 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:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE 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.\n\nhttps://webpjs.appspot.com\nWebPRiffParser dominikhlbg@gmail.com\n*/\n\n function memcmp(data, data_off, str, size) {\n for (var i = 0; i < size; i++)\n if (data[data_off + i] != str.charCodeAt(i)) return true;\n return false;\n }\n\n function GetTag(data, data_off) {\n var str = \"\";\n for (var i = 0; i < 4; i++) str += String.fromCharCode(data[data_off++]);\n return str;\n }\n\n function GetLE16(data, data_off) {\n return (data[data_off + 0] << 0) | (data[data_off + 1] << 8);\n }\n\n function GetLE24(data, data_off) {\n return (\n ((data[data_off + 0] << 0) |\n (data[data_off + 1] << 8) |\n (data[data_off + 2] << 16)) >>>\n 0\n );\n }\n\n function GetLE32(data, data_off) {\n return (\n ((data[data_off + 0] << 0) |\n (data[data_off + 1] << 8) |\n (data[data_off + 2] << 16) |\n (data[data_off + 3] << 24)) >>>\n 0\n );\n }\n\n function WebPRiffParser(src, src_off) {\n var imagearray = {};\n var i = 0;\n var alpha_chunk = false;\n var alpha_size = 0;\n var alpha_offset = 0;\n imagearray[\"frames\"] = [];\n if (memcmp(src, src_off, \"RIFF\", 4)) return;\n src_off += 4;\n var riff_size = GetLE32(src, src_off) + 8;\n src_off += 8;\n\n while (src_off < src.length) {\n var fourcc = GetTag(src, src_off);\n src_off += 4;\n\n var payload_size = GetLE32(src, src_off);\n src_off += 4;\n var payload_size_padded = payload_size + (payload_size & 1);\n\n switch (fourcc) {\n case \"VP8 \":\n case \"VP8L\":\n if (typeof imagearray[\"frames\"][i] === \"undefined\")\n imagearray[\"frames\"][i] = {};\n var obj = imagearray[\"frames\"][i];\n var height = [0];\n var width = [0];\n obj[\"src_off\"] = alpha_chunk ? alpha_offset : src_off - 8;\n obj[\"src_size\"] = alpha_size + payload_size + 8;\n //var rgba = webpdecoder.WebPDecodeRGBA(src,(alpha_chunk?alpha_offset:src_off-8),alpha_size+payload_size+8,width,height);\n //imagearray[i]={'rgba':rgba,'width':width[0],'height':height[0]};\n i++;\n if (alpha_chunk) {\n alpha_chunk = false;\n alpha_size = 0;\n alpha_offset = 0;\n }\n break;\n case \"VP8X\":\n var obj = (imagearray[\"header\"] = {});\n var feature_flags = (obj[\"feature_flags\"] = src[src_off]);\n var src_off_ = src_off + 4;\n var canvas_width = (obj[\"canvas_width\"] = 1 + GetLE24(src, src_off_));\n src_off_ += 3;\n var canvas_height = (obj[\"canvas_height\"] =\n 1 + GetLE24(src, src_off_));\n src_off_ += 3;\n break;\n case \"ALPH\":\n alpha_chunk = true;\n alpha_size = payload_size_padded + 8;\n alpha_offset = src_off - 8;\n break;\n\n case \"ANIM\":\n var obj = imagearray[\"header\"];\n var bgcolor = (obj[\"bgcolor\"] = GetLE32(src, src_off));\n src_off_ = src_off + 4;\n\n var loop_count = (obj[\"loop_count\"] = GetLE16(src, src_off_));\n src_off_ += 2;\n break;\n case \"ANMF\":\n var offset_x = 0,\n offset_y = 0,\n width = 0,\n height = 0,\n duration = 0,\n blend = 0,\n dispose = 0,\n temp = 0;\n var obj = (imagearray[\"frames\"][i] = {});\n obj[\"offset_x\"] = offset_x = 2 * GetLE24(src, src_off);\n src_off += 3;\n obj[\"offset_y\"] = offset_y = 2 * GetLE24(src, src_off);\n src_off += 3;\n obj[\"width\"] = width = 1 + GetLE24(src, src_off);\n src_off += 3;\n obj[\"height\"] = height = 1 + GetLE24(src, src_off);\n src_off += 3;\n obj[\"duration\"] = duration = GetLE24(src, src_off);\n src_off += 3;\n temp = src[src_off++];\n obj[\"dispose\"] = dispose = temp & 1;\n obj[\"blend\"] = blend = (temp >> 1) & 1;\n break;\n default:\n }\n if (fourcc != \"ANMF\") src_off += payload_size_padded;\n }\n return imagearray;\n }\n\n var height = [0];\n var width = [0];\n var pixels = [];\n var webpdecoder = new _WebPDecoder();\n\n var response = imageData;\n var imagearray = WebPRiffParser(response, 0);\n imagearray[\"response\"] = response;\n imagearray[\"rgbaoutput\"] = true;\n imagearray[\"dataurl\"] = false;\n\n var header = imagearray[\"header\"] ? imagearray[\"header\"] : null;\n var frames = imagearray[\"frames\"] ? imagearray[\"frames\"] : null;\n\n if (header) {\n header[\"loop_counter\"] = header[\"loop_count\"];\n height = [header[\"canvas_height\"]];\n width = [header[\"canvas_width\"]];\n\n var blend = false;\n for (var f = 0; f < frames.length; f++)\n if (frames[f][\"blend\"] == 0) {\n blend = true;\n break;\n }\n }\n\n var frame = frames[0];\n var rgba = webpdecoder.WebPDecodeRGBA(\n response,\n frame[\"src_off\"],\n frame[\"src_size\"],\n width,\n height\n );\n frame[\"rgba\"] = rgba;\n frame[\"imgwidth\"] = width[0];\n frame[\"imgheight\"] = height[0];\n\n for (var i = 0; i < width[0] * height[0] * 4; i++) {\n pixels[i] = rgba[i];\n }\n\n this.width = width;\n this.height = height;\n this.data = pixels;\n return this;\n}\n\nWebPDecoder.prototype.getData = function() {\n return this.data;\n};\n\nexport { WebPDecoder };\n","/**\n * @license\n *\n * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { zlibSync } from \"../libs/fflate.js\";\nimport { PNG } from \"../libs/png.js\";\n\n/**\n * jsPDF PNG PlugIn\n * @name png_support\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n /*\n * @see http://www.w3.org/TR/PNG-Chunks.html\n *\n Color Allowed Interpretation\n Type Bit Depths\n\n 0 1,2,4,8,16 Each pixel is a grayscale sample.\n\n 2 8,16 Each pixel is an R,G,B triple.\n\n 3 1,2,4,8 Each pixel is a palette index;\n a PLTE chunk must appear.\n\n 4 8,16 Each pixel is a grayscale sample,\n followed by an alpha sample.\n\n 6 8,16 Each pixel is an R,G,B triple,\n followed by an alpha sample.\n */\n\n /*\n * PNG filter method types\n *\n * @see http://www.w3.org/TR/PNG-Filters.html\n * @see http://www.libpng.org/pub/png/book/chapter09.html\n *\n * This is what the value 'Predictor' in decode params relates to\n *\n * 15 is \"optimal prediction\", which means the prediction algorithm can change from line to line.\n * In that case, you actually have to read the first byte off each line for the prediction algorthim (which should be 0-4, corresponding to PDF 10-14) and select the appropriate unprediction algorithm based on that byte.\n *\n 0 None\n 1 Sub\n 2 Up\n 3 Average\n 4 Paeth\n */\n\n var canCompress = function(value) {\n return value !== jsPDFAPI.image_compression.NONE && hasCompressionJS();\n };\n\n var hasCompressionJS = function() {\n return typeof zlibSync === \"function\";\n };\n var compressBytes = function(bytes, lineLength, colorsPerPixel, compression) {\n var level = 4;\n var filter_method = filterUp;\n\n switch (compression) {\n case jsPDFAPI.image_compression.FAST:\n level = 1;\n filter_method = filterSub;\n break;\n\n case jsPDFAPI.image_compression.MEDIUM:\n level = 6;\n filter_method = filterAverage;\n break;\n\n case jsPDFAPI.image_compression.SLOW:\n level = 9;\n filter_method = filterPaeth;\n break;\n }\n\n bytes = applyPngFilterMethod(\n bytes,\n lineLength,\n colorsPerPixel,\n filter_method\n );\n var dat = zlibSync(bytes, { level: level });\n return jsPDFAPI.__addimage__.arrayBufferToBinaryString(dat);\n };\n\n var applyPngFilterMethod = function(\n bytes,\n lineLength,\n colorsPerPixel,\n filter_method\n ) {\n var lines = bytes.length / lineLength,\n result = new Uint8Array(bytes.length + lines),\n filter_methods = getFilterMethods(),\n line,\n prevLine,\n offset;\n\n for (var i = 0; i < lines; i += 1) {\n offset = i * lineLength;\n line = bytes.subarray(offset, offset + lineLength);\n\n if (filter_method) {\n result.set(filter_method(line, colorsPerPixel, prevLine), offset + i);\n } else {\n var len = filter_methods.length,\n results = [];\n\n for (var j; j < len; j += 1) {\n results[j] = filter_methods[j](line, colorsPerPixel, prevLine);\n }\n\n var ind = getIndexOfSmallestSum(results.concat());\n\n result.set(results[ind], offset + i);\n }\n\n prevLine = line;\n }\n\n return result;\n };\n\n var filterNone = function(line) {\n /*var result = new Uint8Array(line.length + 1);\n result[0] = 0;\n result.set(line, 1);*/\n\n var result = Array.apply([], line);\n result.unshift(0);\n\n return result;\n };\n\n var filterSub = function(line, colorsPerPixel) {\n var result = [],\n len = line.length,\n left;\n\n result[0] = 1;\n\n for (var i = 0; i < len; i += 1) {\n left = line[i - colorsPerPixel] || 0;\n result[i + 1] = (line[i] - left + 0x0100) & 0xff;\n }\n\n return result;\n };\n\n var filterUp = function(line, colorsPerPixel, prevLine) {\n var result = [],\n len = line.length,\n up;\n\n result[0] = 2;\n\n for (var i = 0; i < len; i += 1) {\n up = (prevLine && prevLine[i]) || 0;\n result[i + 1] = (line[i] - up + 0x0100) & 0xff;\n }\n\n return result;\n };\n\n var filterAverage = function(line, colorsPerPixel, prevLine) {\n var result = [],\n len = line.length,\n left,\n up;\n\n result[0] = 3;\n\n for (var i = 0; i < len; i += 1) {\n left = line[i - colorsPerPixel] || 0;\n up = (prevLine && prevLine[i]) || 0;\n result[i + 1] = (line[i] + 0x0100 - ((left + up) >>> 1)) & 0xff;\n }\n\n return result;\n };\n\n var filterPaeth = function(line, colorsPerPixel, prevLine) {\n var result = [],\n len = line.length,\n left,\n up,\n upLeft,\n paeth;\n\n result[0] = 4;\n\n for (var i = 0; i < len; i += 1) {\n left = line[i - colorsPerPixel] || 0;\n up = (prevLine && prevLine[i]) || 0;\n upLeft = (prevLine && prevLine[i - colorsPerPixel]) || 0;\n paeth = paethPredictor(left, up, upLeft);\n result[i + 1] = (line[i] - paeth + 0x0100) & 0xff;\n }\n\n return result;\n };\n\n var paethPredictor = function(left, up, upLeft) {\n if (left === up && up === upLeft) {\n return left;\n }\n var pLeft = Math.abs(up - upLeft),\n pUp = Math.abs(left - upLeft),\n pUpLeft = Math.abs(left + up - upLeft - upLeft);\n return pLeft <= pUp && pLeft <= pUpLeft\n ? left\n : pUp <= pUpLeft\n ? up\n : upLeft;\n };\n\n var getFilterMethods = function() {\n return [filterNone, filterSub, filterUp, filterAverage, filterPaeth];\n };\n\n var getIndexOfSmallestSum = function(arrays) {\n var sum = arrays.map(function(value) {\n return value.reduce(function(pv, cv) {\n return pv + Math.abs(cv);\n }, 0);\n });\n return sum.indexOf(Math.min.apply(null, sum));\n };\n\n var getPredictorFromCompression = function(compression) {\n var predictor;\n switch (compression) {\n case jsPDFAPI.image_compression.FAST:\n predictor = 11;\n break;\n\n case jsPDFAPI.image_compression.MEDIUM:\n predictor = 13;\n break;\n\n case jsPDFAPI.image_compression.SLOW:\n predictor = 14;\n break;\n\n default:\n predictor = 12;\n break;\n }\n return predictor;\n };\n\n /**\n * @name processPNG\n * @function\n * @ignore\n */\n jsPDFAPI.processPNG = function(imageData, index, alias, compression) {\n \"use strict\";\n\n var colorSpace,\n filter = this.decode.FLATE_DECODE,\n bitsPerComponent,\n image,\n decodeParameters = \"\",\n trns,\n colors,\n pal,\n smask,\n pixels,\n len,\n alphaData,\n imgData,\n hasColors,\n pixel,\n i,\n n;\n\n if (this.__addimage__.isArrayBuffer(imageData))\n imageData = new Uint8Array(imageData);\n\n if (this.__addimage__.isArrayBufferView(imageData)) {\n image = new PNG(imageData);\n imageData = image.imgData;\n bitsPerComponent = image.bits;\n colorSpace = image.colorSpace;\n colors = image.colors;\n\n /*\n * colorType 6 - Each pixel is an R,G,B triple, followed by an alpha sample.\n *\n * colorType 4 - Each pixel is a grayscale sample, followed by an alpha sample.\n *\n * Extract alpha to create two separate images, using the alpha as a sMask\n */\n if ([4, 6].indexOf(image.colorType) !== -1) {\n /*\n * processes 8 bit RGBA and grayscale + alpha images\n */\n if (image.bits === 8) {\n pixels =\n image.pixelBitlength == 32\n ? new Uint32Array(image.decodePixels().buffer)\n : image.pixelBitlength == 16\n ? new Uint16Array(image.decodePixels().buffer)\n : new Uint8Array(image.decodePixels().buffer);\n len = pixels.length;\n imgData = new Uint8Array(len * image.colors);\n alphaData = new Uint8Array(len);\n var pDiff = image.pixelBitlength - image.bits;\n i = 0;\n n = 0;\n var pbl;\n\n for (; i < len; i++) {\n pixel = pixels[i];\n pbl = 0;\n\n while (pbl < pDiff) {\n imgData[n++] = (pixel >>> pbl) & 0xff;\n pbl = pbl + image.bits;\n }\n\n alphaData[i] = (pixel >>> pbl) & 0xff;\n }\n }\n\n /*\n * processes 16 bit RGBA and grayscale + alpha images\n */\n if (image.bits === 16) {\n pixels = new Uint32Array(image.decodePixels().buffer);\n len = pixels.length;\n imgData = new Uint8Array(\n len * (32 / image.pixelBitlength) * image.colors\n );\n alphaData = new Uint8Array(len * (32 / image.pixelBitlength));\n hasColors = image.colors > 1;\n i = 0;\n n = 0;\n var a = 0;\n\n while (i < len) {\n pixel = pixels[i++];\n\n imgData[n++] = (pixel >>> 0) & 0xff;\n\n if (hasColors) {\n imgData[n++] = (pixel >>> 16) & 0xff;\n\n pixel = pixels[i++];\n imgData[n++] = (pixel >>> 0) & 0xff;\n }\n\n alphaData[a++] = (pixel >>> 16) & 0xff;\n }\n bitsPerComponent = 8;\n }\n\n if (canCompress(compression)) {\n imageData = compressBytes(\n imgData,\n image.width * image.colors,\n image.colors,\n compression\n );\n smask = compressBytes(alphaData, image.width, 1, compression);\n } else {\n imageData = imgData;\n smask = alphaData;\n filter = undefined;\n }\n }\n\n /*\n * Indexed png. Each pixel is a palette index.\n */\n if (image.colorType === 3) {\n colorSpace = this.color_spaces.INDEXED;\n pal = image.palette;\n\n if (image.transparency.indexed) {\n var trans = image.transparency.indexed;\n var total = 0;\n i = 0;\n len = trans.length;\n\n for (; i < len; ++i) {\n total += trans[i];\n }\n\n total = total / 255;\n\n /*\n * a single color is specified as 100% transparent (0),\n * so we set trns to use a /Mask with that index\n */\n if (total === len - 1 && trans.indexOf(0) !== -1) {\n trns = [trans.indexOf(0)];\n\n /*\n * there's more than one colour within the palette that specifies\n * a transparency value less than 255, so we unroll the pixels to create an image sMask\n */\n } else if (total !== len) {\n pixels = image.decodePixels();\n alphaData = new Uint8Array(pixels.length);\n i = 0;\n len = pixels.length;\n\n for (; i < len; i++) {\n alphaData[i] = trans[pixels[i]];\n }\n\n smask = compressBytes(alphaData, image.width, 1);\n }\n }\n }\n\n var predictor = getPredictorFromCompression(compression);\n\n if (filter === this.decode.FLATE_DECODE) {\n decodeParameters = \"/Predictor \" + predictor + \" \";\n }\n decodeParameters +=\n \"/Colors \" +\n colors +\n \" /BitsPerComponent \" +\n bitsPerComponent +\n \" /Columns \" +\n image.width;\n\n if (\n this.__addimage__.isArrayBuffer(imageData) ||\n this.__addimage__.isArrayBufferView(imageData)\n ) {\n imageData = this.__addimage__.arrayBufferToBinaryString(imageData);\n }\n\n if (\n (smask && this.__addimage__.isArrayBuffer(smask)) ||\n this.__addimage__.isArrayBufferView(smask)\n ) {\n smask = this.__addimage__.arrayBufferToBinaryString(smask);\n }\n\n return {\n alias: alias,\n data: imageData,\n index: index,\n filter: filter,\n decodeParameters: decodeParameters,\n transparency: trns,\n palette: pal,\n sMask: smask,\n predictor: predictor,\n width: image.width,\n height: image.height,\n bitsPerComponent: bitsPerComponent,\n colorSpace: colorSpace\n };\n }\n };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2017 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { GifReader } from \"../libs/omggif.js\";\nimport { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\n\n/**\n * jsPDF Gif Support PlugIn\n *\n * @name gif_support\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n jsPDFAPI.processGIF89A = function(imageData, index, alias, compression) {\n var reader = new GifReader(imageData);\n var width = reader.width,\n height = reader.height;\n var qu = 100;\n var pixels = [];\n\n reader.decodeAndBlitFrameRGBA(0, pixels);\n var rawImageData = {\n data: pixels,\n width: width,\n height: height\n };\n\n var encoder = new JPEGEncoder(qu);\n var data = encoder.encode(rawImageData, qu);\n return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n };\n\n jsPDFAPI.processGIF87A = jsPDFAPI.processGIF89A;\n})(jsPDF.API);\n","import { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\nimport { BmpDecoder } from \"../libs/BMPDecoder.js\";\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @license\n * Copyright (c) 2018 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF bmp Support PlugIn\n * @name bmp_support\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n jsPDFAPI.processBMP = function(imageData, index, alias, compression) {\n var reader = new BmpDecoder(imageData, false);\n var width = reader.width,\n height = reader.height;\n var qu = 100;\n var pixels = reader.getData();\n\n var rawImageData = {\n data: pixels,\n width: width,\n height: height\n };\n\n var encoder = new JPEGEncoder(qu);\n var data = encoder.encode(rawImageData, qu);\n return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2019 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\nimport { WebPDecoder } from \"../libs/WebPDecoder.js\";\n\n/**\n * jsPDF webp Support PlugIn\n *\n * @name webp_support\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n jsPDFAPI.processWEBP = function(imageData, index, alias, compression) {\n var reader = new WebPDecoder(imageData, false);\n var width = reader.width,\n height = reader.height;\n var qu = 100;\n var pixels = reader.getData();\n\n var rawImageData = {\n data: pixels,\n width: width,\n height: height\n };\n\n var encoder = new JPEGEncoder(qu);\n var data = encoder.encode(rawImageData, qu);\n return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n };\n})(jsPDF.API);\n","/**\n * @license\n *\n * Copyright (c) 2021 Antti Palola, https://github.com/Pantura\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF RGBA array PlugIn\n * @name rgba_support\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n /**\n * @name processRGBA\n * @function\n *\n * Process RGBA Array. This is a one-dimension array with pixel data [red, green, blue, alpha, red, green, ...].\n * RGBA array data can be obtained from DOM canvas getImageData.\n * @ignore\n */\n jsPDFAPI.processRGBA = function(imageData, index, alias) {\n \"use strict\";\n\n var imagePixels = imageData.data;\n var length = imagePixels.length;\n // jsPDF takes alpha data separately so extract that.\n var rgbOut = new Uint8Array((length / 4) * 3);\n var alphaOut = new Uint8Array(length / 4);\n var outIndex = 0;\n var alphaIndex = 0;\n\n for (var i = 0; i < length; i += 4) {\n var r = imagePixels[i];\n var g = imagePixels[i + 1];\n var b = imagePixels[i + 2];\n var alpha = imagePixels[i + 3];\n rgbOut[outIndex++] = r;\n rgbOut[outIndex++] = g;\n rgbOut[outIndex++] = b;\n alphaOut[alphaIndex++] = alpha;\n }\n\n var rgbData = this.__addimage__.arrayBufferToBinaryString(rgbOut);\n var alphaData = this.__addimage__.arrayBufferToBinaryString(alphaOut);\n\n return {\n alpha: alphaData,\n data: rgbData,\n index: index,\n alias: alias,\n colorSpace: \"DeviceRGB\",\n bitsPerComponent: 8,\n width: imageData.width,\n height: imageData.height\n };\n };\n})(jsPDF.API);\n","/**\n * @license\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF setLanguage Plugin\n *\n * @name setLanguage\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n /**\n * Add Language Tag to the generated PDF\n *\n * @name setLanguage\n * @function\n * @param {string} langCode The Language code as ISO-639-1 (e.g. 'en') or as country language code (e.g. 'en-GB').\n * @returns {jsPDF}\n * @example\n * var doc = new jsPDF()\n * doc.text(10, 10, 'This is a test')\n * doc.setLanguage(\"en-US\")\n * doc.save('english.pdf')\n */\n jsPDFAPI.setLanguage = function(langCode) {\n \"use strict\";\n\n var langCodes = {\n af: \"Afrikaans\",\n sq: \"Albanian\",\n ar: \"Arabic (Standard)\",\n \"ar-DZ\": \"Arabic (Algeria)\",\n \"ar-BH\": \"Arabic (Bahrain)\",\n \"ar-EG\": \"Arabic (Egypt)\",\n \"ar-IQ\": \"Arabic (Iraq)\",\n \"ar-JO\": \"Arabic (Jordan)\",\n \"ar-KW\": \"Arabic (Kuwait)\",\n \"ar-LB\": \"Arabic (Lebanon)\",\n \"ar-LY\": \"Arabic (Libya)\",\n \"ar-MA\": \"Arabic (Morocco)\",\n \"ar-OM\": \"Arabic (Oman)\",\n \"ar-QA\": \"Arabic (Qatar)\",\n \"ar-SA\": \"Arabic (Saudi Arabia)\",\n \"ar-SY\": \"Arabic (Syria)\",\n \"ar-TN\": \"Arabic (Tunisia)\",\n \"ar-AE\": \"Arabic (U.A.E.)\",\n \"ar-YE\": \"Arabic (Yemen)\",\n an: \"Aragonese\",\n hy: \"Armenian\",\n as: \"Assamese\",\n ast: \"Asturian\",\n az: \"Azerbaijani\",\n eu: \"Basque\",\n be: \"Belarusian\",\n bn: \"Bengali\",\n bs: \"Bosnian\",\n br: \"Breton\",\n bg: \"Bulgarian\",\n my: \"Burmese\",\n ca: \"Catalan\",\n ch: \"Chamorro\",\n ce: \"Chechen\",\n zh: \"Chinese\",\n \"zh-HK\": \"Chinese (Hong Kong)\",\n \"zh-CN\": \"Chinese (PRC)\",\n \"zh-SG\": \"Chinese (Singapore)\",\n \"zh-TW\": \"Chinese (Taiwan)\",\n cv: \"Chuvash\",\n co: \"Corsican\",\n cr: \"Cree\",\n hr: \"Croatian\",\n cs: \"Czech\",\n da: \"Danish\",\n nl: \"Dutch (Standard)\",\n \"nl-BE\": \"Dutch (Belgian)\",\n en: \"English\",\n \"en-AU\": \"English (Australia)\",\n \"en-BZ\": \"English (Belize)\",\n \"en-CA\": \"English (Canada)\",\n \"en-IE\": \"English (Ireland)\",\n \"en-JM\": \"English (Jamaica)\",\n \"en-NZ\": \"English (New Zealand)\",\n \"en-PH\": \"English (Philippines)\",\n \"en-ZA\": \"English (South Africa)\",\n \"en-TT\": \"English (Trinidad & Tobago)\",\n \"en-GB\": \"English (United Kingdom)\",\n \"en-US\": \"English (United States)\",\n \"en-ZW\": \"English (Zimbabwe)\",\n eo: \"Esperanto\",\n et: \"Estonian\",\n fo: \"Faeroese\",\n fj: \"Fijian\",\n fi: \"Finnish\",\n fr: \"French (Standard)\",\n \"fr-BE\": \"French (Belgium)\",\n \"fr-CA\": \"French (Canada)\",\n \"fr-FR\": \"French (France)\",\n \"fr-LU\": \"French (Luxembourg)\",\n \"fr-MC\": \"French (Monaco)\",\n \"fr-CH\": \"French (Switzerland)\",\n fy: \"Frisian\",\n fur: \"Friulian\",\n gd: \"Gaelic (Scots)\",\n \"gd-IE\": \"Gaelic (Irish)\",\n gl: \"Galacian\",\n ka: \"Georgian\",\n de: \"German (Standard)\",\n \"de-AT\": \"German (Austria)\",\n \"de-DE\": \"German (Germany)\",\n \"de-LI\": \"German (Liechtenstein)\",\n \"de-LU\": \"German (Luxembourg)\",\n \"de-CH\": \"German (Switzerland)\",\n el: \"Greek\",\n gu: \"Gujurati\",\n ht: \"Haitian\",\n he: \"Hebrew\",\n hi: \"Hindi\",\n hu: \"Hungarian\",\n is: \"Icelandic\",\n id: \"Indonesian\",\n iu: \"Inuktitut\",\n ga: \"Irish\",\n it: \"Italian (Standard)\",\n \"it-CH\": \"Italian (Switzerland)\",\n ja: \"Japanese\",\n kn: \"Kannada\",\n ks: \"Kashmiri\",\n kk: \"Kazakh\",\n km: \"Khmer\",\n ky: \"Kirghiz\",\n tlh: \"Klingon\",\n ko: \"Korean\",\n \"ko-KP\": \"Korean (North Korea)\",\n \"ko-KR\": \"Korean (South Korea)\",\n la: \"Latin\",\n lv: \"Latvian\",\n lt: \"Lithuanian\",\n lb: \"Luxembourgish\",\n mk: \"North Macedonia\",\n ms: \"Malay\",\n ml: \"Malayalam\",\n mt: \"Maltese\",\n mi: \"Maori\",\n mr: \"Marathi\",\n mo: \"Moldavian\",\n nv: \"Navajo\",\n ng: \"Ndonga\",\n ne: \"Nepali\",\n no: \"Norwegian\",\n nb: \"Norwegian (Bokmal)\",\n nn: \"Norwegian (Nynorsk)\",\n oc: \"Occitan\",\n or: \"Oriya\",\n om: \"Oromo\",\n fa: \"Persian\",\n \"fa-IR\": \"Persian/Iran\",\n pl: \"Polish\",\n pt: \"Portuguese\",\n \"pt-BR\": \"Portuguese (Brazil)\",\n pa: \"Punjabi\",\n \"pa-IN\": \"Punjabi (India)\",\n \"pa-PK\": \"Punjabi (Pakistan)\",\n qu: \"Quechua\",\n rm: \"Rhaeto-Romanic\",\n ro: \"Romanian\",\n \"ro-MO\": \"Romanian (Moldavia)\",\n ru: \"Russian\",\n \"ru-MO\": \"Russian (Moldavia)\",\n sz: \"Sami (Lappish)\",\n sg: \"Sango\",\n sa: \"Sanskrit\",\n sc: \"Sardinian\",\n sd: \"Sindhi\",\n si: \"Singhalese\",\n sr: \"Serbian\",\n sk: \"Slovak\",\n sl: \"Slovenian\",\n so: \"Somani\",\n sb: \"Sorbian\",\n es: \"Spanish\",\n \"es-AR\": \"Spanish (Argentina)\",\n \"es-BO\": \"Spanish (Bolivia)\",\n \"es-CL\": \"Spanish (Chile)\",\n \"es-CO\": \"Spanish (Colombia)\",\n \"es-CR\": \"Spanish (Costa Rica)\",\n \"es-DO\": \"Spanish (Dominican Republic)\",\n \"es-EC\": \"Spanish (Ecuador)\",\n \"es-SV\": \"Spanish (El Salvador)\",\n \"es-GT\": \"Spanish (Guatemala)\",\n \"es-HN\": \"Spanish (Honduras)\",\n \"es-MX\": \"Spanish (Mexico)\",\n \"es-NI\": \"Spanish (Nicaragua)\",\n \"es-PA\": \"Spanish (Panama)\",\n \"es-PY\": \"Spanish (Paraguay)\",\n \"es-PE\": \"Spanish (Peru)\",\n \"es-PR\": \"Spanish (Puerto Rico)\",\n \"es-ES\": \"Spanish (Spain)\",\n \"es-UY\": \"Spanish (Uruguay)\",\n \"es-VE\": \"Spanish (Venezuela)\",\n sx: \"Sutu\",\n sw: \"Swahili\",\n sv: \"Swedish\",\n \"sv-FI\": \"Swedish (Finland)\",\n \"sv-SV\": \"Swedish (Sweden)\",\n ta: \"Tamil\",\n tt: \"Tatar\",\n te: \"Teluga\",\n th: \"Thai\",\n tig: \"Tigre\",\n ts: \"Tsonga\",\n tn: \"Tswana\",\n tr: \"Turkish\",\n tk: \"Turkmen\",\n uk: \"Ukrainian\",\n hsb: \"Upper Sorbian\",\n ur: \"Urdu\",\n ve: \"Venda\",\n vi: \"Vietnamese\",\n vo: \"Volapuk\",\n wa: \"Walloon\",\n cy: \"Welsh\",\n xh: \"Xhosa\",\n ji: \"Yiddish\",\n zu: \"Zulu\"\n };\n\n if (this.internal.languageSettings === undefined) {\n this.internal.languageSettings = {};\n this.internal.languageSettings.isSubscribed = false;\n }\n\n if (langCodes[langCode] !== undefined) {\n this.internal.languageSettings.languageCode = langCode;\n if (this.internal.languageSettings.isSubscribed === false) {\n this.internal.events.subscribe(\"putCatalog\", function() {\n this.internal.write(\n \"/Lang (\" + this.internal.languageSettings.languageCode + \")\"\n );\n });\n this.internal.languageSettings.isSubscribed = true;\n }\n }\n return this;\n };\n})(jsPDF.API);\n","/** @license\n jsPDF standard_fonts_metrics plugin\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n * MIT license.\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n * \n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * This file adds the standard font metrics to jsPDF.\n *\n * Font metrics data is reprocessed derivative of contents of\n * \"Font Metrics for PDF Core 14 Fonts\" package, which exhibits the following copyright and license:\n *\n * Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.\n *\n * This file and the 14 PostScript(R) AFM files it accompanies may be used,\n * copied, and distributed for any purpose and without charge, with or without\n * modification, provided that all copyright notices are retained; that the AFM\n * files are not distributed without this file; that all modifications to this\n * file or any of the AFM files are prominently noted in the modified file(s);\n * and that this paragraph is not modified. Adobe Systems has no responsibility\n * or obligation to support the use of the AFM files.\n *\n * @name standard_fonts_metrics\n * @module\n */\n\n(function(API) {\n \"use strict\";\n API.__fontmetrics__ = API.__fontmetrics__ || {};\n\n var decoded = \"0123456789abcdef\",\n encoded = \"klmnopqrstuvwxyz\",\n mappingUncompress = {},\n mappingCompress = {};\n\n for (var i = 0; i < encoded.length; i++) {\n mappingUncompress[encoded[i]] = decoded[i];\n mappingCompress[decoded[i]] = encoded[i];\n }\n\n var hex = function(value) {\n return \"0x\" + parseInt(value, 10).toString(16);\n };\n\n var compress = (API.__fontmetrics__.compress = function(data) {\n var vals = [\"{\"];\n var value, keystring, valuestring, numberprefix;\n\n for (var key in data) {\n value = data[key];\n\n if (!isNaN(parseInt(key, 10))) {\n key = parseInt(key, 10);\n keystring = hex(key).slice(2);\n keystring =\n keystring.slice(0, -1) + mappingCompress[keystring.slice(-1)];\n } else {\n keystring = \"'\" + key + \"'\";\n }\n\n if (typeof value == \"number\") {\n if (value < 0) {\n valuestring = hex(value).slice(3);\n numberprefix = \"-\";\n } else {\n valuestring = hex(value).slice(2);\n numberprefix = \"\";\n }\n valuestring =\n numberprefix +\n valuestring.slice(0, -1) +\n mappingCompress[valuestring.slice(-1)];\n } else {\n if (typeof value === \"object\") {\n valuestring = compress(value);\n } else {\n throw new Error(\n \"Don't know what to do with value type \" + typeof value + \".\"\n );\n }\n }\n vals.push(keystring + valuestring);\n }\n vals.push(\"}\");\n return vals.join(\"\");\n });\n\n /**\n * Uncompresses data compressed into custom, base16-like format.\n *\n * @public\n * @function\n * @param\n * @returns {Type}\n */\n var uncompress = (API.__fontmetrics__.uncompress = function(data) {\n if (typeof data !== \"string\") {\n throw new Error(\"Invalid argument passed to uncompress.\");\n }\n\n var output = {},\n sign = 1,\n stringparts, // undef. will be [] in string mode\n activeobject = output,\n parentchain = [],\n parent_key_pair,\n keyparts = \"\",\n valueparts = \"\",\n key, // undef. will be Truthy when Key is resolved.\n datalen = data.length - 1, // stripping ending }\n ch;\n\n for (var i = 1; i < datalen; i += 1) {\n // - { } ' are special.\n\n ch = data[i];\n\n if (ch == \"'\") {\n if (stringparts) {\n // end of string mode\n key = stringparts.join(\"\");\n stringparts = undefined;\n } else {\n // start of string mode\n stringparts = [];\n }\n } else if (stringparts) {\n stringparts.push(ch);\n } else if (ch == \"{\") {\n // start of object\n parentchain.push([activeobject, key]);\n activeobject = {};\n key = undefined;\n } else if (ch == \"}\") {\n // end of object\n parent_key_pair = parentchain.pop();\n parent_key_pair[0][parent_key_pair[1]] = activeobject;\n key = undefined;\n activeobject = parent_key_pair[0];\n } else if (ch == \"-\") {\n sign = -1;\n } else {\n // must be number\n if (key === undefined) {\n if (mappingUncompress.hasOwnProperty(ch)) {\n keyparts += mappingUncompress[ch];\n key = parseInt(keyparts, 16) * sign;\n sign = +1;\n keyparts = \"\";\n } else {\n keyparts += ch;\n }\n } else {\n if (mappingUncompress.hasOwnProperty(ch)) {\n valueparts += mappingUncompress[ch];\n activeobject[key] = parseInt(valueparts, 16) * sign;\n sign = +1;\n key = undefined;\n valueparts = \"\";\n } else {\n valueparts += ch;\n }\n }\n }\n }\n return output;\n });\n\n // encoding = 'Unicode'\n // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE. NO clever BOM behavior\n // Actual 16bit char codes used.\n // no multi-byte logic here\n\n // Unicode characters to WinAnsiEncoding:\n // {402: 131, 8211: 150, 8212: 151, 8216: 145, 8217: 146, 8218: 130, 8220: 147, 8221: 148, 8222: 132, 8224: 134, 8225: 135, 8226: 149, 8230: 133, 8364: 128, 8240:137, 8249: 139, 8250: 155, 710: 136, 8482: 153, 338: 140, 339: 156, 732: 152, 352: 138, 353: 154, 376: 159, 381: 142, 382: 158}\n // as you can see, all Unicode chars are outside of 0-255 range. No char code conflicts.\n // this means that you can give Win cp1252 encoded strings to jsPDF for rendering directly\n // as well as give strings with some (supported by these fonts) Unicode characters and\n // these will be mapped to win cp1252\n // for example, you can send char code (cp1252) 0x80 or (unicode) 0x20AC, getting \"Euro\" glyph displayed in both cases.\n\n var encodingBlock = {\n codePages: [\"WinAnsiEncoding\"],\n WinAnsiEncoding: uncompress(\n \"{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}\"\n )\n };\n var encodings = {\n Unicode: {\n Courier: encodingBlock,\n \"Courier-Bold\": encodingBlock,\n \"Courier-BoldOblique\": encodingBlock,\n \"Courier-Oblique\": encodingBlock,\n Helvetica: encodingBlock,\n \"Helvetica-Bold\": encodingBlock,\n \"Helvetica-BoldOblique\": encodingBlock,\n \"Helvetica-Oblique\": encodingBlock,\n \"Times-Roman\": encodingBlock,\n \"Times-Bold\": encodingBlock,\n \"Times-BoldItalic\": encodingBlock,\n \"Times-Italic\": encodingBlock\n //\t, 'Symbol'\n //\t, 'ZapfDingbats'\n }\n };\n\n var fontMetrics = {\n Unicode: {\n // all sizing numbers are n/fontMetricsFractionOf = one font size unit\n // this means that if fontMetricsFractionOf = 1000, and letter A's width is 476, it's\n // width is 476/1000 or 47.6% of its height (regardless of font size)\n // At this time this value applies to \"widths\" and \"kerning\" numbers.\n\n // char code 0 represents \"default\" (average) width - use it for chars missing in this table.\n // key 'fof' represents the \"fontMetricsFractionOf\" value\n\n \"Courier-Oblique\": uncompress(\n \"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"\n ),\n \"Times-BoldItalic\": uncompress(\n \"{'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}}}\"\n ),\n \"Helvetica-Bold\": uncompress(\n \"{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2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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}}}\"\n ),\n Courier: uncompress(\"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"),\n \"Courier-BoldOblique\": uncompress(\n \"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"\n ),\n \"Times-Bold\": uncompress(\n \"{'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}}}\"\n ),\n Symbol: uncompress(\n \"{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}\"\n ),\n Helvetica: uncompress(\n \"{'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}}}\"\n ),\n \"Helvetica-BoldOblique\": uncompress(\n \"{'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}}}\"\n ),\n ZapfDingbats: uncompress(\"{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}\"),\n \"Courier-Bold\": uncompress(\"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"),\n \"Times-Italic\": uncompress(\n \"{'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}}}\"\n ),\n \"Times-Roman\": uncompress(\n \"{'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}}}\"\n ),\n \"Helvetica-Oblique\": uncompress(\n \"{'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}}}\"\n )\n }\n };\n\n /*\n\tThis event handler is fired when a new jsPDF object is initialized\n\tThis event handler appends metrics data to standard fonts within\n\tthat jsPDF instance. The metrics are mapped over Unicode character\n\tcodes, NOT CIDs or other codes matching the StandardEncoding table of the\n\tstandard PDF fonts.\n\tFuture:\n\tAlso included is the encoding maping table, converting Unicode (UCS-2, UTF-16)\n\tchar codes to StandardEncoding character codes. The encoding table is to be used\n\tsomewhere around \"pdfEscape\" call.\n\t*/\n API.events.push([\n \"addFont\",\n function(data) {\n var font = data.font;\n\n var metrics = fontMetrics[\"Unicode\"][font.postScriptName];\n if (metrics) {\n font.metadata[\"Unicode\"] = {};\n font.metadata[\"Unicode\"].widths = metrics.widths;\n font.metadata[\"Unicode\"].kerning = metrics.kerning;\n }\n\n var encodingBlock = encodings[\"Unicode\"][font.postScriptName];\n if (encodingBlock) {\n font.metadata[\"Unicode\"].encoding = encodingBlock;\n font.encoding = encodingBlock.codePages[0];\n }\n }\n ]); // end of adding event handler\n})(jsPDF.API);\n","/**\n * @license\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { atob } from \"../libs/AtobBtoa.js\";\n\n/**\n * @name ttfsupport\n * @module\n */\n(function(jsPDF) {\n \"use strict\";\n\n var binaryStringToUint8Array = function(binary_string) {\n var len = binary_string.length;\n var bytes = new Uint8Array(len);\n for (var i = 0; i < len; i++) {\n bytes[i] = binary_string.charCodeAt(i);\n }\n return bytes;\n };\n\n var addFont = function(font, file) {\n // eslint-disable-next-line no-control-regex\n if (/^\\x00\\x01\\x00\\x00/.test(file)) {\n file = binaryStringToUint8Array(file);\n } else {\n file = binaryStringToUint8Array(atob(file));\n }\n font.metadata = jsPDF.API.TTFFont.open(file);\n font.metadata.Unicode = font.metadata.Unicode || {\n encoding: {},\n kerning: {},\n widths: []\n };\n font.metadata.glyIdsUsed = [0];\n };\n\n jsPDF.API.events.push([\n \"addFont\",\n function(data) {\n var file = undefined;\n var font = data.font;\n var instance = data.instance;\n if (font.isStandardFont) {\n return;\n }\n if (typeof instance !== \"undefined\") {\n if (instance.existsFileInVFS(font.postScriptName) === false) {\n file = instance.loadFile(font.postScriptName);\n } else {\n file = instance.getFileFromVFS(font.postScriptName);\n }\n if (typeof file !== \"string\") {\n throw new Error(\n \"Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('\" +\n font.postScriptName +\n \"').\"\n );\n }\n addFont(font, file);\n } else {\n throw new Error(\n \"Font does not exist in vFS, import fonts or remove declaration doc.addFont('\" +\n font.postScriptName +\n \"').\"\n );\n }\n }\n ]); // end of adding event handler\n})(jsPDF);\n","/** @license\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { console } from \"../libs/console.js\";\nimport { globalObject } from \"../libs/globalObject.js\";\n\n/**\n * jsPDF SVG plugin\n *\n * @name svg\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n function loadCanvg() {\n return (function() {\n if (globalObject[\"canvg\"]) {\n return Promise.resolve(globalObject[\"canvg\"]);\n }\n\n return import(\"canvg\");\n\n })()\n .catch(function(e) {\n return Promise.reject(new Error(\"Could not load canvg: \" + e));\n })\n .then(function(canvg) {\n return canvg.default ? canvg.default : canvg;\n });\n }\n\n /**\n * Parses SVG XML and saves it as image into the PDF.\n *\n * Depends on canvas-element and canvg\n *\n * @name addSvgAsImage\n * @public\n * @function\n * @param {string} SVG-Data as Text\n * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\n * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\n * @param {number} width of SVG-Image (in units declared at inception of PDF document)\n * @param {number} height of SVG-Image (in units declared at inception of PDF document)\n * @param {string} alias of SVG-Image (if used multiple times)\n * @param {string} compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'\n * @param {number} rotation of the image in degrees (0-359)\n *\n * @returns jsPDF jsPDF-instance\n */\n jsPDFAPI.addSvgAsImage = function(\n svg,\n x,\n y,\n w,\n h,\n alias,\n compression,\n rotation\n ) {\n if (isNaN(x) || isNaN(y)) {\n console.error(\"jsPDF.addSvgAsImage: Invalid coordinates\", arguments);\n throw new Error(\"Invalid coordinates passed to jsPDF.addSvgAsImage\");\n }\n\n if (isNaN(w) || isNaN(h)) {\n console.error(\"jsPDF.addSvgAsImage: Invalid measurements\", arguments);\n throw new Error(\n \"Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage\"\n );\n }\n\n var canvas = document.createElement(\"canvas\");\n canvas.width = w;\n canvas.height = h;\n var ctx = canvas.getContext(\"2d\");\n ctx.fillStyle = \"#fff\"; /// set white fill style\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n var options = {\n ignoreMouse: true,\n ignoreAnimation: true,\n ignoreDimensions: true\n };\n var doc = this;\n return loadCanvg()\n .then(\n function(canvg) {\n return canvg.fromString(ctx, svg, options);\n },\n function() {\n return Promise.reject(new Error(\"Could not load canvg.\"));\n }\n )\n .then(function(instance) {\n return instance.render(options);\n })\n .then(function() {\n doc.addImage(\n canvas.toDataURL(\"image/jpeg\", 1.0),\n x,\n y,\n w,\n h,\n compression,\n rotation\n );\n });\n };\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF total_pages plugin\n * @name total_pages\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n /**\n * @name putTotalPages\n * @function\n * @param {string} pageExpression Regular Expression\n * @returns {jsPDF} jsPDF-instance\n */\n\n jsPDFAPI.putTotalPages = function(pageExpression) {\n \"use strict\";\n\n var replaceExpression;\n var totalNumberOfPages = 0;\n if (parseInt(this.internal.getFont().id.substr(1), 10) < 15) {\n replaceExpression = new RegExp(pageExpression, \"g\");\n totalNumberOfPages = this.internal.getNumberOfPages();\n } else {\n replaceExpression = new RegExp(\n this.pdfEscape16(pageExpression, this.internal.getFont()),\n \"g\"\n );\n totalNumberOfPages = this.pdfEscape16(\n this.internal.getNumberOfPages() + \"\",\n this.internal.getFont()\n );\n }\n\n for (var n = 1; n <= this.internal.getNumberOfPages(); n++) {\n for (var i = 0; i < this.internal.pages[n].length; i++) {\n this.internal.pages[n][i] = this.internal.pages[n][i].replace(\n replaceExpression,\n totalNumberOfPages\n );\n }\n }\n\n return this;\n };\n})(jsPDF.API);\n","/**\n * @license\n * jsPDF viewerPreferences Plugin\n * @author Aras Abbasi (github.com/arasabbasi)\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * Adds the ability to set ViewerPreferences and by thus\n * controlling the way the document is to be presented on the\n * screen or in print.\n * @name viewerpreferences\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n /**\n * Set the ViewerPreferences of the generated PDF\n *\n * @name viewerPreferences\n * @function\n * @public\n * @param {Object} options Array with the ViewerPreferences
    \n * Example: doc.viewerPreferences({\"FitWindow\":true});
    \n *
    \n * You can set following preferences:
    \n *
    \n * HideToolbar (boolean)
    \n * Default value: false
    \n *
    \n * HideMenubar (boolean)
    \n * Default value: false.
    \n *
    \n * HideWindowUI (boolean)
    \n * Default value: false.
    \n *
    \n * FitWindow (boolean)
    \n * Default value: false.
    \n *
    \n * CenterWindow (boolean)
    \n * Default value: false
    \n *
    \n * DisplayDocTitle (boolean)
    \n * Default value: false.
    \n *
    \n * NonFullScreenPageMode (string)
    \n * Possible values: UseNone, UseOutlines, UseThumbs, UseOC
    \n * Default value: UseNone
    \n *
    \n * Direction (string)
    \n * Possible values: L2R, R2L
    \n * Default value: L2R.
    \n *
    \n * ViewArea (string)
    \n * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox
    \n * Default value: CropBox.
    \n *
    \n * ViewClip (string)
    \n * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox
    \n * Default value: CropBox
    \n *
    \n * PrintArea (string)
    \n * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox
    \n * Default value: CropBox
    \n *
    \n * PrintClip (string)
    \n * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox
    \n * Default value: CropBox.
    \n *
    \n * PrintScaling (string)
    \n * Possible values: AppDefault, None
    \n * Default value: AppDefault.
    \n *
    \n * Duplex (string)
    \n * Possible values: Simplex, DuplexFlipLongEdge, DuplexFlipShortEdge\n * Default value: none
    \n *
    \n * PickTrayByPDFSize (boolean)
    \n * Default value: false
    \n *
    \n * PrintPageRange (Array)
    \n * Example: [[1,5], [7,9]]
    \n * Default value: as defined by PDF viewer application
    \n *
    \n * NumCopies (Number)
    \n * Possible values: 1, 2, 3, 4, 5
    \n * Default value: 1
    \n *
    \n * For more information see the PDF Reference, sixth edition on Page 577\n * @param {boolean} doReset True to reset the settings\n * @function\n * @returns jsPDF jsPDF-instance\n * @example\n * var doc = new jsPDF()\n * doc.text('This is a test', 10, 10)\n * doc.viewerPreferences({'FitWindow': true}, true)\n * doc.save(\"viewerPreferences.pdf\")\n *\n * // Example printing 10 copies, using cropbox, and hiding UI.\n * doc.viewerPreferences({\n * 'HideWindowUI': true,\n * 'PrintArea': 'CropBox',\n * 'NumCopies': 10\n * })\n */\n jsPDFAPI.viewerPreferences = function(options, doReset) {\n options = options || {};\n doReset = doReset || false;\n\n var configuration;\n var configurationTemplate = {\n HideToolbar: {\n defaultValue: false,\n value: false,\n type: \"boolean\",\n explicitSet: false,\n valueSet: [true, false],\n pdfVersion: 1.3\n },\n HideMenubar: {\n defaultValue: false,\n value: false,\n type: \"boolean\",\n explicitSet: false,\n valueSet: [true, false],\n pdfVersion: 1.3\n },\n HideWindowUI: {\n defaultValue: false,\n value: false,\n type: \"boolean\",\n explicitSet: false,\n valueSet: [true, false],\n pdfVersion: 1.3\n },\n FitWindow: {\n defaultValue: false,\n value: false,\n type: \"boolean\",\n explicitSet: false,\n valueSet: [true, false],\n pdfVersion: 1.3\n },\n CenterWindow: {\n defaultValue: false,\n value: false,\n type: \"boolean\",\n explicitSet: false,\n valueSet: [true, false],\n pdfVersion: 1.3\n },\n DisplayDocTitle: {\n defaultValue: false,\n value: false,\n type: \"boolean\",\n explicitSet: false,\n valueSet: [true, false],\n pdfVersion: 1.4\n },\n NonFullScreenPageMode: {\n defaultValue: \"UseNone\",\n value: \"UseNone\",\n type: \"name\",\n explicitSet: false,\n valueSet: [\"UseNone\", \"UseOutlines\", \"UseThumbs\", \"UseOC\"],\n pdfVersion: 1.3\n },\n Direction: {\n defaultValue: \"L2R\",\n value: \"L2R\",\n type: \"name\",\n explicitSet: false,\n valueSet: [\"L2R\", \"R2L\"],\n pdfVersion: 1.3\n },\n ViewArea: {\n defaultValue: \"CropBox\",\n value: \"CropBox\",\n type: \"name\",\n explicitSet: false,\n valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n pdfVersion: 1.4\n },\n ViewClip: {\n defaultValue: \"CropBox\",\n value: \"CropBox\",\n type: \"name\",\n explicitSet: false,\n valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n pdfVersion: 1.4\n },\n PrintArea: {\n defaultValue: \"CropBox\",\n value: \"CropBox\",\n type: \"name\",\n explicitSet: false,\n valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n pdfVersion: 1.4\n },\n PrintClip: {\n defaultValue: \"CropBox\",\n value: \"CropBox\",\n type: \"name\",\n explicitSet: false,\n valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n pdfVersion: 1.4\n },\n PrintScaling: {\n defaultValue: \"AppDefault\",\n value: \"AppDefault\",\n type: \"name\",\n explicitSet: false,\n valueSet: [\"AppDefault\", \"None\"],\n pdfVersion: 1.6\n },\n Duplex: {\n defaultValue: \"\",\n value: \"none\",\n type: \"name\",\n explicitSet: false,\n valueSet: [\n \"Simplex\",\n \"DuplexFlipShortEdge\",\n \"DuplexFlipLongEdge\",\n \"none\"\n ],\n pdfVersion: 1.7\n },\n PickTrayByPDFSize: {\n defaultValue: false,\n value: false,\n type: \"boolean\",\n explicitSet: false,\n valueSet: [true, false],\n pdfVersion: 1.7\n },\n PrintPageRange: {\n defaultValue: \"\",\n value: \"\",\n type: \"array\",\n explicitSet: false,\n valueSet: null,\n pdfVersion: 1.7\n },\n NumCopies: {\n defaultValue: 1,\n value: 1,\n type: \"integer\",\n explicitSet: false,\n valueSet: null,\n pdfVersion: 1.7\n }\n };\n\n var configurationKeys = Object.keys(configurationTemplate);\n\n var rangeArray = [];\n var i = 0;\n var j = 0;\n var k = 0;\n var isValid;\n\n var method;\n var value;\n\n function arrayContainsElement(array, element) {\n var iterator;\n var result = false;\n\n for (iterator = 0; iterator < array.length; iterator += 1) {\n if (array[iterator] === element) {\n result = true;\n }\n }\n return result;\n }\n\n if (this.internal.viewerpreferences === undefined) {\n this.internal.viewerpreferences = {};\n this.internal.viewerpreferences.configuration = JSON.parse(\n JSON.stringify(configurationTemplate)\n );\n this.internal.viewerpreferences.isSubscribed = false;\n }\n configuration = this.internal.viewerpreferences.configuration;\n\n if (options === \"reset\" || doReset === true) {\n var len = configurationKeys.length;\n\n for (k = 0; k < len; k += 1) {\n configuration[configurationKeys[k]].value =\n configuration[configurationKeys[k]].defaultValue;\n configuration[configurationKeys[k]].explicitSet = false;\n }\n }\n\n if (typeof options === \"object\") {\n for (method in options) {\n value = options[method];\n if (\n arrayContainsElement(configurationKeys, method) &&\n value !== undefined\n ) {\n if (\n configuration[method].type === \"boolean\" &&\n typeof value === \"boolean\"\n ) {\n configuration[method].value = value;\n } else if (\n configuration[method].type === \"name\" &&\n arrayContainsElement(configuration[method].valueSet, value)\n ) {\n configuration[method].value = value;\n } else if (\n configuration[method].type === \"integer\" &&\n Number.isInteger(value)\n ) {\n configuration[method].value = value;\n } else if (configuration[method].type === \"array\") {\n for (i = 0; i < value.length; i += 1) {\n isValid = true;\n if (value[i].length === 1 && typeof value[i][0] === \"number\") {\n rangeArray.push(String(value[i] - 1));\n } else if (value[i].length > 1) {\n for (j = 0; j < value[i].length; j += 1) {\n if (typeof value[i][j] !== \"number\") {\n isValid = false;\n }\n }\n if (isValid === true) {\n rangeArray.push([value[i][0] - 1, value[i][1] - 1].join(\" \"));\n }\n }\n }\n configuration[method].value = \"[\" + rangeArray.join(\" \") + \"]\";\n } else {\n configuration[method].value = configuration[method].defaultValue;\n }\n\n configuration[method].explicitSet = true;\n }\n }\n }\n\n if (this.internal.viewerpreferences.isSubscribed === false) {\n this.internal.events.subscribe(\"putCatalog\", function() {\n var pdfDict = [];\n var vPref;\n for (vPref in configuration) {\n if (configuration[vPref].explicitSet === true) {\n if (configuration[vPref].type === \"name\") {\n pdfDict.push(\"/\" + vPref + \" /\" + configuration[vPref].value);\n } else {\n pdfDict.push(\"/\" + vPref + \" \" + configuration[vPref].value);\n }\n }\n }\n if (pdfDict.length !== 0) {\n this.internal.write(\n \"/ViewerPreferences\\n<<\\n\" + pdfDict.join(\"\\n\") + \"\\n>>\"\n );\n }\n });\n this.internal.viewerpreferences.isSubscribed = true;\n }\n\n this.internal.viewerpreferences.configuration = configuration;\n return this;\n };\n})(jsPDF.API);\n","/** ====================================================================\n * @license\n * jsPDF XMP metadata plugin\n * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name xmp_metadata\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n var postPutResources = function() {\n var xmpmeta_beginning = '';\n var rdf_beginning =\n '';\n var rdf_ending = \"\";\n var xmpmeta_ending = \"\";\n var utf8_xmpmeta_beginning = unescape(\n encodeURIComponent(xmpmeta_beginning)\n );\n var utf8_rdf_beginning = unescape(encodeURIComponent(rdf_beginning));\n var utf8_metadata = unescape(\n encodeURIComponent(this.internal.__metadata__.metadata)\n );\n var utf8_rdf_ending = unescape(encodeURIComponent(rdf_ending));\n var utf8_xmpmeta_ending = unescape(encodeURIComponent(xmpmeta_ending));\n\n var total_len =\n utf8_rdf_beginning.length +\n utf8_metadata.length +\n utf8_rdf_ending.length +\n utf8_xmpmeta_beginning.length +\n utf8_xmpmeta_ending.length;\n\n this.internal.__metadata__.metadata_object_number = this.internal.newObject();\n this.internal.write(\n \"<< /Type /Metadata /Subtype /XML /Length \" + total_len + \" >>\"\n );\n this.internal.write(\"stream\");\n this.internal.write(\n utf8_xmpmeta_beginning +\n utf8_rdf_beginning +\n utf8_metadata +\n utf8_rdf_ending +\n utf8_xmpmeta_ending\n );\n this.internal.write(\"endstream\");\n this.internal.write(\"endobj\");\n };\n\n var putCatalog = function() {\n if (this.internal.__metadata__.metadata_object_number) {\n this.internal.write(\n \"/Metadata \" +\n this.internal.__metadata__.metadata_object_number +\n \" 0 R\"\n );\n }\n };\n\n /**\n * Adds XMP formatted metadata to PDF\n *\n * @name addMetadata\n * @function\n * @param {String} metadata The actual metadata to be added. The metadata shall be stored as XMP simple value. Note that if the metadata string contains XML markup characters \"<\", \">\" or \"&\", those characters should be written using XML entities.\n * @param {String} namespaceuri Sets the namespace URI for the metadata. Last character should be slash or hash.\n * @returns {jsPDF} jsPDF-instance\n */\n jsPDFAPI.addMetadata = function(metadata, namespaceuri) {\n if (typeof this.internal.__metadata__ === \"undefined\") {\n this.internal.__metadata__ = {\n metadata: metadata,\n namespaceuri: namespaceuri || \"http://jspdf.default.namespaceuri/\"\n };\n this.internal.events.subscribe(\"putCatalog\", putCatalog);\n\n this.internal.events.subscribe(\"postPutResources\", postPutResources);\n }\n return this;\n };\n})(jsPDF.API);\n","import { jsPDF } from \"../jspdf.js\";\nimport { toPDFName } from \"../libs/pdfname.js\";\n\n/**\n * @name utf8\n * @module\n */\n(function(jsPDF) {\n \"use strict\";\n var jsPDFAPI = jsPDF.API;\n\n /***************************************************************************************************/\n /* function : pdfEscape16 */\n /* comment : The character id of a 2-byte string is converted to a hexadecimal number by obtaining */\n /* the corresponding glyph id and width, and then adding padding to the string. */\n /***************************************************************************************************/\n var pdfEscape16 = (jsPDFAPI.pdfEscape16 = function(text, font) {\n var widths = font.metadata.Unicode.widths;\n var padz = [\"\", \"0\", \"00\", \"000\", \"0000\"];\n var ar = [\"\"];\n for (var i = 0, l = text.length, t; i < l; ++i) {\n t = font.metadata.characterToGlyph(text.charCodeAt(i));\n font.metadata.glyIdsUsed.push(t);\n font.metadata.toUnicode[t] = text.charCodeAt(i);\n if (widths.indexOf(t) == -1) {\n widths.push(t);\n widths.push([parseInt(font.metadata.widthOfGlyph(t), 10)]);\n }\n if (t == \"0\") {\n //Spaces are not allowed in cmap.\n return ar.join(\"\");\n } else {\n t = t.toString(16);\n ar.push(padz[4 - t.length], t);\n }\n }\n return ar.join(\"\");\n });\n\n var toUnicodeCmap = function(map) {\n var code, codes, range, unicode, unicodeMap, _i, _len;\n unicodeMap =\n \"/CIDInit /ProcSet findresource begin\\n12 dict begin\\nbegincmap\\n/CIDSystemInfo <<\\n /Registry (Adobe)\\n /Ordering (UCS)\\n /Supplement 0\\n>> def\\n/CMapName /Adobe-Identity-UCS def\\n/CMapType 2 def\\n1 begincodespacerange\\n<0000>\\nendcodespacerange\";\n codes = Object.keys(map).sort(function(a, b) {\n return a - b;\n });\n\n range = [];\n for (_i = 0, _len = codes.length; _i < _len; _i++) {\n code = codes[_i];\n if (range.length >= 100) {\n unicodeMap +=\n \"\\n\" +\n range.length +\n \" beginbfchar\\n\" +\n range.join(\"\\n\") +\n \"\\nendbfchar\";\n range = [];\n }\n\n if (\n map[code] !== undefined &&\n map[code] !== null &&\n typeof map[code].toString === \"function\"\n ) {\n unicode = (\"0000\" + map[code].toString(16)).slice(-4);\n code = (\"0000\" + (+code).toString(16)).slice(-4);\n range.push(\"<\" + code + \"><\" + unicode + \">\");\n }\n }\n\n if (range.length) {\n unicodeMap +=\n \"\\n\" +\n range.length +\n \" beginbfchar\\n\" +\n range.join(\"\\n\") +\n \"\\nendbfchar\\n\";\n }\n unicodeMap +=\n \"endcmap\\nCMapName currentdict /CMap defineresource pop\\nend\\nend\";\n return unicodeMap;\n };\n\n var identityHFunction = function(options) {\n var font = options.font;\n var out = options.out;\n var newObject = options.newObject;\n var putStream = options.putStream;\n\n if (\n font.metadata instanceof jsPDF.API.TTFFont &&\n font.encoding === \"Identity-H\"\n ) {\n //Tag with Identity-H\n var widths = font.metadata.Unicode.widths;\n var data = font.metadata.subset.encode(font.metadata.glyIdsUsed, 1);\n var pdfOutput = data;\n var pdfOutput2 = \"\";\n for (var i = 0; i < pdfOutput.length; i++) {\n pdfOutput2 += String.fromCharCode(pdfOutput[i]);\n }\n var fontTable = newObject();\n putStream({ data: pdfOutput2, addLength1: true, objectId: fontTable });\n out(\"endobj\");\n\n var cmap = newObject();\n var cmapData = toUnicodeCmap(font.metadata.toUnicode);\n putStream({ data: cmapData, addLength1: true, objectId: cmap });\n out(\"endobj\");\n\n var fontDescriptor = newObject();\n out(\"<<\");\n out(\"/Type /FontDescriptor\");\n out(\"/FontName /\" + toPDFName(font.fontName));\n out(\"/FontFile2 \" + fontTable + \" 0 R\");\n out(\"/FontBBox \" + jsPDF.API.PDFObject.convert(font.metadata.bbox));\n out(\"/Flags \" + font.metadata.flags);\n out(\"/StemV \" + font.metadata.stemV);\n out(\"/ItalicAngle \" + font.metadata.italicAngle);\n out(\"/Ascent \" + font.metadata.ascender);\n out(\"/Descent \" + font.metadata.decender);\n out(\"/CapHeight \" + font.metadata.capHeight);\n out(\">>\");\n out(\"endobj\");\n\n var DescendantFont = newObject();\n out(\"<<\");\n out(\"/Type /Font\");\n out(\"/BaseFont /\" + toPDFName(font.fontName));\n out(\"/FontDescriptor \" + fontDescriptor + \" 0 R\");\n out(\"/W \" + jsPDF.API.PDFObject.convert(widths));\n out(\"/CIDToGIDMap /Identity\");\n out(\"/DW 1000\");\n out(\"/Subtype /CIDFontType2\");\n out(\"/CIDSystemInfo\");\n out(\"<<\");\n out(\"/Supplement 0\");\n out(\"/Registry (Adobe)\");\n out(\"/Ordering (\" + font.encoding + \")\");\n out(\">>\");\n out(\">>\");\n out(\"endobj\");\n\n font.objectNumber = newObject();\n out(\"<<\");\n out(\"/Type /Font\");\n out(\"/Subtype /Type0\");\n out(\"/ToUnicode \" + cmap + \" 0 R\");\n out(\"/BaseFont /\" + toPDFName(font.fontName));\n out(\"/Encoding /\" + font.encoding);\n out(\"/DescendantFonts [\" + DescendantFont + \" 0 R]\");\n out(\">>\");\n out(\"endobj\");\n\n font.isAlreadyPutted = true;\n }\n };\n\n jsPDFAPI.events.push([\n \"putFont\",\n function(args) {\n identityHFunction(args);\n }\n ]);\n\n var winAnsiEncodingFunction = function(options) {\n var font = options.font;\n var out = options.out;\n var newObject = options.newObject;\n var putStream = options.putStream;\n\n if (\n font.metadata instanceof jsPDF.API.TTFFont &&\n font.encoding === \"WinAnsiEncoding\"\n ) {\n //Tag with WinAnsi encoding\n var data = font.metadata.rawData;\n var pdfOutput = data;\n var pdfOutput2 = \"\";\n for (var i = 0; i < pdfOutput.length; i++) {\n pdfOutput2 += String.fromCharCode(pdfOutput[i]);\n }\n var fontTable = newObject();\n putStream({ data: pdfOutput2, addLength1: true, objectId: fontTable });\n out(\"endobj\");\n\n var cmap = newObject();\n var cmapData = toUnicodeCmap(font.metadata.toUnicode);\n putStream({ data: cmapData, addLength1: true, objectId: cmap });\n out(\"endobj\");\n\n var fontDescriptor = newObject();\n out(\"<<\");\n out(\"/Descent \" + font.metadata.decender);\n out(\"/CapHeight \" + font.metadata.capHeight);\n out(\"/StemV \" + font.metadata.stemV);\n out(\"/Type /FontDescriptor\");\n out(\"/FontFile2 \" + fontTable + \" 0 R\");\n out(\"/Flags 96\");\n out(\"/FontBBox \" + jsPDF.API.PDFObject.convert(font.metadata.bbox));\n out(\"/FontName /\" + toPDFName(font.fontName));\n out(\"/ItalicAngle \" + font.metadata.italicAngle);\n out(\"/Ascent \" + font.metadata.ascender);\n out(\">>\");\n out(\"endobj\");\n font.objectNumber = newObject();\n for (var j = 0; j < font.metadata.hmtx.widths.length; j++) {\n font.metadata.hmtx.widths[j] = parseInt(\n font.metadata.hmtx.widths[j] * (1000 / font.metadata.head.unitsPerEm)\n ); //Change the width of Em units to Point units.\n }\n out(\n \"<>\"\n );\n out(\"endobj\");\n font.isAlreadyPutted = true;\n }\n };\n\n jsPDFAPI.events.push([\n \"putFont\",\n function(args) {\n winAnsiEncodingFunction(args);\n }\n ]);\n\n var utf8TextFunction = function(args) {\n var text = args.text || \"\";\n var x = args.x;\n var y = args.y;\n var options = args.options || {};\n var mutex = args.mutex || {};\n\n var pdfEscape = mutex.pdfEscape;\n var activeFontKey = mutex.activeFontKey;\n var fonts = mutex.fonts;\n var key = activeFontKey;\n\n var str = \"\",\n s = 0,\n cmapConfirm;\n var strText = \"\";\n var encoding = fonts[key].encoding;\n\n if (fonts[key].encoding !== \"Identity-H\") {\n return {\n text: text,\n x: x,\n y: y,\n options: options,\n mutex: mutex\n };\n }\n strText = text;\n\n key = activeFontKey;\n if (Array.isArray(text)) {\n strText = text[0];\n }\n for (s = 0; s < strText.length; s += 1) {\n if (fonts[key].metadata.hasOwnProperty(\"cmap\")) {\n cmapConfirm =\n fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)];\n /*\n if (Object.prototype.toString.call(text) === '[object Array]') {\n var i = 0;\n // for (i = 0; i < text.length; i += 1) {\n if (Object.prototype.toString.call(text[s]) === '[object Array]') {\n cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s][0].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id\n } else {\n\n }\n //}\n\n } else {\n cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id\n }*/\n }\n if (!cmapConfirm) {\n if (\n strText[s].charCodeAt(0) < 256 &&\n fonts[key].metadata.hasOwnProperty(\"Unicode\")\n ) {\n str += strText[s];\n } else {\n str += \"\";\n }\n } else {\n str += strText[s];\n }\n }\n var result = \"\";\n if (parseInt(key.slice(1)) < 14 || encoding === \"WinAnsiEncoding\") {\n //For the default 13 font\n result = pdfEscape(str, key)\n .split(\"\")\n .map(function(cv) {\n return cv.charCodeAt(0).toString(16);\n })\n .join(\"\");\n } else if (encoding === \"Identity-H\") {\n result = pdfEscape16(str, fonts[key]);\n }\n mutex.isHex = true;\n\n return {\n text: result,\n x: x,\n y: y,\n options: options,\n mutex: mutex\n };\n };\n\n var utf8EscapeFunction = function(parms) {\n var text = parms.text || \"\",\n x = parms.x,\n y = parms.y,\n options = parms.options,\n mutex = parms.mutex;\n var tmpText = [];\n var args = {\n text: text,\n x: x,\n y: y,\n options: options,\n mutex: mutex\n };\n\n if (Array.isArray(text)) {\n var i = 0;\n for (i = 0; i < text.length; i += 1) {\n if (Array.isArray(text[i])) {\n if (text[i].length === 3) {\n tmpText.push([\n utf8TextFunction(Object.assign({}, args, { text: text[i][0] }))\n .text,\n text[i][1],\n text[i][2]\n ]);\n } else {\n tmpText.push(\n utf8TextFunction(Object.assign({}, args, { text: text[i] })).text\n );\n }\n } else {\n tmpText.push(\n utf8TextFunction(Object.assign({}, args, { text: text[i] })).text\n );\n }\n }\n parms.text = tmpText;\n } else {\n parms.text = utf8TextFunction(\n Object.assign({}, args, { text: text })\n ).text;\n }\n };\n\n jsPDFAPI.events.push([\"postProcessText\", utf8EscapeFunction]);\n})(jsPDF);\n","/**\n * @license\n * jsPDF virtual FileSystem functionality\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * Use the vFS to handle files\n *\n * @name vFS\n * @module\n */\n(function(jsPDFAPI) {\n \"use strict\";\n\n var _initializeVFS = function() {\n if (typeof this.internal.vFS === \"undefined\") {\n this.internal.vFS = {};\n }\n return true;\n };\n\n /**\n * Check if the file exists in the vFS\n *\n * @name existsFileInVFS\n * @function\n * @param {string} Possible filename in the vFS.\n * @returns {boolean}\n * @example\n * doc.existsFileInVFS(\"someFile.txt\");\n */\n jsPDFAPI.existsFileInVFS = function(filename) {\n _initializeVFS.call(this);\n return typeof this.internal.vFS[filename] !== \"undefined\";\n };\n\n /**\n * Add a file to the vFS\n *\n * @name addFileToVFS\n * @function\n * @param {string} filename The name of the file which should be added.\n * @param {string} filecontent The content of the file.\n * @returns {jsPDF}\n * @example\n * doc.addFileToVFS(\"someFile.txt\", \"BADFACE1\");\n */\n jsPDFAPI.addFileToVFS = function(filename, filecontent) {\n _initializeVFS.call(this);\n this.internal.vFS[filename] = filecontent;\n return this;\n };\n\n /**\n * Get the file from the vFS\n *\n * @name getFileFromVFS\n * @function\n * @param {string} The name of the file which gets requested.\n * @returns {string}\n * @example\n * doc.getFileFromVFS(\"someFile.txt\");\n */\n jsPDFAPI.getFileFromVFS = function(filename) {\n _initializeVFS.call(this);\n\n if (typeof this.internal.vFS[filename] !== \"undefined\") {\n return this.internal.vFS[filename];\n }\n return null;\n };\n})(jsPDF.API);\n","/**\n * @license\n * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)\n * MIT License\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n(function(jsPDF) {\n \"use strict\";\n /**\n * Table of Unicode types.\n *\n * Generated by:\n *\n * var bidi = require(\"./bidi/index\");\n * var bidi_accumulate = bidi.slice(0, 256).concat(bidi.slice(0x0500, 0x0500 + 256 * 3)).\n * concat(bidi.slice(0x2000, 0x2000 + 256)).concat(bidi.slice(0xFB00, 0xFB00 + 256)).\n * concat(bidi.slice(0xFE00, 0xFE00 + 2 * 256));\n *\n * for( var i = 0; i < bidi_accumulate.length; i++) {\n * \tif(bidi_accumulate[i] === undefined || bidi_accumulate[i] === 'ON')\n * \t\tbidi_accumulate[i] = 'N'; //mark as neutral to conserve space and substitute undefined\n * }\n * var bidiAccumulateStr = 'return [ \"' + bidi_accumulate.toString().replace(/,/g, '\", \"') + '\" ];';\n * require(\"fs\").writeFile('unicode-types.js', bidiAccumulateStr);\n *\n * Based on:\n * https://github.com/mathiasbynens/unicode-8.0.0\n */\n var bidiUnicodeTypes = [\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"S\",\n \"B\",\n \"S\",\n \"WS\",\n \"B\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"B\",\n \"B\",\n \"B\",\n \"S\",\n \"WS\",\n \"N\",\n \"N\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"ES\",\n \"CS\",\n \"ES\",\n \"CS\",\n \"CS\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"CS\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"B\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"CS\",\n \"N\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"N\",\n \"N\",\n \"BN\",\n \"N\",\n \"N\",\n \"ET\",\n \"ET\",\n \"EN\",\n \"EN\",\n \"N\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"EN\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"ET\",\n \"N\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"R\",\n \"NSM\",\n \"R\",\n \"NSM\",\n \"NSM\",\n \"R\",\n \"NSM\",\n \"NSM\",\n \"R\",\n \"NSM\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"N\",\n \"N\",\n \"AL\",\n \"ET\",\n \"ET\",\n \"AL\",\n \"CS\",\n \"AL\",\n \"N\",\n \"N\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"AL\",\n \"AL\",\n \"N\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"AN\",\n \"ET\",\n \"AN\",\n \"AN\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"NSM\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"AN\",\n \"N\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"AL\",\n \"AL\",\n \"NSM\",\n \"NSM\",\n \"N\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"AL\",\n \"AL\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"N\",\n \"AL\",\n \"AL\",\n \"NSM\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"N\",\n \"N\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"AL\",\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 \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"R\",\n \"R\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"R\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"WS\",\n \"WS\",\n \"WS\",\n \"WS\",\n \"WS\",\n \"WS\",\n \"WS\",\n \"WS\",\n \"WS\",\n \"WS\",\n \"WS\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"L\",\n \"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\",\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\",\n \"B\",\n \"LRE\",\n \"RLE\",\n \"PDF\",\n \"LRO\",\n \"RLO\",\n \"CS\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"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\",\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\",\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 \"WS\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"N\",\n \"LRI\",\n \"RLI\",\n \"FSI\",\n \"PDI\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"BN\",\n \"EN\",\n \"L\",\n \"N\",\n \"N\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"ES\",\n \"ES\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"ES\",\n \"ES\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"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\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"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 \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\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 \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"R\",\n \"NSM\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"ES\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"N\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"N\",\n \"R\",\n \"N\",\n \"R\",\n \"R\",\n \"N\",\n \"R\",\n \"R\",\n \"N\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"R\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\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\",\n \"N\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"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\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"NSM\",\n \"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\",\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\",\n \"CS\",\n \"N\",\n \"CS\",\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 \"ET\",\n \"N\",\n \"N\",\n \"ES\",\n \"ES\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"ET\",\n \"ET\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"N\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"AL\",\n \"N\",\n \"N\",\n \"BN\",\n \"N\",\n \"N\",\n \"N\",\n \"ET\",\n \"ET\",\n \"ET\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"ES\",\n \"CS\",\n \"ES\",\n \"CS\",\n \"CS\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"EN\",\n \"CS\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"L\",\n \"L\",\n \"L\",\n \"N\",\n \"N\",\n \"N\",\n \"ET\",\n \"ET\",\n \"N\",\n \"N\",\n \"N\",\n \"ET\",\n \"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\",\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 * Unicode Bidi algorithm compliant Bidi engine.\n * For reference see http://unicode.org/reports/tr9/\n */\n\n /**\n * constructor ( options )\n *\n * Initializes Bidi engine\n *\n * @param {Object} See 'setOptions' below for detailed description.\n * options are cashed between invocation of 'doBidiReorder' method\n *\n * sample usage pattern of BidiEngine:\n * var opt = {\n * \tisInputVisual: true,\n * \tisInputRtl: false,\n * \tisOutputVisual: false,\n * \tisOutputRtl: false,\n * \tisSymmetricSwapping: true\n * }\n * var sourceToTarget = [], levels = [];\n * var bidiEng = Globalize.bidiEngine(opt);\n * var src = \"text string to be reordered\";\n * var ret = bidiEng.doBidiReorder(src, sourceToTarget, levels);\n */\n\n jsPDF.__bidiEngine__ = jsPDF.prototype.__bidiEngine__ = function(options) {\n var _UNICODE_TYPES = _bidiUnicodeTypes;\n\n var _STATE_TABLE_LTR = [\n [0, 3, 0, 1, 0, 0, 0],\n [0, 3, 0, 1, 2, 2, 0],\n [0, 3, 0, 0x11, 2, 0, 1],\n [0, 3, 5, 5, 4, 1, 0],\n [0, 3, 0x15, 0x15, 4, 0, 1],\n [0, 3, 5, 5, 4, 2, 0]\n ];\n\n var _STATE_TABLE_RTL = [\n [2, 0, 1, 1, 0, 1, 0],\n [2, 0, 1, 1, 0, 2, 0],\n [2, 0, 2, 1, 3, 2, 0],\n [2, 0, 2, 0x21, 3, 1, 1]\n ];\n\n var _TYPE_NAMES_MAP = { L: 0, R: 1, EN: 2, AN: 3, N: 4, B: 5, S: 6 };\n\n var _UNICODE_RANGES_MAP = {\n 0: 0,\n 5: 1,\n 6: 2,\n 7: 3,\n 0x20: 4,\n 0xfb: 5,\n 0xfe: 6,\n 0xff: 7\n };\n\n var _SWAP_TABLE = [\n \"\\u0028\",\n \"\\u0029\",\n \"\\u0028\",\n \"\\u003C\",\n \"\\u003E\",\n \"\\u003C\",\n \"\\u005B\",\n \"\\u005D\",\n \"\\u005B\",\n \"\\u007B\",\n \"\\u007D\",\n \"\\u007B\",\n \"\\u00AB\",\n \"\\u00BB\",\n \"\\u00AB\",\n \"\\u2039\",\n \"\\u203A\",\n \"\\u2039\",\n \"\\u2045\",\n \"\\u2046\",\n \"\\u2045\",\n \"\\u207D\",\n \"\\u207E\",\n \"\\u207D\",\n \"\\u208D\",\n \"\\u208E\",\n \"\\u208D\",\n \"\\u2264\",\n \"\\u2265\",\n \"\\u2264\",\n \"\\u2329\",\n \"\\u232A\",\n \"\\u2329\",\n \"\\uFE59\",\n \"\\uFE5A\",\n \"\\uFE59\",\n \"\\uFE5B\",\n \"\\uFE5C\",\n \"\\uFE5B\",\n \"\\uFE5D\",\n \"\\uFE5E\",\n \"\\uFE5D\",\n \"\\uFE64\",\n \"\\uFE65\",\n \"\\uFE64\"\n ];\n\n var _LTR_RANGES_REG_EXPR = new RegExp(\n /^([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)$/\n );\n\n var _lastArabic = false,\n _hasUbatAl,\n _hasUbatB,\n _hasUbatS,\n DIR_LTR = 0,\n DIR_RTL = 1,\n _isInVisual,\n _isInRtl,\n _isOutVisual,\n _isOutRtl,\n _isSymmetricSwapping,\n _dir = DIR_LTR;\n\n this.__bidiEngine__ = {};\n\n var _init = function(text, sourceToTargetMap) {\n if (sourceToTargetMap) {\n for (var i = 0; i < text.length; i++) {\n sourceToTargetMap[i] = i;\n }\n }\n if (_isInRtl === undefined) {\n _isInRtl = _isContextualDirRtl(text);\n }\n if (_isOutRtl === undefined) {\n _isOutRtl = _isContextualDirRtl(text);\n }\n };\n\n // for reference see 3.2 in http://unicode.org/reports/tr9/\n //\n var _getCharType = function(ch) {\n var charCode = ch.charCodeAt(),\n range = charCode >> 8,\n rangeIdx = _UNICODE_RANGES_MAP[range];\n\n if (rangeIdx !== undefined) {\n return _UNICODE_TYPES[rangeIdx * 256 + (charCode & 0xff)];\n } else if (range === 0xfc || range === 0xfd) {\n return \"AL\";\n } else if (_LTR_RANGES_REG_EXPR.test(range)) {\n //unlikely case\n return \"L\";\n } else if (range === 8) {\n // even less likely\n return \"R\";\n }\n return \"N\"; //undefined type, mark as neutral\n };\n\n var _isContextualDirRtl = function(text) {\n for (var i = 0, charType; i < text.length; i++) {\n charType = _getCharType(text.charAt(i));\n if (charType === \"L\") {\n return false;\n } else if (charType === \"R\") {\n return true;\n }\n }\n return false;\n };\n\n // for reference see 3.3.4 & 3.3.5 in http://unicode.org/reports/tr9/\n //\n var _resolveCharType = function(chars, types, resolvedTypes, index) {\n var cType = types[index],\n wType,\n nType,\n i,\n len;\n switch (cType) {\n case \"L\":\n case \"R\":\n _lastArabic = false;\n break;\n case \"N\":\n case \"AN\":\n break;\n\n case \"EN\":\n if (_lastArabic) {\n cType = \"AN\";\n }\n break;\n\n case \"AL\":\n _lastArabic = true;\n _hasUbatAl = true;\n cType = \"R\";\n break;\n\n case \"WS\":\n cType = \"N\";\n break;\n\n case \"CS\":\n if (\n index < 1 ||\n index + 1 >= types.length ||\n ((wType = resolvedTypes[index - 1]) !== \"EN\" && wType !== \"AN\") ||\n ((nType = types[index + 1]) !== \"EN\" && nType !== \"AN\")\n ) {\n cType = \"N\";\n } else if (_lastArabic) {\n nType = \"AN\";\n }\n cType = nType === wType ? nType : \"N\";\n break;\n\n case \"ES\":\n wType = index > 0 ? resolvedTypes[index - 1] : \"B\";\n cType =\n wType === \"EN\" &&\n index + 1 < types.length &&\n types[index + 1] === \"EN\"\n ? \"EN\"\n : \"N\";\n break;\n\n case \"ET\":\n if (index > 0 && resolvedTypes[index - 1] === \"EN\") {\n cType = \"EN\";\n break;\n } else if (_lastArabic) {\n cType = \"N\";\n break;\n }\n i = index + 1;\n len = types.length;\n while (i < len && types[i] === \"ET\") {\n i++;\n }\n if (i < len && types[i] === \"EN\") {\n cType = \"EN\";\n } else {\n cType = \"N\";\n }\n break;\n\n case \"NSM\":\n if (_isInVisual && !_isInRtl) {\n //V->L\n len = types.length;\n i = index + 1;\n while (i < len && types[i] === \"NSM\") {\n i++;\n }\n if (i < len) {\n var c = chars[index];\n var rtlCandidate = (c >= 0x0591 && c <= 0x08ff) || c === 0xfb1e;\n wType = types[i];\n if (rtlCandidate && (wType === \"R\" || wType === \"AL\")) {\n cType = \"R\";\n break;\n }\n }\n }\n if (index < 1 || (wType = types[index - 1]) === \"B\") {\n cType = \"N\";\n } else {\n cType = resolvedTypes[index - 1];\n }\n break;\n\n case \"B\":\n _lastArabic = false;\n _hasUbatB = true;\n cType = _dir;\n break;\n\n case \"S\":\n _hasUbatS = true;\n cType = \"N\";\n break;\n\n case \"LRE\":\n case \"RLE\":\n case \"LRO\":\n case \"RLO\":\n case \"PDF\":\n _lastArabic = false;\n break;\n case \"BN\":\n cType = \"N\";\n break;\n }\n return cType;\n };\n\n var _handleUbatS = function(types, levels, length) {\n for (var i = 0; i < length; i++) {\n if (types[i] === \"S\") {\n levels[i] = _dir;\n for (var j = i - 1; j >= 0; j--) {\n if (types[j] === \"WS\") {\n levels[j] = _dir;\n } else {\n break;\n }\n }\n }\n }\n };\n\n var _invertString = function(text, sourceToTargetMap, levels) {\n var charArray = text.split(\"\");\n if (levels) {\n _computeLevels(charArray, levels, { hiLevel: _dir });\n }\n charArray.reverse();\n sourceToTargetMap && sourceToTargetMap.reverse();\n return charArray.join(\"\");\n };\n\n // For reference see 3.3 in http://unicode.org/reports/tr9/\n //\n var _computeLevels = function(chars, levels, params) {\n var action,\n condition,\n i,\n index,\n newLevel,\n prevState,\n condPos = -1,\n len = chars.length,\n newState = 0,\n resolvedTypes = [],\n stateTable = _dir ? _STATE_TABLE_RTL : _STATE_TABLE_LTR,\n types = [];\n\n _lastArabic = false;\n _hasUbatAl = false;\n _hasUbatB = false;\n _hasUbatS = false;\n for (i = 0; i < len; i++) {\n types[i] = _getCharType(chars[i]);\n }\n for (index = 0; index < len; index++) {\n prevState = newState;\n resolvedTypes[index] = _resolveCharType(\n chars,\n types,\n resolvedTypes,\n index\n );\n newState = stateTable[prevState][_TYPE_NAMES_MAP[resolvedTypes[index]]];\n action = newState & 0xf0;\n newState &= 0x0f;\n levels[index] = newLevel = stateTable[newState][5];\n if (action > 0) {\n if (action === 0x10) {\n for (i = condPos; i < index; i++) {\n levels[i] = 1;\n }\n condPos = -1;\n } else {\n condPos = -1;\n }\n }\n condition = stateTable[newState][6];\n if (condition) {\n if (condPos === -1) {\n condPos = index;\n }\n } else {\n if (condPos > -1) {\n for (i = condPos; i < index; i++) {\n levels[i] = newLevel;\n }\n condPos = -1;\n }\n }\n if (types[index] === \"B\") {\n levels[index] = 0;\n }\n params.hiLevel |= newLevel;\n }\n if (_hasUbatS) {\n _handleUbatS(types, levels, len);\n }\n };\n\n // for reference see 3.4 in http://unicode.org/reports/tr9/\n //\n var _invertByLevel = function(\n level,\n charArray,\n sourceToTargetMap,\n levels,\n params\n ) {\n if (params.hiLevel < level) {\n return;\n }\n if (level === 1 && _dir === DIR_RTL && !_hasUbatB) {\n charArray.reverse();\n sourceToTargetMap && sourceToTargetMap.reverse();\n return;\n }\n var ch,\n high,\n end,\n low,\n len = charArray.length,\n start = 0;\n\n while (start < len) {\n if (levels[start] >= level) {\n end = start + 1;\n while (end < len && levels[end] >= level) {\n end++;\n }\n for (low = start, high = end - 1; low < high; low++, high--) {\n ch = charArray[low];\n charArray[low] = charArray[high];\n charArray[high] = ch;\n if (sourceToTargetMap) {\n ch = sourceToTargetMap[low];\n sourceToTargetMap[low] = sourceToTargetMap[high];\n sourceToTargetMap[high] = ch;\n }\n }\n start = end;\n }\n start++;\n }\n };\n\n // for reference see 7 & BD16 in http://unicode.org/reports/tr9/\n //\n var _symmetricSwap = function(charArray, levels, params) {\n if (params.hiLevel !== 0 && _isSymmetricSwapping) {\n for (var i = 0, index; i < charArray.length; i++) {\n if (levels[i] === 1) {\n index = _SWAP_TABLE.indexOf(charArray[i]);\n if (index >= 0) {\n charArray[i] = _SWAP_TABLE[index + 1];\n }\n }\n }\n }\n };\n\n var _reorder = function(text, sourceToTargetMap, levels) {\n var charArray = text.split(\"\"),\n params = { hiLevel: _dir };\n\n if (!levels) {\n levels = [];\n }\n _computeLevels(charArray, levels, params);\n _symmetricSwap(charArray, levels, params);\n _invertByLevel(DIR_RTL + 1, charArray, sourceToTargetMap, levels, params);\n _invertByLevel(DIR_RTL, charArray, sourceToTargetMap, levels, params);\n return charArray.join(\"\");\n };\n\n // doBidiReorder( text, sourceToTargetMap, levels )\n // Performs Bidi reordering by implementing Unicode Bidi algorithm.\n // Returns reordered string\n // @text [String]:\n // - input string to be reordered, this is input parameter\n // $sourceToTargetMap [Array] (optional)\n // - resultant mapping between input and output strings, this is output parameter\n // $levels [Array] (optional)\n // - array of calculated Bidi levels, , this is output parameter\n this.__bidiEngine__.doBidiReorder = function(\n text,\n sourceToTargetMap,\n levels\n ) {\n _init(text, sourceToTargetMap);\n if (!_isInVisual && _isOutVisual && !_isOutRtl) {\n // LLTR->VLTR, LRTL->VLTR\n _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n text = _reorder(text, sourceToTargetMap, levels);\n } else if (_isInVisual && _isOutVisual && _isInRtl ^ _isOutRtl) {\n // VRTL->VLTR, VLTR->VRTL\n _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n text = _invertString(text, sourceToTargetMap, levels);\n } else if (!_isInVisual && _isOutVisual && _isOutRtl) {\n // LLTR->VRTL, LRTL->VRTL\n _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n text = _reorder(text, sourceToTargetMap, levels);\n text = _invertString(text, sourceToTargetMap);\n } else if (_isInVisual && !_isInRtl && !_isOutVisual && !_isOutRtl) {\n // VLTR->LLTR\n _dir = DIR_LTR;\n text = _reorder(text, sourceToTargetMap, levels);\n } else if (_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {\n // VLTR->LRTL, VRTL->LLTR\n text = _invertString(text, sourceToTargetMap);\n if (_isInRtl) {\n //LLTR -> VLTR\n _dir = DIR_LTR;\n text = _reorder(text, sourceToTargetMap, levels);\n } else {\n //LRTL -> VRTL\n _dir = DIR_RTL;\n text = _reorder(text, sourceToTargetMap, levels);\n text = _invertString(text, sourceToTargetMap);\n }\n } else if (_isInVisual && _isInRtl && !_isOutVisual && _isOutRtl) {\n // VRTL->LRTL\n _dir = DIR_RTL;\n text = _reorder(text, sourceToTargetMap, levels);\n text = _invertString(text, sourceToTargetMap);\n } else if (!_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {\n // LRTL->LLTR, LLTR->LRTL\n var isSymmetricSwappingOrig = _isSymmetricSwapping;\n if (_isInRtl) {\n //LRTL->LLTR\n _dir = DIR_RTL;\n text = _reorder(text, sourceToTargetMap, levels);\n _dir = DIR_LTR;\n _isSymmetricSwapping = false;\n text = _reorder(text, sourceToTargetMap, levels);\n _isSymmetricSwapping = isSymmetricSwappingOrig;\n } else {\n //LLTR->LRTL\n _dir = DIR_LTR;\n text = _reorder(text, sourceToTargetMap, levels);\n text = _invertString(text, sourceToTargetMap);\n _dir = DIR_RTL;\n _isSymmetricSwapping = false;\n text = _reorder(text, sourceToTargetMap, levels);\n _isSymmetricSwapping = isSymmetricSwappingOrig;\n text = _invertString(text, sourceToTargetMap);\n }\n }\n return text;\n };\n\n /**\n * @name setOptions( options )\n * @function\n * Sets options for Bidi conversion\n * @param {Object}:\n * - isInputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)\n * - isInputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong character of input string)\n * - isOutputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)\n * - isOutputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong characterof input string)\n * - isSymmetricSwapping {boolean} (defaults to false): allowed values true(needs symmetric swapping), false (no need in symmetric swapping),\n */\n this.__bidiEngine__.setOptions = function(options) {\n if (options) {\n _isInVisual = options.isInputVisual;\n _isOutVisual = options.isOutputVisual;\n _isInRtl = options.isInputRtl;\n _isOutRtl = options.isOutputRtl;\n _isSymmetricSwapping = options.isSymmetricSwapping;\n }\n };\n\n this.__bidiEngine__.setOptions(options);\n return this.__bidiEngine__;\n };\n\n var _bidiUnicodeTypes = bidiUnicodeTypes;\n\n var bidiEngine = new jsPDF.__bidiEngine__({ isInputVisual: true });\n\n var bidiEngineFunction = function(args) {\n var text = args.text;\n var x = args.x;\n var y = args.y;\n var options = args.options || {};\n var mutex = args.mutex || {};\n var lang = options.lang;\n var tmpText = [];\n\n options.isInputVisual =\n typeof options.isInputVisual === \"boolean\" ? options.isInputVisual : true;\n bidiEngine.setOptions(options);\n\n if (Object.prototype.toString.call(text) === \"[object Array]\") {\n var i = 0;\n tmpText = [];\n for (i = 0; i < text.length; i += 1) {\n if (Object.prototype.toString.call(text[i]) === \"[object Array]\") {\n tmpText.push([\n bidiEngine.doBidiReorder(text[i][0]),\n text[i][1],\n text[i][2]\n ]);\n } else {\n tmpText.push([bidiEngine.doBidiReorder(text[i])]);\n }\n }\n args.text = tmpText;\n } else {\n args.text = bidiEngine.doBidiReorder(text);\n }\n bidiEngine.setOptions({ isInputVisual: true });\n };\n\n jsPDF.API.events.push([\"postProcessText\", bidiEngineFunction]);\n})(jsPDF);\n","/* eslint-disable no-control-regex */\n/************************************************\n * Title : custom font *\n * Start Data : 2017. 01. 22. *\n * Comment : TEXT API *\n ************************************************/\n\n/******************************\n * jsPDF extension API Design *\n * ****************************/\n\nimport { jsPDF } from \"../jspdf.js\";\n\njsPDF.API.TTFFont = (function() {\n /************************************************************************/\n /* function : open */\n /* comment : Decode the encoded ttf content and create a TTFFont object. */\n /************************************************************************/\n TTFFont.open = function(file) {\n return new TTFFont(file);\n };\n /***************************************************************/\n /* function : TTFFont gernerator */\n /* comment : Decode TTF contents are parsed, Data, */\n /* Subset object is created, and registerTTF function is called.*/\n /***************************************************************/\n function TTFFont(rawData) {\n var data;\n this.rawData = rawData;\n data = this.contents = new Data(rawData);\n this.contents.pos = 4;\n if (data.readString(4) === \"ttcf\") {\n throw new Error(\"TTCF not supported.\");\n } else {\n data.pos = 0;\n this.parse();\n this.subset = new Subset(this);\n this.registerTTF();\n }\n }\n /********************************************************/\n /* function : parse */\n /* comment : TTF Parses the file contents by each table.*/\n /********************************************************/\n TTFFont.prototype.parse = function() {\n this.directory = new Directory(this.contents);\n this.head = new HeadTable(this);\n this.name = new NameTable(this);\n this.cmap = new CmapTable(this);\n this.toUnicode = {};\n this.hhea = new HheaTable(this);\n this.maxp = new MaxpTable(this);\n this.hmtx = new HmtxTable(this);\n this.post = new PostTable(this);\n this.os2 = new OS2Table(this);\n this.loca = new LocaTable(this);\n this.glyf = new GlyfTable(this);\n this.ascender =\n (this.os2.exists && this.os2.ascender) || this.hhea.ascender;\n this.decender =\n (this.os2.exists && this.os2.decender) || this.hhea.decender;\n this.lineGap = (this.os2.exists && this.os2.lineGap) || this.hhea.lineGap;\n return (this.bbox = [\n this.head.xMin,\n this.head.yMin,\n this.head.xMax,\n this.head.yMax\n ]);\n };\n /***************************************************************/\n /* function : registerTTF */\n /* comment : Get the value to assign pdf font descriptors. */\n /***************************************************************/\n TTFFont.prototype.registerTTF = function() {\n var e, hi, low, raw, _ref;\n this.scaleFactor = 1000.0 / this.head.unitsPerEm;\n this.bbox = function() {\n var _i, _len, _ref, _results;\n _ref = this.bbox;\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n e = _ref[_i];\n _results.push(Math.round(e * this.scaleFactor));\n }\n return _results;\n }.call(this);\n this.stemV = 0;\n if (this.post.exists) {\n raw = this.post.italic_angle;\n hi = raw >> 16;\n low = raw & 0xff;\n if ((hi & 0x8000) !== 0) {\n hi = -((hi ^ 0xffff) + 1);\n }\n this.italicAngle = +(\"\" + hi + \".\" + low);\n } else {\n this.italicAngle = 0;\n }\n this.ascender = Math.round(this.ascender * this.scaleFactor);\n this.decender = Math.round(this.decender * this.scaleFactor);\n this.lineGap = Math.round(this.lineGap * this.scaleFactor);\n this.capHeight = (this.os2.exists && this.os2.capHeight) || this.ascender;\n this.xHeight = (this.os2.exists && this.os2.xHeight) || 0;\n this.familyClass = ((this.os2.exists && this.os2.familyClass) || 0) >> 8;\n this.isSerif =\n (_ref = this.familyClass) === 1 ||\n _ref === 2 ||\n _ref === 3 ||\n _ref === 4 ||\n _ref === 5 ||\n _ref === 7;\n this.isScript = this.familyClass === 10;\n this.flags = 0;\n if (this.post.isFixedPitch) {\n this.flags |= 1 << 0;\n }\n if (this.isSerif) {\n this.flags |= 1 << 1;\n }\n if (this.isScript) {\n this.flags |= 1 << 3;\n }\n if (this.italicAngle !== 0) {\n this.flags |= 1 << 6;\n }\n this.flags |= 1 << 5;\n if (!this.cmap.unicode) {\n throw new Error(\"No unicode cmap for font\");\n }\n };\n TTFFont.prototype.characterToGlyph = function(character) {\n var _ref;\n return (\n ((_ref = this.cmap.unicode) != null ? _ref.codeMap[character] : void 0) ||\n 0\n );\n };\n TTFFont.prototype.widthOfGlyph = function(glyph) {\n var scale;\n scale = 1000.0 / this.head.unitsPerEm;\n return this.hmtx.forGlyph(glyph).advance * scale;\n };\n TTFFont.prototype.widthOfString = function(string, size, charSpace) {\n var charCode, i, scale, width, _ref;\n string = \"\" + string;\n width = 0;\n for (\n i = 0, _ref = string.length;\n 0 <= _ref ? i < _ref : i > _ref;\n i = 0 <= _ref ? ++i : --i\n ) {\n charCode = string.charCodeAt(i);\n width +=\n this.widthOfGlyph(this.characterToGlyph(charCode)) +\n charSpace * (1000 / size) || 0;\n }\n scale = size / 1000;\n return width * scale;\n };\n TTFFont.prototype.lineHeight = function(size, includeGap) {\n var gap;\n if (includeGap == null) {\n includeGap = false;\n }\n gap = includeGap ? this.lineGap : 0;\n return ((this.ascender + gap - this.decender) / 1000) * size;\n };\n return TTFFont;\n})();\n\n/************************************************************************************************/\n/* function : Data */\n/* comment : The ttf data decoded and stored in an array is read and written to the Data object.*/\n/************************************************************************************************/\nvar Data = (function() {\n function Data(data) {\n this.data = data != null ? data : [];\n this.pos = 0;\n this.length = this.data.length;\n }\n Data.prototype.readByte = function() {\n return this.data[this.pos++];\n };\n Data.prototype.writeByte = function(byte) {\n return (this.data[this.pos++] = byte);\n };\n Data.prototype.readUInt32 = function() {\n var b1, b2, b3, b4;\n b1 = this.readByte() * 0x1000000;\n b2 = this.readByte() << 16;\n b3 = this.readByte() << 8;\n b4 = this.readByte();\n return b1 + b2 + b3 + b4;\n };\n Data.prototype.writeUInt32 = function(val) {\n this.writeByte((val >>> 24) & 0xff);\n this.writeByte((val >> 16) & 0xff);\n this.writeByte((val >> 8) & 0xff);\n return this.writeByte(val & 0xff);\n };\n Data.prototype.readInt32 = function() {\n var int;\n int = this.readUInt32();\n if (int >= 0x80000000) {\n return int - 0x100000000;\n } else {\n return int;\n }\n };\n Data.prototype.writeInt32 = function(val) {\n if (val < 0) {\n val += 0x100000000;\n }\n return this.writeUInt32(val);\n };\n Data.prototype.readUInt16 = function() {\n var b1, b2;\n b1 = this.readByte() << 8;\n b2 = this.readByte();\n return b1 | b2;\n };\n Data.prototype.writeUInt16 = function(val) {\n this.writeByte((val >> 8) & 0xff);\n return this.writeByte(val & 0xff);\n };\n Data.prototype.readInt16 = function() {\n var int;\n int = this.readUInt16();\n if (int >= 0x8000) {\n return int - 0x10000;\n } else {\n return int;\n }\n };\n Data.prototype.writeInt16 = function(val) {\n if (val < 0) {\n val += 0x10000;\n }\n return this.writeUInt16(val);\n };\n Data.prototype.readString = function(length) {\n var i, ret;\n ret = [];\n for (\n i = 0;\n 0 <= length ? i < length : i > length;\n i = 0 <= length ? ++i : --i\n ) {\n ret[i] = String.fromCharCode(this.readByte());\n }\n return ret.join(\"\");\n };\n Data.prototype.writeString = function(val) {\n var i, _ref, _results;\n _results = [];\n for (\n i = 0, _ref = val.length;\n 0 <= _ref ? i < _ref : i > _ref;\n i = 0 <= _ref ? ++i : --i\n ) {\n _results.push(this.writeByte(val.charCodeAt(i)));\n }\n return _results;\n };\n /*Data.prototype.stringAt = function (pos, length) {\n this.pos = pos;\n return this.readString(length);\n };*/\n Data.prototype.readShort = function() {\n return this.readInt16();\n };\n Data.prototype.writeShort = function(val) {\n return this.writeInt16(val);\n };\n Data.prototype.readLongLong = function() {\n var b1, b2, b3, b4, b5, b6, b7, b8;\n b1 = this.readByte();\n b2 = this.readByte();\n b3 = this.readByte();\n b4 = this.readByte();\n b5 = this.readByte();\n b6 = this.readByte();\n b7 = this.readByte();\n b8 = this.readByte();\n if (b1 & 0x80) {\n return (\n ((b1 ^ 0xff) * 0x100000000000000 +\n (b2 ^ 0xff) * 0x1000000000000 +\n (b3 ^ 0xff) * 0x10000000000 +\n (b4 ^ 0xff) * 0x100000000 +\n (b5 ^ 0xff) * 0x1000000 +\n (b6 ^ 0xff) * 0x10000 +\n (b7 ^ 0xff) * 0x100 +\n (b8 ^ 0xff) +\n 1) *\n -1\n );\n }\n return (\n b1 * 0x100000000000000 +\n b2 * 0x1000000000000 +\n b3 * 0x10000000000 +\n b4 * 0x100000000 +\n b5 * 0x1000000 +\n b6 * 0x10000 +\n b7 * 0x100 +\n b8\n );\n };\n Data.prototype.writeLongLong = function(val) {\n var high, low;\n high = Math.floor(val / 0x100000000);\n low = val & 0xffffffff;\n this.writeByte((high >> 24) & 0xff);\n this.writeByte((high >> 16) & 0xff);\n this.writeByte((high >> 8) & 0xff);\n this.writeByte(high & 0xff);\n this.writeByte((low >> 24) & 0xff);\n this.writeByte((low >> 16) & 0xff);\n this.writeByte((low >> 8) & 0xff);\n return this.writeByte(low & 0xff);\n };\n Data.prototype.readInt = function() {\n return this.readInt32();\n };\n Data.prototype.writeInt = function(val) {\n return this.writeInt32(val);\n };\n /*Data.prototype.slice = function (start, end) {\n return this.data.slice(start, end);\n };*/\n Data.prototype.read = function(bytes) {\n var buf, i;\n buf = [];\n for (\n i = 0;\n 0 <= bytes ? i < bytes : i > bytes;\n i = 0 <= bytes ? ++i : --i\n ) {\n buf.push(this.readByte());\n }\n return buf;\n };\n Data.prototype.write = function(bytes) {\n var byte, i, _len, _results;\n _results = [];\n for (i = 0, _len = bytes.length; i < _len; i++) {\n byte = bytes[i];\n _results.push(this.writeByte(byte));\n }\n return _results;\n };\n return Data;\n})();\n\nvar Directory = (function() {\n var checksum;\n\n /*****************************************************************************************************/\n /* function : Directory generator */\n /* comment : Initialize the offset, tag, length, and checksum for each table for the font to be used.*/\n /*****************************************************************************************************/\n function Directory(data) {\n var entry, i, _ref;\n this.scalarType = data.readInt();\n this.tableCount = data.readShort();\n this.searchRange = data.readShort();\n this.entrySelector = data.readShort();\n this.rangeShift = data.readShort();\n this.tables = {};\n for (\n i = 0, _ref = this.tableCount;\n 0 <= _ref ? i < _ref : i > _ref;\n i = 0 <= _ref ? ++i : --i\n ) {\n entry = {\n tag: data.readString(4),\n checksum: data.readInt(),\n offset: data.readInt(),\n length: data.readInt()\n };\n this.tables[entry.tag] = entry;\n }\n }\n /********************************************************************************************************/\n /* function : encode */\n /* comment : It encodes and stores the font table object and information used for the directory object. */\n /********************************************************************************************************/\n Directory.prototype.encode = function(tables) {\n var adjustment,\n directory,\n directoryLength,\n entrySelector,\n headOffset,\n log2,\n offset,\n rangeShift,\n searchRange,\n sum,\n table,\n tableCount,\n tableData,\n tag;\n tableCount = Object.keys(tables).length;\n log2 = Math.log(2);\n searchRange = Math.floor(Math.log(tableCount) / log2) * 16;\n entrySelector = Math.floor(searchRange / log2);\n rangeShift = tableCount * 16 - searchRange;\n directory = new Data();\n directory.writeInt(this.scalarType);\n directory.writeShort(tableCount);\n directory.writeShort(searchRange);\n directory.writeShort(entrySelector);\n directory.writeShort(rangeShift);\n directoryLength = tableCount * 16;\n offset = directory.pos + directoryLength;\n headOffset = null;\n tableData = [];\n for (tag in tables) {\n table = tables[tag];\n directory.writeString(tag);\n directory.writeInt(checksum(table));\n directory.writeInt(offset);\n directory.writeInt(table.length);\n tableData = tableData.concat(table);\n if (tag === \"head\") {\n headOffset = offset;\n }\n offset += table.length;\n while (offset % 4) {\n tableData.push(0);\n offset++;\n }\n }\n directory.write(tableData);\n sum = checksum(directory.data);\n adjustment = 0xb1b0afba - sum;\n directory.pos = headOffset + 8;\n directory.writeUInt32(adjustment);\n return directory.data;\n };\n /***************************************************************/\n /* function : checksum */\n /* comment : Duplicate the table for the tag. */\n /***************************************************************/\n checksum = function(data) {\n var i, sum, tmp, _ref;\n data = __slice.call(data);\n while (data.length % 4) {\n data.push(0);\n }\n tmp = new Data(data);\n sum = 0;\n for (i = 0, _ref = data.length; i < _ref; i = i += 4) {\n sum += tmp.readUInt32();\n }\n return sum & 0xffffffff;\n };\n return Directory;\n})();\n\nvar Table,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) {\n for (var key in parent) {\n if (__hasProp.call(parent, key)) child[key] = parent[key];\n }\n\n function ctor() {\n this.constructor = child;\n }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n child.__super__ = parent.prototype;\n return child;\n };\n\n/***************************************************************/\n/* function : Table */\n/* comment : Save info for each table, and parse the table. */\n/***************************************************************/\nTable = (function() {\n function Table(file) {\n var info;\n this.file = file;\n info = this.file.directory.tables[this.tag];\n this.exists = !!info;\n if (info) {\n (this.offset = info.offset), (this.length = info.length);\n this.parse(this.file.contents);\n }\n }\n Table.prototype.parse = function() {};\n Table.prototype.encode = function() {};\n Table.prototype.raw = function() {\n if (!this.exists) {\n return null;\n }\n this.file.contents.pos = this.offset;\n return this.file.contents.read(this.length);\n };\n return Table;\n})();\n\nvar HeadTable = (function(_super) {\n __extends(HeadTable, _super);\n\n function HeadTable() {\n return HeadTable.__super__.constructor.apply(this, arguments);\n }\n HeadTable.prototype.tag = \"head\";\n HeadTable.prototype.parse = function(data) {\n data.pos = this.offset;\n this.version = data.readInt();\n this.revision = data.readInt();\n this.checkSumAdjustment = data.readInt();\n this.magicNumber = data.readInt();\n this.flags = data.readShort();\n this.unitsPerEm = data.readShort();\n this.created = data.readLongLong();\n this.modified = data.readLongLong();\n this.xMin = data.readShort();\n this.yMin = data.readShort();\n this.xMax = data.readShort();\n this.yMax = data.readShort();\n this.macStyle = data.readShort();\n this.lowestRecPPEM = data.readShort();\n this.fontDirectionHint = data.readShort();\n this.indexToLocFormat = data.readShort();\n return (this.glyphDataFormat = data.readShort());\n };\n HeadTable.prototype.encode = function(indexToLocFormat) {\n var table;\n table = new Data();\n table.writeInt(this.version);\n table.writeInt(this.revision);\n table.writeInt(this.checkSumAdjustment);\n table.writeInt(this.magicNumber);\n table.writeShort(this.flags);\n table.writeShort(this.unitsPerEm);\n table.writeLongLong(this.created);\n table.writeLongLong(this.modified);\n table.writeShort(this.xMin);\n table.writeShort(this.yMin);\n table.writeShort(this.xMax);\n table.writeShort(this.yMax);\n table.writeShort(this.macStyle);\n table.writeShort(this.lowestRecPPEM);\n table.writeShort(this.fontDirectionHint);\n table.writeShort(indexToLocFormat);\n table.writeShort(this.glyphDataFormat);\n return table.data;\n };\n return HeadTable;\n})(Table);\n\n/************************************************************************************/\n/* function : CmapEntry */\n/* comment : Cmap Initializes and encodes object information (required by pdf spec).*/\n/************************************************************************************/\nvar CmapEntry = (function() {\n function CmapEntry(data, offset) {\n var code,\n count,\n endCode,\n glyphId,\n glyphIds,\n i,\n idDelta,\n idRangeOffset,\n index,\n saveOffset,\n segCount,\n segCountX2,\n start,\n startCode,\n tail,\n _j,\n _k,\n _len;\n this.platformID = data.readUInt16();\n this.encodingID = data.readShort();\n this.offset = offset + data.readInt();\n saveOffset = data.pos;\n data.pos = this.offset;\n this.format = data.readUInt16();\n this.length = data.readUInt16();\n this.language = data.readUInt16();\n this.isUnicode =\n (this.platformID === 3 && this.encodingID === 1 && this.format === 4) ||\n (this.platformID === 0 && this.format === 4);\n this.codeMap = {};\n switch (this.format) {\n case 0:\n for (i = 0; i < 256; ++i) {\n this.codeMap[i] = data.readByte();\n }\n break;\n case 4:\n segCountX2 = data.readUInt16();\n segCount = segCountX2 / 2;\n data.pos += 6;\n endCode = (function() {\n var _j, _results;\n _results = [];\n for (\n i = _j = 0;\n 0 <= segCount ? _j < segCount : _j > segCount;\n i = 0 <= segCount ? ++_j : --_j\n ) {\n _results.push(data.readUInt16());\n }\n return _results;\n })();\n data.pos += 2;\n startCode = (function() {\n var _j, _results;\n _results = [];\n for (\n i = _j = 0;\n 0 <= segCount ? _j < segCount : _j > segCount;\n i = 0 <= segCount ? ++_j : --_j\n ) {\n _results.push(data.readUInt16());\n }\n return _results;\n })();\n idDelta = (function() {\n var _j, _results;\n _results = [];\n for (\n i = _j = 0;\n 0 <= segCount ? _j < segCount : _j > segCount;\n i = 0 <= segCount ? ++_j : --_j\n ) {\n _results.push(data.readUInt16());\n }\n return _results;\n })();\n idRangeOffset = (function() {\n var _j, _results;\n _results = [];\n for (\n i = _j = 0;\n 0 <= segCount ? _j < segCount : _j > segCount;\n i = 0 <= segCount ? ++_j : --_j\n ) {\n _results.push(data.readUInt16());\n }\n return _results;\n })();\n count = (this.length - data.pos + this.offset) / 2;\n glyphIds = (function() {\n var _j, _results;\n _results = [];\n for (\n i = _j = 0;\n 0 <= count ? _j < count : _j > count;\n i = 0 <= count ? ++_j : --_j\n ) {\n _results.push(data.readUInt16());\n }\n return _results;\n })();\n for (i = _j = 0, _len = endCode.length; _j < _len; i = ++_j) {\n tail = endCode[i];\n start = startCode[i];\n for (\n code = _k = start;\n start <= tail ? _k <= tail : _k >= tail;\n code = start <= tail ? ++_k : --_k\n ) {\n if (idRangeOffset[i] === 0) {\n glyphId = code + idDelta[i];\n } else {\n index = idRangeOffset[i] / 2 + (code - start) - (segCount - i);\n glyphId = glyphIds[index] || 0;\n if (glyphId !== 0) {\n glyphId += idDelta[i];\n }\n }\n this.codeMap[code] = glyphId & 0xffff;\n }\n }\n }\n data.pos = saveOffset;\n }\n CmapEntry.encode = function(charmap, encoding) {\n var charMap,\n code,\n codeMap,\n codes,\n delta,\n deltas,\n diff,\n endCode,\n endCodes,\n entrySelector,\n glyphIDs,\n i,\n id,\n indexes,\n last,\n map,\n nextID,\n offset,\n old,\n rangeOffsets,\n rangeShift,\n searchRange,\n segCount,\n segCountX2,\n startCode,\n startCodes,\n startGlyph,\n subtable,\n _i,\n _j,\n _k,\n _l,\n _len,\n _len1,\n _len2,\n _len3,\n _len4,\n _len5,\n _len6,\n _len7,\n _m,\n _n,\n _name,\n _o,\n _p,\n _q;\n subtable = new Data();\n codes = Object.keys(charmap).sort(function(a, b) {\n return a - b;\n });\n switch (encoding) {\n case \"macroman\":\n id = 0;\n indexes = (function() {\n var _results = [];\n for (i = 0; i < 256; ++i) {\n _results.push(0);\n }\n return _results;\n })();\n map = {\n 0: 0\n };\n codeMap = {};\n for (_i = 0, _len = codes.length; _i < _len; _i++) {\n code = codes[_i];\n if (map[(_name = charmap[code])] == null) {\n map[_name] = ++id;\n }\n codeMap[code] = {\n old: charmap[code],\n new: map[charmap[code]]\n };\n indexes[code] = map[charmap[code]];\n }\n subtable.writeUInt16(1);\n subtable.writeUInt16(0);\n subtable.writeUInt32(12);\n subtable.writeUInt16(0);\n subtable.writeUInt16(262);\n subtable.writeUInt16(0);\n subtable.write(indexes);\n return {\n charMap: codeMap,\n subtable: subtable.data,\n maxGlyphID: id + 1\n };\n case \"unicode\":\n startCodes = [];\n endCodes = [];\n nextID = 0;\n map = {};\n charMap = {};\n last = diff = null;\n for (_j = 0, _len1 = codes.length; _j < _len1; _j++) {\n code = codes[_j];\n old = charmap[code];\n if (map[old] == null) {\n map[old] = ++nextID;\n }\n charMap[code] = {\n old: old,\n new: map[old]\n };\n delta = map[old] - code;\n if (last == null || delta !== diff) {\n if (last) {\n endCodes.push(last);\n }\n startCodes.push(code);\n diff = delta;\n }\n last = code;\n }\n if (last) {\n endCodes.push(last);\n }\n endCodes.push(0xffff);\n startCodes.push(0xffff);\n segCount = startCodes.length;\n segCountX2 = segCount * 2;\n searchRange = 2 * Math.pow(Math.log(segCount) / Math.LN2, 2);\n entrySelector = Math.log(searchRange / 2) / Math.LN2;\n rangeShift = 2 * segCount - searchRange;\n deltas = [];\n rangeOffsets = [];\n glyphIDs = [];\n for (i = _k = 0, _len2 = startCodes.length; _k < _len2; i = ++_k) {\n startCode = startCodes[i];\n endCode = endCodes[i];\n if (startCode === 0xffff) {\n deltas.push(0);\n rangeOffsets.push(0);\n break;\n }\n startGlyph = charMap[startCode][\"new\"];\n if (startCode - startGlyph >= 0x8000) {\n deltas.push(0);\n rangeOffsets.push(2 * (glyphIDs.length + segCount - i));\n for (\n code = _l = startCode;\n startCode <= endCode ? _l <= endCode : _l >= endCode;\n code = startCode <= endCode ? ++_l : --_l\n ) {\n glyphIDs.push(charMap[code][\"new\"]);\n }\n } else {\n deltas.push(startGlyph - startCode);\n rangeOffsets.push(0);\n }\n }\n subtable.writeUInt16(3);\n subtable.writeUInt16(1);\n subtable.writeUInt32(12);\n subtable.writeUInt16(4);\n subtable.writeUInt16(16 + segCount * 8 + glyphIDs.length * 2);\n subtable.writeUInt16(0);\n subtable.writeUInt16(segCountX2);\n subtable.writeUInt16(searchRange);\n subtable.writeUInt16(entrySelector);\n subtable.writeUInt16(rangeShift);\n for (_m = 0, _len3 = endCodes.length; _m < _len3; _m++) {\n code = endCodes[_m];\n subtable.writeUInt16(code);\n }\n subtable.writeUInt16(0);\n for (_n = 0, _len4 = startCodes.length; _n < _len4; _n++) {\n code = startCodes[_n];\n subtable.writeUInt16(code);\n }\n for (_o = 0, _len5 = deltas.length; _o < _len5; _o++) {\n delta = deltas[_o];\n subtable.writeUInt16(delta);\n }\n for (_p = 0, _len6 = rangeOffsets.length; _p < _len6; _p++) {\n offset = rangeOffsets[_p];\n subtable.writeUInt16(offset);\n }\n for (_q = 0, _len7 = glyphIDs.length; _q < _len7; _q++) {\n id = glyphIDs[_q];\n subtable.writeUInt16(id);\n }\n return {\n charMap: charMap,\n subtable: subtable.data,\n maxGlyphID: nextID + 1\n };\n }\n };\n return CmapEntry;\n})();\n\nvar CmapTable = (function(_super) {\n __extends(CmapTable, _super);\n\n function CmapTable() {\n return CmapTable.__super__.constructor.apply(this, arguments);\n }\n CmapTable.prototype.tag = \"cmap\";\n CmapTable.prototype.parse = function(data) {\n var entry, i, tableCount;\n data.pos = this.offset;\n this.version = data.readUInt16();\n tableCount = data.readUInt16();\n this.tables = [];\n this.unicode = null;\n for (\n i = 0;\n 0 <= tableCount ? i < tableCount : i > tableCount;\n i = 0 <= tableCount ? ++i : --i\n ) {\n entry = new CmapEntry(data, this.offset);\n this.tables.push(entry);\n if (entry.isUnicode) {\n if (this.unicode == null) {\n this.unicode = entry;\n }\n }\n }\n return true;\n };\n /*************************************************************************/\n /* function : encode */\n /* comment : Encode the cmap table corresponding to the input character. */\n /*************************************************************************/\n CmapTable.encode = function(charmap, encoding) {\n var result, table;\n if (encoding == null) {\n encoding = \"macroman\";\n }\n result = CmapEntry.encode(charmap, encoding);\n table = new Data();\n table.writeUInt16(0);\n table.writeUInt16(1);\n result.table = table.data.concat(result.subtable);\n return result;\n };\n return CmapTable;\n})(Table);\n\nvar HheaTable = (function(_super) {\n __extends(HheaTable, _super);\n\n function HheaTable() {\n return HheaTable.__super__.constructor.apply(this, arguments);\n }\n HheaTable.prototype.tag = \"hhea\";\n HheaTable.prototype.parse = function(data) {\n data.pos = this.offset;\n this.version = data.readInt();\n this.ascender = data.readShort();\n this.decender = data.readShort();\n this.lineGap = data.readShort();\n this.advanceWidthMax = data.readShort();\n this.minLeftSideBearing = data.readShort();\n this.minRightSideBearing = data.readShort();\n this.xMaxExtent = data.readShort();\n this.caretSlopeRise = data.readShort();\n this.caretSlopeRun = data.readShort();\n this.caretOffset = data.readShort();\n data.pos += 4 * 2;\n this.metricDataFormat = data.readShort();\n return (this.numberOfMetrics = data.readUInt16());\n };\n /*HheaTable.prototype.encode = function (ids) {\n var i, table, _i, _ref;\n table = new Data;\n table.writeInt(this.version);\n table.writeShort(this.ascender);\n table.writeShort(this.decender);\n table.writeShort(this.lineGap);\n table.writeShort(this.advanceWidthMax);\n table.writeShort(this.minLeftSideBearing);\n table.writeShort(this.minRightSideBearing);\n table.writeShort(this.xMaxExtent);\n table.writeShort(this.caretSlopeRise);\n table.writeShort(this.caretSlopeRun);\n table.writeShort(this.caretOffset);\n for (i = _i = 0, _ref = 4 * 2; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n table.writeByte(0);\n }\n table.writeShort(this.metricDataFormat);\n table.writeUInt16(ids.length);\n return table.data;\n };*/\n return HheaTable;\n})(Table);\n\nvar OS2Table = (function(_super) {\n __extends(OS2Table, _super);\n\n function OS2Table() {\n return OS2Table.__super__.constructor.apply(this, arguments);\n }\n OS2Table.prototype.tag = \"OS/2\";\n OS2Table.prototype.parse = function(data) {\n data.pos = this.offset;\n this.version = data.readUInt16();\n this.averageCharWidth = data.readShort();\n this.weightClass = data.readUInt16();\n this.widthClass = data.readUInt16();\n this.type = data.readShort();\n this.ySubscriptXSize = data.readShort();\n this.ySubscriptYSize = data.readShort();\n this.ySubscriptXOffset = data.readShort();\n this.ySubscriptYOffset = data.readShort();\n this.ySuperscriptXSize = data.readShort();\n this.ySuperscriptYSize = data.readShort();\n this.ySuperscriptXOffset = data.readShort();\n this.ySuperscriptYOffset = data.readShort();\n this.yStrikeoutSize = data.readShort();\n this.yStrikeoutPosition = data.readShort();\n this.familyClass = data.readShort();\n this.panose = (function() {\n var i, _results;\n _results = [];\n for (i = 0; i < 10; ++i) {\n _results.push(data.readByte());\n }\n return _results;\n })();\n this.charRange = (function() {\n var i, _results;\n _results = [];\n for (i = 0; i < 4; ++i) {\n _results.push(data.readInt());\n }\n return _results;\n })();\n this.vendorID = data.readString(4);\n this.selection = data.readShort();\n this.firstCharIndex = data.readShort();\n this.lastCharIndex = data.readShort();\n if (this.version > 0) {\n this.ascent = data.readShort();\n this.descent = data.readShort();\n this.lineGap = data.readShort();\n this.winAscent = data.readShort();\n this.winDescent = data.readShort();\n this.codePageRange = (function() {\n var i, _results;\n _results = [];\n for (i = 0; i < 2; i = ++i) {\n _results.push(data.readInt());\n }\n return _results;\n })();\n if (this.version > 1) {\n this.xHeight = data.readShort();\n this.capHeight = data.readShort();\n this.defaultChar = data.readShort();\n this.breakChar = data.readShort();\n return (this.maxContext = data.readShort());\n }\n }\n };\n /*OS2Table.prototype.encode = function () {\n return this.raw();\n };*/\n return OS2Table;\n})(Table);\n\nvar PostTable = (function(_super) {\n var POSTSCRIPT_GLYPHS;\n __extends(PostTable, _super);\n\n function PostTable() {\n return PostTable.__super__.constructor.apply(this, arguments);\n }\n PostTable.prototype.tag = \"post\";\n PostTable.prototype.parse = function(data) {\n var length, numberOfGlyphs, _results;\n data.pos = this.offset;\n this.format = data.readInt();\n this.italicAngle = data.readInt();\n this.underlinePosition = data.readShort();\n this.underlineThickness = data.readShort();\n this.isFixedPitch = data.readInt();\n this.minMemType42 = data.readInt();\n this.maxMemType42 = data.readInt();\n this.minMemType1 = data.readInt();\n this.maxMemType1 = data.readInt();\n switch (this.format) {\n case 0x00010000:\n break;\n case 0x00020000:\n numberOfGlyphs = data.readUInt16();\n this.glyphNameIndex = [];\n var i;\n for (\n i = 0;\n 0 <= numberOfGlyphs ? i < numberOfGlyphs : i > numberOfGlyphs;\n i = 0 <= numberOfGlyphs ? ++i : --i\n ) {\n this.glyphNameIndex.push(data.readUInt16());\n }\n this.names = [];\n _results = [];\n while (data.pos < this.offset + this.length) {\n length = data.readByte();\n _results.push(this.names.push(data.readString(length)));\n }\n return _results;\n case 0x00025000:\n numberOfGlyphs = data.readUInt16();\n return (this.offsets = data.read(numberOfGlyphs));\n case 0x00030000:\n break;\n case 0x00040000:\n return (this.map = function() {\n var _j, _ref, _results1;\n _results1 = [];\n for (\n i = _j = 0, _ref = this.file.maxp.numGlyphs;\n 0 <= _ref ? _j < _ref : _j > _ref;\n i = 0 <= _ref ? ++_j : --_j\n ) {\n _results1.push(data.readUInt32());\n }\n return _results1;\n }.call(this));\n }\n };\n /*PostTable.prototype.glyphFor = function (code) {\n var index;\n switch (this.format) {\n case 0x00010000:\n return POSTSCRIPT_GLYPHS[code] || '.notdef';\n case 0x00020000:\n index = this.glyphNameIndex[code];\n if (index <= 257) {\n return POSTSCRIPT_GLYPHS[index];\n }\n else {\n return this.names[index - 258] || '.notdef';\n }\n break;\n case 0x00025000:\n return POSTSCRIPT_GLYPHS[code + this.offsets[code]] || '.notdef';\n case 0x00030000:\n return '.notdef';\n case 0x00040000:\n return this.map[code] || 0xFFFF;\n }\n };*/\n /*PostTable.prototype.encode = function (mapping) {\n var id, index, indexes, position, post, raw, string, strings, table, _i, _j, _k, _len, _len1, _len2;\n if (!this.exists) {\n return null;\n }\n raw = this.raw();\n if (this.format === 0x00030000) {\n return raw;\n }\n table = new Data(raw.slice(0, 32));\n table.writeUInt32(0x00020000);\n table.pos = 32;\n indexes = [];\n strings = [];\n for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n id = mapping[_i];\n post = this.glyphFor(id);\n position = POSTSCRIPT_GLYPHS.indexOf(post);\n if (position !== -1) {\n indexes.push(position);\n }\n else {\n indexes.push(257 + strings.length);\n strings.push(post);\n }\n }\n table.writeUInt16(Object.keys(mapping).length);\n for (_j = 0, _len1 = indexes.length; _j < _len1; _j++) {\n index = indexes[_j];\n table.writeUInt16(index);\n }\n for (_k = 0, _len2 = strings.length; _k < _len2; _k++) {\n string = strings[_k];\n table.writeByte(string.length);\n table.writeString(string);\n }\n return table.data;\n };*/\n POSTSCRIPT_GLYPHS = \".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent\\nampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash\\nzero one two three four five six seven eight nine colon semicolon less equal greater\\nquestion at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\\nbracketleft backslash bracketright asciicircum underscore grave\\na b c d e f g h i j k l m n o p q r s t u v w x y z\\nbraceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis\\nUdieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave\\necircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve\\nocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent\\nsterling section bullet paragraph germandbls registered copyright trademark acute\\ndieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu\\npartialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash\\nquestiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft\\nguillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash\\nquotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis\\nfraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered\\nquotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis\\nEgrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute\\nUcircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla\\nhungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth\\neth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior\\nonehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla\\nCacute cacute Ccaron ccaron dcroat\".split(\n /\\s+/g\n );\n return PostTable;\n})(Table);\n\n/*********************************************************************************************************/\n/* function : NameEntry */\n/* comment : Store copyright information, platformID, encodingID, and languageID in the NameEntry object.*/\n/*********************************************************************************************************/\nvar NameEntry = (function() {\n function NameEntry(raw, entry) {\n this.raw = raw;\n this.length = raw.length;\n this.platformID = entry.platformID;\n this.encodingID = entry.encodingID;\n this.languageID = entry.languageID;\n }\n return NameEntry;\n})();\n\nvar NameTable = (function(_super) {\n var subsetTag;\n __extends(NameTable, _super);\n\n function NameTable() {\n return NameTable.__super__.constructor.apply(this, arguments);\n }\n NameTable.prototype.tag = \"name\";\n NameTable.prototype.parse = function(data) {\n var count,\n entries,\n entry,\n i,\n name,\n stringOffset,\n strings,\n text,\n _j,\n _len,\n _name;\n data.pos = this.offset;\n data.readShort(); //format\n count = data.readShort();\n stringOffset = data.readShort();\n entries = [];\n for (\n i = 0;\n 0 <= count ? i < count : i > count;\n i = 0 <= count ? ++i : --i\n ) {\n entries.push({\n platformID: data.readShort(),\n encodingID: data.readShort(),\n languageID: data.readShort(),\n nameID: data.readShort(),\n length: data.readShort(),\n offset: this.offset + stringOffset + data.readShort()\n });\n }\n strings = {};\n for (i = _j = 0, _len = entries.length; _j < _len; i = ++_j) {\n entry = entries[i];\n data.pos = entry.offset;\n text = data.readString(entry.length);\n name = new NameEntry(text, entry);\n if (strings[(_name = entry.nameID)] == null) {\n strings[_name] = [];\n }\n strings[entry.nameID].push(name);\n }\n this.strings = strings;\n this.copyright = strings[0];\n this.fontFamily = strings[1];\n this.fontSubfamily = strings[2];\n this.uniqueSubfamily = strings[3];\n this.fontName = strings[4];\n this.version = strings[5];\n try {\n this.postscriptName = strings[6][0].raw.replace(\n /[\\x00-\\x19\\x80-\\xff]/g,\n \"\"\n );\n } catch (e) {\n this.postscriptName = strings[4][0].raw.replace(\n /[\\x00-\\x19\\x80-\\xff]/g,\n \"\"\n );\n }\n this.trademark = strings[7];\n this.manufacturer = strings[8];\n this.designer = strings[9];\n this.description = strings[10];\n this.vendorUrl = strings[11];\n this.designerUrl = strings[12];\n this.license = strings[13];\n this.licenseUrl = strings[14];\n this.preferredFamily = strings[15];\n this.preferredSubfamily = strings[17];\n this.compatibleFull = strings[18];\n return (this.sampleText = strings[19]);\n };\n subsetTag = \"AAAAAA\";\n /*NameTable.prototype.encode = function () {\n var id, list, nameID, nameTable, postscriptName, strCount, strTable, string, strings, table, val, _i, _len, _ref;\n strings = {};\n _ref = this.strings;\n for (id in _ref) {\n val = _ref[id];\n strings[id] = val;\n }\n postscriptName = new NameEntry(\"\" + subsetTag + \"+\" + this.postscriptName, {\n platformID: 1\n , encodingID: 0\n , languageID: 0\n });\n strings[6] = [postscriptName];\n subsetTag = successorOf(subsetTag);\n strCount = 0;\n for (id in strings) {\n list = strings[id];\n if (list != null) {\n strCount += list.length;\n }\n }\n table = new Data;\n strTable = new Data;\n table.writeShort(0);\n table.writeShort(strCount);\n table.writeShort(6 + 12 * strCount);\n for (nameID in strings) {\n list = strings[nameID];\n if (list != null) {\n for (_i = 0, _len = list.length; _i < _len; _i++) {\n string = list[_i];\n table.writeShort(string.platformID);\n table.writeShort(string.encodingID);\n table.writeShort(string.languageID);\n table.writeShort(nameID);\n table.writeShort(string.length);\n table.writeShort(strTable.pos);\n strTable.writeString(string.raw);\n }\n }\n }\n return nameTable = {\n postscriptName: postscriptName.raw\n , table: table.data.concat(strTable.data)\n };\n };*/\n return NameTable;\n})(Table);\n\nvar MaxpTable = (function(_super) {\n __extends(MaxpTable, _super);\n\n function MaxpTable() {\n return MaxpTable.__super__.constructor.apply(this, arguments);\n }\n MaxpTable.prototype.tag = \"maxp\";\n MaxpTable.prototype.parse = function(data) {\n data.pos = this.offset;\n this.version = data.readInt();\n this.numGlyphs = data.readUInt16();\n this.maxPoints = data.readUInt16();\n this.maxContours = data.readUInt16();\n this.maxCompositePoints = data.readUInt16();\n this.maxComponentContours = data.readUInt16();\n this.maxZones = data.readUInt16();\n this.maxTwilightPoints = data.readUInt16();\n this.maxStorage = data.readUInt16();\n this.maxFunctionDefs = data.readUInt16();\n this.maxInstructionDefs = data.readUInt16();\n this.maxStackElements = data.readUInt16();\n this.maxSizeOfInstructions = data.readUInt16();\n this.maxComponentElements = data.readUInt16();\n return (this.maxComponentDepth = data.readUInt16());\n };\n /*MaxpTable.prototype.encode = function (ids) {\n var table;\n table = new Data;\n table.writeInt(this.version);\n table.writeUInt16(ids.length);\n table.writeUInt16(this.maxPoints);\n table.writeUInt16(this.maxContours);\n table.writeUInt16(this.maxCompositePoints);\n table.writeUInt16(this.maxComponentContours);\n table.writeUInt16(this.maxZones);\n table.writeUInt16(this.maxTwilightPoints);\n table.writeUInt16(this.maxStorage);\n table.writeUInt16(this.maxFunctionDefs);\n table.writeUInt16(this.maxInstructionDefs);\n table.writeUInt16(this.maxStackElements);\n table.writeUInt16(this.maxSizeOfInstructions);\n table.writeUInt16(this.maxComponentElements);\n table.writeUInt16(this.maxComponentDepth);\n return table.data;\n };*/\n return MaxpTable;\n})(Table);\n\nvar HmtxTable = (function(_super) {\n __extends(HmtxTable, _super);\n\n function HmtxTable() {\n return HmtxTable.__super__.constructor.apply(this, arguments);\n }\n HmtxTable.prototype.tag = \"hmtx\";\n HmtxTable.prototype.parse = function(data) {\n var i, last, lsbCount, m, _j, _ref, _results;\n data.pos = this.offset;\n this.metrics = [];\n for (\n i = 0, _ref = this.file.hhea.numberOfMetrics;\n 0 <= _ref ? i < _ref : i > _ref;\n i = 0 <= _ref ? ++i : --i\n ) {\n this.metrics.push({\n advance: data.readUInt16(),\n lsb: data.readInt16()\n });\n }\n lsbCount = this.file.maxp.numGlyphs - this.file.hhea.numberOfMetrics;\n this.leftSideBearings = (function() {\n var _j, _results;\n _results = [];\n for (\n i = _j = 0;\n 0 <= lsbCount ? _j < lsbCount : _j > lsbCount;\n i = 0 <= lsbCount ? ++_j : --_j\n ) {\n _results.push(data.readInt16());\n }\n return _results;\n })();\n this.widths = function() {\n var _j, _len, _ref1, _results;\n _ref1 = this.metrics;\n _results = [];\n for (_j = 0, _len = _ref1.length; _j < _len; _j++) {\n m = _ref1[_j];\n _results.push(m.advance);\n }\n return _results;\n }.call(this);\n last = this.widths[this.widths.length - 1];\n _results = [];\n for (\n i = _j = 0;\n 0 <= lsbCount ? _j < lsbCount : _j > lsbCount;\n i = 0 <= lsbCount ? ++_j : --_j\n ) {\n _results.push(this.widths.push(last));\n }\n return _results;\n };\n /***************************************************************/\n /* function : forGlyph */\n /* comment : Returns the advance width and lsb for this glyph. */\n /***************************************************************/\n HmtxTable.prototype.forGlyph = function(id) {\n if (id in this.metrics) {\n return this.metrics[id];\n }\n return {\n advance: this.metrics[this.metrics.length - 1].advance,\n lsb: this.leftSideBearings[id - this.metrics.length]\n };\n };\n /*HmtxTable.prototype.encode = function (mapping) {\n var id, metric, table, _i, _len;\n table = new Data;\n for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n id = mapping[_i];\n metric = this.forGlyph(id);\n table.writeUInt16(metric.advance);\n table.writeUInt16(metric.lsb);\n }\n return table.data;\n };*/\n return HmtxTable;\n})(Table);\n\nvar __slice = [].slice;\n\nvar GlyfTable = (function(_super) {\n __extends(GlyfTable, _super);\n\n function GlyfTable() {\n return GlyfTable.__super__.constructor.apply(this, arguments);\n }\n GlyfTable.prototype.tag = \"glyf\";\n GlyfTable.prototype.parse = function() {\n return (this.cache = {});\n };\n GlyfTable.prototype.glyphFor = function(id) {\n var data,\n index,\n length,\n loca,\n numberOfContours,\n raw,\n xMax,\n xMin,\n yMax,\n yMin;\n if (id in this.cache) {\n return this.cache[id];\n }\n loca = this.file.loca;\n data = this.file.contents;\n index = loca.indexOf(id);\n length = loca.lengthOf(id);\n if (length === 0) {\n return (this.cache[id] = null);\n }\n data.pos = this.offset + index;\n raw = new Data(data.read(length));\n numberOfContours = raw.readShort();\n xMin = raw.readShort();\n yMin = raw.readShort();\n xMax = raw.readShort();\n yMax = raw.readShort();\n if (numberOfContours === -1) {\n this.cache[id] = new CompoundGlyph(raw, xMin, yMin, xMax, yMax);\n } else {\n this.cache[id] = new SimpleGlyph(\n raw,\n numberOfContours,\n xMin,\n yMin,\n xMax,\n yMax\n );\n }\n return this.cache[id];\n };\n GlyfTable.prototype.encode = function(glyphs, mapping, old2new) {\n var glyph, id, offsets, table, _i, _len;\n table = [];\n offsets = [];\n for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n id = mapping[_i];\n glyph = glyphs[id];\n offsets.push(table.length);\n if (glyph) {\n table = table.concat(glyph.encode(old2new));\n }\n }\n offsets.push(table.length);\n return {\n table: table,\n offsets: offsets\n };\n };\n return GlyfTable;\n})(Table);\n\nvar SimpleGlyph = (function() {\n /**************************************************************************/\n /* function : SimpleGlyph */\n /* comment : Stores raw, xMin, yMin, xMax, and yMax values for this glyph.*/\n /**************************************************************************/\n function SimpleGlyph(raw, numberOfContours, xMin, yMin, xMax, yMax) {\n this.raw = raw;\n this.numberOfContours = numberOfContours;\n this.xMin = xMin;\n this.yMin = yMin;\n this.xMax = xMax;\n this.yMax = yMax;\n this.compound = false;\n }\n SimpleGlyph.prototype.encode = function() {\n return this.raw.data;\n };\n return SimpleGlyph;\n})();\n\nvar CompoundGlyph = (function() {\n var ARG_1_AND_2_ARE_WORDS,\n MORE_COMPONENTS,\n WE_HAVE_AN_X_AND_Y_SCALE,\n WE_HAVE_A_SCALE,\n WE_HAVE_A_TWO_BY_TWO,\n WE_HAVE_INSTRUCTIONS;\n ARG_1_AND_2_ARE_WORDS = 0x0001;\n WE_HAVE_A_SCALE = 0x0008;\n MORE_COMPONENTS = 0x0020;\n WE_HAVE_AN_X_AND_Y_SCALE = 0x0040;\n WE_HAVE_A_TWO_BY_TWO = 0x0080;\n WE_HAVE_INSTRUCTIONS = 0x0100;\n\n /********************************************************************************************************************/\n /* function : CompoundGlypg generator */\n /* comment : It stores raw, xMin, yMin, xMax, yMax, glyph id, and glyph offset for the corresponding compound glyph.*/\n /********************************************************************************************************************/\n function CompoundGlyph(raw, xMin, yMin, xMax, yMax) {\n var data, flags;\n this.raw = raw;\n this.xMin = xMin;\n this.yMin = yMin;\n this.xMax = xMax;\n this.yMax = yMax;\n this.compound = true;\n this.glyphIDs = [];\n this.glyphOffsets = [];\n data = this.raw;\n while (true) {\n flags = data.readShort();\n this.glyphOffsets.push(data.pos);\n this.glyphIDs.push(data.readUInt16());\n if (!(flags & MORE_COMPONENTS)) {\n break;\n }\n if (flags & ARG_1_AND_2_ARE_WORDS) {\n data.pos += 4;\n } else {\n data.pos += 2;\n }\n if (flags & WE_HAVE_A_TWO_BY_TWO) {\n data.pos += 8;\n } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) {\n data.pos += 4;\n } else if (flags & WE_HAVE_A_SCALE) {\n data.pos += 2;\n }\n }\n }\n /****************************************************************************************************************/\n /* function : CompoundGlypg encode */\n /* comment : After creating a table for the characters you typed, you call directory.encode to encode the table.*/\n /****************************************************************************************************************/\n CompoundGlyph.prototype.encode = function() {\n var i, result, _len, _ref;\n result = new Data(__slice.call(this.raw.data));\n _ref = this.glyphIDs;\n for (i = 0, _len = _ref.length; i < _len; ++i) {\n result.pos = this.glyphOffsets[i];\n }\n return result.data;\n };\n return CompoundGlyph;\n})();\n\nvar LocaTable = (function(_super) {\n __extends(LocaTable, _super);\n\n function LocaTable() {\n return LocaTable.__super__.constructor.apply(this, arguments);\n }\n LocaTable.prototype.tag = \"loca\";\n LocaTable.prototype.parse = function(data) {\n var format, i;\n data.pos = this.offset;\n format = this.file.head.indexToLocFormat;\n if (format === 0) {\n return (this.offsets = function() {\n var _ref, _results;\n _results = [];\n for (i = 0, _ref = this.length; i < _ref; i += 2) {\n _results.push(data.readUInt16() * 2);\n }\n return _results;\n }.call(this));\n } else {\n return (this.offsets = function() {\n var _ref, _results;\n _results = [];\n for (i = 0, _ref = this.length; i < _ref; i += 4) {\n _results.push(data.readUInt32());\n }\n return _results;\n }.call(this));\n }\n };\n LocaTable.prototype.indexOf = function(id) {\n return this.offsets[id];\n };\n LocaTable.prototype.lengthOf = function(id) {\n return this.offsets[id + 1] - this.offsets[id];\n };\n LocaTable.prototype.encode = function(offsets, activeGlyphs) {\n var LocaTable = new Uint32Array(this.offsets.length);\n var glyfPtr = 0;\n var listGlyf = 0;\n for (var k = 0; k < LocaTable.length; ++k) {\n LocaTable[k] = glyfPtr;\n if (listGlyf < activeGlyphs.length && activeGlyphs[listGlyf] == k) {\n ++listGlyf;\n LocaTable[k] = glyfPtr;\n var start = this.offsets[k];\n var len = this.offsets[k + 1] - start;\n if (len > 0) {\n glyfPtr += len;\n }\n }\n }\n var newLocaTable = new Array(LocaTable.length * 4);\n for (var j = 0; j < LocaTable.length; ++j) {\n newLocaTable[4 * j + 3] = LocaTable[j] & 0x000000ff;\n newLocaTable[4 * j + 2] = (LocaTable[j] & 0x0000ff00) >> 8;\n newLocaTable[4 * j + 1] = (LocaTable[j] & 0x00ff0000) >> 16;\n newLocaTable[4 * j] = (LocaTable[j] & 0xff000000) >> 24;\n }\n return newLocaTable;\n };\n return LocaTable;\n})(Table);\n\n/************************************************************************************/\n/* function : invert */\n/* comment : Change the object's (key: value) to create an object with (value: key).*/\n/************************************************************************************/\nvar invert = function(object) {\n var key, ret, val;\n ret = {};\n for (key in object) {\n val = object[key];\n ret[val] = key;\n }\n return ret;\n};\n\n/*var successorOf = function (input) {\n var added, alphabet, carry, i, index, isUpperCase, last, length, next, result;\n alphabet = 'abcdefghijklmnopqrstuvwxyz';\n length = alphabet.length;\n result = input;\n i = input.length;\n while (i >= 0) {\n last = input.charAt(--i);\n if (isNaN(last)) {\n index = alphabet.indexOf(last.toLowerCase());\n if (index === -1) {\n next = last;\n carry = true;\n }\n else {\n next = alphabet.charAt((index + 1) % length);\n isUpperCase = last === last.toUpperCase();\n if (isUpperCase) {\n next = next.toUpperCase();\n }\n carry = index + 1 >= length;\n if (carry && i === 0) {\n added = isUpperCase ? 'A' : 'a';\n result = added + next + result.slice(1);\n break;\n }\n }\n }\n else {\n next = +last + 1;\n carry = next > 9;\n if (carry) {\n next = 0;\n }\n if (carry && i === 0) {\n result = '1' + next + result.slice(1);\n break;\n }\n }\n result = result.slice(0, i) + next + result.slice(i + 1);\n if (!carry) {\n break;\n }\n }\n return result;\n };*/\n\nvar Subset = (function() {\n function Subset(font) {\n this.font = font;\n this.subset = {};\n this.unicodes = {};\n this.next = 33;\n }\n /*Subset.prototype.use = function (character) {\n var i, _i, _ref;\n if (typeof character === 'string') {\n for (i = _i = 0, _ref = character.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n this.use(character.charCodeAt(i));\n }\n return;\n }\n if (!this.unicodes[character]) {\n this.subset[this.next] = character;\n return this.unicodes[character] = this.next++;\n }\n };*/\n /*Subset.prototype.encodeText = function (text) {\n var char, i, string, _i, _ref;\n string = '';\n for (i = _i = 0, _ref = text.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n char = this.unicodes[text.charCodeAt(i)];\n string += String.fromCharCode(char);\n }\n return string;\n };*/\n /***************************************************************/\n /* function : generateCmap */\n /* comment : Returns the unicode cmap for this font. */\n /***************************************************************/\n Subset.prototype.generateCmap = function() {\n var mapping, roman, unicode, unicodeCmap, _ref;\n unicodeCmap = this.font.cmap.tables[0].codeMap;\n mapping = {};\n _ref = this.subset;\n for (roman in _ref) {\n unicode = _ref[roman];\n mapping[roman] = unicodeCmap[unicode];\n }\n return mapping;\n };\n /*Subset.prototype.glyphIDs = function () {\n var ret, roman, unicode, unicodeCmap, val, _ref;\n unicodeCmap = this.font.cmap.tables[0].codeMap;\n ret = [0];\n _ref = this.subset;\n for (roman in _ref) {\n unicode = _ref[roman];\n val = unicodeCmap[unicode];\n if ((val != null) && __indexOf.call(ret, val) < 0) {\n ret.push(val);\n }\n }\n return ret.sort();\n };*/\n /******************************************************************/\n /* function : glyphsFor */\n /* comment : Returns simple glyph objects for the input character.*/\n /******************************************************************/\n Subset.prototype.glyphsFor = function(glyphIDs) {\n var additionalIDs, glyph, glyphs, id, _i, _len, _ref;\n glyphs = {};\n for (_i = 0, _len = glyphIDs.length; _i < _len; _i++) {\n id = glyphIDs[_i];\n glyphs[id] = this.font.glyf.glyphFor(id);\n }\n additionalIDs = [];\n for (id in glyphs) {\n glyph = glyphs[id];\n if (glyph != null ? glyph.compound : void 0) {\n additionalIDs.push.apply(additionalIDs, glyph.glyphIDs);\n }\n }\n if (additionalIDs.length > 0) {\n _ref = this.glyphsFor(additionalIDs);\n for (id in _ref) {\n glyph = _ref[id];\n glyphs[id] = glyph;\n }\n }\n return glyphs;\n };\n /***************************************************************/\n /* function : encode */\n /* comment : Encode various tables for the characters you use. */\n /***************************************************************/\n Subset.prototype.encode = function(glyID, indexToLocFormat) {\n var cmap,\n code,\n glyf,\n glyphs,\n id,\n ids,\n loca,\n new2old,\n newIDs,\n nextGlyphID,\n old2new,\n oldID,\n oldIDs,\n tables,\n _ref;\n cmap = CmapTable.encode(this.generateCmap(), \"unicode\");\n glyphs = this.glyphsFor(glyID);\n old2new = {\n 0: 0\n };\n _ref = cmap.charMap;\n for (code in _ref) {\n ids = _ref[code];\n old2new[ids.old] = ids[\"new\"];\n }\n nextGlyphID = cmap.maxGlyphID;\n for (oldID in glyphs) {\n if (!(oldID in old2new)) {\n old2new[oldID] = nextGlyphID++;\n }\n }\n new2old = invert(old2new);\n newIDs = Object.keys(new2old).sort(function(a, b) {\n return a - b;\n });\n oldIDs = (function() {\n var _i, _len, _results;\n _results = [];\n for (_i = 0, _len = newIDs.length; _i < _len; _i++) {\n id = newIDs[_i];\n _results.push(new2old[id]);\n }\n return _results;\n })();\n glyf = this.font.glyf.encode(glyphs, oldIDs, old2new);\n loca = this.font.loca.encode(glyf.offsets, oldIDs);\n tables = {\n cmap: this.font.cmap.raw(),\n glyf: glyf.table,\n loca: loca,\n hmtx: this.font.hmtx.raw(),\n hhea: this.font.hhea.raw(),\n maxp: this.font.maxp.raw(),\n post: this.font.post.raw(),\n name: this.font.name.raw(),\n head: this.font.head.encode(indexToLocFormat)\n };\n if (this.font.os2.exists) {\n tables[\"OS/2\"] = this.font.os2.raw();\n }\n return this.font.directory.encode(tables);\n };\n return Subset;\n})();\n\njsPDF.API.PDFObject = (function() {\n var pad;\n\n function PDFObject() {}\n pad = function(str, length) {\n return (Array(length + 1).join(\"0\") + str).slice(-length);\n };\n /*****************************************************************************/\n /* function : convert */\n /* comment :Converts pdf tag's / FontBBox and array values in / W to strings */\n /*****************************************************************************/\n PDFObject.convert = function(object) {\n var e, items, key, out, val;\n if (Array.isArray(object)) {\n items = (function() {\n var _i, _len, _results;\n _results = [];\n for (_i = 0, _len = object.length; _i < _len; _i++) {\n e = object[_i];\n _results.push(PDFObject.convert(e));\n }\n return _results;\n })().join(\" \");\n return \"[\" + items + \"]\";\n } else if (typeof object === \"string\") {\n return \"/\" + object;\n } else if (object != null ? object.isString : void 0) {\n return \"(\" + object + \")\";\n } else if (object instanceof Date) {\n return (\n \"(D:\" +\n pad(object.getUTCFullYear(), 4) +\n pad(object.getUTCMonth(), 2) +\n pad(object.getUTCDate(), 2) +\n pad(object.getUTCHours(), 2) +\n pad(object.getUTCMinutes(), 2) +\n pad(object.getUTCSeconds(), 2) +\n \"Z)\"\n );\n } else if ({}.toString.call(object) === \"[object Object]\") {\n out = [\"<<\"];\n for (key in object) {\n val = object[key];\n out.push(\"/\" + key + \" \" + PDFObject.convert(val));\n }\n out.push(\">>\");\n return out.join(\"\\n\");\n } else {\n return \"\" + object;\n }\n };\n return PDFObject;\n})();\n"],"names":["globalObject","window","global","self","this","consoleLog","console","log","apply","arguments","warn","str","call","error","download","url","name","opts","xhr","XMLHttpRequest","open","responseType","onload","saveAs","response","onerror","send","corsEnabled","e","status","click","node","dispatchEvent","MouseEvent","evt","document","createEvent","initMouseEvent","atob","btoa","_global","HTMLAnchorElement","prototype","blob","URL","webkitURL","a","createElement","rel","href","origin","location","target","createObjectURL","setTimeout","revokeObjectURL","navigator","msSaveOrOpenBlob","autoBom","_typeof","test","type","Blob","String","fromCharCode","bom","popup","title","body","innerText","force","isSafari","HTMLElement","safari","isChromeIOS","userAgent","FileReader","reader","onloadend","result","replace","readAsDataURL","RGBColor","color_string","channels","ok","charAt","substr","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","feldspar","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslateblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","violetred","wheat","white","whitesmoke","yellow","yellowgreen","toLowerCase","color_defs","re","example","process","bits","parseInt","i","length","processor","exec","r","g","b","isNaN","toRGB","toHex","toString","md5cycle","x","k","c","d","ff","gg","hh","ii","add32","cmn","q","s","t","md51","n","state","md5blk","substring","tail","charCodeAt","md5blks","bind","hex_chr","split","rhex","j","singleToByteString","md5Bin","map","join","md5Check","hex","lsw","rc4","key","data","lastKey","lastState","num","Array","out","permissionOptions","print","modify","copy","PDFSecurity","permissions","userPassword","ownerPassword","fileId","v","protection","forEach","perm","Error","padding","paddedUserPassword","paddedOwnerPassword","O","processOwnerPassword","P","encryptionKey","lsbFirstWord","hexToBytes","U","toPDFName","strLength","charCode","slice","PubSub","context","topics","subscribe","topic","callback","once","hasOwnProperty","token","Math","random","unsubscribe","Object","keys","publish","args","tokens","sub","ex","message","push","getTopics","GState","parameters","supported","p","indexOf","id","objectNumber","Pattern","gState","matrix","ShadingPattern","coords","colors","TilingPattern","boundingBox","xStep","yStep","stream","cloneIndex","jsPDF","options","precision","orientation","unit","format","compressPdf","filters","userUnit","floatPrecision","defaultPathOperation","encryptionOptions","compress","encryption","userPermissions","abs","putOnlyUsedFonts","usedFonts","API","internal","__private__","pdfVersion","getPdfVersion","setPdfVersion","value","pageFormats","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","a10","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","b10","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","c10","dl","letter","legal","ledger","tabloid","getPageFormats","getPageFormat","ApiMode","COMPAT","ADVANCED","apiMode","advancedAPI","saveGraphicsState","Matrix","scaleFactor","getPageHeight","setFontSize","getFontSize","compatAPI","restoreGraphicsState","combineFontStyleAndFontWeight","fontStyle","fontWeight","doSwitch","isAdvancedAPI","hpf","advancedApiModeTrap","methodName","roundToPrecision","number","parmPrecision","tmpPrecision","toFixed","f2","f3","scale","transformY","y","transformScaleY","setPrecision","creationDate","getFileId","setFileId","toUpperCase","floor","convertDateToPDFDate","parmDate","tzoffset","getTimezoneOffset","tzsign","tzhour","tzmin","timeZoneString","padd2","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","convertPDFDateToDate","parmPDFDate","year","month","date","hour","minutes","seconds","Date","setCreationDate","tmpCreationDateString","getCreationDate","currentPage","padd2Hex","hexString","offsets","content","contentLength","additionalObjects","pages","hasCustomDestination","outputDestination","resetDocument","rootDictionaryObjId","newObjectDeferred","resourceDictionaryObjId","setCustomOutputDestination","destination","setOutputDestination","resetCustomOutputDestination","string","write","getArrayBuffer","len","ab","ArrayBuffer","u8","Uint8Array","standardFonts","getStandardFonts","activeFontSize","fontSize","size","zoomMode","R2L","setR2L","getR2L","pageMode","setZoomMode","zoom","validZoomModes","undefined","getZoomMode","layoutMode","setPageMode","pmode","getPageMode","setLayoutMode","layout","getLayoutMode","setDisplayMode","documentProperties","subject","author","keywords","creator","getDocumentProperty","getDocumentProperties","setDocumentProperties","setProperties","properties","property","setDocumentProperty","activeFontKey","pageX","pageY","pageMatrix","fonts","fontmap","fontStateStack","patterns","patternMap","gStates","gStatesMap","activeGState","page","pagesContext","events","hotfixes","renderTargets","renderTargetMap","renderTargetStack","sx","shy","shx","sy","tx","ty","_matrix","defineProperty","get","set","atan2","decompose","separator","multiply","f","scaleX","sqrt","shear","scaleY","translate","rotate","skew","inversed","quot","aInv","bInv","cInv","dInv","applyToPoint","pt","Point","applyToRectangle","rect","pt1","pt2","w","h","Rectangle","clone","matrixMult","m1","m2","identityMatrix","unitMatrix","addPattern","pattern","patternKey","addShadingPattern","beginTilingPattern","beginNewRenderTarget","endTilingPattern","pop","restore","newObject","oid","newObjectDeferredBegin","doOutput","newAdditionalObject","obj","objId","decodeColorString","color","colorEncoded","floatVal","parseFloat","colorAsRGB","encodeColorString","ch1","ch2","ch3","ch4","letterArray","pdfColorType","rgbColor","getFilters","putStream","alreadyAppliedFilters","addLength1","valueOfLength1","objectId","encryptor","processedData","keyValues","additionalKeyValues","filterAsString","processDataByFilters","reverseChain","isArray","decodeParmsArray","putPage","pageNumber","pageObjectNumber","pageContentsObjId","contentsObjId","mediaBox","bottomLeftX","bottomLeftY","topRightX","topRightY","cropBox","bleedBox","trimBox","artBox","pageContext","pageContent","putPages","pageObjectNumbers","kids","putFont","font","isAlreadyPutted","postScriptName","encoding","putFonts","fontKey","putXObject","xObject","width","height","putXObjects","xObjectKey","interpolateAndEncodeRGBStream","numberSamples","tValues","dT","offset","unshift","index","aColor","bColor","round","trim","putShadingPattern","funcObjectNumber","putTilingPattern","deferredResourceDictionaryIds","resourcesObjectId","patternObjectId","resourcesOid","objectOid","putPatterns","putGState","putGStates","gStateKey","putXobjectDict","putEncryptionDict","toHexString","putFontDict","putShadingPatternDict","putTilingPatternDict","putGStatesDict","putResourceDictionary","objectIds","putResources","Number","MAX_SAFE_INTEGER","putAdditionalObjects","addFontToFontDictionary","fontName","addFont","isStandardFont","metadata","instance","addFonts","arrayOfFonts","l","parts","dictionary","SAFE","fn","foo","stack","m","alert","bar","to8bitStream","text","flags","sourceEncoding","encodingBlock","outputEncoding","newtext","isUnicode","ch","bch","autoencode","codePages","noBOM","pdfEscape","beginPage","_setPage","_addPage","parmFormat","parmOrientation","dimensions","min","setLineWidth","lineWidth","strokeColor","lineCapID","lineJoinID","_deletePage","splice","setPage","getNumberOfPages","getFont","fontNameLowerCase","disableWarning","noFallback","putInfo","version","putCatalog","tmpRootDictionaryObjId","pcn","putTrailer","putHeader","putXRef","buildDocument","offsetOfXRef","getBlob","output","filename","save","dataURI","pdfDocument","unescape","encodeURIComponent","pdfObjectUrl","integrity","htmlForNewWindow","JSON","stringify","nW","htmlForPDFjsNewWindow","pdfJsUrl","PDFjsNewWindow","scope","documentElement","querySelector","contentWindow","PDFViewerApplication","htmlForDataURLNewWindow","dataURLNewWindow","hasHotfix","hotfixName","getEncryptor","getPageInfo","pageNumberOneBased","getPageInfoByObjId","getCurrentPageInfo","addPage","insertPage","beforePage","movePage","targetPage","tmpPages","tmpPagesContext","deletePage","transform","payload","da","angle","align","charSpace","maxWidth","horizontalScale","transformationMatrix","tmp","xtra","isHex","lineHeight","lineHeightFactor","ESC","TabLen","transformTextToSpecialArray","curDa","sa","concat","shift","processTextByFunction","processingFunction","tmpResult","textIsOfTypeString","tmpTextIsOfTypeString","match","descent","baseline","splitTextToSize","reduce","acc","textLine","mutex","PI","rotationDirection","cos","sin","activeCharSpace","setCharSpace","getCharSpace","lang","renderingMode","parmRenderingMode","stroke","usedRenderingMode","lineWidths","leading","pageWidth","pageSize","getWidth","activeFont","assign","wordSpacingPerLine","newY","getStringUnitWidth","doKerning","newX","prevWidth","getHorizontalCoordinate","getVerticalCoordinate","doReversing","posX","posY","reverse","activeFontEncoding","STRING","ARRAY","variant","wordSpacing","generatePosition","parmPosX","parmPosY","parmTransformationMatrix","position","lineIndex","textColor","clip","rule","clipEvenOdd","discardPath","isValidStyle","style","setDefaultPathOperation","operator","getStyle","op","close","fill","fillWithOptionalPattern","fillEvenOdd","fillStroke","fillStrokeEvenOdd","fillWithPattern","putStyle","cloneTilingPattern","patternData","patternId","clipRuleFromStyle","setGState","moveTo","lineTo","curveTo","x1","y1","x2","y2","x3","y3","line","lines","closed","scalex","scaley","leg","x4","y4","path","triangle","roundedRect","rx","ry","MyArc","SQRT2","ellipse","lx","ly","circle","setFont","getFontEntry","getFontList","list","encodingOptions","getLineWidth","setLineDash","setLineDashPattern","dashArray","dashPhase","getLineHeight","setLineHeightFactor","getLineHeightFactor","getHorizontalCoordinateString","getVerticalCoordinateString","getStrokeColor","getDrawColor","setStrokeColor","setDrawColor","fillColor","getFillColor","setFillColor","getTextColor","setTextColor","CapJoinStyles","butt","but","miter","rounded","projecting","project","square","bevel","setLineCap","setLineJoin","setLineMiterLimit","setMiterLimit","addGState","equals","duplicate","fontState","setCurrentTransformationMatrix","comment","_x","enumerable","_y","_type","_w","_h","RenderTarget","getPageWidth","setPageWidth","setPageHeight","endFormObject","newXObject","xObjectId","plugin","beginFormObject","doFormObject","getFormObject","returnPromise","unload","Promise","resolve","reject","newEvents","eventname","handler_and_args","getCoordinateString","collections","setWidth","getHeight","setHeight","getPDFVersion","configurable","byteString","byte","bytes","generation","other","ignore","count","jsPDFAPI","pdfUnescape","f5","__acroform__","inherit","child","parent","create","constructor","createFormXObject","formObject","xobj","AcroFormXObject","AcroFormAppearance","BBox","setBit","bitPosition","clearBit","getBit","getBitForPdf","setBitForPdf","clearBitForPdf","calculateCoordinates","coordinates","lowerLeft_X","lowerLeft_Y","upperRight_X","upperRight_Y","calculateAppearanceStream","appearanceStreamContent","V","DV","_V","calcRes","calculateX","maxFontSize","returnValue","textSplit","multiline","word","isSmallerThanWidth","lastLine","calculateFontSpace","FontSize","startX","lastLength","textHeight","startY","lastY","firstWordInLine","lastWordInLine","currWord","lineCount","isWithNewLine","nextLineIsSmaller","isLastWord","currLine","textAlign","acroformPluginTemplate","fields","xForms","acroFormDictionaryRoot","printedOut","isInitialized","createAnnotationReference","object","annotations","find","entry","createXFormObjectCallback","fieldArray","fieldObject","initializeAcroForm","acroformPlugin","AcroFormField","FieldNum","parse","AcroFormDictionary","_eventID","AcroFormDictionaryCallback","Fields","hasAnnotation","annotReferenceCallback","putCatalogCallback","standardFields","Kids","keyValueList","oldRect","Rect","DA","createDefaultAppearanceStream","getKeyValueListForStream","hasAppearanceStream","appearance","appearanceStreamString","createFieldCallback","arrayToPdfArray","array","toPdfString","AcroFormPDFObject","_objId","_scope","writable","getOwnPropertyNames","filter","getOwnPropertyDescriptor","_stream","_BBox","_DA","_Kids","_F","Boolean","F","_Ff","_Rect","_FT","_T","AcroFormChildClass","_fontName","_fontStyle","_fontSize","_maxFontSize","_color","AcroFormTextField","_DV","AcroFormButton","_page","_hasAppearanceStream","Ff","_Q","AcroFormChoiceField","FT","_TI","_Opt","regex","matches","getMatches","getOptions","setOptions","sort","addOption","removeOption","allEntries","combo","AcroFormListBox","AcroFormComboBox","AcroFormEditBox","edit","_AS","_MK","CA","AcroFormPushButton","pushButton","AcroFormRadioButton","radio","_parent","_optionName","caption","appearanceState","_AppearanceType","RadioButton","Circle","createAppearanceStream","optionName","setAppearance","getCA","createOption","Parent","addField","AcroFormCheckBox","CheckBox","_MaxLen","isInteger","AcroFormPasswordField","password","N","On","YesNormal","D","YesPushDown","Off","OffPushDown","encodedColor","DotRadius","Bezier_C","DotRadiusBezier","kc","dc","Cross","cross","calculateCross","AcroForm","ChoiceField","ListBox","ComboBox","EditBox","Button","PushButton","TextField","PasswordField","Appearance","toLookup","arr","lookup","__addimage__","UNKNOWN","imageFileTypeHeaders","PNG","TIFF","JPEG","JPEG2000","GIF87a","GIF89a","WEBP","BMP","getImageFileTypeByImageData","imageData","fallbackFormat","headerSchemata","compareResult","fileType","Uint8ClampedArray","isArrayBufferView","putImage","image","colorSpace","color_spaces","INDEXED","palette","sMask","DEVICE_CMYK","bitsPerComponent","decodeParameters","transparency","predictor","arrayBufferToBinaryString","putResourcesCallback","images","putXObjectsDictCallback","initialize","getImages","getImageIndex","isImageTypeSupported","isDOMElement","nodeType","getImageDataFromElement","element","nodeName","hasAttribute","src","getAttribute","tmpImageData","loadFile","mimeType","toDataURL","checkImagesForAlias","alias","determineWidthAndHeight","writeImageToPDF","rotation","dims","coord","vcoord","f4","rotationTransformationMatrix","DEVICE_RGB","DEVICE_GRAY","CAL_GREY","CAL_RGB","LAB","ICC_BASED","PATTERN","SEPARATION","DEVICE_N","decode","DCT_DECODE","FLATE_DECODE","LZW_DECODE","JPX_DECODE","JBIG2_DECODE","ASCII85_DECODE","ASCII_HEX_DECODE","RUN_LENGTH_DECODE","CCITT_FAX_DECODE","image_compression","NONE","FAST","MEDIUM","SLOW","sHashCode","hash","byteLength","validateStringAsBase64","possibleBase64String","extractImageFromDataUrl","dataUrl","dataUrlParts","extractedInfo","charset","supportsArrayBuffer","isArrayBuffer","Uint32Array","Int8Array","Int16Array","Uint16Array","Int32Array","Float32Array","Float64Array","binaryStringToUint8Array","binary_string","buffer","buf","subarray","addImage","compression","processImageData","dataAsBinaryString","convertBase64ToBinaryString","generateAliasFromImageData","checkCompressValue","stringData","throwError","base64Info","rawData","getImageProperties","notEmpty","addPageData","putPageData","anno","pageInfo","pageAnnos","found","escape","objText","objPopup","encryptorText","bounds","contents","loc","_nameMap","top","finalBounds","magFactor","left","createAnnotation","link","textWithLink","linkHeight","linkWidth","totalLineWidth","getTextWidth","numOfLines","ceil","arabicSubstitionA","ligatures","arabic_diacritics","alfletter","__arabicParser__","isInArabicSubstitutionA","isArabicLetter","isArabicEndLetter","isArabicAlfLetter","arabicLetterHasIsolatedForm","arabicLetterHasFinalForm","arabicLetterHasInitialForm","arabicLetterHasMedialForm","resolveLigatures","letters","tmpLigatures","effectedLetters","isArabicDiacritic","getCorrectForm","currentChar","beforeChar","nextChar","parseArabic","currentLetter","prevLetter","nextLetter","words","newWords","processArabic","tmpText","autoPrint","refAutoPrintTag","addJS","Canvas","jsPdfInstance","_width","getContext","pageWrapXEnabled","pageWrapX","_height","pageWrapYEnabled","pageWrapY","_childNodes","_style","contextType","contextAttributes","pdf","context2d","_canvas","canvas","NO_MARGINS","bottom","right","printingHeaderRow","_initialize","__cell__","headerFunction","margins","_reset","lastCell","Cell","_text","_lineNumber","_align","lineNumber","toArray","setHeaderFunction","func","getTextDimensions","amountOfLines","tempWidth","max","cellAddPage","cell","currentCell","tableHeaderRow","printHeaders","printHeaderRow","table","headers","config","column","headerName","headerNames","headerLabels","headerAligns","columnMatrix","columnWidths","columnMinWidths","tableHeaderConfigs","autoSize","css","headerBackgroundColor","headerTextColor","table_font_size","header","prompt","rec","row","rowHeight","calculateLineHeight","setTableHeaderRow","pv","cv","rowStart","Function","cellData","cellStart","col","table_x","table_y","model","new_page","tableHeaderCell","tempHeaderConf","currentTextColor","fontStyleOrder","italic","oblique","normal","fontStretchOrder","fontStretchLookup","fontWeights","fontWeightsLookup","normalizeFontFace","fontFace","family","normalizeFontStyle","weight","normalizeFontWeight","stretch","normalizeFontStretch","ref","searchFromPivot","matchingSet","order","pivot","dir","defaultGenericFontFamilies","fixed","monospace","terminal","cursive","fantasy","serif","systemFonts","icon","menu","ruleToString","resolveFontFace","fontFaceMap","rules","defaultFontFamily","genericFontFamilies","resolveFontStretch","ordering","resolveFontStyle","resolveFontWeight","eatWhiteSpace","input","trimLeft","parseQuotedFontFamily","quote","parseNonQuotedFontFamily","jsNamesObj","jsJsObj","defaultFont","_ctx","ContextLayer","ctx","isStrokeTransparent","strokeOpacity","strokeStyle","fillStyle","isFillTransparent","fillOpacity","textBaseline","lineJoin","lineCap","globalCompositeOperation","globalAlpha","clip_path","currentPoint","miterLimit","lastPoint","lineDashOffset","lineDash","margin","prevPageLastElemOffset","ignoreClearRect","Context2D","parentNode","_pdf","_pageWrapXEnabled","_pageWrapYEnabled","_posX","_posY","_autoPaging","lastBreak","pageBreaks","_ctxStack","rgba","getRGBA","_fontFaceMap","getFontFaceMap","fontFaces","convertedFontFaces","fontMap","convertToFontFaces","normalized","buildFontFaceMap","_fontFaces","fontFamily","fontSizeUnit","parsed","remaining","parseFontFamily","jsPdfFontName","fallbackFonts","arial","Arial","verdana","Verdana","helvetica","Helvetica","getLineDash","pathPreProcess","beginPath","closePath","pathBegin","quadraticCurveTo","cpx","cpy","pt0","bezierCurveTo","cp1x","cp1y","cp2x","cp2y","arc","radius","startAngle","endAngle","counterclockwise","isIdentity","xpt","x_radPt","x_radPt0","pow","arcTo","fillRect","strokeRect","clearRect","doStackPush","tmpPageNumber","ctxStack","doStackPop","isCanvasGradient","getColor","fillText","degs","rad2deg","putText","strokeText","measureText","txtWidth","TextMetrics","scalewidth","scaleheight","setTransform","hasMargins","drawImage","img","swidth","sheight","imageProperties","factorX","factorY","clipFactorX","clipFactorY","clipPath","decomposedTransformationMatrix","xRect","pageArray","getPagesByPath","sortPages","autoPaging","pageWidthMinusMargins","topMargin","firstPageHeight","pageHeightMinusMargins","previousPageHeightSum","tmpPaths","pathPositionRedo","drawPaths","tmpRect","needsClipping","yOffset","rectOfQuadraticCurve","getQuadraticCurveBoundary","rectOfBezierCurve","getBezierCurveBoundary","paths","isClip","tmpPath","oldLineWidth","origPath","xPath","delta","moves","begin","start","deltas","iii","began","arcs","drawArc","drawLine","drawLines","doClip","getBaseline","getTextBottom","yBaseLine","createLinearGradient","canvasGradient","colorStops","addColorStop","createPattern","createRadialGradient","includeMove","curves","createArc","curve","doMove","drawCurve","textDimensions","yTop","oldSize","baselineRect","textBounds","pageHeightMinusBottomMargin","pageWidthMinusRightMargin","textBoundsOnPage","doSlice","croppedText","baseLineRectOnPage","prevX","prevY","anticlockwise","twoPi","halfPi","totalAngle","sgn","createSmallArc","q1","q2","k2","ar","cos_ar","sin_ar","ey","midX1","midY1","midX2","midY2","resultX1","resultX2","resultY1","resultY2","ax","ay","bx","by","cx","cy","dx","dy","px","py","qx","qy","minx","miny","maxx","maxy","tobx","toby","tocx","tocy","todx","tody","prevLineDash","nextLineDash","ASCII85Encode","ASCII85Decode","z","ASCIIHexDecode","regexCheckIfHex","RegExp","FlateEncode","zlibSync","origData","filterChain","sync","request","sanitizeUnicode","dataLength","charArray","StringFromCharCode","overrideMimeType","responseText","browserRequest","loadImageFile","loadHtml2Canvas","import","catch","then","html2canvas","default","loadDomPurify","dompurify","objType","tagName","opt","el","className","innerHTML","sanitize","Worker","root","convert","template","setProgress","promise","__proto__","prop","container","overlay","progress","val","enableLinks","backgroundColor","from","getType","to","toContainer","toCanvas","toImg","toPdf","thenList","setPageSize","containerCSS","display","windowWidth","clientWidth","scrollWidth","offsetWidth","source","cloneNode","javascriptEnabled","createTextNode","nodeValue","firstChild","nextSibling","appendChild","addEventListener","scrollTop","scrollLeft","scrollHeight","offsetHeight","clientHeight","overflow","zIndex","clear","border","float","prereqs","contains","onrendered","removeChild","toContext2d","async","allowTaint","scrollX","scrollY","imageTimeout","logging","proxy","removeContainer","foreignObjectRendering","useCORS","windowHeight","imgData","quality","outputImg","outputPdf","doCallback","fns","setMargin","cbk","toPx","getPageSize","inner","ratio","updateProgress","onFulfilled","onRejected","thenCore","thenBase","selfPromise","returnVal","thenExternal","catchExternal","msg","using","export","run","format_as_string","pageHeight","err","html","worker","javascript","namesOid","outline","children","render","createNamedDestinations","totalPages","dests","info","names2Oid","makeRef","add","item","genIds_r","renderRoot","renderItems","objStart","count_r","objEnd","makeString","markers","processJPEG","blockLength","numcomponents","getJpegInfo","getCharWidthsArray","splitLongWord","splitParagraphIntoLines","makeImage","scratchCanvas","scratchCtx","chunkSize","palLen","delayDen","delayNum","frame","section","palShort","_i","_j","_ref","pos","animation","readUInt32","_results","colorType","compressionMethod","filterMethod","interlaceMethod","numFrames","numPlays","Infinity","frames","read","xOffset","readUInt16","delay","disposeOp","blendOp","indexed","grayscale","rgb","hasAlphaChannel","pixelBitlength","decodePixels","pixelBytes","fullPixels","_this","pass","x0","y0","abyte","pa","paeth","pb","pc","pixels","scanlineLength","upper","upperLeft","_k","_l","_m","isFull","fullPos","partPos","unzlibSync","decodePalette","ret","_ref1","copyToImageData","alpha","_decodedPalette","hasBrowserCanvas","putImageData","Image","decodeFrames","_len","createImageData","renderFrame","prev","animate","doFrame","frameNumber","_timeout","stopAnimation","clearTimeout","_png","GifReader","pf0","global_palette_flag","num_global_colors","global_palette_offset","global_palette_size","no_eof","transparent_index","disposal","loop_count","block_size","pf1","pf2","interlace_flag","num_local_colors","palette_offset","palette_size","has_local_palette","data_offset","data_length","interlaced","loopCount","frameInfo","frame_num","decodeAndBlitFrameBGRA","num_pixels","index_stream","GifReaderLZWOutputIndexStream","trans","framewidth","framestride","xleft","opbeg","opend","scanstride","interlaceskip","il","decodeAndBlitFrameRGBA","code_stream","output_length","min_code_size","clear_code","eoi_code","next_code","cur_code_size","code_mask","cur_shift","cur","subblock_size","code_table","prev_code","code","chase_code","chase_length","chase","JPEGEncoder","YDC_HT","UVDC_HT","YAC_HT","UVAC_HT","currentQuality","ffloor","YTable","UVTable","fdtbl_Y","fdtbl_UV","bitcode","category","outputfDCTQuant","DU","byteout","bytenew","bytepos","YDU","UDU","VDU","clt","RGB_YUV_TABLE","ZigZag","std_dc_luminance_nrcodes","std_dc_luminance_values","std_ac_luminance_nrcodes","std_ac_luminance_values","std_dc_chrominance_nrcodes","std_dc_chrominance_values","std_ac_chrominance_nrcodes","std_ac_chrominance_values","computeHuffmanTbl","nrcodes","std_table","codevalue","pos_in_table","HT","writeBits","bs","posval","writeByte","writeWord","processDU","CDU","fdtbl","DC","HTDC","HTAC","EOB","M16zeroes","DU_DCT","d0","d1","d2","d3","d4","d5","d6","d7","fDCTQuant","dataOff","tmp0","tmp7","tmp1","tmp6","tmp2","tmp5","tmp3","tmp4","tmp10","tmp13","tmp11","tmp12","z1","z5","z2","z4","z3","z11","z13","tmp0p2","tmp7p2","tmp1p2","tmp6p2","tmp2p2","tmp5p2","tmp3p2","tmp4p2","tmp10p2","tmp13p2","tmp11p2","tmp12p2","z1p2","z5p2","z2p2","z4p2","z3p2","z11p2","z13p2","Diff","end0pos","lng","startpos","nrzeroes","nrmarker","setQuality","sf","YQT","UVQT","u","aasf","initQuantTables","encode","writeDQT","writeSOF0","o","writeDHT","DCY","DCU","DCV","displayName","quadWidth","fillbits","sfcc","initCharLookupTable","nrlower","nrupper","cat","nr","nrneg","initCategoryNumber","initRGBYUVTable","BmpDecoder","is_with_alpha","datav","DataView","bottom_up","flag","parseHeader","parseBGR","WebPDecoder","fa","L","J","H","I","Z","M","wa","Ed","ma","_WebPDecoder","Fd","Ub","G","jc","Qb","qb","nd","pd","xb","Ca","Ka","oa","Jd","Yc","Zc","Qa","na","K","ca","cb","Sb","Ra","bb","Vb","ob","db","Gd","Hd","Wb","Sa","Xb","Id","ra","Ta","Yb","Ha","Zb","X","Mb","Xa","$b","ac","bc","xa","yb","ud","hd","jd","aa","eb","Ia","cc","Kd","Ld","ec","Ea","Md","Nd","Od","Pd","Qd","fb","gb","hb","zb","Ab","Ja","Bb","Rd","A","Sd","ea","Tc","Cd","lb","Db","W","Cb","S","RGBA","kb","sd","Td","Ud","fd","ib","bd","cd","Da","Vd","T","Wd","ba","ka","Mc","Nc","fc","Rc","Xd","ya","Kb","za","gc","Ua","Va","memory","Ib","Jb","hc","Oa","ic","Aa","Yd","Ba","Wa","Zd","$d","ae","ta","Eb","be","ga","ce","Dc","lc","mc","nc","de","ua","ub","ha","xc","vc","md","Ya","oc","C","ee","E","B","Q","fe","qc","Fb","rc","ge","va","Ma","sc","Gb","tc","uc","Hb","wc","yc","zc","qd","rd","ia","tb","he","$","Pb","wd","xd","vb","ie","Ac","Bc","je","Cc","VP8LMapColor32b","ke","VP8LMapColor8b","le","rb","Oc","R","me","qa","Y","la","ja","Fa","ne","sb","La","Za","$a","jb","mb","oe","pe","nb","qe","Pa","Ga","Na","Ec","se","Fc","ue","yd","td","Rb","ve","we","Lb","Gc","wb","xe","Wc","Xc","ye","Pc","Tb","zd","vd","od","ld","dd","Hc","ze","Sc","Qc","ad","Ob","Ad","Dd","Ae","Nb","Ic","Be","Kc","ed","$c","Jc","Bd","gd","Uc","Vc","put","Ce","De","Ee","Fe","Ge","He","Ie","Lc","Me","Ne","Oe","Pe","Qe","Re","Se","Te","Ue","Ve","We","Xe","Ye","Ze","$e","af","bf","cf","df","ef","gf","hf","jf","kf","lf","mf","nf","of","pf","qf","rf","tf","uf","vf","wf","xf","yf","zf","Af","Bf","Ke","Le","Je","kd","Cf","Df","Ef","Gf","Hf","If","Jf","Kf","Lf","Mf","Nf","Of","Pf","Predictor0","Predictor1","Predictor2","Predictor3","Predictor4","Predictor5","Predictor6","Predictor7","Predictor8","Predictor9","Predictor10","Predictor11","Predictor12","Predictor13","PredictorAdd0","PredictorAdd1","PredictorAdd2","ColorIndexInverseTransform","MapARGB","VP8LColorIndexInverseTransformAlpha","MapAlpha","VP8LPredictorsAdd","VP8LPredictors","VP8LPredictorsAdd_C","VP8LPredictors_C","UpsampleRgbLinePair","UpsampleBgrLinePair","UpsampleRgbaLinePair","UpsampleBgraLinePair","UpsampleArgbLinePair","UpsampleRgba4444LinePair","UpsampleRgb565LinePair","Qf","WebPDecodeRGBA","te","GetTag","data_off","GetLE24","GetLE32","webpdecoder","imagearray","src_off","alpha_chunk","alpha_size","alpha_offset","memcmp","fourcc","payload_size","payload_size_padded","src_off_","temp","WebPRiffParser","hasCompressionJS","compressBytes","lineLength","colorsPerPixel","level","filter_method","filterUp","filterSub","filterAverage","filterPaeth","applyPngFilterMethod","dat","prevLine","filter_methods","getFilterMethods","results","ind","getIndexOfSmallestSum","filterNone","up","upLeft","paethPredictor","pLeft","pUp","pUpLeft","arrays","sum","processPNG","trns","pal","smask","alphaData","hasColors","pixel","pbl","pDiff","total","getPredictorFromCompression","processGIF89A","rawImageData","processGIF87A","fileSize","getUint32","reserved","headerSize","getInt32","planes","getUint16","bitPP","rawSize","hr","vr","importantColors","getUint8","quad","bitn","bit1","xlen","mode","bit4","before","after","bit8","bit15","dif_w","_1_5","bit16","_1_6","bit24","bit32","getData","processBMP","processWEBP","processRGBA","imagePixels","rgbOut","alphaOut","outIndex","alphaIndex","rgbData","setLanguage","langCode","languageSettings","isSubscribed","sq","an","hy","as","ast","az","eu","bn","br","bg","my","zh","co","cr","cs","nl","en","eo","et","fo","fj","fi","fr","fy","fur","gl","gu","ht","hi","hu","is","iu","it","kn","ks","kk","km","ky","tlh","ko","lv","lt","mk","ms","ml","mt","mi","mr","mo","nv","ng","no","nn","or","om","pl","qu","rm","ro","ru","sz","sg","si","sr","sk","sl","so","es","sw","sv","tt","th","tig","ts","tn","tr","tk","uk","hsb","ur","vi","vo","xh","ji","zu","languageCode","char_code","widths","Unicode","widthsFractionOf","fof","kerning","kerningFractionOf","kerningValue","prior_char_code","default_char_width","widthOfString","widthOfGlyph","characterToGlyph","widths_array","firstLineMaxLen","maxLen","answer","workingLen","startOfLine","maxlen","lineIndent","postProcess","line_length","textIndent","separator_length","current_word_length","spaceCharWidth","pad","wrds","wrd","idx","ln","paragraphs","fsize","newOptions","fontUnit_maxLen","__fontmetrics__","encoded","mappingUncompress","mappingCompress","keystring","valuestring","numberprefix","vals","uncompress","stringparts","parent_key_pair","sign","activeobject","parentchain","keyparts","valueparts","datalen","WinAnsiEncoding","encodings","Courier","fontMetrics","Symbol","ZapfDingbats","metrics","file","existsFileInVFS","getFileFromVFS","TTFFont","glyIdsUsed","loadCanvg","canvg","addSvgAsImage","svg","ignoreMouse","ignoreAnimation","ignoreDimensions","doc","fromString","putTotalPages","pageExpression","replaceExpression","totalNumberOfPages","pdfEscape16","viewerPreferences","doReset","configuration","isValid","method","configurationTemplate","HideToolbar","defaultValue","explicitSet","valueSet","HideMenubar","HideWindowUI","FitWindow","CenterWindow","DisplayDocTitle","NonFullScreenPageMode","Direction","ViewArea","ViewClip","PrintArea","PrintClip","PrintScaling","Duplex","PickTrayByPDFSize","PrintPageRange","NumCopies","configurationKeys","rangeArray","arrayContainsElement","iterator","viewerpreferences","vPref","pdfDict","postPutResources","rdf_beginning","__metadata__","namespaceuri","utf8_xmpmeta_beginning","utf8_rdf_beginning","utf8_metadata","utf8_rdf_ending","utf8_xmpmeta_ending","total_len","metadata_object_number","addMetadata","padz","toUnicode","toUnicodeCmap","codes","range","unicode","unicodeMap","pdfOutput","subset","pdfOutput2","fontTable","cmap","fontDescriptor","PDFObject","bbox","stemV","italicAngle","ascender","decender","capHeight","DescendantFont","identityHFunction","hmtx","head","unitsPerEm","winAnsiEncodingFunction","utf8TextFunction","cmapConfirm","strText","codeMap","parms","_initializeVFS","vFS","addFileToVFS","filecontent","__bidiEngine__","_hasUbatB","_hasUbatS","_isInVisual","_isInRtl","_isOutVisual","_isOutRtl","_isSymmetricSwapping","_UNICODE_TYPES","_bidiUnicodeTypes","_STATE_TABLE_LTR","_STATE_TABLE_RTL","_TYPE_NAMES_MAP","EN","AN","_UNICODE_RANGES_MAP","_SWAP_TABLE","_LTR_RANGES_REG_EXPR","_lastArabic","_dir","_getCharType","rangeIdx","_isContextualDirRtl","charType","_resolveCharType","chars","types","resolvedTypes","wType","nType","cType","rtlCandidate","_invertString","sourceToTargetMap","levels","_computeLevels","hiLevel","params","action","newLevel","prevState","condPos","newState","stateTable","_handleUbatS","_invertByLevel","high","end","low","_reorder","_symmetricSwap","DIR_RTL","doBidiReorder","_init","isSymmetricSwappingOrig","isInputVisual","isOutputVisual","isInputRtl","isOutputRtl","isSymmetricSwapping","bidiEngine","Data","readString","Subset","registerTTF","directory","Directory","HeadTable","NameTable","CmapTable","hhea","HheaTable","maxp","MaxpTable","HmtxTable","post","PostTable","os2","OS2Table","loca","LocaTable","glyf","GlyfTable","exists","lineGap","xMin","yMin","xMax","yMax","raw","italic_angle","xHeight","familyClass","isSerif","isScript","isFixedPitch","character","glyph","forGlyph","advance","includeGap","gap","Table","readByte","writeUInt32","readInt32","int","writeInt32","writeUInt16","readInt16","writeInt16","writeString","readShort","writeShort","readLongLong","writeLongLong","readInt","writeInt","checksum","scalarType","tableCount","searchRange","entrySelector","rangeShift","tables","tag","adjustment","directoryLength","headOffset","log2","tableData","__slice","__hasProp","__extends","ctor","__super__","_super","revision","checkSumAdjustment","magicNumber","created","modified","macStyle","lowestRecPPEM","fontDirectionHint","indexToLocFormat","glyphDataFormat","CmapEntry","endCode","glyphId","glyphIds","idDelta","idRangeOffset","saveOffset","segCount","segCountX2","startCode","platformID","encodingID","language","charmap","charMap","diff","endCodes","glyphIDs","indexes","last","nextID","old","rangeOffsets","startCodes","startGlyph","subtable","_len1","_len2","_len3","_len4","_len5","_len6","_len7","_n","_name","_o","_p","_q","new","maxGlyphID","LN2","advanceWidthMax","minLeftSideBearing","minRightSideBearing","xMaxExtent","caretSlopeRise","caretSlopeRun","caretOffset","metricDataFormat","numberOfMetrics","averageCharWidth","weightClass","widthClass","ySubscriptXSize","ySubscriptYSize","ySubscriptXOffset","ySubscriptYOffset","ySuperscriptXSize","ySuperscriptYSize","ySuperscriptXOffset","ySuperscriptYOffset","yStrikeoutSize","yStrikeoutPosition","panose","charRange","vendorID","selection","firstCharIndex","lastCharIndex","ascent","winAscent","winDescent","codePageRange","defaultChar","breakChar","maxContext","numberOfGlyphs","underlinePosition","underlineThickness","minMemType42","maxMemType42","minMemType1","maxMemType1","glyphNameIndex","names","_results1","numGlyphs","NameEntry","languageID","entries","stringOffset","strings","nameID","copyright","fontSubfamily","uniqueSubfamily","postscriptName","trademark","manufacturer","designer","description","vendorUrl","designerUrl","license","licenseUrl","preferredFamily","preferredSubfamily","compatibleFull","sampleText","maxPoints","maxContours","maxCompositePoints","maxComponentContours","maxZones","maxTwilightPoints","maxStorage","maxFunctionDefs","maxInstructionDefs","maxStackElements","maxSizeOfInstructions","maxComponentElements","maxComponentDepth","lsbCount","lsb","leftSideBearings","cache","glyphFor","numberOfContours","lengthOf","CompoundGlyph","SimpleGlyph","glyphs","mapping","old2new","compound","glyphOffsets","activeGlyphs","glyfPtr","listGlyf","newLocaTable","unicodes","next","generateCmap","roman","unicodeCmap","glyphsFor","additionalIDs","glyID","ids","new2old","newIDs","nextGlyphID","oldID","oldIDs","invert","isString","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+FAAO,IAAIA,EAAgB,iBAClB,oBAAuBC,OAC1BA,OACA,oBAAuBC,OACvBA,OACA,oBAAuBC,KACvBA,KACAC,KAPqB,GCE3B,SAASC,IACHL,EAAaM,SAA+C,mBAA7BN,EAAaM,QAAQC,KACtDP,EAAaM,QAAQC,IAAIC,MAAM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AYC,OA9EVR,EAAYD,EAAW,EAEvBG,GAAa,IADbD,EAAgBJ,EAAgB,IACG,EAGnCU,EAAY,YA4EZroC,IAAO0nC,GACTvgE,EAAQC,IAAI,8CAGPgxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECz1BT,SAASswC,GAAYhM,OAMfiM,EACAC,EACAC,EACAC,EAeAC,EAvBAC,EAAS3tD,KAAKuI,MACdqlD,EAAS,IAAInwD,MAAM,IACnBowD,EAAU,IAAIpwD,MAAM,IACpBqwD,EAAU,IAAIrwD,MAAM,IACpBswD,EAAW,IAAItwD,MAAM,IAMrBuwD,EAAU,IAAIvwD,MAAM,OACpBwwD,EAAW,IAAIxwD,MAAM,OACrBywD,EAAkB,IAAIzwD,MAAM,IAC5B0wD,EAAK,IAAI1wD,MAAM,IACf2wD,EAAU,GACVC,EAAU,EACVC,EAAU,EAEVC,EAAM,IAAI9wD,MAAM,IAChB+wD,EAAM,IAAI/wD,MAAM,IAChBgxD,EAAM,IAAIhxD,MAAM,IAChBixD,EAAM,IAAIjxD,MAAM,KAChBkxD,EAAgB,IAAIlxD,MAAM,MAG1BmxD,EAAS,CACX,EACA,EACA,EACA,EACA,GACA,GACA,GACA,GACA,EACA,EACA,EACA,GACA,GACA,GACA,GACA,GACA,EACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IAGEC,EAA2B,CAC7B,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,GAEEC,EAA0B,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,GAAI,IAC7DC,EAA2B,CAC7B,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,KAEEC,EAA0B,CAC5B,EACA,EACA,EACA,EACA,EACA,GACA,EACA,GACA,GACA,GACA,GACA,EACA,GACA,GACA,GACA,EACA,GACA,IACA,GACA,GACA,IACA,IACA,IACA,EACA,GACA,GACA,IACA,IACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,IACA,IACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KAGEC,EAA6B,CAC/B,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,GAEEC,EAA4B,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,GAAI,IAC/DC,EAA6B,CAC/B,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,KAEEC,EAA4B,CAC9B,EACA,EACA,EACA,EACA,GACA,EACA,EACA,GACA,GACA,EACA,GACA,GACA,GACA,EACA,GACA,IACA,GACA,GACA,GACA,IACA,EACA,GACA,GACA,IACA,IACA,IACA,IACA,EACA,GACA,GACA,GACA,IACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,GACA,IACA,GACA,IACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,cAuKOC,EAAkBC,EAASC,WAC9BC,EAAY,EACZC,EAAe,EACfC,EAAK,IAAIjyD,MACJtC,EAAI,EAAGA,GAAK,GAAIA,IAAK,KACvB,IAAIwB,EAAI,EAAGA,GAAK2yD,EAAQn0D,GAAIwB,IAC/B+yD,EAAGH,EAAUE,IAAiB,GAC9BC,EAAGH,EAAUE,IAAe,GAAKD,EACjCE,EAAGH,EAAUE,IAAe,GAAKt0D,EACjCs0D,IACAD,IAEFA,GAAa,SAERE,WA2DAC,EAAUC,WACbpsD,EAAQosD,EAAG,GACXC,EAASD,EAAG,GAAK,EACdC,GAAU,GACXrsD,EAAS,GAAKqsD,IAChBxB,GAAW,GAAKC,GAElBuB,MACAvB,EACc,IACG,KAAXD,GACFyB,EAAU,KACVA,EAAU,IAEVA,EAAUzB,GAEZC,EAAU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A,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IAGO35D,EAAI,EAAGA,EAAI,GAAIA,IAAK,KACvBwB,EAAI6xD,GAAQsG,EAAI35D,GAAK05D,EAAK,IAAM,KACpCl4D,EAAIkE,KAAKsb,IAAItb,KAAK+mC,IAAIjrC,EAAG,GAAI,KAC7B8xD,EAAOgB,EAAOt0D,IAAMwB,UAElBo4D,EAAO,CACT,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IAEOv3D,EAAI,EAAGA,EAAI,GAAIA,IAAK,KACvBw3D,EAAIxG,GAAQuG,EAAKv3D,GAAKq3D,EAAK,IAAM,KACrCG,EAAIn0D,KAAKsb,IAAItb,KAAK+mC,IAAIotB,EAAG,GAAI,KAC7BtG,EAAQe,EAAOjyD,IAAMw3D,UAEnBC,EAAO,CACT,EACA,YACA,YACA,YACA,EACA,WACA,SACA,YAEEj5D,EAAI,EACCutC,EAAM,EAAGA,EAAM,EAAGA,QACpB,IAAIU,EAAM,EAAGA,EAAM,EAAGA,IACzB0kB,EAAQ3yD,GAAK,GAAOyyD,EAAOgB,EAAOzzD,IAAMi5D,EAAK1rB,GAAO0rB,EAAKhrB,GAAO,GAChE2kB,EAAS5yD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A,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,GAEJM,EAAE,aAAc,iBAChBxtE,EAAKs+E,WAAa,kBACT,YAETt+E,EAAKu+E,WAAa,SAAS57E,UAClBA,GAET3C,EAAKw+E,WAAa,SAAS77E,EAAGsM,EAAGQ,UACxBR,EAAEQ,EAAI,IAEfzP,EAAKy+E,WAAa,SAAS97E,EAAGsM,EAAGQ,UACxBR,EAAEQ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ACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,EACA,IACA,IACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,GACA,GACA,IACA,EACA,IACA,IACA,GACA,GACA,GACA,GACA,IACA,IACA,GACA,GACA,IACA,IACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,IACA,GACA,GACA,EACA,IACA,IACA,GACA,GACA,GACA,GACA,GACA,IACA,GACA,IACA,IACA,GACA,GACA,GACA,IACA,IACA,GACA,IACA,GACA,IACA,IACA,GACA,KAEFmD,GAAK,CACH,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MAEFZ,GAAK,EACLyC,GAAK,CACH,EACA,EACA,EACA,EACA,EACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KAEFzK,GAAK,CACH,EACA,EACA,EACA,EACA,EACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KAEF3B,GAAK,KACL4O,GAAK,CACH,CAAC,IAAK,IAAK,IAAK,GAChB,CAAC,IAAK,IAAK,IAAK,IAAK,GACrB,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,GAC1B,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAE1DC,GAAK,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,GAAI,GAAI,GAAI,EAAG,GAAI,GAAI,IACxD1J,GAAK,EAAE,EAAG,GAAI,EAAG,GAAI,EAAG,EAAG,EAAG,GAAI,EAAG,GAAI,GAAI,GAAI,EAAG,GAAI,EAAG,GAAI,GAAI,GACnEuJ,GAAK,CACH,CACE,CACE,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,KACnD,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,KACnD,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,MAErD,CACE,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAA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AAI,UACJ4U,GAAI,kBACK,8BACA,wBACA,8BACA,mBACTrqC,GAAI,UACJsqC,GAAI,WACJC,GAAI,OACJ/C,GAAI,WACJgD,GAAI,QACJh0D,GAAI,SACJi0D,GAAI,2BACK,kBACTC,GAAI,kBACK,8BACA,2BACA,2BACA,4BACA,4BACA,gCACA,gCACA,iCACA,sCACA,mCACA,kCACA,qBACTC,GAAI,YACJC,GAAI,WACJC,GAAI,WACJC,GAAI,SACJC,GAAI,UACJC,GAAI,4BACK,2BACA,0BACA,0BACA,8BACA,0BACA,uBACTC,GAAI,UACJC,IAAK,WACLrO,GAAI,yBACK,iBACTsO,GAAI,WACJvX,GAAI,WACJkC,GAAI,4BACK,2BACA,2BACA,iCACA,8BACA,uBACT7hB,GAAI,QACJm3B,GAAI,WACJC,GAAI,UACJtT,GAAI,SACJuT,GAAI,QACJC,GAAI,YACJC,GAAI,YACJrzE,GAAI,aACJszE,GAAI,YACJjW,GAAI,QACJkW,GAAI,6BACK,wBACTrS,GAAI,WACJsS,GAAI,UACJC,GAAI,WACJC,GAAI,SACJC,GAAI,QACJC,GAAI,UACJC,IAAK,UACLC,GAAI,iBACK,+BACA,uBACT7S,GAAI,QACJ8S,GAAI,UACJC,GAAI,aACJ1Z,GAAI,gBACJ2Z,GAAI,kBACJC,GAAI,QACJC,GAAI,YACJC,GAAI,UACJC,GAAI,QACJC,GAAI,UACJC,GAAI,YACJC,GAAI,SACJC,GAAI,SACJrT,GAAI,SACJsT,GAAI,YACJ7S,GAAI,qBACJ8S,GAAI,sBACJxW,GAAI,UACJyW,GAAI,QACJC,GAAI,QACJ5f,GAAI,kBACK,eACT6f,GAAI,SACJhlE,GAAI,qBACK,sBACT02C,GAAI,kBACK,0BACA,qBACTuuB,GAAI,UACJC,GAAI,iBACJC,GAAI,mBACK,sBACTC,GAAI,kBACK,qBACTC,GAAI,iBACJC,GAAI,QACJ/1D,GAAI,WACJ2/C,GAAI,YACJnE,GAAI,SACJwa,GAAI,aACJC,GAAI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mBC,GACzCf,EA1ZM,EA2ZNZ,GAAuB,EACvBloE,EAAO4qE,EAAS5qE,EAAM4pE,EAAmBC,GACzC3B,EAAuB+C,IAGvBnC,EAhaM,EAiaN9oE,EAAO4qE,EAAS5qE,EAAM4pE,EAAmBC,GACzC7pE,EAAO2pE,EAAc3pE,EAAM4pE,GAC3Bd,EAlaM,EAmaNZ,GAAuB,EACvBloE,EAAO4qE,EAAS5qE,EAAM4pE,EAAmBC,GACzC3B,EAAuB+C,EACvBjrE,EAAO2pE,EAAc3pE,EAAM4pE,UAxC7Bd,EA/XQ,EAgYR9oE,EAAO4qE,EAAS5qE,EAAM4pE,EAAmBC,QAdzCf,EAAOf,EAjXC,EADA,EAmXR/nE,EAAO4qE,EAAS5qE,EAAM4pE,EAAmBC,UAuDpC7pE,QAcJ2nE,eAAe7sD,WAAa,SAAShzB,GACpCA,IACFggF,EAAchgF,EAAQojF,cACtBlD,EAAelgF,EAAQqjF,eACvBpD,EAAWjgF,EAAQsjF,WACnBnD,EAAYngF,EAAQujF,YACpBnD,EAAuBpgF,EAAQwjF,2BAI9B3D,eAAe7sD,WAAWhzB,GACxBrW,KAAKk2F,oBAGVS,EA5jFmB,CACrB,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,KACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,MACA,IACA,MACA,MACA,IACA,MACA,MACA,IACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,MACA,MACA,IACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,KACA,IACA,IACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,KACA,IACA,IACA,IACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,IACA,IACA,IACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KA8jBEmD,EAAa,IAAI1jF,EAAM8/E,eAAe,CAAEuD,eAAe,IAoC3DrjF,EAAMkB,IAAI4L,OAAOnO,KAAK,CAAC,kBAlCE,SAASL,OAC5B6Z,EAAO7Z,EAAK6Z,KAGZlY,GAFI3B,EAAKpF,EACLoF,EAAK0H,EACC1H,EAAK2B,SAAW,IAG1BoiC,GAFQ/jC,EAAKghB,MACNrf,EAAQ6f,KACL,OAEd7f,EAAQojF,cAC2B,kBAA1BpjF,EAAQojF,eAA8BpjF,EAAQojF,cACvDK,EAAWzwD,WAAWhzB,GAEuB,mBAAzC9B,OAAOjS,UAAU8M,SAAS5O,KAAK+tB,GAA4B,KACzD7f,EAAI,MACR+pC,EAAU,GACL/pC,EAAI,EAAGA,EAAI6f,EAAK5f,OAAQD,GAA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