{"version":3,"file":"jspdf.es.js","sources":["../src/libs/globalObject.js","../src/libs/console.js","../src/libs/FileSaver.js","../src/libs/rgbcolor.js","../src/libs/AtobBtoa.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/modules/addimage.js","../src/modules/annotations.js","../src/modules/arabic.js","../src/modules/autoprint.js","../src/modules/canvas.js","../src/modules/cell.js","../src/libs/fontFace.js","../src/modules/context2d.js","../src/modules/filters.js","../src/modules/fileloading.js","../src/modules/html.js","../src/modules/javascript.js","../src/modules/outline.js","../src/modules/jpeg_support.js","../src/libs/png.js","../src/modules/png_support.js","../src/libs/omggif.js","../src/libs/JPEGEncoder.js","../src/modules/gif_support.js","../src/libs/BMPDecoder.js","../src/modules/bmp_support.js","../src/libs/WebPDecoder.js","../src/modules/webp_support.js","../src/modules/rgba_support.js","../src/modules/setlanguage.js","../src/modules/split_text_to_size.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","/**\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","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 * @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","/** @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","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","/* 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 * ====================================================================\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","/**\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","/**\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 * (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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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 * @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","/**\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","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","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,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,\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 * 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 * 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","/** @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'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3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{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","consoleLog","console","log","apply","arguments","consoleWarn","str","warn","call","consoleError","error","bom","blob","opts","autoBom","test","type","Blob","String","fromCharCode","download","url","name","xhr","XMLHttpRequest","open","responseType","onload","saveAs","response","onerror","send","corsEnabled","e","status","click","node","dispatchEvent","MouseEvent","evt","document","createEvent","initMouseEvent","_global","HTMLAnchorElement","prototype","URL","webkitURL","a","createElement","rel","href","origin","location","target","createObjectURL","setTimeout","revokeObjectURL","navigator","msSaveOrOpenBlob","popup","title","body","innerText","force","isSafari","HTMLElement","safari","isChromeIOS","userAgent","FileReader","reader","onloadend","result","replace","readAsDataURL","RGBColor","color_string","ok","charAt","substr","toLowerCase","channels","simple_colors","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","color_defs","re","example","process","bits","parseInt","i","length","processor","exec","r","g","b","isNaN","toRGB","toHex","toString","atob","btoa","bind","md5cycle","x","k","c","d","ff","gg","hh","ii","add32","cmn","q","s","t","md51","n","state","md5blk","substring","tail","charCodeAt","md5blks","hex_chr","split","rhex","j","hex","join","singleToByteString","toByteString","map","md5Bin","md5","md5Check","lsw","msw","repeat","num","Array","rc4","key","data","lastKey","lastState","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","toHexString","byteString","byte","slice","bytes","push","encryptor","objectId","generation","toPDFName","strLength","charCode","hexStr","paddingHexStr","PubSub","context","topics","subscribe","topic","callback","once","hasOwnProperty","token","Math","random","unsubscribe","Object","keys","publish","args","tokens","sub","ex","message","getTopics","GState","parameters","supported","p","indexOf","id","objectNumber","equals","other","ignore","count","Pattern","gState","matrix","ShadingPattern","coords","colors","TilingPattern","boundingBox","xStep","yStep","stream","cloneIndex","jsPDF","options","orientation","unit","format","compressPdf","filters","userUnit","precision","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","advancedApiModeTrap","methodName","roundToPrecision","number","parmPrecision","tmpPrecision","toFixed","hpf","f2","f3","scale","transformY","y","transformScaleY","setPrecision","getFileId","setFileId","toUpperCase","floor","creationDate","convertDateToPDFDate","parmDate","tzoffset","getTimezoneOffset","tzsign","tzhour","tzmin","timeZoneString","padd2","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","convertPDFDateToDate","parmPDFDate","year","month","date","hour","minutes","seconds","resultingDate","Date","setCreationDate","tmpCreationDateString","regexPDFCreationDate","getCreationDate","padd2Hex","hexString","offsets","content","contentLength","additionalObjects","pages","currentPage","hasCustomDestination","outputDestination","resetDocument","rootDictionaryObjId","newObjectDeferred","resourceDictionaryObjId","setCustomOutputDestination","destination","setOutputDestination","resetCustomOutputDestination","string","write","getArrayBuffer","len","ab","ArrayBuffer","u8","Uint8Array","standardFonts","getStandardFonts","activeFontSize","fontSize","size","R2L","setR2L","getR2L","zoomMode","setZoomMode","zoom","validZoomModes","undefined","getZoomMode","pageMode","setPageMode","pmode","validPageModes","getPageMode","layoutMode","setLayoutMode","layout","validLayoutModes","getLayoutMode","setDisplayMode","documentProperties","subject","author","keywords","creator","getDocumentProperty","getDocumentProperties","setDocumentProperties","setProperties","properties","property","setDocumentProperty","fonts","fontmap","activeFontKey","fontStateStack","patterns","patternMap","gStates","gStatesMap","activeGState","page","pagesContext","events","hotfixes","renderTargets","renderTargetMap","renderTargetStack","pageX","pageY","pageMatrix","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","eInv","fInv","applyToPoint","pt","Point","applyToRectangle","rect","pt1","pt2","w","h","Rectangle","clone","matrixMult","m1","m2","identityMatrix","unitMatrix","addPattern","pattern","prefix","patternKey","addShadingPattern","beginTilingPattern","beginNewRenderTarget","endTilingPattern","pop","restore","newObject","oid","newObjectDeferredBegin","doOutput","newAdditionalObject","objId","obj","decodeColorString","color","colorEncoded","floatVal","parseFloat","colorAsRGB","encodeColorString","ch1","ch2","ch3","ch4","letterArray","pdfColorType","rgbColor","getFilters","putStream","alreadyAppliedFilters","addLength1","valueOfLength1","processedData","keyValues","additionalKeyValues","processDataByFilters","reverseChain","filterAsString","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","putFontDict","putShadingPatternDict","putTilingPatternDict","putGStatesDict","putResourceDictionary","objectIds","putResources","Number","MAX_SAFE_INTEGER","putAdditionalObjects","addFontToFontDictionary","fontName","addFont","isStandardFont","metadata","instance","addFonts","arrayOfFonts","l","parts","dictionary","SAFE","__safeCall","fn","foo","__safeCallWrapper","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","pdfJsUrl","htmlForPDFjsNewWindow","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","tmp","transformationMatrix","xtra","isHex","lineHeight","lineHeightFactor","ESC","TabLen","transformTextToSpecialArray","sa","concat","curDa","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","leading","pageWidth","pageSize","getWidth","activeFont","lineWidths","assign","wordSpacingPerLine","newY","getStringUnitWidth","doKerning","prevWidth","newX","getHorizontalCoordinate","getVerticalCoordinate","doReversing","posX","posY","reverse","activeFontEncoding","STRING","ARRAY","variant","wordSpacing","generatePosition","parmPosX","parmPosY","parmTransformationMatrix","position","lineIndex","textColor","clip","rule","clipEvenOdd","discardPath","isValidStyle","style","validStyleVariants","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","pageHeight","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","duplicate","fontState","setCurrentTransformationMatrix","comment","_x","enumerable","_y","_type","_w","_h","RenderTarget","getPageWidth","setPageWidth","setPageHeight","endFormObject","newXObject","xObjectId","beginFormObject","doFormObject","getFormObject","returnPromise","unload","Promise","resolve","reject","plugin","newEvents","eventname","handler_and_args","getCoordinateString","collections","setWidth","getHeight","setHeight","getPDFVersion","configurable","jsPDFAPI","pdfUnescape","f5","__acroform__","inherit","child","parent","create","constructor","createFormXObject","formObject","xobj","AcroFormXObject","AcroFormAppearance","BBox","setBit","bitPosition","bitMask","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","lineSpacing","borderPadding","isSmallerThanWidth","lastLine","TextWidth","calculateFontSpace","FieldWidth","FontSize","textHeight","startY","startX","lastY","firstWordInLine","lastWordInLine","lastLength","currWord","lineCount","Line","isWithNewLine","nextLineIsSmaller","isLastWord","currLine","textAlign","acroformPluginTemplate","fields","xForms","acroFormDictionaryRoot","printedOut","isInitialized","annotReferenceCallback","acroformPlugin","Fields","hasAnnotation","createAnnotationReference","putForm","object","findEntry","entry","annotations","find","putCatalogCallback","AcroFormDictionaryCallback","_eventID","createFieldCallback","fieldArray","standardFields","Kids","fieldObject","keyValueList","oldRect","Rect","DA","createDefaultAppearanceStream","getKeyValueListForStream","hasAppearanceStream","appearance","appearanceStreamString","createXFormObjectCallback","initializeAcroForm","AcroFormField","FieldNum","parse","AcroFormDictionary","arrayToPdfArray","array","getMatches","regex","matches","pdfArrayToStringArray","toPdfString","AcroFormPDFObject","_objId","_scope","writable","getOwnPropertyNames","filter","getOwnPropertyDescriptor","_BBox","_stream","_Kids","_DA","_F","Boolean","F","_Ff","_Rect","_FT","_T","AcroFormChildClass","_fontName","_fontStyle","_fontSize","_maxFontSize","_color","AcroFormTextField","_DV","AcroFormButton","_hasAppearanceStream","_page","Ff","_Q","AcroFormChoiceField","FT","_TI","_Opt","getOptions","setOptions","sort","addOption","removeOption","allEntries","combo","AcroFormListBox","AcroFormComboBox","AcroFormEditBox","edit","_MK","CA","_AS","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","namespace","__addimage__","UNKNOWN","ARRAY_APPLY_BATCH","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","checkCompressValue","image_compression","NONE","initialize","getImages","getImageIndex","notDefined","generateAliasFromImageData","sHashCode","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","FAST","MEDIUM","SLOW","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","stringData","throwError","base64Info","rawData","getImageProperties","notEmpty","addPageData","pageInfo","putPageData","pageAnnos","anno","found","escape","objText","objPopup","encryptorText","bounds","contents","popoff","loc","_nameMap","top","finalBounds","info","magFactor","left","createAnnotation","link","textWithLink","totalLineWidth","getTextWidth","linkHeight","linkWidth","numOfLines","ceil","txtWidth","arabicSubstitionA","ligatures","arabic_diacritics","alfletter","noChangeInForm","isolatedForm","finalForm","initialForm","medialForm","__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","px2pt","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","headerNames","headerLabels","headerAligns","columnMatrix","columnWidths","column","columnMinWidths","tableHeaderConfigs","autoSize","css","headerBackgroundColor","headerTextColor","table_font_size","header","prompt","headerName","rec","row","rowHeight","calculateLineHeight","setTableHeaderRow","pv","cv","rowStart","Function","cellData","cellStart","col","table_x","table_y","model","new_page","tableHeaderCell","tempHeaderConf","currentTextColor","toLookup","arr","lookup","fontStyleOrder","italic","oblique","normal","fontStretchOrder","fontStretchLookup","fontWeights","fontWeightsLookup","normalizeFontStretch","stretch","normalizeFontStyle","normalizeFontWeight","weight","normalizeFontFace","fontFace","family","ref","buildFontFaceMap","fontFaces","normalized","searchFromPivot","matchingSet","order","pivot","dir","resolveFontStretch","resolveFontStyle","ordering","resolveFontWeight","defaultGenericFontFamilies","fixed","monospace","terminal","cursive","fantasy","serif","systemFonts","icon","menu","ruleToString","resolveFontFace","fontFaceMap","rules","defaultFontFamily","genericFontFamilies","eatWhiteSpace","input","trimLeft","parseQuotedFontFamily","quote","current","parseNonQuotedFontFamily","defaultFont","parseFontFamily","parsed","remaining","ContextLayer","ctx","isStrokeTransparent","strokeOpacity","strokeStyle","fillStyle","isFillTransparent","fillOpacity","textBaseline","lineJoin","lineCap","globalCompositeOperation","globalAlpha","clip_path","currentPoint","miterLimit","lastPoint","lineDashOffset","lineDash","margin","prevPageLastElemOffset","ignoreClearRect","_ctx","Context2D","parentNode","_pdf","_pageWrapXEnabled","_pageWrapYEnabled","_posX","_posY","_autoPaging","lastBreak","pageBreaks","_ctxStack","rgba","getRGBA","_fontFaceMap","getFontFaceMap","fontMap","convertedFontFaces","convertToFontFaces","styles","_fontFaces","fontVariant","fontFamily","rxFontSize","fontSizeUnit","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","rxRgb","rxRgba","rxTransparent","isCanvasGradient","getColor","fillText","degs","rad2deg","putText","strokeText","measureText","TextMetrics","scalewidth","scaleheight","setTransform","hasMargins","drawImage","img","swidth","sheight","imageProperties","factorX","factorY","clipFactorX","clipFactorY","decomposedTransformationMatrix","xRect","pageArray","getPagesByPath","sortPages","clipPath","autoPaging","pageWidthMinusMargins","topMargin","firstPageHeight","pageHeightMinusMargins","previousPageHeightSum","tmpPaths","pathPositionRedo","drawPaths","tmpRect","needsClipping","yOffset","rectOfQuadraticCurve","getQuadraticCurveBoundary","rectOfBezierCurve","getBezierCurveBoundary","paths","isClip","oldLineWidth","origPath","xPath","tmpPath","moves","delta","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","yBottom","yTop","baselineRect","textBounds","oldSize","pageHeightMinusBottomMargin","pageWidthMinusRightMargin","textBoundsOnPage","doSlice","croppedText","baseLineRectOnPage","prevX","prevY","anticlockwise","EPSILON","twoPi","halfPi","totalAngle","sgn","remain","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","tobx","toby","tocx","tocy","todx","tody","px","py","qx","qy","minx","miny","maxx","maxy","toqx","toqy","torx","tory","totx","toty","getPrevLineDashValue","prevLineDash","nextLineDash","ASCII85Encode","ASCII85Decode","z","ASCIIHexEncode","ASCIIHexDecode","regexCheckIfHex","RegExp","FlateEncode","zlibSync","origData","filterChain","sync","browserRequest","loadImageFile","request","sanitizeUnicode","dataLength","charArray","StringFromCharCode","overrideMimeType","responseText","loadHtml2Canvas","catch","then","html2canvas","default","loadDomPurify","dompurify","objType","tagName","opt","el","className","innerHTML","sanitize","cloneNode","javascriptEnabled","createTextNode","nodeValue","firstChild","nextSibling","appendChild","addEventListener","scrollTop","scrollLeft","Worker","root","convert","template","setProgress","promise","__proto__","prop","container","overlay","progress","val","enableLinks","backgroundColor","from","getType","from_main","to","toContainer","toCanvas","toImg","toPdf","prereqs","checkSrc","checkPageSize","setPageSize","thenList","toContainer_main","overlayCSS","overflow","zIndex","containerCSS","display","windowWidth","clientWidth","scrollWidth","offsetWidth","source","scrollHeight","offsetHeight","clientHeight","clear","border","float","checkContainer","contains","toCanvas_main","onrendered","toCanvas_post","onRendered","removeChild","toContext2d","toContext2d_main","async","allowTaint","scrollX","scrollY","imageTimeout","logging","proxy","removeContainer","foreignObjectRendering","useCORS","windowHeight","toContext2d_post","checkCanvas","toImg_main","imgData","quality","checkContext2d","toPdf_main","outputImg","outputPdf","checkPdf","outputPdf_main","checkImg","outputImg_main","save_main","doCallback","doCallback_main","fns","set_prop","setMargin","set_jsPDF","set_opt","set_main","cbk","get_main","setMargin_main","toPx","setPageSize_main","getPageSize","inner","ratio","updateProgress","onFulfilled","onRejected","thenCore","then_main","then_pre","then_post","thenBase","isNative","selfPromise","returnVal","thenExternal","thenList_forEach","catchExternal","msg","error_main","using","export","run","format_as_string","err","html","worker","jsNamesObj","jsJsObj","javascript","namesOid","outline","children","render","createNamedDestinations","totalPages","dests","names2Oid","makeRef","add","item","genIds_r","renderRoot","renderItems","objStart","count_r","objEnd","makeString","markers","getJpegInfo","numcomponents","blockLength","processJPEG","bpc","APNG_BLEND_OP_SOURCE","APNG_DISPOSE_OP_BACKGROUND","APNG_DISPOSE_OP_PREVIOUS","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","unzlibSync","pass","x0","y0","abyte","pa","paeth","pb","pc","pixels","scanlineLength","upper","upperLeft","_k","_l","_m","isFull","fullPos","partPos","decodePalette","ret","_ref1","copyToImageData","alpha","_decodedPalette","hasBrowserCanvas","putImageData","Image","decodeFrames","_len","createImageData","renderFrame","prev","animate","doFrame","frameNumber","_timeout","stopAnimation","clearTimeout","_png","canCompress","hasCompressionJS","compressBytes","lineLength","colorsPerPixel","level","filter_method","filterUp","filterSub","filterAverage","filterPaeth","applyPngFilterMethod","dat","filter_methods","getFilterMethods","prevLine","results","ind","getIndexOfSmallestSum","filterNone","up","upLeft","paethPredictor","pLeft","pUp","pUpLeft","arrays","sum","getPredictorFromCompression","processPNG","trns","pal","smask","alphaData","hasColors","pixel","pDiff","pbl","trans","total","GifReader","pf0","global_palette_flag","num_global_colors_pow2","num_global_colors","background","global_palette_offset","global_palette_size","no_eof","transparent_index","disposal","loop_count","block_size","pf1","pf2","local_palette_flag","interlace_flag","num_local_colors_pow2","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","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","op_end","JPEGEncoder","ffloor","YTable","UVTable","fdtbl_Y","fdtbl_UV","YDC_HT","UVDC_HT","YAC_HT","UVAC_HT","bitcode","category","outputfDCTQuant","DU","byteout","bytenew","bytepos","YDU","UDU","VDU","clt","RGB_YUV_TABLE","currentQuality","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","initQuantTables","sf","YQT","UVQT","u","aasf","computeHuffmanTbl","nrcodes","std_table","codevalue","pos_in_table","HT","initHuffmanTbl","initCategoryNumber","nrlower","nrupper","cat","nr","nrneg","initRGBYUVTable","writeBits","bs","posval","writeByte","writeWord","fDCTQuant","fdtbl","d0","d1","d2","d3","d4","d5","d6","d7","dataOff","I8","I64","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","writeAPP0","writeSOF0","writeDQT","writeDHT","o","writeSOS","processDU","CDU","DC","HTDC","HTAC","EOB","M16zeroes","I16","I63","DU_DCT","Diff","end0pos","lng","startpos","nrzeroes","nrmarker","initCharLookupTable","sfcc","encode","setQuality","DCY","DCU","DCV","displayName","quadWidth","fillbits","init","processGIF89A","qu","rawImageData","encoder","processGIF87A","BmpDecoder","is_with_alpha","datav","DataView","bottom_up","flag","parseHeader","parseBGR","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","_11111","_1_5","B","bit16","_111111","_1_6","bit24","bit32","getData","processBMP","WebPDecoder","fa","L","J","H","I","Z","M","wa","wb","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","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","te","ue","yd","td","Rb","ve","we","Lb","Gc","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","Je","Ke","Le","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","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","memcmp","data_off","GetTag","GetLE16","GetLE24","GetLE32","WebPRiffParser","src_off","imagearray","alpha_chunk","alpha_size","alpha_offset","riff_size","fourcc","payload_size","payload_size_padded","feature_flags","src_off_","canvas_width","canvas_height","bgcolor","offset_x","offset_y","duration","blend","dispose","temp","webpdecoder","processWEBP","processRGBA","imagePixels","rgbOut","alphaOut","outIndex","alphaIndex","rgbData","setLanguage","langCode","langCodes","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","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","languageSettings","isSubscribed","languageCode","getCharWidthsArray","widths","Unicode","widthsFractionOf","fof","kerning","kerningFractionOf","kerningValue","char_code","prior_char_code","default_char_width","widthOfString","widthOfGlyph","characterToGlyph","splitLongWord","widths_array","firstLineMaxLen","maxLen","answer","workingLen","startOfLine","splitParagraphIntoLines","maxlen","line_length","textIndent","separator_length","current_word_length","spaceCharWidth","lineIndent","pad","wrds","wrd","idx","postProcess","ln","fsize","newOptions","paragraphs","fontUnit_maxLen","__fontmetrics__","decoded","encoded","mappingUncompress","mappingCompress","vals","keystring","valuestring","numberprefix","uncompress","sign","stringparts","activeobject","parentchain","parent_key_pair","keyparts","valueparts","datalen","WinAnsiEncoding","encodings","Courier","fontMetrics","Symbol","ZapfDingbats","metrics","file","TTFFont","glyIdsUsed","existsFileInVFS","getFileFromVFS","loadCanvg","canvg","addSvgAsImage","svg","ignoreMouse","ignoreAnimation","ignoreDimensions","doc","fromString","putTotalPages","pageExpression","replaceExpression","totalNumberOfPages","pdfEscape16","viewerPreferences","doReset","configuration","configurationTemplate","HideToolbar","defaultValue","explicitSet","valueSet","HideMenubar","HideWindowUI","FitWindow","CenterWindow","DisplayDocTitle","NonFullScreenPageMode","Direction","ViewArea","ViewClip","PrintArea","PrintClip","PrintScaling","Duplex","PickTrayByPDFSize","PrintPageRange","NumCopies","configurationKeys","rangeArray","isValid","method","arrayContainsElement","iterator","viewerpreferences","pdfDict","vPref","postPutResources","xmpmeta_beginning","rdf_beginning","__metadata__","namespaceuri","rdf_ending","xmpmeta_ending","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","identityHFunction","subset","pdfOutput","pdfOutput2","fontTable","cmap","cmapData","fontDescriptor","PDFObject","bbox","stemV","italicAngle","ascender","decender","capHeight","DescendantFont","winAnsiEncodingFunction","hmtx","head","unitsPerEm","utf8TextFunction","cmapConfirm","strText","codeMap","utf8EscapeFunction","parms","_initializeVFS","vFS","addFileToVFS","filecontent","bidiUnicodeTypes","__bidiEngine__","_UNICODE_TYPES","_bidiUnicodeTypes","_STATE_TABLE_LTR","_STATE_TABLE_RTL","_TYPE_NAMES_MAP","EN","AN","_UNICODE_RANGES_MAP","_SWAP_TABLE","_LTR_RANGES_REG_EXPR","_lastArabic","_hasUbatB","_hasUbatS","DIR_LTR","DIR_RTL","_isInVisual","_isInRtl","_isOutVisual","_isOutRtl","_isSymmetricSwapping","_dir","_init","sourceToTargetMap","_isContextualDirRtl","_getCharType","rangeIdx","charType","_resolveCharType","chars","types","resolvedTypes","cType","wType","nType","rtlCandidate","_handleUbatS","levels","_invertString","_computeLevels","hiLevel","params","action","condition","newLevel","prevState","condPos","newState","stateTable","_invertByLevel","high","end","low","_symmetricSwap","_reorder","doBidiReorder","isSymmetricSwappingOrig","isInputVisual","isOutputVisual","isInputRtl","isOutputRtl","isSymmetricSwapping","bidiEngine","bidiEngineFunction","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","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","Table","__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","ARG_1_AND_2_ARE_WORDS","MORE_COMPONENTS","WE_HAVE_AN_X_AND_Y_SCALE","WE_HAVE_A_SCALE","WE_HAVE_A_TWO_BY_TWO","glyphOffsets","activeGlyphs","glyfPtr","listGlyf","newLocaTable","invert","unicodes","next","generateCmap","roman","unicodeCmap","glyphsFor","additionalIDs","glyID","ids","new2old","newIDs","nextGlyphID","oldID","oldIDs","items","isString","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAIA,YAAY,GAAI,YAAW;AACpC,SAAO,gBAAgB,OAAOC,MAAvB,GACHA,MADG,GAEH,gBAAgB,OAAOC,MAAvB,GACAA,MADA,GAEA,gBAAgB,OAAOC,IAAvB,GACAA,IADA,GAEA,IANJ;AAOD,CARyB,EAAnB;;ACEP,SAASC,UAAT,GAAsB;AACpB,MAAIJ,YAAY,CAACK,OAAb,IAAwB,OAAOL,YAAY,CAACK,OAAb,CAAqBC,GAA5B,KAAoC,UAAhE,EAA4E;AAC1EN,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