pdfjs-dist
Advanced tools
Comparing version 2.10.377 to 2.11.338
{ | ||
"name": "pdfjs-dist", | ||
"version": "2.10.377", | ||
"version": "2.11.338", | ||
"main": [ | ||
@@ -5,0 +5,0 @@ "build/pdf.js", |
@@ -1,1 +0,1 @@ | ||
export * from "pdfjs-dist/types/web/pdf_viewer.component.d.ts"; | ||
export * from "../../types/web/pdf_viewer.component"; |
@@ -86,3 +86,3 @@ /** | ||
function bidi(str, startLevel, vertical) { | ||
function bidi(str, startLevel = -1, vertical = false) { | ||
let isLTR = true; | ||
@@ -89,0 +89,0 @@ const strLength = str.length; |
@@ -27,18 +27,30 @@ /** | ||
}); | ||
exports.CalibriRegularLineHeight = exports.CalibriRegularFactors = exports.CalibriItalicLineHeight = exports.CalibriItalicFactors = exports.CalibriBoldLineHeight = exports.CalibriBoldItalicLineHeight = exports.CalibriBoldItalicFactors = exports.CalibriBoldFactors = void 0; | ||
const CalibriBoldFactors = [1.3877, 1, 0.83908, 0.77539, 0.77539, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.7762, 0.7762, 0.73293, 0.73293, 0.73293, 0.73293, 0.73293, 0.73293, 0.82577, 0.87289, 0.87289, 0.88506, 0.80367, 0.73133, 0.73133, 0.73133, 0.73133, 0.73133, 0.73133, 0.73133, 0.73133, 0.73133, 0.88656, 0.73133, 0.73133, 0.57184, 0.87356, 0.6965, 0.88506, 0.91133, 0.7514, 0.81921, 0.68156, 0.81921, 0.81921, 1, 0.81921, 0.87356, 1, 0.99862, 0.99862, 1, 0.91075, 0.87356, 0.95958, 0.76229, 0.95958, 0.95958, 0.95958, 0.95958, 0.95958, 0.95958, 0.95958, 0.95958, 0.95958, 0.95958, 0.56289, 0.95958, 0.59526, 0.59526, 0.75727, 0.75727, 1, 0.69225, 0.69225, 0.89019, 0.70424, 1, 0.91926, 0.70823, 1.04924, 1.04924, 0.9121, 0.9121, 0.9121, 1, 0.9121, 0.9121, 0.86943, 0.87402, 0.86943, 0.86943, 0.86943, 0.86943, 0.86943, 0.86943, 0.86943, 0.84896, 0.81235, 0.86943, 0.82001, 0.87508, 0.87508, 0.86943, 0.79795, 0.9762, 0.87356, 0.99819, 0.88198, 0.77958, 0.77958, 0.77958, 1, 0.79795, 0.70864, 0.70572, 0.70572, 0.70572, 0.70572, 1, 1, 1, 1, 1, 0.70572, 0.8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.70864, 0.70864, 0.70864, 0.70864, 1, 0.78275, 0.81055, 0.81055, 0.81055, 0.81055, 1, 0.86943, 0.79795, 0.90399, 0.90399, 0.90399, 0.90399, 0.90399, 0.90399, 0.90399, 0.90399, 0.90399, 0.77892, 0.77892, 0.56029, 0.90399, 0.90399, 0.88653, 0.96017, 0.96017, 0.96017, 0.96017, 0.96017, 0.82577, 0.7648, 0.77892, 0.77892, 0.77892, 0.77892, 0.77892, 0.78257, 0.78257, 0.78257, 0.78257, 0.78257, 0.88762, 0.88762, 0.88762, 0.88762, 0.90323, 1, 0.88762, 0.8715, 0.8715, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.88762, 0.96108, 0.96108, 0.88762, 0.97566, 0.80352, 0.88762, 0.90747, 0.88762, 0.88762, 1.31006, 1.81055, 0.90527, 0.90527, 1.81055, 1.53711, 0.94434, 0.85284, 0.85284, 1.2798, 0.92138, 0.88762, 0.8785, 1.54657, 1.69808, 0.8936, 1, 0.88331, 0.88331, 0.97507, 0.97507, 1.15543, 1, 1.7801, 1.42259, 0.75241, 0.75241, 1.20528, 1, 1, 0.75241, 0.75241, 0.75241, 0.75241, 0.91056, 0.89552, 0.78287, 0.91027, 1.20528, 1, 1, 0.82845, 0.92794, 1, 1, 1.13254, 0.89552, 1, 0.8785, 0.89552, 0.89552, 0.83016, 0.93125, 0.85592, 0.87842, 1, 1.24487, 1, 1.06303, 0.90747, 1, 1, 0.91133, 0.70674, 0.88401, 0.90518, 0.90518, 0.90518, 0.90518, 0.90518, 0.90518, 0.90518, 0.90518, 0.91133, 1, 0.71143, 0.90518, 0.90527, 0.89552, 0.8785, 0.90518, 0.96399, 1.01407, 0.85284, 0.85356, 1.23108, 0.89049, 0.89049, 0.8785, 0.97801, 0.97171, 0.97801, 0.95015, 1, 1, 1, 0.91133, 0.88525, 1, 0.56892, 0.91133, 1, 0.83406, 0.77618, 0.84021, 0.77618, 0.77618, 1, 0.77618, 0.90807, 0.90176, 1, 0.85284, 0.90747, 0.96839, 0.96839, 1.03372, 1.03372, 0.8785, 0.89608, 0.8785, 1, 1.44947, 1.45894, 1, 0.88401, 0.88401, 0.88401, 0.88401, 0.88401, 0.88401, 0.90167, 0.88401, 1.17534, 1.37077, 0.8941, 0.8941, 0.9716, 1, 1, 1, 0.88401, 1.02988, 1.02988, 1.02988, 1.02988, 0.88401, 0.91916, 0.91916, 0.86304, 0.86077, 1, 0.86304, 0.88401, 0.88401, 0.87445, 0.79468, 1, 0.88175, 0.85284, 0.90747, 1, 0.91133, 0.85284, 0.9297, 1.08004, 0.94903, 1, 0.91488, 0.70645, 1, 1, 0.85284, 1, 0.92099, 0.85284, 1, 1, 0.8785, 0.8785, 0.87802, 0.8785, 1, 0.91133, 1, 0.90747, 0.8785, 0.84723, 0.89552, 0.8801, 0.8801, 0.8801, 0.8801, 0.8801, 0.89291, 0.94721, 0.8801, 0.8801, 0.8801, 0.84971, 0.84971, 0.8801, 0.8801, 0.91133, 0.83489, 0.82845, 0.78864, 0.99862, 1.12401, 1.19118, 0.69825, 0.89049, 0.89049, 0.8801, 0.8785, 1.07463, 0.93548, 0.93548, 1.08696, 0.81988, 0.96134, 1.06152, 0.84107, 0.97747, 0.75638, 0.85284, 0.90747, 0.95018, 0.97926, 0.8785, 0.75859, 0.75859, 0.92482, 0.87012, 0.87012, 0.87012, 0.92794, 0.92794, 0.92794, 0.92794, 0.98152, 0.91343, 0.91343, 0.90747, 0.91343, 1, 0.68787, 0.85284, 0.85714, 0.98387, 1, 0.7173, 0.7173, 0.7173, 0.7173, 0.7173, 1, 1, 0.89552, 0.91133, 0.81499, 1, 1, 0.79586, 0.78216, 0.91133, 1.54657, 1, 1, 0.91133, 0.77192, 1, 1.04106, 0.87965, 1.06452, 0.75841, 1, 1.00813, 0.8785, 0.91133, 0.88525, 0.84133, 1.33431, 1, 0.95161, 0.72021, 1, 1, 1, 1, 0.91133, 0.8785, 0.8785, 0.8785, 0.8785, 0.8785, 0.8785, 0.8785, 0.8785, 0.89552, 0.90363, 1, 1, 1.01466, 1.0088, 1, 0.75806, 0.81055, 1.04106, 1, 0.82845, 0.73133, 0.90264, 0.90518, 0.90548, 1, 1, 1.4956, 0.93835, 1, 1, 2.2807, 1, 1, 1, 0.90727, 0.90727, 0.8785, 1, 0.94211, 0.94211, 0.94211, 0.94211, 0.8785, 0.8785, 0.85075, 0.95794, 0.95794, 0.95794, 0.95794, 0.95794, 0.82616, 0.86513, 0.85162, 0.85162, 0.85162, 0.85162, 0.91133, 0.85162, 0.79492, 0.79492, 0.79492, 0.79492, 0.91133, 0.79109]; | ||
exports.CalibriRegularMetrics = exports.CalibriRegularFactors = exports.CalibriItalicMetrics = exports.CalibriItalicFactors = exports.CalibriBoldMetrics = exports.CalibriBoldItalicMetrics = exports.CalibriBoldItalicFactors = exports.CalibriBoldFactors = void 0; | ||
const CalibriBoldFactors = [1.3877, 1, 1, 1, 0.97801, 0.92482, 0.89552, 0.91133, 0.81988, 0.97566, 0.98152, 0.93548, 0.93548, 1.2798, 0.85284, 0.92794, 1, 0.96134, 1.54657, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.82845, 0.82845, 0.85284, 0.85284, 0.85284, 0.75859, 0.92138, 0.83908, 0.7762, 0.73293, 0.87289, 0.73133, 0.7514, 0.81921, 0.87356, 0.95958, 0.59526, 0.75727, 0.69225, 1.04924, 0.9121, 0.86943, 0.79795, 0.88198, 0.77958, 0.70864, 0.81055, 0.90399, 0.88653, 0.96017, 0.82577, 0.77892, 0.78257, 0.97507, 1.54657, 0.97507, 0.85284, 0.89552, 0.90176, 0.88762, 0.8785, 0.75241, 0.8785, 0.90518, 0.95015, 0.77618, 0.8785, 0.88401, 0.91916, 0.86304, 0.88401, 0.91488, 0.8785, 0.8801, 0.8785, 0.8785, 0.91343, 0.7173, 1.04106, 0.8785, 0.85075, 0.95794, 0.82616, 0.85162, 0.79492, 0.88331, 1.69808, 0.88331, 0.85284, 0.97801, 0.89552, 0.91133, 0.89552, 0.91133, 1.7801, 0.89552, 1.24487, 1.13254, 1.12401, 0.96839, 0.85284, 0.68787, 0.70645, 0.85592, 0.90747, 1.01466, 1.0088, 0.90323, 1, 1.07463, 1, 0.91056, 0.75806, 1.19118, 0.96839, 0.78864, 0.82845, 0.84133, 0.75859, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.77539, 0.73293, 0.73133, 0.73133, 0.73133, 0.73133, 0.95958, 0.95958, 0.95958, 0.95958, 0.88506, 0.9121, 0.86943, 0.86943, 0.86943, 0.86943, 0.86943, 0.85284, 0.87508, 0.90399, 0.90399, 0.90399, 0.90399, 0.77892, 0.79795, 0.90807, 0.88762, 0.88762, 0.88762, 0.88762, 0.88762, 0.88762, 0.8715, 0.75241, 0.90518, 0.90518, 0.90518, 0.90518, 0.88401, 0.88401, 0.88401, 0.88401, 0.8785, 0.8785, 0.8801, 0.8801, 0.8801, 0.8801, 0.8801, 0.90747, 0.89049, 0.8785, 0.8785, 0.8785, 0.8785, 0.85162, 0.8785, 0.85162, 0.83908, 0.88762, 0.83908, 0.88762, 0.83908, 0.88762, 0.73293, 0.75241, 0.73293, 0.75241, 0.73293, 0.75241, 0.73293, 0.75241, 0.87289, 0.83016, 0.88506, 0.93125, 0.73133, 0.90518, 0.73133, 0.90518, 0.73133, 0.90518, 0.73133, 0.90518, 0.73133, 0.90518, 0.81921, 0.77618, 0.81921, 0.77618, 0.81921, 0.77618, 1, 1, 0.87356, 0.8785, 0.91075, 0.89608, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.76229, 0.90167, 0.59526, 0.91916, 1, 1, 0.86304, 0.69225, 0.88401, 1, 1, 0.70424, 0.79468, 0.91926, 0.88175, 0.70823, 0.94903, 0.9121, 0.8785, 1, 1, 0.9121, 0.8785, 0.87802, 0.88656, 0.8785, 0.86943, 0.8801, 0.86943, 0.8801, 0.86943, 0.8801, 0.87402, 0.89291, 0.77958, 0.91343, 1, 1, 0.77958, 0.91343, 0.70864, 0.7173, 0.70864, 0.7173, 0.70864, 0.7173, 0.70864, 0.7173, 1, 1, 0.81055, 0.75841, 0.81055, 1.06452, 0.90399, 0.8785, 0.90399, 0.8785, 0.90399, 0.8785, 0.90399, 0.8785, 0.90399, 0.8785, 0.90399, 0.8785, 0.96017, 0.95794, 0.77892, 0.85162, 0.77892, 0.78257, 0.79492, 0.78257, 0.79492, 0.78257, 0.79492, 0.9297, 0.56892, 0.83908, 0.88762, 0.77539, 0.8715, 0.87508, 0.89049, 1, 1, 0.81055, 1.04106, 1.20528, 1.20528, 1, 1.15543, 0.70674, 0.98387, 0.94721, 1.33431, 1.45894, 0.95161, 1.06303, 0.83908, 0.80352, 0.57184, 0.6965, 0.56289, 0.82001, 0.56029, 0.81235, 1.02988, 0.83908, 0.7762, 0.68156, 0.80367, 0.73133, 0.78257, 0.87356, 0.86943, 0.95958, 0.75727, 0.89019, 1.04924, 0.9121, 0.7648, 0.86943, 0.87356, 0.79795, 0.78275, 0.81055, 0.77892, 0.9762, 0.82577, 0.99819, 0.84896, 0.95958, 0.77892, 0.96108, 1.01407, 0.89049, 1.02988, 0.94211, 0.96108, 0.8936, 0.84021, 0.87842, 0.96399, 0.79109, 0.89049, 1.00813, 1.02988, 0.86077, 0.87445, 0.92099, 0.84723, 0.86513, 0.8801, 0.75638, 0.85714, 0.78216, 0.79586, 0.87965, 0.94211, 0.97747, 0.78287, 0.97926, 0.84971, 1.02988, 0.94211, 0.8801, 0.94211, 0.84971, 0.73133, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90264, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90518, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90548, 1, 1, 1, 1, 1, 1, 0.96017, 0.95794, 0.96017, 0.95794, 0.96017, 0.95794, 0.77892, 0.85162, 1, 1, 0.89552, 0.90527, 1, 0.90363, 0.92794, 0.92794, 0.92794, 0.92794, 0.87012, 0.87012, 0.87012, 0.89552, 0.89552, 1.42259, 0.71143, 1.06152, 1, 1, 1.03372, 1.03372, 0.97171, 1.4956, 2.2807, 0.93835, 0.83406, 0.91133, 0.84107, 0.91133, 1, 1, 1, 0.72021, 1, 1.23108, 0.83489, 0.88525, 0.88525, 0.81499, 0.90527, 1.81055, 0.90527, 1.81055, 1.31006, 1.53711, 0.94434, 1.08696, 1, 0.95018, 0.77192, 0.85284, 0.90747, 1.17534, 0.69825, 0.9716, 1.37077, 0.90747, 0.90747, 0.85356, 0.90747, 0.90747, 1.44947, 0.85284, 0.8941, 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.99862, 0.99862, 1, 1, 1, 1, 1, 1.08004, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90727, 0.90727, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; | ||
exports.CalibriBoldFactors = CalibriBoldFactors; | ||
const CalibriBoldLineHeight = 1.2207; | ||
exports.CalibriBoldLineHeight = CalibriBoldLineHeight; | ||
const CalibriBoldItalicFactors = [1.3877, 1, 0.83908, 0.77539, 0.77539, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.7762, 0.7762, 0.71805, 0.71805, 0.71805, 0.71805, 0.71805, 0.71805, 0.82577, 0.87289, 0.87289, 0.88506, 0.86036, 0.73133, 0.73133, 0.73133, 0.73133, 0.73133, 0.73133, 0.73133, 0.73133, 0.73133, 0.88116, 0.73133, 0.73133, 0.57118, 0.87356, 0.6965, 0.88506, 0.91133, 0.7514, 0.81921, 0.67174, 0.81921, 0.81921, 1, 0.81921, 0.87356, 1, 0.99862, 0.99862, 1, 0.91075, 0.87356, 0.95958, 0.76467, 0.95958, 0.95958, 0.95958, 0.95958, 0.95958, 0.95958, 0.95958, 0.95958, 0.95958, 0.95958, 0.56347, 0.95958, 0.59526, 0.59526, 0.75727, 0.75727, 1, 0.69225, 0.69225, 0.89019, 0.70424, 1, 0.91926, 0.70823, 1.04924, 1.04924, 0.90872, 0.90872, 0.90872, 1, 0.90872, 0.90872, 0.85938, 0.87402, 0.85938, 0.85938, 0.85938, 0.85938, 0.85938, 0.85938, 0.85938, 0.87179, 0.80346, 0.85938, 0.79179, 0.87068, 0.87068, 0.85938, 0.79795, 0.97447, 0.87891, 0.97466, 0.87068, 0.77958, 0.77958, 0.77958, 1, 0.79795, 0.69766, 0.70572, 0.70572, 0.70572, 0.70572, 1, 1, 1, 1, 1, 0.70572, 0.8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.69766, 0.69766, 0.69766, 0.69766, 1, 0.7957, 0.81055, 0.81055, 0.81055, 0.81055, 1, 0.86441, 0.79795, 0.90399, 0.90399, 0.90399, 0.90399, 0.90399, 0.90399, 0.90399, 0.90399, 0.90399, 0.77892, 0.77892, 0.55853, 0.90399, 0.90399, 0.88653, 0.96068, 0.96068, 0.96068, 0.96068, 0.96068, 0.82577, 0.74889, 0.77892, 0.77892, 0.77892, 0.77892, 0.77892, 0.78257, 0.78257, 0.78257, 0.78257, 0.78257, 0.94908, 0.94908, 0.94908, 0.94908, 0.90323, 1, 0.94908, 0.85887, 0.85887, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.94908, 0.94252, 0.94252, 0.94908, 0.97566, 0.80352, 0.94908, 0.90747, 0.94908, 0.94908, 1.3107, 1.81055, 0.90616, 0.90527, 1.81055, 1.53711, 0.94434, 0.85284, 0.85284, 1.2798, 0.92138, 0.94908, 0.86411, 1.529, 1.69808, 0.87411, 1, 0.88331, 0.88331, 0.97507, 0.97507, 1.15543, 1, 1.7801, 1.42259, 0.74012, 0.74012, 1.20528, 1, 1, 0.74012, 0.74012, 0.74012, 0.74012, 0.91056, 0.89552, 0.78022, 0.91027, 1.20528, 1, 1, 0.82845, 0.92794, 1, 1, 1.13254, 0.89552, 1, 0.86411, 0.89552, 0.89552, 0.79538, 0.92726, 0.85592, 0.8728, 1, 1.24487, 1, 1.48387, 0.90747, 1, 1, 0.91133, 0.70088, 0.88401, 0.88323, 0.88323, 0.88323, 0.88323, 0.88323, 0.88323, 0.88323, 0.88323, 0.91133, 1, 0.71094, 0.88323, 0.90527, 0.89552, 0.86331, 0.88323, 0.95612, 0.95612, 0.85284, 0.85356, 1.23108, 0.8753, 0.8753, 0.8785, 0.97801, 0.97171, 0.97801, 0.95015, 1, 1, 1, 0.91133, 0.88525, 1, 0.56892, 0.91133, 1, 0.83406, 0.86411, 0.84021, 0.86411, 0.86411, 1, 0.86411, 0.90807, 0.90176, 1, 0.85284, 0.90747, 0.96839, 0.96839, 1.03372, 1.03372, 0.86331, 0.8777, 0.86331, 1, 1.44947, 1.45894, 1, 0.88401, 0.88401, 0.88401, 0.88401, 0.88401, 0.88401, 0.90167, 0.88401, 1.17534, 1.37077, 0.8941, 0.8941, 0.9716, 1, 1, 1, 0.88401, 1.02988, 1.02988, 1.02988, 1.02988, 0.88401, 0.91916, 0.91916, 0.86304, 0.84814, 1, 0.86304, 0.88401, 0.88401, 0.87445, 0.77312, 1, 0.88175, 0.85284, 0.90747, 1, 0.91133, 0.85284, 0.9297, 1.08004, 0.94903, 1, 0.9039, 0.70645, 1, 1, 0.85284, 1, 0.91822, 0.85284, 1, 1, 0.86331, 0.86331, 0.86906, 0.86331, 1, 0.91133, 1, 0.90747, 0.86331, 0.84723, 0.89552, 0.86331, 0.86331, 0.86331, 0.86331, 0.86331, 0.86549, 0.94721, 0.86331, 0.86331, 0.86331, 0.86015, 0.86015, 0.86331, 0.86331, 0.91133, 0.83489, 0.82845, 0.78864, 0.99862, 1.19129, 1.19118, 0.69825, 0.89049, 0.89049, 0.86331, 0.86411, 1.07463, 0.93548, 0.93548, 1.08696, 0.81988, 0.96134, 1.06152, 0.83326, 0.99375, 0.81344, 0.85284, 0.90747, 0.95018, 0.95452, 0.86411, 0.75859, 0.75859, 0.92482, 0.87012, 0.87012, 0.87012, 0.92794, 0.89807, 0.92794, 0.92794, 0.98152, 0.90464, 0.90464, 0.90747, 0.90464, 1, 0.68787, 0.85284, 0.87581, 0.98387, 1, 0.70852, 0.70852, 0.70852, 0.70852, 0.70852, 1, 1, 0.89552, 0.91133, 0.81499, 1, 1, 0.82046, 0.76422, 0.91133, 1.56239, 1, 1, 0.91133, 0.77192, 1, 1.04106, 0.96057, 1.06452, 0.75841, 1, 1.02189, 0.86411, 0.91133, 0.88525, 0.84133, 1.33431, 1, 0.95161, 0.72021, 1, 1, 1, 1, 0.91133, 0.86331, 0.86331, 0.86331, 0.86331, 0.86331, 0.86331, 0.86331, 0.86331, 0.89552, 0.90363, 1, 1, 1.01466, 1.0088, 1, 0.75806, 0.81055, 1.04106, 1, 0.82845, 0.73133, 0.90631, 0.88323, 0.85174, 1, 1, 1.4956, 0.92972, 1, 1, 2.2807, 1, 1, 1, 0.90727, 0.90727, 0.86331, 1, 0.92733, 0.92733, 0.92733, 0.92733, 0.86331, 0.86331, 0.84372, 0.95794, 0.95794, 0.95794, 0.95794, 0.95794, 0.82616, 0.85668, 0.84548, 0.84548, 0.84548, 0.84548, 0.91133, 0.84548, 0.79492, 0.79492, 0.79492, 0.79492, 0.91133, 0.74081]; | ||
const CalibriBoldMetrics = { | ||
lineHeight: 1.2207, | ||
lineGap: 0.2207 | ||
}; | ||
exports.CalibriBoldMetrics = CalibriBoldMetrics; | ||
const CalibriBoldItalicFactors = [1.3877, 1, 1, 1, 0.97801, 0.92482, 0.89552, 0.91133, 0.81988, 0.97566, 0.98152, 0.93548, 0.93548, 1.2798, 0.85284, 0.92794, 1, 0.96134, 1.56239, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.82845, 0.82845, 0.85284, 0.85284, 0.85284, 0.75859, 0.92138, 0.83908, 0.7762, 0.71805, 0.87289, 0.73133, 0.7514, 0.81921, 0.87356, 0.95958, 0.59526, 0.75727, 0.69225, 1.04924, 0.90872, 0.85938, 0.79795, 0.87068, 0.77958, 0.69766, 0.81055, 0.90399, 0.88653, 0.96068, 0.82577, 0.77892, 0.78257, 0.97507, 1.529, 0.97507, 0.85284, 0.89552, 0.90176, 0.94908, 0.86411, 0.74012, 0.86411, 0.88323, 0.95015, 0.86411, 0.86331, 0.88401, 0.91916, 0.86304, 0.88401, 0.9039, 0.86331, 0.86331, 0.86411, 0.86411, 0.90464, 0.70852, 1.04106, 0.86331, 0.84372, 0.95794, 0.82616, 0.84548, 0.79492, 0.88331, 1.69808, 0.88331, 0.85284, 0.97801, 0.89552, 0.91133, 0.89552, 0.91133, 1.7801, 0.89552, 1.24487, 1.13254, 1.19129, 0.96839, 0.85284, 0.68787, 0.70645, 0.85592, 0.90747, 1.01466, 1.0088, 0.90323, 1, 1.07463, 1, 0.91056, 0.75806, 1.19118, 0.96839, 0.78864, 0.82845, 0.84133, 0.75859, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.77539, 0.71805, 0.73133, 0.73133, 0.73133, 0.73133, 0.95958, 0.95958, 0.95958, 0.95958, 0.88506, 0.90872, 0.85938, 0.85938, 0.85938, 0.85938, 0.85938, 0.85284, 0.87068, 0.90399, 0.90399, 0.90399, 0.90399, 0.77892, 0.79795, 0.90807, 0.94908, 0.94908, 0.94908, 0.94908, 0.94908, 0.94908, 0.85887, 0.74012, 0.88323, 0.88323, 0.88323, 0.88323, 0.88401, 0.88401, 0.88401, 0.88401, 0.8785, 0.86331, 0.86331, 0.86331, 0.86331, 0.86331, 0.86331, 0.90747, 0.89049, 0.86331, 0.86331, 0.86331, 0.86331, 0.84548, 0.86411, 0.84548, 0.83908, 0.94908, 0.83908, 0.94908, 0.83908, 0.94908, 0.71805, 0.74012, 0.71805, 0.74012, 0.71805, 0.74012, 0.71805, 0.74012, 0.87289, 0.79538, 0.88506, 0.92726, 0.73133, 0.88323, 0.73133, 0.88323, 0.73133, 0.88323, 0.73133, 0.88323, 0.73133, 0.88323, 0.81921, 0.86411, 0.81921, 0.86411, 0.81921, 0.86411, 1, 1, 0.87356, 0.86331, 0.91075, 0.8777, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.76467, 0.90167, 0.59526, 0.91916, 1, 1, 0.86304, 0.69225, 0.88401, 1, 1, 0.70424, 0.77312, 0.91926, 0.88175, 0.70823, 0.94903, 0.90872, 0.86331, 1, 1, 0.90872, 0.86331, 0.86906, 0.88116, 0.86331, 0.85938, 0.86331, 0.85938, 0.86331, 0.85938, 0.86331, 0.87402, 0.86549, 0.77958, 0.90464, 1, 1, 0.77958, 0.90464, 0.69766, 0.70852, 0.69766, 0.70852, 0.69766, 0.70852, 0.69766, 0.70852, 1, 1, 0.81055, 0.75841, 0.81055, 1.06452, 0.90399, 0.86331, 0.90399, 0.86331, 0.90399, 0.86331, 0.90399, 0.86331, 0.90399, 0.86331, 0.90399, 0.86331, 0.96068, 0.95794, 0.77892, 0.84548, 0.77892, 0.78257, 0.79492, 0.78257, 0.79492, 0.78257, 0.79492, 0.9297, 0.56892, 0.83908, 0.94908, 0.77539, 0.85887, 0.87068, 0.89049, 1, 1, 0.81055, 1.04106, 1.20528, 1.20528, 1, 1.15543, 0.70088, 0.98387, 0.94721, 1.33431, 1.45894, 0.95161, 1.48387, 0.83908, 0.80352, 0.57118, 0.6965, 0.56347, 0.79179, 0.55853, 0.80346, 1.02988, 0.83908, 0.7762, 0.67174, 0.86036, 0.73133, 0.78257, 0.87356, 0.86441, 0.95958, 0.75727, 0.89019, 1.04924, 0.90872, 0.74889, 0.85938, 0.87891, 0.79795, 0.7957, 0.81055, 0.77892, 0.97447, 0.82577, 0.97466, 0.87179, 0.95958, 0.77892, 0.94252, 0.95612, 0.8753, 1.02988, 0.92733, 0.94252, 0.87411, 0.84021, 0.8728, 0.95612, 0.74081, 0.8753, 1.02189, 1.02988, 0.84814, 0.87445, 0.91822, 0.84723, 0.85668, 0.86331, 0.81344, 0.87581, 0.76422, 0.82046, 0.96057, 0.92733, 0.99375, 0.78022, 0.95452, 0.86015, 1.02988, 0.92733, 0.86331, 0.92733, 0.86015, 0.73133, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90631, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.88323, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.85174, 1, 1, 1, 1, 1, 1, 0.96068, 0.95794, 0.96068, 0.95794, 0.96068, 0.95794, 0.77892, 0.84548, 1, 1, 0.89552, 0.90527, 1, 0.90363, 0.92794, 0.92794, 0.92794, 0.89807, 0.87012, 0.87012, 0.87012, 0.89552, 0.89552, 1.42259, 0.71094, 1.06152, 1, 1, 1.03372, 1.03372, 0.97171, 1.4956, 2.2807, 0.92972, 0.83406, 0.91133, 0.83326, 0.91133, 1, 1, 1, 0.72021, 1, 1.23108, 0.83489, 0.88525, 0.88525, 0.81499, 0.90616, 1.81055, 0.90527, 1.81055, 1.3107, 1.53711, 0.94434, 1.08696, 1, 0.95018, 0.77192, 0.85284, 0.90747, 1.17534, 0.69825, 0.9716, 1.37077, 0.90747, 0.90747, 0.85356, 0.90747, 0.90747, 1.44947, 0.85284, 0.8941, 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.99862, 0.99862, 1, 1, 1, 1, 1, 1.08004, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90727, 0.90727, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; | ||
exports.CalibriBoldItalicFactors = CalibriBoldItalicFactors; | ||
const CalibriBoldItalicLineHeight = 1.2207; | ||
exports.CalibriBoldItalicLineHeight = CalibriBoldItalicLineHeight; | ||
const CalibriItalicFactors = [1.3877, 1, 0.8675, 0.76318, 0.76318, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.81552, 0.81552, 0.72346, 0.72346, 0.72346, 0.72346, 0.72346, 0.72346, 0.77818, 0.85193, 0.85193, 0.86477, 0.84134, 0.73206, 0.73206, 0.73206, 0.73206, 0.73206, 0.73206, 0.73206, 0.73206, 0.73206, 0.86698, 0.73206, 0.73206, 0.6192, 0.86275, 0.7363, 0.86477, 0.91133, 0.7522, 0.81105, 0.7286, 0.81105, 0.81105, 1, 0.81105, 0.86275, 1, 0.99862, 0.99862, 1, 0.90872, 0.86275, 0.90685, 0.77896, 0.90685, 0.90685, 0.90685, 0.90685, 0.90685, 0.90685, 0.90685, 0.90685, 0.90685, 0.90685, 0.64824, 0.90685, 0.6377, 0.6377, 0.77892, 0.77892, 1, 0.75593, 0.75593, 0.85871, 0.76032, 1, 0.98156, 0.77261, 1.02638, 1.02638, 0.89249, 0.89249, 0.89249, 1, 0.89249, 0.89249, 0.84118, 0.8667, 0.84118, 0.84118, 0.84118, 0.84118, 0.84118, 0.84118, 0.84118, 0.87291, 0.85696, 0.84118, 0.82411, 0.84557, 0.84557, 0.84118, 0.77452, 0.90782, 0.85984, 0.903, 0.85374, 0.75186, 0.75186, 0.75186, 1, 0.77452, 0.67789, 0.70572, 0.70572, 0.70572, 0.70572, 1, 1, 1, 1, 1, 0.70572, 0.8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.67789, 0.67789, 0.67789, 0.67789, 1, 0.76466, 0.79776, 0.79776, 0.79776, 0.79776, 1, 0.84369, 0.77452, 0.88844, 0.88844, 0.88844, 0.88844, 0.88844, 0.88844, 0.88844, 0.88844, 0.88844, 0.7306, 0.7306, 0.56321, 0.88844, 0.88844, 0.85066, 0.94309, 0.94309, 0.94309, 0.94309, 0.94309, 0.77818, 0.75828, 0.7306, 0.7306, 0.7306, 0.7306, 0.7306, 0.76659, 0.76659, 0.76659, 0.76659, 0.76659, 0.9245, 0.9245, 0.9245, 0.9245, 0.87683, 1, 0.9245, 0.84843, 0.84843, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.9245, 0.99058, 0.99058, 0.9245, 1.02269, 0.90861, 0.9245, 0.90747, 0.9245, 0.9245, 1.28809, 1.81055, 0.90572, 0.90749, 1.81055, 1.55469, 0.94434, 1.06139, 0.85284, 1.2798, 0.88071, 0.9245, 0.9245, 1.38313, 1.77256, 0.92393, 1, 0.94152, 0.94152, 1.10369, 1.10369, 1.1437, 1, 1.91729, 1.42259, 0.83203, 0.83203, 1.18622, 1, 1, 0.83203, 0.83203, 0.83203, 0.83203, 0.92229, 0.89552, 0.78086, 0.91027, 1.18622, 1, 1, 0.96309, 0.89807, 1, 1, 1.13254, 0.89552, 1, 0.9245, 0.89552, 0.89552, 0.8875, 0.99034, 0.84737, 0.942, 1, 1.17889, 1, 1.48387, 0.90747, 1, 1, 0.91133, 0.67009, 0.82601, 0.85865, 0.85865, 0.85865, 0.85865, 0.85865, 0.85865, 0.85865, 0.85865, 0.91133, 1, 0.68994, 0.85865, 0.90527, 0.89552, 0.9245, 0.85865, 1.03667, 1.03667, 0.85284, 0.85284, 1.23108, 0.94635, 0.94635, 0.94469, 1.17223, 1.11523, 0.97801, 1.09842, 1, 1, 1, 0.91133, 0.84426, 1, 0.54873, 0.91133, 1, 0.82616, 0.9245, 0.8916, 0.9245, 0.9245, 1, 0.9245, 0.86331, 0.8739, 1, 0.85284, 0.90747, 0.92098, 0.92098, 1.0176, 1.0176, 0.9245, 0.93591, 0.9245, 1, 1.44947, 1.40909, 1, 1.03297, 0.82601, 0.82601, 0.82601, 0.82601, 0.82601, 1.05611, 0.82601, 1.19658, 1.33512, 0.8941, 0.8941, 0.97622, 1, 1, 1, 1.03297, 1.23516, 1.23516, 1.23516, 1.23516, 0.82601, 1.07692, 1.07692, 0.90918, 0.90918, 1, 0.90918, 1.03297, 1.03297, 0.94048, 0.9375, 1, 0.93407, 0.85284, 0.90747, 1, 0.91133, 0.85284, 1.09231, 1.0336, 1.11429, 1, 0.94959, 0.71353, 1, 1, 0.85284, 1, 0.98217, 0.85284, 1, 1, 0.9245, 0.9245, 0.92534, 0.9245, 1, 0.91133, 1, 0.90747, 0.9245, 0.89746, 0.89552, 0.92274, 0.92274, 0.92274, 0.92274, 0.92274, 0.86291, 0.93695, 0.92274, 0.92274, 0.92274, 0.89404, 0.89404, 0.92274, 0.92274, 0.91133, 0.79801, 0.80504, 0.76288, 0.99862, 1.16359, 1.15642, 0.69825, 0.86651, 0.86651, 0.92274, 0.9245, 1.09091, 0.91056, 0.91056, 1.07806, 0.80395, 0.90861, 1.03809, 0.83437, 1.00225, 0.82507, 0.85284, 0.90747, 0.97094, 0.97248, 0.9245, 0.83319, 0.75859, 1.1293, 1.2566, 1.2566, 1.2566, 1.12308, 1.12308, 1.12308, 1.12308, 1.15601, 1.02933, 1.02933, 0.90747, 1.02933, 1, 0.68787, 0.85284, 0.88832, 0.96334, 1, 0.77832, 0.77832, 0.77832, 0.77832, 0.77832, 1, 1, 0.89552, 0.91133, 0.774, 1, 1, 0.88178, 0.84438, 0.91133, 1.39543, 1, 1, 0.91133, 0.7589, 1, 1.20562, 1.03525, 1.23023, 0.97655, 1, 1.0297, 0.9245, 0.91133, 0.84426, 0.80972, 1.35191, 1, 0.95161, 0.70508, 1, 1, 1, 1, 0.91133, 0.9245, 0.9245, 0.9245, 0.9245, 0.9245, 0.9245, 0.9245, 0.9245, 0.89552, 0.90186, 1, 1, 1.0088, 1.0044, 1, 0.739, 0.79776, 1.20562, 1, 0.96309, 0.73206, 0.89693, 0.85865, 0.90933, 1, 1, 1.4956, 0.97858, 1, 1, 2.01462, 1, 1, 1, 1.05859, 1.05859, 0.9245, 1, 0.9849, 0.9849, 0.9849, 0.9849, 0.9245, 0.9245, 0.8916, 0.98986, 0.98986, 0.98986, 0.98986, 0.98986, 0.86621, 0.84153, 0.89453, 0.89453, 0.89453, 0.89453, 0.91133, 0.89453, 0.79004, 0.79004, 0.79004, 0.79004, 0.91133, 0.75026]; | ||
const CalibriBoldItalicMetrics = { | ||
lineHeight: 1.2207, | ||
lineGap: 0.2207 | ||
}; | ||
exports.CalibriBoldItalicMetrics = CalibriBoldItalicMetrics; | ||
const CalibriItalicFactors = [1.3877, 1, 1, 1, 1.17223, 1.1293, 0.89552, 0.91133, 0.80395, 1.02269, 1.15601, 0.91056, 0.91056, 1.2798, 0.85284, 0.89807, 1, 0.90861, 1.39543, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.96309, 0.96309, 0.85284, 0.85284, 0.85284, 0.83319, 0.88071, 0.8675, 0.81552, 0.72346, 0.85193, 0.73206, 0.7522, 0.81105, 0.86275, 0.90685, 0.6377, 0.77892, 0.75593, 1.02638, 0.89249, 0.84118, 0.77452, 0.85374, 0.75186, 0.67789, 0.79776, 0.88844, 0.85066, 0.94309, 0.77818, 0.7306, 0.76659, 1.10369, 1.38313, 1.10369, 1.06139, 0.89552, 0.8739, 0.9245, 0.9245, 0.83203, 0.9245, 0.85865, 1.09842, 0.9245, 0.9245, 1.03297, 1.07692, 0.90918, 1.03297, 0.94959, 0.9245, 0.92274, 0.9245, 0.9245, 1.02933, 0.77832, 1.20562, 0.9245, 0.8916, 0.98986, 0.86621, 0.89453, 0.79004, 0.94152, 1.77256, 0.94152, 0.85284, 0.97801, 0.89552, 0.91133, 0.89552, 0.91133, 1.91729, 0.89552, 1.17889, 1.13254, 1.16359, 0.92098, 0.85284, 0.68787, 0.71353, 0.84737, 0.90747, 1.0088, 1.0044, 0.87683, 1, 1.09091, 1, 0.92229, 0.739, 1.15642, 0.92098, 0.76288, 0.80504, 0.80972, 0.75859, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.76318, 0.72346, 0.73206, 0.73206, 0.73206, 0.73206, 0.90685, 0.90685, 0.90685, 0.90685, 0.86477, 0.89249, 0.84118, 0.84118, 0.84118, 0.84118, 0.84118, 0.85284, 0.84557, 0.88844, 0.88844, 0.88844, 0.88844, 0.7306, 0.77452, 0.86331, 0.9245, 0.9245, 0.9245, 0.9245, 0.9245, 0.9245, 0.84843, 0.83203, 0.85865, 0.85865, 0.85865, 0.85865, 0.82601, 0.82601, 0.82601, 0.82601, 0.94469, 0.9245, 0.92274, 0.92274, 0.92274, 0.92274, 0.92274, 0.90747, 0.86651, 0.9245, 0.9245, 0.9245, 0.9245, 0.89453, 0.9245, 0.89453, 0.8675, 0.9245, 0.8675, 0.9245, 0.8675, 0.9245, 0.72346, 0.83203, 0.72346, 0.83203, 0.72346, 0.83203, 0.72346, 0.83203, 0.85193, 0.8875, 0.86477, 0.99034, 0.73206, 0.85865, 0.73206, 0.85865, 0.73206, 0.85865, 0.73206, 0.85865, 0.73206, 0.85865, 0.81105, 0.9245, 0.81105, 0.9245, 0.81105, 0.9245, 1, 1, 0.86275, 0.9245, 0.90872, 0.93591, 0.90685, 0.82601, 0.90685, 0.82601, 0.90685, 0.82601, 0.90685, 1.03297, 0.90685, 0.82601, 0.77896, 1.05611, 0.6377, 1.07692, 1, 1, 0.90918, 0.75593, 1.03297, 1, 1, 0.76032, 0.9375, 0.98156, 0.93407, 0.77261, 1.11429, 0.89249, 0.9245, 1, 1, 0.89249, 0.9245, 0.92534, 0.86698, 0.9245, 0.84118, 0.92274, 0.84118, 0.92274, 0.84118, 0.92274, 0.8667, 0.86291, 0.75186, 1.02933, 1, 1, 0.75186, 1.02933, 0.67789, 0.77832, 0.67789, 0.77832, 0.67789, 0.77832, 0.67789, 0.77832, 1, 1, 0.79776, 0.97655, 0.79776, 1.23023, 0.88844, 0.9245, 0.88844, 0.9245, 0.88844, 0.9245, 0.88844, 0.9245, 0.88844, 0.9245, 0.88844, 0.9245, 0.94309, 0.98986, 0.7306, 0.89453, 0.7306, 0.76659, 0.79004, 0.76659, 0.79004, 0.76659, 0.79004, 1.09231, 0.54873, 0.8675, 0.9245, 0.76318, 0.84843, 0.84557, 0.86651, 1, 1, 0.79776, 1.20562, 1.18622, 1.18622, 1, 1.1437, 0.67009, 0.96334, 0.93695, 1.35191, 1.40909, 0.95161, 1.48387, 0.8675, 0.90861, 0.6192, 0.7363, 0.64824, 0.82411, 0.56321, 0.85696, 1.23516, 0.8675, 0.81552, 0.7286, 0.84134, 0.73206, 0.76659, 0.86275, 0.84369, 0.90685, 0.77892, 0.85871, 1.02638, 0.89249, 0.75828, 0.84118, 0.85984, 0.77452, 0.76466, 0.79776, 0.7306, 0.90782, 0.77818, 0.903, 0.87291, 0.90685, 0.7306, 0.99058, 1.03667, 0.94635, 1.23516, 0.9849, 0.99058, 0.92393, 0.8916, 0.942, 1.03667, 0.75026, 0.94635, 1.0297, 1.23516, 0.90918, 0.94048, 0.98217, 0.89746, 0.84153, 0.92274, 0.82507, 0.88832, 0.84438, 0.88178, 1.03525, 0.9849, 1.00225, 0.78086, 0.97248, 0.89404, 1.23516, 0.9849, 0.92274, 0.9849, 0.89404, 0.73206, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.89693, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.85865, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90933, 1, 1, 1, 1, 1, 1, 0.94309, 0.98986, 0.94309, 0.98986, 0.94309, 0.98986, 0.7306, 0.89453, 1, 1, 0.89552, 0.90527, 1, 0.90186, 1.12308, 1.12308, 1.12308, 1.12308, 1.2566, 1.2566, 1.2566, 0.89552, 0.89552, 1.42259, 0.68994, 1.03809, 1, 1, 1.0176, 1.0176, 1.11523, 1.4956, 2.01462, 0.97858, 0.82616, 0.91133, 0.83437, 0.91133, 1, 1, 1, 0.70508, 1, 1.23108, 0.79801, 0.84426, 0.84426, 0.774, 0.90572, 1.81055, 0.90749, 1.81055, 1.28809, 1.55469, 0.94434, 1.07806, 1, 0.97094, 0.7589, 0.85284, 0.90747, 1.19658, 0.69825, 0.97622, 1.33512, 0.90747, 0.90747, 0.85284, 0.90747, 0.90747, 1.44947, 0.85284, 0.8941, 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.99862, 0.99862, 1, 1, 1, 1, 1, 1.0336, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.05859, 1.05859, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; | ||
exports.CalibriItalicFactors = CalibriItalicFactors; | ||
const CalibriItalicLineHeight = 1.2207; | ||
exports.CalibriItalicLineHeight = CalibriItalicLineHeight; | ||
const CalibriRegularFactors = [1.3877, 1, 0.8675, 0.76318, 0.76318, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.86686, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.81552, 0.81552, 0.73834, 0.73834, 0.73834, 0.73834, 0.73834, 0.73834, 0.77818, 0.85193, 0.85193, 0.86477, 0.84503, 0.73206, 0.73206, 0.73206, 0.73206, 0.73206, 0.73206, 0.73206, 0.73206, 0.73206, 0.86901, 0.73206, 0.73206, 0.62267, 0.86275, 0.74359, 0.86477, 0.91133, 0.7522, 0.81105, 0.75443, 0.81105, 0.81105, 1, 0.81105, 0.86275, 1, 0.99862, 0.99862, 1, 0.90872, 0.86275, 0.90685, 0.77741, 0.90685, 0.90685, 0.90685, 0.90685, 0.90685, 0.90685, 0.90685, 0.90685, 0.90685, 0.90685, 0.65649, 0.90685, 0.6377, 0.6377, 0.77892, 0.77892, 1, 0.75593, 0.75593, 0.85746, 0.76032, 1, 0.98156, 0.77261, 1.02638, 1.02638, 0.89385, 0.89385, 0.89385, 1, 0.89385, 0.89385, 0.85122, 0.8667, 0.85122, 0.85122, 0.85122, 0.85122, 0.85122, 0.85122, 0.85122, 0.88831, 0.88254, 0.85122, 0.85498, 0.85311, 0.85311, 0.85122, 0.77452, 0.95165, 0.86275, 0.89772, 0.86503, 0.75186, 0.75186, 0.75186, 1, 0.77452, 0.68887, 0.70572, 0.70572, 0.70572, 0.70572, 1, 1, 1, 1, 1, 0.70572, 0.8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.68887, 0.68887, 0.68887, 0.68887, 1, 0.74171, 0.79776, 0.79776, 0.79776, 0.79776, 1, 0.85122, 0.77452, 0.88844, 0.88844, 0.88844, 0.88844, 0.88844, 0.88844, 0.88844, 0.88844, 0.88844, 0.7306, 0.7306, 0.56963, 0.88844, 0.88844, 0.85066, 0.94258, 0.94258, 0.94258, 0.94258, 0.94258, 0.77818, 0.75657, 0.7306, 0.7306, 0.7306, 0.7306, 0.7306, 0.76659, 0.76659, 0.76659, 0.76659, 0.76659, 0.86128, 0.86128, 0.86128, 0.86128, 0.87683, 0.86128, 0.8693, 0.8693, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.86128, 0.98142, 0.98142, 0.86128, 1.02269, 0.90861, 0.86128, 0.90747, 0.86128, 0.86128, 1.28809, 1.81055, 0.90527, 0.90527, 1.81055, 1.55469, 0.94434, 1.06139, 0.85284, 1.2798, 0.88071, 0.86128, 0.94469, 1.39016, 1.77256, 0.9236, 1, 0.94152, 0.94152, 1.10369, 1.10369, 1.1437, 1.91729, 1.42259, 0.8457, 0.8457, 1.18622, 0.8457, 0.8457, 0.8457, 0.8457, 0.92229, 0.89552, 0.81209, 0.91027, 1.18622, 1, 0.96309, 0.89807, 1.13254, 0.89552, 0.94469, 0.89552, 0.89552, 0.92454, 0.9921, 0.84737, 0.94035, 1, 1.17889, 1.48387, 0.90747, 1, 1, 0.91133, 0.67742, 0.82601, 0.89464, 0.89464, 0.89464, 0.89464, 0.89464, 0.89464, 0.89464, 0.89464, 0.91133, 0.69043, 0.89464, 0.90527, 0.89552, 0.94469, 0.89464, 1.02191, 1.02191, 0.85284, 0.85356, 1.23108, 0.96576, 0.96576, 0.94469, 1.17223, 1.11523, 0.97801, 1.09842, 1, 1, 1, 0.91133, 0.84426, 0.54873, 0.91133, 0.82616, 0.84636, 0.89258, 0.84636, 0.84636, 1, 0.84636, 0.86331, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.8739, 0.85284, 0.90747, 0.92098, 0.92098, 1.0176, 1.0176, 0.94469, 0.95786, 0.94469, 1, 1.44947, 1.40909, 1.03297, 0.82601, 0.82601, 0.82601, 0.82601, 0.82601, 1.05611, 0.82601, 1.19658, 1.33512, 0.8941, 0.8941, 0.97622, 1, 1, 1, 1.03297, 1.23516, 1.23516, 1.23516, 1.23516, 0.82601, 1.07692, 1.07692, 0.90918, 0.90918, 1, 0.90918, 1.03297, 1.03297, 0.92578, 0.90452, 1, 1.11842, 0.85284, 0.90747, 1, 0.91133, 0.85284, 1.09231, 1.0336, 1.11429, 1, 0.95897, 0.71353, 1, 1, 0.85284, 1, 0.95424, 0.85284, 1, 1, 0.94469, 0.94469, 0.95877, 0.94469, 1, 0.91133, 1, 0.90747, 0.94469, 0.89746, 0.89552, 0.9482, 0.9482, 0.9482, 0.9482, 0.9482, 0.90016, 0.93695, 0.9482, 0.9482, 0.9482, 0.89181, 0.89181, 0.9482, 0.9482, 0.91133, 0.79801, 0.80504, 0.76288, 0.99862, 1.08707, 1.15642, 0.69825, 0.86651, 0.86651, 0.9482, 0.94469, 1.09091, 0.91056, 0.91056, 1.07806, 0.80395, 0.90861, 1.03809, 0.84286, 1.00452, 0.80113, 0.85284, 0.90747, 0.97094, 0.99247, 0.94469, 0.83319, 0.75859, 1.1293, 1.2566, 1.2566, 1.2566, 1.12308, 1.12308, 1.12308, 1.12308, 1.15601, 1.04692, 1.04692, 0.90747, 1.04692, 1, 0.68787, 0.85284, 0.89442, 0.96334, 1, 0.78223, 0.78223, 0.78223, 0.78223, 0.78223, 1, 1, 0.89552, 0.91133, 0.774, 1, 0.86155, 0.85208, 0.91133, 1.39016, 1, 1, 0.91133, 0.7589, 1, 1.20562, 0.98022, 1.23023, 0.92188, 1, 0.9561, 0.94469, 0.91133, 0.84426, 0.80972, 1.35191, 0.95161, 0.70508, 1, 1, 1, 1, 0.91133, 0.94469, 0.94469, 0.94469, 0.94469, 0.94469, 0.94469, 0.94469, 0.94469, 0.89552, 0.90186, 1, 1, 1.0088, 1.0044, 1, 0.739, 0.79776, 1.20562, 1, 0.96309, 0.73206, 0.88844, 0.89464, 0.96766, 1, 1, 1.4956, 1.07185, 0.99413, 0.96334, 1.08065, 0.99331, 1, 1, 2.01462, 1, 1, 1, 1, 1.05859, 1.05859, 0.94469, 1, 0.99018, 0.99018, 0.99018, 0.99018, 0.94469, 0.94469, 0.90332, 0.98986, 0.98986, 0.98986, 0.98986, 0.98986, 0.86621, 0.83969, 0.90527, 0.90527, 0.90527, 0.90527, 0.91133, 0.90527, 0.79004, 0.79004, 0.79004, 0.79004, 0.91133, 0.78848]; | ||
const CalibriItalicMetrics = { | ||
lineHeight: 1.2207, | ||
lineGap: 0.2207 | ||
}; | ||
exports.CalibriItalicMetrics = CalibriItalicMetrics; | ||
const CalibriRegularFactors = [1.3877, 1, 1, 1, 1.17223, 1.1293, 0.89552, 0.91133, 0.80395, 1.02269, 1.15601, 0.91056, 0.91056, 1.2798, 0.85284, 0.89807, 1, 0.90861, 1.39016, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.96309, 0.96309, 0.85284, 0.85284, 0.85284, 0.83319, 0.88071, 0.8675, 0.81552, 0.73834, 0.85193, 0.73206, 0.7522, 0.81105, 0.86275, 0.90685, 0.6377, 0.77892, 0.75593, 1.02638, 0.89385, 0.85122, 0.77452, 0.86503, 0.75186, 0.68887, 0.79776, 0.88844, 0.85066, 0.94258, 0.77818, 0.7306, 0.76659, 1.10369, 1.39016, 1.10369, 1.06139, 0.89552, 0.8739, 0.86128, 0.94469, 0.8457, 0.94469, 0.89464, 1.09842, 0.84636, 0.94469, 1.03297, 1.07692, 0.90918, 1.03297, 0.95897, 0.94469, 0.9482, 0.94469, 0.94469, 1.04692, 0.78223, 1.20562, 0.94469, 0.90332, 0.98986, 0.86621, 0.90527, 0.79004, 0.94152, 1.77256, 0.94152, 0.85284, 0.97801, 0.89552, 0.91133, 0.89552, 0.91133, 1.91729, 0.89552, 1.17889, 1.13254, 1.08707, 0.92098, 0.85284, 0.68787, 0.71353, 0.84737, 0.90747, 1.0088, 1.0044, 0.87683, 1, 1.09091, 1, 0.92229, 0.739, 1.15642, 0.92098, 0.76288, 0.80504, 0.80972, 0.75859, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.76318, 0.73834, 0.73206, 0.73206, 0.73206, 0.73206, 0.90685, 0.90685, 0.90685, 0.90685, 0.86477, 0.89385, 0.85122, 0.85122, 0.85122, 0.85122, 0.85122, 0.85284, 0.85311, 0.88844, 0.88844, 0.88844, 0.88844, 0.7306, 0.77452, 0.86331, 0.86128, 0.86128, 0.86128, 0.86128, 0.86128, 0.86128, 0.8693, 0.8457, 0.89464, 0.89464, 0.89464, 0.89464, 0.82601, 0.82601, 0.82601, 0.82601, 0.94469, 0.94469, 0.9482, 0.9482, 0.9482, 0.9482, 0.9482, 0.90747, 0.86651, 0.94469, 0.94469, 0.94469, 0.94469, 0.90527, 0.94469, 0.90527, 0.8675, 0.86128, 0.8675, 0.86128, 0.8675, 0.86128, 0.73834, 0.8457, 0.73834, 0.8457, 0.73834, 0.8457, 0.73834, 0.8457, 0.85193, 0.92454, 0.86477, 0.9921, 0.73206, 0.89464, 0.73206, 0.89464, 0.73206, 0.89464, 0.73206, 0.89464, 0.73206, 0.89464, 0.81105, 0.84636, 0.81105, 0.84636, 0.81105, 0.84636, 1, 1, 0.86275, 0.94469, 0.90872, 0.95786, 0.90685, 0.82601, 0.90685, 0.82601, 0.90685, 0.82601, 0.90685, 1.03297, 0.90685, 0.82601, 0.77741, 1.05611, 0.6377, 1.07692, 1, 1, 0.90918, 0.75593, 1.03297, 1, 1, 0.76032, 0.90452, 0.98156, 1.11842, 0.77261, 1.11429, 0.89385, 0.94469, 1, 1, 0.89385, 0.94469, 0.95877, 0.86901, 0.94469, 0.85122, 0.9482, 0.85122, 0.9482, 0.85122, 0.9482, 0.8667, 0.90016, 0.75186, 1.04692, 1, 1, 0.75186, 1.04692, 0.68887, 0.78223, 0.68887, 0.78223, 0.68887, 0.78223, 0.68887, 0.78223, 1, 1, 0.79776, 0.92188, 0.79776, 1.23023, 0.88844, 0.94469, 0.88844, 0.94469, 0.88844, 0.94469, 0.88844, 0.94469, 0.88844, 0.94469, 0.88844, 0.94469, 0.94258, 0.98986, 0.7306, 0.90527, 0.7306, 0.76659, 0.79004, 0.76659, 0.79004, 0.76659, 0.79004, 1.09231, 0.54873, 0.8675, 0.86128, 0.76318, 0.8693, 0.85311, 0.86651, 1, 1, 0.79776, 1.20562, 1.18622, 1.18622, 1, 1.1437, 0.67742, 0.96334, 0.93695, 1.35191, 1.40909, 0.95161, 1.48387, 0.86686, 0.90861, 0.62267, 0.74359, 0.65649, 0.85498, 0.56963, 0.88254, 1.23516, 0.8675, 0.81552, 0.75443, 0.84503, 0.73206, 0.76659, 0.86275, 0.85122, 0.90685, 0.77892, 0.85746, 1.02638, 0.89385, 0.75657, 0.85122, 0.86275, 0.77452, 0.74171, 0.79776, 0.7306, 0.95165, 0.77818, 0.89772, 0.88831, 0.90685, 0.7306, 0.98142, 1.02191, 0.96576, 1.23516, 0.99018, 0.98142, 0.9236, 0.89258, 0.94035, 1.02191, 0.78848, 0.96576, 0.9561, 1.23516, 0.90918, 0.92578, 0.95424, 0.89746, 0.83969, 0.9482, 0.80113, 0.89442, 0.85208, 0.86155, 0.98022, 0.99018, 1.00452, 0.81209, 0.99247, 0.89181, 1.23516, 0.99018, 0.9482, 0.99018, 0.89181, 0.73206, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.88844, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.89464, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.96766, 1, 1, 1, 1, 1, 1, 0.94258, 0.98986, 0.94258, 0.98986, 0.94258, 0.98986, 0.7306, 0.90527, 1, 1, 0.89552, 0.90527, 1, 0.90186, 1.12308, 1.12308, 1.12308, 1.12308, 1.2566, 1.2566, 1.2566, 0.89552, 0.89552, 1.42259, 0.69043, 1.03809, 1, 1, 1.0176, 1.0176, 1.11523, 1.4956, 2.01462, 0.99331, 0.82616, 0.91133, 0.84286, 0.91133, 1, 1, 1, 0.70508, 1, 1.23108, 0.79801, 0.84426, 0.84426, 0.774, 0.90527, 1.81055, 0.90527, 1.81055, 1.28809, 1.55469, 0.94434, 1.07806, 1, 0.97094, 0.7589, 0.85284, 0.90747, 1.19658, 0.69825, 0.97622, 1.33512, 0.90747, 0.90747, 0.85356, 0.90747, 0.90747, 1.44947, 0.85284, 0.8941, 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.99862, 0.99862, 1, 1, 1, 1, 1, 1.0336, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.05859, 1.05859, 1, 1, 1, 1.07185, 0.99413, 0.96334, 1.08065, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; | ||
exports.CalibriRegularFactors = CalibriRegularFactors; | ||
const CalibriRegularLineHeight = 1.2207; | ||
exports.CalibriRegularLineHeight = CalibriRegularLineHeight; | ||
const CalibriRegularMetrics = { | ||
lineHeight: 1.2207, | ||
lineGap: 0.2207 | ||
}; | ||
exports.CalibriRegularMetrics = CalibriRegularMetrics; |
@@ -84,2 +84,12 @@ /** | ||
get needsRendering() { | ||
const needsRendering = this._catDict.get("NeedsRendering"); | ||
if (!(0, _util.isBool)(needsRendering)) { | ||
return (0, _util.shadow)(this, "needsRendering", false); | ||
} | ||
return (0, _util.shadow)(this, "needsRendering", needsRendering); | ||
} | ||
get collection() { | ||
@@ -125,2 +135,8 @@ let collection = null; | ||
get acroFormRef() { | ||
const value = this._catDict.getRaw("AcroForm"); | ||
return (0, _util.shadow)(this, "acroFormRef", (0, _primitives.isRef)(value) ? value : null); | ||
} | ||
get metadata() { | ||
@@ -1334,14 +1350,2 @@ const streamRef = this._catDict.getRaw("Metadata"); | ||
static parseDestDictionary(params) { | ||
function addDefaultProtocolToUrl(url) { | ||
return url.startsWith("www.") ? `http://${url}` : url; | ||
} | ||
function tryConvertUrlEncoding(url) { | ||
try { | ||
return (0, _util.stringToUTF8String)(url); | ||
} catch (e) { | ||
return url; | ||
} | ||
} | ||
const destDict = params.destDict; | ||
@@ -1393,9 +1397,28 @@ | ||
switch (actionName) { | ||
case "ResetForm": | ||
const flags = action.get("Flags"); | ||
const include = (((0, _util.isNum)(flags) ? flags : 0) & 1) === 0; | ||
const fields = []; | ||
const refs = []; | ||
for (const obj of action.get("Fields") || []) { | ||
if ((0, _primitives.isRef)(obj)) { | ||
refs.push(obj.toString()); | ||
} else if ((0, _util.isString)(obj)) { | ||
fields.push((0, _util.stringToPDFString)(obj)); | ||
} | ||
} | ||
resultObj.resetForm = { | ||
fields, | ||
refs, | ||
include | ||
}; | ||
break; | ||
case "URI": | ||
url = action.get("URI"); | ||
if ((0, _primitives.isName)(url)) { | ||
if (url instanceof _primitives.Name) { | ||
url = "/" + url.name; | ||
} else if ((0, _util.isString)(url)) { | ||
url = addDefaultProtocolToUrl(url); | ||
} | ||
@@ -1464,20 +1487,12 @@ | ||
if (js) { | ||
const URL_OPEN_METHODS = ["app.launchURL", "window.open"]; | ||
const regex = new RegExp("^\\s*(" + URL_OPEN_METHODS.join("|").split(".").join("\\.") + ")\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))", "i"); | ||
const jsUrl = regex.exec((0, _util.stringToPDFString)(js)); | ||
const jsURL = js && (0, _core_utils.recoverJsURL)((0, _util.stringToPDFString)(js)); | ||
if (jsUrl && jsUrl[2]) { | ||
url = jsUrl[2]; | ||
if (jsUrl[3] === "true" && jsUrl[1] === "app.launchURL") { | ||
resultObj.newWindow = true; | ||
} | ||
break; | ||
} | ||
if (jsURL) { | ||
url = jsURL.url; | ||
resultObj.newWindow = jsURL.newWindow; | ||
break; | ||
} | ||
default: | ||
if (actionName === "JavaScript" || actionName === "ResetForm" || actionName === "SubmitForm") { | ||
if (actionName === "JavaScript" || actionName === "SubmitForm") { | ||
break; | ||
@@ -1494,4 +1509,6 @@ } | ||
if ((0, _util.isString)(url)) { | ||
url = tryConvertUrlEncoding(url); | ||
const absoluteUrl = (0, _util.createValidAbsoluteUrl)(url, docBaseUrl); | ||
const absoluteUrl = (0, _util.createValidAbsoluteUrl)(url, docBaseUrl, { | ||
addDefaultProtocol: true, | ||
tryConvertEncoding: true | ||
}); | ||
@@ -1498,0 +1515,0 @@ if (absoluteUrl) { |
@@ -302,3 +302,3 @@ /** | ||
loaded = 0; | ||
const promise = new Promise((resolve, reject) => { | ||
return new Promise((resolve, reject) => { | ||
const readChunk = chunk => { | ||
@@ -330,4 +330,3 @@ try { | ||
rangeReader.read().then(readChunk, reject); | ||
}); | ||
promise.then(data => { | ||
}).then(data => { | ||
if (this.aborted) { | ||
@@ -394,3 +393,3 @@ return; | ||
const end = Math.min(groupedChunk.endChunk * this.chunkSize, this.length); | ||
this.sendRequest(begin, end); | ||
this.sendRequest(begin, end).catch(capability.reject); | ||
} | ||
@@ -397,0 +396,0 @@ } |
@@ -633,3 +633,3 @@ /** | ||
if ((0, _primitives.isEOF)(obj)) { | ||
if (obj === _primitives.EOF) { | ||
break; | ||
@@ -655,3 +655,3 @@ } | ||
if ((0, _primitives.isEOF)(obj)) { | ||
if (obj === _primitives.EOF) { | ||
break; | ||
@@ -678,3 +678,3 @@ } | ||
while (!(0, _primitives.isCmd)(obj, "]") && !(0, _primitives.isEOF)(obj)) { | ||
while (!(0, _primitives.isCmd)(obj, "]") && obj !== _primitives.EOF) { | ||
array.push(obj); | ||
@@ -697,3 +697,3 @@ obj = lexer.getObj(); | ||
if ((0, _primitives.isEOF)(obj)) { | ||
if (obj === _primitives.EOF) { | ||
break; | ||
@@ -719,3 +719,3 @@ } | ||
if ((0, _primitives.isEOF)(obj)) { | ||
if (obj === _primitives.EOF) { | ||
break; | ||
@@ -744,3 +744,3 @@ } | ||
if ((0, _primitives.isEOF)(obj)) { | ||
if (obj === _primitives.EOF) { | ||
break; | ||
@@ -794,3 +794,3 @@ } | ||
if ((0, _primitives.isEOF)(obj)) { | ||
if (obj === _primitives.EOF) { | ||
break; | ||
@@ -797,0 +797,0 @@ } else if ((0, _primitives.isName)(obj)) { |
@@ -39,2 +39,3 @@ /** | ||
exports.readUint32 = readUint32; | ||
exports.recoverJsURL = recoverJsURL; | ||
exports.toRomanNumerals = toRomanNumerals; | ||
@@ -82,3 +83,3 @@ exports.validateCSSFont = validateCSSFont; | ||
constructor(begin, end) { | ||
super(`Missing data [${begin}, ${end})`); | ||
super(`Missing data [${begin}, ${end})`, "MissingDataException"); | ||
this.begin = begin; | ||
@@ -92,12 +93,27 @@ this.end = end; | ||
class ParserEOFException extends _util.BaseException {} | ||
class ParserEOFException extends _util.BaseException { | ||
constructor(msg) { | ||
super(msg, "ParserEOFException"); | ||
} | ||
} | ||
exports.ParserEOFException = ParserEOFException; | ||
class XRefEntryException extends _util.BaseException {} | ||
class XRefEntryException extends _util.BaseException { | ||
constructor(msg) { | ||
super(msg, "XRefEntryException"); | ||
} | ||
} | ||
exports.XRefEntryException = XRefEntryException; | ||
class XRefParseException extends _util.BaseException {} | ||
class XRefParseException extends _util.BaseException { | ||
constructor(msg) { | ||
super(msg, "XRefParseException"); | ||
} | ||
} | ||
exports.XRefParseException = XRefParseException; | ||
@@ -187,3 +203,3 @@ | ||
function parseXFAPath(path) { | ||
const positionPattern = /(.+)\[([0-9]+)\]$/; | ||
const positionPattern = /(.+)\[(\d+)\]$/; | ||
return path.split(".").map(component => { | ||
@@ -406,3 +422,3 @@ const m = component.match(positionPattern); | ||
for (const ident of fontFamily.split(/[ \t]+/)) { | ||
if (/^([0-9]|(-([0-9]|-)))/.test(ident) || !/^[a-zA-Z0-9\-_\\]+$/.test(ident)) { | ||
if (/^(\d|(-(\d|-)))/.test(ident) || !/^[\w-\\]+$/.test(ident)) { | ||
(0, _util.warn)(`XFA - FontFamily contains some invalid <custom-ident>: ${fontFamily}.`); | ||
@@ -419,2 +435,24 @@ return false; | ||
return true; | ||
} | ||
function recoverJsURL(str) { | ||
const URL_OPEN_METHODS = ["app.launchURL", "window.open", "xfa.host.gotoURL"]; | ||
const regex = new RegExp("^\\s*(" + URL_OPEN_METHODS.join("|").split(".").join("\\.") + ")\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))", "i"); | ||
const jsUrl = regex.exec(str); | ||
if (jsUrl && jsUrl[2]) { | ||
const url = jsUrl[2]; | ||
let newWindow = false; | ||
if (jsUrl[3] === "true" && jsUrl[1] === "app.launchURL") { | ||
newWindow = true; | ||
} | ||
return { | ||
url, | ||
newWindow | ||
}; | ||
} | ||
return null; | ||
} |
@@ -1219,7 +1219,3 @@ /** | ||
const pad = 16 - strLen % 16; | ||
if (pad !== 16) { | ||
s = s.padEnd(16 * Math.ceil(strLen / 16), String.fromCharCode(pad)); | ||
} | ||
s += String.fromCharCode(pad).repeat(pad); | ||
const iv = new Uint8Array(16); | ||
@@ -1226,0 +1222,0 @@ |
@@ -151,3 +151,3 @@ /** | ||
class StreamsSequenceStream extends DecodeStream { | ||
constructor(streams) { | ||
constructor(streams, onError = null) { | ||
let maybeLength = 0; | ||
@@ -161,2 +161,3 @@ | ||
this.streams = streams; | ||
this._onError = onError; | ||
} | ||
@@ -173,3 +174,16 @@ | ||
const stream = streams.shift(); | ||
const chunk = stream.getBytes(); | ||
let chunk; | ||
try { | ||
chunk = stream.getBytes(); | ||
} catch (reason) { | ||
if (this._onError) { | ||
this._onError(reason, stream.dict && stream.dict.objId); | ||
return; | ||
} | ||
throw reason; | ||
} | ||
const bufferLength = this.bufferLength; | ||
@@ -176,0 +190,0 @@ const newLength = bufferLength + chunk.length; |
@@ -35,2 +35,4 @@ /** | ||
var _xfa_fonts = require("./xfa_fonts.js"); | ||
var _stream = require("./stream.js"); | ||
@@ -46,4 +48,2 @@ | ||
var _xfa_fonts = require("./xfa_fonts.js"); | ||
var _parser = require("./parser.js"); | ||
@@ -213,3 +213,15 @@ | ||
getContentStream() { | ||
_onSubStreamError(handler, reason, objId) { | ||
if (this.evaluatorOptions.ignoreErrors) { | ||
handler.send("UnsupportedFeature", { | ||
featureId: _util.UNSUPPORTED_FEATURES.errorContentSubStream | ||
}); | ||
(0, _util.warn)(`getContentStream - ignoring sub-stream (${objId}): "${reason}".`); | ||
return; | ||
} | ||
throw reason; | ||
} | ||
getContentStream(handler) { | ||
return this.pdfManager.ensure(this, "content").then(content => { | ||
@@ -221,3 +233,3 @@ if (content instanceof _base_stream.BaseStream) { | ||
if (Array.isArray(content)) { | ||
return new _decode_stream.StreamsSequenceStream(content); | ||
return new _decode_stream.StreamsSequenceStream(content, this._onSubStreamError.bind(this, handler)); | ||
} | ||
@@ -285,6 +297,6 @@ | ||
intent, | ||
renderInteractiveForms, | ||
annotationStorage | ||
cacheKey, | ||
annotationStorage = null | ||
}) { | ||
const contentStreamPromise = this.getContentStream(); | ||
const contentStreamPromise = this.getContentStream(handler); | ||
const resourcesPromise = this.loadResources(["ColorSpace", "ExtGState", "Font", "Pattern", "Properties", "Shading", "XObject"]); | ||
@@ -308,3 +320,3 @@ const partialEvaluator = new _evaluator.PartialEvaluator({ | ||
pageIndex: this.pageIndex, | ||
intent | ||
cacheKey | ||
}); | ||
@@ -321,3 +333,3 @@ return partialEvaluator.getOperatorList({ | ||
return Promise.all([pageListPromise, this._parsedAnnotations]).then(function ([pageOpList, annotations]) { | ||
if (annotations.length === 0) { | ||
if (annotations.length === 0 || intent & _util.RenderingIntentFlag.ANNOTATIONS_DISABLE) { | ||
pageOpList.flush(true); | ||
@@ -329,8 +341,11 @@ return { | ||
const annotationIntent = intent.startsWith("oplist-") ? intent.split("-")[1] : intent; | ||
const renderForms = !!(intent & _util.RenderingIntentFlag.ANNOTATIONS_FORMS), | ||
intentAny = !!(intent & _util.RenderingIntentFlag.ANY), | ||
intentDisplay = !!(intent & _util.RenderingIntentFlag.DISPLAY), | ||
intentPrint = !!(intent & _util.RenderingIntentFlag.PRINT); | ||
const opListPromises = []; | ||
for (const annotation of annotations) { | ||
if (annotationIntent === "display" && annotation.mustBeViewed(annotationStorage) || annotationIntent === "print" && annotation.mustBePrinted(annotationStorage)) { | ||
opListPromises.push(annotation.getOperatorList(partialEvaluator, task, renderInteractiveForms, annotationStorage).catch(function (reason) { | ||
if (intentAny || intentDisplay && annotation.mustBeViewed(annotationStorage) || intentPrint && annotation.mustBePrinted(annotationStorage)) { | ||
opListPromises.push(annotation.getOperatorList(partialEvaluator, task, renderForms, annotationStorage).catch(function (reason) { | ||
(0, _util.warn)("getOperatorList - ignoring annotation data during " + `"${task.name}" task: "${reason}".`); | ||
@@ -366,3 +381,3 @@ return null; | ||
}) { | ||
const contentStreamPromise = this.getContentStream(); | ||
const contentStreamPromise = this.getContentStream(handler); | ||
const resourcesPromise = this.loadResources(["ExtGState", "Font", "Properties", "XObject"]); | ||
@@ -415,5 +430,13 @@ const dataPromises = Promise.all([contentStreamPromise, resourcesPromise]); | ||
for (let i = 0, ii = annotations.length; i < ii; i++) { | ||
if (!intent || intent === "display" && annotations[i].viewable || intent === "print" && annotations[i].printable) { | ||
annotationsData.push(annotations[i].data); | ||
if (annotations.length === 0) { | ||
return annotationsData; | ||
} | ||
const intentAny = !!(intent & _util.RenderingIntentFlag.ANY), | ||
intentDisplay = !!(intent & _util.RenderingIntentFlag.DISPLAY), | ||
intentPrint = !!(intent & _util.RenderingIntentFlag.PRINT); | ||
for (const annotation of annotations) { | ||
if (intentAny || intentDisplay && annotation.viewable || intentPrint && annotation.printable) { | ||
annotationsData.push(annotation.data); | ||
} | ||
@@ -463,3 +486,3 @@ } | ||
const EMPTY_FINGERPRINT = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"; | ||
const PDF_HEADER_VERSION_REGEXP = /^[1-9]\.[0-9]$/; | ||
const PDF_HEADER_VERSION_REGEXP = /^[1-9]\.\d$/; | ||
@@ -773,3 +796,3 @@ function find(stream, signature, limit = 1024, backwards = false) { | ||
get xfaFactory() { | ||
if (this.pdfManager.enableXfa && this.formInfo.hasXfa && !this.formInfo.hasAcroForm) { | ||
if (this.pdfManager.enableXfa && this.catalog.needsRendering && this.formInfo.hasXfa && !this.formInfo.hasAcroForm) { | ||
const data = this.xfaData; | ||
@@ -882,3 +905,3 @@ return (0, _util.shadow)(this, "xfaFactory", data ? new _factory.XFAFactory(data) : null); | ||
let fontFamily = descriptor.get("FontFamily"); | ||
fontFamily = fontFamily.replace(/[ ]+([0-9])/g, "$1"); | ||
fontFamily = fontFamily.replace(/[ ]+(\d)/g, "$1"); | ||
const fontWeight = descriptor.get("FontWeight"); | ||
@@ -915,3 +938,3 @@ const italicAngle = -descriptor.get("ItalicAngle"); | ||
for (const missing of missingFonts) { | ||
if (!(0, _xfa_fonts.getXfaFontWidths)(`${missing}-Regular`)) { | ||
if (!(0, _xfa_fonts.getXfaFontName)(`${missing}-Regular`)) { | ||
reallyMissingFonts.add(missing); | ||
@@ -948,11 +971,3 @@ } | ||
const name = `${missing}-${fontInfo.name}`; | ||
const widths = (0, _xfa_fonts.getXfaFontWidths)(name); | ||
const dict = new _primitives.Dict(null); | ||
dict.set("BaseFont", _primitives.Name.get(name)); | ||
dict.set("Type", _primitives.Name.get("Font")); | ||
dict.set("Subtype", _primitives.Name.get("TrueType")); | ||
dict.set("Encoding", _primitives.Name.get("WinAnsiEncoding")); | ||
const descriptor = new _primitives.Dict(null); | ||
descriptor.set("Widths", widths); | ||
dict.set("FontDescriptor", descriptor); | ||
const dict = (0, _xfa_fonts.getXfaFontDict)(name); | ||
promises.push(partialEvaluator.handleSetFont(resources, [_primitives.Name.get(name), 1], null, operatorList, task, initialState, dict, { | ||
@@ -959,0 +974,0 @@ fontFamily: missing, |
@@ -27,18 +27,30 @@ /** | ||
}); | ||
exports.HelveticaRegularLineHeight = exports.HelveticaRegularFactors = exports.HelveticaItalicLineHeight = exports.HelveticaItalicFactors = exports.HelveticaBoldLineHeight = exports.HelveticaBoldItalicLineHeight = exports.HelveticaBoldItalicFactors = exports.HelveticaBoldFactors = void 0; | ||
const HelveticaBoldFactors = [0.76116, 1, 0.99977, 1, 1, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 0.99977, 0.99977, 0.99977, 0.85148, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 0.9998, 1.00001, 1.00001, 0.99997, 0.99977, 1.00026, 0.99977, 0.99973, 1.00026, 1.00022, 0.99988, 1.00022, 1.00022, 1.00022, 1.00022, 0.99977, 0.99999, 0.99861, 0.99861, 1, 0.99977, 0.99977, 1.0006, 1.00042, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.00078, 1.0006, 0.99973, 0.99973, 0.99977, 0.99977, 0.99977, 1.00026, 1.00026, 1.00001, 1.00026, 1.00026, 1.00026, 1.00026, 0.99999, 0.99999, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1.00022, 1, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1, 1.00013, 1.00022, 1.00036, 1.00022, 1.00022, 1.00022, 1.00001, 1.00024, 0.99977, 0.9999, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 0.99984, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00022, 1.00001, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 0.99973, 0.99977, 0.99977, 1.00001, 1.00016, 1.00016, 1.00016, 1.00016, 1.00016, 1.00001, 1.00069, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1, 0.99973, 0.99982, 0.99982, 1, 0.99977, 1.00035, 0.99977, 1.00019, 0.99944, 1.00001, 1.00008, 1.00021, 0.99926, 1.00035, 1.00035, 0.99942, 1.00048, 0.99999, 0.99977, 1.00022, 1.00035, 1.00001, 0.99977, 1.00026, 0.99989, 1.00057, 1.00001, 0.99936, 1.00052, 1.00012, 0.99996, 1.00043, 1, 1.00035, 0.9994, 0.99976, 1.00035, 1.00038, 0.99971, 1.00019, 0.9994, 1.00001, 1.0006, 1.00044, 0.99973, 1.00023, 1.00047, 1, 0.99942, 0.99989, 0.99973, 1.00052, 1.00041, 1.00119, 1.00037, 0.99973, 0.99973, 1.00002, 0.99986, 1.00041, 1.00041, 0.99902, 0.9996, 1.00034, 0.99999, 1.00026, 0.99999, 1.00026, 0.99973, 1.00052, 0.99973, 1, 0.99973, 1.00041, 1.00075, 0.9994, 1.0003, 0.99999, 1, 1.00041, 0.99955, 1, 0.99915, 1.0005, 1.00026, 1.00119, 0.99955, 0.99973, 1.0006, 0.99911, 1.0006, 1.00026, 0.99972, 1.00026, 0.99902, 0.99973, 1.00035, 1, 0.99999, 1, 0.99971, 1.00047, 1.00023, 0.99973, 1.00041, 1.00041, 0.99973, 0.99977, 1, 0.99973, 1.00031, 0.99973, 0.99973, 1, 1, 1, 1, 1, 1, 1, 1.00003, 1.00003, 0.99959, 0.9999, 0.99973, 1.00026, 1.0006, 1.00077, 0.99942, 1.41144, 0.99959, 0.99959, 0.99998, 0.99998, 0.99998, 1, 1.00077, 0.99972, 0.99973, 0.99973, 0.99998, 1, 1, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 0.99973, 1.00055, 0.99999, 0.99998, 1, 0.99962, 0.99998, 1.0006, 1, 1, 1.00025, 0.99973, 1, 1.00026, 0.99973, 0.99973, 1.03374, 1.00026, 1.00024, 0.99927, 0.9995, 0.99998, 1, 1.00034, 1.06409, 1.36625, 1.41144, 0.99973, 0.99998, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1, 0.99973, 1, 0.99973, 1.00026, 0.99973, 1.00082, 0.99962, 1.00003, 0.99915, 0.99984, 1.00026, 1.00026, 1.00026, 0.99998, 0.99999, 0.99998, 0.99998, 1, 0.99999, 1, 0.99973, 1.00002, 0.99998, 0.99973, 0.99973, 0.99998, 0.99973, 1.00026, 0.99973, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 0.99998, 1, 1.00003, 1.00031, 0.99973, 0.99973, 0.99998, 0.99998, 1.00026, 1.00026, 1.00026, 1.00042, 0.99999, 0.99998, 1, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99973, 1.0006, 1.00015, 1.00027, 0.99999, 0.99999, 0.99561, 0.99999, 0.99999, 0.99977, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99973, 1.00069, 0.99973, 0.99973, 1.0006, 1.0006, 0.99973, 1.03828, 1.0006, 0.99999, 1.00003, 1.00031, 1.41144, 0.99973, 1.00003, 1.0006, 0.99972, 1.0006, 1.40579, 0.99982, 0.60299, 1, 1, 1.00003, 1.00106, 0.99867, 1.00003, 1, 1, 1.00026, 1.00026, 0.9993, 1.00026, 1.00026, 0.99973, 1, 1.00031, 1.00026, 0.99973, 0.99973, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00016, 0.99998, 1.00026, 1.00026, 1.00026, 1.00032, 1.00032, 1.00026, 1.00026, 0.99973, 1.00002, 1.00002, 1.00002, 1.40483, 0.99968, 0.99936, 1, 1.00026, 1.00026, 1.00026, 1.00026, 0.99973, 0.99998, 0.99998, 0.99972, 0.99982, 1.0006, 1, 1.00023, 0.99954, 1.00049, 1.00003, 1.06409, 1.20985, 0.99945, 1.00026, 1.00026, 1.00026, 0.99974, 1, 1, 1, 1.0006, 1.0006, 1.0006, 1.0006, 1.00087, 0.99959, 0.99959, 1.00031, 0.99959, 0.99959, 1.00025, 1.00003, 1.00056, 0.99998, 1.41144, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99999, 0.99973, 0.99973, 1.00002, 0.99998, 1.40579, 0.99988, 1, 0.99973, 1.0006, 1, 0.99953, 0.99973, 1.39713, 1.00054, 0.99998, 0.99935, 0.99998, 0.8121, 0.99998, 1.00087, 1.00026, 0.99973, 1.00002, 1.00002, 0.99998, 1, 0.99998, 1, 1.00026, 1.00026, 1.00026, 1.00026, 0.99973, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 0.99973, 0.99955, 1.0006, 0.99998, 1, 1, 1, 1, 1.00026, 0.99998, 0.99998, 1, 1.00001, 0.99561, 0.99973, 1.00041, 1, 1, 0.99998, 1, 0.99991, 1, 1.66475, 1.0006, 1, 1, 1, 1, 1.00026, 1.41144, 0.99995, 0.99995, 0.99995, 0.99995, 1.00026, 1.00026, 0.99973, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 0.99973, 0.9993, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1, 1, 1, 1, 0.99973, 0.99902]; | ||
exports.HelveticaRegularMetrics = exports.HelveticaRegularFactors = exports.HelveticaItalicMetrics = exports.HelveticaItalicFactors = exports.HelveticaBoldMetrics = exports.HelveticaBoldItalicMetrics = exports.HelveticaBoldItalicFactors = exports.HelveticaBoldFactors = void 0; | ||
const HelveticaBoldFactors = [0.76116, 1, 1, 1.0006, 0.99998, 0.99974, 0.99973, 0.99973, 0.99982, 0.99977, 1.00087, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006, 0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1, 1.00003, 1.00003, 1.00003, 1.00026, 0.9999, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006, 0.99973, 0.99977, 1.00026, 0.99999, 0.99977, 1.00022, 1.00001, 1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, 1.00001, 1.00001, 1.00026, 0.99998, 1.0006, 0.99998, 1.00003, 0.99973, 0.99998, 0.99973, 1.00026, 0.99973, 1.00026, 0.99973, 0.99998, 1.00026, 1.00026, 1.0006, 1.0006, 0.99973, 1.0006, 0.99982, 1.00026, 1.00026, 1.00026, 1.00026, 0.99959, 0.99973, 0.99998, 1.00026, 0.99973, 1.00022, 0.99973, 0.99973, 1, 0.99959, 1.00077, 0.99959, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973, 0.99973, 1.00077, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973, 1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, 0.99973, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, 1.00002, 1.00026, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1, 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, 1.0006, 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99982, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.06409, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 0.99973, 1.00026, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 1.03374, 0.99977, 1.00026, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.00042, 0.99973, 0.99973, 1.0006, 0.99977, 0.99973, 0.99973, 1.00026, 1.0006, 1.00026, 1.0006, 1.00026, 1.03828, 1.00026, 0.99999, 1.00026, 1.0006, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.9993, 0.9998, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1, 1.00016, 0.99977, 0.99959, 0.99977, 0.99959, 0.99977, 0.99959, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00026, 0.99998, 1.00026, 0.8121, 1.00026, 0.99998, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 1.00016, 1.00022, 1.00001, 0.99973, 1.00001, 1.00026, 1, 1.00026, 1, 1.00026, 1, 1.0006, 0.99973, 0.99977, 0.99973, 1, 0.99982, 1.00022, 1.00026, 1.00001, 0.99973, 1.00026, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 1.00034, 0.99977, 1, 0.99997, 1.00026, 1.00078, 1.00036, 0.99973, 1.00013, 1.0006, 0.99977, 0.99977, 0.99988, 0.85148, 1.00001, 1.00026, 0.99977, 1.00022, 1.0006, 0.99977, 1.00001, 0.99999, 0.99977, 1.00069, 1.00022, 0.99977, 1.00001, 0.99984, 1.00026, 1.00001, 1.00024, 1.00001, 0.9999, 1, 1.0006, 1.00001, 1.00041, 0.99962, 1.00026, 1.0006, 0.99995, 1.00041, 0.99942, 0.99973, 0.99927, 1.00082, 0.99902, 1.00026, 1.00087, 1.0006, 1.00069, 0.99973, 0.99867, 0.99973, 0.9993, 1.00026, 1.00049, 1.00056, 1, 0.99988, 0.99935, 0.99995, 0.99954, 1.00055, 0.99945, 1.00032, 1.0006, 0.99995, 1.00026, 0.99995, 1.00032, 1.00001, 1.00008, 0.99971, 1.00019, 0.9994, 1.00001, 1.0006, 1.00044, 0.99973, 1.00023, 1.00047, 1, 0.99942, 0.99561, 0.99989, 1.00035, 0.99977, 1.00035, 0.99977, 1.00019, 0.99944, 1.00001, 1.00021, 0.99926, 1.00035, 1.00035, 0.99942, 1.00048, 0.99999, 0.99977, 1.00022, 1.00035, 1.00001, 0.99977, 1.00026, 0.99989, 1.00057, 1.00001, 0.99936, 1.00052, 1.00012, 0.99996, 1.00043, 1, 1.00035, 0.9994, 0.99976, 1.00035, 0.99973, 1.00052, 1.00041, 1.00119, 1.00037, 0.99973, 1.00002, 0.99986, 1.00041, 1.00041, 0.99902, 0.9996, 1.00034, 0.99999, 1.00026, 0.99999, 1.00026, 0.99973, 1.00052, 0.99973, 1, 0.99973, 1.00041, 1.00075, 0.9994, 1.0003, 0.99999, 1, 1.00041, 0.99955, 1, 0.99915, 0.99973, 0.99973, 1.00026, 1.00119, 0.99955, 0.99973, 1.0006, 0.99911, 1.0006, 1.00026, 0.99972, 1.00026, 0.99902, 1.00041, 0.99973, 0.99999, 1, 1, 1.00038, 1.0005, 1.00016, 1.00022, 1.00016, 1.00022, 1.00016, 1.00022, 1.00001, 0.99973, 1, 1, 0.99973, 1, 1, 0.99955, 1.0006, 1.0006, 1.0006, 1.0006, 1, 1, 1, 0.99973, 0.99973, 0.99972, 1, 1, 1.00106, 0.99999, 0.99998, 0.99998, 0.99999, 0.99998, 1.66475, 1, 0.99973, 0.99973, 1.00023, 0.99973, 0.99971, 1.00047, 1.00023, 1, 0.99991, 0.99984, 1.00002, 1.00002, 1.00002, 1.00002, 1, 1, 1, 1, 1, 1, 1, 0.99972, 1, 1.20985, 1.39713, 1.00003, 1.00031, 1.00015, 1, 0.99561, 1.00027, 1.00031, 1.00031, 0.99915, 1.00031, 1.00031, 0.99999, 1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579, 1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026, 1.00026, 0.99972, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1, 0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1, 1, 1, 1, 1, 1, 0.99998, 0.99998, 0.99998, 0.99998, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; | ||
exports.HelveticaBoldFactors = HelveticaBoldFactors; | ||
const HelveticaBoldLineHeight = 1.2; | ||
exports.HelveticaBoldLineHeight = HelveticaBoldLineHeight; | ||
const HelveticaBoldItalicFactors = [0.76116, 1, 0.99977, 1, 1, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 0.99977, 0.99977, 0.99977, 0.91155, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 0.9998, 1.00001, 1.00001, 1, 0.99977, 1.00026, 0.99977, 0.99973, 1.00026, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 0.99977, 0.99999, 0.99861, 0.99861, 1, 0.99977, 0.99977, 1.0006, 0.99971, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99969, 1.0006, 0.99973, 0.99973, 0.99977, 0.99977, 0.99977, 1.00026, 1.00026, 1.00001, 1.00026, 1.00026, 1.00026, 1.00026, 0.99999, 0.99999, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1.00022, 1, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1, 0.9998, 1.00022, 0.99972, 1.00022, 1.00022, 1.00022, 1.00001, 0.99968, 1.00032, 1.00047, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 0.99944, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00022, 1.00001, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 0.99981, 0.99977, 0.99977, 1.00001, 1.00016, 1.00016, 1.00016, 1.00016, 1.00016, 1.00001, 0.99966, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1, 0.99973, 0.99982, 0.99982, 1, 0.99977, 0.99999, 0.99977, 1.00038, 0.99977, 1.00001, 1.00001, 0.99973, 1.00066, 0.99967, 0.99967, 1.00041, 0.99998, 0.99999, 0.99977, 1.00022, 0.99967, 1.00001, 0.99977, 1.00026, 0.99964, 1.00031, 1.00001, 0.99999, 0.99999, 1, 1.00023, 1, 1, 0.99999, 1.00035, 1.00001, 0.99999, 0.99966, 1.00029, 1.00038, 1.00035, 1.00001, 1.0006, 1.0006, 0.99973, 0.99978, 1.00001, 1.00057, 0.99989, 0.99964, 0.99973, 0.99977, 0.99999, 1.00058, 0.99973, 0.99973, 0.99973, 0.99955, 0.9995, 1.00026, 1.00026, 1.00032, 0.99989, 1.00034, 0.99999, 1.00026, 1.00026, 1.00026, 0.99973, 0.45998, 0.99973, 1.00026, 0.99973, 1.00001, 0.99999, 0.99982, 0.99994, 0.99996, 1, 1.00042, 1.00044, 1.00029, 1.00023, 1.00044, 1.00026, 0.99949, 1.00002, 0.99973, 1.0006, 1.0006, 1.0006, 0.99975, 1.00026, 1.00026, 1.00032, 0.99973, 0.99967, 1, 1.00026, 1, 0.99971, 0.99978, 1, 0.99973, 0.99981, 0.99981, 0.99973, 0.99977, 1, 0.99973, 1.00031, 0.99973, 0.99973, 1.00049, 1, 1.00098, 1, 1, 1, 1, 1.00003, 1.00003, 0.99959, 0.9999, 0.99973, 1.00026, 1.0006, 1.00077, 1.00064, 1.41144, 0.99959, 0.99959, 0.99998, 0.99998, 0.99998, 1, 1.00077, 0.99972, 0.99973, 0.99973, 0.99998, 1, 1, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 0.99973, 1.00063, 0.99999, 0.99998, 1, 0.99962, 0.99998, 1.0006, 1, 1, 1.00025, 0.99973, 1, 1.00026, 0.99973, 0.99973, 1.0044, 1.00026, 1.00024, 0.99942, 0.9995, 0.99998, 1, 0.99998, 1.06409, 1.36625, 1.41144, 0.99973, 0.99998, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1, 0.99973, 1, 0.99973, 1.00026, 0.99973, 1.00101, 1.00101, 1.00003, 0.99915, 0.99984, 1.00026, 1.00026, 1.00026, 0.99998, 0.99999, 0.99998, 0.99998, 1, 0.99999, 1, 0.99973, 1.00002, 0.99998, 0.99973, 0.99973, 0.99998, 0.99973, 1.00026, 0.99973, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 0.99998, 1, 1.00003, 1.00031, 0.99973, 0.99973, 0.99998, 0.99998, 1.00026, 1.00026, 1.00026, 1.00042, 0.99999, 0.99998, 1, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99973, 1.0006, 1.00015, 1.00027, 0.99999, 0.99999, 0.99561, 0.99999, 0.99999, 0.99977, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99973, 1.00014, 0.99973, 0.99973, 1.0006, 1.0006, 0.99973, 1.01011, 1.0006, 0.99999, 1.00003, 1.00031, 1.41144, 0.99973, 1.00003, 1.0006, 0.99972, 1.0006, 1.40579, 0.99982, 0.60299, 1, 1, 1.00003, 1.00106, 1.01322, 1.00003, 1, 1, 1.00026, 1.00026, 0.9993, 1.00026, 1.00026, 0.99973, 1, 1.00031, 1.00026, 0.99973, 0.99973, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00016, 0.99998, 1.00026, 1.00026, 1.00026, 0.99943, 0.99943, 1.00026, 1.00026, 0.99973, 1.00002, 1.00002, 1.00002, 1.40483, 0.99968, 0.99936, 1, 1.00026, 1.00026, 1.00026, 1.00026, 0.99973, 0.99998, 0.99998, 0.99972, 0.99982, 1.0006, 1, 1, 1.00055, 1.00012, 1.00003, 1.06409, 1.20985, 1.00007, 1.00026, 1.00026, 1.00026, 0.99974, 1, 1, 1, 1.0006, 1.0006, 1.0006, 1.0006, 1.00087, 0.99959, 0.99959, 1.00031, 0.99959, 0.99959, 1.00025, 1.00003, 0.99923, 0.99998, 1.41144, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99999, 0.99973, 0.99973, 1.00002, 0.99998, 1.40579, 1.00064, 1, 0.99973, 1.0006, 1, 0.99953, 0.99973, 1.39713, 1.00054, 0.99998, 1.00076, 0.99998, 0.8121, 0.99998, 1.00069, 1.00026, 0.99973, 1.00002, 1.00002, 0.99998, 1, 0.99998, 1, 1.00026, 1.00026, 1.00026, 1.00026, 0.99973, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 0.99973, 0.99955, 1.0006, 0.99998, 1, 1, 1, 1, 1.00026, 0.99998, 0.99998, 1, 1.00001, 0.99967, 0.99973, 0.98685, 1, 1, 0.99998, 1, 0.99991, 1, 1.66475, 1.0006, 1, 1, 1, 1, 1.00026, 1.41144, 0.99948, 0.99948, 0.99948, 0.99948, 1.00026, 1.00026, 0.99973, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 0.99973, 1.00065, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1, 1, 1, 1, 0.99973, 1.00061]; | ||
const HelveticaBoldMetrics = { | ||
lineHeight: 1.2, | ||
lineGap: 0.2 | ||
}; | ||
exports.HelveticaBoldMetrics = HelveticaBoldMetrics; | ||
const HelveticaBoldItalicFactors = [0.76116, 1, 1, 1.0006, 0.99998, 0.99974, 0.99973, 0.99973, 0.99982, 0.99977, 1.00087, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006, 0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1, 1.00003, 1.00003, 1.00003, 1.00026, 0.9999, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006, 0.99973, 0.99977, 1.00026, 0.99999, 0.99977, 1.00022, 1.00001, 1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, 1.00001, 1.00001, 1.00026, 0.99998, 1.0006, 0.99998, 1.00003, 0.99973, 0.99998, 0.99973, 1.00026, 0.99973, 1.00026, 0.99973, 0.99998, 1.00026, 1.00026, 1.0006, 1.0006, 0.99973, 1.0006, 0.99982, 1.00026, 1.00026, 1.00026, 1.00026, 0.99959, 0.99973, 0.99998, 1.00026, 0.99973, 1.00022, 0.99973, 0.99973, 1, 0.99959, 1.00077, 0.99959, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973, 0.99973, 1.00077, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973, 1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, 0.99973, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, 1.00002, 1.00026, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1, 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, 1.0006, 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99982, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.06409, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 0.99973, 1.00026, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 1.0044, 0.99977, 1.00026, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99971, 0.99973, 0.99973, 1.0006, 0.99977, 0.99973, 0.99973, 1.00026, 1.0006, 1.00026, 1.0006, 1.00026, 1.01011, 1.00026, 0.99999, 1.00026, 1.0006, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.9993, 0.9998, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1, 1.00016, 0.99977, 0.99959, 0.99977, 0.99959, 0.99977, 0.99959, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00026, 0.99998, 1.00026, 0.8121, 1.00026, 0.99998, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 1.00016, 1.00022, 1.00001, 0.99973, 1.00001, 1.00026, 1, 1.00026, 1, 1.00026, 1, 1.0006, 0.99973, 0.99977, 0.99973, 1, 0.99982, 1.00022, 1.00026, 1.00001, 0.99973, 1.00026, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99977, 1, 1, 1.00026, 0.99969, 0.99972, 0.99981, 0.9998, 1.0006, 0.99977, 0.99977, 1.00022, 0.91155, 1.00001, 1.00026, 0.99977, 1.00022, 1.0006, 0.99977, 1.00001, 0.99999, 0.99977, 0.99966, 1.00022, 1.00032, 1.00001, 0.99944, 1.00026, 1.00001, 0.99968, 1.00001, 1.00047, 1, 1.0006, 1.00001, 0.99981, 1.00101, 1.00026, 1.0006, 0.99948, 0.99981, 1.00064, 0.99973, 0.99942, 1.00101, 1.00061, 1.00026, 1.00069, 1.0006, 1.00014, 0.99973, 1.01322, 0.99973, 1.00065, 1.00026, 1.00012, 0.99923, 1, 1.00064, 1.00076, 0.99948, 1.00055, 1.00063, 1.00007, 0.99943, 1.0006, 0.99948, 1.00026, 0.99948, 0.99943, 1.00001, 1.00001, 1.00029, 1.00038, 1.00035, 1.00001, 1.0006, 1.0006, 0.99973, 0.99978, 1.00001, 1.00057, 0.99989, 0.99967, 0.99964, 0.99967, 0.99977, 0.99999, 0.99977, 1.00038, 0.99977, 1.00001, 0.99973, 1.00066, 0.99967, 0.99967, 1.00041, 0.99998, 0.99999, 0.99977, 1.00022, 0.99967, 1.00001, 0.99977, 1.00026, 0.99964, 1.00031, 1.00001, 0.99999, 0.99999, 1, 1.00023, 1, 1, 0.99999, 1.00035, 1.00001, 0.99999, 0.99973, 0.99977, 0.99999, 1.00058, 0.99973, 0.99973, 0.99955, 0.9995, 1.00026, 1.00026, 1.00032, 0.99989, 1.00034, 0.99999, 1.00026, 1.00026, 1.00026, 0.99973, 0.45998, 0.99973, 1.00026, 0.99973, 1.00001, 0.99999, 0.99982, 0.99994, 0.99996, 1, 1.00042, 1.00044, 1.00029, 1.00023, 0.99973, 0.99973, 1.00026, 0.99949, 1.00002, 0.99973, 1.0006, 1.0006, 1.0006, 0.99975, 1.00026, 1.00026, 1.00032, 0.98685, 0.99973, 1.00026, 1, 1, 0.99966, 1.00044, 1.00016, 1.00022, 1.00016, 1.00022, 1.00016, 1.00022, 1.00001, 0.99973, 1, 1, 0.99973, 1, 1, 0.99955, 1.0006, 1.0006, 1.0006, 1.0006, 1, 1, 1, 0.99973, 0.99973, 0.99972, 1, 1, 1.00106, 0.99999, 0.99998, 0.99998, 0.99999, 0.99998, 1.66475, 1, 0.99973, 0.99973, 1, 0.99973, 0.99971, 0.99978, 1, 1, 0.99991, 0.99984, 1.00002, 1.00002, 1.00002, 1.00002, 1.00098, 1, 1, 1, 1.00049, 1, 1, 0.99972, 1, 1.20985, 1.39713, 1.00003, 1.00031, 1.00015, 1, 0.99561, 1.00027, 1.00031, 1.00031, 0.99915, 1.00031, 1.00031, 0.99999, 1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579, 1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026, 1.00026, 0.99972, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1, 0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1, 1, 1, 1, 1, 1, 0.99998, 0.99998, 0.99998, 0.99998, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; | ||
exports.HelveticaBoldItalicFactors = HelveticaBoldItalicFactors; | ||
const HelveticaBoldItalicLineHeight = 1.35; | ||
exports.HelveticaBoldItalicLineHeight = HelveticaBoldItalicLineHeight; | ||
const HelveticaItalicFactors = [0.76116, 1, 1.00001, 1, 1, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 0.99977, 0.99977, 0.99977, 0.91221, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 0.9998, 1.00001, 1.00001, 1.00054, 0.99977, 0.99977, 0.99977, 0.99973, 1.00026, 1.00022, 0.99945, 1.00022, 1.00022, 1.00022, 1.00022, 0.99977, 0.99999, 0.99861, 0.99861, 1, 0.99977, 0.99977, 1.0006, 0.99946, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.00084, 1.0006, 1, 1, 1.00001, 1.00001, 1.00001, 0.99973, 0.99973, 1.00001, 0.99973, 0.99973, 0.99973, 0.99973, 0.99999, 0.99999, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1.00022, 1, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1, 1.00013, 1.00022, 1.00007, 1.00022, 1.00022, 1.00022, 1.00001, 1.0001, 1.00054, 1.00052, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00065, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00022, 1.00001, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 0.99973, 0.99977, 0.99977, 1.00001, 1.00016, 1.00016, 1.00016, 1.00016, 1.00016, 1.00001, 0.99933, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1, 0.99973, 0.99982, 0.99982, 1, 1.00001, 1.00019, 1.00001, 1.0001, 0.99986, 1.00001, 1.00001, 1.00001, 1.00038, 0.99954, 0.99954, 0.9994, 1.00066, 0.99999, 0.99977, 1.00022, 1.00054, 1.00001, 0.99977, 1.00026, 0.99975, 1.0001, 1.00001, 0.99993, 0.9995, 0.99955, 1.00016, 0.99978, 0.99974, 1.00019, 1.00022, 0.99955, 1.00053, 0.99962, 1.00027, 1.0001, 1.00068, 1.00001, 1.0006, 1.0006, 1, 1.00008, 0.99957, 0.99972, 0.9994, 0.99975, 0.99973, 1.00089, 1.00005, 0.99967, 1.00048, 0.99973, 0.99973, 1.00002, 1.00034, 0.99973, 0.99973, 0.99964, 1.00006, 1.00066, 0.99947, 0.99973, 0.98894, 0.99973, 1, 0.44898, 1, 0.99946, 1, 1.00039, 1.00082, 0.99991, 0.99991, 0.99985, 1.00022, 1.00023, 1.00061, 1.00006, 0.99966, 0.99895, 0.99973, 1.00019, 1.0008, 1, 0.99924, 0.99924, 0.99924, 0.99983, 1.00044, 0.99973, 0.99964, 1, 1.00051, 1, 0.99973, 1, 1.00423, 0.99925, 0.99999, 0.99973, 0.99945, 0.99945, 0.99973, 1.00001, 1, 0.99973, 1.00031, 0.99973, 0.99973, 1, 1, 1.00049, 1.00245, 1, 1, 1, 0.99949, 1.00003, 0.99959, 0.99987, 0.99973, 0.99973, 1.0006, 1.0009, 0.99949, 1.41144, 1.00005, 1.00005, 1.0006, 1.0006, 0.99998, 1, 1.0009, 0.99972, 1, 1, 0.99998, 1, 1, 1, 1, 1, 1, 0.99998, 0.99973, 1.00019, 0.99999, 0.99998, 1, 0.99962, 1.0006, 1.0006, 1, 1, 1.00025, 0.99973, 1, 0.99973, 0.99973, 0.99973, 1.0288, 0.99973, 1.00024, 1.0006, 0.9995, 0.99998, 1, 0.99998, 1.06409, 1.36625, 1.41144, 0.99973, 0.99998, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1, 0.99973, 1, 0.99973, 0.99973, 0.99973, 0.99897, 0.99897, 1.00003, 1.00003, 0.99984, 0.99968, 0.99968, 0.99973, 1.0006, 1, 0.99998, 1.0006, 1, 0.99999, 1, 0.99973, 1.00002, 0.99998, 0.99973, 0.99973, 0.99998, 0.99973, 0.99973, 1, 0.99973, 0.99973, 0.99973, 0.99973, 1.00026, 0.99998, 1, 1.00003, 1.00031, 0.99973, 0.99973, 0.99998, 0.99998, 0.99973, 0.99973, 0.99973, 1.00042, 0.99999, 0.99998, 1, 0.99924, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.00034, 1.0006, 1.00015, 1.00027, 0.99999, 0.99999, 1.00035, 0.99999, 0.99999, 0.99977, 0.99924, 0.99924, 0.99924, 0.99924, 0.99924, 1.0006, 0.99924, 0.99924, 1, 1, 1, 1, 0.99924, 0.99924, 0.99962, 1.06311, 0.99924, 1.00024, 1.00003, 1.00031, 1.41144, 0.99973, 1.00003, 0.99924, 0.95317, 0.99924, 1.40579, 0.99999, 0.60299, 1, 1, 1.00003, 1.00267, 1.01487, 1.00003, 1, 1, 0.99973, 0.99973, 1.00041, 0.99973, 0.99973, 0.99973, 1, 1.00031, 0.99973, 1, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.00016, 0.99998, 0.99973, 0.99973, 0.99973, 1.00025, 1.00025, 0.99973, 0.99973, 0.99973, 1.00002, 1.00002, 1.00002, 1.40483, 0.99968, 0.99936, 1, 1.00026, 1.00026, 0.99973, 0.99973, 0.9998, 0.99998, 0.99998, 0.96329, 0.99982, 1.0006, 1, 1.00023, 0.99947, 1.00012, 1.00003, 1.06409, 1.20985, 1.00063, 0.99973, 0.99973, 1.00026, 1.00006, 0.99998, 0.99998, 0.99998, 0.99924, 0.99924, 0.99924, 0.99924, 1.00043, 0.99998, 0.99998, 0.8254, 0.99998, 0.99998, 1.00025, 1.00003, 1.00043, 0.99998, 1.41144, 1, 1, 1, 1, 1, 1, 0.99999, 0.99973, 0.99973, 1.00002, 0.99998, 1.40579, 0.99995, 1, 0.99973, 1.0006, 1, 0.99953, 0.99973, 1.39713, 1.00054, 1.0006, 0.99994, 1.0006, 0.89547, 1.0006, 0.99911, 0.99973, 0.99973, 1.00002, 1.00002, 0.99998, 1, 0.99998, 1, 1.00026, 1.00026, 1.00026, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99955, 1.0006, 0.99998, 1, 1, 1, 1, 1.00026, 1.0006, 0.99998, 1, 1.00001, 0.99954, 0.99973, 0.98332, 1, 1, 0.99998, 1, 0.99991, 1, 1.66475, 1.0006, 1, 1, 1, 1, 0.99973, 1.41144, 1.00036, 1.00036, 1.00036, 1.00036, 0.99973, 0.99973, 1, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1, 1.0005, 1, 1, 1, 1, 0.99973, 1, 1, 1, 1, 1, 0.99973, 0.99918]; | ||
const HelveticaBoldItalicMetrics = { | ||
lineHeight: 1.35, | ||
lineGap: 0.2 | ||
}; | ||
exports.HelveticaBoldItalicMetrics = HelveticaBoldItalicMetrics; | ||
const HelveticaItalicFactors = [0.76116, 1, 1, 1.0006, 1.0006, 1.00006, 0.99973, 0.99973, 0.99982, 1.00001, 1.00043, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006, 0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1, 1.00003, 1.00003, 1.00003, 0.99973, 0.99987, 1.00001, 1.00001, 0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006, 1, 1.00001, 0.99973, 0.99999, 0.99977, 1.00022, 1.00001, 1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, 1.00001, 1.00001, 1.00026, 1.0006, 1.0006, 1.0006, 0.99949, 0.99973, 0.99998, 0.99973, 0.99973, 1, 0.99973, 0.99973, 1.0006, 0.99973, 0.99973, 0.99924, 0.99924, 1, 0.99924, 0.99999, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1, 1.0006, 0.99973, 1, 0.99977, 1, 1, 1, 1.00005, 1.0009, 1.00005, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973, 0.99973, 1.0009, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973, 1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, 0.9998, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, 1.00002, 1.00026, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1, 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, 1.0006, 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99982, 1, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.06409, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 1, 0.99973, 1, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 0.99977, 1, 0.99977, 1, 0.99977, 1, 0.99977, 1, 0.99977, 1.0288, 0.99977, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99924, 1.0006, 1.0006, 0.99946, 1.00034, 1, 0.99924, 1.00001, 1, 1, 0.99973, 0.99924, 0.99973, 0.99924, 0.99973, 1.06311, 0.99973, 1.00024, 0.99973, 0.99924, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.00041, 0.9998, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1, 1.00016, 0.99977, 0.99998, 0.99977, 0.99998, 0.99977, 0.99998, 1.00001, 1, 1.00001, 1, 1.00001, 1, 1.00001, 1, 1.00026, 1.0006, 1.00026, 0.89547, 1.00026, 1.0006, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.00016, 0.99977, 1.00001, 1, 1.00001, 1.00026, 1, 1.00026, 1, 1.00026, 1, 0.99924, 0.99973, 1.00001, 0.99973, 1, 0.99982, 1.00022, 1.00026, 1.00001, 1, 1.00026, 1.0006, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 1.00001, 1, 1.00054, 0.99977, 1.00084, 1.00007, 0.99973, 1.00013, 0.99924, 1.00001, 1.00001, 0.99945, 0.91221, 1.00001, 1.00026, 0.99977, 1.00022, 1.0006, 1.00001, 1.00001, 0.99999, 0.99977, 0.99933, 1.00022, 1.00054, 1.00001, 1.00065, 1.00026, 1.00001, 1.0001, 1.00001, 1.00052, 1, 1.0006, 1.00001, 0.99945, 0.99897, 0.99968, 0.99924, 1.00036, 0.99945, 0.99949, 1, 1.0006, 0.99897, 0.99918, 0.99968, 0.99911, 0.99924, 1, 0.99962, 1.01487, 1, 1.0005, 0.99973, 1.00012, 1.00043, 1, 0.99995, 0.99994, 1.00036, 0.99947, 1.00019, 1.00063, 1.00025, 0.99924, 1.00036, 0.99973, 1.00036, 1.00025, 1.00001, 1.00001, 1.00027, 1.0001, 1.00068, 1.00001, 1.0006, 1.0006, 1, 1.00008, 0.99957, 0.99972, 0.9994, 0.99954, 0.99975, 1.00051, 1.00001, 1.00019, 1.00001, 1.0001, 0.99986, 1.00001, 1.00001, 1.00038, 0.99954, 0.99954, 0.9994, 1.00066, 0.99999, 0.99977, 1.00022, 1.00054, 1.00001, 0.99977, 1.00026, 0.99975, 1.0001, 1.00001, 0.99993, 0.9995, 0.99955, 1.00016, 0.99978, 0.99974, 1.00019, 1.00022, 0.99955, 1.00053, 0.99973, 1.00089, 1.00005, 0.99967, 1.00048, 0.99973, 1.00002, 1.00034, 0.99973, 0.99973, 0.99964, 1.00006, 1.00066, 0.99947, 0.99973, 0.98894, 0.99973, 1, 0.44898, 1, 0.99946, 1, 1.00039, 1.00082, 0.99991, 0.99991, 0.99985, 1.00022, 1.00023, 1.00061, 1.00006, 0.99966, 0.99973, 0.99973, 0.99973, 1.00019, 1.0008, 1, 0.99924, 0.99924, 0.99924, 0.99983, 1.00044, 0.99973, 0.99964, 0.98332, 1, 0.99973, 1, 1, 0.99962, 0.99895, 1.00016, 0.99977, 1.00016, 0.99977, 1.00016, 0.99977, 1.00001, 1, 1, 1, 0.99973, 1, 1, 0.99955, 0.99924, 0.99924, 0.99924, 0.99924, 0.99998, 0.99998, 0.99998, 0.99973, 0.99973, 0.99972, 1, 1, 1.00267, 0.99999, 0.99998, 0.99998, 1, 0.99998, 1.66475, 1, 0.99973, 0.99973, 1.00023, 0.99973, 1.00423, 0.99925, 0.99999, 1, 0.99991, 0.99984, 1.00002, 1.00002, 1.00002, 1.00002, 1.00049, 1, 1.00245, 1, 1, 1, 1, 0.96329, 1, 1.20985, 1.39713, 1.00003, 0.8254, 1.00015, 1, 1.00035, 1.00027, 1.00031, 1.00031, 1.00003, 1.00031, 1.00031, 0.99999, 1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579, 1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026, 1.00026, 0.95317, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1, 0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1, 1, 1, 1, 1, 1, 0.99998, 0.99998, 0.99998, 0.99998, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; | ||
exports.HelveticaItalicFactors = HelveticaItalicFactors; | ||
const HelveticaItalicLineHeight = 1.35; | ||
exports.HelveticaItalicLineHeight = HelveticaItalicLineHeight; | ||
const HelveticaRegularFactors = [0.76116, 1, 1.00001, 1, 1, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 0.99928, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 0.99977, 0.99977, 0.99977, 0.91621, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 0.9998, 1.00001, 1.00001, 0.99977, 0.99977, 1.00013, 0.99977, 0.99973, 1.00026, 1.00022, 1.0004, 1.00022, 1.00022, 1.00022, 1.00022, 0.99977, 0.99999, 0.99861, 0.99861, 1, 0.99977, 0.99977, 1.0006, 1.00019, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.00055, 1.0006, 1, 1, 1.00001, 1.00001, 1.00001, 0.99973, 0.99973, 1.00005, 0.99973, 0.99973, 0.99973, 0.99973, 0.99999, 0.99999, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1.00022, 1, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1, 0.99941, 1.00022, 0.99947, 1.00022, 1.00022, 1.00022, 1.00001, 1.00019, 0.99977, 0.99946, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 0.99973, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00022, 1.00001, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 0.99945, 0.99977, 0.99977, 1.00001, 1.00016, 1.00016, 1.00016, 1.00016, 1.00016, 1.00001, 1.00015, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 0.99973, 0.99982, 0.99982, 1, 1.00001, 0.99962, 1.00001, 1.00092, 0.99964, 1.00001, 0.99928, 0.99963, 0.99999, 1.00035, 1.00035, 1.00082, 0.99962, 0.99999, 0.99977, 1.00022, 1.00035, 1.00001, 0.99977, 1.00026, 0.9996, 0.99967, 1.00001, 1.00034, 1.00074, 1.00054, 1.00053, 1.00063, 0.99971, 0.99962, 1.00035, 0.99975, 0.99977, 1.00047, 1.00029, 1.00092, 1.00035, 1.00001, 1.0006, 1.0006, 1, 0.99988, 0.99975, 1, 1.00082, 0.9996, 0.99973, 1.00043, 0.99953, 1.0007, 0.99915, 0.99973, 0.99973, 1.00008, 0.99892, 1.00073, 1.00073, 1.00114, 0.99915, 1.00073, 0.99955, 0.99973, 1.00092, 0.99973, 1, 0.99998, 1, 1.0003, 1, 1.00043, 1.00001, 0.99969, 1.0003, 1, 1.00035, 1.00001, 0.9995, 1, 1.00092, 0.99968, 0.99973, 1.0007, 0.9995, 1, 0.99924, 1.0006, 0.99924, 0.99972, 1.00062, 0.99973, 1.00114, 1, 1.00035, 1, 0.99955, 1, 0.99971, 0.99925, 1.00023, 0.99973, 0.99978, 0.99978, 0.99973, 1.00001, 1, 0.99973, 1.00031, 0.99973, 0.99973, 1, 1, 1, 1, 1, 1, 1, 0.99949, 1.00003, 0.99959, 0.99987, 0.99973, 0.99973, 1.0006, 1.0009, 0.99966, 1.41144, 1.00005, 1.00005, 1.0006, 1.0006, 0.99998, 1.0009, 0.99972, 1, 1, 0.99998, 1, 1, 1, 1, 0.99998, 0.99973, 1.00019, 0.99999, 0.99998, 0.99962, 1.0006, 1.0006, 1.00025, 0.99973, 0.99973, 0.99973, 0.99973, 1.04596, 0.99973, 1.00024, 1.00065, 0.9995, 0.99998, 0.99998, 1.06409, 1.36625, 1.41144, 0.99973, 0.99998, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1, 0.99973, 1, 0.99973, 0.99973, 0.99973, 1.00045, 1.00045, 1.00003, 0.99915, 0.99984, 0.99973, 0.99973, 0.99973, 1.0006, 1, 0.99998, 1.0006, 1, 0.99999, 1, 0.99973, 1.00002, 0.99973, 0.99973, 0.99973, 0.99973, 1, 0.99973, 0.99973, 0.99973, 0.99973, 1.00026, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.99998, 1.00003, 1.00031, 0.99973, 0.99973, 0.99998, 0.99998, 0.99973, 0.99973, 0.99973, 1.00042, 0.99999, 0.99998, 0.99924, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.00034, 1.0006, 1.00015, 1.00027, 0.99999, 0.99999, 1.00035, 0.99999, 0.99999, 0.99977, 0.99924, 0.99924, 0.99924, 0.99924, 0.99924, 1.0006, 0.99924, 0.99924, 1, 1, 1, 1, 0.99924, 0.99924, 1, 1.02572, 0.99924, 1.00005, 1.00003, 1.00031, 1.41144, 0.99973, 1.00003, 0.99924, 0.95317, 0.99924, 1.40579, 0.99999, 0.60299, 1, 1, 1.00003, 1.00267, 0.96499, 1.00003, 1, 1, 0.99973, 0.99973, 0.99999, 0.99973, 0.99973, 0.99973, 1, 1.00031, 0.99973, 1, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.00016, 0.99998, 0.99973, 0.99973, 0.99973, 1.00031, 1.00031, 0.99973, 0.99973, 0.99973, 1.00002, 1.00002, 1.00002, 1.40483, 0.99968, 0.99936, 1, 1.00026, 1.00026, 0.99973, 0.99973, 0.9998, 0.99998, 0.99998, 0.96329, 0.99982, 1.0006, 1, 1.00023, 0.99933, 1.00008, 1.00003, 1.06409, 1.20985, 1.00015, 0.99973, 0.99973, 1.00026, 1.00006, 0.99998, 0.99998, 0.99998, 0.99924, 0.99924, 0.99924, 0.99924, 1.00043, 0.99998, 0.99998, 0.8254, 0.99998, 0.99998, 1.00025, 1.00003, 1.00027, 0.99998, 1.41144, 1, 1, 1, 1, 1, 1, 0.99999, 0.99973, 0.99973, 1.00002, 1.40579, 0.9997, 1, 0.99973, 1.0006, 1, 0.99953, 0.99973, 1.39713, 1.00054, 1.0006, 0.99995, 1.0006, 0.84533, 1.0006, 0.99973, 0.99973, 0.99973, 1.00002, 1.00002, 0.99998, 0.99998, 1, 1.00026, 1.00026, 1.00026, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99955, 1.0006, 0.99998, 1, 1, 1, 1, 1.00026, 1.0006, 0.99998, 1, 1.00001, 0.99561, 0.99973, 1.00073, 1, 1, 0.99998, 1, 1, 1, 1, 1, 0.99991, 1, 1.66475, 1.0006, 1, 1, 1, 1, 1, 0.99973, 1.41144, 1.00023, 1.00023, 1.00023, 1.00023, 0.99973, 0.99973, 1, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1, 1.00055, 1, 1, 1, 1, 0.99973, 1, 1, 1, 1, 1, 0.99973, 1.00019]; | ||
const HelveticaItalicMetrics = { | ||
lineHeight: 1.35, | ||
lineGap: 0.2 | ||
}; | ||
exports.HelveticaItalicMetrics = HelveticaItalicMetrics; | ||
const HelveticaRegularFactors = [0.76116, 1, 1, 1.0006, 1.0006, 1.00006, 0.99973, 0.99973, 0.99982, 1.00001, 1.00043, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006, 0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1, 1.00003, 1.00003, 1.00003, 0.99973, 0.99987, 1.00001, 1.00001, 0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006, 1, 1.00001, 0.99973, 0.99999, 0.99977, 1.00022, 1.00001, 1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, 1.00001, 1.00001, 1.00026, 1.0006, 1.0006, 1.0006, 0.99949, 0.99973, 0.99998, 0.99973, 0.99973, 1, 0.99973, 0.99973, 1.0006, 0.99973, 0.99973, 0.99924, 0.99924, 1, 0.99924, 0.99999, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1, 1.0006, 0.99973, 1, 0.99977, 1, 1, 1, 1.00005, 1.0009, 1.00005, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973, 0.99973, 1.0009, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973, 1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, 0.9998, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, 1.00002, 1.00026, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1, 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, 1.0006, 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99982, 1, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.06409, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 1, 0.99973, 1, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 0.99977, 1, 0.99977, 1, 0.99977, 1, 0.99977, 1, 0.99977, 1.04596, 0.99977, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99924, 1.0006, 1.0006, 1.00019, 1.00034, 1, 0.99924, 1.00001, 1, 1, 0.99973, 0.99924, 0.99973, 0.99924, 0.99973, 1.02572, 0.99973, 1.00005, 0.99973, 0.99924, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99999, 0.9998, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1, 1.00016, 0.99977, 0.99998, 0.99977, 0.99998, 0.99977, 0.99998, 1.00001, 1, 1.00001, 1, 1.00001, 1, 1.00001, 1, 1.00026, 1.0006, 1.00026, 0.84533, 1.00026, 1.0006, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.00016, 0.99977, 1.00001, 1, 1.00001, 1.00026, 1, 1.00026, 1, 1.00026, 1, 0.99924, 0.99973, 1.00001, 0.99973, 1, 0.99982, 1.00022, 1.00026, 1.00001, 1, 1.00026, 1.0006, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99928, 1, 0.99977, 1.00013, 1.00055, 0.99947, 0.99945, 0.99941, 0.99924, 1.00001, 1.00001, 1.0004, 0.91621, 1.00001, 1.00026, 0.99977, 1.00022, 1.0006, 1.00001, 1.00005, 0.99999, 0.99977, 1.00015, 1.00022, 0.99977, 1.00001, 0.99973, 1.00026, 1.00001, 1.00019, 1.00001, 0.99946, 1, 1.0006, 1.00001, 0.99978, 1.00045, 0.99973, 0.99924, 1.00023, 0.99978, 0.99966, 1, 1.00065, 1.00045, 1.00019, 0.99973, 0.99973, 0.99924, 1, 1, 0.96499, 1, 1.00055, 0.99973, 1.00008, 1.00027, 1, 0.9997, 0.99995, 1.00023, 0.99933, 1.00019, 1.00015, 1.00031, 0.99924, 1.00023, 0.99973, 1.00023, 1.00031, 1.00001, 0.99928, 1.00029, 1.00092, 1.00035, 1.00001, 1.0006, 1.0006, 1, 0.99988, 0.99975, 1, 1.00082, 0.99561, 0.9996, 1.00035, 1.00001, 0.99962, 1.00001, 1.00092, 0.99964, 1.00001, 0.99963, 0.99999, 1.00035, 1.00035, 1.00082, 0.99962, 0.99999, 0.99977, 1.00022, 1.00035, 1.00001, 0.99977, 1.00026, 0.9996, 0.99967, 1.00001, 1.00034, 1.00074, 1.00054, 1.00053, 1.00063, 0.99971, 0.99962, 1.00035, 0.99975, 0.99977, 0.99973, 1.00043, 0.99953, 1.0007, 0.99915, 0.99973, 1.00008, 0.99892, 1.00073, 1.00073, 1.00114, 0.99915, 1.00073, 0.99955, 0.99973, 1.00092, 0.99973, 1, 0.99998, 1, 1.0003, 1, 1.00043, 1.00001, 0.99969, 1.0003, 1, 1.00035, 1.00001, 0.9995, 1, 1.00092, 0.99973, 0.99973, 0.99973, 1.0007, 0.9995, 1, 0.99924, 1.0006, 0.99924, 0.99972, 1.00062, 0.99973, 1.00114, 1.00073, 1, 0.99955, 1, 1, 1.00047, 0.99968, 1.00016, 0.99977, 1.00016, 0.99977, 1.00016, 0.99977, 1.00001, 1, 1, 1, 0.99973, 1, 1, 0.99955, 0.99924, 0.99924, 0.99924, 0.99924, 0.99998, 0.99998, 0.99998, 0.99973, 0.99973, 0.99972, 1, 1, 1.00267, 0.99999, 0.99998, 0.99998, 1, 0.99998, 1.66475, 1, 0.99973, 0.99973, 1.00023, 0.99973, 0.99971, 0.99925, 1.00023, 1, 0.99991, 0.99984, 1.00002, 1.00002, 1.00002, 1.00002, 1, 1, 1, 1, 1, 1, 1, 0.96329, 1, 1.20985, 1.39713, 1.00003, 0.8254, 1.00015, 1, 1.00035, 1.00027, 1.00031, 1.00031, 0.99915, 1.00031, 1.00031, 0.99999, 1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579, 1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026, 1.00026, 0.95317, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1, 0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; | ||
exports.HelveticaRegularFactors = HelveticaRegularFactors; | ||
const HelveticaRegularLineHeight = 1.2; | ||
exports.HelveticaRegularLineHeight = HelveticaRegularLineHeight; | ||
const HelveticaRegularMetrics = { | ||
lineHeight: 1.2, | ||
lineGap: 0.2 | ||
}; | ||
exports.HelveticaRegularMetrics = HelveticaRegularMetrics; |
@@ -39,3 +39,5 @@ /** | ||
if (!options || !options.onlyRefs) { | ||
this._onlyRefs = (options && options.onlyRefs) === true; | ||
if (!this._onlyRefs) { | ||
this._nameRefMap = new Map(); | ||
@@ -49,2 +51,6 @@ this._imageMap = new Map(); | ||
getByName(name) { | ||
if (this._onlyRefs) { | ||
(0, _util.unreachable)("Should not call `getByName` method."); | ||
} | ||
const ref = this._nameRefMap.get(name); | ||
@@ -136,6 +142,2 @@ | ||
getByName(name) { | ||
(0, _util.unreachable)("Should not call `getByName` method."); | ||
} | ||
set(name = null, ref, data) { | ||
@@ -187,24 +189,18 @@ if (!ref) { | ||
class LocalTilingPatternCache extends BaseLocalCache { | ||
set(name, ref = null, data) { | ||
if (typeof name !== "string") { | ||
throw new Error('LocalTilingPatternCache.set - expected "name" argument.'); | ||
} | ||
constructor(options) { | ||
super({ | ||
onlyRefs: true | ||
}); | ||
} | ||
if (ref) { | ||
if (this._imageCache.has(ref)) { | ||
return; | ||
} | ||
this._nameRefMap.set(name, ref); | ||
this._imageCache.put(ref, data); | ||
return; | ||
set(name = null, ref, data) { | ||
if (!ref) { | ||
throw new Error('LocalTilingPatternCache.set - expected "ref" argument.'); | ||
} | ||
if (this._imageMap.has(name)) { | ||
if (this._imageCache.has(ref)) { | ||
return; | ||
} | ||
this._imageMap.set(name, data); | ||
this._imageCache.put(ref, data); | ||
} | ||
@@ -211,0 +207,0 @@ |
@@ -141,3 +141,3 @@ /** | ||
this.height = height; | ||
this.interpolate = dict.get("Interpolate", "I") || false; | ||
this.interpolate = dict.get("Interpolate", "I"); | ||
this.imageMask = dict.get("ImageMask", "IM") || false; | ||
@@ -287,3 +287,4 @@ this.matte = dict.get("Matte") || false; | ||
imageIsFromDecodeStream, | ||
inverseDecode | ||
inverseDecode, | ||
interpolate | ||
}) { | ||
@@ -318,3 +319,4 @@ const computedLength = (width + 7 >> 3) * height; | ||
width, | ||
height | ||
height, | ||
interpolate | ||
}; | ||
@@ -549,2 +551,3 @@ } | ||
height: drawHeight, | ||
interpolate: this.interpolate, | ||
kind: 0, | ||
@@ -551,0 +554,0 @@ data: null |
@@ -39,3 +39,3 @@ /** | ||
constructor(msg) { | ||
super(`JBIG2 error: ${msg}`); | ||
super(`JBIG2 error: ${msg}`, "Jbig2Error"); | ||
} | ||
@@ -42,0 +42,0 @@ |
@@ -35,3 +35,3 @@ /** | ||
constructor(msg) { | ||
super(`JPEG error: ${msg}`); | ||
super(`JPEG error: ${msg}`, "JpegError"); | ||
} | ||
@@ -43,3 +43,3 @@ | ||
constructor(message, scanLines) { | ||
super(message); | ||
super(message, "DNLMarkerError"); | ||
this.scanLines = scanLines; | ||
@@ -50,4 +50,9 @@ } | ||
class EOIMarkerError extends _util.BaseException {} | ||
class EOIMarkerError extends _util.BaseException { | ||
constructor(msg) { | ||
super(msg, "EOIMarkerError"); | ||
} | ||
} | ||
const dctZigZag = new Uint8Array([0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63]); | ||
@@ -54,0 +59,0 @@ const dctCos1 = 4017; |
@@ -27,10 +27,18 @@ /** | ||
}); | ||
exports.LiberationSansRegularWidths = exports.LiberationSansItalicWidths = exports.LiberationSansBoldWidths = exports.LiberationSansBoldItalicWidths = void 0; | ||
const LiberationSansBoldWidths = [365, 0, 722, 1000, 1000, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 667, 722, 722, 722, 719, 667, 667, 667, 667, 667, 667, 667, 667, 667, 723, 667, 667, 853, 722, 906, 722, 556, 611, 778, 601, 778, 778, 778, 778, 722, 604, 354, 354, 604, 722, 722, 278, 785, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 474, 278, 556, 556, 722, 722, 722, 611, 611, 667, 611, 611, 611, 611, 833, 833, 722, 722, 722, 722, 722, 722, 778, 1000, 778, 778, 778, 778, 778, 778, 778, 802, 838, 778, 825, 778, 778, 778, 667, 821, 722, 809, 778, 722, 722, 722, 722, 667, 667, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 667, 667, 667, 667, 667, 600, 611, 611, 611, 611, 611, 778, 667, 722, 722, 722, 722, 722, 722, 722, 722, 722, 667, 667, 927, 722, 722, 667, 944, 944, 944, 944, 944, 667, 644, 667, 667, 667, 667, 667, 611, 611, 611, 611, 611, 556, 556, 556, 556, 333, 333, 556, 889, 889, 1000, 722, 719, 722, 567, 712, 667, 669, 904, 626, 719, 719, 610, 702, 833, 722, 778, 719, 667, 722, 611, 622, 854, 667, 730, 703, 1005, 1019, 870, 979, 719, 711, 1031, 719, 487, 885, 567, 711, 667, 278, 276, 556, 1094, 1062, 875, 610, 622, 556, 618, 615, 417, 635, 556, 556, 709, 497, 615, 615, 500, 635, 740, 604, 611, 604, 611, 556, 490, 556, 875, 556, 615, 581, 833, 844, 729, 854, 615, 552, 854, 583, 447, 611, 417, 552, 556, 278, 281, 278, 969, 906, 611, 500, 556, 719, 778, 604, 611, 885, 489, 1115, 556, 615, 615, 556, 722, 333, 556, 549, 556, 556, 1000, 500, 1000, 1000, 500, 500, 500, 584, 584, 389, 975, 556, 611, 278, 280, 610, 708, 389, 389, 333, 333, 333, 333, 280, 350, 556, 556, 333, 333, 222, 556, 556, 556, 556, 333, 556, 576, 604, 333, 333, 656, 333, 278, 333, 222, 737, 556, 333, 611, 556, 556, 719, 611, 400, 606, 510, 333, 333, 465, 549, 729, 708, 556, 333, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 333, 1000, 556, 1000, 556, 611, 556, 475, 451, 584, 583, 600, 611, 611, 611, 333, 604, 333, 333, 750, 604, 1000, 556, 834, 333, 556, 556, 333, 556, 611, 556, 611, 611, 611, 611, 611, 333, 333, 584, 549, 556, 556, 333, 333, 611, 611, 611, 594, 604, 333, 333, 278, 278, 278, 278, 278, 278, 556, 278, 713, 274, 604, 604, 722, 604, 604, 1052, 278, 278, 278, 278, 278, 278, 278, 278, 556, 558, 556, 556, 278, 278, 556, 385, 278, 479, 584, 549, 708, 556, 584, 278, 494, 278, 708, 889, 552, 750, 333, 584, 240, 612, 584, 500, 750, 611, 611, 708, 611, 611, 556, 333, 549, 611, 556, 556, 611, 611, 611, 611, 611, 944, 333, 611, 611, 611, 845, 845, 611, 611, 556, 834, 834, 834, 354, 370, 365, 979, 611, 611, 611, 611, 556, 333, 333, 494, 889, 278, 1000, 1094, 715, 766, 584, 549, 823, 753, 611, 611, 611, 474, 500, 500, 500, 278, 278, 278, 278, 238, 389, 389, 549, 389, 389, 737, 584, 619, 333, 708, 556, 556, 556, 556, 556, 556, 479, 556, 556, 834, 333, 708, 684, 520, 556, 278, 1021, 531, 556, 713, 917, 333, 446, 333, 479, 333, 541, 611, 556, 834, 834, 333, 333, 333, 1000, 990, 990, 990, 990, 556, 611, 611, 611, 611, 611, 611, 611, 611, 556, 552, 278, 333, 333, 333, 576, 333, 611, 333, 333, 333, 667, 722, 556, 615, 333, 333, 333, 396, 768, 612, 167, 278, 750, 333, 611, 611, 611, 708, 582, 582, 582, 582, 611, 611, 556, 778, 778, 778, 778, 778, 556, 445, 556, 556, 556, 556, 556, 556, 500, 500, 500, 500, 556, 460]; | ||
exports.LiberationSansRegularWidths = exports.LiberationSansRegularMapping = exports.LiberationSansItalicWidths = exports.LiberationSansItalicMapping = exports.LiberationSansBoldWidths = exports.LiberationSansBoldMapping = exports.LiberationSansBoldItalicWidths = exports.LiberationSansBoldItalicMapping = void 0; | ||
const LiberationSansBoldWidths = [365, 0, 333, 278, 333, 474, 556, 556, 889, 722, 238, 333, 333, 389, 584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 333, 333, 584, 584, 584, 611, 975, 722, 722, 722, 722, 667, 611, 778, 722, 278, 556, 722, 611, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 333, 278, 333, 584, 556, 333, 556, 611, 556, 611, 556, 333, 611, 611, 278, 278, 556, 278, 889, 611, 611, 611, 611, 389, 556, 333, 611, 556, 778, 556, 556, 500, 389, 280, 389, 584, 333, 556, 556, 556, 556, 280, 556, 333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576, 556, 278, 333, 333, 365, 556, 834, 834, 834, 611, 722, 722, 722, 722, 722, 722, 1000, 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 556, 556, 556, 556, 556, 278, 278, 278, 278, 611, 611, 611, 611, 611, 611, 611, 549, 611, 611, 611, 611, 611, 556, 611, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 719, 722, 611, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 611, 778, 611, 778, 611, 778, 611, 722, 611, 722, 611, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 785, 556, 556, 278, 722, 556, 556, 611, 278, 611, 278, 611, 385, 611, 479, 611, 278, 722, 611, 722, 611, 722, 611, 708, 723, 611, 778, 611, 778, 611, 778, 611, 1000, 944, 722, 389, 722, 389, 722, 389, 667, 556, 667, 556, 667, 556, 667, 556, 611, 333, 611, 479, 611, 333, 722, 611, 722, 611, 722, 611, 722, 611, 722, 611, 722, 611, 944, 778, 667, 556, 667, 611, 500, 611, 500, 611, 500, 278, 556, 722, 556, 1000, 889, 778, 611, 667, 556, 611, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 465, 722, 333, 853, 906, 474, 825, 927, 838, 278, 722, 722, 601, 719, 667, 611, 722, 778, 278, 722, 667, 833, 722, 644, 778, 722, 667, 600, 611, 667, 821, 667, 809, 802, 278, 667, 615, 451, 611, 278, 582, 615, 610, 556, 606, 475, 460, 611, 541, 278, 558, 556, 612, 556, 445, 611, 766, 619, 520, 684, 446, 582, 715, 576, 753, 845, 278, 582, 611, 582, 845, 667, 669, 885, 567, 711, 667, 278, 276, 556, 1094, 1062, 875, 610, 722, 622, 719, 722, 719, 722, 567, 712, 667, 904, 626, 719, 719, 610, 702, 833, 722, 778, 719, 667, 722, 611, 622, 854, 667, 730, 703, 1005, 1019, 870, 979, 719, 711, 1031, 719, 556, 618, 615, 417, 635, 556, 709, 497, 615, 615, 500, 635, 740, 604, 611, 604, 611, 556, 490, 556, 875, 556, 615, 581, 833, 844, 729, 854, 615, 552, 854, 583, 556, 556, 611, 417, 552, 556, 278, 281, 278, 969, 906, 611, 500, 615, 556, 604, 778, 611, 487, 447, 944, 778, 944, 778, 944, 778, 667, 556, 333, 333, 556, 1000, 1000, 552, 278, 278, 278, 278, 500, 500, 500, 556, 556, 350, 1000, 1000, 240, 479, 333, 333, 604, 333, 167, 396, 556, 556, 1094, 556, 885, 489, 1115, 1000, 768, 600, 834, 834, 834, 834, 1000, 500, 1000, 500, 1000, 500, 500, 494, 612, 823, 713, 584, 549, 713, 979, 722, 274, 549, 549, 583, 549, 549, 604, 584, 604, 604, 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354, 1000, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052, 917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 611, 611, 333, 333, 333, 333, 333, 333, 333, 333, 222, 222, 333, 333, 333, 333, 333, 333, 333, 333]; | ||
exports.LiberationSansBoldWidths = LiberationSansBoldWidths; | ||
const LiberationSansBoldItalicWidths = [365, 0, 722, 1000, 1000, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 667, 722, 722, 722, 671, 667, 667, 667, 667, 667, 667, 667, 667, 667, 723, 667, 667, 854, 722, 906, 722, 556, 611, 778, 610, 778, 778, 778, 778, 722, 604, 354, 354, 604, 722, 722, 278, 782, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 473, 278, 556, 556, 722, 722, 722, 611, 611, 667, 611, 611, 611, 611, 833, 833, 722, 722, 722, 722, 722, 722, 778, 1000, 778, 778, 778, 778, 778, 778, 778, 781, 847, 778, 844, 778, 778, 778, 667, 822, 718, 829, 778, 722, 722, 722, 722, 667, 667, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 667, 667, 667, 667, 667, 590, 611, 611, 611, 611, 611, 778, 667, 722, 722, 722, 722, 722, 722, 722, 722, 722, 667, 667, 930, 722, 722, 667, 944, 944, 944, 944, 944, 667, 657, 667, 667, 667, 667, 667, 611, 611, 611, 611, 611, 556, 556, 556, 556, 333, 333, 556, 889, 889, 1000, 722, 708, 722, 614, 722, 667, 667, 927, 643, 719, 719, 615, 687, 833, 722, 778, 719, 667, 722, 611, 677, 781, 667, 729, 708, 979, 989, 854, 1000, 708, 719, 1042, 729, 575, 886, 614, 719, 667, 278, 278, 556, 1094, 1042, 854, 622, 677, 556, 619, 604, 534, 618, 556, 556, 736, 510, 611, 611, 507, 622, 740, 604, 611, 611, 611, 556, 889, 556, 885, 556, 646, 583, 889, 935, 707, 854, 594, 552, 865, 589, 467, 611, 469, 563, 556, 278, 278, 278, 969, 906, 611, 507, 556, 719, 778, 611, 611, 885, 516, 1146, 556, 620, 620, 556, 722, 333, 556, 549, 556, 556, 1000, 500, 999, 1000, 500, 500, 500, 584, 584, 389, 975, 556, 611, 278, 280, 621, 708, 389, 389, 333, 333, 333, 333, 280, 350, 556, 556, 333, 333, 222, 556, 556, 556, 556, 333, 556, 578, 604, 333, 333, 656, 333, 278, 333, 222, 737, 556, 333, 611, 556, 556, 740, 611, 400, 610, 510, 333, 333, 333, 549, 729, 708, 556, 333, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 333, 1000, 556, 1000, 556, 611, 556, 479, 479, 584, 583, 600, 611, 611, 611, 333, 604, 333, 333, 750, 604, 1000, 556, 834, 333, 556, 556, 333, 556, 611, 556, 611, 611, 611, 611, 611, 333, 333, 584, 549, 556, 556, 333, 333, 611, 611, 611, 594, 604, 333, 333, 278, 278, 278, 278, 278, 278, 556, 278, 713, 274, 604, 604, 722, 604, 604, 1052, 278, 278, 278, 278, 278, 278, 278, 278, 556, 566, 556, 556, 278, 278, 556, 396, 278, 479, 584, 549, 708, 556, 584, 278, 494, 278, 708, 889, 552, 750, 333, 584, 240, 603, 584, 500, 750, 611, 611, 708, 611, 611, 556, 333, 549, 611, 556, 556, 611, 611, 611, 611, 611, 944, 333, 611, 611, 611, 834, 834, 611, 611, 556, 834, 834, 834, 354, 370, 365, 979, 611, 611, 611, 611, 556, 333, 333, 494, 889, 278, 1000, 1104, 704, 712, 584, 549, 823, 773, 611, 611, 611, 474, 500, 500, 500, 278, 278, 278, 278, 238, 389, 389, 549, 389, 389, 737, 584, 605, 333, 708, 556, 556, 556, 556, 556, 556, 479, 556, 556, 834, 333, 708, 664, 532, 556, 278, 1021, 531, 556, 713, 917, 333, 409, 333, 479, 333, 558, 611, 556, 834, 834, 333, 333, 333, 1000, 990, 990, 990, 990, 556, 611, 611, 611, 611, 611, 611, 611, 611, 556, 552, 278, 333, 333, 333, 576, 333, 611, 333, 333, 333, 667, 719, 556, 619, 333, 333, 333, 396, 768, 612, 167, 278, 750, 333, 611, 611, 611, 708, 591, 591, 591, 591, 611, 611, 556, 778, 778, 778, 778, 778, 556, 450, 556, 556, 556, 556, 556, 556, 500, 500, 500, 500, 556, 492]; | ||
const LiberationSansBoldMapping = [-1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537, 538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901, 902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813, 7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218, 8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243, 8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453, 8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593, 8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730, 8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976, 8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516, 9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560, 9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571, 9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604, 9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644, 9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786, 9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836, 61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]; | ||
exports.LiberationSansBoldMapping = LiberationSansBoldMapping; | ||
const LiberationSansBoldItalicWidths = [365, 0, 333, 278, 333, 474, 556, 556, 889, 722, 238, 333, 333, 389, 584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 333, 333, 584, 584, 584, 611, 975, 722, 722, 722, 722, 667, 611, 778, 722, 278, 556, 722, 611, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 333, 278, 333, 584, 556, 333, 556, 611, 556, 611, 556, 333, 611, 611, 278, 278, 556, 278, 889, 611, 611, 611, 611, 389, 556, 333, 611, 556, 778, 556, 556, 500, 389, 280, 389, 584, 333, 556, 556, 556, 556, 280, 556, 333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576, 556, 278, 333, 333, 365, 556, 834, 834, 834, 611, 722, 722, 722, 722, 722, 722, 1000, 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 556, 556, 556, 556, 556, 278, 278, 278, 278, 611, 611, 611, 611, 611, 611, 611, 549, 611, 611, 611, 611, 611, 556, 611, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 740, 722, 611, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 611, 778, 611, 778, 611, 778, 611, 722, 611, 722, 611, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 782, 556, 556, 278, 722, 556, 556, 611, 278, 611, 278, 611, 396, 611, 479, 611, 278, 722, 611, 722, 611, 722, 611, 708, 723, 611, 778, 611, 778, 611, 778, 611, 1000, 944, 722, 389, 722, 389, 722, 389, 667, 556, 667, 556, 667, 556, 667, 556, 611, 333, 611, 479, 611, 333, 722, 611, 722, 611, 722, 611, 722, 611, 722, 611, 722, 611, 944, 778, 667, 556, 667, 611, 500, 611, 500, 611, 500, 278, 556, 722, 556, 1000, 889, 778, 611, 667, 556, 611, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 722, 333, 854, 906, 473, 844, 930, 847, 278, 722, 722, 610, 671, 667, 611, 722, 778, 278, 722, 667, 833, 722, 657, 778, 718, 667, 590, 611, 667, 822, 667, 829, 781, 278, 667, 620, 479, 611, 278, 591, 620, 621, 556, 610, 479, 492, 611, 558, 278, 566, 556, 603, 556, 450, 611, 712, 605, 532, 664, 409, 591, 704, 578, 773, 834, 278, 591, 611, 591, 834, 667, 667, 886, 614, 719, 667, 278, 278, 556, 1094, 1042, 854, 622, 719, 677, 719, 722, 708, 722, 614, 722, 667, 927, 643, 719, 719, 615, 687, 833, 722, 778, 719, 667, 722, 611, 677, 781, 667, 729, 708, 979, 989, 854, 1000, 708, 719, 1042, 729, 556, 619, 604, 534, 618, 556, 736, 510, 611, 611, 507, 622, 740, 604, 611, 611, 611, 556, 889, 556, 885, 556, 646, 583, 889, 935, 707, 854, 594, 552, 865, 589, 556, 556, 611, 469, 563, 556, 278, 278, 278, 969, 906, 611, 507, 619, 556, 611, 778, 611, 575, 467, 944, 778, 944, 778, 944, 778, 667, 556, 333, 333, 556, 1000, 1000, 552, 278, 278, 278, 278, 500, 500, 500, 556, 556, 350, 1000, 1000, 240, 479, 333, 333, 604, 333, 167, 396, 556, 556, 1104, 556, 885, 516, 1146, 1000, 768, 600, 834, 834, 834, 834, 999, 500, 1000, 500, 1000, 500, 500, 494, 612, 823, 713, 584, 549, 713, 979, 722, 274, 549, 549, 583, 549, 549, 604, 584, 604, 604, 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354, 1000, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052, 917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 611, 611, 333, 333, 333, 333, 333, 333, 333, 333, 222, 222, 333, 333, 333, 333, 333, 333, 333, 333]; | ||
exports.LiberationSansBoldItalicWidths = LiberationSansBoldItalicWidths; | ||
const LiberationSansItalicWidths = [365, 0, 667, 1000, 1000, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 722, 722, 722, 722, 722, 722, 667, 722, 722, 722, 671, 667, 667, 667, 667, 667, 667, 667, 667, 667, 723, 667, 667, 789, 722, 846, 722, 556, 611, 778, 570, 778, 778, 778, 778, 722, 604, 354, 354, 604, 722, 722, 278, 733, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 389, 278, 500, 500, 667, 667, 667, 556, 556, 667, 556, 556, 556, 556, 833, 833, 722, 722, 722, 722, 722, 722, 778, 1000, 778, 778, 778, 778, 778, 778, 778, 761, 775, 778, 794, 778, 778, 778, 667, 837, 725, 831, 778, 722, 722, 722, 722, 667, 667, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 667, 667, 667, 667, 667, 600, 611, 611, 611, 611, 611, 778, 667, 722, 722, 722, 722, 722, 722, 722, 722, 722, 667, 667, 865, 722, 722, 667, 944, 944, 944, 944, 944, 667, 648, 667, 667, 667, 667, 667, 611, 611, 611, 611, 611, 556, 556, 556, 556, 333, 294, 556, 889, 889, 1000, 667, 651, 667, 544, 704, 667, 667, 917, 614, 715, 715, 589, 686, 833, 722, 778, 725, 667, 722, 611, 639, 795, 667, 727, 673, 920, 923, 805, 886, 651, 694, 1022, 682, 492, 843, 544, 708, 667, 278, 278, 500, 1066, 982, 844, 589, 639, 556, 562, 522, 493, 553, 556, 556, 688, 465, 556, 556, 472, 564, 686, 550, 556, 556, 556, 500, 833, 500, 835, 500, 572, 518, 830, 851, 621, 736, 526, 492, 752, 534, 339, 556, 378, 496, 500, 222, 222, 222, 910, 828, 556, 472, 500, 724, 778, 556, 556, 885, 323, 1083, 556, 570, 570, 556, 667, 278, 556, 549, 556, 556, 1000, 500, 1000, 998, 500, 500, 500, 469, 584, 389, 1015, 556, 556, 278, 260, 571, 708, 334, 334, 278, 278, 333, 285, 260, 350, 500, 500, 333, 324, 222, 500, 500, 500, 500, 333, 556, 546, 604, 333, 324, 656, 278, 278, 333, 222, 737, 556, 333, 556, 556, 556, 625, 556, 400, 556, 510, 333, 316, 333, 549, 729, 708, 556, 333, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 333, 1000, 556, 1000, 556, 556, 556, 439, 439, 584, 584, 600, 555, 555, 556, 278, 500, 333, 278, 750, 604, 1000, 556, 834, 333, 556, 556, 333, 556, 556, 500, 556, 556, 556, 556, 611, 333, 294, 584, 549, 556, 556, 333, 333, 556, 556, 556, 594, 604, 333, 398, 222, 278, 278, 278, 278, 278, 444, 278, 713, 274, 604, 604, 719, 604, 604, 1052, 222, 222, 222, 222, 222, 278, 222, 222, 500, 500, 500, 500, 222, 222, 492, 281, 222, 400, 584, 549, 708, 556, 584, 222, 494, 222, 708, 833, 552, 750, 333, 584, 188, 548, 584, 500, 750, 556, 556, 615, 556, 556, 556, 333, 549, 556, 500, 556, 556, 556, 556, 556, 556, 944, 333, 556, 556, 556, 779, 779, 556, 556, 556, 834, 834, 834, 354, 370, 365, 979, 611, 611, 556, 556, 537, 333, 333, 494, 889, 278, 1000, 1094, 652, 670, 584, 549, 823, 728, 556, 556, 611, 355, 333, 333, 333, 222, 222, 222, 222, 191, 333, 333, 549, 333, 333, 737, 584, 573, 333, 708, 500, 500, 500, 500, 500, 500, 354, 556, 556, 834, 333, 708, 603, 486, 556, 278, 1021, 531, 556, 713, 917, 278, 374, 278, 354, 278, 542, 556, 556, 834, 834, 333, 328, 333, 1000, 990, 990, 990, 990, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 552, 278, 333, 333, 333, 576, 333, 611, 278, 333, 278, 667, 715, 556, 565, 333, 333, 333, 365, 768, 612, 167, 278, 750, 333, 500, 500, 556, 708, 550, 550, 550, 550, 556, 556, 500, 722, 722, 722, 722, 722, 500, 447, 500, 500, 500, 500, 556, 500, 500, 500, 500, 500, 556, 463]; | ||
const LiberationSansBoldItalicMapping = [-1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537, 538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901, 902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813, 7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218, 8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243, 8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453, 8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593, 8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730, 8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976, 8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516, 9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560, 9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571, 9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604, 9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644, 9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786, 9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836, 61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]; | ||
exports.LiberationSansBoldItalicMapping = LiberationSansBoldItalicMapping; | ||
const LiberationSansItalicWidths = [365, 0, 333, 278, 278, 355, 556, 556, 889, 667, 191, 333, 333, 389, 584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 278, 278, 584, 584, 584, 556, 1015, 667, 667, 722, 722, 667, 611, 778, 722, 278, 500, 667, 556, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 278, 278, 278, 469, 556, 333, 556, 556, 500, 556, 556, 278, 556, 556, 222, 222, 500, 222, 833, 556, 556, 556, 556, 333, 500, 278, 556, 500, 722, 500, 500, 500, 334, 260, 334, 584, 333, 556, 556, 556, 556, 260, 556, 333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576, 537, 278, 333, 333, 365, 556, 834, 834, 834, 611, 667, 667, 667, 667, 667, 667, 1000, 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 500, 556, 556, 556, 556, 278, 278, 278, 278, 556, 556, 556, 556, 556, 556, 556, 549, 611, 556, 556, 556, 556, 500, 556, 500, 667, 556, 667, 556, 667, 556, 722, 500, 722, 500, 722, 500, 722, 500, 722, 625, 722, 556, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 556, 778, 556, 778, 556, 778, 556, 722, 556, 722, 556, 278, 278, 278, 278, 278, 278, 278, 222, 278, 278, 733, 444, 500, 222, 667, 500, 500, 556, 222, 556, 222, 556, 281, 556, 400, 556, 222, 722, 556, 722, 556, 722, 556, 615, 723, 556, 778, 556, 778, 556, 778, 556, 1000, 944, 722, 333, 722, 333, 722, 333, 667, 500, 667, 500, 667, 500, 667, 500, 611, 278, 611, 354, 611, 278, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 944, 722, 667, 500, 667, 611, 500, 611, 500, 611, 500, 222, 556, 667, 556, 1000, 889, 778, 611, 667, 500, 611, 278, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 667, 278, 789, 846, 389, 794, 865, 775, 222, 667, 667, 570, 671, 667, 611, 722, 778, 278, 667, 667, 833, 722, 648, 778, 725, 667, 600, 611, 667, 837, 667, 831, 761, 278, 667, 570, 439, 555, 222, 550, 570, 571, 500, 556, 439, 463, 555, 542, 222, 500, 492, 548, 500, 447, 556, 670, 573, 486, 603, 374, 550, 652, 546, 728, 779, 222, 550, 556, 550, 779, 667, 667, 843, 544, 708, 667, 278, 278, 500, 1066, 982, 844, 589, 715, 639, 724, 667, 651, 667, 544, 704, 667, 917, 614, 715, 715, 589, 686, 833, 722, 778, 725, 667, 722, 611, 639, 795, 667, 727, 673, 920, 923, 805, 886, 651, 694, 1022, 682, 556, 562, 522, 493, 553, 556, 688, 465, 556, 556, 472, 564, 686, 550, 556, 556, 556, 500, 833, 500, 835, 500, 572, 518, 830, 851, 621, 736, 526, 492, 752, 534, 556, 556, 556, 378, 496, 500, 222, 222, 222, 910, 828, 556, 472, 565, 500, 556, 778, 556, 492, 339, 944, 722, 944, 722, 944, 722, 667, 500, 333, 333, 556, 1000, 1000, 552, 222, 222, 222, 222, 333, 333, 333, 556, 556, 350, 1000, 1000, 188, 354, 333, 333, 500, 333, 167, 365, 556, 556, 1094, 556, 885, 323, 1083, 1000, 768, 600, 834, 834, 834, 834, 1000, 500, 998, 500, 1000, 500, 500, 494, 612, 823, 713, 584, 549, 713, 979, 719, 274, 549, 549, 584, 549, 549, 604, 584, 604, 604, 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354, 1000, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052, 917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 500, 500, 333, 333, 333, 333, 333, 333, 333, 333, 222, 222, 294, 294, 324, 324, 316, 328, 398, 285]; | ||
exports.LiberationSansItalicWidths = LiberationSansItalicWidths; | ||
const LiberationSansRegularWidths = [365, 0, 667, 1000, 1000, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 722, 722, 722, 722, 722, 722, 667, 722, 722, 722, 668, 667, 667, 667, 667, 667, 667, 667, 667, 667, 723, 667, 667, 784, 722, 838, 722, 556, 611, 778, 551, 778, 778, 778, 778, 722, 604, 354, 354, 604, 722, 722, 278, 735, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 384, 278, 500, 500, 667, 667, 667, 556, 556, 668, 556, 556, 556, 556, 833, 833, 722, 722, 722, 722, 722, 722, 778, 1000, 778, 778, 778, 778, 778, 778, 778, 748, 752, 778, 774, 778, 778, 778, 667, 798, 722, 835, 778, 722, 722, 722, 722, 667, 667, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 667, 667, 667, 667, 667, 618, 611, 611, 611, 611, 611, 778, 667, 722, 722, 722, 722, 722, 722, 722, 722, 722, 667, 667, 855, 722, 722, 667, 944, 944, 944, 944, 944, 667, 650, 667, 667, 667, 667, 667, 611, 611, 611, 611, 611, 556, 556, 556, 556, 333, 556, 889, 889, 1000, 667, 656, 667, 542, 677, 667, 667, 923, 604, 719, 719, 583, 656, 833, 722, 778, 719, 667, 722, 611, 635, 760, 667, 740, 667, 917, 938, 792, 885, 656, 719, 1010, 722, 489, 865, 542, 719, 667, 278, 278, 500, 1057, 1010, 854, 583, 635, 556, 573, 531, 365, 583, 556, 556, 669, 458, 559, 559, 438, 583, 688, 552, 556, 542, 556, 500, 458, 500, 823, 500, 573, 521, 802, 823, 625, 719, 521, 510, 750, 542, 411, 556, 365, 510, 500, 222, 278, 222, 906, 812, 556, 438, 500, 719, 778, 552, 556, 885, 323, 1073, 556, 578, 578, 556, 667, 278, 556, 549, 556, 556, 1000, 500, 1000, 1000, 500, 500, 500, 469, 584, 389, 1015, 556, 556, 278, 260, 575, 708, 334, 334, 278, 278, 333, 260, 350, 500, 500, 333, 500, 500, 500, 500, 333, 556, 525, 604, 333, 656, 278, 278, 737, 556, 556, 556, 556, 615, 556, 400, 557, 510, 333, 333, 549, 729, 708, 556, 333, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1000, 556, 1000, 556, 556, 556, 446, 446, 584, 583, 600, 556, 556, 556, 278, 500, 333, 278, 750, 604, 1000, 556, 834, 556, 556, 556, 556, 500, 556, 556, 556, 556, 611, 333, 222, 222, 294, 294, 324, 324, 316, 328, 398, 285, 333, 584, 549, 556, 556, 333, 333, 556, 556, 556, 594, 604, 333, 222, 278, 278, 278, 278, 278, 444, 278, 713, 274, 604, 604, 719, 604, 604, 1052, 222, 222, 222, 222, 222, 278, 222, 222, 500, 500, 500, 500, 222, 222, 500, 292, 222, 334, 584, 549, 708, 556, 584, 222, 494, 222, 708, 833, 552, 750, 333, 584, 188, 576, 584, 500, 750, 556, 556, 604, 556, 556, 556, 333, 549, 556, 500, 556, 556, 556, 556, 556, 556, 944, 333, 556, 556, 556, 781, 781, 556, 556, 556, 834, 834, 834, 354, 370, 365, 979, 611, 611, 556, 556, 537, 333, 333, 494, 889, 278, 1000, 1094, 648, 690, 584, 549, 823, 713, 556, 556, 611, 355, 333, 333, 333, 222, 222, 222, 222, 191, 333, 333, 549, 333, 333, 737, 584, 569, 333, 708, 500, 500, 500, 500, 500, 500, 354, 556, 556, 834, 708, 617, 482, 556, 278, 1021, 531, 556, 713, 917, 278, 395, 278, 375, 278, 556, 556, 556, 834, 834, 333, 333, 1000, 990, 990, 990, 990, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 552, 278, 333, 333, 333, 576, 333, 611, 278, 333, 278, 667, 722, 556, 559, 333, 333, 333, 333, 333, 333, 333, 365, 768, 612, 167, 278, 750, 333, 333, 500, 500, 556, 708, 547, 547, 547, 547, 556, 556, 500, 722, 722, 722, 722, 722, 500, 448, 500, 500, 500, 500, 556, 500, 500, 500, 500, 500, 556, 441]; | ||
exports.LiberationSansRegularWidths = LiberationSansRegularWidths; | ||
const LiberationSansItalicMapping = [-1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537, 538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901, 902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813, 7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218, 8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243, 8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453, 8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593, 8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730, 8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976, 8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516, 9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560, 9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571, 9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604, 9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644, 9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786, 9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836, 61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]; | ||
exports.LiberationSansItalicMapping = LiberationSansItalicMapping; | ||
const LiberationSansRegularWidths = [365, 0, 333, 278, 278, 355, 556, 556, 889, 667, 191, 333, 333, 389, 584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 278, 278, 584, 584, 584, 556, 1015, 667, 667, 722, 722, 667, 611, 778, 722, 278, 500, 667, 556, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 278, 278, 278, 469, 556, 333, 556, 556, 500, 556, 556, 278, 556, 556, 222, 222, 500, 222, 833, 556, 556, 556, 556, 333, 500, 278, 556, 500, 722, 500, 500, 500, 334, 260, 334, 584, 333, 556, 556, 556, 556, 260, 556, 333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576, 537, 278, 333, 333, 365, 556, 834, 834, 834, 611, 667, 667, 667, 667, 667, 667, 1000, 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 500, 556, 556, 556, 556, 278, 278, 278, 278, 556, 556, 556, 556, 556, 556, 556, 549, 611, 556, 556, 556, 556, 500, 556, 500, 667, 556, 667, 556, 667, 556, 722, 500, 722, 500, 722, 500, 722, 500, 722, 615, 722, 556, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 556, 778, 556, 778, 556, 778, 556, 722, 556, 722, 556, 278, 278, 278, 278, 278, 278, 278, 222, 278, 278, 735, 444, 500, 222, 667, 500, 500, 556, 222, 556, 222, 556, 292, 556, 334, 556, 222, 722, 556, 722, 556, 722, 556, 604, 723, 556, 778, 556, 778, 556, 778, 556, 1000, 944, 722, 333, 722, 333, 722, 333, 667, 500, 667, 500, 667, 500, 667, 500, 611, 278, 611, 375, 611, 278, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 944, 722, 667, 500, 667, 611, 500, 611, 500, 611, 500, 222, 556, 667, 556, 1000, 889, 778, 611, 667, 500, 611, 278, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 667, 278, 784, 838, 384, 774, 855, 752, 222, 667, 667, 551, 668, 667, 611, 722, 778, 278, 667, 668, 833, 722, 650, 778, 722, 667, 618, 611, 667, 798, 667, 835, 748, 278, 667, 578, 446, 556, 222, 547, 578, 575, 500, 557, 446, 441, 556, 556, 222, 500, 500, 576, 500, 448, 556, 690, 569, 482, 617, 395, 547, 648, 525, 713, 781, 222, 547, 556, 547, 781, 667, 667, 865, 542, 719, 667, 278, 278, 500, 1057, 1010, 854, 583, 722, 635, 719, 667, 656, 667, 542, 677, 667, 923, 604, 719, 719, 583, 656, 833, 722, 778, 719, 667, 722, 611, 635, 760, 667, 740, 667, 917, 938, 792, 885, 656, 719, 1010, 722, 556, 573, 531, 365, 583, 556, 669, 458, 559, 559, 438, 583, 688, 552, 556, 542, 556, 500, 458, 500, 823, 500, 573, 521, 802, 823, 625, 719, 521, 510, 750, 542, 556, 556, 556, 365, 510, 500, 222, 278, 222, 906, 812, 556, 438, 559, 500, 552, 778, 556, 489, 411, 944, 722, 944, 722, 944, 722, 667, 500, 333, 333, 556, 1000, 1000, 552, 222, 222, 222, 222, 333, 333, 333, 556, 556, 350, 1000, 1000, 188, 354, 333, 333, 500, 333, 167, 365, 556, 556, 1094, 556, 885, 323, 1073, 1000, 768, 600, 834, 834, 834, 834, 1000, 500, 1000, 500, 1000, 500, 500, 494, 612, 823, 713, 584, 549, 713, 979, 719, 274, 549, 549, 583, 549, 549, 604, 584, 604, 604, 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354, 1000, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052, 917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 500, 500, 333, 333, 333, 333, 333, 333, 333, 333, 222, 222, 294, 294, 324, 324, 316, 328, 398, 285]; | ||
exports.LiberationSansRegularWidths = LiberationSansRegularWidths; | ||
const LiberationSansRegularMapping = [-1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537, 538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901, 902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813, 7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218, 8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243, 8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453, 8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593, 8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730, 8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976, 8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516, 9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560, 9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571, 9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604, 9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644, 9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786, 9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836, 61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]; | ||
exports.LiberationSansRegularMapping = LiberationSansRegularMapping; |
@@ -27,18 +27,30 @@ /** | ||
}); | ||
exports.MyriadProRegularLineHeight = exports.MyriadProRegularFactors = exports.MyriadProItalicLineHeight = exports.MyriadProItalicFactors = exports.MyriadProBoldLineHeight = exports.MyriadProBoldItalicLineHeight = exports.MyriadProBoldItalicFactors = exports.MyriadProBoldFactors = void 0; | ||
const MyriadProBoldFactors = [1.36898, 1, 0.90838, 0.868, 0.868, 0.90838, 0.90838, 0.90838, 0.90838, 0.90838, 0.90838, 0.91945, 0.90838, 0.90838, 0.90838, 0.90838, 0.90838, 0.83637, 0.83637, 0.82391, 0.82391, 0.82391, 0.82391, 0.82391, 0.82391, 0.91905, 0.96376, 0.96376, 0.97484, 0.90157, 0.80061, 0.80061, 0.80061, 0.80061, 0.80061, 0.80061, 0.80061, 0.80061, 0.80061, 0.95417, 0.80061, 0.80061, 0.75261, 0.95407, 0.87992, 0.97484, 0.99793, 0.86275, 0.8768, 0.8019, 0.8768, 0.8768, 1, 0.8768, 0.95407, 1, 1, 1, 1, 0.97069, 0.95407, 1.0258, 0.887, 1.0258, 1.0258, 1.0258, 1.0258, 1.0258, 1.0258, 1.0258, 1.0258, 1.0258, 1.0258, 0.82976, 1.0258, 0.73901, 0.73901, 0.85022, 0.85022, 1, 0.83655, 0.83655, 0.97153, 0.83655, 1, 0.83655, 0.84638, 1.0156, 1.0156, 0.95546, 0.95546, 0.95546, 1, 0.95546, 0.95546, 0.92179, 0.936, 0.92179, 0.92179, 0.92179, 0.92179, 0.92179, 0.92179, 0.92179, 0.92796, 0.97268, 0.92179, 0.96034, 0.92179, 0.92179, 0.92179, 0.87107, 0.95638, 0.92361, 0.91709, 0.92179, 0.82114, 0.82114, 0.82114, 1, 0.87107, 0.8096, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.8096, 0.8096, 1, 0.8096, 1, 0.96318, 0.89713, 0.89713, 0.89713, 0.89713, 1, 0.92436, 0.86958, 0.94438, 0.94438, 0.94438, 0.94438, 0.94438, 0.94438, 0.94438, 0.94438, 0.94438, 0.93704, 0.93704, 0.83689, 0.94438, 0.94438, 0.95353, 0.94083, 0.94083, 0.94083, 0.94083, 0.94083, 0.91905, 0.89192, 0.90406, 0.90406, 0.90406, 0.90406, 0.90406, 0.9446, 0.9446, 0.9446, 0.9446, 0.9446, 0.94938, 0.94938, 0.94938, 0.94938, 0.90088, 1, 0.94938, 0.9031, 0.9031, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.94938, 0.94836, 0.94836, 0.94938, 0.93884, 0.83181, 0.94938, 1.08595, 0.94938, 0.94938, 1, 1, 1, 1, 1, 1, 1, 1.02058, 1.02058, 1.16661, 0.78966, 0.94938, 0.97898, 1.18777, 1.01149, 0.96174, 1, 0.80687, 0.80687, 0.94292, 0.94292, 0.90088, 1, 1.01149, 0.96544, 0.81093, 0.81093, 0.90088, 1, 1, 0.81093, 0.81093, 0.81093, 0.81093, 0.90088, 0.99793, 0.87548, 1, 0.90088, 1, 1, 0.78076, 0.93582, 1, 1, 0.91882, 0.99793, 1, 0.97571, 0.94219, 0.94219, 0.84313, 0.97571, 0.89022, 0.9498, 1, 0.90088, 1, 0.9358, 1.08595, 1, 1, 0.99793, 0.90088, 0.98621, 0.94938, 0.94938, 0.94938, 0.94938, 0.94938, 0.94938, 0.94938, 0.94938, 0.99793, 1, 1, 0.94938, 1, 0.89903, 0.95933, 0.94938, 0.98607, 1.0373, 1.02058, 1, 1.36145, 0.95933, 0.95933, 0.93969, 0.80479, 1, 0.80479, 1.024, 1, 1, 1, 0.99793, 1, 1, 0.99793, 0.99793, 1, 1, 0.9577, 0.92601, 0.9577, 0.9577, 1, 0.9577, 0.98225, 0.90088, 1, 1.02058, 1.08595, 0.8361, 0.8361, 0.81079, 0.81079, 0.95933, 0.95933, 0.95933, 1, 1, 0.90088, 1, 0.98621, 0.98621, 0.98621, 0.98621, 0.98621, 0.98621, 1.01591, 0.98621, 1.05486, 1.30692, 1, 1, 1, 1, 1, 1, 0.98621, 1.0078, 1.0078, 1.0078, 1.0078, 0.98621, 1.0474, 1.0474, 0.97455, 0.98275, 1, 0.97455, 0.98981, 0.98981, 0.9314, 0.73977, 1, 0.73903, 1.02058, 1.08595, 1, 1, 1.02058, 1, 1.16161, 1.033, 1, 0.9672, 0.54324, 1, 1, 1.02058, 1, 0.95617, 1.02058, 1, 1, 0.95933, 0.95933, 0.8271, 0.95933, 1, 0.99793, 1, 1.08595, 0.95933, 0.91701, 0.98894, 0.9446, 0.9446, 0.9446, 0.9446, 0.9446, 0.91964, 0.90088, 0.9446, 0.9446, 0.9446, 0.86774, 0.86774, 0.9446, 0.9446, 0.99793, 1, 0.99642, 0.99642, 1, 1.0213, 1.05686, 1, 0.9446, 0.9446, 0.9446, 0.97898, 0.97455, 0.94292, 0.94292, 1.17173, 0.9897, 0.93582, 1.285, 1, 0.99394, 0.78367, 1.02058, 1.08595, 0.80535, 0.96361, 0.97407, 0.72851, 0.72851, 0.83734, 0.918, 0.908, 0.908, 0.93582, 1, 0.93582, 0.93582, 0.86209, 0.97646, 0.97646, 1.0732, 0.97646, 1, 0.62295, 1, 0.9553, 0.90088, 1, 0.78036, 0.78036, 0.78036, 1, 0.78036, 1, 1, 1.00872, 0.99793, 1, 1, 1, 0.86832, 1, 0.99793, 1.19137, 1, 1, 0.99793, 0.76169, 1, 1.10208, 1.0128, 1.10208, 0.77452, 1, 1.05453, 0.97898, 0.99793, 1, 0.99642, 0.90088, 1, 0.90989, 0.65, 1, 1, 1, 1, 0.99793, 0.95442, 0.95442, 0.95442, 0.95442, 0.95442, 0.95442, 0.95442, 0.95442, 0.89903, 1, 0.72706, 0.96694, 1, 1, 1, 1, 0.89713, 1.10208, 0.90088, 0.78076, 1, 1, 1, 1, 0.96694, 1, 1, 1, 1, 1, 0.74854, 0.93582, 1, 1, 1, 1, 0.95442, 1, 0.95871, 0.95871, 0.95871, 0.95871, 0.95442, 0.95442, 0.95298, 0.97579, 0.97579, 0.97579, 0.97579, 0.97579, 0.9332, 1.05993, 0.94039, 0.94039, 0.94039, 0.94039, 0.99793, 0.94039, 0.938, 0.938, 0.938, 0.938, 0.99793, 0.95776]; | ||
exports.MyriadProRegularMetrics = exports.MyriadProRegularFactors = exports.MyriadProItalicMetrics = exports.MyriadProItalicFactors = exports.MyriadProBoldMetrics = exports.MyriadProBoldItalicMetrics = exports.MyriadProBoldItalicFactors = exports.MyriadProBoldFactors = void 0; | ||
const MyriadProBoldFactors = [1.36898, 1, 1, 0.72706, 0.80479, 0.83734, 0.98894, 0.99793, 0.9897, 0.93884, 0.86209, 0.94292, 0.94292, 1.16661, 1.02058, 0.93582, 0.96694, 0.93582, 1.19137, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.78076, 0.78076, 1.02058, 1.02058, 1.02058, 0.72851, 0.78966, 0.90838, 0.83637, 0.82391, 0.96376, 0.80061, 0.86275, 0.8768, 0.95407, 1.0258, 0.73901, 0.85022, 0.83655, 1.0156, 0.95546, 0.92179, 0.87107, 0.92179, 0.82114, 0.8096, 0.89713, 0.94438, 0.95353, 0.94083, 0.91905, 0.90406, 0.9446, 0.94292, 1.18777, 0.94292, 1.02058, 0.89903, 0.90088, 0.94938, 0.97898, 0.81093, 0.97571, 0.94938, 1.024, 0.9577, 0.95933, 0.98621, 1.0474, 0.97455, 0.98981, 0.9672, 0.95933, 0.9446, 0.97898, 0.97407, 0.97646, 0.78036, 1.10208, 0.95442, 0.95298, 0.97579, 0.9332, 0.94039, 0.938, 0.80687, 1.01149, 0.80687, 1.02058, 0.80479, 0.99793, 0.99793, 0.99793, 0.99793, 1.01149, 1.00872, 0.90088, 0.91882, 1.0213, 0.8361, 1.02058, 0.62295, 0.54324, 0.89022, 1.08595, 1, 1, 0.90088, 1, 0.97455, 0.93582, 0.90088, 1, 1.05686, 0.8361, 0.99642, 0.99642, 0.99642, 0.72851, 0.90838, 0.90838, 0.90838, 0.90838, 0.90838, 0.90838, 0.868, 0.82391, 0.80061, 0.80061, 0.80061, 0.80061, 1.0258, 1.0258, 1.0258, 1.0258, 0.97484, 0.95546, 0.92179, 0.92179, 0.92179, 0.92179, 0.92179, 1.02058, 0.92179, 0.94438, 0.94438, 0.94438, 0.94438, 0.90406, 0.86958, 0.98225, 0.94938, 0.94938, 0.94938, 0.94938, 0.94938, 0.94938, 0.9031, 0.81093, 0.94938, 0.94938, 0.94938, 0.94938, 0.98621, 0.98621, 0.98621, 0.98621, 0.93969, 0.95933, 0.9446, 0.9446, 0.9446, 0.9446, 0.9446, 1.08595, 0.9446, 0.95442, 0.95442, 0.95442, 0.95442, 0.94039, 0.97898, 0.94039, 0.90838, 0.94938, 0.90838, 0.94938, 0.90838, 0.94938, 0.82391, 0.81093, 0.82391, 0.81093, 0.82391, 0.81093, 0.82391, 0.81093, 0.96376, 0.84313, 0.97484, 0.97571, 0.80061, 0.94938, 0.80061, 0.94938, 0.80061, 0.94938, 0.80061, 0.94938, 0.80061, 0.94938, 0.8768, 0.9577, 0.8768, 0.9577, 0.8768, 0.9577, 1, 1, 0.95407, 0.95933, 0.97069, 0.95933, 1.0258, 0.98621, 1.0258, 0.98621, 1.0258, 0.98621, 1.0258, 0.98621, 1.0258, 0.98621, 0.887, 1.01591, 0.73901, 1.0474, 1, 1, 0.97455, 0.83655, 0.98981, 1, 1, 0.83655, 0.73977, 0.83655, 0.73903, 0.84638, 1.033, 0.95546, 0.95933, 1, 1, 0.95546, 0.95933, 0.8271, 0.95417, 0.95933, 0.92179, 0.9446, 0.92179, 0.9446, 0.92179, 0.9446, 0.936, 0.91964, 0.82114, 0.97646, 1, 1, 0.82114, 0.97646, 0.8096, 0.78036, 0.8096, 0.78036, 1, 1, 0.8096, 0.78036, 1, 1, 0.89713, 0.77452, 0.89713, 1.10208, 0.94438, 0.95442, 0.94438, 0.95442, 0.94438, 0.95442, 0.94438, 0.95442, 0.94438, 0.95442, 0.94438, 0.95442, 0.94083, 0.97579, 0.90406, 0.94039, 0.90406, 0.9446, 0.938, 0.9446, 0.938, 0.9446, 0.938, 1, 0.99793, 0.90838, 0.94938, 0.868, 0.9031, 0.92179, 0.9446, 1, 1, 0.89713, 1.10208, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90989, 0.9358, 0.91945, 0.83181, 0.75261, 0.87992, 0.82976, 0.96034, 0.83689, 0.97268, 1.0078, 0.90838, 0.83637, 0.8019, 0.90157, 0.80061, 0.9446, 0.95407, 0.92436, 1.0258, 0.85022, 0.97153, 1.0156, 0.95546, 0.89192, 0.92179, 0.92361, 0.87107, 0.96318, 0.89713, 0.93704, 0.95638, 0.91905, 0.91709, 0.92796, 1.0258, 0.93704, 0.94836, 1.0373, 0.95933, 1.0078, 0.95871, 0.94836, 0.96174, 0.92601, 0.9498, 0.98607, 0.95776, 0.95933, 1.05453, 1.0078, 0.98275, 0.9314, 0.95617, 0.91701, 1.05993, 0.9446, 0.78367, 0.9553, 1, 0.86832, 1.0128, 0.95871, 0.99394, 0.87548, 0.96361, 0.86774, 1.0078, 0.95871, 0.9446, 0.95871, 0.86774, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.94083, 0.97579, 0.94083, 0.97579, 0.94083, 0.97579, 0.90406, 0.94039, 0.96694, 1, 0.89903, 1, 1, 1, 0.93582, 0.93582, 0.93582, 1, 0.908, 0.908, 0.918, 0.94219, 0.94219, 0.96544, 1, 1.285, 1, 1, 0.81079, 0.81079, 1, 1, 0.74854, 1, 1, 1, 1, 0.99793, 1, 1, 1, 0.65, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.17173, 1, 0.80535, 0.76169, 1.02058, 1.0732, 1.05486, 1, 1, 1.30692, 1.08595, 1.08595, 1, 1.08595, 1.08595, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.16161, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; | ||
exports.MyriadProBoldFactors = MyriadProBoldFactors; | ||
const MyriadProBoldLineHeight = 1.2; | ||
exports.MyriadProBoldLineHeight = MyriadProBoldLineHeight; | ||
const MyriadProBoldItalicFactors = [1.36898, 1, 0.85576, 0.845, 0.845, 0.85576, 0.85576, 0.85576, 0.85576, 0.85576, 0.85576, 0.85576, 0.85576, 0.85576, 0.85576, 0.85576, 0.85576, 0.80591, 0.80591, 0.80729, 0.80729, 0.80729, 0.80729, 0.80729, 0.80729, 0.85308, 0.94299, 0.94299, 0.95961, 0.94729, 0.77512, 0.77512, 0.77512, 0.77512, 0.77512, 0.77512, 0.77512, 0.77512, 0.77512, 0.92098, 0.77512, 0.77512, 0.66862, 0.92222, 0.7927, 0.95961, 0.97276, 0.83655, 0.86523, 0.7805, 0.86523, 0.86523, 1, 0.86523, 0.92222, 1, 1, 1, 1, 0.92222, 0.92222, 0.98621, 0.86036, 0.98621, 0.98621, 0.98621, 0.98621, 0.98621, 0.98621, 0.98621, 0.98621, 0.98621, 0.98621, 0.69323, 0.98621, 0.71743, 0.71743, 0.81698, 0.81698, 1, 0.79726, 0.79726, 0.92655, 0.79726, 1, 0.79726, 0.81691, 0.98558, 0.98558, 0.92222, 0.92222, 0.92222, 1, 0.92222, 0.92222, 0.90637, 0.909, 0.90637, 0.90637, 0.90637, 0.90637, 0.90637, 0.90637, 0.90637, 0.92346, 0.89711, 0.90637, 0.88127, 0.90251, 0.90251, 0.90637, 0.83809, 0.93157, 0.90976, 0.83392, 0.90637, 0.80729, 0.80729, 0.80729, 1, 0.83809, 0.76463, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.76463, 0.76463, 1, 0.76463, 1, 0.94523, 0.86275, 0.86275, 0.86275, 0.86275, 1, 0.90637, 0.83659, 0.90699, 0.90699, 0.90699, 0.90699, 0.90699, 0.90699, 0.90699, 0.90699, 0.90699, 0.83509, 0.83509, 0.72459, 0.90699, 0.90699, 0.91605, 0.9154, 0.9154, 0.9154, 0.9154, 0.9154, 0.85308, 0.85359, 0.85458, 0.85458, 0.85458, 0.85458, 0.85458, 0.90531, 0.90531, 0.90531, 0.90531, 0.90531, 0.99613, 0.99613, 0.99613, 0.99613, 1.18616, 1, 0.99613, 0.85811, 0.85811, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.99613, 0.92886, 0.92886, 0.99613, 0.92222, 0.80178, 0.99613, 1.08595, 0.99613, 0.99613, 1, 1, 1, 1, 1, 1, 1, 1.02058, 1.02058, 1.16148, 0.76813, 0.99613, 0.91677, 1.21296, 0.8578, 0.90557, 1, 0.80687, 0.80687, 0.94292, 0.94292, 1.18616, 1, 0.8578, 0.95973, 0.78216, 0.78216, 1.18616, 1, 1, 0.78216, 0.78216, 0.78216, 0.78216, 1.18616, 0.97276, 0.81539, 1, 1.18616, 1, 1, 0.78076, 0.93582, 1, 1, 0.91339, 0.97276, 1, 0.91677, 0.9332, 0.9332, 0.76783, 0.91677, 0.89022, 0.90276, 1, 1.18616, 1, 1.30628, 1.08595, 1, 1, 0.97276, 1.18616, 0.95381, 0.90083, 0.90083, 0.90083, 0.90083, 0.90083, 0.90083, 0.90083, 0.90083, 0.97276, 1, 1, 0.90083, 1, 0.89903, 0.92168, 0.90083, 0.91324, 0.91324, 1.02058, 1, 1.36145, 0.92168, 0.92168, 0.9135, 0.80779, 1, 0.80779, 0.98796, 1, 1, 1, 0.97276, 1, 1, 0.97276, 0.97276, 1, 1, 0.9135, 0.86847, 0.9135, 0.9135, 1, 0.9135, 0.94951, 1.18616, 1, 1.02058, 1.08595, 0.82891, 0.82711, 0.80479, 0.80178, 0.92168, 0.92168, 0.92168, 1, 1, 1.18616, 1, 0.95381, 0.95381, 0.95381, 0.95381, 0.95381, 0.95381, 0.97096, 0.95381, 1.05486, 1.23026, 1, 1, 1, 1, 1, 1, 0.95381, 0.95381, 0.95381, 0.95381, 0.95381, 0.95381, 0.98981, 0.98981, 0.95298, 0.9224, 1, 0.95298, 0.95381, 0.95381, 0.85408, 0.6894, 1, 0.74321, 1.02058, 1.08595, 1, 1, 1.02058, 1, 1.20006, 1.0006, 1, 0.93459, 0.71526, 1, 1, 1.02058, 1, 0.92699, 1.02058, 1, 1, 0.92168, 0.92168, 0.79464, 0.92168, 1, 0.97276, 1, 1.08595, 0.92168, 0.86847, 0.97276, 0.91513, 0.91513, 0.91513, 0.91513, 0.91513, 0.87514, 1.18616, 0.91513, 0.91513, 0.91513, 0.85923, 0.85923, 0.91513, 0.91513, 0.97276, 1, 0.99043, 0.99043, 1, 1.08074, 1.04864, 1, 0.91677, 0.91677, 0.91513, 0.92004, 0.96736, 0.94292, 0.94292, 1.14542, 0.97733, 0.93582, 1.26, 1, 0.97355, 0.80487, 1.02058, 1.08595, 0.79199, 0.89398, 0.91677, 0.71541, 0.71541, 0.81625, 0.896, 0.896, 0.896, 0.91782, 1, 0.91782, 0.91782, 0.83266, 0.95077, 0.95077, 1.03493, 0.95077, 1, 0.55509, 1, 0.93481, 1.18616, 1, 0.748, 0.748, 0.748, 1, 0.748, 1, 1, 0.99973, 0.97276, 1, 1, 1, 0.88159, 1, 0.97276, 1.17337, 1, 1, 0.97276, 0.78694, 1, 1.04502, 1.05214, 1.04502, 0.72651, 1, 0.99531, 0.92332, 0.97276, 1, 0.99043, 1.18616, 1, 1.00899, 0.698, 1, 1, 1, 1, 0.97276, 0.91677, 0.91677, 0.91677, 0.91677, 0.91677, 0.91677, 0.91677, 0.91677, 0.89903, 1, 0.66227, 0.96694, 1, 1, 1, 1, 0.86275, 1.04502, 1.18616, 0.78076, 1, 1, 1, 1, 0.96694, 1, 1, 1, 1, 1, 0.85633, 0.93582, 1, 1, 1, 1, 0.91677, 1, 0.90646, 0.90646, 0.90646, 0.90646, 0.91677, 0.91677, 0.92061, 0.94236, 0.94236, 0.94236, 0.94236, 0.94236, 0.89544, 1.0051, 0.89364, 0.89364, 0.89364, 0.89364, 0.97276, 0.89364, 0.9, 0.9, 0.9, 0.9, 0.97276, 0.86842]; | ||
const MyriadProBoldMetrics = { | ||
lineHeight: 1.2, | ||
lineGap: 0.2 | ||
}; | ||
exports.MyriadProBoldMetrics = MyriadProBoldMetrics; | ||
const MyriadProBoldItalicFactors = [1.36898, 1, 1, 0.66227, 0.80779, 0.81625, 0.97276, 0.97276, 0.97733, 0.92222, 0.83266, 0.94292, 0.94292, 1.16148, 1.02058, 0.93582, 0.96694, 0.93582, 1.17337, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.78076, 0.78076, 1.02058, 1.02058, 1.02058, 0.71541, 0.76813, 0.85576, 0.80591, 0.80729, 0.94299, 0.77512, 0.83655, 0.86523, 0.92222, 0.98621, 0.71743, 0.81698, 0.79726, 0.98558, 0.92222, 0.90637, 0.83809, 0.90637, 0.80729, 0.76463, 0.86275, 0.90699, 0.91605, 0.9154, 0.85308, 0.85458, 0.90531, 0.94292, 1.21296, 0.94292, 1.02058, 0.89903, 1.18616, 0.99613, 0.91677, 0.78216, 0.91677, 0.90083, 0.98796, 0.9135, 0.92168, 0.95381, 0.98981, 0.95298, 0.95381, 0.93459, 0.92168, 0.91513, 0.92004, 0.91677, 0.95077, 0.748, 1.04502, 0.91677, 0.92061, 0.94236, 0.89544, 0.89364, 0.9, 0.80687, 0.8578, 0.80687, 1.02058, 0.80779, 0.97276, 0.97276, 0.97276, 0.97276, 0.8578, 0.99973, 1.18616, 0.91339, 1.08074, 0.82891, 1.02058, 0.55509, 0.71526, 0.89022, 1.08595, 1, 1, 1.18616, 1, 0.96736, 0.93582, 1.18616, 1, 1.04864, 0.82711, 0.99043, 0.99043, 0.99043, 0.71541, 0.85576, 0.85576, 0.85576, 0.85576, 0.85576, 0.85576, 0.845, 0.80729, 0.77512, 0.77512, 0.77512, 0.77512, 0.98621, 0.98621, 0.98621, 0.98621, 0.95961, 0.92222, 0.90637, 0.90637, 0.90637, 0.90637, 0.90637, 1.02058, 0.90251, 0.90699, 0.90699, 0.90699, 0.90699, 0.85458, 0.83659, 0.94951, 0.99613, 0.99613, 0.99613, 0.99613, 0.99613, 0.99613, 0.85811, 0.78216, 0.90083, 0.90083, 0.90083, 0.90083, 0.95381, 0.95381, 0.95381, 0.95381, 0.9135, 0.92168, 0.91513, 0.91513, 0.91513, 0.91513, 0.91513, 1.08595, 0.91677, 0.91677, 0.91677, 0.91677, 0.91677, 0.89364, 0.92332, 0.89364, 0.85576, 0.99613, 0.85576, 0.99613, 0.85576, 0.99613, 0.80729, 0.78216, 0.80729, 0.78216, 0.80729, 0.78216, 0.80729, 0.78216, 0.94299, 0.76783, 0.95961, 0.91677, 0.77512, 0.90083, 0.77512, 0.90083, 0.77512, 0.90083, 0.77512, 0.90083, 0.77512, 0.90083, 0.86523, 0.9135, 0.86523, 0.9135, 0.86523, 0.9135, 1, 1, 0.92222, 0.92168, 0.92222, 0.92168, 0.98621, 0.95381, 0.98621, 0.95381, 0.98621, 0.95381, 0.98621, 0.95381, 0.98621, 0.95381, 0.86036, 0.97096, 0.71743, 0.98981, 1, 1, 0.95298, 0.79726, 0.95381, 1, 1, 0.79726, 0.6894, 0.79726, 0.74321, 0.81691, 1.0006, 0.92222, 0.92168, 1, 1, 0.92222, 0.92168, 0.79464, 0.92098, 0.92168, 0.90637, 0.91513, 0.90637, 0.91513, 0.90637, 0.91513, 0.909, 0.87514, 0.80729, 0.95077, 1, 1, 0.80729, 0.95077, 0.76463, 0.748, 0.76463, 0.748, 1, 1, 0.76463, 0.748, 1, 1, 0.86275, 0.72651, 0.86275, 1.04502, 0.90699, 0.91677, 0.90699, 0.91677, 0.90699, 0.91677, 0.90699, 0.91677, 0.90699, 0.91677, 0.90699, 0.91677, 0.9154, 0.94236, 0.85458, 0.89364, 0.85458, 0.90531, 0.9, 0.90531, 0.9, 0.90531, 0.9, 1, 0.97276, 0.85576, 0.99613, 0.845, 0.85811, 0.90251, 0.91677, 1, 1, 0.86275, 1.04502, 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.00899, 1.30628, 0.85576, 0.80178, 0.66862, 0.7927, 0.69323, 0.88127, 0.72459, 0.89711, 0.95381, 0.85576, 0.80591, 0.7805, 0.94729, 0.77512, 0.90531, 0.92222, 0.90637, 0.98621, 0.81698, 0.92655, 0.98558, 0.92222, 0.85359, 0.90637, 0.90976, 0.83809, 0.94523, 0.86275, 0.83509, 0.93157, 0.85308, 0.83392, 0.92346, 0.98621, 0.83509, 0.92886, 0.91324, 0.92168, 0.95381, 0.90646, 0.92886, 0.90557, 0.86847, 0.90276, 0.91324, 0.86842, 0.92168, 0.99531, 0.95381, 0.9224, 0.85408, 0.92699, 0.86847, 1.0051, 0.91513, 0.80487, 0.93481, 1, 0.88159, 1.05214, 0.90646, 0.97355, 0.81539, 0.89398, 0.85923, 0.95381, 0.90646, 0.91513, 0.90646, 0.85923, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.9154, 0.94236, 0.9154, 0.94236, 0.9154, 0.94236, 0.85458, 0.89364, 0.96694, 1, 0.89903, 1, 1, 1, 0.91782, 0.91782, 0.91782, 1, 0.896, 0.896, 0.896, 0.9332, 0.9332, 0.95973, 1, 1.26, 1, 1, 0.80479, 0.80178, 1, 1, 0.85633, 1, 1, 1, 1, 0.97276, 1, 1, 1, 0.698, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.14542, 1, 0.79199, 0.78694, 1.02058, 1.03493, 1.05486, 1, 1, 1.23026, 1.08595, 1.08595, 1, 1.08595, 1.08595, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.20006, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; | ||
exports.MyriadProBoldItalicFactors = MyriadProBoldItalicFactors; | ||
const MyriadProBoldItalicLineHeight = 1.2; | ||
exports.MyriadProBoldItalicLineHeight = MyriadProBoldItalicLineHeight; | ||
const MyriadProItalicFactors = [1.36898, 1, 0.85158, 0.773, 0.773, 0.85158, 0.85158, 0.85158, 0.85158, 0.85158, 0.85158, 0.85158, 0.85158, 0.85158, 0.85158, 0.85158, 0.85158, 0.77812, 0.77812, 0.76852, 0.76852, 0.76852, 0.76852, 0.76852, 0.76852, 0.78112, 0.89591, 0.89591, 0.90561, 0.88836, 0.70466, 0.70466, 0.70466, 0.70466, 0.70466, 0.70466, 0.70466, 0.70466, 0.70466, 0.87396, 0.70466, 0.70466, 0.62264, 0.86822, 0.7646, 0.90561, 0.88465, 0.76125, 0.80094, 0.76449, 0.80094, 0.80094, 1, 0.80094, 0.86822, 1, 1, 1, 1, 0.86822, 0.86822, 0.83864, 0.81402, 0.83864, 0.83864, 0.83864, 0.83864, 0.83864, 0.83864, 0.83864, 0.83864, 0.83864, 0.83864, 0.65351, 0.83864, 0.728, 0.728, 0.77212, 0.77212, 1, 0.79475, 0.79475, 0.85308, 0.79475, 1, 0.79475, 0.80553, 0.93637, 0.93637, 0.87514, 0.87514, 0.87514, 1, 0.87514, 0.87514, 0.8588, 0.867, 0.8588, 0.8588, 0.8588, 0.8588, 0.8588, 0.8588, 0.8588, 0.89386, 0.89947, 0.8588, 0.86026, 0.85751, 0.85751, 0.8588, 0.76013, 0.82565, 0.85701, 0.77899, 0.8588, 0.72421, 0.72421, 0.72421, 1, 0.76013, 0.69866, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.69866, 0.69866, 1, 0.69866, 1, 0.89058, 0.77598, 0.77598, 0.77598, 0.77598, 1, 0.8588, 0.76013, 0.85991, 0.85991, 0.85991, 0.85991, 0.85991, 0.85991, 0.85991, 0.85991, 0.85991, 0.8156, 0.8156, 0.69461, 0.85991, 0.85991, 0.80811, 0.87832, 0.87832, 0.87832, 0.87832, 0.87832, 0.78112, 0.82352, 0.77512, 0.77512, 0.77512, 0.77512, 0.77512, 0.8562, 0.8562, 0.8562, 0.8562, 0.8562, 0.93859, 0.93859, 0.93859, 0.93859, 1.15012, 1, 0.93859, 0.8075, 0.8075, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.93859, 0.9486, 0.9486, 0.93859, 0.88307, 0.77025, 0.93859, 1.08595, 0.93859, 0.93859, 1, 1, 1, 1, 1, 1, 1, 1.27014, 1.02058, 1.06383, 0.70926, 0.93859, 0.94399, 1.18417, 0.83537, 0.93298, 1, 0.85034, 0.85034, 1.0222, 1.0222, 1.15012, 1, 0.83537, 0.79121, 0.846, 0.846, 1.15012, 1, 1, 0.846, 0.846, 0.846, 0.846, 1.15012, 0.88465, 0.77487, 1, 1.15012, 1, 1, 0.75945, 0.75945, 1, 1, 0.9161, 0.88465, 1, 0.94399, 0.86847, 0.86847, 0.8544, 0.94399, 0.79519, 0.93942, 1, 1.15012, 1, 1.03901, 1.08595, 1, 1, 0.88465, 1.15012, 0.82424, 0.81453, 0.81453, 0.81453, 0.81453, 0.81453, 0.81453, 0.81453, 0.81453, 0.88465, 1, 1, 0.81453, 1, 0.89903, 0.96017, 0.81453, 0.92388, 0.92388, 1.02058, 1, 1.36145, 0.96186, 0.96186, 0.9278, 0.84943, 1, 0.70869, 1.0186, 1, 1, 1, 0.88465, 1, 1, 0.88465, 0.88465, 1, 1, 0.94219, 0.878, 0.94219, 0.94219, 1, 0.94219, 0.88075, 1.15012, 1, 1.02058, 1.08595, 0.73541, 0.73361, 0.73572, 0.73572, 0.96017, 0.96017, 0.96017, 1, 1, 1.15012, 1, 1.03075, 0.82424, 0.82424, 0.82424, 0.82424, 0.82424, 1.02738, 0.82424, 1.02119, 1.06233, 1, 1, 1, 1, 1, 1, 1.03075, 1.03075, 1.03075, 1.03075, 1.03075, 0.82424, 1.02175, 1.02175, 0.912, 0.922, 1, 0.912, 1.03075, 1.03075, 0.88787, 0.83911, 1, 0.66266, 1.02058, 1.08595, 1, 1, 1.02058, 1, 1.05233, 1.06676, 1, 0.96998, 0.69353, 1, 1, 1.02058, 1, 0.95829, 1.02058, 1, 1, 0.96017, 0.96017, 0.86865, 0.96017, 1, 0.88465, 1, 1.08595, 0.96017, 0.88, 0.88465, 0.93859, 0.93859, 0.93859, 0.93859, 0.93859, 0.84759, 1.15012, 0.93859, 0.93859, 0.93859, 0.86799, 0.86799, 0.93859, 0.93859, 0.88465, 1, 0.9005, 0.9005, 1, 0.94565, 0.9446, 1, 0.8562, 0.8562, 0.93859, 0.94399, 0.91974, 0.85283, 0.85283, 1.04828, 0.86936, 0.75945, 1.124, 1, 0.93969, 0.78815, 1.02058, 1.08595, 0.74948, 0.85769, 0.94399, 0.69046, 0.62864, 0.85639, 1.027, 1.027, 1.027, 0.87321, 1, 0.87321, 0.87321, 0.86948, 0.95493, 0.95493, 0.98391, 0.95493, 1, 0.53609, 1, 0.93758, 1.15313, 1, 0.746, 0.746, 0.746, 1, 0.746, 1, 1, 0.90083, 0.88465, 1, 1, 1, 0.89217, 1, 0.88465, 1.17337, 1, 1, 0.88465, 0.75187, 1, 1.12658, 1.03737, 1.12658, 0.88417, 1, 0.95119, 0.94578, 0.88465, 1, 0.9005, 1.15012, 1, 1.08106, 0.669, 1, 1, 1, 1, 0.88465, 0.94578, 0.94578, 0.94578, 0.94578, 0.94578, 0.94578, 0.94578, 0.94578, 0.89903, 1, 0.65507, 0.9219, 1, 1, 1, 1, 0.77598, 1.12658, 1.15012, 0.75945, 1, 1, 1, 1, 0.9219, 1, 1, 1, 1, 1, 0.85034, 0.75945, 1, 1, 1, 1, 0.94578, 1, 0.91123, 0.91123, 0.91123, 0.91123, 0.94578, 0.94578, 0.91, 0.979, 0.979, 0.979, 0.979, 0.979, 0.882, 0.93559, 0.882, 0.882, 0.882, 0.882, 0.88465, 0.882, 0.83, 0.83, 0.83, 0.83, 0.88465, 0.84596]; | ||
const MyriadProBoldItalicMetrics = { | ||
lineHeight: 1.2, | ||
lineGap: 0.2 | ||
}; | ||
exports.MyriadProBoldItalicMetrics = MyriadProBoldItalicMetrics; | ||
const MyriadProItalicFactors = [1.36898, 1, 1, 0.65507, 0.84943, 0.85639, 0.88465, 0.88465, 0.86936, 0.88307, 0.86948, 0.85283, 0.85283, 1.06383, 1.02058, 0.75945, 0.9219, 0.75945, 1.17337, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.75945, 0.75945, 1.02058, 1.02058, 1.02058, 0.69046, 0.70926, 0.85158, 0.77812, 0.76852, 0.89591, 0.70466, 0.76125, 0.80094, 0.86822, 0.83864, 0.728, 0.77212, 0.79475, 0.93637, 0.87514, 0.8588, 0.76013, 0.8588, 0.72421, 0.69866, 0.77598, 0.85991, 0.80811, 0.87832, 0.78112, 0.77512, 0.8562, 1.0222, 1.18417, 1.0222, 1.27014, 0.89903, 1.15012, 0.93859, 0.94399, 0.846, 0.94399, 0.81453, 1.0186, 0.94219, 0.96017, 1.03075, 1.02175, 0.912, 1.03075, 0.96998, 0.96017, 0.93859, 0.94399, 0.94399, 0.95493, 0.746, 1.12658, 0.94578, 0.91, 0.979, 0.882, 0.882, 0.83, 0.85034, 0.83537, 0.85034, 1.02058, 0.70869, 0.88465, 0.88465, 0.88465, 0.88465, 0.83537, 0.90083, 1.15012, 0.9161, 0.94565, 0.73541, 1.02058, 0.53609, 0.69353, 0.79519, 1.08595, 1, 1, 1.15012, 1, 0.91974, 0.75945, 1.15012, 1, 0.9446, 0.73361, 0.9005, 0.9005, 0.9005, 0.62864, 0.85158, 0.85158, 0.85158, 0.85158, 0.85158, 0.85158, 0.773, 0.76852, 0.70466, 0.70466, 0.70466, 0.70466, 0.83864, 0.83864, 0.83864, 0.83864, 0.90561, 0.87514, 0.8588, 0.8588, 0.8588, 0.8588, 0.8588, 1.02058, 0.85751, 0.85991, 0.85991, 0.85991, 0.85991, 0.77512, 0.76013, 0.88075, 0.93859, 0.93859, 0.93859, 0.93859, 0.93859, 0.93859, 0.8075, 0.846, 0.81453, 0.81453, 0.81453, 0.81453, 0.82424, 0.82424, 0.82424, 0.82424, 0.9278, 0.96017, 0.93859, 0.93859, 0.93859, 0.93859, 0.93859, 1.08595, 0.8562, 0.94578, 0.94578, 0.94578, 0.94578, 0.882, 0.94578, 0.882, 0.85158, 0.93859, 0.85158, 0.93859, 0.85158, 0.93859, 0.76852, 0.846, 0.76852, 0.846, 0.76852, 0.846, 0.76852, 0.846, 0.89591, 0.8544, 0.90561, 0.94399, 0.70466, 0.81453, 0.70466, 0.81453, 0.70466, 0.81453, 0.70466, 0.81453, 0.70466, 0.81453, 0.80094, 0.94219, 0.80094, 0.94219, 0.80094, 0.94219, 1, 1, 0.86822, 0.96017, 0.86822, 0.96017, 0.83864, 0.82424, 0.83864, 0.82424, 0.83864, 0.82424, 0.83864, 1.03075, 0.83864, 0.82424, 0.81402, 1.02738, 0.728, 1.02175, 1, 1, 0.912, 0.79475, 1.03075, 1, 1, 0.79475, 0.83911, 0.79475, 0.66266, 0.80553, 1.06676, 0.87514, 0.96017, 1, 1, 0.87514, 0.96017, 0.86865, 0.87396, 0.96017, 0.8588, 0.93859, 0.8588, 0.93859, 0.8588, 0.93859, 0.867, 0.84759, 0.72421, 0.95493, 1, 1, 0.72421, 0.95493, 0.69866, 0.746, 0.69866, 0.746, 1, 1, 0.69866, 0.746, 1, 1, 0.77598, 0.88417, 0.77598, 1.12658, 0.85991, 0.94578, 0.85991, 0.94578, 0.85991, 0.94578, 0.85991, 0.94578, 0.85991, 0.94578, 0.85991, 0.94578, 0.87832, 0.979, 0.77512, 0.882, 0.77512, 0.8562, 0.83, 0.8562, 0.83, 0.8562, 0.83, 1, 0.88465, 0.85158, 0.93859, 0.773, 0.8075, 0.85751, 0.8562, 1, 1, 0.77598, 1.12658, 1.15012, 1.15012, 1.15012, 1.15012, 1.15012, 1.15313, 1.15012, 1.15012, 1.15012, 1.08106, 1.03901, 0.85158, 0.77025, 0.62264, 0.7646, 0.65351, 0.86026, 0.69461, 0.89947, 1.03075, 0.85158, 0.77812, 0.76449, 0.88836, 0.70466, 0.8562, 0.86822, 0.8588, 0.83864, 0.77212, 0.85308, 0.93637, 0.87514, 0.82352, 0.8588, 0.85701, 0.76013, 0.89058, 0.77598, 0.8156, 0.82565, 0.78112, 0.77899, 0.89386, 0.83864, 0.8156, 0.9486, 0.92388, 0.96186, 1.03075, 0.91123, 0.9486, 0.93298, 0.878, 0.93942, 0.92388, 0.84596, 0.96186, 0.95119, 1.03075, 0.922, 0.88787, 0.95829, 0.88, 0.93559, 0.93859, 0.78815, 0.93758, 1, 0.89217, 1.03737, 0.91123, 0.93969, 0.77487, 0.85769, 0.86799, 1.03075, 0.91123, 0.93859, 0.91123, 0.86799, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.87832, 0.979, 0.87832, 0.979, 0.87832, 0.979, 0.77512, 0.882, 0.9219, 1, 0.89903, 1, 1, 1, 0.87321, 0.87321, 0.87321, 1, 1.027, 1.027, 1.027, 0.86847, 0.86847, 0.79121, 1, 1.124, 1, 1, 0.73572, 0.73572, 1, 1, 0.85034, 1, 1, 1, 1, 0.88465, 1, 1, 1, 0.669, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.04828, 1, 0.74948, 0.75187, 1.02058, 0.98391, 1.02119, 1, 1, 1.06233, 1.08595, 1.08595, 1, 1.08595, 1.08595, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.05233, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; | ||
exports.MyriadProItalicFactors = MyriadProItalicFactors; | ||
const MyriadProItalicLineHeight = 1.2; | ||
exports.MyriadProItalicLineHeight = MyriadProItalicLineHeight; | ||
const MyriadProRegularFactors = [1.36898, 1, 0.91755, 0.788, 0.788, 0.91755, 0.91755, 0.91755, 0.91755, 0.91755, 0.91755, 0.92138, 0.91755, 0.91755, 0.91755, 0.91755, 0.91755, 0.8126, 0.8126, 0.80314, 0.80314, 0.80314, 0.80314, 0.80314, 0.80314, 0.85608, 0.92222, 0.92222, 0.92915, 0.92819, 0.73764, 0.73764, 0.73764, 0.73764, 0.73764, 0.73764, 0.73764, 0.73764, 0.73764, 0.90991, 0.73764, 0.73764, 0.7154, 0.90284, 0.86169, 0.92915, 0.92241, 0.79726, 0.83051, 0.81884, 0.83051, 0.83051, 1, 0.83051, 0.90284, 1, 1, 1, 1, 0.90976, 0.90284, 0.86023, 0.82873, 0.86023, 0.86023, 0.86023, 0.86023, 0.86023, 0.86023, 0.86023, 0.86023, 0.86023, 0.86023, 0.80513, 0.86023, 0.74, 0.74, 0.8126, 0.8126, 1, 0.84869, 0.84869, 0.91172, 0.84869, 1, 0.84869, 0.85588, 0.96518, 0.96518, 0.91115, 0.91115, 0.91115, 1, 0.91115, 0.91115, 0.8858, 0.894, 0.8858, 0.8858, 0.8858, 0.8858, 0.8858, 0.8858, 0.8858, 0.94307, 0.98612, 0.8858, 0.94007, 0.8858, 0.8858, 0.8858, 0.79761, 0.89992, 0.87791, 0.81992, 0.8858, 0.74498, 0.74498, 0.74498, 1, 0.79761, 0.73914, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.73914, 0.73914, 1, 0.73914, 1, 0.89297, 0.81363, 0.81363, 0.81363, 0.81363, 1, 0.8858, 0.79611, 0.89591, 0.89591, 0.89591, 0.89591, 0.89591, 0.89591, 0.89591, 0.89591, 0.89591, 0.88157, 0.88157, 0.82528, 0.89591, 0.89591, 0.83659, 0.89633, 0.89633, 0.89633, 0.89633, 0.89633, 0.85608, 0.83089, 0.8111, 0.8111, 0.8111, 0.8111, 0.8111, 0.90531, 0.90531, 0.90531, 0.90531, 0.90531, 0.86667, 0.86667, 0.86667, 0.86667, 0.90088, 0.86667, 0.86936, 0.86936, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.86667, 0.95308, 0.95308, 0.86667, 0.90706, 0.78105, 0.86667, 1.08595, 0.86667, 0.86667, 1, 1, 1, 1, 1, 1, 1, 1.27014, 1.02058, 1.0664, 0.72601, 0.86667, 1.0231, 1.22736, 0.92006, 0.97358, 1, 0.85034, 0.85034, 1.0222, 1.0222, 0.90088, 0.92006, 0.80549, 0.896, 0.896, 0.90088, 0.896, 0.896, 0.896, 0.896, 0.90088, 0.92241, 0.87064, 1, 0.90088, 1, 0.74505, 0.74505, 0.91882, 0.92241, 1.01411, 0.89903, 0.89903, 0.93372, 1.01411, 0.79519, 0.98088, 1, 0.90088, 1.03901, 1.08595, 1, 1, 0.92241, 0.90088, 0.84224, 0.90083, 0.90083, 0.90083, 0.90083, 0.90083, 0.90083, 0.90083, 0.90083, 0.92241, 1, 0.90083, 1, 0.89903, 0.99793, 0.90083, 0.98699, 0.98699, 1.02058, 1, 1.36145, 0.99793, 0.99793, 0.97276, 0.82784, 1, 0.69067, 1.05099, 1, 1, 1, 0.92241, 1, 0.92241, 0.92241, 1, 1.00512, 0.928, 1.00512, 1.00512, 1, 1.00512, 0.89713, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90088, 1.02058, 1.08595, 0.75339, 0.75339, 0.76575, 0.76575, 0.99793, 0.99793, 0.99793, 1, 1, 0.90088, 1.05326, 0.84224, 0.84224, 0.84224, 0.84224, 0.84224, 1.07469, 0.84224, 1.02119, 1.1536, 1, 1, 1, 1, 1, 1, 1.05326, 1.06226, 1.06226, 1.06226, 1.06226, 0.84224, 1.09377, 1.09377, 0.938, 0.986, 1, 0.938, 1.06226, 1.06226, 0.944, 0.83704, 1, 0.81441, 1.02058, 1.08595, 1, 1, 1.02058, 1, 1.05638, 1.08927, 1, 1.00119, 0.54324, 1, 1, 1.02058, 1, 0.95978, 1.02058, 1, 1, 0.99793, 0.99793, 0.91887, 0.99793, 1, 0.92241, 1, 1.08595, 0.99793, 0.938, 0.89364, 0.98714, 0.98714, 0.98714, 0.98714, 0.98714, 0.91434, 0.90088, 0.98714, 0.98714, 0.98714, 0.88888, 0.88888, 0.98714, 0.98714, 0.92241, 1, 0.91009, 0.91009, 1, 0.93484, 0.97198, 1, 0.89876, 0.89876, 0.98714, 1.0231, 0.95325, 0.85283, 0.85283, 1.07257, 0.89073, 0.74505, 1.156, 1, 0.99007, 0.80442, 1.02058, 1.08595, 0.74705, 0.91879, 1.01231, 0.73002, 0.66466, 0.94935, 1.06904, 1.06304, 1.06304, 0.93173, 1, 0.93173, 0.93173, 0.98472, 0.98196, 0.98196, 1.024, 0.98196, 1, 0.56866, 1, 0.98972, 0.90088, 1, 0.792, 0.792, 0.792, 1, 0.792, 1, 1, 0.9332, 0.92241, 1, 1, 0.89762, 1, 0.92241, 1.23456, 1, 1, 0.92241, 0.71119, 1, 1.19137, 1.04552, 1.19137, 0.904, 1, 0.96017, 1.0231, 0.92241, 1, 0.91009, 0.90088, 0.90388, 0.619, 1, 1, 1, 1, 0.92241, 0.99074, 0.99074, 0.99074, 0.99074, 0.99074, 0.99074, 0.99074, 0.99074, 0.89903, 1, 0.76305, 0.9219, 1, 1, 1, 1, 0.81363, 1.19137, 0.90088, 0.74505, 1, 1, 1, 1, 0.9219, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.72458, 0.74505, 1, 1, 1, 1, 1, 0.99074, 1, 0.95817, 0.95817, 0.95817, 0.95817, 0.99074, 0.99074, 0.962, 1.01915, 1.01915, 1.01915, 1.01915, 1.01915, 0.926, 0.96705, 0.942, 0.942, 0.942, 0.942, 0.92241, 0.942, 0.856, 0.856, 0.856, 0.856, 0.92241, 0.92761]; | ||
const MyriadProItalicMetrics = { | ||
lineHeight: 1.2, | ||
lineGap: 0.2 | ||
}; | ||
exports.MyriadProItalicMetrics = MyriadProItalicMetrics; | ||
const MyriadProRegularFactors = [1.36898, 1, 1, 0.76305, 0.82784, 0.94935, 0.89364, 0.92241, 0.89073, 0.90706, 0.98472, 0.85283, 0.85283, 1.0664, 1.02058, 0.74505, 0.9219, 0.74505, 1.23456, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.74505, 0.74505, 1.02058, 1.02058, 1.02058, 0.73002, 0.72601, 0.91755, 0.8126, 0.80314, 0.92222, 0.73764, 0.79726, 0.83051, 0.90284, 0.86023, 0.74, 0.8126, 0.84869, 0.96518, 0.91115, 0.8858, 0.79761, 0.8858, 0.74498, 0.73914, 0.81363, 0.89591, 0.83659, 0.89633, 0.85608, 0.8111, 0.90531, 1.0222, 1.22736, 1.0222, 1.27014, 0.89903, 0.90088, 0.86667, 1.0231, 0.896, 1.01411, 0.90083, 1.05099, 1.00512, 0.99793, 1.05326, 1.09377, 0.938, 1.06226, 1.00119, 0.99793, 0.98714, 1.0231, 1.01231, 0.98196, 0.792, 1.19137, 0.99074, 0.962, 1.01915, 0.926, 0.942, 0.856, 0.85034, 0.92006, 0.85034, 1.02058, 0.69067, 0.92241, 0.92241, 0.92241, 0.92241, 0.92006, 0.9332, 0.90088, 0.91882, 0.93484, 0.75339, 1.02058, 0.56866, 0.54324, 0.79519, 1.08595, 1, 1, 0.90088, 1, 0.95325, 0.74505, 0.90088, 1, 0.97198, 0.75339, 0.91009, 0.91009, 0.91009, 0.66466, 0.91755, 0.91755, 0.91755, 0.91755, 0.91755, 0.91755, 0.788, 0.80314, 0.73764, 0.73764, 0.73764, 0.73764, 0.86023, 0.86023, 0.86023, 0.86023, 0.92915, 0.91115, 0.8858, 0.8858, 0.8858, 0.8858, 0.8858, 1.02058, 0.8858, 0.89591, 0.89591, 0.89591, 0.89591, 0.8111, 0.79611, 0.89713, 0.86667, 0.86667, 0.86667, 0.86667, 0.86667, 0.86667, 0.86936, 0.896, 0.90083, 0.90083, 0.90083, 0.90083, 0.84224, 0.84224, 0.84224, 0.84224, 0.97276, 0.99793, 0.98714, 0.98714, 0.98714, 0.98714, 0.98714, 1.08595, 0.89876, 0.99074, 0.99074, 0.99074, 0.99074, 0.942, 1.0231, 0.942, 0.91755, 0.86667, 0.91755, 0.86667, 0.91755, 0.86667, 0.80314, 0.896, 0.80314, 0.896, 0.80314, 0.896, 0.80314, 0.896, 0.92222, 0.93372, 0.92915, 1.01411, 0.73764, 0.90083, 0.73764, 0.90083, 0.73764, 0.90083, 0.73764, 0.90083, 0.73764, 0.90083, 0.83051, 1.00512, 0.83051, 1.00512, 0.83051, 1.00512, 1, 1, 0.90284, 0.99793, 0.90976, 0.99793, 0.86023, 0.84224, 0.86023, 0.84224, 0.86023, 0.84224, 0.86023, 1.05326, 0.86023, 0.84224, 0.82873, 1.07469, 0.74, 1.09377, 1, 1, 0.938, 0.84869, 1.06226, 1, 1, 0.84869, 0.83704, 0.84869, 0.81441, 0.85588, 1.08927, 0.91115, 0.99793, 1, 1, 0.91115, 0.99793, 0.91887, 0.90991, 0.99793, 0.8858, 0.98714, 0.8858, 0.98714, 0.8858, 0.98714, 0.894, 0.91434, 0.74498, 0.98196, 1, 1, 0.74498, 0.98196, 0.73914, 0.792, 0.73914, 0.792, 1, 1, 0.73914, 0.792, 1, 1, 0.81363, 0.904, 0.81363, 1.19137, 0.89591, 0.99074, 0.89591, 0.99074, 0.89591, 0.99074, 0.89591, 0.99074, 0.89591, 0.99074, 0.89591, 0.99074, 0.89633, 1.01915, 0.8111, 0.942, 0.8111, 0.90531, 0.856, 0.90531, 0.856, 0.90531, 0.856, 1, 0.92241, 0.91755, 0.86667, 0.788, 0.86936, 0.8858, 0.89876, 1, 1, 0.81363, 1.19137, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90388, 1.03901, 0.92138, 0.78105, 0.7154, 0.86169, 0.80513, 0.94007, 0.82528, 0.98612, 1.06226, 0.91755, 0.8126, 0.81884, 0.92819, 0.73764, 0.90531, 0.90284, 0.8858, 0.86023, 0.8126, 0.91172, 0.96518, 0.91115, 0.83089, 0.8858, 0.87791, 0.79761, 0.89297, 0.81363, 0.88157, 0.89992, 0.85608, 0.81992, 0.94307, 0.86023, 0.88157, 0.95308, 0.98699, 0.99793, 1.06226, 0.95817, 0.95308, 0.97358, 0.928, 0.98088, 0.98699, 0.92761, 0.99793, 0.96017, 1.06226, 0.986, 0.944, 0.95978, 0.938, 0.96705, 0.98714, 0.80442, 0.98972, 1, 0.89762, 1.04552, 0.95817, 0.99007, 0.87064, 0.91879, 0.88888, 1.06226, 0.95817, 0.98714, 0.95817, 0.88888, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.89633, 1.01915, 0.89633, 1.01915, 0.89633, 1.01915, 0.8111, 0.942, 0.9219, 1, 0.89903, 1, 1, 1, 0.93173, 0.93173, 0.93173, 1, 1.06304, 1.06304, 1.06904, 0.89903, 0.89903, 0.80549, 1, 1.156, 1, 1, 0.76575, 0.76575, 1, 1, 0.72458, 1, 1, 1, 1, 0.92241, 1, 1, 1, 0.619, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.07257, 1, 0.74705, 0.71119, 1.02058, 1.024, 1.02119, 1, 1, 1.1536, 1.08595, 1.08595, 1, 1.08595, 1.08595, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.05638, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; | ||
exports.MyriadProRegularFactors = MyriadProRegularFactors; | ||
const MyriadProRegularLineHeight = 1.2; | ||
exports.MyriadProRegularLineHeight = MyriadProRegularLineHeight; | ||
const MyriadProRegularMetrics = { | ||
lineHeight: 1.2, | ||
lineGap: 0.2 | ||
}; | ||
exports.MyriadProRegularMetrics = MyriadProRegularMetrics; |
@@ -543,3 +543,3 @@ /** | ||
constructor(intent, streamSink) { | ||
constructor(intent = 0, streamSink) { | ||
this._streamSink = streamSink; | ||
@@ -549,3 +549,3 @@ this.fnArray = []; | ||
if (streamSink && !(intent && intent.startsWith("oplist-"))) { | ||
if (streamSink && !(intent & _util.RenderingIntentFlag.OPLIST)) { | ||
this.optimizer = new QueueOptimizer(this); | ||
@@ -552,0 +552,0 @@ } else { |
@@ -128,7 +128,7 @@ /** | ||
while (!(0, _primitives.isCmd)(this.buf1, "]") && !(0, _primitives.isEOF)(this.buf1)) { | ||
while (!(0, _primitives.isCmd)(this.buf1, "]") && this.buf1 !== _primitives.EOF) { | ||
array.push(this.getObj(cipherTransform)); | ||
} | ||
if ((0, _primitives.isEOF)(this.buf1)) { | ||
if (this.buf1 === _primitives.EOF) { | ||
if (this.recoveryMode) { | ||
@@ -147,3 +147,3 @@ return array; | ||
while (!(0, _primitives.isCmd)(this.buf1, ">>") && !(0, _primitives.isEOF)(this.buf1)) { | ||
while (!(0, _primitives.isCmd)(this.buf1, ">>") && this.buf1 !== _primitives.EOF) { | ||
if (!(0, _primitives.isName)(this.buf1)) { | ||
@@ -158,3 +158,3 @@ (0, _util.info)("Malformed dictionary: key must be a name object"); | ||
if ((0, _primitives.isEOF)(this.buf1)) { | ||
if (this.buf1 === _primitives.EOF) { | ||
break; | ||
@@ -166,3 +166,3 @@ } | ||
if ((0, _primitives.isEOF)(this.buf1)) { | ||
if (this.buf1 === _primitives.EOF) { | ||
if (this.recoveryMode) { | ||
@@ -471,3 +471,3 @@ return dict; | ||
while (!(0, _primitives.isCmd)(this.buf1, "ID") && !(0, _primitives.isEOF)(this.buf1)) { | ||
while (!(0, _primitives.isCmd)(this.buf1, "ID") && this.buf1 !== _primitives.EOF) { | ||
if (!(0, _primitives.isName)(this.buf1)) { | ||
@@ -480,3 +480,3 @@ throw new _util.FormatError("Dictionary key must be a name object"); | ||
if ((0, _primitives.isEOF)(this.buf1)) { | ||
if (this.buf1 === _primitives.EOF) { | ||
break; | ||
@@ -1235,2 +1235,12 @@ } | ||
let str = String.fromCharCode(ch); | ||
if (ch < 0x20 || ch > 0x7f) { | ||
const nextCh = this.peekChar(); | ||
if (nextCh >= 0x20 && nextCh <= 0x7f) { | ||
this.nextChar(); | ||
return _primitives.Cmd.get(str); | ||
} | ||
} | ||
const knownCommands = this.knownCommands; | ||
@@ -1237,0 +1247,0 @@ let knownCommandFound = knownCommands && knownCommands[str] !== undefined; |
@@ -53,3 +53,3 @@ /** | ||
static parseShading(shading, matrix, xref, res, handler, pdfFunctionFactory, localColorSpaceCache) { | ||
static parseShading(shading, xref, res, handler, pdfFunctionFactory, localColorSpaceCache) { | ||
const dict = (0, _primitives.isStream)(shading) ? shading.dict : shading; | ||
@@ -62,3 +62,3 @@ const type = dict.get("ShadingType"); | ||
case ShadingType.RADIAL: | ||
return new RadialAxialShading(dict, matrix, xref, res, pdfFunctionFactory, localColorSpaceCache); | ||
return new RadialAxialShading(dict, xref, res, pdfFunctionFactory, localColorSpaceCache); | ||
@@ -69,3 +69,3 @@ case ShadingType.FREE_FORM_MESH: | ||
case ShadingType.TENSOR_PATCH_MESH: | ||
return new MeshShading(shading, matrix, xref, res, pdfFunctionFactory, localColorSpaceCache); | ||
return new MeshShading(shading, xref, res, pdfFunctionFactory, localColorSpaceCache); | ||
@@ -110,5 +110,4 @@ default: | ||
class RadialAxialShading extends BaseShading { | ||
constructor(dict, matrix, xref, resources, pdfFunctionFactory, localColorSpaceCache) { | ||
constructor(dict, xref, resources, pdfFunctionFactory, localColorSpaceCache) { | ||
super(); | ||
this.matrix = matrix; | ||
this.coordsArr = dict.getArray("Coords"); | ||
@@ -228,3 +227,3 @@ this.shadingType = dict.get("ShadingType"); | ||
return ["RadialAxial", type, this.bbox, this.colorStops, p0, p1, r0, r1, this.matrix]; | ||
return ["RadialAxial", type, this.bbox, this.colorStops, p0, p1, r0, r1]; | ||
} | ||
@@ -373,3 +372,3 @@ | ||
constructor(stream, matrix, xref, resources, pdfFunctionFactory, localColorSpaceCache) { | ||
constructor(stream, xref, resources, pdfFunctionFactory, localColorSpaceCache) { | ||
super(); | ||
@@ -382,3 +381,2 @@ | ||
const dict = stream.dict; | ||
this.matrix = matrix; | ||
this.shadingType = dict.get("ShadingType"); | ||
@@ -941,3 +939,3 @@ const bbox = dict.getArray("BBox"); | ||
getIR() { | ||
return ["Mesh", this.shadingType, this.coords, this.colors, this.figures, this.bounds, this.matrix, this.bbox, this.background]; | ||
return ["Mesh", this.shadingType, this.coords, this.colors, this.figures, this.bounds, this.bbox, this.background]; | ||
} | ||
@@ -944,0 +942,0 @@ |
@@ -30,3 +30,2 @@ /** | ||
exports.isDict = isDict; | ||
exports.isEOF = isEOF; | ||
exports.isName = isName; | ||
@@ -42,3 +41,3 @@ exports.isRef = isRef; | ||
const EOF = {}; | ||
const EOF = Symbol("EOF"); | ||
exports.EOF = EOF; | ||
@@ -234,3 +233,3 @@ | ||
properties.set(key, property); | ||
} else if (!mergeSubDicts) { | ||
} else if (!mergeSubDicts || !(value instanceof Dict)) { | ||
continue; | ||
@@ -252,6 +251,2 @@ } | ||
for (const dict of values) { | ||
if (!(dict instanceof Dict)) { | ||
continue; | ||
} | ||
for (const [key, value] of Object.entries(dict._map)) { | ||
@@ -381,6 +376,2 @@ if (subDict._map[key] === undefined) { | ||
function isEOF(v) { | ||
return v === EOF; | ||
} | ||
function isName(v, name) { | ||
@@ -387,0 +378,0 @@ return v instanceof Name && (name === undefined || v.name === name); |
@@ -27,18 +27,30 @@ /** | ||
}); | ||
exports.SegoeuiRegularLineHeight = exports.SegoeuiRegularFactors = exports.SegoeuiItalicLineHeight = exports.SegoeuiItalicFactors = exports.SegoeuiBoldLineHeight = exports.SegoeuiBoldItalicLineHeight = exports.SegoeuiBoldItalicFactors = exports.SegoeuiBoldFactors = void 0; | ||
const SegoeuiBoldFactors = [1.76738, 1, 0.97363, 0.93506, 0.93506, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 1.01149, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.88776, 0.88776, 0.8641, 0.8641, 0.8641, 0.8641, 0.8641, 0.8641, 0.98243, 1.02096, 1.02096, 1.02096, 0.97826, 0.79795, 0.79795, 0.79795, 0.79795, 0.79795, 0.79795, 0.79795, 0.79795, 0.79795, 1.09251, 0.79795, 0.79795, 0.7676, 1.06085, 0.98167, 1.02096, 1.03424, 0.85132, 0.914, 0.85134, 0.914, 0.914, 1, 0.914, 1.06085, 1, 0.99862, 0.99862, 1, 1.06085, 1.06085, 1.1406, 0.97138, 1.1406, 1.1406, 1.1406, 1.1406, 1.1406, 1.1406, 1.1406, 1.1406, 1.1406, 1.1406, 1.01134, 1.1406, 0.8007, 0.8007, 0.89858, 0.89858, 1, 0.83693, 0.83693, 1.0388, 0.83693, 1, 0.83693, 0.83693, 1.14889, 1.14889, 1.09398, 1.09398, 1.09398, 1, 1.09398, 1.09398, 0.97489, 0.93994, 0.97426, 0.97489, 0.97426, 0.97426, 0.97426, 0.97489, 0.97489, 0.95493, 1.03089, 0.97489, 1.02546, 0.97489, 0.97489, 0.97426, 0.92094, 0.99346, 1.0595, 1.02112, 0.97489, 0.90399, 0.90399, 0.90399, 1, 0.92094, 0.84041, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.84041, 0.84041, 0.84041, 0.84041, 1, 0.94793, 0.95923, 0.95923, 0.95923, 0.95923, 1, 0.97489, 0.92094, 1.00135, 1.00135, 1.00135, 1.00135, 1.00135, 1.00135, 1.00135, 1.00135, 1.00135, 0.90996, 0.90996, 0.84097, 1.00135, 1.00135, 1, 1.06467, 1.06467, 1.06467, 1.06467, 1.06467, 0.98243, 0.86039, 0.90996, 0.90996, 0.90996, 0.90996, 0.90996, 0.99361, 0.99361, 0.99361, 0.99361, 0.99361, 0.96752, 0.96752, 0.96752, 0.96752, 0.91056, 1, 0.96752, 0.93136, 0.93136, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.96752, 1.03574, 1.03574, 0.96752, 1.17647, 0.81525, 0.96752, 1.29004, 0.96752, 0.96752, 0.86182, 0.94434, 0.86279, 0.86279, 0.94434, 1, 1, 1.2107, 1.2107, 1.16939, 0.97847, 0.96752, 1.01519, 1.56942, 1.16579, 1.0192, 1, 0.94856, 0.94856, 1.1085, 1.1085, 1.03959, 1, 1.16579, 1.20642, 0.86304, 0.86304, 1.15103, 1, 1, 0.86304, 0.86304, 0.86304, 0.86304, 0.64663, 1.03424, 0.96268, 1.42603, 1.15103, 1, 1.04315, 0.81378, 0.9754, 1, 1, 1.18622, 1, 1, 1.01359, 0.73047, 0.73047, 1.03057, 1.03517, 0.94994, 1.00886, 1.34163, 1.3871, 1, 0.87815, 1.28826, 1, 1, 1.03424, 0.75953, 1.02285, 0.97278, 0.97278, 0.97278, 0.97278, 0.97278, 0.97278, 0.97278, 0.97278, 1.03424, 1, 0.91211, 0.97278, 1, 0.89903, 0.99041, 0.97278, 0.97531, 1.02597, 1.2107, 1.21172, 1, 1.0008, 1.0008, 0.97122, 0.9824, 0.96039, 0.9824, 1.15103, 1, 1.42603, 1, 1.03424, 1.15749, 1, 1.03424, 1.03424, 1, 0.93503, 1.01359, 1.01932, 1.01359, 1.01359, 1, 1.01359, 1.02798, 0.94282, 1, 1.2107, 1.29004, 1.04478, 1.04478, 1.03372, 1.03372, 0.98561, 1.00879, 0.98561, 1.15296, 1, 1.21994, 1, 1.02285, 1.02285, 1.02285, 1.02285, 1.02285, 1.02285, 1.08692, 1.02285, 1.13973, 2.10339, 1, 1, 0.9716, 1.42603, 1.42603, 1, 1.02285, 1.18102, 1.18102, 1.18102, 1.18102, 1.02285, 1.02285, 1.02285, 1.00527, 1.02277, 1, 1.00527, 1.02285, 1.02285, 0.98683, 0.9455, 1, 0.90418, 1.2107, 1.29004, 1, 1.03424, 1.2107, 1.07733, 1.18874, 1.13005, 1, 1.0302, 0.75155, 1, 1, 1.2107, 1.222, 1.0016, 1.2107, 1, 1, 0.99041, 0.99041, 0.96692, 0.99041, 1, 1.03424, 1, 1.29004, 0.99041, 0.99561, 1.06497, 1.0008, 1, 1.0008, 1, 1, 0.97931, 0.79912, 1, 1.0008, 1.0008, 0.98439, 0.98439, 1.0008, 1.0008, 1.03424, 1.15749, 1.15749, 1.14169, 0.99862, 1.10818, 1.24866, 0.69825, 1.0008, 1.0008, 1, 1.01519, 0.91572, 1.1085, 1.1085, 1.16897, 0.97529, 0.9754, 1.25635, 1.19687, 1.04983, 0.90434, 1.2107, 1.28826, 0.96085, 1.0499, 1.01359, 0.71703, 0.71703, 1.04016, 0.98633, 0.98633, 0.98633, 1.04394, 1.04394, 1.04394, 1.04394, 1.23203, 1.02258, 1.02258, 1.18416, 1.02258, 1, 1.18622, 1, 0.99921, 0.81378, 1, 0.79104, 0.79104, 0.79104, 0.79104, 0.79104, 1, 1.02956, 0.8727, 1.03424, 1.10948, 1, 1, 0.8965, 0.93803, 1.03424, 1.59578, 1, 1.2886, 1.03424, 0.90137, 1, 1.16862, 1.23085, 1.16862, 1.07034, 1, 1.13189, 1.01519, 1.03424, 1.15749, 1.17389, 1.15103, 1, 0.95161, 0.771, 0.87025, 0.87025, 0.87025, 0.87025, 1.03424, 0.99041, 0.99041, 0.99041, 0.99041, 0.99041, 0.99041, 0.99041, 0.99041, 0.74627, 0.75155, 0.99297, 1.21408, 1.21408, 1.21408, 1, 1.18328, 0.95923, 1.16862, 1.01173, 0.81378, 0.79795, 1.09466, 0.97278, 1.02065, 1, 1.21408, 1.24633, 1.12454, 1, 1, 1, 0.9754, 1, 1, 1.09193, 1.09193, 0.99041, 1, 1.06628, 1.06628, 1.06628, 1.06628, 0.99041, 0.99041, 0.97454, 1.02511, 1.02511, 1.02511, 1.02511, 1.02511, 0.99298, 1.07237, 0.96752, 0.96752, 0.96752, 0.96752, 1.03424, 0.96752, 0.95801, 0.95801, 0.95801, 0.95801, 1.03424, 1.0106]; | ||
exports.SegoeuiRegularMetrics = exports.SegoeuiRegularFactors = exports.SegoeuiItalicMetrics = exports.SegoeuiItalicFactors = exports.SegoeuiBoldMetrics = exports.SegoeuiBoldItalicMetrics = exports.SegoeuiBoldItalicFactors = exports.SegoeuiBoldFactors = void 0; | ||
const SegoeuiBoldFactors = [1.76738, 1, 1, 0.99297, 0.9824, 1.04016, 1.06497, 1.03424, 0.97529, 1.17647, 1.23203, 1.1085, 1.1085, 1.16939, 1.2107, 0.9754, 1.21408, 0.9754, 1.59578, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 0.81378, 0.81378, 1.2107, 1.2107, 1.2107, 0.71703, 0.97847, 0.97363, 0.88776, 0.8641, 1.02096, 0.79795, 0.85132, 0.914, 1.06085, 1.1406, 0.8007, 0.89858, 0.83693, 1.14889, 1.09398, 0.97489, 0.92094, 0.97489, 0.90399, 0.84041, 0.95923, 1.00135, 1, 1.06467, 0.98243, 0.90996, 0.99361, 1.1085, 1.56942, 1.1085, 1.2107, 0.74627, 0.94282, 0.96752, 1.01519, 0.86304, 1.01359, 0.97278, 1.15103, 1.01359, 0.98561, 1.02285, 1.02285, 1.00527, 1.02285, 1.0302, 0.99041, 1.0008, 1.01519, 1.01359, 1.02258, 0.79104, 1.16862, 0.99041, 0.97454, 1.02511, 0.99298, 0.96752, 0.95801, 0.94856, 1.16579, 0.94856, 1.2107, 0.9824, 1.03424, 1.03424, 1, 1.03424, 1.16579, 0.8727, 1.3871, 1.18622, 1.10818, 1.04478, 1.2107, 1.18622, 0.75155, 0.94994, 1.28826, 1.21408, 1.21408, 0.91056, 1, 0.91572, 0.9754, 0.64663, 1.18328, 1.24866, 1.04478, 1.14169, 1.15749, 1.17389, 0.71703, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.93506, 0.8641, 0.79795, 0.79795, 0.79795, 0.79795, 1.1406, 1.1406, 1.1406, 1.1406, 1.02096, 1.09398, 0.97426, 0.97426, 0.97426, 0.97426, 0.97426, 1.2107, 0.97489, 1.00135, 1.00135, 1.00135, 1.00135, 0.90996, 0.92094, 1.02798, 0.96752, 0.96752, 0.96752, 0.96752, 0.96752, 0.96752, 0.93136, 0.86304, 0.97278, 0.97278, 0.97278, 0.97278, 1.02285, 1.02285, 1.02285, 1.02285, 0.97122, 0.99041, 1, 1, 1, 1, 1, 1.28826, 1.0008, 0.99041, 0.99041, 0.99041, 0.99041, 0.96752, 1.01519, 0.96752, 0.97363, 0.96752, 0.97363, 0.96752, 0.97363, 0.96752, 0.8641, 0.86304, 0.8641, 0.86304, 0.8641, 0.86304, 0.8641, 0.86304, 1.02096, 1.03057, 1.02096, 1.03517, 0.79795, 0.97278, 0.79795, 0.97278, 0.79795, 0.97278, 0.79795, 0.97278, 0.79795, 0.97278, 0.914, 1.01359, 0.914, 1.01359, 0.914, 1.01359, 1, 1, 1.06085, 0.98561, 1.06085, 1.00879, 1.1406, 1.02285, 1.1406, 1.02285, 1.1406, 1.02285, 1.1406, 1.02285, 1.1406, 1.02285, 0.97138, 1.08692, 0.8007, 1.02285, 1, 1, 1.00527, 0.83693, 1.02285, 1, 1, 0.83693, 0.9455, 0.83693, 0.90418, 0.83693, 1.13005, 1.09398, 0.99041, 1, 1, 1.09398, 0.99041, 0.96692, 1.09251, 0.99041, 0.97489, 1.0008, 0.97489, 1.0008, 0.97489, 1.0008, 0.93994, 0.97931, 0.90399, 1.02258, 1, 1, 0.90399, 1.02258, 0.84041, 0.79104, 0.84041, 0.79104, 0.84041, 0.79104, 0.84041, 0.79104, 1, 1, 0.95923, 1.07034, 0.95923, 1.16862, 1.00135, 0.99041, 1.00135, 0.99041, 1.00135, 0.99041, 1.00135, 0.99041, 1.00135, 0.99041, 1.00135, 0.99041, 1.06467, 1.02511, 0.90996, 0.96752, 0.90996, 0.99361, 0.95801, 0.99361, 0.95801, 0.99361, 0.95801, 1.07733, 1.03424, 0.97363, 0.96752, 0.93506, 0.93136, 0.97489, 1.0008, 1, 1, 0.95923, 1.16862, 1.15103, 1.15103, 1.01173, 1.03959, 0.75953, 0.81378, 0.79912, 1.15103, 1.21994, 0.95161, 0.87815, 1.01149, 0.81525, 0.7676, 0.98167, 1.01134, 1.02546, 0.84097, 1.03089, 1.18102, 0.97363, 0.88776, 0.85134, 0.97826, 0.79795, 0.99361, 1.06085, 0.97489, 1.1406, 0.89858, 1.0388, 1.14889, 1.09398, 0.86039, 0.97489, 1.0595, 0.92094, 0.94793, 0.95923, 0.90996, 0.99346, 0.98243, 1.02112, 0.95493, 1.1406, 0.90996, 1.03574, 1.02597, 1.0008, 1.18102, 1.06628, 1.03574, 1.0192, 1.01932, 1.00886, 0.97531, 1.0106, 1.0008, 1.13189, 1.18102, 1.02277, 0.98683, 1.0016, 0.99561, 1.07237, 1.0008, 0.90434, 0.99921, 0.93803, 0.8965, 1.23085, 1.06628, 1.04983, 0.96268, 1.0499, 0.98439, 1.18102, 1.06628, 1.0008, 1.06628, 0.98439, 0.79795, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.09466, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.97278, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.02065, 1, 1, 1, 1, 1, 1, 1.06467, 1.02511, 1.06467, 1.02511, 1.06467, 1.02511, 0.90996, 0.96752, 1, 1.21408, 0.89903, 1, 1, 0.75155, 1.04394, 1.04394, 1.04394, 1.04394, 0.98633, 0.98633, 0.98633, 0.73047, 0.73047, 1.20642, 0.91211, 1.25635, 1.222, 1.02956, 1.03372, 1.03372, 0.96039, 1.24633, 1, 1.12454, 0.93503, 1.03424, 1.19687, 1.03424, 1, 1, 1, 0.771, 1, 1, 1.15749, 1.15749, 1.15749, 1.10948, 0.86279, 0.94434, 0.86279, 0.94434, 0.86182, 1, 1, 1.16897, 1, 0.96085, 0.90137, 1.2107, 1.18416, 1.13973, 0.69825, 0.9716, 2.10339, 1.29004, 1.29004, 1.21172, 1.29004, 1.29004, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.42603, 1, 0.99862, 0.99862, 1, 0.87025, 0.87025, 0.87025, 0.87025, 1.18874, 1.42603, 1, 1.42603, 1.42603, 0.99862, 1, 1, 1, 1, 1, 1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.09193, 1.09193, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; | ||
exports.SegoeuiBoldFactors = SegoeuiBoldFactors; | ||
const SegoeuiBoldLineHeight = 1.33008; | ||
exports.SegoeuiBoldLineHeight = SegoeuiBoldLineHeight; | ||
const SegoeuiBoldItalicFactors = [1.76738, 1, 0.97363, 0.94385, 0.94385, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 1.00811, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.89723, 0.89723, 0.87897, 0.87897, 0.87897, 0.87897, 0.87897, 0.87897, 0.9817, 1.0426, 1.0426, 1.0426, 1.09818, 0.79429, 0.79429, 0.79429, 0.79429, 0.79429, 0.79429, 0.79429, 0.79429, 0.79429, 1.10466, 0.79429, 0.79429, 0.77702, 1.05815, 0.99137, 1.0426, 1.036, 0.85292, 0.91149, 0.86869, 0.91149, 0.91149, 1, 0.91149, 1.05815, 1, 0.99862, 0.99862, 1, 1.05815, 1.05815, 1.1406, 0.97441, 1.1406, 1.1406, 1.1406, 1.1406, 1.1406, 1.1406, 1.1406, 1.1406, 1.1406, 1.1406, 0.95253, 1.1406, 0.79631, 0.79631, 0.90128, 0.90128, 1, 0.83853, 0.83853, 1.06662, 0.83853, 1, 0.83853, 0.83853, 1.04396, 1.04396, 1.10615, 1.10615, 1.10615, 1, 1.10615, 1.10615, 0.97552, 0.91602, 0.97552, 0.97552, 0.97552, 0.97552, 0.97552, 0.97552, 0.97552, 0.98999, 1.07205, 0.97552, 1.0347, 0.97552, 0.97552, 0.97552, 0.94436, 1.00356, 1.04694, 1.01945, 0.97552, 0.88641, 0.88641, 0.88641, 1, 0.94436, 0.80527, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.80527, 0.80527, 0.80527, 0.80527, 1, 0.98015, 0.96083, 0.96083, 0.95923, 0.96083, 1, 0.97552, 0.94436, 1.00135, 1.00135, 1.00135, 1.00135, 1.00135, 1.00135, 1.00135, 1.00135, 1.00135, 0.91142, 0.91142, 0.86142, 1.00135, 1.00135, 1, 1.06777, 1.06777, 1.06777, 1.06777, 1.06777, 0.9817, 0.84918, 0.91142, 0.91142, 0.91142, 0.91142, 0.91142, 0.99361, 0.99361, 0.99361, 0.99361, 0.99361, 1.06585, 1.06585, 1.06585, 1.06585, 1.31818, 1, 1.06585, 0.96705, 0.96705, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.06585, 1.04961, 1.04961, 1.06585, 1.10953, 0.83284, 1.06585, 1.29004, 1.06585, 1.06585, 0.86224, 0.94434, 0.86364, 0.86279, 0.94434, 1, 1, 1.21237, 1.21237, 1.16939, 0.97847, 1.06585, 0.97042, 1.57293, 1.16579, 0.99607, 1, 0.95107, 0.95107, 1.11144, 1.11144, 1.31818, 1, 1.16579, 1.20502, 0.83055, 0.83055, 1.31818, 1, 1, 0.83055, 0.83055, 0.83055, 0.83055, 1.31818, 1.036, 0.93491, 1.42603, 1.31818, 1, 1.04315, 0.81378, 0.9754, 1, 1, 1.18754, 1, 1, 0.97042, 0.72959, 0.72959, 1.0033, 0.97042, 0.94994, 1.008, 1.34163, 1.31818, 1, 1.27126, 1.29004, 1, 1, 1.036, 1.31818, 1.14236, 0.93503, 0.93503, 0.93503, 0.93503, 0.93503, 0.93503, 0.93503, 0.93503, 1.036, 1, 0.91406, 0.93503, 1, 0.89903, 0.97922, 0.93503, 0.9898, 0.9898, 1.21237, 1.21339, 1, 1.00639, 1.00639, 0.93125, 1.03959, 0.96039, 1.03959, 1.1261, 1, 1.42603, 1, 1.036, 1.15574, 1, 1.036, 1.036, 1, 0.93327, 0.97042, 1.02897, 0.97042, 0.97042, 1, 0.97042, 0.98721, 1.31818, 1, 1.21237, 1.29004, 1.05356, 1.05356, 1.03372, 1.03372, 0.97922, 0.97922, 0.97922, 1.15296, 1, 1.31818, 1, 1.14236, 1.14236, 1.14236, 1.14236, 1.14236, 1.14236, 1.04302, 1.14236, 1.13904, 2.10339, 1, 1, 0.9716, 1.42603, 1.42603, 1, 1.14236, 1.14236, 1.14236, 1.14236, 1.14236, 1.14236, 0.94552, 1.01582, 1.01054, 1.00518, 1, 1.01054, 1.14236, 1.14236, 0.97981, 1.09125, 1, 0.90418, 1.21237, 1.29004, 1, 1.03336, 1.21237, 1.23199, 1.18775, 1.19508, 1, 1.02471, 0.79487, 1, 1, 1.21237, 1.222, 1.02186, 1.21237, 1, 1, 0.97922, 0.97922, 1.01034, 0.97922, 1, 1.036, 1, 1.29004, 0.97922, 1, 1.02809, 0.94165, 0.94165, 0.94165, 0.94165, 0.94165, 0.91981, 1.31818, 0.94165, 0.94165, 0.94165, 1.00351, 1.00351, 0.94165, 0.94165, 1.036, 1.15574, 1.15574, 1.13934, 0.99862, 1.26781, 1.24866, 0.69825, 0.94165, 0.94165, 0.94165, 0.97042, 0.91484, 1.11144, 1.11144, 1.16798, 0.97639, 0.9754, 1.26514, 1.16541, 1.10687, 0.99314, 1.21237, 1.29004, 0.96085, 1.04232, 0.97042, 0.73541, 0.73541, 1.04016, 0.98633, 0.98633, 0.98633, 1.04745, 1.04394, 1.04745, 1.04745, 1.23203, 1.0276, 1.0276, 1.18416, 1.0276, 1, 1.18622, 1, 0.98387, 1.31818, 1, 0.78929, 0.78929, 0.78929, 0.78929, 0.78929, 1, 1.02956, 0.87357, 1.036, 1.15574, 1, 1, 0.93377, 0.93028, 1.036, 1.59754, 1, 1.2886, 1.036, 0.90068, 1, 1.1261, 1.35125, 1.16862, 1.05403, 1, 1.11121, 0.97042, 1.036, 1.15574, 1.17389, 1.31818, 1, 0.95161, 0.771, 0.87025, 0.87025, 0.87025, 0.87025, 1.036, 0.97922, 0.97922, 0.97922, 0.97922, 0.97922, 0.97922, 0.97922, 0.97922, 0.74627, 0.75155, 0.98946, 1.21261, 1.24047, 1.24047, 1, 1.1349, 0.96083, 1.1261, 1.31818, 0.81378, 0.79429, 1.09097, 0.93503, 0.96609, 1, 1.21261, 1.24633, 1.09125, 1, 1, 1, 0.9754, 1, 1, 1.13269, 1.13269, 0.97922, 1, 1.07514, 1.07514, 1.07514, 1.07514, 0.97922, 0.97922, 0.95874, 1.02197, 1.02197, 1.02197, 1.02197, 1.02197, 0.98507, 1.08578, 0.96752, 0.96752, 0.96752, 0.96752, 1.036, 0.96752, 0.97168, 0.97168, 0.97168, 0.97168, 1.036, 0.95134]; | ||
const SegoeuiBoldMetrics = { | ||
lineHeight: 1.33008, | ||
lineGap: 0 | ||
}; | ||
exports.SegoeuiBoldMetrics = SegoeuiBoldMetrics; | ||
const SegoeuiBoldItalicFactors = [1.76738, 1, 1, 0.98946, 1.03959, 1.04016, 1.02809, 1.036, 0.97639, 1.10953, 1.23203, 1.11144, 1.11144, 1.16939, 1.21237, 0.9754, 1.21261, 0.9754, 1.59754, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036, 0.81378, 0.81378, 1.21237, 1.21237, 1.21237, 0.73541, 0.97847, 0.97363, 0.89723, 0.87897, 1.0426, 0.79429, 0.85292, 0.91149, 1.05815, 1.1406, 0.79631, 0.90128, 0.83853, 1.04396, 1.10615, 0.97552, 0.94436, 0.97552, 0.88641, 0.80527, 0.96083, 1.00135, 1, 1.06777, 0.9817, 0.91142, 0.99361, 1.11144, 1.57293, 1.11144, 1.21237, 0.74627, 1.31818, 1.06585, 0.97042, 0.83055, 0.97042, 0.93503, 1.1261, 0.97042, 0.97922, 1.14236, 0.94552, 1.01054, 1.14236, 1.02471, 0.97922, 0.94165, 0.97042, 0.97042, 1.0276, 0.78929, 1.1261, 0.97922, 0.95874, 1.02197, 0.98507, 0.96752, 0.97168, 0.95107, 1.16579, 0.95107, 1.21237, 1.03959, 1.036, 1.036, 1, 1.036, 1.16579, 0.87357, 1.31818, 1.18754, 1.26781, 1.05356, 1.21237, 1.18622, 0.79487, 0.94994, 1.29004, 1.24047, 1.24047, 1.31818, 1, 0.91484, 0.9754, 1.31818, 1.1349, 1.24866, 1.05356, 1.13934, 1.15574, 1.17389, 0.73541, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.94385, 0.87897, 0.79429, 0.79429, 0.79429, 0.79429, 1.1406, 1.1406, 1.1406, 1.1406, 1.0426, 1.10615, 0.97552, 0.97552, 0.97552, 0.97552, 0.97552, 1.21237, 0.97552, 1.00135, 1.00135, 1.00135, 1.00135, 0.91142, 0.94436, 0.98721, 1.06585, 1.06585, 1.06585, 1.06585, 1.06585, 1.06585, 0.96705, 0.83055, 0.93503, 0.93503, 0.93503, 0.93503, 1.14236, 1.14236, 1.14236, 1.14236, 0.93125, 0.97922, 0.94165, 0.94165, 0.94165, 0.94165, 0.94165, 1.29004, 0.94165, 0.97922, 0.97922, 0.97922, 0.97922, 0.96752, 0.97042, 0.96752, 0.97363, 1.06585, 0.97363, 1.06585, 0.97363, 1.06585, 0.87897, 0.83055, 0.87897, 0.83055, 0.87897, 0.83055, 0.87897, 0.83055, 1.0426, 1.0033, 1.0426, 0.97042, 0.79429, 0.93503, 0.79429, 0.93503, 0.79429, 0.93503, 0.79429, 0.93503, 0.79429, 0.93503, 0.91149, 0.97042, 0.91149, 0.97042, 0.91149, 0.97042, 1, 1, 1.05815, 0.97922, 1.05815, 0.97922, 1.1406, 1.14236, 1.1406, 1.14236, 1.1406, 1.14236, 1.1406, 1.14236, 1.1406, 1.14236, 0.97441, 1.04302, 0.79631, 1.01582, 1, 1, 1.01054, 0.83853, 1.14236, 1, 1, 0.83853, 1.09125, 0.83853, 0.90418, 0.83853, 1.19508, 1.10615, 0.97922, 1, 1, 1.10615, 0.97922, 1.01034, 1.10466, 0.97922, 0.97552, 0.94165, 0.97552, 0.94165, 0.97552, 0.94165, 0.91602, 0.91981, 0.88641, 1.0276, 1, 1, 0.88641, 1.0276, 0.80527, 0.78929, 0.80527, 0.78929, 0.80527, 0.78929, 0.80527, 0.78929, 1, 1, 0.96083, 1.05403, 0.95923, 1.16862, 1.00135, 0.97922, 1.00135, 0.97922, 1.00135, 0.97922, 1.00135, 0.97922, 1.00135, 0.97922, 1.00135, 0.97922, 1.06777, 1.02197, 0.91142, 0.96752, 0.91142, 0.99361, 0.97168, 0.99361, 0.97168, 0.99361, 0.97168, 1.23199, 1.036, 0.97363, 1.06585, 0.94385, 0.96705, 0.97552, 0.94165, 1, 1, 0.96083, 1.1261, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 0.95161, 1.27126, 1.00811, 0.83284, 0.77702, 0.99137, 0.95253, 1.0347, 0.86142, 1.07205, 1.14236, 0.97363, 0.89723, 0.86869, 1.09818, 0.79429, 0.99361, 1.05815, 0.97552, 1.1406, 0.90128, 1.06662, 1.04396, 1.10615, 0.84918, 0.97552, 1.04694, 0.94436, 0.98015, 0.96083, 0.91142, 1.00356, 0.9817, 1.01945, 0.98999, 1.1406, 0.91142, 1.04961, 0.9898, 1.00639, 1.14236, 1.07514, 1.04961, 0.99607, 1.02897, 1.008, 0.9898, 0.95134, 1.00639, 1.11121, 1.14236, 1.00518, 0.97981, 1.02186, 1, 1.08578, 0.94165, 0.99314, 0.98387, 0.93028, 0.93377, 1.35125, 1.07514, 1.10687, 0.93491, 1.04232, 1.00351, 1.14236, 1.07514, 0.94165, 1.07514, 1.00351, 0.79429, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.09097, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.93503, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.96609, 1, 1, 1, 1, 1, 1, 1.06777, 1.02197, 1.06777, 1.02197, 1.06777, 1.02197, 0.91142, 0.96752, 1, 1.21261, 0.89903, 1, 1, 0.75155, 1.04745, 1.04745, 1.04745, 1.04394, 0.98633, 0.98633, 0.98633, 0.72959, 0.72959, 1.20502, 0.91406, 1.26514, 1.222, 1.02956, 1.03372, 1.03372, 0.96039, 1.24633, 1, 1.09125, 0.93327, 1.03336, 1.16541, 1.036, 1, 1, 1, 0.771, 1, 1, 1.15574, 1.15574, 1.15574, 1.15574, 0.86364, 0.94434, 0.86279, 0.94434, 0.86224, 1, 1, 1.16798, 1, 0.96085, 0.90068, 1.21237, 1.18416, 1.13904, 0.69825, 0.9716, 2.10339, 1.29004, 1.29004, 1.21339, 1.29004, 1.29004, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.42603, 1, 0.99862, 0.99862, 1, 0.87025, 0.87025, 0.87025, 0.87025, 1.18775, 1.42603, 1, 1.42603, 1.42603, 0.99862, 1, 1, 1, 1, 1, 1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.13269, 1.13269, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; | ||
exports.SegoeuiBoldItalicFactors = SegoeuiBoldItalicFactors; | ||
const SegoeuiBoldItalicLineHeight = 1.33008; | ||
exports.SegoeuiBoldItalicLineHeight = SegoeuiBoldItalicLineHeight; | ||
const SegoeuiItalicFactors = [1.76738, 1, 0.94729, 0.85498, 0.85498, 0.94729, 0.94729, 0.94729, 0.94729, 0.94729, 0.94729, 0.94729, 0.94729, 0.94729, 0.94729, 0.94729, 0.94729, 0.85944, 0.85944, 0.88506, 0.88506, 0.88506, 0.88506, 0.88506, 0.88506, 0.8858, 0.9858, 0.9858, 0.9858, 0.9607, 0.74817, 0.74817, 0.74817, 0.74817, 0.74817, 0.74817, 0.74817, 0.74817, 0.74817, 1.03849, 0.74817, 0.74817, 0.71022, 0.98039, 0.90883, 0.9858, 0.96927, 0.80016, 0.88449, 0.82791, 0.88449, 0.88449, 1, 0.88449, 0.98039, 1, 0.99862, 0.99862, 1, 0.98039, 0.98039, 0.95782, 0.84421, 0.95782, 0.95782, 0.95782, 0.95782, 0.95782, 0.95782, 0.95782, 0.95782, 0.95782, 0.95782, 0.84171, 0.95782, 0.69238, 0.69238, 0.89898, 0.89898, 1, 0.83231, 0.83231, 0.98316, 0.84723, 1, 0.84723, 0.83231, 0.98183, 0.98183, 1.03989, 1.03989, 1.03989, 1, 1.03989, 1.03989, 0.96924, 0.92383, 0.96924, 0.96924, 0.96924, 0.96924, 0.96924, 0.96924, 0.96924, 1.01284, 1.05734, 0.96924, 0.99877, 0.96924, 0.96924, 0.96924, 0.86237, 0.90082, 0.97642, 0.97296, 0.96924, 0.80595, 0.80595, 0.80595, 1, 0.86237, 0.74524, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.74524, 0.74524, 0.74524, 0.74524, 1, 0.86075, 0.86091, 0.86091, 0.85771, 0.86091, 1, 0.96924, 0.86237, 0.95402, 0.95402, 0.95402, 0.95402, 0.95402, 0.95402, 0.95402, 0.95402, 0.95402, 0.83089, 0.83089, 0.77596, 0.95402, 0.95402, 0.94143, 0.98448, 0.98448, 0.98448, 0.98448, 0.98448, 0.8858, 0.78614, 0.83089, 0.83089, 0.83089, 0.83089, 0.83089, 0.93285, 0.93285, 0.93285, 0.93285, 0.93285, 0.97454, 0.97454, 0.97454, 0.97454, 1.04839, 1, 0.97454, 0.92916, 0.92916, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.97454, 1.0976, 1.0976, 0.97454, 1.15373, 0.78032, 0.97454, 1.24822, 0.97454, 0.97454, 0.86182, 0.94434, 0.86321, 0.8649, 0.94434, 1, 1, 1.45994, 1.17308, 1.07403, 0.94565, 0.97454, 0.97454, 1.39016, 0.92481, 0.98205, 1, 0.91082, 0.91082, 1.0949, 1.0949, 1.04839, 1, 0.92481, 1.15621, 0.87207, 0.87207, 1.04839, 1, 1, 0.87207, 0.87207, 0.87207, 0.87207, 1.04839, 0.96927, 0.99821, 1.42603, 1.04839, 1, 1.04315, 0.78383, 0.78383, 1, 1, 1.23393, 1, 1, 0.97454, 0.67603, 0.67603, 0.95391, 0.97454, 0.94261, 1.05097, 1.34163, 1.04839, 1, 0.81965, 1.24822, 1, 1, 0.96927, 1.04839, 0.93146, 0.87533, 0.87533, 0.87533, 0.87533, 0.87533, 0.87533, 0.87533, 0.87533, 0.96927, 1, 0.73584, 0.87533, 1, 0.89903, 1.01054, 0.87533, 1.04, 1.04, 1.17308, 1.17308, 1, 1.03342, 1.03342, 0.93854, 1.14763, 0.95996, 0.95748, 1.06151, 1, 1.42603, 1, 0.96927, 1.09836, 1, 0.96927, 0.96927, 1, 0.87709, 0.97454, 1.03809, 0.97454, 0.97454, 1, 0.97454, 0.88409, 1.04839, 1, 1.17308, 1.24822, 0.9245, 0.9245, 0.94868, 0.94868, 1.00176, 1.00176, 1.00176, 1.15296, 1, 1.04839, 1, 1.16484, 0.93146, 0.93146, 0.93146, 0.93146, 0.93146, 1.12761, 0.93146, 1.14589, 1.96791, 1, 1, 0.97622, 1.42603, 1.42603, 1, 1.16484, 1.2, 1.2, 1.2, 1.2, 0.93146, 1.08132, 1.08132, 0.98047, 1.02148, 1, 0.98047, 1.16484, 1.16484, 1.0119, 1.04861, 1, 0.78755, 1.17308, 1.24822, 1, 0.96927, 1.17308, 1.31868, 1.17984, 1.23736, 1, 1.02989, 0.63218, 1, 1, 1.17308, 1.22135, 1.04724, 1.17308, 1, 1, 1.01054, 1.01054, 0.9857, 1.01054, 1, 0.96927, 1, 1.24822, 1.01054, 1.0127, 1.06234, 0.96225, 0.96225, 0.96225, 0.96225, 0.96225, 0.90171, 1.04839, 0.96225, 0.96225, 0.96225, 1.0326, 1.0326, 0.96225, 0.96225, 0.96927, 1.09836, 1.13525, 1.09836, 0.99862, 1.1781, 1.22326, 0.69825, 0.8761, 0.8761, 0.96225, 0.97454, 0.85273, 0.91349, 0.91349, 1.083, 0.92586, 0.78383, 1.21191, 1.01473, 1.11826, 0.8965, 1.17308, 1.24822, 0.91578, 1.0557, 0.97454, 0.77349, 0.70424, 1.05365, 1.12317, 1.12317, 1.12317, 0.94945, 0.94945, 0.94945, 0.94945, 1.18414, 1.06598, 1.06598, 1.18416, 1.06598, 1, 1.20808, 1, 0.97783, 1.04839, 1, 0.79004, 0.79004, 0.79004, 0.79004, 0.79004, 1, 1.06483, 0.80597, 0.96927, 1.01522, 1, 1, 0.94818, 0.93574, 0.96927, 1.42531, 1, 1.2886, 0.96927, 0.86438, 1, 1.16344, 1.30679, 1.16344, 1.02759, 1, 1.05401, 0.97454, 0.96927, 1.09836, 1.15222, 1.04839, 1, 0.81965, 0.77295, 0.87025, 0.87025, 0.87025, 0.87025, 0.96927, 1.00351, 1.00351, 1.00351, 1.00351, 1.00351, 1.00351, 1.00351, 1.00351, 0.74627, 0.75155, 0.98946, 1.20088, 1.09971, 1.09971, 1, 1.09971, 0.86091, 1.16344, 1.04839, 0.78383, 0.74817, 1.03754, 0.87533, 0.98705, 1, 1.20088, 1.24633, 1.07497, 1, 1, 1, 0.78032, 1, 1, 1.10742, 1.10742, 1.00351, 1, 1.0675, 1.0675, 1.0675, 1.0675, 1.00351, 1.00351, 0.94629, 0.9973, 0.9973, 0.9973, 0.9973, 0.9973, 0.91016, 1.02732, 0.96777, 0.96777, 0.96777, 0.96777, 0.96927, 0.96777, 0.9043, 0.9043, 0.9043, 0.9043, 0.96927, 0.95364]; | ||
const SegoeuiBoldItalicMetrics = { | ||
lineHeight: 1.33008, | ||
lineGap: 0 | ||
}; | ||
exports.SegoeuiBoldItalicMetrics = SegoeuiBoldItalicMetrics; | ||
const SegoeuiItalicFactors = [1.76738, 1, 1, 0.98946, 1.14763, 1.05365, 1.06234, 0.96927, 0.92586, 1.15373, 1.18414, 0.91349, 0.91349, 1.07403, 1.17308, 0.78383, 1.20088, 0.78383, 1.42531, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.78383, 0.78383, 1.17308, 1.17308, 1.17308, 0.77349, 0.94565, 0.94729, 0.85944, 0.88506, 0.9858, 0.74817, 0.80016, 0.88449, 0.98039, 0.95782, 0.69238, 0.89898, 0.83231, 0.98183, 1.03989, 0.96924, 0.86237, 0.96924, 0.80595, 0.74524, 0.86091, 0.95402, 0.94143, 0.98448, 0.8858, 0.83089, 0.93285, 1.0949, 1.39016, 1.0949, 1.45994, 0.74627, 1.04839, 0.97454, 0.97454, 0.87207, 0.97454, 0.87533, 1.06151, 0.97454, 1.00176, 1.16484, 1.08132, 0.98047, 1.16484, 1.02989, 1.01054, 0.96225, 0.97454, 0.97454, 1.06598, 0.79004, 1.16344, 1.00351, 0.94629, 0.9973, 0.91016, 0.96777, 0.9043, 0.91082, 0.92481, 0.91082, 1.17308, 0.95748, 0.96927, 0.96927, 1, 0.96927, 0.92481, 0.80597, 1.04839, 1.23393, 1.1781, 0.9245, 1.17308, 1.20808, 0.63218, 0.94261, 1.24822, 1.09971, 1.09971, 1.04839, 1, 0.85273, 0.78032, 1.04839, 1.09971, 1.22326, 0.9245, 1.09836, 1.13525, 1.15222, 0.70424, 0.94729, 0.94729, 0.94729, 0.94729, 0.94729, 0.94729, 0.85498, 0.88506, 0.74817, 0.74817, 0.74817, 0.74817, 0.95782, 0.95782, 0.95782, 0.95782, 0.9858, 1.03989, 0.96924, 0.96924, 0.96924, 0.96924, 0.96924, 1.17308, 0.96924, 0.95402, 0.95402, 0.95402, 0.95402, 0.83089, 0.86237, 0.88409, 0.97454, 0.97454, 0.97454, 0.97454, 0.97454, 0.97454, 0.92916, 0.87207, 0.87533, 0.87533, 0.87533, 0.87533, 0.93146, 0.93146, 0.93146, 0.93146, 0.93854, 1.01054, 0.96225, 0.96225, 0.96225, 0.96225, 0.96225, 1.24822, 0.8761, 1.00351, 1.00351, 1.00351, 1.00351, 0.96777, 0.97454, 0.96777, 0.94729, 0.97454, 0.94729, 0.97454, 0.94729, 0.97454, 0.88506, 0.87207, 0.88506, 0.87207, 0.88506, 0.87207, 0.88506, 0.87207, 0.9858, 0.95391, 0.9858, 0.97454, 0.74817, 0.87533, 0.74817, 0.87533, 0.74817, 0.87533, 0.74817, 0.87533, 0.74817, 0.87533, 0.88449, 0.97454, 0.88449, 0.97454, 0.88449, 0.97454, 1, 1, 0.98039, 1.00176, 0.98039, 1.00176, 0.95782, 0.93146, 0.95782, 0.93146, 0.95782, 0.93146, 0.95782, 1.16484, 0.95782, 0.93146, 0.84421, 1.12761, 0.69238, 1.08132, 1, 1, 0.98047, 0.83231, 1.16484, 1, 1, 0.84723, 1.04861, 0.84723, 0.78755, 0.83231, 1.23736, 1.03989, 1.01054, 1, 1, 1.03989, 1.01054, 0.9857, 1.03849, 1.01054, 0.96924, 0.96225, 0.96924, 0.96225, 0.96924, 0.96225, 0.92383, 0.90171, 0.80595, 1.06598, 1, 1, 0.80595, 1.06598, 0.74524, 0.79004, 0.74524, 0.79004, 0.74524, 0.79004, 0.74524, 0.79004, 1, 1, 0.86091, 1.02759, 0.85771, 1.16344, 0.95402, 1.00351, 0.95402, 1.00351, 0.95402, 1.00351, 0.95402, 1.00351, 0.95402, 1.00351, 0.95402, 1.00351, 0.98448, 0.9973, 0.83089, 0.96777, 0.83089, 0.93285, 0.9043, 0.93285, 0.9043, 0.93285, 0.9043, 1.31868, 0.96927, 0.94729, 0.97454, 0.85498, 0.92916, 0.96924, 0.8761, 1, 1, 0.86091, 1.16344, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 0.81965, 0.81965, 0.94729, 0.78032, 0.71022, 0.90883, 0.84171, 0.99877, 0.77596, 1.05734, 1.2, 0.94729, 0.85944, 0.82791, 0.9607, 0.74817, 0.93285, 0.98039, 0.96924, 0.95782, 0.89898, 0.98316, 0.98183, 1.03989, 0.78614, 0.96924, 0.97642, 0.86237, 0.86075, 0.86091, 0.83089, 0.90082, 0.8858, 0.97296, 1.01284, 0.95782, 0.83089, 1.0976, 1.04, 1.03342, 1.2, 1.0675, 1.0976, 0.98205, 1.03809, 1.05097, 1.04, 0.95364, 1.03342, 1.05401, 1.2, 1.02148, 1.0119, 1.04724, 1.0127, 1.02732, 0.96225, 0.8965, 0.97783, 0.93574, 0.94818, 1.30679, 1.0675, 1.11826, 0.99821, 1.0557, 1.0326, 1.2, 1.0675, 0.96225, 1.0675, 1.0326, 0.74817, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.03754, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.87533, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.98705, 1, 1, 1, 1, 1, 1, 0.98448, 0.9973, 0.98448, 0.9973, 0.98448, 0.9973, 0.83089, 0.96777, 1, 1.20088, 0.89903, 1, 1, 0.75155, 0.94945, 0.94945, 0.94945, 0.94945, 1.12317, 1.12317, 1.12317, 0.67603, 0.67603, 1.15621, 0.73584, 1.21191, 1.22135, 1.06483, 0.94868, 0.94868, 0.95996, 1.24633, 1, 1.07497, 0.87709, 0.96927, 1.01473, 0.96927, 1, 1, 1, 0.77295, 1, 1, 1.09836, 1.09836, 1.09836, 1.01522, 0.86321, 0.94434, 0.8649, 0.94434, 0.86182, 1, 1, 1.083, 1, 0.91578, 0.86438, 1.17308, 1.18416, 1.14589, 0.69825, 0.97622, 1.96791, 1.24822, 1.24822, 1.17308, 1.24822, 1.24822, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.42603, 1, 0.99862, 0.99862, 1, 0.87025, 0.87025, 0.87025, 0.87025, 1.17984, 1.42603, 1, 1.42603, 1.42603, 0.99862, 1, 1, 1, 1, 1, 1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.10742, 1.10742, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; | ||
exports.SegoeuiItalicFactors = SegoeuiItalicFactors; | ||
const SegoeuiItalicLineHeight = 1.33008; | ||
exports.SegoeuiItalicLineHeight = SegoeuiItalicLineHeight; | ||
const SegoeuiRegularFactors = [1.76738, 1, 0.96706, 0.86035, 0.86035, 0.96706, 0.96706, 0.96706, 0.96706, 0.96706, 0.96706, 0.96635, 0.96706, 0.96706, 0.96706, 0.96706, 0.96706, 0.85944, 0.85944, 0.85734, 0.85734, 0.85734, 0.85734, 0.85734, 0.85734, 0.88433, 0.97093, 0.97093, 0.97093, 0.96491, 0.75842, 0.75842, 0.75842, 0.75842, 0.75842, 0.75842, 0.75842, 0.75842, 0.75842, 1.03444, 0.75842, 0.75842, 0.72727, 0.9831, 0.92366, 0.97093, 0.96927, 0.79936, 0.88198, 0.85638, 0.88198, 0.88198, 1, 0.88198, 0.9831, 1, 0.99862, 0.99862, 1, 0.9831, 0.9831, 0.95782, 0.84784, 0.95782, 0.95782, 0.95782, 0.95782, 0.95782, 0.95782, 0.95782, 0.95782, 0.95782, 0.95782, 0.98601, 0.95782, 0.71387, 0.71387, 0.86969, 0.86969, 1, 0.84636, 0.84636, 0.94152, 0.84636, 1, 0.84636, 0.84636, 1.07796, 1.07796, 1.03584, 1.03584, 1.03584, 1, 1.03584, 1.03584, 0.96924, 0.93066, 0.96924, 0.96924, 0.96924, 0.96924, 0.96924, 0.96924, 0.96924, 1.0098, 1.09799, 0.96924, 1.03405, 0.96924, 0.96924, 0.96924, 0.83968, 0.94492, 0.98715, 0.9287, 0.96924, 0.82826, 0.82826, 0.82826, 1, 0.83968, 0.79649, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.79649, 0.79649, 0.79649, 0.79649, 1, 0.83491, 0.85771, 0.85771, 0.85771, 0.85771, 1, 0.96924, 0.83968, 0.95132, 0.95132, 0.95132, 0.95132, 0.95132, 0.95132, 0.95132, 0.95132, 0.95132, 0.8287, 0.8287, 0.77968, 0.95132, 0.95132, 0.93119, 0.98965, 0.98965, 0.98965, 0.98965, 0.98965, 0.88433, 0.78437, 0.8287, 0.8287, 0.8287, 0.8287, 0.8287, 0.93365, 0.93365, 0.93365, 0.93365, 0.93365, 0.91484, 0.91484, 0.91484, 0.91484, 0.84751, 0.91484, 0.93575, 0.93575, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.91484, 1.0625, 1.0625, 0.91484, 1.19985, 0.78032, 0.91484, 1.24822, 0.91484, 0.91484, 0.86182, 0.94434, 0.86279, 0.86279, 0.94434, 1, 1, 1.45786, 1.1714, 1.07152, 0.94084, 0.91484, 1.05707, 1.3638, 0.92105, 0.95246, 1, 0.90351, 0.90351, 1.08612, 1.08612, 0.91202, 0.92105, 1.16039, 0.92383, 0.92383, 1.11437, 0.92383, 0.92383, 0.92383, 0.92383, 0.61584, 0.96927, 1.02512, 1.42603, 1.11437, 1.04315, 0.78032, 0.78032, 1.20808, 0.99912, 1.05882, 0.67428, 0.67428, 1.0969, 1.05882, 0.94261, 1.04912, 1.34163, 1.2434, 0.81818, 1.24644, 1, 1, 0.96927, 0.60411, 0.8717, 0.9403, 0.9403, 0.9403, 0.9403, 0.9403, 0.9403, 0.9403, 0.9403, 0.96927, 0.73291, 0.9403, 1, 0.89903, 1.01756, 0.9403, 0.98248, 0.98248, 1.1714, 1.17238, 1, 1.03424, 1.03424, 1.00527, 1.02285, 0.95996, 0.85337, 1.12654, 1, 1.42603, 1, 0.96927, 1.11358, 0.96927, 0.96927, 0.87796, 1.05882, 1.03809, 1.05882, 1.05882, 1, 1.05882, 0.89049, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.80499, 1.1714, 1.24822, 0.90957, 0.90957, 0.94868, 0.94868, 1.01756, 1.01756, 1.01756, 1.15296, 1, 0.97361, 1.09011, 0.8717, 0.8717, 0.8717, 0.8717, 0.8717, 1.11551, 0.8717, 1.14589, 1.9697, 1, 1, 0.97622, 1.42603, 1.42603, 1, 1.09011, 1.2, 1.2, 1.2, 1.2, 0.8717, 1.09011, 1.09011, 0.99414, 1.04785, 1, 0.99414, 1.09011, 1.09011, 0.99609, 1.0536, 1, 0.94298, 1.1714, 1.24822, 1, 0.96927, 1.1714, 1.08571, 1.18083, 1.23297, 1, 1.034, 0.75155, 1, 1, 1.1714, 1.22135, 1.00169, 1.1714, 1, 1, 1.01756, 1.01756, 1.00323, 1.01756, 1, 0.96927, 1, 1.24822, 1.01756, 1.05176, 1.06234, 1.05356, 1.05356, 1.05356, 1.05356, 1.05356, 0.98293, 0.55572, 1.05356, 1.05356, 1.05356, 1.03502, 1.03502, 1.05356, 1.05356, 0.96927, 1.10539, 1.11593, 1.08665, 0.99862, 1.05937, 1.17914, 0.69825, 0.95923, 0.95923, 1.05356, 1.05707, 0.85273, 0.90616, 0.90616, 1.083, 0.92037, 0.78032, 1.20996, 1.01518, 1.07831, 0.9087, 1.1714, 1.24644, 0.91578, 1.05205, 1.05882, 0.80597, 0.73381, 1.10454, 1.13196, 1.13196, 1.13196, 1.03077, 1.03077, 1.03077, 1.03077, 1.2046, 1.04399, 1.04399, 1.18416, 1.04399, 1, 1.20808, 1, 1.03004, 0.84164, 1, 0.84863, 0.84863, 0.84863, 0.84863, 0.84863, 1, 1.06483, 0.80597, 0.96927, 1.06967, 1, 0.93117, 0.95542, 0.96927, 1.40246, 1, 1.2886, 0.96927, 0.86507, 1, 1.21968, 1.23362, 1.21968, 1.17318, 1, 1.05443, 1.05707, 0.96927, 1.10539, 1.14169, 1.01173, 0.81818, 0.77295, 0.87025, 0.87025, 0.87025, 0.87025, 0.96927, 1.01756, 1.01756, 1.01756, 1.01756, 1.01756, 1.01756, 1.01756, 1.01756, 0.74627, 0.75155, 0.98594, 1.20088, 1.09971, 1.09971, 1, 1.05425, 0.85771, 1.21968, 0.93109, 0.78032, 0.75842, 1.03719, 0.9403, 1.04021, 1, 1.20088, 1.24633, 1.05425, 1.09971, 1.09971, 1.09971, 1.07497, 1, 1, 1, 0.78032, 1, 1, 1, 1.10938, 1.10938, 1.01756, 1, 1.01071, 1.01071, 1.01071, 1.01071, 1.01756, 1.01756, 0.95801, 1.00068, 1.00068, 1.00068, 1.00068, 1.00068, 0.91797, 0.99346, 0.96777, 0.96777, 0.96777, 0.96777, 0.96927, 0.96777, 0.9043, 0.9043, 0.9043, 0.9043, 0.96927, 1.00221]; | ||
const SegoeuiItalicMetrics = { | ||
lineHeight: 1.33008, | ||
lineGap: 0 | ||
}; | ||
exports.SegoeuiItalicMetrics = SegoeuiItalicMetrics; | ||
const SegoeuiRegularFactors = [1.76738, 1, 1, 0.98594, 1.02285, 1.10454, 1.06234, 0.96927, 0.92037, 1.19985, 1.2046, 0.90616, 0.90616, 1.07152, 1.1714, 0.78032, 1.20088, 0.78032, 1.40246, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.78032, 0.78032, 1.1714, 1.1714, 1.1714, 0.80597, 0.94084, 0.96706, 0.85944, 0.85734, 0.97093, 0.75842, 0.79936, 0.88198, 0.9831, 0.95782, 0.71387, 0.86969, 0.84636, 1.07796, 1.03584, 0.96924, 0.83968, 0.96924, 0.82826, 0.79649, 0.85771, 0.95132, 0.93119, 0.98965, 0.88433, 0.8287, 0.93365, 1.08612, 1.3638, 1.08612, 1.45786, 0.74627, 0.80499, 0.91484, 1.05707, 0.92383, 1.05882, 0.9403, 1.12654, 1.05882, 1.01756, 1.09011, 1.09011, 0.99414, 1.09011, 1.034, 1.01756, 1.05356, 1.05707, 1.05882, 1.04399, 0.84863, 1.21968, 1.01756, 0.95801, 1.00068, 0.91797, 0.96777, 0.9043, 0.90351, 0.92105, 0.90351, 1.1714, 0.85337, 0.96927, 0.96927, 0.99912, 0.96927, 0.92105, 0.80597, 1.2434, 1.20808, 1.05937, 0.90957, 1.1714, 1.20808, 0.75155, 0.94261, 1.24644, 1.09971, 1.09971, 0.84751, 1, 0.85273, 0.78032, 0.61584, 1.05425, 1.17914, 0.90957, 1.08665, 1.11593, 1.14169, 0.73381, 0.96706, 0.96706, 0.96706, 0.96706, 0.96706, 0.96706, 0.86035, 0.85734, 0.75842, 0.75842, 0.75842, 0.75842, 0.95782, 0.95782, 0.95782, 0.95782, 0.97093, 1.03584, 0.96924, 0.96924, 0.96924, 0.96924, 0.96924, 1.1714, 0.96924, 0.95132, 0.95132, 0.95132, 0.95132, 0.8287, 0.83968, 0.89049, 0.91484, 0.91484, 0.91484, 0.91484, 0.91484, 0.91484, 0.93575, 0.92383, 0.9403, 0.9403, 0.9403, 0.9403, 0.8717, 0.8717, 0.8717, 0.8717, 1.00527, 1.01756, 1.05356, 1.05356, 1.05356, 1.05356, 1.05356, 1.24644, 0.95923, 1.01756, 1.01756, 1.01756, 1.01756, 0.96777, 1.05707, 0.96777, 0.96706, 0.91484, 0.96706, 0.91484, 0.96706, 0.91484, 0.85734, 0.92383, 0.85734, 0.92383, 0.85734, 0.92383, 0.85734, 0.92383, 0.97093, 1.0969, 0.97093, 1.05882, 0.75842, 0.9403, 0.75842, 0.9403, 0.75842, 0.9403, 0.75842, 0.9403, 0.75842, 0.9403, 0.88198, 1.05882, 0.88198, 1.05882, 0.88198, 1.05882, 1, 1, 0.9831, 1.01756, 0.9831, 1.01756, 0.95782, 0.8717, 0.95782, 0.8717, 0.95782, 0.8717, 0.95782, 1.09011, 0.95782, 0.8717, 0.84784, 1.11551, 0.71387, 1.09011, 1, 1, 0.99414, 0.84636, 1.09011, 1, 1, 0.84636, 1.0536, 0.84636, 0.94298, 0.84636, 1.23297, 1.03584, 1.01756, 1, 1, 1.03584, 1.01756, 1.00323, 1.03444, 1.01756, 0.96924, 1.05356, 0.96924, 1.05356, 0.96924, 1.05356, 0.93066, 0.98293, 0.82826, 1.04399, 1, 1, 0.82826, 1.04399, 0.79649, 0.84863, 0.79649, 0.84863, 0.79649, 0.84863, 0.79649, 0.84863, 1, 1, 0.85771, 1.17318, 0.85771, 1.21968, 0.95132, 1.01756, 0.95132, 1.01756, 0.95132, 1.01756, 0.95132, 1.01756, 0.95132, 1.01756, 0.95132, 1.01756, 0.98965, 1.00068, 0.8287, 0.96777, 0.8287, 0.93365, 0.9043, 0.93365, 0.9043, 0.93365, 0.9043, 1.08571, 0.96927, 0.96706, 0.91484, 0.86035, 0.93575, 0.96924, 0.95923, 1, 1, 0.85771, 1.21968, 1.11437, 1.11437, 0.93109, 0.91202, 0.60411, 0.84164, 0.55572, 1.01173, 0.97361, 0.81818, 0.81818, 0.96635, 0.78032, 0.72727, 0.92366, 0.98601, 1.03405, 0.77968, 1.09799, 1.2, 0.96706, 0.85944, 0.85638, 0.96491, 0.75842, 0.93365, 0.9831, 0.96924, 0.95782, 0.86969, 0.94152, 1.07796, 1.03584, 0.78437, 0.96924, 0.98715, 0.83968, 0.83491, 0.85771, 0.8287, 0.94492, 0.88433, 0.9287, 1.0098, 0.95782, 0.8287, 1.0625, 0.98248, 1.03424, 1.2, 1.01071, 1.0625, 0.95246, 1.03809, 1.04912, 0.98248, 1.00221, 1.03424, 1.05443, 1.2, 1.04785, 0.99609, 1.00169, 1.05176, 0.99346, 1.05356, 0.9087, 1.03004, 0.95542, 0.93117, 1.23362, 1.01071, 1.07831, 1.02512, 1.05205, 1.03502, 1.2, 1.01071, 1.05356, 1.01071, 1.03502, 0.75842, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.03719, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.9403, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.04021, 1, 1, 1, 1, 1, 1, 0.98965, 1.00068, 0.98965, 1.00068, 0.98965, 1.00068, 0.8287, 0.96777, 1, 1.20088, 0.89903, 1, 1, 0.75155, 1.03077, 1.03077, 1.03077, 1.03077, 1.13196, 1.13196, 1.13196, 0.67428, 0.67428, 1.16039, 0.73291, 1.20996, 1.22135, 1.06483, 0.94868, 0.94868, 0.95996, 1.24633, 1, 1.07497, 0.87796, 0.96927, 1.01518, 0.96927, 1, 1, 1, 0.77295, 1, 1, 1.10539, 1.10539, 1.11358, 1.06967, 0.86279, 0.94434, 0.86279, 0.94434, 0.86182, 1, 1, 1.083, 1, 0.91578, 0.86507, 1.1714, 1.18416, 1.14589, 0.69825, 0.97622, 1.9697, 1.24822, 1.24822, 1.17238, 1.24822, 1.24822, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.42603, 1, 0.99862, 0.99862, 1, 0.87025, 0.87025, 0.87025, 0.87025, 1.18083, 1.42603, 1, 1.42603, 1.42603, 0.99862, 1, 1, 1, 1, 1, 1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.10938, 1.10938, 1, 1, 1, 1.05425, 1.09971, 1.09971, 1.09971, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; | ||
exports.SegoeuiRegularFactors = SegoeuiRegularFactors; | ||
const SegoeuiRegularLineHeight = 1.33008; | ||
exports.SegoeuiRegularLineHeight = SegoeuiRegularLineHeight; | ||
const SegoeuiRegularMetrics = { | ||
lineHeight: 1.33008, | ||
lineGap: 0 | ||
}; | ||
exports.SegoeuiRegularMetrics = SegoeuiRegularMetrics; |
@@ -135,2 +135,8 @@ /** | ||
t["ComicSansMS-Italic"] = "Comic Sans MS-Italic"; | ||
t["ItcSymbol-Bold"] = "Helvetica-Bold"; | ||
t["ItcSymbol-BoldItalic"] = "Helvetica-BoldOblique"; | ||
t["ItcSymbol-Book"] = "Helvetica"; | ||
t["ItcSymbol-BookItalic"] = "Helvetica-Oblique"; | ||
t["ItcSymbol-Medium"] = "Helvetica"; | ||
t["ItcSymbol-MediumItalic"] = "Helvetica-Oblique"; | ||
t.LucidaConsole = "Courier"; | ||
@@ -244,2 +250,3 @@ t["LucidaConsole-Bold"] = "Courier-Bold"; | ||
t.Lexicon = true; | ||
t.LiberationSerif = true; | ||
t["Liberation Serif"] = true; | ||
@@ -476,2 +483,4 @@ t["Linux Libertine"] = true; | ||
t[171] = 8230; | ||
t[200] = 193; | ||
t[203] = 205; | ||
t[210] = 218; | ||
@@ -481,4 +490,7 @@ t[223] = 711; | ||
t[225] = 322; | ||
t[226] = 352; | ||
t[227] = 353; | ||
t[228] = 381; | ||
t[229] = 382; | ||
t[233] = 221; | ||
t[234] = 253; | ||
@@ -493,2 +505,3 @@ t[252] = 263; | ||
t[266] = 281; | ||
t[267] = 282; | ||
t[268] = 283; | ||
@@ -499,2 +512,3 @@ t[269] = 313; | ||
t[278] = 328; | ||
t[283] = 344; | ||
t[284] = 345; | ||
@@ -715,6 +729,10 @@ t[285] = 346; | ||
t[4] = 65; | ||
t[6] = 193; | ||
t[17] = 66; | ||
t[18] = 67; | ||
t[21] = 268; | ||
t[24] = 68; | ||
t[28] = 69; | ||
t[30] = 201; | ||
t[32] = 282; | ||
t[38] = 70; | ||
@@ -724,2 +742,3 @@ t[39] = 71; | ||
t[47] = 73; | ||
t[49] = 205; | ||
t[58] = 74; | ||
@@ -734,3 +753,5 @@ t[60] = 75; | ||
t[90] = 82; | ||
t[92] = 344; | ||
t[94] = 83; | ||
t[97] = 352; | ||
t[100] = 84; | ||
@@ -742,4 +763,7 @@ t[104] = 85; | ||
t[122] = 89; | ||
t[124] = 221; | ||
t[127] = 90; | ||
t[129] = 381; | ||
t[258] = 97; | ||
t[260] = 225; | ||
t[268] = 261; | ||
@@ -749,4 +773,7 @@ t[271] = 98; | ||
t[273] = 263; | ||
t[275] = 269; | ||
t[282] = 100; | ||
t[286] = 101; | ||
t[288] = 233; | ||
t[290] = 283; | ||
t[295] = 281; | ||
@@ -757,2 +784,3 @@ t[296] = 102; | ||
t[349] = 105; | ||
t[351] = 237; | ||
t[361] = 106; | ||
@@ -769,4 +797,6 @@ t[364] = 107; | ||
t[396] = 114; | ||
t[398] = 345; | ||
t[400] = 115; | ||
t[401] = 347; | ||
t[403] = 353; | ||
t[410] = 116; | ||
@@ -778,3 +808,5 @@ t[437] = 117; | ||
t[455] = 121; | ||
t[457] = 253; | ||
t[460] = 122; | ||
t[462] = 382; | ||
t[463] = 380; | ||
@@ -781,0 +813,0 @@ t[853] = 44; |
@@ -110,3 +110,3 @@ /** | ||
const apiVersion = docParams.apiVersion; | ||
const workerVersion = '2.10.377'; | ||
const workerVersion = '2.11.338'; | ||
@@ -481,3 +481,3 @@ if (apiVersion !== workerVersion) { | ||
pdfManager.requestLoadedStream(); | ||
const promises = [pdfManager.onLoadedStream(), pdfManager.ensureCatalog("acroForm"), pdfManager.ensureDoc("xref"), pdfManager.ensureDoc("startXRef")]; | ||
const promises = [pdfManager.onLoadedStream(), pdfManager.ensureCatalog("acroForm"), pdfManager.ensureCatalog("acroFormRef"), pdfManager.ensureDoc("xref"), pdfManager.ensureDoc("startXRef")]; | ||
@@ -497,3 +497,3 @@ if (isPureXfa) { | ||
return Promise.all(promises).then(function ([stream, acroForm, xref, startXRef, ...refs]) { | ||
return Promise.all(promises).then(function ([stream, acroForm, acroFormRef, xref, startXRef, ...refs]) { | ||
let newRefs = []; | ||
@@ -518,4 +518,5 @@ let xfaData = null; | ||
const xfa = acroForm instanceof _primitives.Dict && acroForm.get("XFA") || []; | ||
let xfaDatasets = null; | ||
const xfa = acroForm instanceof _primitives.Dict && acroForm.get("XFA") || null; | ||
let xfaDatasetsRef = null; | ||
let hasXfaDatasetsEntry = false; | ||
@@ -525,6 +526,13 @@ if (Array.isArray(xfa)) { | ||
if (xfa[i] === "datasets") { | ||
xfaDatasets = xfa[i + 1]; | ||
xfaDatasetsRef = xfa[i + 1]; | ||
acroFormRef = null; | ||
hasXfaDatasetsEntry = true; | ||
} | ||
} | ||
} else { | ||
if (xfaDatasetsRef === null) { | ||
xfaDatasetsRef = xref.getNewRef(); | ||
} | ||
} else if (xfa) { | ||
acroFormRef = null; | ||
(0, _util.warn)("Unsupported XFA type."); | ||
@@ -565,3 +573,7 @@ } | ||
xref, | ||
datasetsRef: xfaDatasets, | ||
hasXfa: !!xfa, | ||
xfaDatasetsRef, | ||
hasXfaDatasetsEntry, | ||
acroFormRef, | ||
acroForm, | ||
xfaData | ||
@@ -582,3 +594,3 @@ }); | ||
intent: data.intent, | ||
renderInteractiveForms: data.renderInteractiveForms, | ||
cacheKey: data.cacheKey, | ||
annotationStorage: data.annotationStorage | ||
@@ -609,7 +621,2 @@ }).then(function (operatorListInfo) { | ||
const pageIndex = data.pageIndex; | ||
sink.onPull = function (desiredSize) {}; | ||
sink.onCancel = function (reason) {}; | ||
pdfManager.getPage(pageIndex).then(function (page) { | ||
@@ -616,0 +623,0 @@ const task = new WorkerTask("GetTextContent: page " + pageIndex); |
@@ -113,2 +113,4 @@ /** | ||
buffer.push(numberToString(value)); | ||
} else if (typeof value === "boolean") { | ||
buffer.push(value.toString()); | ||
} else if ((0, _primitives.isDict)(value)) { | ||
@@ -118,2 +120,6 @@ writeDict(value, buffer, transform); | ||
writeStream(value, buffer, transform); | ||
} else if (value === null) { | ||
buffer.push("null"); | ||
} else { | ||
(0, _util.warn)(`Unhandled value in writer: ${typeof value}, please file a bug.`); | ||
} | ||
@@ -194,9 +200,46 @@ } | ||
function updateXFA(xfaData, datasetsRef, newRefs, xref) { | ||
if (datasetsRef === null || xref === null) { | ||
function updateXFA({ | ||
xfaData, | ||
xfaDatasetsRef, | ||
hasXfaDatasetsEntry, | ||
acroFormRef, | ||
acroForm, | ||
newRefs, | ||
xref, | ||
xrefInfo | ||
}) { | ||
if (xref === null) { | ||
return; | ||
} | ||
if (!hasXfaDatasetsEntry) { | ||
if (!acroFormRef) { | ||
(0, _util.warn)("XFA - Cannot save it"); | ||
return; | ||
} | ||
const oldXfa = acroForm.get("XFA"); | ||
const newXfa = oldXfa.slice(); | ||
newXfa.splice(2, 0, "datasets"); | ||
newXfa.splice(3, 0, xfaDatasetsRef); | ||
acroForm.set("XFA", newXfa); | ||
const encrypt = xref.encrypt; | ||
let transform = null; | ||
if (encrypt) { | ||
transform = encrypt.createCipherTransform(acroFormRef.num, acroFormRef.gen); | ||
} | ||
const buffer = [`${acroFormRef.num} ${acroFormRef.gen} obj\n`]; | ||
writeDict(acroForm, buffer, transform); | ||
buffer.push("\n"); | ||
acroForm.set("XFA", oldXfa); | ||
newRefs.push({ | ||
ref: acroFormRef, | ||
data: buffer.join("") | ||
}); | ||
} | ||
if (xfaData === null) { | ||
const datasets = xref.fetchIfRef(datasetsRef); | ||
const datasets = xref.fetchIfRef(xfaDatasetsRef); | ||
xfaData = writeXFADataForAcroform(datasets.getString(), newRefs); | ||
@@ -208,9 +251,9 @@ } | ||
if (encrypt) { | ||
const transform = encrypt.createCipherTransform(datasetsRef.num, datasetsRef.gen); | ||
const transform = encrypt.createCipherTransform(xfaDatasetsRef.num, xfaDatasetsRef.gen); | ||
xfaData = transform.encryptString(xfaData); | ||
} | ||
const data = `${datasetsRef.num} ${datasetsRef.gen} obj\n` + `<< /Type /EmbeddedFile /Length ${xfaData.length}>>\nstream\n` + xfaData + "\nendstream\nendobj\n"; | ||
const data = `${xfaDatasetsRef.num} ${xfaDatasetsRef.gen} obj\n` + `<< /Type /EmbeddedFile /Length ${xfaData.length}>>\nstream\n` + xfaData + "\nendstream\nendobj\n"; | ||
newRefs.push({ | ||
ref: datasetsRef, | ||
ref: xfaDatasetsRef, | ||
data | ||
@@ -225,6 +268,22 @@ }); | ||
xref = null, | ||
datasetsRef = null, | ||
hasXfa = false, | ||
xfaDatasetsRef = null, | ||
hasXfaDatasetsEntry = false, | ||
acroFormRef = null, | ||
acroForm = null, | ||
xfaData = null | ||
}) { | ||
updateXFA(xfaData, datasetsRef, newRefs, xref); | ||
if (hasXfa) { | ||
updateXFA({ | ||
xfaData, | ||
xfaDatasetsRef, | ||
hasXfaDatasetsEntry, | ||
acroFormRef, | ||
acroForm, | ||
newRefs, | ||
xref, | ||
xrefInfo | ||
}); | ||
} | ||
const newXref = new _primitives.Dict(null); | ||
@@ -231,0 +290,0 @@ const refForXrefTable = xrefInfo.newRef; |
@@ -27,7 +27,9 @@ /** | ||
}); | ||
exports.getXfaFontDict = getXfaFontDict; | ||
exports.getXfaFontName = getXfaFontName; | ||
exports.getXfaFontWidths = getXfaFontWidths; | ||
var _calibri_factors = require("./calibri_factors.js"); | ||
var _primitives = require("./primitives.js"); | ||
var _helvetica_factors = require("./helvetica_factors.js"); | ||
@@ -50,3 +52,4 @@ | ||
baseWidths: _liberationsans_widths.LiberationSansRegularWidths, | ||
lineHeight: _myriadpro_factors.MyriadProRegularLineHeight | ||
baseMapping: _liberationsans_widths.LiberationSansRegularMapping, | ||
metrics: _myriadpro_factors.MyriadProRegularMetrics | ||
}; | ||
@@ -57,3 +60,4 @@ t["MyriadPro-Bold"] = t["PdfJS-Fallback-Bold"] = { | ||
baseWidths: _liberationsans_widths.LiberationSansBoldWidths, | ||
lineHeight: _myriadpro_factors.MyriadProBoldLineHeight | ||
baseMapping: _liberationsans_widths.LiberationSansBoldMapping, | ||
metrics: _myriadpro_factors.MyriadProBoldMetrics | ||
}; | ||
@@ -64,3 +68,4 @@ t["MyriadPro-It"] = t["MyriadPro-Italic"] = t["PdfJS-Fallback-Italic"] = { | ||
baseWidths: _liberationsans_widths.LiberationSansItalicWidths, | ||
lineHeight: _myriadpro_factors.MyriadProItalicLineHeight | ||
baseMapping: _liberationsans_widths.LiberationSansItalicMapping, | ||
metrics: _myriadpro_factors.MyriadProItalicMetrics | ||
}; | ||
@@ -71,19 +76,24 @@ t["MyriadPro-BoldIt"] = t["MyriadPro-BoldItalic"] = t["PdfJS-Fallback-BoldItalic"] = { | ||
baseWidths: _liberationsans_widths.LiberationSansBoldItalicWidths, | ||
lineHeight: _myriadpro_factors.MyriadProBoldItalicLineHeight | ||
baseMapping: _liberationsans_widths.LiberationSansBoldItalicMapping, | ||
metrics: _myriadpro_factors.MyriadProBoldItalicMetrics | ||
}; | ||
t.ArialMT = t.Arial = t["Arial-Regular"] = { | ||
name: "LiberationSans-Regular", | ||
baseWidths: _liberationsans_widths.LiberationSansRegularWidths | ||
baseWidths: _liberationsans_widths.LiberationSansRegularWidths, | ||
baseMapping: _liberationsans_widths.LiberationSansRegularMapping | ||
}; | ||
t["Arial-BoldMT"] = t["Arial-Bold"] = { | ||
name: "LiberationSans-Bold", | ||
baseWidths: _liberationsans_widths.LiberationSansBoldWidths | ||
baseWidths: _liberationsans_widths.LiberationSansBoldWidths, | ||
baseMapping: _liberationsans_widths.LiberationSansBoldMapping | ||
}; | ||
t["Arial-ItalicMT"] = t["Arial-Italic"] = { | ||
name: "LiberationSans-Italic", | ||
baseWidths: _liberationsans_widths.LiberationSansItalicWidths | ||
baseWidths: _liberationsans_widths.LiberationSansItalicWidths, | ||
baseMapping: _liberationsans_widths.LiberationSansItalicMapping | ||
}; | ||
t["Arial-BoldItalicMT"] = t["Arial-BoldItalic"] = { | ||
name: "LiberationSans-BoldItalic", | ||
baseWidths: _liberationsans_widths.LiberationSansBoldItalicWidths | ||
baseWidths: _liberationsans_widths.LiberationSansBoldItalicWidths, | ||
baseMapping: _liberationsans_widths.LiberationSansBoldItalicMapping | ||
}; | ||
@@ -94,3 +104,4 @@ t["Calibri-Regular"] = { | ||
baseWidths: _liberationsans_widths.LiberationSansRegularWidths, | ||
lineHeight: _calibri_factors.CalibriRegularLineHeight | ||
baseMapping: _liberationsans_widths.LiberationSansRegularMapping, | ||
metrics: _calibri_factors.CalibriRegularMetrics | ||
}; | ||
@@ -101,3 +112,4 @@ t["Calibri-Bold"] = { | ||
baseWidths: _liberationsans_widths.LiberationSansBoldWidths, | ||
lineHeight: _calibri_factors.CalibriBoldLineHeight | ||
baseMapping: _liberationsans_widths.LiberationSansBoldMapping, | ||
metrics: _calibri_factors.CalibriBoldMetrics | ||
}; | ||
@@ -108,3 +120,4 @@ t["Calibri-Italic"] = { | ||
baseWidths: _liberationsans_widths.LiberationSansItalicWidths, | ||
lineHeight: _calibri_factors.CalibriItalicLineHeight | ||
baseMapping: _liberationsans_widths.LiberationSansItalicMapping, | ||
metrics: _calibri_factors.CalibriItalicMetrics | ||
}; | ||
@@ -115,3 +128,4 @@ t["Calibri-BoldItalic"] = { | ||
baseWidths: _liberationsans_widths.LiberationSansBoldItalicWidths, | ||
lineHeight: _calibri_factors.CalibriBoldItalicLineHeight | ||
baseMapping: _liberationsans_widths.LiberationSansBoldItalicMapping, | ||
metrics: _calibri_factors.CalibriBoldItalicMetrics | ||
}; | ||
@@ -122,3 +136,4 @@ t["Segoeui-Regular"] = { | ||
baseWidths: _liberationsans_widths.LiberationSansRegularWidths, | ||
lineHeight: _segoeui_factors.SegoeuiRegularLineHeight | ||
baseMapping: _liberationsans_widths.LiberationSansRegularMapping, | ||
metrics: _segoeui_factors.SegoeuiRegularMetrics | ||
}; | ||
@@ -129,3 +144,4 @@ t["Segoeui-Bold"] = { | ||
baseWidths: _liberationsans_widths.LiberationSansBoldWidths, | ||
lineHeight: _segoeui_factors.SegoeuiBoldLineHeight | ||
baseMapping: _liberationsans_widths.LiberationSansBoldMapping, | ||
metrics: _segoeui_factors.SegoeuiBoldMetrics | ||
}; | ||
@@ -136,3 +152,4 @@ t["Segoeui-Italic"] = { | ||
baseWidths: _liberationsans_widths.LiberationSansItalicWidths, | ||
lineHeight: _segoeui_factors.SegoeuiItalicLineHeight | ||
baseMapping: _liberationsans_widths.LiberationSansItalicMapping, | ||
metrics: _segoeui_factors.SegoeuiItalicMetrics | ||
}; | ||
@@ -143,3 +160,4 @@ t["Segoeui-BoldItalic"] = { | ||
baseWidths: _liberationsans_widths.LiberationSansBoldItalicWidths, | ||
lineHeight: _segoeui_factors.SegoeuiBoldItalicLineHeight | ||
baseMapping: _liberationsans_widths.LiberationSansBoldItalicMapping, | ||
metrics: _segoeui_factors.SegoeuiBoldItalicMetrics | ||
}; | ||
@@ -150,3 +168,4 @@ t["Helvetica-Regular"] = t.Helvetica = { | ||
baseWidths: _liberationsans_widths.LiberationSansRegularWidths, | ||
lineHeight: _helvetica_factors.HelveticaRegularLineHeight | ||
baseMapping: _liberationsans_widths.LiberationSansRegularMapping, | ||
metrics: _helvetica_factors.HelveticaRegularMetrics | ||
}; | ||
@@ -157,3 +176,4 @@ t["Helvetica-Bold"] = { | ||
baseWidths: _liberationsans_widths.LiberationSansBoldWidths, | ||
lineHeight: _helvetica_factors.HelveticaBoldLineHeight | ||
baseMapping: _liberationsans_widths.LiberationSansBoldMapping, | ||
metrics: _helvetica_factors.HelveticaBoldMetrics | ||
}; | ||
@@ -164,3 +184,4 @@ t["Helvetica-Italic"] = { | ||
baseWidths: _liberationsans_widths.LiberationSansItalicWidths, | ||
lineHeight: _helvetica_factors.HelveticaItalicLineHeight | ||
baseMapping: _liberationsans_widths.LiberationSansItalicMapping, | ||
metrics: _helvetica_factors.HelveticaItalicMetrics | ||
}; | ||
@@ -171,3 +192,4 @@ t["Helvetica-BoldItalic"] = { | ||
baseWidths: _liberationsans_widths.LiberationSansBoldItalicWidths, | ||
lineHeight: _helvetica_factors.HelveticaBoldItalicLineHeight | ||
baseMapping: _liberationsans_widths.LiberationSansBoldItalicMapping, | ||
metrics: _helvetica_factors.HelveticaBoldItalicMetrics | ||
}; | ||
@@ -191,10 +213,54 @@ }); | ||
baseWidths, | ||
baseMapping, | ||
factors | ||
} = info; | ||
let rescaledBaseWidths; | ||
if (!factors) { | ||
return baseWidths; | ||
rescaledBaseWidths = baseWidths; | ||
} else { | ||
rescaledBaseWidths = baseWidths.map((w, i) => w * factors[i]); | ||
} | ||
return baseWidths.map((w, i) => w * factors[i]); | ||
let currentCode = -2; | ||
let currentArray; | ||
const newWidths = []; | ||
for (const [unicode, glyphIndex] of baseMapping.map((charUnicode, index) => [charUnicode, index]).sort(([unicode1], [unicode2]) => unicode1 - unicode2)) { | ||
if (unicode === -1) { | ||
continue; | ||
} | ||
if (unicode === currentCode + 1) { | ||
currentArray.push(rescaledBaseWidths[glyphIndex]); | ||
currentCode += 1; | ||
} else { | ||
currentCode = unicode; | ||
currentArray = [rescaledBaseWidths[glyphIndex]]; | ||
newWidths.push(unicode, currentArray); | ||
} | ||
} | ||
return newWidths; | ||
} | ||
function getXfaFontDict(name) { | ||
const widths = getXfaFontWidths(name); | ||
const dict = new _primitives.Dict(null); | ||
dict.set("BaseFont", _primitives.Name.get(name)); | ||
dict.set("Type", _primitives.Name.get("Font")); | ||
dict.set("Subtype", _primitives.Name.get("CIDFontType2")); | ||
dict.set("Encoding", _primitives.Name.get("Identity-H")); | ||
dict.set("CIDToGIDMap", _primitives.Name.get("Identity")); | ||
dict.set("W", widths); | ||
dict.set("FirstChar", widths[0]); | ||
dict.set("LastChar", widths[widths.length - 2] + widths[widths.length - 1].length - 1); | ||
const descriptor = new _primitives.Dict(null); | ||
dict.set("FontDescriptor", descriptor); | ||
const systemInfo = new _primitives.Dict(null); | ||
systemInfo.set("Ordering", "Identity"); | ||
systemInfo.set("Registry", "Adobe"); | ||
systemInfo.set("Supplement", 0); | ||
dict.set("CIDSystemInfo", systemInfo); | ||
return dict; | ||
} |
@@ -39,2 +39,4 @@ /** | ||
const NS_DATASETS = _namespaces.NamespaceIds.datasets.id; | ||
function createText(content) { | ||
@@ -328,2 +330,6 @@ const node = new _template.Text({}); | ||
baseClone = formNode[_xfa_object.$clone](); | ||
baseClone[_xfa_object.$removeChild](baseClone.occur); | ||
baseClone.occur = null; | ||
} | ||
@@ -352,5 +358,2 @@ | ||
clone.occur.min = 1; | ||
clone.occur.max = 1; | ||
clone.occur.initial = 1; | ||
parent[name].push(clone); | ||
@@ -385,12 +388,35 @@ | ||
for (let i = 0, ii = occur.initial; i < ii; i++) { | ||
const clone = formNode[_xfa_object.$clone](); | ||
if (!(parent[name] instanceof _xfa_object.XFAObjectArray)) { | ||
return; | ||
} | ||
clone.occur.min = 1; | ||
clone.occur.max = 1; | ||
clone.occur.initial = 1; | ||
parent[name].push(clone); | ||
let currentNumber; | ||
parent[_xfa_object.$appendChild](clone); | ||
if (formNode.name) { | ||
currentNumber = parent[name].children.filter(e => e.name === formNode.name).length; | ||
} else { | ||
currentNumber = parent[name].children.length; | ||
} | ||
const pos = parent[_xfa_object.$indexOf](formNode) + 1; | ||
const ii = occur.initial - currentNumber; | ||
if (ii) { | ||
const nodeClone = formNode[_xfa_object.$clone](); | ||
nodeClone[_xfa_object.$removeChild](nodeClone.occur); | ||
nodeClone.occur = null; | ||
parent[name].push(nodeClone); | ||
parent[_xfa_object.$insertAt](pos, nodeClone); | ||
for (let i = 1; i < ii; i++) { | ||
const clone = nodeClone[_xfa_object.$clone](); | ||
parent[name].push(clone); | ||
parent[_xfa_object.$insertAt](pos + i, clone); | ||
} | ||
} | ||
} | ||
@@ -400,7 +426,7 @@ | ||
const { | ||
name, | ||
occur | ||
} = formNode; | ||
const dataName = formNode.name; | ||
if (!occur || !dataName) { | ||
if (!occur || !name) { | ||
return [1, 1]; | ||
@@ -413,2 +439,10 @@ } | ||
_setAndBind(formNode, dataNode) { | ||
this._setProperties(formNode, dataNode); | ||
this._bindItems(formNode, dataNode); | ||
this._bindElement(formNode, dataNode); | ||
} | ||
_bindElement(formNode, dataNode) { | ||
@@ -432,3 +466,4 @@ const uselessNodes = []; | ||
} else if (this.emptyMerge) { | ||
const dataChild = child[_xfa_object.$data] = new _xfa_object.XmlObject(dataNode[_xfa_object.$namespaceId], child.name || "root"); | ||
const nsId = dataNode[_xfa_object.$namespaceId] === NS_DATASETS ? -1 : dataNode[_xfa_object.$namespaceId]; | ||
const dataChild = child[_xfa_object.$data] = new _xfa_object.XmlObject(nsId, child.name || "root"); | ||
@@ -455,3 +490,3 @@ dataNode[_xfa_object.$appendChild](dataChild); | ||
case "none": | ||
this._bindElement(child, dataNode); | ||
this._setAndBind(child, dataNode); | ||
@@ -468,3 +503,3 @@ continue; | ||
this._bindElement(child, dataNode); | ||
this._setAndBind(child, dataNode); | ||
@@ -502,3 +537,3 @@ continue; | ||
this._bindElement(child, match); | ||
this._setAndBind(child, match); | ||
@@ -525,3 +560,3 @@ continue; | ||
if (!child.name) { | ||
this._bindElement(child, dataNode); | ||
this._setAndBind(child, dataNode); | ||
@@ -550,3 +585,4 @@ continue; | ||
if (!match) { | ||
match = child[_xfa_object.$data] = new _xfa_object.XmlObject(dataNode[_xfa_object.$namespaceId], child.name); | ||
const nsId = dataNode[_xfa_object.$namespaceId] === NS_DATASETS ? -1 : dataNode[_xfa_object.$namespaceId]; | ||
match = child[_xfa_object.$data] = new _xfa_object.XmlObject(nsId, child.name); | ||
@@ -559,8 +595,4 @@ if (this.emptyMerge) { | ||
this._setProperties(child, match); | ||
this._setAndBind(child, match); | ||
this._bindItems(child, match); | ||
this._bindElement(child, match); | ||
continue; | ||
@@ -578,14 +610,5 @@ } | ||
if (match) { | ||
if (match.length < min) { | ||
(0, _util.warn)(`XFA - Must have at least ${min} occurrences: ${formNode[_xfa_object.$nodeName]}.`); | ||
continue; | ||
} | ||
this._bindOccurrences(child, match, picture); | ||
} else if (min > 0) { | ||
this._setProperties(child, dataNode); | ||
this._bindItems(child, dataNode); | ||
this._bindElement(child, dataNode); | ||
this._setAndBind(child, dataNode); | ||
} else { | ||
@@ -592,0 +615,0 @@ uselessNodes.push(child); |
@@ -27,5 +27,10 @@ /** | ||
}); | ||
exports.getMetrics = getMetrics; | ||
exports.selectFont = selectFont; | ||
exports.FontFinder = void 0; | ||
var _xfa_object = require("./xfa_object.js"); | ||
var _utils = require("./utils.js"); | ||
var _util = require("../../shared/util.js"); | ||
@@ -192,2 +197,31 @@ | ||
return typeface.regular; | ||
} | ||
function getMetrics(xfaFont, real = false) { | ||
let pdfFont = null; | ||
if (xfaFont) { | ||
const name = (0, _utils.stripQuotes)(xfaFont.typeface); | ||
const typeface = xfaFont[_xfa_object.$globalData].fontFinder.find(name); | ||
pdfFont = selectFont(xfaFont, typeface); | ||
} | ||
if (!pdfFont) { | ||
return { | ||
lineHeight: 12, | ||
lineGap: 2, | ||
lineNoGap: 10 | ||
}; | ||
} | ||
const size = xfaFont.size || 10; | ||
const lineHeight = pdfFont.lineHeight ? Math.max(real ? 0 : 1.2, pdfFont.lineHeight) : 1.2; | ||
const lineGap = pdfFont.lineGap === undefined ? 0.2 : pdfFont.lineGap; | ||
return { | ||
lineHeight: lineHeight * size, | ||
lineGap: lineGap * size, | ||
lineNoGap: Math.max(1, lineHeight - lineGap) * size | ||
}; | ||
} |
@@ -88,4 +88,4 @@ /** | ||
const hexPattern = /^[uU]([0-9a-fA-F]{4,8})/; | ||
const numberPattern = /^[0-9]*(?:\.[0-9]*)?(?:[Ee][+-]?[0-9]+)?/; | ||
const dotNumberPattern = /^[0-9]*(?:[Ee][+-]?[0-9]+)?/; | ||
const numberPattern = /^\d*(?:\.\d*)?(?:[Ee][+-]?\d+)?/; | ||
const dotNumberPattern = /^\d*(?:[Ee][+-]?\d+)?/; | ||
const eolPattern = /[\r\n]+/; | ||
@@ -92,0 +92,0 @@ const identifierPattern = new RegExp("^[\\p{L}_$!][\\p{L}\\p{N}_$]*", "u"); |
@@ -31,2 +31,3 @@ /** | ||
exports.fixTextIndent = fixTextIndent; | ||
exports.fixURL = fixURL; | ||
exports.isPrintOnly = isPrintOnly; | ||
@@ -44,2 +45,4 @@ exports.layoutClass = layoutClass; | ||
var _util = require("../../shared/util.js"); | ||
var _utils = require("./utils.js"); | ||
@@ -51,4 +54,2 @@ | ||
var _util = require("../../shared/util.js"); | ||
function measureToString(m) { | ||
@@ -298,3 +299,3 @@ if (typeof m === "string") { | ||
const maxWidth = !node.w ? availableSpace.width : node.w; | ||
const maxWidth = (!node.w ? availableSpace.width : node.w) - marginH; | ||
const fontFinder = node[_xfa_object.$globalData].fontFinder; | ||
@@ -610,2 +611,8 @@ | ||
function getCurrentPara(node) { | ||
const stack = node[_xfa_object.$getTemplateRoot]()[_xfa_object.$extra].paraStack; | ||
return stack.length ? stack[stack.length - 1] : null; | ||
} | ||
function setPara(node, nodeStyle, value) { | ||
@@ -623,3 +630,5 @@ if (value.attributes.class && value.attributes.class.includes("xfaRich")) { | ||
if (node.para) { | ||
const para = getCurrentPara(node); | ||
if (para) { | ||
const valueStyle = value.attributes.style; | ||
@@ -629,3 +638,3 @@ valueStyle.display = "flex"; | ||
switch (node.para.vAlign) { | ||
switch (para.vAlign) { | ||
case "top": | ||
@@ -644,3 +653,3 @@ valueStyle.justifyContent = "start"; | ||
const paraStyle = node.para[_xfa_object.$toStyle](); | ||
const paraStyle = para[_xfa_object.$toStyle](); | ||
@@ -656,3 +665,3 @@ for (const [key, val] of Object.entries(paraStyle)) { | ||
function setFontFamily(xfaFont, fontFinder, style) { | ||
function setFontFamily(xfaFont, node, fontFinder, style) { | ||
const name = (0, _utils.stripQuotes)(xfaFont.typeface); | ||
@@ -671,2 +680,8 @@ const typeface = fontFinder.find(name); | ||
const para = getCurrentPara(node); | ||
if (para && para.lineHeight !== "") { | ||
return; | ||
} | ||
if (style.lineHeight) { | ||
@@ -678,8 +693,14 @@ return; | ||
if (pdfFont && pdfFont.lineHeight > 0) { | ||
if (pdfFont) { | ||
style.lineHeight = Math.max(1.2, pdfFont.lineHeight); | ||
} else { | ||
style.lineHeight = 1.2; | ||
} | ||
} | ||
} | ||
function fixURL(str) { | ||
const absoluteUrl = (0, _util.createValidAbsoluteUrl)(str, null, { | ||
addDefaultProtocol: true, | ||
tryConvertEncoding: true | ||
}); | ||
return absoluteUrl ? absoluteUrl.href : null; | ||
} |
@@ -286,3 +286,3 @@ /** | ||
if (parent[_xfa_object.$extra].numberInLine === 0) { | ||
return space.height > 0; | ||
return space.height > ERROR; | ||
} | ||
@@ -293,3 +293,3 @@ | ||
return space.width > 0; | ||
return space.width > ERROR; | ||
} | ||
@@ -301,3 +301,3 @@ | ||
return space.width > 0; | ||
return space.width > ERROR; | ||
} | ||
@@ -314,3 +314,3 @@ | ||
if (node.w === "" || Math.round(w - space.width) <= ERROR) { | ||
return space.height > 0; | ||
return space.height > ERROR; | ||
} | ||
@@ -322,3 +322,3 @@ | ||
return space.height > 0; | ||
return space.height > ERROR; | ||
@@ -336,3 +336,3 @@ case "table": | ||
if (node.w === "" || Math.round(w - space.width) <= ERROR) { | ||
return space.height > 0; | ||
return space.height > ERROR; | ||
} | ||
@@ -344,3 +344,3 @@ | ||
return space.height > 0; | ||
return space.height > ERROR; | ||
@@ -347,0 +347,0 @@ case "position": |
@@ -32,2 +32,4 @@ /** | ||
var _namespaces = require("./namespaces.js"); | ||
var _util = require("../../shared/util.js"); | ||
@@ -44,4 +46,5 @@ | ||
}; | ||
const shortcuts = new Map([["$data", (root, current) => root.datasets.data], ["$template", (root, current) => root.template], ["$connectionSet", (root, current) => root.connectionSet], ["$form", (root, current) => root.form], ["$layout", (root, current) => root.layout], ["$host", (root, current) => root.host], ["$dataWindow", (root, current) => root.dataWindow], ["$event", (root, current) => root.event], ["!", (root, current) => root.datasets], ["$xfa", (root, current) => root], ["xfa", (root, current) => root], ["$", (root, current) => current]]); | ||
const shortcuts = new Map([["$data", (root, current) => root.datasets ? root.datasets.data : root], ["$record", (root, current) => (root.datasets ? root.datasets.data : root)[_xfa_object.$getChildren]()[0]], ["$template", (root, current) => root.template], ["$connectionSet", (root, current) => root.connectionSet], ["$form", (root, current) => root.form], ["$layout", (root, current) => root.layout], ["$host", (root, current) => root.host], ["$dataWindow", (root, current) => root.dataWindow], ["$event", (root, current) => root.event], ["!", (root, current) => root.datasets], ["$xfa", (root, current) => root], ["xfa", (root, current) => root], ["$", (root, current) => current]]); | ||
const somCache = new WeakMap(); | ||
const NS_DATASETS = _namespaces.NamespaceIds.datasets.id; | ||
@@ -272,3 +275,4 @@ function parseIndex(index) { | ||
for (let i = 0, ii = !isFinite(index) ? 0 : index; i <= ii; i++) { | ||
node = new _xfa_object.XmlObject(root[_xfa_object.$namespaceId], name); | ||
const nsId = root[_xfa_object.$namespaceId] === NS_DATASETS ? -1 : root[_xfa_object.$namespaceId]; | ||
node = new _xfa_object.XmlObject(nsId, name); | ||
@@ -275,0 +279,0 @@ root[_xfa_object.$appendChild](node); |
@@ -31,3 +31,3 @@ /** | ||
const WIDTH_FACTOR = 1.01; | ||
const WIDTH_FACTOR = 1.02; | ||
@@ -169,4 +169,9 @@ class FontInfo { | ||
const pdfFont = lastFont.pdfFont; | ||
const lineHeight = lastFont.lineHeight || Math.ceil(Math.max(1.2, pdfFont.lineHeight) * fontSize); | ||
const fontLineHeight = pdfFont.lineHeight || 1.2; | ||
const lineHeight = lastFont.lineHeight || Math.max(1.2, fontLineHeight) * fontSize; | ||
const lineGap = pdfFont.lineGap === undefined ? 0.2 : pdfFont.lineGap; | ||
const noGap = fontLineHeight - lineGap; | ||
const firstLineHeight = Math.max(1, noGap) * fontSize; | ||
const scale = fontSize / 1000; | ||
const fallbackWidth = pdfFont.defaultWidth || pdfFont.charsToGlyphs(" ")[0].width; | ||
@@ -178,6 +183,7 @@ for (const line of str.split(/[\u2029\n]/)) { | ||
for (const glyph of glyphs) { | ||
this.glyphs.push([glyph.width * scale + letterSpacing, lineHeight, glyph.unicode === " ", false]); | ||
const width = glyph.width || fallbackWidth; | ||
this.glyphs.push([width * scale + letterSpacing, lineHeight, firstLineHeight, glyph.unicode, false]); | ||
} | ||
this.glyphs.push([0, 0, false, true]); | ||
this.glyphs.push([0, 0, 0, "\n", true]); | ||
} | ||
@@ -191,6 +197,6 @@ | ||
for (const char of line.split("")) { | ||
this.glyphs.push([fontSize, fontSize, char === " ", false]); | ||
this.glyphs.push([fontSize, 1.2 * fontSize, fontSize, char, false]); | ||
} | ||
this.glyphs.push([0, 0, false, true]); | ||
this.glyphs.push([0, 0, 0, "\n", true]); | ||
} | ||
@@ -209,5 +215,8 @@ | ||
let isBroken = false; | ||
let isFirstLine = true; | ||
for (let i = 0, ii = this.glyphs.length; i < ii; i++) { | ||
const [glyphWidth, glyphHeight, isSpace, isEOL] = this.glyphs[i]; | ||
const [glyphWidth, lineHeight, firstLineHeight, char, isEOL] = this.glyphs[i]; | ||
const isSpace = char === " "; | ||
const glyphHeight = isFirstLine ? firstLineHeight : lineHeight; | ||
@@ -221,2 +230,3 @@ if (isEOL) { | ||
lastSpaceWidth = 0; | ||
isFirstLine = false; | ||
continue; | ||
@@ -234,2 +244,3 @@ } | ||
isBroken = true; | ||
isFirstLine = false; | ||
} else { | ||
@@ -261,2 +272,3 @@ currentLineHeight = Math.max(glyphHeight, currentLineHeight); | ||
isBroken = true; | ||
isFirstLine = false; | ||
continue; | ||
@@ -263,0 +275,0 @@ } |
@@ -48,3 +48,3 @@ /** | ||
}; | ||
const measurementPattern = /([+-]?[0-9]+\.?[0-9]*)(.*)/; | ||
const measurementPattern = /([+-]?\d+\.?\d*)(.*)/; | ||
@@ -51,0 +51,0 @@ function stripQuotes(str) { |
@@ -27,3 +27,3 @@ /** | ||
}); | ||
exports.XmlObject = exports.XFAObjectArray = exports.XFAObject = exports.XFAAttribute = exports.StringObject = exports.OptionObject = exports.Option10 = exports.Option01 = exports.IntegerObject = exports.ContentObject = exports.$uid = exports.$toStyle = exports.$toString = exports.$toHTML = exports.$text = exports.$tabIndex = exports.$setValue = exports.$setSetAttributes = exports.$setId = exports.$searchNode = exports.$root = exports.$resolvePrototypes = exports.$removeChild = exports.$pushGlyphs = exports.$onText = exports.$onChildCheck = exports.$onChild = exports.$nsAttributes = exports.$nodeName = exports.$namespaceId = exports.$isUsable = exports.$isTransparent = exports.$isThereMoreWidth = exports.$isSplittable = exports.$isNsAgnostic = exports.$isDescendent = exports.$isDataValue = exports.$isCDATAXml = exports.$isBindable = exports.$insertAt = exports.$indexOf = exports.$ids = exports.$hasSettableValue = exports.$globalData = exports.$getTemplateRoot = exports.$getSubformParent = exports.$getRealChildrenByNameIt = exports.$getParent = exports.$getNextPage = exports.$getExtra = exports.$getDataValue = exports.$getContainedChildren = exports.$getChildrenByNameIt = exports.$getChildrenByName = exports.$getChildrenByClass = exports.$getChildren = exports.$getAvailableSpace = exports.$getAttributes = exports.$getAttributeIt = exports.$flushHTML = exports.$finalize = exports.$extra = exports.$dump = exports.$data = exports.$content = exports.$consumed = exports.$clone = exports.$cleanup = exports.$cleanPage = exports.$clean = exports.$childrenToHTML = exports.$appendChild = exports.$addHTML = exports.$acceptWhitespace = void 0; | ||
exports.XmlObject = exports.XFAObjectArray = exports.XFAObject = exports.XFAAttribute = exports.StringObject = exports.OptionObject = exports.Option10 = exports.Option01 = exports.IntegerObject = exports.ContentObject = exports.$uid = exports.$toStyle = exports.$toString = exports.$toHTML = exports.$text = exports.$tabIndex = exports.$setValue = exports.$setSetAttributes = exports.$setId = exports.$searchNode = exports.$root = exports.$resolvePrototypes = exports.$removeChild = exports.$pushPara = exports.$pushGlyphs = exports.$popPara = exports.$onText = exports.$onChildCheck = exports.$onChild = exports.$nsAttributes = exports.$nodeName = exports.$namespaceId = exports.$isUsable = exports.$isTransparent = exports.$isThereMoreWidth = exports.$isSplittable = exports.$isNsAgnostic = exports.$isDescendent = exports.$isDataValue = exports.$isCDATAXml = exports.$isBindable = exports.$insertAt = exports.$indexOf = exports.$ids = exports.$hasSettableValue = exports.$globalData = exports.$getTemplateRoot = exports.$getSubformParent = exports.$getRealChildrenByNameIt = exports.$getParent = exports.$getNextPage = exports.$getExtra = exports.$getDataValue = exports.$getContainedChildren = exports.$getChildrenByNameIt = exports.$getChildrenByName = exports.$getChildrenByClass = exports.$getChildren = exports.$getAvailableSpace = exports.$getAttributes = exports.$getAttributeIt = exports.$flushHTML = exports.$finalize = exports.$extra = exports.$dump = exports.$data = exports.$content = exports.$consumed = exports.$clone = exports.$cleanup = exports.$cleanPage = exports.$clean = exports.$childrenToHTML = exports.$appendChild = exports.$addHTML = exports.$acceptWhitespace = void 0; | ||
@@ -143,2 +143,6 @@ var _utils = require("./utils.js"); | ||
exports.$pushGlyphs = $pushGlyphs; | ||
const $popPara = Symbol(); | ||
exports.$popPara = $popPara; | ||
const $pushPara = Symbol(); | ||
exports.$pushPara = $pushPara; | ||
const $removeChild = Symbol(); | ||
@@ -274,2 +278,12 @@ exports.$removeChild = $removeChild; | ||
[$popPara]() { | ||
if (this.para) { | ||
this[$getTemplateRoot]()[$extra].paraStack.pop(); | ||
} | ||
} | ||
[$pushPara]() { | ||
this[$getTemplateRoot]()[$extra].paraStack.push(this.para); | ||
} | ||
[$setId](ids) { | ||
@@ -297,2 +311,6 @@ if (this.id && this[$namespaceId] === _namespaces.NamespaceIds.template.id) { | ||
this[_children].push(child); | ||
if (!child[$globalData] && this[$globalData]) { | ||
child[$globalData] = this[$globalData]; | ||
} | ||
} | ||
@@ -333,2 +351,6 @@ | ||
this[_children].splice(i, 0, child); | ||
if (!child[$globalData] && this[$globalData]) { | ||
child[$globalData] = this[$globalData]; | ||
} | ||
} | ||
@@ -1073,5 +1095,9 @@ | ||
[$dump]() { | ||
[$dump](hasNS = false) { | ||
const dumped = Object.create(null); | ||
if (hasNS) { | ||
dumped.$ns = this[$namespaceId]; | ||
} | ||
if (this[$content]) { | ||
@@ -1085,3 +1111,3 @@ dumped.$content = this[$content]; | ||
for (const child of this[_children]) { | ||
dumped.children.push(child[$dump]()); | ||
dumped.children.push(child[$dump](hasNS)); | ||
} | ||
@@ -1088,0 +1114,0 @@ |
@@ -46,3 +46,3 @@ /** | ||
function mapStyle(styleStr, fontFinder) { | ||
function mapStyle(styleStr, node) { | ||
const style = Object.create(null); | ||
@@ -90,3 +90,3 @@ | ||
size: original.fontSize || 0 | ||
}, fontFinder, style); | ||
}, node, node[_xfa_object.$globalData].fontFinder, style); | ||
} | ||
@@ -261,3 +261,3 @@ | ||
href: this.href, | ||
style: mapStyle(this.style, this[_xfa_object.$globalData].fontFinder) | ||
style: mapStyle(this.style, this) | ||
}, | ||
@@ -274,3 +274,3 @@ children, | ||
super(attributes, "a"); | ||
this.href = attributes.href || ""; | ||
this.href = (0, _html_utils.fixURL)(attributes.href) || ""; | ||
} | ||
@@ -277,0 +277,0 @@ |
@@ -29,6 +29,6 @@ /** | ||
var _util = require("../shared/util.js"); | ||
var _display_utils = require("./display_utils.js"); | ||
var _util = require("../shared/util.js"); | ||
var _annotation_storage = require("./annotation_storage.js"); | ||
@@ -38,2 +38,5 @@ | ||
const DEFAULT_TAB_INDEX = 1000; | ||
const GetElementsByNameSet = new WeakSet(); | ||
class AnnotationElementFactory { | ||
@@ -138,3 +141,3 @@ static create(parameters) { | ||
this.imageResourcesPath = parameters.imageResourcesPath; | ||
this.renderInteractiveForms = parameters.renderInteractiveForms; | ||
this.renderForms = parameters.renderForms; | ||
this.svgFactory = parameters.svgFactory; | ||
@@ -144,2 +147,3 @@ this.annotationStorage = parameters.annotationStorage; | ||
this.hasJSActions = parameters.hasJSActions; | ||
this._fieldObjects = parameters.fieldObjects; | ||
this._mouseState = parameters.mouseState; | ||
@@ -211,3 +215,5 @@ | ||
if (data.color) { | ||
const borderColor = data.borderColor || data.color || null; | ||
if (borderColor) { | ||
container.style.borderColor = _util.Util.makeHexColor(data.color[0] | 0, data.color[1] | 0, data.color[2] | 0); | ||
@@ -262,5 +268,5 @@ } else { | ||
color: data.color, | ||
title: data.title, | ||
titleObj: data.titleObj, | ||
modificationDate: data.modificationDate, | ||
contents: data.contents, | ||
contentsObj: data.contentsObj, | ||
hideWrapper: true | ||
@@ -285,2 +291,73 @@ }); | ||
_getElementsByName(name, skipId = null) { | ||
const fields = []; | ||
if (this._fieldObjects) { | ||
const fieldObj = this._fieldObjects[name]; | ||
if (fieldObj) { | ||
for (const { | ||
page, | ||
id, | ||
exportValues | ||
} of fieldObj) { | ||
if (page === -1) { | ||
continue; | ||
} | ||
if (id === skipId) { | ||
continue; | ||
} | ||
const exportValue = typeof exportValues === "string" ? exportValues : null; | ||
const domElement = document.getElementById(id); | ||
if (domElement && !GetElementsByNameSet.has(domElement)) { | ||
(0, _util.warn)(`_getElementsByName - element not allowed: ${id}`); | ||
continue; | ||
} | ||
fields.push({ | ||
id, | ||
exportValue, | ||
domElement | ||
}); | ||
} | ||
} | ||
return fields; | ||
} | ||
for (const domElement of document.getElementsByName(name)) { | ||
const { | ||
id, | ||
exportValue | ||
} = domElement; | ||
if (id === skipId) { | ||
continue; | ||
} | ||
if (!GetElementsByNameSet.has(domElement)) { | ||
continue; | ||
} | ||
fields.push({ | ||
id, | ||
exportValue, | ||
domElement | ||
}); | ||
} | ||
return fields; | ||
} | ||
static get platform() { | ||
const platform = typeof navigator !== "undefined" ? navigator.platform : ""; | ||
return (0, _util.shadow)(this, "platform", { | ||
isWin: platform.includes("Win"), | ||
isMac: platform.includes("Mac") | ||
}); | ||
} | ||
} | ||
@@ -290,3 +367,3 @@ | ||
constructor(parameters) { | ||
const isRenderable = !!(parameters.data.url || parameters.data.dest || parameters.data.action || parameters.data.isTooltipOnly || parameters.data.actions && (parameters.data.actions.Action || parameters.data.actions["Mouse Up"] || parameters.data.actions["Mouse Down"])); | ||
const isRenderable = !!(parameters.data.url || parameters.data.dest || parameters.data.action || parameters.data.isTooltipOnly || parameters.data.resetForm || parameters.data.actions && (parameters.data.actions.Action || parameters.data.actions["Mouse Up"] || parameters.data.actions["Mouse Down"])); | ||
super(parameters, { | ||
@@ -306,8 +383,7 @@ isRenderable, | ||
if (data.url) { | ||
(0, _display_utils.addLinkAttributes)(link, { | ||
url: data.url, | ||
target: data.newWindow ? _display_utils.LinkTarget.BLANK : linkService.externalLinkTarget, | ||
rel: linkService.externalLinkRel, | ||
enabled: linkService.externalLinkEnabled | ||
}); | ||
if (!linkService.addLinkAttributes) { | ||
(0, _util.warn)("LinkAnnotationElement.render - missing `addLinkAttributes`-method on the `linkService`-instance."); | ||
} | ||
linkService.addLinkAttributes?.(link, data.url, data.newWindow); | ||
} else if (data.action) { | ||
@@ -317,6 +393,16 @@ this._bindNamedAction(link, data.action); | ||
this._bindLink(link, data.dest); | ||
} else if (data.actions && (data.actions.Action || data.actions["Mouse Up"] || data.actions["Mouse Down"]) && this.enableScripting && this.hasJSActions) { | ||
this._bindJSAction(link, data); | ||
} else { | ||
this._bindLink(link, ""); | ||
let hasClickAction = false; | ||
if (data.actions && (data.actions.Action || data.actions["Mouse Up"] || data.actions["Mouse Down"]) && this.enableScripting && this.hasJSActions) { | ||
hasClickAction = true; | ||
this._bindJSAction(link, data); | ||
} | ||
if (data.resetForm) { | ||
this._bindResetFormAction(link, data.resetForm); | ||
} else if (!hasClickAction) { | ||
this._bindLink(link, ""); | ||
} | ||
} | ||
@@ -387,5 +473,134 @@ | ||
if (!link.onclick) { | ||
link.onclick = () => false; | ||
} | ||
link.className = "internalLink"; | ||
} | ||
_bindResetFormAction(link, resetForm) { | ||
const otherClickAction = link.onclick; | ||
if (!otherClickAction) { | ||
link.href = this.linkService.getAnchorUrl(""); | ||
} | ||
link.className = "internalLink"; | ||
if (!this._fieldObjects) { | ||
(0, _util.warn)(`_bindResetFormAction - "resetForm" action not supported, ` + "ensure that the `fieldObjects` parameter is provided."); | ||
if (!otherClickAction) { | ||
link.onclick = () => false; | ||
} | ||
return; | ||
} | ||
link.onclick = () => { | ||
if (otherClickAction) { | ||
otherClickAction(); | ||
} | ||
const { | ||
fields: resetFormFields, | ||
refs: resetFormRefs, | ||
include | ||
} = resetForm; | ||
const allFields = []; | ||
if (resetFormFields.length !== 0 || resetFormRefs.length !== 0) { | ||
const fieldIds = new Set(resetFormRefs); | ||
for (const fieldName of resetFormFields) { | ||
const fields = this._fieldObjects[fieldName] || []; | ||
for (const { | ||
id | ||
} of fields) { | ||
fieldIds.add(id); | ||
} | ||
} | ||
for (const fields of Object.values(this._fieldObjects)) { | ||
for (const field of fields) { | ||
if (fieldIds.has(field.id) === include) { | ||
allFields.push(field); | ||
} | ||
} | ||
} | ||
} else { | ||
for (const fields of Object.values(this._fieldObjects)) { | ||
allFields.push(...fields); | ||
} | ||
} | ||
const storage = this.annotationStorage; | ||
const allIds = []; | ||
for (const field of allFields) { | ||
const { | ||
id | ||
} = field; | ||
allIds.push(id); | ||
switch (field.type) { | ||
case "text": | ||
{ | ||
const value = field.defaultValue || ""; | ||
storage.setValue(id, { | ||
value, | ||
valueAsString: value | ||
}); | ||
break; | ||
} | ||
case "checkbox": | ||
case "radiobutton": | ||
{ | ||
const value = field.defaultValue === field.exportValues; | ||
storage.setValue(id, { | ||
value | ||
}); | ||
break; | ||
} | ||
case "combobox": | ||
case "listbox": | ||
{ | ||
const value = field.defaultValue || ""; | ||
storage.setValue(id, { | ||
value | ||
}); | ||
break; | ||
} | ||
default: | ||
continue; | ||
} | ||
const domElement = document.getElementById(id); | ||
if (!domElement || !GetElementsByNameSet.has(domElement)) { | ||
continue; | ||
} | ||
domElement.dispatchEvent(new Event("resetform")); | ||
} | ||
if (this.enableScripting) { | ||
this.linkService.eventBus?.dispatch("dispatcheventinsandbox", { | ||
source: this, | ||
detail: { | ||
id: "app", | ||
ids: allIds, | ||
name: "ResetForm" | ||
} | ||
}); | ||
} | ||
return false; | ||
}; | ||
} | ||
} | ||
@@ -395,3 +610,3 @@ | ||
constructor(parameters) { | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.titleObj?.str || parameters.data.contentsObj?.str); | ||
super(parameters, { | ||
@@ -434,3 +649,7 @@ isRenderable | ||
_getKeyModifier(event) { | ||
return navigator.platform.includes("Win") && event.ctrlKey || navigator.platform.includes("Mac") && event.metaKey; | ||
const { | ||
isWin, | ||
isMac | ||
} = AnnotationElement.platform; | ||
return isWin && event.ctrlKey || isMac && event.metaKey; | ||
} | ||
@@ -474,2 +693,7 @@ | ||
_setBackgroundColor(element) { | ||
const color = this.data.backgroundColor || null; | ||
element.style.backgroundColor = color === null ? "transparent" : _util.Util.makeHexColor(color[0], color[1], color[2]); | ||
} | ||
_dispatchEventFromSandbox(actions, jsEvent) { | ||
@@ -556,3 +780,3 @@ const setColor = (jsName, styleName, event) => { | ||
constructor(parameters) { | ||
const isRenderable = parameters.renderInteractiveForms || !parameters.data.hasAppearance && !!parameters.data.fieldValue; | ||
const isRenderable = parameters.renderForms || !parameters.data.hasAppearance && !!parameters.data.fieldValue; | ||
super(parameters, { | ||
@@ -566,9 +790,10 @@ isRenderable | ||
for (const element of document.getElementsByName(base.name)) { | ||
if (element !== base) { | ||
element[key] = value; | ||
const data = Object.create(null); | ||
data[keyInStorage] = value; | ||
storage.setValue(element.getAttribute("id"), data); | ||
for (const element of this._getElementsByName(base.name, base.id)) { | ||
if (element.domElement) { | ||
element.domElement[key] = value; | ||
} | ||
storage.setValue(element.id, { | ||
[keyInStorage]: value | ||
}); | ||
} | ||
@@ -583,3 +808,3 @@ } | ||
if (this.renderInteractiveForms) { | ||
if (this.renderForms) { | ||
const storedData = storage.getValue(id, { | ||
@@ -606,2 +831,6 @@ value: this.data.fieldValue, | ||
GetElementsByNameSet.add(element); | ||
element.disabled = this.data.readOnly; | ||
element.name = this.data.fieldName; | ||
element.tabIndex = DEFAULT_TAB_INDEX; | ||
elementData.userValue = textContent; | ||
@@ -615,2 +844,7 @@ element.setAttribute("id", id); | ||
}); | ||
element.addEventListener("resetform", event => { | ||
const defaultValue = this.data.defaultFieldValue || ""; | ||
element.value = elementData.userValue = defaultValue; | ||
delete elementData.formattedValue; | ||
}); | ||
@@ -764,5 +998,2 @@ let blurListener = event => { | ||
element.disabled = this.data.readOnly; | ||
element.name = this.data.fieldName; | ||
if (this.data.maxLen !== null) { | ||
@@ -787,2 +1018,4 @@ element.maxLength = this.data.maxLen; | ||
this._setBackgroundColor(element); | ||
this.container.appendChild(element); | ||
@@ -816,3 +1049,3 @@ return this.container; | ||
super(parameters, { | ||
isRenderable: parameters.renderInteractiveForms | ||
isRenderable: parameters.renderForms | ||
}); | ||
@@ -826,3 +1059,3 @@ } | ||
let value = storage.getValue(id, { | ||
value: data.fieldValue && (data.exportValue && data.exportValue === data.fieldValue || !data.exportValue && data.fieldValue !== "Off") | ||
value: data.exportValue === data.fieldValue | ||
}).value; | ||
@@ -839,5 +1072,6 @@ | ||
const element = document.createElement("input"); | ||
GetElementsByNameSet.add(element); | ||
element.disabled = data.readOnly; | ||
element.type = "checkbox"; | ||
element.name = this.data.fieldName; | ||
element.name = data.fieldName; | ||
@@ -849,18 +1083,30 @@ if (value) { | ||
element.setAttribute("id", id); | ||
element.addEventListener("change", function (event) { | ||
const name = event.target.name; | ||
element.setAttribute("exportValue", data.exportValue); | ||
element.tabIndex = DEFAULT_TAB_INDEX; | ||
element.addEventListener("change", event => { | ||
const { | ||
name, | ||
checked | ||
} = event.target; | ||
for (const checkbox of document.getElementsByName(name)) { | ||
if (checkbox !== event.target) { | ||
checkbox.checked = false; | ||
storage.setValue(checkbox.parentNode.getAttribute("data-annotation-id"), { | ||
value: false | ||
}); | ||
for (const checkbox of this._getElementsByName(name, id)) { | ||
const curChecked = checked && checkbox.exportValue === data.exportValue; | ||
if (checkbox.domElement) { | ||
checkbox.domElement.checked = curChecked; | ||
} | ||
storage.setValue(checkbox.id, { | ||
value: curChecked | ||
}); | ||
} | ||
storage.setValue(id, { | ||
value: event.target.checked | ||
value: checked | ||
}); | ||
}); | ||
element.addEventListener("resetform", event => { | ||
const defaultValue = data.defaultFieldValue || "Off"; | ||
event.target.checked = defaultValue === data.exportValue; | ||
}); | ||
@@ -885,2 +1131,4 @@ if (this.enableScripting && this.hasJSActions) { | ||
this._setBackgroundColor(element); | ||
this.container.appendChild(element); | ||
@@ -895,3 +1143,3 @@ return this.container; | ||
super(parameters, { | ||
isRenderable: parameters.renderInteractiveForms | ||
isRenderable: parameters.renderForms | ||
}); | ||
@@ -917,2 +1165,3 @@ } | ||
const element = document.createElement("input"); | ||
GetElementsByNameSet.add(element); | ||
element.disabled = data.readOnly; | ||
@@ -927,19 +1176,23 @@ element.type = "radio"; | ||
element.setAttribute("id", id); | ||
element.addEventListener("change", function (event) { | ||
element.tabIndex = DEFAULT_TAB_INDEX; | ||
element.addEventListener("change", event => { | ||
const { | ||
target | ||
} = event; | ||
name, | ||
checked | ||
} = event.target; | ||
for (const radio of document.getElementsByName(target.name)) { | ||
if (radio !== target) { | ||
storage.setValue(radio.getAttribute("id"), { | ||
value: false | ||
}); | ||
} | ||
for (const radio of this._getElementsByName(name, id)) { | ||
storage.setValue(radio.id, { | ||
value: false | ||
}); | ||
} | ||
storage.setValue(id, { | ||
value: target.checked | ||
value: checked | ||
}); | ||
}); | ||
element.addEventListener("resetform", event => { | ||
const defaultValue = data.defaultFieldValue; | ||
event.target.checked = defaultValue !== null && defaultValue !== undefined && defaultValue === data.buttonValue; | ||
}); | ||
@@ -950,14 +1203,17 @@ if (this.enableScripting && this.hasJSActions) { | ||
const actions = { | ||
value(event) { | ||
value: event => { | ||
const checked = pdfButtonValue === event.detail.value; | ||
for (const radio of document.getElementsByName(event.target.name)) { | ||
const radioId = radio.getAttribute("id"); | ||
radio.checked = radioId === id && checked; | ||
storage.setValue(radioId, { | ||
value: radio.checked | ||
for (const radio of this._getElementsByName(event.target.name)) { | ||
const curChecked = checked && radio.id === id; | ||
if (radio.domElement) { | ||
radio.domElement.checked = curChecked; | ||
} | ||
storage.setValue(radio.id, { | ||
value: curChecked | ||
}); | ||
} | ||
} | ||
}; | ||
@@ -971,2 +1227,4 @@ | ||
this._setBackgroundColor(element); | ||
this.container.appendChild(element); | ||
@@ -995,3 +1253,3 @@ return this.container; | ||
super(parameters, { | ||
isRenderable: parameters.renderInteractiveForms | ||
isRenderable: parameters.renderForms | ||
}); | ||
@@ -1007,6 +1265,18 @@ } | ||
}); | ||
let { | ||
fontSize | ||
} = this.data.defaultAppearanceData; | ||
if (!fontSize) { | ||
fontSize = 9; | ||
} | ||
const fontSizeStyle = `calc(${fontSize}px * var(--zoom-factor))`; | ||
const selectElement = document.createElement("select"); | ||
GetElementsByNameSet.add(selectElement); | ||
selectElement.disabled = this.data.readOnly; | ||
selectElement.name = this.data.fieldName; | ||
selectElement.setAttribute("id", id); | ||
selectElement.tabIndex = DEFAULT_TAB_INDEX; | ||
selectElement.style.fontSize = `${fontSize}px`; | ||
@@ -1021,2 +1291,10 @@ if (!this.data.combo) { | ||
selectElement.addEventListener("resetform", event => { | ||
const defaultValue = this.data.defaultFieldValue; | ||
for (const option of selectElement.options) { | ||
option.selected = option.value === defaultValue; | ||
} | ||
}); | ||
for (const option of this.data.options) { | ||
@@ -1027,2 +1305,6 @@ const optionElement = document.createElement("option"); | ||
if (this.data.combo) { | ||
optionElement.style.fontSize = fontSizeStyle; | ||
} | ||
if (this.data.fieldValue.includes(option.exportValue)) { | ||
@@ -1060,8 +1342,9 @@ optionElement.setAttribute("selected", true); | ||
value(event) { | ||
const options = selectElement.options; | ||
const value = event.detail.value; | ||
const values = new Set(Array.isArray(value) ? value : [value]); | ||
Array.prototype.forEach.call(options, option => { | ||
for (const option of selectElement.options) { | ||
option.selected = values.has(option.value); | ||
}); | ||
} | ||
storage.setValue(id, { | ||
@@ -1155,6 +1438,7 @@ value: getValue(event, true) | ||
const indices = new Set(event.detail.indices); | ||
const options = event.target.options; | ||
Array.prototype.forEach.call(options, (option, i) => { | ||
option.selected = indices.has(i); | ||
}); | ||
for (const option of event.target.options) { | ||
option.selected = indices.has(option.index); | ||
} | ||
storage.setValue(id, { | ||
@@ -1202,2 +1486,4 @@ value: getValue(event, true) | ||
this._setBackgroundColor(selectElement); | ||
this.container.appendChild(selectElement); | ||
@@ -1211,3 +1497,3 @@ return this.container; | ||
constructor(parameters) { | ||
const isRenderable = !!(parameters.data.title || parameters.data.contents); | ||
const isRenderable = !!(parameters.data.titleObj?.str || parameters.data.contentsObj?.str); | ||
super(parameters, { | ||
@@ -1237,5 +1523,5 @@ isRenderable | ||
color: this.data.color, | ||
title: this.data.title, | ||
titleObj: this.data.titleObj, | ||
modificationDate: this.data.modificationDate, | ||
contents: this.data.contents | ||
contentsObj: this.data.contentsObj | ||
}); | ||
@@ -1262,5 +1548,5 @@ const page = this.page; | ||
this.color = parameters.color; | ||
this.title = parameters.title; | ||
this.titleObj = parameters.titleObj; | ||
this.modificationDate = parameters.modificationDate; | ||
this.contents = parameters.contents; | ||
this.contentsObj = parameters.contentsObj; | ||
this.hideWrapper = parameters.hideWrapper || false; | ||
@@ -1288,3 +1574,4 @@ this.pinned = false; | ||
const title = document.createElement("h1"); | ||
title.textContent = this.title; | ||
title.dir = this.titleObj.dir; | ||
title.textContent = this.titleObj.str; | ||
popup.appendChild(title); | ||
@@ -1305,3 +1592,3 @@ | ||
const contents = this._formatContents(this.contents); | ||
const contents = this._formatContents(this.contentsObj); | ||
@@ -1325,5 +1612,9 @@ popup.appendChild(contents); | ||
_formatContents(contents) { | ||
_formatContents({ | ||
str, | ||
dir | ||
}) { | ||
const p = document.createElement("p"); | ||
const lines = contents.split(/(?:\r\n?|\n)/); | ||
p.dir = dir; | ||
const lines = str.split(/(?:\r\n?|\n)/); | ||
@@ -1376,3 +1667,3 @@ for (let i = 0, ii = lines.length; i < ii; ++i) { | ||
constructor(parameters) { | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.titleObj?.str || parameters.data.contentsObj?.str); | ||
super(parameters, { | ||
@@ -1398,3 +1689,3 @@ isRenderable, | ||
constructor(parameters) { | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.titleObj?.str || parameters.data.contentsObj?.str); | ||
super(parameters, { | ||
@@ -1431,3 +1722,3 @@ isRenderable, | ||
constructor(parameters) { | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.titleObj?.str || parameters.data.contentsObj?.str); | ||
super(parameters, { | ||
@@ -1466,3 +1757,3 @@ isRenderable, | ||
constructor(parameters) { | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.titleObj?.str || parameters.data.contentsObj?.str); | ||
super(parameters, { | ||
@@ -1501,3 +1792,3 @@ isRenderable, | ||
constructor(parameters) { | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.titleObj?.str || parameters.data.contentsObj?.str); | ||
super(parameters, { | ||
@@ -1552,3 +1843,3 @@ isRenderable, | ||
constructor(parameters) { | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.titleObj?.str || parameters.data.contentsObj?.str); | ||
super(parameters, { | ||
@@ -1574,3 +1865,3 @@ isRenderable, | ||
constructor(parameters) { | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.titleObj?.str || parameters.data.contentsObj?.str); | ||
super(parameters, { | ||
@@ -1620,3 +1911,3 @@ isRenderable, | ||
constructor(parameters) { | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.titleObj?.str || parameters.data.contentsObj?.str); | ||
super(parameters, { | ||
@@ -1646,3 +1937,3 @@ isRenderable, | ||
constructor(parameters) { | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.titleObj?.str || parameters.data.contentsObj?.str); | ||
super(parameters, { | ||
@@ -1672,3 +1963,3 @@ isRenderable, | ||
constructor(parameters) { | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.titleObj?.str || parameters.data.contentsObj?.str); | ||
super(parameters, { | ||
@@ -1698,3 +1989,3 @@ isRenderable, | ||
constructor(parameters) { | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.titleObj?.str || parameters.data.contentsObj?.str); | ||
super(parameters, { | ||
@@ -1724,3 +2015,3 @@ isRenderable, | ||
constructor(parameters) { | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); | ||
const isRenderable = !!(parameters.data.hasPopup || parameters.data.titleObj?.str || parameters.data.contentsObj?.str); | ||
super(parameters, { | ||
@@ -1770,3 +2061,3 @@ isRenderable, | ||
if (!this.data.hasPopup && (this.data.title || this.data.contents)) { | ||
if (!this.data.hasPopup && (this.data.titleObj?.str || this.data.contentsObj?.str)) { | ||
this._createPopup(trigger, this.data); | ||
@@ -1816,3 +2107,3 @@ } | ||
imageResourcesPath: parameters.imageResourcesPath || "", | ||
renderInteractiveForms: parameters.renderInteractiveForms !== false, | ||
renderForms: parameters.renderForms !== false, | ||
svgFactory: new _display_utils.DOMSVGFactory(), | ||
@@ -1822,2 +2113,3 @@ annotationStorage: parameters.annotationStorage || new _annotation_storage.AnnotationStorage(), | ||
hasJSActions: parameters.hasJSActions, | ||
fieldObjects: parameters.fieldObjects, | ||
mouseState: parameters.mouseState || { | ||
@@ -1824,0 +2116,0 @@ isDown: false |
@@ -34,2 +34,3 @@ /** | ||
this._storage = new Map(); | ||
this._timeStamp = Date.now(); | ||
this._modified = false; | ||
@@ -41,5 +42,9 @@ this.onSetModified = null; | ||
getValue(key, defaultValue) { | ||
const obj = this._storage.get(key); | ||
const value = this._storage.get(key); | ||
return obj !== undefined ? obj : defaultValue; | ||
if (value === undefined) { | ||
return defaultValue; | ||
} | ||
return Object.assign(defaultValue, value); | ||
} | ||
@@ -60,8 +65,10 @@ | ||
} else { | ||
modified = true; | ||
this._storage.set(key, value); | ||
modified = true; | ||
} | ||
if (modified) { | ||
this._timeStamp = Date.now(); | ||
this._setModified(); | ||
@@ -103,4 +110,8 @@ } | ||
get lastModified() { | ||
return this._timeStamp.toString(); | ||
} | ||
} | ||
exports.AnnotationStorage = AnnotationStorage; |
@@ -36,3 +36,3 @@ /** | ||
exports.loadScript = loadScript; | ||
exports.StatTimer = exports.RenderingCancelledException = exports.PDFDateString = exports.PageViewport = exports.LinkTarget = exports.DOMSVGFactory = exports.DOMStandardFontDataFactory = exports.DOMCMapReaderFactory = exports.DOMCanvasFactory = exports.DEFAULT_LINK_REL = void 0; | ||
exports.StatTimer = exports.RenderingCancelledException = exports.PixelsPerInch = exports.PDFDateString = exports.PageViewport = exports.LinkTarget = exports.DOMSVGFactory = exports.DOMStandardFontDataFactory = exports.DOMCMapReaderFactory = exports.DOMCanvasFactory = void 0; | ||
@@ -44,5 +44,14 @@ var _util = require("../shared/util.js"); | ||
const DEFAULT_LINK_REL = "noopener noreferrer nofollow"; | ||
exports.DEFAULT_LINK_REL = DEFAULT_LINK_REL; | ||
const SVG_NS = "http://www.w3.org/2000/svg"; | ||
const PixelsPerInch = { | ||
CSS: 96.0, | ||
PDF: 72.0, | ||
get PDF_TO_CSS_UNITS() { | ||
return (0, _util.shadow)(this, "PDF_TO_CSS_UNITS", this.CSS / this.PDF); | ||
} | ||
}; | ||
exports.PixelsPerInch = PixelsPerInch; | ||
class DOMCanvasFactory extends _base_factory.BaseCanvasFactory { | ||
@@ -266,3 +275,3 @@ constructor({ | ||
constructor(msg, type) { | ||
super(msg); | ||
super(msg, "RenderingCancelledException"); | ||
this.type = type; | ||
@@ -269,0 +278,0 @@ } |
@@ -254,9 +254,3 @@ /** | ||
this._reader = response.body.getReader(); | ||
}).catch(reason => { | ||
if (reason?.name === "AbortError") { | ||
return; | ||
} | ||
throw reason; | ||
}); | ||
}).catch(this._readCapability.reject); | ||
this.onProgress = null; | ||
@@ -263,0 +257,0 @@ } |
@@ -49,7 +49,6 @@ /** | ||
class NetworkManager { | ||
constructor(url, args) { | ||
constructor(url, args = {}) { | ||
this.url = url; | ||
args = args || {}; | ||
this.isHttp = /^https?:/i.test(url); | ||
this.httpHeaders = this.isHttp && args.httpHeaders || {}; | ||
this.httpHeaders = this.isHttp && args.httpHeaders || Object.create(null); | ||
this.withCredentials = args.withCredentials || false; | ||
@@ -133,5 +132,3 @@ | ||
if (pendingRequest.onProgress) { | ||
pendingRequest.onProgress(evt); | ||
} | ||
pendingRequest.onProgress?.(evt); | ||
} | ||
@@ -164,6 +161,3 @@ | ||
if (xhr.status === 0 && this.isHttp) { | ||
if (pendingRequest.onError) { | ||
pendingRequest.onError(xhr.status); | ||
} | ||
pendingRequest.onError?.(xhr.status); | ||
return; | ||
@@ -176,6 +170,3 @@ } | ||
if (!ok_response_on_range_request && xhrStatus !== pendingRequest.expectedStatus) { | ||
if (pendingRequest.onError) { | ||
pendingRequest.onError(xhr.status); | ||
} | ||
pendingRequest.onError?.(xhr.status); | ||
return; | ||
@@ -198,4 +189,4 @@ } | ||
}); | ||
} else if (pendingRequest.onError) { | ||
pendingRequest.onError(xhr.status); | ||
} else { | ||
pendingRequest.onError?.(xhr.status); | ||
} | ||
@@ -256,5 +247,3 @@ } | ||
cancelAllRequests(reason) { | ||
if (this._fullRequestReader) { | ||
this._fullRequestReader.cancel(reason); | ||
} | ||
this._fullRequestReader?.cancel(reason); | ||
@@ -333,4 +322,4 @@ for (const reader of this._rangeRequestReaders.slice(0)) { | ||
_onDone(args) { | ||
if (args) { | ||
_onDone(data) { | ||
if (data) { | ||
if (this._requests.length > 0) { | ||
@@ -340,7 +329,7 @@ const requestCapability = this._requests.shift(); | ||
requestCapability.resolve({ | ||
value: args.chunk, | ||
value: data.chunk, | ||
done: false | ||
}); | ||
} else { | ||
this._cachedChunks.push(args.chunk); | ||
this._cachedChunks.push(data.chunk); | ||
} | ||
@@ -366,10 +355,8 @@ } | ||
_onError(status) { | ||
const url = this._url; | ||
const exception = (0, _network_utils.createResponseStatusError)(status, url); | ||
this._storedError = exception; | ||
this._storedError = (0, _network_utils.createResponseStatusError)(status, this._url); | ||
this._headersReceivedCapability.reject(exception); | ||
this._headersReceivedCapability.reject(this._storedError); | ||
for (const requestCapability of this._requests) { | ||
requestCapability.reject(exception); | ||
requestCapability.reject(this._storedError); | ||
} | ||
@@ -381,9 +368,7 @@ | ||
_onProgress(data) { | ||
if (this.onProgress) { | ||
this.onProgress({ | ||
loaded: data.loaded, | ||
total: data.lengthComputable ? data.total : this._contentLength | ||
}); | ||
} | ||
_onProgress(evt) { | ||
this.onProgress?.({ | ||
loaded: evt.loaded, | ||
total: evt.lengthComputable ? evt.total : this._contentLength | ||
}); | ||
} | ||
@@ -467,4 +452,6 @@ | ||
onDone: this._onDone.bind(this), | ||
onError: this._onError.bind(this), | ||
onProgress: this._onProgress.bind(this) | ||
}; | ||
this._url = manager.url; | ||
this._requestId = manager.requestRange(begin, end, args); | ||
@@ -474,2 +461,3 @@ this._requests = []; | ||
this._done = false; | ||
this._storedError = undefined; | ||
this.onProgress = null; | ||
@@ -480,5 +468,3 @@ this.onClosed = null; | ||
_close() { | ||
if (this.onClosed) { | ||
this.onClosed(this); | ||
} | ||
this.onClosed?.(this); | ||
} | ||
@@ -514,5 +500,16 @@ | ||
_onError(status) { | ||
this._storedError = (0, _network_utils.createResponseStatusError)(status, this._url); | ||
for (const requestCapability of this._requests) { | ||
requestCapability.reject(this._storedError); | ||
} | ||
this._requests.length = 0; | ||
this._queuedChunk = null; | ||
} | ||
_onProgress(evt) { | ||
if (!this.isStreamingSupported && this.onProgress) { | ||
this.onProgress({ | ||
if (!this.isStreamingSupported) { | ||
this.onProgress?.({ | ||
loaded: evt.loaded | ||
@@ -528,2 +525,6 @@ }); | ||
async read() { | ||
if (this._storedError) { | ||
throw this._storedError; | ||
} | ||
if (this._queuedChunk !== null) { | ||
@@ -530,0 +531,0 @@ const chunk = this._queuedChunk; |
@@ -123,2 +123,11 @@ /** | ||
isVisible(group) { | ||
if (this._groups.size === 0) { | ||
return true; | ||
} | ||
if (!group) { | ||
(0, _util.warn)("Optional content group not defined."); | ||
return true; | ||
} | ||
if (group.type === "OCG") { | ||
@@ -125,0 +134,0 @@ if (!this._groups.has(group.id)) { |
@@ -58,3 +58,3 @@ /** | ||
class RadialAxialShadingPattern extends BaseShadingPattern { | ||
constructor(IR) { | ||
constructor(IR, cachedCanvasPatterns) { | ||
super(); | ||
@@ -68,4 +68,4 @@ this._type = IR[1]; | ||
this._r1 = IR[7]; | ||
this._matrix = IR[8]; | ||
this._patternCache = null; | ||
this.matrix = null; | ||
this.cachedCanvasPatterns = cachedCanvasPatterns; | ||
} | ||
@@ -92,6 +92,6 @@ | ||
if (this._patternCache) { | ||
pattern = this._patternCache; | ||
} else { | ||
if (!shadingFill) { | ||
if (!shadingFill) { | ||
if (this.cachedCanvasPatterns.has(this)) { | ||
pattern = this.cachedCanvasPatterns.get(this); | ||
} else { | ||
const tmpCanvas = owner.cachedCanvases.getCanvas("pattern", owner.ctx.canvas.width, owner.ctx.canvas.height, true); | ||
@@ -104,4 +104,4 @@ const tmpCtx = tmpCanvas.context; | ||
if (this._matrix) { | ||
tmpCtx.transform.apply(tmpCtx, this._matrix); | ||
if (this.matrix) { | ||
tmpCtx.transform.apply(tmpCtx, this.matrix); | ||
} | ||
@@ -113,8 +113,7 @@ | ||
pattern = ctx.createPattern(tmpCanvas.canvas, "repeat"); | ||
} else { | ||
applyBoundingBox(ctx, this._bbox); | ||
pattern = this._createGradient(ctx); | ||
this.cachedCanvasPatterns.set(this, pattern); | ||
} | ||
this._patternCache = pattern; | ||
} else { | ||
applyBoundingBox(ctx, this._bbox); | ||
pattern = this._createGradient(ctx); | ||
} | ||
@@ -303,5 +302,5 @@ | ||
this._bounds = IR[5]; | ||
this._matrix = IR[6]; | ||
this._bbox = IR[7]; | ||
this._background = IR[8]; | ||
this.matrix = null; | ||
} | ||
@@ -370,4 +369,4 @@ | ||
if (this._matrix) { | ||
const matrixScale = _util.Util.singularValueDecompose2dScale(this._matrix); | ||
if (this.matrix) { | ||
const matrixScale = _util.Util.singularValueDecompose2dScale(this.matrix); | ||
@@ -383,4 +382,4 @@ scale = [scale[0] * matrixScale[0], scale[1] * matrixScale[1]]; | ||
if (this._matrix) { | ||
ctx.transform.apply(ctx, this._matrix); | ||
if (this.matrix) { | ||
ctx.transform.apply(ctx, this.matrix); | ||
} | ||
@@ -403,6 +402,6 @@ } | ||
function getShadingPattern(IR) { | ||
function getShadingPattern(IR, cachedCanvasPatterns) { | ||
switch (IR[0]) { | ||
case "RadialAxial": | ||
return new RadialAxialShadingPattern(IR); | ||
return new RadialAxialShadingPattern(IR, cachedCanvasPatterns); | ||
@@ -409,0 +408,0 @@ case "Mesh": |
@@ -96,3 +96,3 @@ /** | ||
const textDiv = document.createElement("span"); | ||
const textDivProperties = { | ||
const textDivProperties = task._enhanceTextSelection ? { | ||
angle: 0, | ||
@@ -108,2 +108,7 @@ canvasWidth: 0, | ||
scale: 1 | ||
} : { | ||
angle: 0, | ||
canvasWidth: 0, | ||
hasText: geom.str !== "", | ||
hasEOL: geom.hasEOL | ||
}; | ||
@@ -537,2 +542,6 @@ | ||
this._capability.promise.finally(() => { | ||
if (!this._enhanceTextSelection) { | ||
this._textDivProperties = null; | ||
} | ||
if (this._layoutTextCtx) { | ||
@@ -554,3 +563,3 @@ this._layoutTextCtx.canvas.width = 0; | ||
if (this._reader) { | ||
this._reader.cancel(new _util.AbortException("TextLayer task cancelled.")); | ||
this._reader.cancel(new _util.AbortException("TextLayer task cancelled.")).catch(() => {}); | ||
@@ -617,4 +626,9 @@ this._reader = null; | ||
if (width > 0) { | ||
textDivProperties.scale = textDivProperties.canvasWidth / width; | ||
transform = `scaleX(${textDivProperties.scale})`; | ||
const scale = textDivProperties.canvasWidth / width; | ||
if (this._enhanceTextSelection) { | ||
textDivProperties.scale = scale; | ||
} | ||
transform = `scaleX(${scale})`; | ||
} | ||
@@ -688,3 +702,3 @@ } | ||
} else { | ||
throw new Error('Neither "textContent" nor "textContentStream"' + " parameters specified."); | ||
throw new Error('Neither "textContent" nor "textContentStream" parameters specified.'); | ||
} | ||
@@ -691,0 +705,0 @@ |
@@ -29,2 +29,6 @@ /** | ||
var _util = require("../shared/util.js"); | ||
var _xfa_text = require("./xfa_text.js"); | ||
class XfaLayer { | ||
@@ -57,2 +61,4 @@ static setupStorage(html, id, element, storage, intent) { | ||
html.setAttribute("checked", true); | ||
} else if (storedData.value === element.attributes.xfaOff) { | ||
html.removeAttribute("checked"); | ||
} | ||
@@ -66,3 +72,3 @@ | ||
storage.setValue(id, { | ||
value: event.target.getAttribute("xfaOn") | ||
value: event.target.checked ? event.target.getAttribute("xfaOn") : event.target.getAttribute("xfaOff") | ||
}); | ||
@@ -108,6 +114,13 @@ }); | ||
static setAttributes(html, element, storage, intent) { | ||
static setAttributes({ | ||
html, | ||
element, | ||
storage = null, | ||
intent, | ||
linkService | ||
}) { | ||
const { | ||
attributes | ||
} = element; | ||
const isHTMLAnchorElement = html instanceof HTMLAnchorElement; | ||
@@ -129,2 +142,6 @@ if (attributes.type === "radio") { | ||
} else { | ||
if (isHTMLAnchorElement && (key === "href" || key === "newWindow")) { | ||
continue; | ||
} | ||
html.setAttribute(key, value); | ||
@@ -137,2 +154,10 @@ } | ||
if (isHTMLAnchorElement) { | ||
if (!linkService.addLinkAttributes) { | ||
(0, _util.warn)("XfaLayer.setAttribute - missing `addLinkAttributes`-method on the `linkService`-instance."); | ||
} | ||
linkService.addLinkAttributes?.(html, attributes.href, attributes.newWindow); | ||
} | ||
if (storage && attributes.dataId) { | ||
@@ -145,2 +170,3 @@ this.setupStorage(html, attributes.dataId, element, storage); | ||
const storage = parameters.annotationStorage; | ||
const linkService = parameters.linkService; | ||
const root = parameters.xfa; | ||
@@ -151,3 +177,8 @@ const intent = parameters.intent || "display"; | ||
if (root.attributes) { | ||
this.setAttributes(rootHtml, root); | ||
this.setAttributes({ | ||
html: rootHtml, | ||
element: root, | ||
intent, | ||
linkService | ||
}); | ||
} | ||
@@ -161,2 +192,3 @@ | ||
rootDiv.setAttribute("class", "xfaLayer xfaFont"); | ||
const textDivs = []; | ||
@@ -182,3 +214,5 @@ while (stack.length > 0) { | ||
if (name === "#text") { | ||
html.appendChild(document.createTextNode(child.value)); | ||
const node = document.createTextNode(child.value); | ||
textDivs.push(node); | ||
html.appendChild(node); | ||
continue; | ||
@@ -198,3 +232,9 @@ } | ||
if (child.attributes) { | ||
this.setAttributes(childHtml, child, storage, intent); | ||
this.setAttributes({ | ||
html: childHtml, | ||
element: child, | ||
storage, | ||
intent, | ||
linkService | ||
}); | ||
} | ||
@@ -205,3 +245,9 @@ | ||
} else if (child.value) { | ||
childHtml.appendChild(document.createTextNode(child.value)); | ||
const node = document.createTextNode(child.value); | ||
if (_xfa_text.XfaText.shouldBuildText(name)) { | ||
textDivs.push(node); | ||
} | ||
childHtml.appendChild(node); | ||
} | ||
@@ -213,2 +259,6 @@ } | ||
} | ||
return { | ||
textDivs | ||
}; | ||
} | ||
@@ -215,0 +265,0 @@ |
@@ -75,44 +75,20 @@ /** | ||
}); | ||
Object.defineProperty(exports, "RenderingCancelledException", { | ||
Object.defineProperty(exports, "PixelsPerInch", { | ||
enumerable: true, | ||
get: function () { | ||
return _display_utils.RenderingCancelledException; | ||
return _display_utils.PixelsPerInch; | ||
} | ||
}); | ||
Object.defineProperty(exports, "build", { | ||
Object.defineProperty(exports, "RenderingCancelledException", { | ||
enumerable: true, | ||
get: function () { | ||
return _api.build; | ||
return _display_utils.RenderingCancelledException; | ||
} | ||
}); | ||
Object.defineProperty(exports, "getDocument", { | ||
Object.defineProperty(exports, "AnnotationMode", { | ||
enumerable: true, | ||
get: function () { | ||
return _api.getDocument; | ||
return _util.AnnotationMode; | ||
} | ||
}); | ||
Object.defineProperty(exports, "LoopbackPort", { | ||
enumerable: true, | ||
get: function () { | ||
return _api.LoopbackPort; | ||
} | ||
}); | ||
Object.defineProperty(exports, "PDFDataRangeTransport", { | ||
enumerable: true, | ||
get: function () { | ||
return _api.PDFDataRangeTransport; | ||
} | ||
}); | ||
Object.defineProperty(exports, "PDFWorker", { | ||
enumerable: true, | ||
get: function () { | ||
return _api.PDFWorker; | ||
} | ||
}); | ||
Object.defineProperty(exports, "version", { | ||
enumerable: true, | ||
get: function () { | ||
return _api.version; | ||
} | ||
}); | ||
Object.defineProperty(exports, "CMapCompressionType", { | ||
@@ -208,2 +184,38 @@ enumerable: true, | ||
}); | ||
Object.defineProperty(exports, "build", { | ||
enumerable: true, | ||
get: function () { | ||
return _api.build; | ||
} | ||
}); | ||
Object.defineProperty(exports, "getDocument", { | ||
enumerable: true, | ||
get: function () { | ||
return _api.getDocument; | ||
} | ||
}); | ||
Object.defineProperty(exports, "LoopbackPort", { | ||
enumerable: true, | ||
get: function () { | ||
return _api.LoopbackPort; | ||
} | ||
}); | ||
Object.defineProperty(exports, "PDFDataRangeTransport", { | ||
enumerable: true, | ||
get: function () { | ||
return _api.PDFDataRangeTransport; | ||
} | ||
}); | ||
Object.defineProperty(exports, "PDFWorker", { | ||
enumerable: true, | ||
get: function () { | ||
return _api.PDFWorker; | ||
} | ||
}); | ||
Object.defineProperty(exports, "version", { | ||
enumerable: true, | ||
get: function () { | ||
return _api.version; | ||
} | ||
}); | ||
Object.defineProperty(exports, "AnnotationLayer", { | ||
@@ -242,6 +254,6 @@ enumerable: true, | ||
var _util = require("./shared/util.js"); | ||
var _api = require("./display/api.js"); | ||
var _util = require("./shared/util.js"); | ||
var _annotation_layer = require("./display/annotation_layer.js"); | ||
@@ -259,4 +271,4 @@ | ||
const pdfjsVersion = '2.10.377'; | ||
const pdfjsBuild = '156762c48'; | ||
const pdfjsVersion = '2.11.338'; | ||
const pdfjsBuild = 'dedff3c98'; | ||
{ | ||
@@ -263,0 +275,0 @@ if (_is_node.isNodeJS) { |
@@ -36,3 +36,3 @@ /** | ||
const pdfjsVersion = '2.10.377'; | ||
const pdfjsBuild = '156762c48'; | ||
const pdfjsVersion = '2.11.338'; | ||
const pdfjsBuild = 'dedff3c98'; |
@@ -49,3 +49,4 @@ /** | ||
function wrapReason(reason) { | ||
if (typeof reason !== "object" || reason === null) { | ||
if (!(reason instanceof Error || typeof reason === "object" && reason !== null)) { | ||
(0, _util.warn)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'); | ||
return reason; | ||
@@ -61,2 +62,5 @@ } | ||
case "PasswordException": | ||
return new _util.PasswordException(reason.message, reason.code); | ||
case "UnexpectedResponseException": | ||
@@ -203,6 +207,6 @@ return new _util.UnexpectedResponseException(reason.message, reason.status); | ||
sendWithStream(actionName, data, queueingStrategy, transfers) { | ||
const streamId = this.streamId++; | ||
const sourceName = this.sourceName; | ||
const targetName = this.targetName; | ||
const comObj = this.comObj; | ||
const streamId = this.streamId++, | ||
sourceName = this.sourceName, | ||
targetName = this.targetName, | ||
comObj = this.comObj; | ||
return new ReadableStream({ | ||
@@ -260,8 +264,8 @@ start: controller => { | ||
_createStreamSink(data) { | ||
const self = this; | ||
const action = this.actionHandler[data.action]; | ||
const streamId = data.streamId; | ||
const sourceName = this.sourceName; | ||
const targetName = data.sourceName; | ||
const comObj = this.comObj; | ||
const streamId = data.streamId, | ||
sourceName = this.sourceName, | ||
targetName = data.sourceName, | ||
comObj = this.comObj; | ||
const self = this, | ||
action = this.actionHandler[data.action]; | ||
const streamSink = { | ||
@@ -354,6 +358,8 @@ enqueue(chunk, size = 1, transfers) { | ||
_processStreamMessage(data) { | ||
const streamId = data.streamId; | ||
const sourceName = this.sourceName; | ||
const targetName = data.sourceName; | ||
const comObj = this.comObj; | ||
const streamId = data.streamId, | ||
sourceName = this.sourceName, | ||
targetName = data.sourceName, | ||
comObj = this.comObj; | ||
const streamController = this.streamControllers[streamId], | ||
streamSink = this.streamSinks[streamId]; | ||
@@ -363,5 +369,5 @@ switch (data.stream) { | ||
if (data.success) { | ||
this.streamControllers[streamId].startCall.resolve(); | ||
streamController.startCall.resolve(); | ||
} else { | ||
this.streamControllers[streamId].startCall.reject(wrapReason(data.reason)); | ||
streamController.startCall.reject(wrapReason(data.reason)); | ||
} | ||
@@ -373,5 +379,5 @@ | ||
if (data.success) { | ||
this.streamControllers[streamId].pullCall.resolve(); | ||
streamController.pullCall.resolve(); | ||
} else { | ||
this.streamControllers[streamId].pullCall.reject(wrapReason(data.reason)); | ||
streamController.pullCall.reject(wrapReason(data.reason)); | ||
} | ||
@@ -382,3 +388,3 @@ | ||
case StreamKind.PULL: | ||
if (!this.streamSinks[streamId]) { | ||
if (!streamSink) { | ||
comObj.postMessage({ | ||
@@ -394,12 +400,9 @@ sourceName, | ||
if (this.streamSinks[streamId].desiredSize <= 0 && data.desiredSize > 0) { | ||
this.streamSinks[streamId].sinkCapability.resolve(); | ||
if (streamSink.desiredSize <= 0 && data.desiredSize > 0) { | ||
streamSink.sinkCapability.resolve(); | ||
} | ||
this.streamSinks[streamId].desiredSize = data.desiredSize; | ||
const { | ||
onPull | ||
} = this.streamSinks[data.streamId]; | ||
streamSink.desiredSize = data.desiredSize; | ||
new Promise(function (resolve) { | ||
resolve(onPull && onPull()); | ||
resolve(streamSink.onPull && streamSink.onPull()); | ||
}).then(function () { | ||
@@ -425,22 +428,22 @@ comObj.postMessage({ | ||
case StreamKind.ENQUEUE: | ||
(0, _util.assert)(this.streamControllers[streamId], "enqueue should have stream controller"); | ||
(0, _util.assert)(streamController, "enqueue should have stream controller"); | ||
if (this.streamControllers[streamId].isClosed) { | ||
if (streamController.isClosed) { | ||
break; | ||
} | ||
this.streamControllers[streamId].controller.enqueue(data.chunk); | ||
streamController.controller.enqueue(data.chunk); | ||
break; | ||
case StreamKind.CLOSE: | ||
(0, _util.assert)(this.streamControllers[streamId], "close should have stream controller"); | ||
(0, _util.assert)(streamController, "close should have stream controller"); | ||
if (this.streamControllers[streamId].isClosed) { | ||
if (streamController.isClosed) { | ||
break; | ||
} | ||
this.streamControllers[streamId].isClosed = true; | ||
this.streamControllers[streamId].controller.close(); | ||
streamController.isClosed = true; | ||
streamController.controller.close(); | ||
this._deleteStreamController(streamId); | ||
this._deleteStreamController(streamController, streamId); | ||
@@ -450,6 +453,6 @@ break; | ||
case StreamKind.ERROR: | ||
(0, _util.assert)(this.streamControllers[streamId], "error should have stream controller"); | ||
this.streamControllers[streamId].controller.error(wrapReason(data.reason)); | ||
(0, _util.assert)(streamController, "error should have stream controller"); | ||
streamController.controller.error(wrapReason(data.reason)); | ||
this._deleteStreamController(streamId); | ||
this._deleteStreamController(streamController, streamId); | ||
@@ -460,8 +463,8 @@ break; | ||
if (data.success) { | ||
this.streamControllers[streamId].cancelCall.resolve(); | ||
streamController.cancelCall.resolve(); | ||
} else { | ||
this.streamControllers[streamId].cancelCall.reject(wrapReason(data.reason)); | ||
streamController.cancelCall.reject(wrapReason(data.reason)); | ||
} | ||
this._deleteStreamController(streamId); | ||
this._deleteStreamController(streamController, streamId); | ||
@@ -471,11 +474,8 @@ break; | ||
case StreamKind.CANCEL: | ||
if (!this.streamSinks[streamId]) { | ||
if (!streamSink) { | ||
break; | ||
} | ||
const { | ||
onCancel | ||
} = this.streamSinks[data.streamId]; | ||
new Promise(function (resolve) { | ||
resolve(onCancel && onCancel(wrapReason(data.reason))); | ||
resolve(streamSink.onCancel && streamSink.onCancel(wrapReason(data.reason))); | ||
}).then(function () { | ||
@@ -498,4 +498,4 @@ comObj.postMessage({ | ||
}); | ||
this.streamSinks[streamId].sinkCapability.reject(wrapReason(data.reason)); | ||
this.streamSinks[streamId].isCancelled = true; | ||
streamSink.sinkCapability.reject(wrapReason(data.reason)); | ||
streamSink.isCancelled = true; | ||
delete this.streamSinks[streamId]; | ||
@@ -509,6 +509,4 @@ break; | ||
async _deleteStreamController(streamId) { | ||
await Promise.allSettled([this.streamControllers[streamId].startCall, this.streamControllers[streamId].pullCall, this.streamControllers[streamId].cancelCall].map(function (capability) { | ||
return capability && capability.promise; | ||
})); | ||
async _deleteStreamController(streamController, streamId) { | ||
await Promise.allSettled([streamController.startCall && streamController.startCall.promise, streamController.pullCall && streamController.pullCall.promise, streamController.cancelCall && streamController.cancelCall.promise]); | ||
delete this.streamControllers[streamId]; | ||
@@ -515,0 +513,0 @@ } |
@@ -58,3 +58,3 @@ /** | ||
exports.warn = warn; | ||
exports.VerbosityLevel = exports.Util = exports.UNSUPPORTED_FEATURES = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.PermissionFlag = exports.PasswordResponses = exports.PasswordException = exports.PageActionEventType = exports.OPS = exports.MissingPDFException = exports.IsLittleEndianCached = exports.IsEvalSupportedCached = exports.InvalidPDFException = exports.ImageKind = exports.IDENTITY_MATRIX = exports.FormatError = exports.FontType = exports.FONT_IDENTITY_MATRIX = exports.DocumentActionEventType = exports.CMapCompressionType = exports.BaseException = exports.AnnotationType = exports.AnnotationStateModelType = exports.AnnotationReviewState = exports.AnnotationReplyType = exports.AnnotationMarkedState = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.AnnotationActionEventType = exports.AbortException = void 0; | ||
exports.VerbosityLevel = exports.Util = exports.UNSUPPORTED_FEATURES = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.RenderingIntentFlag = exports.PermissionFlag = exports.PasswordResponses = exports.PasswordException = exports.PageActionEventType = exports.OPS = exports.MissingPDFException = exports.IsLittleEndianCached = exports.IsEvalSupportedCached = exports.InvalidPDFException = exports.ImageKind = exports.IDENTITY_MATRIX = exports.FormatError = exports.FontType = exports.FONT_IDENTITY_MATRIX = exports.DocumentActionEventType = exports.CMapCompressionType = exports.BaseException = exports.AnnotationType = exports.AnnotationStateModelType = exports.AnnotationReviewState = exports.AnnotationReplyType = exports.AnnotationMode = exports.AnnotationMarkedState = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.AnnotationActionEventType = exports.AbortException = void 0; | ||
@@ -67,2 +67,19 @@ require("./compatibility.js"); | ||
exports.FONT_IDENTITY_MATRIX = FONT_IDENTITY_MATRIX; | ||
const RenderingIntentFlag = { | ||
ANY: 0x01, | ||
DISPLAY: 0x02, | ||
PRINT: 0x04, | ||
ANNOTATIONS_FORMS: 0x10, | ||
ANNOTATIONS_STORAGE: 0x20, | ||
ANNOTATIONS_DISABLE: 0x40, | ||
OPLIST: 0x100 | ||
}; | ||
exports.RenderingIntentFlag = RenderingIntentFlag; | ||
const AnnotationMode = { | ||
DISABLE: 0, | ||
ENABLE: 1, | ||
ENABLE_FORMS: 2, | ||
ENABLE_STORAGE: 3 | ||
}; | ||
exports.AnnotationMode = AnnotationMode; | ||
const PermissionFlag = { | ||
@@ -378,3 +395,4 @@ PRINT: 0x04, | ||
errorFontGetPath: "errorFontGetPath", | ||
errorMarkedContent: "errorMarkedContent" | ||
errorMarkedContent: "errorMarkedContent", | ||
errorContentSubStream: "errorContentSubStream" | ||
}; | ||
@@ -456,3 +474,3 @@ exports.UNSUPPORTED_FEATURES = UNSUPPORTED_FEATURES; | ||
function createValidAbsoluteUrl(url, baseUrl) { | ||
function createValidAbsoluteUrl(url, baseUrl = null, options = null) { | ||
if (!url) { | ||
@@ -463,2 +481,18 @@ return null; | ||
try { | ||
if (options && typeof url === "string") { | ||
if (options.addDefaultProtocol && url.startsWith("www.")) { | ||
const dots = url.match(/\./g); | ||
if (dots && dots.length >= 2) { | ||
url = `http://${url}`; | ||
} | ||
} | ||
if (options.tryConvertEncoding) { | ||
try { | ||
url = stringToUTF8String(url); | ||
} catch (ex) {} | ||
} | ||
} | ||
const absoluteUrl = baseUrl ? new URL(url, baseUrl) : new URL(url); | ||
@@ -485,3 +519,3 @@ | ||
const BaseException = function BaseExceptionClosure() { | ||
function BaseException(message) { | ||
function BaseException(message, name) { | ||
if (this.constructor === BaseException) { | ||
@@ -492,3 +526,3 @@ unreachable("Cannot initialize BaseException."); | ||
this.message = message; | ||
this.name = this.constructor.name; | ||
this.name = name; | ||
} | ||
@@ -505,3 +539,3 @@ | ||
constructor(msg, code) { | ||
super(msg); | ||
super(msg, "PasswordException"); | ||
this.code = code; | ||
@@ -516,3 +550,3 @@ } | ||
constructor(msg, details) { | ||
super(msg); | ||
super(msg, "UnknownErrorException"); | ||
this.details = details; | ||
@@ -525,8 +559,18 @@ } | ||
class InvalidPDFException extends BaseException {} | ||
class InvalidPDFException extends BaseException { | ||
constructor(msg) { | ||
super(msg, "InvalidPDFException"); | ||
} | ||
} | ||
exports.InvalidPDFException = InvalidPDFException; | ||
class MissingPDFException extends BaseException {} | ||
class MissingPDFException extends BaseException { | ||
constructor(msg) { | ||
super(msg, "MissingPDFException"); | ||
} | ||
} | ||
exports.MissingPDFException = MissingPDFException; | ||
@@ -536,3 +580,3 @@ | ||
constructor(msg, status) { | ||
super(msg); | ||
super(msg, "UnexpectedResponseException"); | ||
this.status = status; | ||
@@ -545,8 +589,18 @@ } | ||
class FormatError extends BaseException {} | ||
class FormatError extends BaseException { | ||
constructor(msg) { | ||
super(msg, "FormatError"); | ||
} | ||
} | ||
exports.FormatError = FormatError; | ||
class AbortException extends BaseException {} | ||
class AbortException extends BaseException { | ||
constructor(msg) { | ||
super(msg, "AbortException"); | ||
} | ||
} | ||
exports.AbortException = AbortException; | ||
@@ -553,0 +607,0 @@ const NullCharactersRegExp = /\x00/g; |
@@ -42,2 +42,18 @@ /** | ||
}); | ||
it("should get set values and default ones in the annotation storage", function () { | ||
const annotationStorage = new _annotation_storage.AnnotationStorage(); | ||
annotationStorage.setValue("123A", { | ||
value: "hello world", | ||
hello: "world" | ||
}); | ||
const result = annotationStorage.getValue("123A", { | ||
value: "an other string", | ||
world: "hello" | ||
}); | ||
expect(result).toEqual({ | ||
value: "hello world", | ||
hello: "world", | ||
world: "hello" | ||
}); | ||
}); | ||
}); | ||
@@ -44,0 +60,0 @@ describe("SetValue", function () { |
@@ -363,2 +363,9 @@ /** | ||
function ensureAESEncryptedStringHasCorrectLength(dict, fileId, password, string) { | ||
const factory = new _crypto.CipherTransformFactory(dict, fileId, password); | ||
const cipher = factory.createCipherTransform(123, 0); | ||
const encrypted = cipher.encryptString(string); | ||
expect(encrypted.length).toEqual(16 + 16 * Math.ceil((string.length + 1) / 16)); | ||
} | ||
function ensureEncryptDecryptIsIdentity(dict, fileId, password, string) { | ||
@@ -517,2 +524,3 @@ const factory = new _crypto.CipherTransformFactory(dict, fileId, password); | ||
const dict = buildDict(dict3); | ||
ensureEncryptDecryptIsIdentity(dict, fileId1, "user", ""); | ||
ensureEncryptDecryptIsIdentity(dict, fileId1, "user", "a"); | ||
@@ -530,2 +538,3 @@ ensureEncryptDecryptIsIdentity(dict, fileId1, "user", "aa"); | ||
const dict = buildDict(dict3); | ||
ensureEncryptDecryptIsIdentity(dict, fileId1, "user", ""); | ||
ensureEncryptDecryptIsIdentity(dict, fileId1, "user", "aaaa"); | ||
@@ -536,3 +545,29 @@ ensureEncryptDecryptIsIdentity(dict, fileId1, "user", "aaaaa"); | ||
}); | ||
it("should encrypt and have the correct length using AES128", function () { | ||
dict3.CF = buildDict({ | ||
Identity: buildDict({ | ||
CFM: _primitives.Name.get("AESV2") | ||
}) | ||
}); | ||
const dict = buildDict(dict3); | ||
ensureAESEncryptedStringHasCorrectLength(dict, fileId1, "user", ""); | ||
ensureAESEncryptedStringHasCorrectLength(dict, fileId1, "user", "a"); | ||
ensureAESEncryptedStringHasCorrectLength(dict, fileId1, "user", "aa"); | ||
ensureAESEncryptedStringHasCorrectLength(dict, fileId1, "user", "aaaaaaaaaaaaaaaa"); | ||
ensureAESEncryptedStringHasCorrectLength(dict, fileId1, "user", "aaaaaaaaaaaaaaaaaaa"); | ||
}); | ||
it("should encrypt and have the correct length using AES256", function () { | ||
dict3.CF = buildDict({ | ||
Identity: buildDict({ | ||
CFM: _primitives.Name.get("AESV3") | ||
}) | ||
}); | ||
const dict = buildDict(dict3); | ||
ensureAESEncryptedStringHasCorrectLength(dict, fileId1, "user", ""); | ||
ensureAESEncryptedStringHasCorrectLength(dict, fileId1, "user", "aaaa"); | ||
ensureAESEncryptedStringHasCorrectLength(dict, fileId1, "user", "aaaaa"); | ||
ensureAESEncryptedStringHasCorrectLength(dict, fileId1, "user", "aaaaaaaaaaaaaaaa"); | ||
ensureAESEncryptedStringHasCorrectLength(dict, fileId1, "user", "aaaaaaaaaaaaaaaaaaaaaa"); | ||
}); | ||
}); | ||
}); |
@@ -28,2 +28,4 @@ /** | ||
var _display_utils = require("pdfjs/display/display_utils.js"); | ||
var _fetch_stream = require("pdfjs/display/fetch_stream.js"); | ||
@@ -46,12 +48,9 @@ | ||
if (typeof Response !== "undefined" && "body" in Response.prototype && typeof ReadableStream !== "undefined") { | ||
(0, _api.setPDFNetworkStreamFactory)(function (params) { | ||
(0, _api.setPDFNetworkStreamFactory)(params => { | ||
if ((0, _display_utils.isValidFetchUrl)(params.url)) { | ||
return new _fetch_stream.PDFFetchStream(params); | ||
}); | ||
} else { | ||
(0, _api.setPDFNetworkStreamFactory)(function (params) { | ||
return new _network.PDFNetworkStream(params); | ||
}); | ||
} | ||
} | ||
return new _network.PDFNetworkStream(params); | ||
}); | ||
_worker_options.GlobalWorkerOptions.workerSrc = "../../build/generic/build/pdf.worker.js"; | ||
@@ -58,0 +57,0 @@ callback(); |
@@ -24,2 +24,4 @@ /** | ||
var _primitives = require("../../core/primitives.js"); | ||
var _parser = require("../../core/parser.js"); | ||
@@ -29,4 +31,2 @@ | ||
var _primitives = require("../../core/primitives.js"); | ||
var _stream = require("../../core/stream.js"); | ||
@@ -192,2 +192,19 @@ | ||
}); | ||
describe("getObj", function () { | ||
it("should stop immediately when the start of a command is " + "a non-visible ASCII character (issue 13999)", function () { | ||
const input = new _stream.StringStream("\x14q\nQ"); | ||
const lexer = new _parser.Lexer(input); | ||
let obj = lexer.getObj(); | ||
expect(obj instanceof _primitives.Cmd).toEqual(true); | ||
expect(obj.cmd).toEqual("\x14"); | ||
obj = lexer.getObj(); | ||
expect(obj instanceof _primitives.Cmd).toEqual(true); | ||
expect(obj.cmd).toEqual("q"); | ||
obj = lexer.getObj(); | ||
expect(obj instanceof _primitives.Cmd).toEqual(true); | ||
expect(obj.cmd).toEqual("Q"); | ||
obj = lexer.getObj(); | ||
expect(obj).toEqual(_primitives.EOF); | ||
}); | ||
}); | ||
}); | ||
@@ -194,0 +211,0 @@ describe("Linearization", function () { |
@@ -411,11 +411,2 @@ /** | ||
}); | ||
describe("isEOF", function () { | ||
it("handles non-EOF", function () { | ||
const nonEOF = "foo"; | ||
expect((0, _primitives.isEOF)(nonEOF)).toEqual(false); | ||
}); | ||
it("handles EOF", function () { | ||
expect((0, _primitives.isEOF)(_primitives.EOF)).toEqual(true); | ||
}); | ||
}); | ||
describe("isName", function () { | ||
@@ -422,0 +413,0 @@ it("handles non-names", function () { |
@@ -240,2 +240,32 @@ /** | ||
}); | ||
describe("parseQueryString", function () { | ||
it("should parse one key/value pair", function () { | ||
const parameters = (0, _ui_utils.parseQueryString)("key1=value1"); | ||
expect(parameters.size).toEqual(1); | ||
expect(parameters.get("key1")).toEqual("value1"); | ||
}); | ||
it("should parse multiple key/value pairs", function () { | ||
const parameters = (0, _ui_utils.parseQueryString)("key1=value1&key2=value2&key3=value3"); | ||
expect(parameters.size).toEqual(3); | ||
expect(parameters.get("key1")).toEqual("value1"); | ||
expect(parameters.get("key2")).toEqual("value2"); | ||
expect(parameters.get("key3")).toEqual("value3"); | ||
}); | ||
it("should parse keys without values", function () { | ||
const parameters = (0, _ui_utils.parseQueryString)("key1"); | ||
expect(parameters.size).toEqual(1); | ||
expect(parameters.get("key1")).toEqual(""); | ||
}); | ||
it("should decode encoded key/value pairs", function () { | ||
const parameters = (0, _ui_utils.parseQueryString)("k%C3%ABy1=valu%C3%AB1"); | ||
expect(parameters.size).toEqual(1); | ||
expect(parameters.get("këy1")).toEqual("valuë1"); | ||
}); | ||
it("should convert keys to lowercase", function () { | ||
const parameters = (0, _ui_utils.parseQueryString)("Key1=Value1&KEY2=Value2"); | ||
expect(parameters.size).toEqual(2); | ||
expect(parameters.get("key1")).toEqual("Value1"); | ||
expect(parameters.get("key2")).toEqual("Value2"); | ||
}); | ||
}); | ||
describe("waitOnEventOrTimeout", function () { | ||
@@ -242,0 +272,0 @@ let eventBus; |
@@ -105,5 +105,9 @@ /** | ||
dict.set("G", gdict); | ||
dict.set("J", true); | ||
dict.set("K", false); | ||
dict.set("NullArr", [null, 10]); | ||
dict.set("NullVal", null); | ||
const buffer = []; | ||
(0, _writer.writeDict)(dict, buffer, null); | ||
const expected = "<< /A /B /B 123 456 R /C 789 /D (hello world) " + "/E (\\(hello\\\\world\\)) /F [1.23 4.5 6] " + "/G << /H 123 /I << /Length 8>> stream\n" + "a stream\n" + "endstream\n>>>>"; | ||
const expected = "<< /A /B /B 123 456 R /C 789 /D (hello world) " + "/E (\\(hello\\\\world\\)) /F [1.23 4.5 6] " + "/G << /H 123 /I << /Length 8>> stream\n" + "a stream\n" + "endstream\n>> /J true /K false " + "/NullArr [null 10] /NullVal null>>"; | ||
expect(buffer.join("")).toEqual(expected); | ||
@@ -122,2 +126,41 @@ }); | ||
}); | ||
describe("XFA", function () { | ||
it("should update AcroForm when no datasets in XFA array", function () { | ||
const originalData = new Uint8Array(); | ||
const newRefs = []; | ||
const acroForm = new _primitives.Dict(null); | ||
acroForm.set("XFA", ["preamble", _primitives.Ref.get(123, 0), "postamble", _primitives.Ref.get(456, 0)]); | ||
const acroFormRef = _primitives.Ref.get(789, 0); | ||
const xfaDatasetsRef = _primitives.Ref.get(101112, 0); | ||
const xfaData = "<hello>world</hello>"; | ||
const xrefInfo = { | ||
newRef: _primitives.Ref.get(131415, 0), | ||
startXRef: 314, | ||
fileIds: null, | ||
rootRef: null, | ||
infoRef: null, | ||
encryptRef: null, | ||
filename: "foo.pdf", | ||
info: {} | ||
}; | ||
let data = (0, _writer.incrementalUpdate)({ | ||
originalData, | ||
xrefInfo, | ||
newRefs, | ||
hasXfa: true, | ||
xfaDatasetsRef, | ||
hasXfaDatasetsEntry: false, | ||
acroFormRef, | ||
acroForm, | ||
xfaData, | ||
xref: {} | ||
}); | ||
data = (0, _util.bytesToString)(data); | ||
const expected = "\n" + "789 0 obj\n" + "<< /XFA [(preamble) 123 0 R (datasets) 101112 0 R (postamble) 456 0 R]>>\n" + "101112 0 obj\n" + "<< /Type /EmbeddedFile /Length 20>>\n" + "stream\n" + "<hello>world</hello>\n" + "endstream\n" + "endobj\n" + "131415 0 obj\n" + "<< /Size 131416 /Prev 314 /Type /XRef /Index [0 1 789 1 101112 1 131415 1] /W [1 1 2] /Length 16>> stream\n" + "\u0000\u0001ÿÿ\u0001\u0001\u0000\u0000\u0001T\u0000\u0000\u0001²\u0000\u0000\n" + "endstream\n" + "endobj\n" + "startxref\n" + "178\n" + "%%EOF\n"; | ||
expect(data).toEqual(expected); | ||
}); | ||
}); | ||
}); |
@@ -803,2 +803,49 @@ /** | ||
}); | ||
it("should make a basic binding and create a non-existing node with namespaceId equal to -1", function () { | ||
const xml = ` | ||
<?xml version="1.0"?> | ||
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/"> | ||
<template xmlns="http://www.xfa.org/schema/xfa-template/3.3"> | ||
<subform name="A"> | ||
<subform name="B"> | ||
<field name="C"> | ||
</field> | ||
<field name="D"> | ||
<value> | ||
<text>foobar</text> | ||
</value> | ||
</field> | ||
</subform> | ||
</subform> | ||
</template> | ||
</xdp:xdp> | ||
`; | ||
const root = new _parser.XFAParser().parse(xml); | ||
const binder = new _bind.Binder(root); | ||
const form = binder.bind(); | ||
const data = binder.getData(); | ||
expect((0, _som.searchNode)(form, form, "A.B.D.value.text")[0][_xfa_object.$dump]().$content).toBe("foobar"); | ||
const expected = { | ||
$name: "A", | ||
$ns: -1, | ||
attributes: {}, | ||
children: [{ | ||
$name: "B", | ||
$ns: -1, | ||
attributes: {}, | ||
children: [{ | ||
$name: "C", | ||
$ns: -1, | ||
attributes: {}, | ||
children: [] | ||
}, { | ||
$name: "D", | ||
$ns: -1, | ||
attributes: {}, | ||
children: [] | ||
}] | ||
}] | ||
}; | ||
expect((0, _som.searchNode)(data, data, "A")[0][_xfa_object.$dump](true)).toEqual(expected); | ||
}); | ||
it("should make another basic binding", function () { | ||
@@ -1072,2 +1119,37 @@ const xml = ` | ||
}); | ||
it("should make binding and bind items with a ref", function () { | ||
const xml = ` | ||
<?xml version="1.0"?> | ||
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/"> | ||
<template xmlns="http://www.xfa.org/schema/xfa-template/3.3"> | ||
<subform name="main"> | ||
<field name="CardName"> | ||
<bind match="dataRef" ref="$data.main.value"/> | ||
<bindItems ref="$data.main.ccs.cc[*]" labelRef="uiname" valueRef="token"/> | ||
<ui> | ||
<choiceList/> | ||
</ui> | ||
</field> | ||
</subform> | ||
</template> | ||
<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"> | ||
<xfa:data> | ||
<main> | ||
<value>VISA</value> | ||
<ccs> | ||
<cc uiname="Visa" token="VISA"/> | ||
<cc uiname="Mastercard" token="MC"/> | ||
<cc uiname="American Express" token="AMEX"/> | ||
</ccs> | ||
<CardName>MC</CardName> | ||
</main> | ||
</xfa:data> | ||
</xfa:datasets> | ||
</xdp:xdp> | ||
`; | ||
const root = new _parser.XFAParser().parse(xml); | ||
const form = new _bind.Binder(root).bind(); | ||
expect((0, _som.searchNode)(form, form, "subform.CardName.value.text").map(x => x[_xfa_object.$text]())).toEqual(["VISA"]); | ||
expect((0, _som.searchNode)(form, form, "subform.CardName.items[*].text[*]").map(x => x[_xfa_object.$text]())).toEqual(["Visa", "Mastercard", "American Express", "VISA", "MC", "AMEX"]); | ||
}); | ||
it("should make binding with occurrences in consumeData mode", function () { | ||
@@ -1238,2 +1320,24 @@ const xml = ` | ||
}); | ||
it("should make a binding with a element in an area", function () { | ||
const xml = ` | ||
<?xml version="1.0"?> | ||
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/"> | ||
<template xmlns="http://www.xfa.org/schema/xfa-template/3.3"> | ||
<subform name="A" mergeMode="matchTemplate"> | ||
<area> | ||
<field name="B"/> | ||
</area> | ||
</subform> | ||
</template> | ||
<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"> | ||
<xfa:data> | ||
<A><B>foobar</B></A> | ||
</xfa:data> | ||
</xfa:datasets> | ||
</xdp:xdp> | ||
`; | ||
const root = new _parser.XFAParser().parse(xml); | ||
const form = new _bind.Binder(root).bind(); | ||
expect((0, _som.searchNode)(form, form, "A..B..text")[0][_xfa_object.$dump]().$content).toBe("foobar"); | ||
}); | ||
}); |
@@ -24,8 +24,12 @@ /** | ||
var _is_node = require("../../shared/is_node.js"); | ||
var _factory = require("../../core/xfa/factory.js"); | ||
describe("XFAFactory", function () { | ||
function searchHtmlNode(root, name, value) { | ||
if (root[name] === value) { | ||
return root; | ||
function searchHtmlNode(root, name, value, byAttributes = false, nth = [0]) { | ||
if (!byAttributes && root[name] === value || byAttributes && root.attributes && root.attributes[name] === value) { | ||
if (nth[0]-- === 0) { | ||
return root; | ||
} | ||
} | ||
@@ -38,3 +42,3 @@ | ||
for (const child of root.children) { | ||
const node = searchHtmlNode(child, name, value); | ||
const node = searchHtmlNode(child, name, value, byAttributes, nth); | ||
@@ -142,2 +146,132 @@ if (node) { | ||
}); | ||
it("should have an alt attribute from toolTip", function () { | ||
if (_is_node.isNodeJS) { | ||
pending("Image is not supported in Node.js."); | ||
} | ||
const xml = ` | ||
<?xml version="1.0"?> | ||
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/"> | ||
<template xmlns="http://www.xfa.org/schema/xfa-template/3.3"> | ||
<subform name="root" mergeMode="matchTemplate"> | ||
<pageSet> | ||
<pageArea> | ||
<contentArea x="0pt" w="456pt" h="789pt"/> | ||
<draw name="BA-Logo" y="5.928mm" x="128.388mm" w="71.237mm" h="9.528mm"> | ||
<value> | ||
<image contentType="image/png">iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=</image> | ||
</value> | ||
<assist><toolTip>alt text</toolTip></assist> | ||
</draw> | ||
</pageArea> | ||
</pageSet> | ||
</subform> | ||
</template> | ||
<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"> | ||
<xfa:data> | ||
</xfa:data> | ||
</xfa:datasets> | ||
</xdp:xdp> | ||
`; | ||
const factory = new _factory.XFAFactory({ | ||
"xdp:xdp": xml | ||
}); | ||
expect(factory.numberPages).toEqual(1); | ||
const pages = factory.getPages(); | ||
const field = searchHtmlNode(pages, "name", "img"); | ||
expect(field.attributes.alt).toEqual("alt text"); | ||
}); | ||
it("should have a aria heading role and level", function () { | ||
const xml = ` | ||
<?xml version="1.0"?> | ||
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/"> | ||
<template xmlns="http://www.xfa.org/schema/xfa-template/3.3"> | ||
<subform name="root" mergeMode="matchTemplate"> | ||
<pageSet> | ||
<pageArea> | ||
<contentArea x="0pt" w="456pt" h="789pt"/> | ||
<medium stock="default" short="456pt" long="789pt"/> | ||
<draw name="BA-Logo" y="5.928mm" x="128.388mm" w="71.237mm" h="9.528mm"> | ||
<value><text>foo</text></value> | ||
<assist role="H2"></assist> | ||
</draw> | ||
</pageArea> | ||
</pageSet> | ||
</subform> | ||
</template> | ||
<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"> | ||
<xfa:data> | ||
</xfa:data> | ||
</xfa:datasets> | ||
</xdp:xdp> | ||
`; | ||
const factory = new _factory.XFAFactory({ | ||
"xdp:xdp": xml | ||
}); | ||
expect(factory.numberPages).toEqual(1); | ||
const pages = factory.getPages(); | ||
const page1 = pages.children[0]; | ||
const wrapper = page1.children[0]; | ||
const draw = wrapper.children[0]; | ||
expect(draw.attributes.role).toEqual("heading"); | ||
expect(draw.attributes["aria-level"]).toEqual("2"); | ||
}); | ||
it("should have aria table role", function () { | ||
const xml = ` | ||
<?xml version="1.0"?> | ||
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/"> | ||
<template xmlns="http://www.xfa.org/schema/xfa-template/3.3"> | ||
<subform name="root" mergeMode="matchTemplate"> | ||
<pageSet> | ||
<pageArea> | ||
<contentArea x="0pt" w="456pt" h="789pt"/> | ||
<medium stock="default" short="456pt" long="789pt"/> | ||
<font size="7pt" typeface="FooBar" baselineShift="2pt"> | ||
</font> | ||
</pageArea> | ||
</pageSet> | ||
<subform name="table" mergeMode="matchTemplate" layout="table"> | ||
<subform layout="row" name="row1"> | ||
<assist role="TH"></assist> | ||
<draw name="header1" y="5.928mm" x="128.388mm" w="71.237mm" h="9.528mm"> | ||
<value><text>Header Col 1</text></value> | ||
</draw> | ||
<draw name="header2" y="5.928mm" x="128.388mm" w="71.237mm" h="9.528mm"> | ||
<value><text>Header Col 2</text></value> | ||
</draw> | ||
</subform> | ||
<subform layout="row" name="row2"> | ||
<draw name="cell1" y="5.928mm" x="128.388mm" w="71.237mm" h="9.528mm"> | ||
<value><text>Cell 1</text></value> | ||
</draw> | ||
<draw name="cell2" y="5.928mm" x="128.388mm" w="71.237mm" h="9.528mm"> | ||
<value><text>Cell 2</text></value> | ||
</draw> | ||
</subform> | ||
</subform> | ||
</subform> | ||
</template> | ||
<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"> | ||
<xfa:data> | ||
</xfa:data> | ||
</xfa:datasets> | ||
</xdp:xdp> | ||
`; | ||
const factory = new _factory.XFAFactory({ | ||
"xdp:xdp": xml | ||
}); | ||
factory.setFonts([]); | ||
expect(factory.numberPages).toEqual(1); | ||
const pages = factory.getPages(); | ||
const table = searchHtmlNode(pages, "xfaName", "table", true); | ||
expect(table.attributes.role).toEqual("table"); | ||
const headerRow = searchHtmlNode(pages, "xfaName", "row1", true); | ||
expect(headerRow.attributes.role).toEqual("row"); | ||
const headerCell = searchHtmlNode(pages, "xfaName", "header2", true); | ||
expect(headerCell.attributes.role).toEqual("columnheader"); | ||
const row = searchHtmlNode(pages, "xfaName", "row2", true); | ||
expect(row.attributes.role).toEqual("row"); | ||
const cell = searchHtmlNode(pages, "xfaName", "cell2", true); | ||
expect(cell.attributes.role).toEqual("cell"); | ||
}); | ||
it("should have a maxLength property", function () { | ||
@@ -182,2 +316,82 @@ const xml = ` | ||
}); | ||
it("should have an aria-label property from speak", function () { | ||
const xml = ` | ||
<?xml version="1.0"?> | ||
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/"> | ||
<template xmlns="http://www.xfa.org/schema/xfa-template/3.3"> | ||
<subform name="root" mergeMode="matchTemplate"> | ||
<pageSet> | ||
<pageArea> | ||
<contentArea x="0pt" w="456pt" h="789pt"/> | ||
<medium stock="default" short="456pt" long="789pt"/> | ||
<field y="1pt" w="11pt" h="22pt" x="2pt"> | ||
<assist><speak>Screen Reader</speak></assist> | ||
<ui> | ||
<textEdit multiLine="0"/> | ||
</ui> | ||
<value> | ||
<text maxChars="123"/> | ||
</value> | ||
</field> | ||
</pageArea> | ||
</pageSet> | ||
<subform name="first"> | ||
<draw w="1pt" h="1pt"><value><text>foo</text></value></draw> | ||
</subform> | ||
</subform> | ||
</template> | ||
<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"> | ||
<xfa:data> | ||
</xfa:data> | ||
</xfa:datasets> | ||
</xdp:xdp> | ||
`; | ||
const factory = new _factory.XFAFactory({ | ||
"xdp:xdp": xml | ||
}); | ||
expect(factory.numberPages).toEqual(1); | ||
const pages = factory.getPages(); | ||
const field = searchHtmlNode(pages, "name", "input"); | ||
expect(field.attributes["aria-label"]).toEqual("Screen Reader"); | ||
}); | ||
it("should have an aria-label property from toolTip", function () { | ||
const xml = ` | ||
<?xml version="1.0"?> | ||
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/"> | ||
<template xmlns="http://www.xfa.org/schema/xfa-template/3.3"> | ||
<subform name="root" mergeMode="matchTemplate"> | ||
<pageSet> | ||
<pageArea> | ||
<contentArea x="0pt" w="456pt" h="789pt"/> | ||
<medium stock="default" short="456pt" long="789pt"/> | ||
<field y="1pt" w="11pt" h="22pt" x="2pt"> | ||
<assist><toolTip>Screen Reader</toolTip></assist> | ||
<ui> | ||
<textEdit multiLine="0"/> | ||
</ui> | ||
<value> | ||
<text maxChars="123"/> | ||
</value> | ||
</field> | ||
</pageArea> | ||
</pageSet> | ||
<subform name="first"> | ||
<draw w="1pt" h="1pt"><value><text>foo</text></value></draw> | ||
</subform> | ||
</subform> | ||
</template> | ||
<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"> | ||
<xfa:data> | ||
</xfa:data> | ||
</xfa:datasets> | ||
</xdp:xdp> | ||
`; | ||
const factory = new _factory.XFAFactory({ | ||
"xdp:xdp": xml | ||
}); | ||
expect(factory.numberPages).toEqual(1); | ||
const pages = factory.getPages(); | ||
const field = searchHtmlNode(pages, "name", "input"); | ||
expect(field.attributes["aria-label"]).toEqual("Screen Reader"); | ||
}); | ||
it("should have an input or textarea", function () { | ||
@@ -277,2 +491,122 @@ const xml = ` | ||
}); | ||
it("should parse URLs correctly", function () { | ||
function getXml(href) { | ||
return ` | ||
<?xml version="1.0"?> | ||
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/"> | ||
<template xmlns="http://www.xfa.org/schema/xfa-template/3.3"> | ||
<subform name="root" mergeMode="matchTemplate"> | ||
<pageSet> | ||
<pageArea> | ||
<contentArea x="0pt" w="456pt" h="789pt"/> | ||
<medium stock="default" short="456pt" long="789pt"/> | ||
<draw name="url" y="5.928mm" x="128.388mm" w="71.237mm" h="9.528mm"> | ||
<value> | ||
<exData contentType="text/html"> | ||
<body xmlns="http://www.w3.org/1999/xhtml"> | ||
<a href="${href}">${href}</a> | ||
</body> | ||
</exData> | ||
</value> | ||
</draw> | ||
</pageArea> | ||
</pageSet> | ||
</subform> | ||
</template> | ||
<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"> | ||
<xfa:data> | ||
</xfa:data> | ||
</xfa:datasets> | ||
</xdp:xdp> | ||
`; | ||
} | ||
let factory, pages, a; | ||
factory = new _factory.XFAFactory({ | ||
"xdp:xdp": getXml("https://www.example.com/") | ||
}); | ||
expect(factory.numberPages).toEqual(1); | ||
pages = factory.getPages(); | ||
a = searchHtmlNode(pages, "name", "a"); | ||
expect(a.value).toEqual("https://www.example.com/"); | ||
expect(a.attributes.href).toEqual("https://www.example.com/"); | ||
factory = new _factory.XFAFactory({ | ||
"xdp:xdp": getXml("www.example.com/") | ||
}); | ||
expect(factory.numberPages).toEqual(1); | ||
pages = factory.getPages(); | ||
a = searchHtmlNode(pages, "name", "a"); | ||
expect(a.value).toEqual("www.example.com/"); | ||
expect(a.attributes.href).toEqual("http://www.example.com/"); | ||
factory = new _factory.XFAFactory({ | ||
"xdp:xdp": getXml("mailto:test@example.com") | ||
}); | ||
expect(factory.numberPages).toEqual(1); | ||
pages = factory.getPages(); | ||
a = searchHtmlNode(pages, "name", "a"); | ||
expect(a.value).toEqual("mailto:test@example.com"); | ||
expect(a.attributes.href).toEqual("mailto:test@example.com"); | ||
factory = new _factory.XFAFactory({ | ||
"xdp:xdp": getXml("qwerty/") | ||
}); | ||
expect(factory.numberPages).toEqual(1); | ||
pages = factory.getPages(); | ||
a = searchHtmlNode(pages, "name", "a"); | ||
expect(a.value).toEqual("qwerty/"); | ||
expect(a.attributes.href).toEqual(""); | ||
}); | ||
it("should replace button with an URL by a link", function () { | ||
const xml = ` | ||
<?xml version="1.0"?> | ||
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/"> | ||
<template xmlns="http://www.xfa.org/schema/xfa-template/3.3"> | ||
<subform name="root" mergeMode="matchTemplate"> | ||
<pageSet> | ||
<pageArea> | ||
<contentArea x="123pt" w="456pt" h="789pt"/> | ||
<medium stock="default" short="456pt" long="789pt"/> | ||
</pageArea> | ||
</pageSet> | ||
<subform name="first"> | ||
<field y="1pt" w="11pt" h="22pt" x="2pt"> | ||
<ui> | ||
<button/> | ||
</ui> | ||
<event activity="click" name="event__click"> | ||
<script contentType="application/x-javascript"> | ||
app.launchURL("https://github.com/mozilla/pdf.js", true); | ||
</script> | ||
</event> | ||
</field> | ||
<field y="1pt" w="11pt" h="22pt" x="2pt"> | ||
<ui> | ||
<button/> | ||
</ui> | ||
<event activity="click" name="event__click"> | ||
<script contentType="application/x-javascript"> | ||
xfa.host.gotoURL("https://github.com/allizom/pdf.js"); | ||
</script> | ||
</event> | ||
</field> | ||
</subform> | ||
</subform> | ||
</template> | ||
<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"> | ||
<xfa:data> | ||
</xfa:data> | ||
</xfa:datasets> | ||
</xdp:xdp> | ||
`; | ||
const factory = new _factory.XFAFactory({ | ||
"xdp:xdp": xml | ||
}); | ||
expect(factory.numberPages).toEqual(1); | ||
const pages = factory.getPages(); | ||
let a = searchHtmlNode(pages, "name", "a"); | ||
expect(a.attributes.href).toEqual("https://github.com/mozilla/pdf.js"); | ||
expect(a.attributes.newWindow).toEqual(true); | ||
a = searchHtmlNode(pages, "name", "a", false, [1]); | ||
expect(a.attributes.href).toEqual("https://github.com/allizom/pdf.js"); | ||
expect(a.attributes.newWindow).toEqual(false); | ||
}); | ||
}); |
@@ -43,6 +43,7 @@ /** | ||
imageResourcesPath = "", | ||
renderInteractiveForms = true, | ||
renderForms = true, | ||
l10n = _l10n_utils.NullL10n, | ||
enableScripting = false, | ||
hasJSActionsPromise = null, | ||
fieldObjectsPromise = null, | ||
mouseState = null | ||
@@ -55,3 +56,3 @@ }) { | ||
this.imageResourcesPath = imageResourcesPath; | ||
this.renderInteractiveForms = renderInteractiveForms; | ||
this.renderForms = renderForms; | ||
this.l10n = l10n; | ||
@@ -61,2 +62,3 @@ this.annotationStorage = annotationStorage; | ||
this._hasJSActionsPromise = hasJSActionsPromise; | ||
this._fieldObjectsPromise = fieldObjectsPromise; | ||
this._mouseState = mouseState; | ||
@@ -67,44 +69,41 @@ this.div = null; | ||
render(viewport, intent = "display") { | ||
return Promise.all([this.pdfPage.getAnnotations({ | ||
async render(viewport, intent = "display") { | ||
const [annotations, hasJSActions = false, fieldObjects = null] = await Promise.all([this.pdfPage.getAnnotations({ | ||
intent | ||
}), this._hasJSActionsPromise]).then(([annotations, hasJSActions = false]) => { | ||
if (this._cancelled) { | ||
return; | ||
} | ||
}), this._hasJSActionsPromise, this._fieldObjectsPromise]); | ||
if (annotations.length === 0) { | ||
return; | ||
} | ||
if (this._cancelled || annotations.length === 0) { | ||
return; | ||
} | ||
const parameters = { | ||
viewport: viewport.clone({ | ||
dontFlip: true | ||
}), | ||
div: this.div, | ||
annotations, | ||
page: this.pdfPage, | ||
imageResourcesPath: this.imageResourcesPath, | ||
renderInteractiveForms: this.renderInteractiveForms, | ||
linkService: this.linkService, | ||
downloadManager: this.downloadManager, | ||
annotationStorage: this.annotationStorage, | ||
enableScripting: this.enableScripting, | ||
hasJSActions, | ||
mouseState: this._mouseState | ||
}; | ||
const parameters = { | ||
viewport: viewport.clone({ | ||
dontFlip: true | ||
}), | ||
div: this.div, | ||
annotations, | ||
page: this.pdfPage, | ||
imageResourcesPath: this.imageResourcesPath, | ||
renderForms: this.renderForms, | ||
linkService: this.linkService, | ||
downloadManager: this.downloadManager, | ||
annotationStorage: this.annotationStorage, | ||
enableScripting: this.enableScripting, | ||
hasJSActions, | ||
fieldObjects, | ||
mouseState: this._mouseState | ||
}; | ||
if (this.div) { | ||
_pdf.AnnotationLayer.update(parameters); | ||
} else { | ||
this.div = document.createElement("div"); | ||
this.div.className = "annotationLayer"; | ||
this.pageDiv.appendChild(this.div); | ||
parameters.div = this.div; | ||
if (this.div) { | ||
_pdf.AnnotationLayer.update(parameters); | ||
} else { | ||
this.div = document.createElement("div"); | ||
this.div.className = "annotationLayer"; | ||
this.pageDiv.appendChild(this.div); | ||
parameters.div = this.div; | ||
_pdf.AnnotationLayer.render(parameters); | ||
_pdf.AnnotationLayer.render(parameters); | ||
this.l10n.translate(this.div); | ||
} | ||
}); | ||
this.l10n.translate(this.div); | ||
} | ||
} | ||
@@ -129,3 +128,3 @@ | ||
class DefaultAnnotationLayerFactory { | ||
createAnnotationLayerBuilder(pageDiv, pdfPage, annotationStorage = null, imageResourcesPath = "", renderInteractiveForms = true, l10n = _l10n_utils.NullL10n, enableScripting = false, hasJSActionsPromise = null, mouseState = null) { | ||
createAnnotationLayerBuilder(pageDiv, pdfPage, annotationStorage = null, imageResourcesPath = "", renderForms = true, l10n = _l10n_utils.NullL10n, enableScripting = false, hasJSActionsPromise = null, mouseState = null, fieldObjectsPromise = null) { | ||
return new AnnotationLayerBuilder({ | ||
@@ -135,3 +134,3 @@ pageDiv, | ||
imageResourcesPath, | ||
renderInteractiveForms, | ||
renderForms, | ||
linkService: new _pdf_link_service.SimpleLinkService(), | ||
@@ -142,2 +141,3 @@ l10n, | ||
hasJSActionsPromise, | ||
fieldObjectsPromise, | ||
mouseState | ||
@@ -144,0 +144,0 @@ }); |
@@ -27,6 +27,25 @@ /** | ||
}); | ||
exports.OptionKind = exports.AppOptions = void 0; | ||
exports.OptionKind = exports.compatibilityParams = exports.AppOptions = void 0; | ||
const compatibilityParams = Object.create(null); | ||
exports.compatibilityParams = compatibilityParams; | ||
{ | ||
const userAgent = typeof navigator !== "undefined" && navigator.userAgent || ""; | ||
const platform = typeof navigator !== "undefined" && navigator.platform || ""; | ||
const maxTouchPoints = typeof navigator !== "undefined" && navigator.maxTouchPoints || 1; | ||
const isAndroid = /Android/.test(userAgent); | ||
const isIOS = /\b(iPad|iPhone|iPod)(?=;)/.test(userAgent) || platform === "MacIntel" && maxTouchPoints > 1; | ||
const isIOSChrome = /CriOS/.test(userAgent); | ||
var _viewer_compatibility = require("./viewer_compatibility.js"); | ||
(function checkOnBlobSupport() { | ||
if (isIOSChrome) { | ||
compatibilityParams.disableCreateObjectURL = true; | ||
} | ||
})(); | ||
(function checkCanvasSizeLimitation() { | ||
if (isIOS || isAndroid) { | ||
compatibilityParams.maxCanvasPixels = 5242880; | ||
} | ||
})(); | ||
} | ||
const OptionKind = { | ||
@@ -40,2 +59,6 @@ VIEWER: 0x02, | ||
const defaultOptions = { | ||
annotationMode: { | ||
value: 2, | ||
kind: OptionKind.VIEWER + OptionKind.PREFERENCE | ||
}, | ||
cursorToolOnLoad: { | ||
@@ -95,3 +118,3 @@ value: 0, | ||
value: 16777216, | ||
compatibility: _viewer_compatibility.viewerCompatibilityParams.maxCanvasPixels, | ||
compatibility: compatibilityParams.maxCanvasPixels, | ||
kind: OptionKind.VIEWER | ||
@@ -111,6 +134,2 @@ }, | ||
}, | ||
renderInteractiveForms: { | ||
value: true, | ||
kind: OptionKind.VIEWER + OptionKind.PREFERENCE | ||
}, | ||
sidebarViewOnLoad: { | ||
@@ -173,3 +192,3 @@ value: -1, | ||
enableXfa: { | ||
value: false, | ||
value: true, | ||
kind: OptionKind.API + OptionKind.PREFERENCE | ||
@@ -293,4 +312,8 @@ }, | ||
static _hasUserOptions() { | ||
return Object.keys(userOptions).length > 0; | ||
} | ||
} | ||
exports.AppOptions = AppOptions; |
@@ -45,2 +45,4 @@ /** | ||
var _text_highlighter = require("./text_highlighter.js"); | ||
var _text_layer_builder = require("./text_layer_builder.js"); | ||
@@ -112,3 +114,3 @@ | ||
const viewerVersion = '2.10.377'; | ||
const viewerVersion = '2.11.338'; | ||
@@ -119,3 +121,2 @@ if (_pdf.version !== viewerVersion) { | ||
this._name = this.constructor.name; | ||
this.container = options.container; | ||
@@ -138,5 +139,5 @@ this.viewer = options.viewer || options.container.firstElementChild; | ||
this.removePageBorders = options.removePageBorders || false; | ||
this.textLayerMode = Number.isInteger(options.textLayerMode) ? options.textLayerMode : _ui_utils.TextLayerMode.ENABLE; | ||
this.textLayerMode = options.textLayerMode ?? _ui_utils.TextLayerMode.ENABLE; | ||
this._annotationMode = options.annotationMode ?? _pdf.AnnotationMode.ENABLE_FORMS; | ||
this.imageResourcesPath = options.imageResourcesPath || ""; | ||
this.renderInteractiveForms = options.renderInteractiveForms !== false; | ||
this.enablePrintAutoRotate = options.enablePrintAutoRotate || false; | ||
@@ -147,3 +148,2 @@ this.renderer = options.renderer || _ui_utils.RendererType.CANVAS; | ||
this.l10n = options.l10n || _l10n_utils.NullL10n; | ||
this.enableScripting = options.enableScripting === true && !!this._scriptingManager; | ||
this.defaultRenderingQueue = !options.renderingQueue; | ||
@@ -158,2 +158,3 @@ | ||
this._doc = document.documentElement; | ||
this.scroll = (0, _ui_utils.watchScroll)(this.container, this._scrollUpdate.bind(this)); | ||
@@ -194,2 +195,10 @@ this.presentationModeState = _ui_utils.PresentationModeState.UNKNOWN; | ||
get renderForms() { | ||
return this._annotationMode === _pdf.AnnotationMode.ENABLE_FORMS; | ||
} | ||
get enableScripting() { | ||
return !!this._scriptingManager; | ||
} | ||
get currentPageNumber() { | ||
@@ -209,3 +218,3 @@ return this._currentPageNumber; | ||
if (!this._setCurrentPageNumber(val, true)) { | ||
console.error(`${this._name}.currentPageNumber: "${val}" is not a valid page.`); | ||
console.error(`currentPageNumber: "${val}" is not a valid page.`); | ||
} | ||
@@ -263,3 +272,3 @@ } | ||
if (!this._setCurrentPageNumber(page, true)) { | ||
console.error(`${this._name}.currentPageLabel: "${val}" is not a valid page.`); | ||
console.error(`currentPageLabel: "${val}" is not a valid page.`); | ||
} | ||
@@ -321,6 +330,8 @@ } | ||
const pageNumber = this._currentPageNumber; | ||
const updateArgs = { | ||
rotation | ||
}; | ||
for (let i = 0, ii = this._pages.length; i < ii; i++) { | ||
const pageView = this._pages[i]; | ||
pageView.update(pageView.scale, rotation); | ||
for (const pageView of this._pages) { | ||
pageView.update(updateArgs); | ||
} | ||
@@ -436,5 +447,6 @@ | ||
const viewport = firstPdfPage.getViewport({ | ||
scale: scale * _ui_utils.CSS_UNITS | ||
scale: scale * _pdf.PixelsPerInch.PDF_TO_CSS_UNITS | ||
}); | ||
const textLayerFactory = this.textLayerMode !== _ui_utils.TextLayerMode.DISABLE ? this : null; | ||
const textLayerFactory = this.textLayerMode !== _ui_utils.TextLayerMode.DISABLE && !isPureXfa ? this : null; | ||
const annotationLayerFactory = this._annotationMode !== _pdf.AnnotationMode.DISABLE ? this : null; | ||
const xfaLayerFactory = isPureXfa ? this : null; | ||
@@ -453,7 +465,8 @@ | ||
textLayerMode: this.textLayerMode, | ||
annotationLayerFactory: this, | ||
annotationLayerFactory, | ||
annotationMode: this._annotationMode, | ||
xfaLayerFactory, | ||
textHighlighterFactory: this, | ||
structTreeLayerFactory: this, | ||
imageResourcesPath: this.imageResourcesPath, | ||
renderInteractiveForms: this.renderInteractiveForms, | ||
renderer: this.renderer, | ||
@@ -484,3 +497,3 @@ useOnlyCssZoom: this.useOnlyCssZoom, | ||
if (this.enableScripting) { | ||
if (this._scriptingManager) { | ||
this._scriptingManager.setDocument(pdfDocument); | ||
@@ -547,3 +560,3 @@ } | ||
this._pageLabels = null; | ||
console.error(`${this._name}.setPageLabels: Invalid page labels.`); | ||
console.error(`setPageLabels: Invalid page labels.`); | ||
} else { | ||
@@ -623,4 +636,10 @@ this._pageLabels = labels; | ||
for (let i = 0, ii = this._pages.length; i < ii; i++) { | ||
this._pages[i].update(newScale); | ||
this._doc.style.setProperty("--zoom-factor", newScale); | ||
const updateArgs = { | ||
scale: newScale | ||
}; | ||
for (const pageView of this._pages) { | ||
pageView.update(updateArgs); | ||
} | ||
@@ -713,3 +732,3 @@ | ||
default: | ||
console.error(`${this._name}._setScale: "${value}" is an unknown zoom value.`); | ||
console.error(`_setScale: "${value}" is an unknown zoom value.`); | ||
return; | ||
@@ -761,3 +780,3 @@ } | ||
if (!pageView) { | ||
console.error(`${this._name}.scrollPageIntoView: ` + `"${pageNumber}" is not a valid pageNumber parameter.`); | ||
console.error(`scrollPageIntoView: "${pageNumber}" is not a valid pageNumber parameter.`); | ||
return; | ||
@@ -779,4 +798,4 @@ } | ||
const changeOrientation = pageView.rotation % 180 !== 0; | ||
const pageWidth = (changeOrientation ? pageView.height : pageView.width) / pageView.scale / _ui_utils.CSS_UNITS; | ||
const pageHeight = (changeOrientation ? pageView.width : pageView.height) / pageView.scale / _ui_utils.CSS_UNITS; | ||
const pageWidth = (changeOrientation ? pageView.height : pageView.width) / pageView.scale / _pdf.PixelsPerInch.PDF_TO_CSS_UNITS; | ||
const pageHeight = (changeOrientation ? pageView.width : pageView.height) / pageView.scale / _pdf.PixelsPerInch.PDF_TO_CSS_UNITS; | ||
let scale = 0; | ||
@@ -827,4 +846,4 @@ | ||
const vPadding = this.removePageBorders ? 0 : _ui_utils.VERTICAL_PADDING; | ||
widthScale = (this.container.clientWidth - hPadding) / width / _ui_utils.CSS_UNITS; | ||
heightScale = (this.container.clientHeight - vPadding) / height / _ui_utils.CSS_UNITS; | ||
widthScale = (this.container.clientWidth - hPadding) / width / _pdf.PixelsPerInch.PDF_TO_CSS_UNITS; | ||
heightScale = (this.container.clientHeight - vPadding) / height / _pdf.PixelsPerInch.PDF_TO_CSS_UNITS; | ||
scale = Math.min(Math.abs(widthScale), Math.abs(heightScale)); | ||
@@ -834,3 +853,3 @@ break; | ||
default: | ||
console.error(`${this._name}.scrollPageIntoView: ` + `"${destArray[1].name}" is not a valid destination type.`); | ||
console.error(`scrollPageIntoView: "${destArray[1].name}" is not a valid destination type.`); | ||
return; | ||
@@ -998,3 +1017,3 @@ } | ||
if (!(Number.isInteger(pageNumber) && pageNumber > 0 && pageNumber <= this.pagesCount)) { | ||
console.error(`${this._name}.isPageVisible: "${pageNumber}" is not a valid page.`); | ||
console.error(`isPageVisible: "${pageNumber}" is not a valid page.`); | ||
return false; | ||
@@ -1014,3 +1033,3 @@ } | ||
if (!(Number.isInteger(pageNumber) && pageNumber > 0 && pageNumber <= this.pagesCount)) { | ||
console.error(`${this._name}.isPageCached: "${pageNumber}" is not a valid page.`); | ||
console.error(`isPageCached: "${pageNumber}" is not a valid page.`); | ||
return false; | ||
@@ -1076,3 +1095,4 @@ } | ||
const scrollAhead = this._isScrollModeHorizontal ? this.scroll.right : this.scroll.down; | ||
const pageView = this.renderingQueue.getHighestPriority(visiblePages, this._pages, scrollAhead); | ||
const preRenderExtra = this._scrollMode === _ui_utils.ScrollMode.VERTICAL && this._spreadMode !== _ui_utils.SpreadMode.NONE && !this.isInPresentationMode; | ||
const pageView = this.renderingQueue.getHighestPriority(visiblePages, this._pages, scrollAhead, preRenderExtra); | ||
@@ -1090,3 +1110,3 @@ if (pageView) { | ||
createTextLayerBuilder(textLayerDiv, pageIndex, viewport, enhanceTextSelection = false, eventBus) { | ||
createTextLayerBuilder(textLayerDiv, pageIndex, viewport, enhanceTextSelection = false, eventBus, highlighter) { | ||
return new _text_layer_builder.TextLayerBuilder({ | ||
@@ -1097,8 +1117,16 @@ textLayerDiv, | ||
viewport, | ||
findController: this.isInPresentationMode ? null : this.findController, | ||
enhanceTextSelection: this.isInPresentationMode ? false : enhanceTextSelection | ||
enhanceTextSelection: this.isInPresentationMode ? false : enhanceTextSelection, | ||
highlighter | ||
}); | ||
} | ||
createAnnotationLayerBuilder(pageDiv, pdfPage, annotationStorage = null, imageResourcesPath = "", renderInteractiveForms = false, l10n = _l10n_utils.NullL10n, enableScripting = null, hasJSActionsPromise = null, mouseState = null) { | ||
createTextHighlighter(pageIndex, eventBus) { | ||
return new _text_highlighter.TextHighlighter({ | ||
eventBus, | ||
pageIndex, | ||
findController: this.isInPresentationMode ? null : this.findController | ||
}); | ||
} | ||
createAnnotationLayerBuilder(pageDiv, pdfPage, annotationStorage = null, imageResourcesPath = "", renderForms = true, l10n = _l10n_utils.NullL10n, enableScripting = null, hasJSActionsPromise = null, mouseState = null, fieldObjectsPromise = null) { | ||
return new _annotation_layer_builder.AnnotationLayerBuilder({ | ||
@@ -1109,3 +1137,3 @@ pageDiv, | ||
imageResourcesPath, | ||
renderInteractiveForms, | ||
renderForms, | ||
linkService: this.linkService, | ||
@@ -1116,2 +1144,3 @@ downloadManager: this.downloadManager, | ||
hasJSActionsPromise: hasJSActionsPromise || this.pdfDocument?.hasJSActions(), | ||
fieldObjectsPromise: fieldObjectsPromise || this.pdfDocument?.getFieldObjects(), | ||
mouseState: mouseState || this._scriptingManager?.mouseState | ||
@@ -1125,3 +1154,4 @@ }); | ||
pdfPage, | ||
annotationStorage: annotationStorage || this.pdfDocument?.annotationStorage | ||
annotationStorage: annotationStorage || this.pdfDocument?.annotationStorage, | ||
linkService: this.linkService | ||
}); | ||
@@ -1198,5 +1228,8 @@ } | ||
this._optionalContentConfigPromise = promise; | ||
const updateArgs = { | ||
optionalContentConfigPromise: promise | ||
}; | ||
for (const pageView of this._pages) { | ||
pageView.update(pageView.scale, pageView.rotation, promise); | ||
pageView.update(updateArgs); | ||
} | ||
@@ -1344,3 +1377,3 @@ | ||
if (!yArray) { | ||
pageLayout.set(y, yArray || (yArray = [])); | ||
pageLayout.set(y, yArray ||= []); | ||
} | ||
@@ -1476,4 +1509,28 @@ | ||
increaseScale(steps = 1) { | ||
let newScale = this._currentScale; | ||
do { | ||
newScale = (newScale * _ui_utils.DEFAULT_SCALE_DELTA).toFixed(2); | ||
newScale = Math.ceil(newScale * 10) / 10; | ||
newScale = Math.min(_ui_utils.MAX_SCALE, newScale); | ||
} while (--steps > 0 && newScale < _ui_utils.MAX_SCALE); | ||
this.currentScaleValue = newScale; | ||
} | ||
decreaseScale(steps = 1) { | ||
let newScale = this._currentScale; | ||
do { | ||
newScale = (newScale / _ui_utils.DEFAULT_SCALE_DELTA).toFixed(2); | ||
newScale = Math.floor(newScale * 10) / 10; | ||
newScale = Math.max(_ui_utils.MIN_SCALE, newScale); | ||
} while (--steps > 0 && newScale > _ui_utils.MIN_SCALE); | ||
this.currentScaleValue = newScale; | ||
} | ||
} | ||
exports.BaseViewer = BaseViewer; |
@@ -595,3 +595,4 @@ /** | ||
init(pdfjsLib, container) { | ||
init(pdfjsLib, container, ids) { | ||
this.enable(ids); | ||
const ui = document.createElement("div"); | ||
@@ -629,3 +630,3 @@ ui.id = "PDFBug"; | ||
} else { | ||
panel.textContent = tool.name + " is disabled. To enable add " + ' "' + tool.id + '" to the pdfBug parameter ' + "and refresh (separate multiple by commas)."; | ||
panel.textContent = `${tool.name} is disabled. To enable add "${tool.id}" to ` + "the pdfBug parameter and refresh (separate multiple by commas)."; | ||
} | ||
@@ -632,0 +633,0 @@ |
@@ -31,3 +31,3 @@ /** | ||
var _viewer_compatibility = require("./viewer_compatibility.js"); | ||
var _app_options = require("./app_options.js"); | ||
@@ -62,2 +62,3 @@ ; | ||
if (!(0, _pdf.createValidAbsoluteUrl)(url, "http://example.com")) { | ||
console.error(`downloadUrl - not a valid URL: ${url}`); | ||
return; | ||
@@ -70,3 +71,3 @@ } | ||
downloadData(data, filename, contentType) { | ||
const blobUrl = (0, _pdf.createObjectURL)(data, contentType, _viewer_compatibility.viewerCompatibilityParams.disableCreateObjectURL); | ||
const blobUrl = (0, _pdf.createObjectURL)(data, contentType, _app_options.compatibilityParams.disableCreateObjectURL); | ||
download(blobUrl, filename); | ||
@@ -79,3 +80,3 @@ } | ||
if (isPdfData && !_viewer_compatibility.viewerCompatibilityParams.disableCreateObjectURL) { | ||
if (isPdfData && !_app_options.compatibilityParams.disableCreateObjectURL) { | ||
let blobUrl = this._openBlobUrls.get(element); | ||
@@ -110,3 +111,3 @@ | ||
download(blob, url, filename, sourceEventType = "download") { | ||
if (_viewer_compatibility.viewerCompatibilityParams.disableCreateObjectURL) { | ||
if (_app_options.compatibilityParams.disableCreateObjectURL) { | ||
this.downloadUrl(url, filename); | ||
@@ -113,0 +114,0 @@ return; |
@@ -37,3 +37,3 @@ /** | ||
const canvas = document.createElement("canvas"); | ||
const PRINT_UNITS = printResolution / 72.0; | ||
const PRINT_UNITS = printResolution / _pdf.PixelsPerInch.PDF; | ||
canvas.width = Math.floor(size.width * PRINT_UNITS); | ||
@@ -68,3 +68,3 @@ canvas.height = Math.floor(size.height * PRINT_UNITS); | ||
intent: "print", | ||
includeAnnotationStorage: true, | ||
annotationMode: _pdf.AnnotationMode.ENABLE_STORAGE, | ||
optionalContentConfigPromise | ||
@@ -71,0 +71,0 @@ }; |
@@ -27,3 +27,3 @@ /** | ||
}); | ||
exports.IRenderableView = exports.IPDFXfaLayerFactory = exports.IPDFTextLayerFactory = exports.IPDFStructTreeLayerFactory = exports.IPDFLinkService = exports.IPDFHistory = exports.IPDFAnnotationLayerFactory = exports.IL10n = void 0; | ||
exports.IRenderableView = exports.IPDFXfaLayerFactory = exports.IPDFTextLayerFactory = exports.IPDFStructTreeLayerFactory = exports.IPDFLinkService = exports.IPDFAnnotationLayerFactory = exports.IL10n = void 0; | ||
@@ -49,2 +49,4 @@ class IPDFLinkService { | ||
addLinkAttributes(link, url, newWindow = false) {} | ||
getDestinationHash(dest) {} | ||
@@ -68,30 +70,7 @@ | ||
class IPDFHistory { | ||
initialize({ | ||
fingerprint, | ||
resetHistory = false, | ||
updateUrl = false | ||
}) {} | ||
class IRenderableView { | ||
constructor() { | ||
this.resume = null; | ||
} | ||
reset() {} | ||
push({ | ||
namedDest = null, | ||
explicitDest, | ||
pageNumber | ||
}) {} | ||
pushPage(pageNumber) {} | ||
pushCurrentPosition() {} | ||
back() {} | ||
forward() {} | ||
} | ||
exports.IPDFHistory = IPDFHistory; | ||
class IRenderableView { | ||
get renderingId() {} | ||
@@ -103,4 +82,2 @@ | ||
resume() {} | ||
} | ||
@@ -111,3 +88,3 @@ | ||
class IPDFTextLayerFactory { | ||
createTextLayerBuilder(textLayerDiv, pageIndex, viewport, enhanceTextSelection = false, eventBus) {} | ||
createTextLayerBuilder(textLayerDiv, pageIndex, viewport, enhanceTextSelection = false, eventBus, highlighter) {} | ||
@@ -119,3 +96,3 @@ } | ||
class IPDFAnnotationLayerFactory { | ||
createAnnotationLayerBuilder(pageDiv, pdfPage, annotationStorage = null, imageResourcesPath = "", renderInteractiveForms = true, l10n = undefined, enableScripting = false, hasJSActionsPromise = null, mouseState = null) {} | ||
createAnnotationLayerBuilder(pageDiv, pdfPage, annotationStorage = null, imageResourcesPath = "", renderForms = true, l10n = undefined, enableScripting = false, hasJSActionsPromise = null, mouseState = null, fieldObjectsPromise = null) {} | ||
@@ -127,3 +104,3 @@ } | ||
class IPDFXfaLayerFactory { | ||
createXfaLayerBuilder(pageDiv, pdfPage) {} | ||
createXfaLayerBuilder(pageDiv, pdfPage, annotationStorage = null, xfaHtml = null) {} | ||
@@ -130,0 +107,0 @@ } |
@@ -73,3 +73,3 @@ /** | ||
if (diff !== 0) { | ||
(diffs || (diffs = [])).push([index, diff]); | ||
(diffs ||= []).push([index, diff]); | ||
} | ||
@@ -76,0 +76,0 @@ |
@@ -418,4 +418,4 @@ /** | ||
const params = (0, _ui_utils.parseQueryString)(hash); | ||
const nameddest = params.nameddest || ""; | ||
let page = params.page | 0; | ||
const nameddest = params.get("nameddest") || ""; | ||
let page = params.get("page") | 0; | ||
@@ -578,5 +578,3 @@ if (!this._isValidPage(page) || checkNameddest && nameddest.length > 0) { | ||
const { | ||
nameddest | ||
} = (0, _ui_utils.parseQueryString)(destHash); | ||
const nameddest = (0, _ui_utils.parseQueryString)(destHash).get("nameddest"); | ||
@@ -583,0 +581,0 @@ if (nameddest === pushHash) { |
@@ -29,2 +29,4 @@ /** | ||
var _pdf = require("../pdf"); | ||
var _ui_utils = require("./ui_utils.js"); | ||
@@ -175,2 +177,11 @@ | ||
addLinkAttributes(link, url, newWindow = false) { | ||
(0, _pdf.addLinkAttributes)(link, { | ||
url, | ||
target: newWindow ? _pdf.LinkTarget.BLANK : this.externalLinkTarget, | ||
rel: this.externalLinkRel, | ||
enabled: this.externalLinkEnabled | ||
}); | ||
} | ||
getDestinationHash(dest) { | ||
@@ -206,16 +217,16 @@ if (typeof dest === "string") { | ||
if ("search" in params) { | ||
if (params.has("search")) { | ||
this.eventBus.dispatch("findfromurlhash", { | ||
source: this, | ||
query: params.search.replace(/"/g, ""), | ||
phraseSearch: params.phrase === "true" | ||
query: params.get("search").replace(/"/g, ""), | ||
phraseSearch: params.get("phrase") === "true" | ||
}); | ||
} | ||
if ("page" in params) { | ||
pageNumber = params.page | 0 || 1; | ||
if (params.has("page")) { | ||
pageNumber = params.get("page") | 0 || 1; | ||
} | ||
if ("zoom" in params) { | ||
const zoomArgs = params.zoom.split(","); | ||
if (params.has("zoom")) { | ||
const zoomArgs = params.get("zoom").split(","); | ||
const zoomArg = zoomArgs[0]; | ||
@@ -261,11 +272,11 @@ const zoomArgNumber = parseFloat(zoomArg); | ||
if ("pagemode" in params) { | ||
if (params.has("pagemode")) { | ||
this.eventBus.dispatch("pagemode", { | ||
source: this, | ||
mode: params.pagemode | ||
mode: params.get("pagemode") | ||
}); | ||
} | ||
if ("nameddest" in params) { | ||
this.goToDestination(params.nameddest); | ||
if (params.has("nameddest")) { | ||
this.goToDestination(params.get("nameddest")); | ||
} | ||
@@ -295,13 +306,7 @@ } else { | ||
case "GoBack": | ||
if (this.pdfHistory) { | ||
this.pdfHistory.back(); | ||
} | ||
this.pdfHistory?.back(); | ||
break; | ||
case "GoForward": | ||
if (this.pdfHistory) { | ||
this.pdfHistory.forward(); | ||
} | ||
this.pdfHistory?.forward(); | ||
break; | ||
@@ -433,6 +438,3 @@ | ||
constructor() { | ||
this.externalLinkTarget = null; | ||
this.externalLinkRel = null; | ||
this.externalLinkEnabled = true; | ||
this._ignoreDestinationZoom = false; | ||
} | ||
@@ -460,2 +462,9 @@ | ||
addLinkAttributes(link, url, newWindow = false) { | ||
(0, _pdf.addLinkAttributes)(link, { | ||
url, | ||
enabled: this.externalLinkEnabled | ||
}); | ||
} | ||
getDestinationHash(dest) { | ||
@@ -462,0 +471,0 @@ return "#"; |
@@ -29,6 +29,6 @@ /** | ||
var _base_tree_viewer = require("./base_tree_viewer.js"); | ||
var _pdf = require("../pdf"); | ||
var _base_tree_viewer = require("./base_tree_viewer.js"); | ||
var _ui_utils = require("./ui_utils.js"); | ||
@@ -102,8 +102,3 @@ | ||
if (url) { | ||
(0, _pdf.addLinkAttributes)(element, { | ||
url, | ||
target: newWindow ? _pdf.LinkTarget.BLANK : linkService.externalLinkTarget, | ||
rel: linkService.externalLinkRel, | ||
enabled: linkService.externalLinkEnabled | ||
}); | ||
linkService.addLinkAttributes(element, url, newWindow); | ||
return; | ||
@@ -110,0 +105,0 @@ } |
@@ -29,5 +29,7 @@ /** | ||
var _pdf = require("../pdf"); | ||
var _ui_utils = require("./ui_utils.js"); | ||
var _pdf = require("../pdf"); | ||
var _app_options = require("./app_options.js"); | ||
@@ -38,6 +40,4 @@ var _l10n_utils = require("./l10n_utils.js"); | ||
var _viewer_compatibility = require("./viewer_compatibility.js"); | ||
const MAX_CANVAS_PIXELS = _app_options.compatibilityParams.maxCanvasPixels || 16777216; | ||
const MAX_CANVAS_PIXELS = _viewer_compatibility.viewerCompatibilityParams.maxCanvasPixels || 16777216; | ||
class PDFPageView { | ||
@@ -57,5 +57,5 @@ constructor(options) { | ||
this.hasRestrictedScaling = false; | ||
this.textLayerMode = Number.isInteger(options.textLayerMode) ? options.textLayerMode : _ui_utils.TextLayerMode.ENABLE; | ||
this.textLayerMode = options.textLayerMode ?? _ui_utils.TextLayerMode.ENABLE; | ||
this._annotationMode = options.annotationMode ?? _pdf.AnnotationMode.ENABLE_FORMS; | ||
this.imageResourcesPath = options.imageResourcesPath || ""; | ||
this.renderInteractiveForms = options.renderInteractiveForms !== false; | ||
this.useOnlyCssZoom = options.useOnlyCssZoom || false; | ||
@@ -68,2 +68,3 @@ this.maxCanvasPixels = options.maxCanvasPixels || MAX_CANVAS_PIXELS; | ||
this.xfaLayerFactory = options.xfaLayerFactory; | ||
this.textHighlighter = options.textHighlighterFactory?.createTextHighlighter(this.id - 1, this.eventBus); | ||
this.structTreeLayerFactory = options.structTreeLayerFactory; | ||
@@ -77,2 +78,3 @@ this.renderer = options.renderer || _ui_utils.RendererType.CANVAS; | ||
this._renderError = null; | ||
this._isStandalone = !this.renderingQueue?.hasViewer(); | ||
this.annotationLayer = null; | ||
@@ -103,3 +105,3 @@ this.textLayer = null; | ||
this.viewport = pdfPage.getViewport({ | ||
scale: this.scale * _ui_utils.CSS_UNITS, | ||
scale: this.scale * _pdf.PixelsPerInch.PDF_TO_CSS_UNITS, | ||
rotation: totalRotation | ||
@@ -138,3 +140,7 @@ }); | ||
try { | ||
await this.xfaLayer.render(this.viewport, "display"); | ||
const result = await this.xfaLayer.render(this.viewport, "display"); | ||
if (this.textHighlighter) { | ||
this._buildXfaTextContentItems(result.textDivs); | ||
} | ||
} catch (ex) { | ||
@@ -151,2 +157,14 @@ error = ex; | ||
async _buildXfaTextContentItems(textDivs) { | ||
const text = await this.pdfPage.getTextContent(); | ||
const items = []; | ||
for (const item of text.items) { | ||
items.push(item.str); | ||
} | ||
this.textHighlighter.setTextMapping(textDivs, items); | ||
this.textHighlighter.enable(); | ||
} | ||
_resetZoomLayer(removeFromDOM = false) { | ||
@@ -235,6 +253,20 @@ if (!this.zoomLayer) { | ||
update(scale, rotation, optionalContentConfigPromise = null) { | ||
update({ | ||
scale = 0, | ||
rotation = null, | ||
optionalContentConfigPromise = null | ||
}) { | ||
if (typeof arguments[0] !== "object") { | ||
console.error("PDFPageView.update called with separate parameters, please use an object instead."); | ||
this.update({ | ||
scale: arguments[0], | ||
rotation: arguments[1], | ||
optionalContentConfigPromise: arguments[2] | ||
}); | ||
return; | ||
} | ||
this.scale = scale || this.scale; | ||
if (typeof rotation !== "undefined") { | ||
if (typeof rotation === "number") { | ||
this.rotation = rotation; | ||
@@ -247,5 +279,10 @@ } | ||
if (this._isStandalone) { | ||
const doc = document.documentElement; | ||
doc.style.setProperty("--zoom-factor", this.scale); | ||
} | ||
const totalRotation = (this.rotation + this.pdfPageRotate) % 360; | ||
this.viewport = this.viewport.clone({ | ||
scale: this.scale * _ui_utils.CSS_UNITS, | ||
scale: this.scale * _pdf.PixelsPerInch.PDF_TO_CSS_UNITS, | ||
rotation: totalRotation | ||
@@ -340,2 +377,3 @@ }); | ||
this.xfaLayer = null; | ||
this.textHighlighter?.disable(); | ||
} | ||
@@ -483,3 +521,3 @@ | ||
textLayer = this.textLayerFactory.createTextLayerBuilder(textLayerDiv, this.id - 1, this.viewport, this.textLayerMode === _ui_utils.TextLayerMode.ENABLE_ENHANCE, this.eventBus); | ||
textLayer = this.textLayerFactory.createTextLayerBuilder(textLayerDiv, this.id - 1, this.viewport, this.textLayerMode === _ui_utils.TextLayerMode.ENABLE_ENHANCE, this.eventBus, this.textHighlighter); | ||
} | ||
@@ -563,5 +601,5 @@ | ||
if (this.annotationLayerFactory) { | ||
if (this._annotationMode !== _pdf.AnnotationMode.DISABLE && this.annotationLayerFactory) { | ||
if (!this.annotationLayer) { | ||
this.annotationLayer = this.annotationLayerFactory.createAnnotationLayerBuilder(div, pdfPage, null, this.imageResourcesPath, this.renderInteractiveForms, this.l10n, null, null, null); | ||
this.annotationLayer = this.annotationLayerFactory.createAnnotationLayerBuilder(div, pdfPage, null, this.imageResourcesPath, this._annotationMode === _pdf.AnnotationMode.ENABLE_FORMS, this.l10n, null, null, null, null); | ||
} | ||
@@ -659,3 +697,3 @@ | ||
const actualSizeViewport = viewport.clone({ | ||
scale: _ui_utils.CSS_UNITS | ||
scale: _pdf.PixelsPerInch.PDF_TO_CSS_UNITS | ||
}); | ||
@@ -693,3 +731,3 @@ outputScale.sx *= actualSizeViewport.width / viewport.width; | ||
viewport: this.viewport, | ||
renderInteractiveForms: this.renderInteractiveForms, | ||
annotationMode: this._annotationMode, | ||
optionalContentConfigPromise: this._optionalContentConfigPromise | ||
@@ -730,7 +768,9 @@ }; | ||
const actualSizeViewport = this.viewport.clone({ | ||
scale: _ui_utils.CSS_UNITS | ||
scale: _pdf.PixelsPerInch.PDF_TO_CSS_UNITS | ||
}); | ||
const promise = pdfPage.getOperatorList().then(opList => { | ||
const promise = pdfPage.getOperatorList({ | ||
annotationMode: this._annotationMode | ||
}).then(opList => { | ||
ensureNotCancelled(); | ||
const svgGfx = new _pdf.SVGGraphics(pdfPage.commonObjs, pdfPage.objs, _viewer_compatibility.viewerCompatibilityParams.disableCreateObjectURL); | ||
const svgGfx = new _pdf.SVGGraphics(pdfPage.commonObjs, pdfPage.objs, _app_options.compatibilityParams.disableCreateObjectURL); | ||
return svgGfx.getSVG(opList, actualSizeViewport).then(svg => { | ||
@@ -737,0 +777,0 @@ ensureNotCancelled(); |
@@ -29,8 +29,10 @@ /** | ||
var _pdf = require("../pdf"); | ||
var _app = require("./app.js"); | ||
var _app_options = require("./app_options.js"); | ||
var _print_utils = require("./print_utils.js"); | ||
var _viewer_compatibility = require("./viewer_compatibility.js"); | ||
let activeService = null; | ||
@@ -41,3 +43,3 @@ let overlayManager = null; | ||
const scratchCanvas = activeService.scratchCanvas; | ||
const PRINT_UNITS = printResolution / 72.0; | ||
const PRINT_UNITS = printResolution / _pdf.PixelsPerInch.PDF; | ||
scratchCanvas.width = Math.floor(size.width * PRINT_UNITS); | ||
@@ -59,3 +61,3 @@ scratchCanvas.height = Math.floor(size.height * PRINT_UNITS); | ||
intent: "print", | ||
includeAnnotationStorage: true, | ||
annotationMode: _pdf.AnnotationMode.ENABLE_STORAGE, | ||
optionalContentConfigPromise | ||
@@ -155,3 +157,3 @@ }; | ||
if ("toBlob" in scratchCanvas && !_viewer_compatibility.viewerCompatibilityParams.disableCreateObjectURL) { | ||
if ("toBlob" in scratchCanvas && !_app_options.compatibilityParams.disableCreateObjectURL) { | ||
scratchCanvas.toBlob(function (blob) { | ||
@@ -158,0 +160,0 @@ img.src = URL.createObjectURL(blob); |
@@ -63,2 +63,6 @@ /** | ||
hasViewer() { | ||
return !!this.pdfViewer; | ||
} | ||
renderHighestPriority(currentlyVisiblePages) { | ||
@@ -89,3 +93,3 @@ if (this.idleTimeout) { | ||
getHighestPriority(visible, views, scrolledDown) { | ||
getHighestPriority(visible, views, scrolledDown, preRenderExtra = false) { | ||
const visibleViews = visible.views; | ||
@@ -106,13 +110,15 @@ const numVisible = visibleViews.length; | ||
if (scrolledDown) { | ||
const nextPageIndex = visible.last.id; | ||
let preRenderIndex = scrolledDown ? visible.last.id : visible.first.id - 2; | ||
let preRenderView = views[preRenderIndex]; | ||
if (views[nextPageIndex] && !this.isViewFinished(views[nextPageIndex])) { | ||
return views[nextPageIndex]; | ||
} | ||
} else { | ||
const previousPageIndex = visible.first.id - 2; | ||
if (preRenderView && !this.isViewFinished(preRenderView)) { | ||
return preRenderView; | ||
} | ||
if (views[previousPageIndex] && !this.isViewFinished(views[previousPageIndex])) { | ||
return views[previousPageIndex]; | ||
if (preRenderExtra) { | ||
preRenderIndex += scrolledDown ? 1 : -1; | ||
preRenderView = views[preRenderIndex]; | ||
if (preRenderView && !this.isViewFinished(preRenderView)) { | ||
return preRenderView; | ||
} | ||
@@ -119,0 +125,0 @@ } |
@@ -296,2 +296,45 @@ /** | ||
break; | ||
case "SaveAs": | ||
this._eventBus.dispatch("save", { | ||
source: this | ||
}); | ||
break; | ||
case "FirstPage": | ||
this._pdfViewer.currentPageNumber = 1; | ||
break; | ||
case "LastPage": | ||
this._pdfViewer.currentPageNumber = this._pdfViewer.pagesCount; | ||
break; | ||
case "NextPage": | ||
this._pdfViewer.nextPage(); | ||
break; | ||
case "PrevPage": | ||
this._pdfViewer.previousPage(); | ||
break; | ||
case "ZoomViewIn": | ||
if (isInPresentationMode) { | ||
return; | ||
} | ||
this._pdfViewer.increaseScale(); | ||
break; | ||
case "ZoomViewOut": | ||
if (isInPresentationMode) { | ||
return; | ||
} | ||
this._pdfViewer.decreaseScale(); | ||
break; | ||
} | ||
@@ -298,0 +341,0 @@ |
@@ -51,3 +51,3 @@ /** | ||
get outerContainerWidth() { | ||
return this._outerContainerWidth || (this._outerContainerWidth = this.outerContainer.clientWidth); | ||
return this._outerContainerWidth ||= this.outerContainer.clientWidth; | ||
} | ||
@@ -54,0 +54,0 @@ |
@@ -182,4 +182,6 @@ /** | ||
update(rotation) { | ||
if (typeof rotation !== "undefined") { | ||
update({ | ||
rotation = null | ||
}) { | ||
if (typeof rotation === "number") { | ||
this.rotation = rotation; | ||
@@ -186,0 +188,0 @@ } |
@@ -142,5 +142,8 @@ /** | ||
this._pagesRotation = rotation; | ||
const updateArgs = { | ||
rotation | ||
}; | ||
for (let i = 0, ii = this._thumbnails.length; i < ii; i++) { | ||
this._thumbnails[i].update(rotation); | ||
for (const thumbnail of this._thumbnails) { | ||
thumbnail.update(updateArgs); | ||
} | ||
@@ -147,0 +150,0 @@ } |
@@ -39,2 +39,14 @@ /** | ||
}); | ||
Object.defineProperty(exports, "DefaultStructTreeLayerFactory", { | ||
enumerable: true, | ||
get: function () { | ||
return _struct_tree_layer_builder.DefaultStructTreeLayerFactory; | ||
} | ||
}); | ||
Object.defineProperty(exports, "StructTreeLayerBuilder", { | ||
enumerable: true, | ||
get: function () { | ||
return _struct_tree_layer_builder.StructTreeLayerBuilder; | ||
} | ||
}); | ||
Object.defineProperty(exports, "DefaultTextLayerFactory", { | ||
@@ -52,2 +64,14 @@ enumerable: true, | ||
}); | ||
Object.defineProperty(exports, "DefaultXfaLayerFactory", { | ||
enumerable: true, | ||
get: function () { | ||
return _xfa_layer_builder.DefaultXfaLayerFactory; | ||
} | ||
}); | ||
Object.defineProperty(exports, "XfaLayerBuilder", { | ||
enumerable: true, | ||
get: function () { | ||
return _xfa_layer_builder.XfaLayerBuilder; | ||
} | ||
}); | ||
Object.defineProperty(exports, "EventBus", { | ||
@@ -134,4 +158,8 @@ enumerable: true, | ||
var _struct_tree_layer_builder = require("./struct_tree_layer_builder.js"); | ||
var _text_layer_builder = require("./text_layer_builder.js"); | ||
var _xfa_layer_builder = require("./xfa_layer_builder.js"); | ||
var _ui_utils = require("./ui_utils.js"); | ||
@@ -159,3 +187,3 @@ | ||
const pdfjsVersion = '2.10.377'; | ||
const pdfjsBuild = '156762c48'; | ||
const pdfjsVersion = '2.11.338'; | ||
const pdfjsBuild = 'dedff3c98'; |
@@ -39,2 +39,3 @@ /** | ||
value: Object.freeze({ | ||
"annotationMode": 2, | ||
"cursorToolOnLoad": 0, | ||
@@ -51,3 +52,2 @@ "defaultZoomValue": "", | ||
"renderer": "canvas", | ||
"renderInteractiveForms": true, | ||
"sidebarViewOnLoad": -1, | ||
@@ -64,3 +64,3 @@ "scrollModeOnLoad": -1, | ||
"disableStream": false, | ||
"enableXfa": false | ||
"enableXfa": true | ||
}), | ||
@@ -67,0 +67,0 @@ writable: false, |
@@ -29,12 +29,10 @@ /** | ||
var _ui_utils = require("./ui_utils.js"); | ||
var _pdf = require("../pdf"); | ||
var _xfa_layer_builder = require("./xfa_layer_builder.js"); | ||
var _pdf = require("../pdf"); | ||
function getXfaHtmlForPrinting(printContainer, pdfDocument) { | ||
const xfaHtml = pdfDocument.allXfaHtml; | ||
const factory = new _xfa_layer_builder.DefaultXfaLayerFactory(); | ||
const scale = Math.round(_ui_utils.CSS_UNITS * 100) / 100; | ||
const scale = Math.round(_pdf.PixelsPerInch.PDF_TO_CSS_UNITS * 100) / 100; | ||
@@ -41,0 +39,0 @@ for (const xfaPage of xfaHtml.children) { |
@@ -39,3 +39,3 @@ /** | ||
viewport, | ||
findController = null, | ||
highlighter = null, | ||
enhanceTextSelection = false | ||
@@ -49,11 +49,8 @@ }) { | ||
this.renderingDone = false; | ||
this.pageIdx = pageIndex; | ||
this.pageNumber = this.pageIdx + 1; | ||
this.matches = []; | ||
this.pageNumber = pageIndex + 1; | ||
this.viewport = viewport; | ||
this.textDivs = []; | ||
this.findController = findController; | ||
this.textLayerRenderTask = null; | ||
this.highlighter = highlighter; | ||
this.enhanceTextSelection = enhanceTextSelection; | ||
this._onUpdateTextLayerMatches = null; | ||
@@ -85,3 +82,4 @@ this._bindMouse(); | ||
this.cancel(); | ||
this.textDivs = []; | ||
this.textDivs.length = 0; | ||
this.highlighter?.setTextMapping(this.textDivs, this.textContentItemsStr); | ||
const textLayerFrag = document.createDocumentFragment(); | ||
@@ -103,14 +101,4 @@ this.textLayerRenderTask = (0, _pdf.renderTextLayer)({ | ||
this._updateMatches(); | ||
this.highlighter?.enable(); | ||
}, function (reason) {}); | ||
if (!this._onUpdateTextLayerMatches) { | ||
this._onUpdateTextLayerMatches = evt => { | ||
if (evt.pageIndex === this.pageIdx || evt.pageIndex === -1) { | ||
this._updateMatches(); | ||
} | ||
}; | ||
this.eventBus._on("updatetextlayermatches", this._onUpdateTextLayerMatches); | ||
} | ||
} | ||
@@ -124,7 +112,3 @@ | ||
if (this._onUpdateTextLayerMatches) { | ||
this.eventBus._off("updatetextlayermatches", this._onUpdateTextLayerMatches); | ||
this._onUpdateTextLayerMatches = null; | ||
} | ||
this.highlighter?.disable(); | ||
} | ||
@@ -142,188 +126,2 @@ | ||
_convertMatches(matches, matchesLength) { | ||
if (!matches) { | ||
return []; | ||
} | ||
const { | ||
textContentItemsStr | ||
} = this; | ||
let i = 0, | ||
iIndex = 0; | ||
const end = textContentItemsStr.length - 1; | ||
const result = []; | ||
for (let m = 0, mm = matches.length; m < mm; m++) { | ||
let matchIdx = matches[m]; | ||
while (i !== end && matchIdx >= iIndex + textContentItemsStr[i].length) { | ||
iIndex += textContentItemsStr[i].length; | ||
i++; | ||
} | ||
if (i === textContentItemsStr.length) { | ||
console.error("Could not find a matching mapping"); | ||
} | ||
const match = { | ||
begin: { | ||
divIdx: i, | ||
offset: matchIdx - iIndex | ||
} | ||
}; | ||
matchIdx += matchesLength[m]; | ||
while (i !== end && matchIdx > iIndex + textContentItemsStr[i].length) { | ||
iIndex += textContentItemsStr[i].length; | ||
i++; | ||
} | ||
match.end = { | ||
divIdx: i, | ||
offset: matchIdx - iIndex | ||
}; | ||
result.push(match); | ||
} | ||
return result; | ||
} | ||
_renderMatches(matches) { | ||
if (matches.length === 0) { | ||
return; | ||
} | ||
const { | ||
findController, | ||
pageIdx, | ||
textContentItemsStr, | ||
textDivs | ||
} = this; | ||
const isSelectedPage = pageIdx === findController.selected.pageIdx; | ||
const selectedMatchIdx = findController.selected.matchIdx; | ||
const highlightAll = findController.state.highlightAll; | ||
let prevEnd = null; | ||
const infinity = { | ||
divIdx: -1, | ||
offset: undefined | ||
}; | ||
function beginText(begin, className) { | ||
const divIdx = begin.divIdx; | ||
textDivs[divIdx].textContent = ""; | ||
return appendTextToDiv(divIdx, 0, begin.offset, className); | ||
} | ||
function appendTextToDiv(divIdx, fromOffset, toOffset, className) { | ||
const div = textDivs[divIdx]; | ||
const content = textContentItemsStr[divIdx].substring(fromOffset, toOffset); | ||
const node = document.createTextNode(content); | ||
if (className) { | ||
const span = document.createElement("span"); | ||
span.className = `${className} appended`; | ||
span.appendChild(node); | ||
div.appendChild(span); | ||
return className.includes("selected") ? span.offsetLeft : 0; | ||
} | ||
div.appendChild(node); | ||
return 0; | ||
} | ||
let i0 = selectedMatchIdx, | ||
i1 = i0 + 1; | ||
if (highlightAll) { | ||
i0 = 0; | ||
i1 = matches.length; | ||
} else if (!isSelectedPage) { | ||
return; | ||
} | ||
for (let i = i0; i < i1; i++) { | ||
const match = matches[i]; | ||
const begin = match.begin; | ||
const end = match.end; | ||
const isSelected = isSelectedPage && i === selectedMatchIdx; | ||
const highlightSuffix = isSelected ? " selected" : ""; | ||
let selectedLeft = 0; | ||
if (!prevEnd || begin.divIdx !== prevEnd.divIdx) { | ||
if (prevEnd !== null) { | ||
appendTextToDiv(prevEnd.divIdx, prevEnd.offset, infinity.offset); | ||
} | ||
beginText(begin); | ||
} else { | ||
appendTextToDiv(prevEnd.divIdx, prevEnd.offset, begin.offset); | ||
} | ||
if (begin.divIdx === end.divIdx) { | ||
selectedLeft = appendTextToDiv(begin.divIdx, begin.offset, end.offset, "highlight" + highlightSuffix); | ||
} else { | ||
selectedLeft = appendTextToDiv(begin.divIdx, begin.offset, infinity.offset, "highlight begin" + highlightSuffix); | ||
for (let n0 = begin.divIdx + 1, n1 = end.divIdx; n0 < n1; n0++) { | ||
textDivs[n0].className = "highlight middle" + highlightSuffix; | ||
} | ||
beginText(end, "highlight end" + highlightSuffix); | ||
} | ||
prevEnd = end; | ||
if (isSelected) { | ||
findController.scrollMatchIntoView({ | ||
element: textDivs[begin.divIdx], | ||
selectedLeft, | ||
pageIndex: pageIdx, | ||
matchIndex: selectedMatchIdx | ||
}); | ||
} | ||
} | ||
if (prevEnd) { | ||
appendTextToDiv(prevEnd.divIdx, prevEnd.offset, infinity.offset); | ||
} | ||
} | ||
_updateMatches() { | ||
if (!this.renderingDone) { | ||
return; | ||
} | ||
const { | ||
findController, | ||
matches, | ||
pageIdx, | ||
textContentItemsStr, | ||
textDivs | ||
} = this; | ||
let clearedUntilDivIdx = -1; | ||
for (let i = 0, ii = matches.length; i < ii; i++) { | ||
const match = matches[i]; | ||
const begin = Math.max(clearedUntilDivIdx, match.begin.divIdx); | ||
for (let n = begin, end = match.end.divIdx; n <= end; n++) { | ||
const div = textDivs[n]; | ||
div.textContent = textContentItemsStr[n]; | ||
div.className = ""; | ||
} | ||
clearedUntilDivIdx = match.end.divIdx + 1; | ||
} | ||
if (!findController?.highlightMatches) { | ||
return; | ||
} | ||
const pageMatches = findController.pageMatches[pageIdx] || null; | ||
const pageMatchesLength = findController.pageMatchesLength[pageIdx] || null; | ||
this.matches = this._convertMatches(pageMatches, pageMatchesLength); | ||
this._renderMatches(this.matches); | ||
} | ||
_bindMouse() { | ||
@@ -389,3 +187,3 @@ const div = this.textLayerDiv; | ||
class DefaultTextLayerFactory { | ||
createTextLayerBuilder(textLayerDiv, pageIndex, viewport, enhanceTextSelection = false, eventBus) { | ||
createTextLayerBuilder(textLayerDiv, pageIndex, viewport, enhanceTextSelection = false, eventBus, highlighter) { | ||
return new TextLayerBuilder({ | ||
@@ -396,3 +194,4 @@ textLayerDiv, | ||
enhanceTextSelection, | ||
eventBus | ||
eventBus, | ||
highlighter | ||
}); | ||
@@ -399,0 +198,0 @@ } |
@@ -32,4 +32,2 @@ /** | ||
const PAGE_NUMBER_LOADING_INDICATOR = "visiblePageIsLoading"; | ||
const SCALE_SELECT_CONTAINER_WIDTH = 140; | ||
const SCALE_SELECT_WIDTH = 162; | ||
@@ -72,3 +70,2 @@ class Toolbar { | ||
pageNumber: options.pageNumber, | ||
scaleSelectContainer: options.scaleSelectContainer, | ||
scaleSelect: options.scaleSelect, | ||
@@ -255,2 +252,5 @@ customScaleOption: options.customScaleOption, | ||
const predefinedValuesPromise = Promise.all([l10n.get("page_scale_auto"), l10n.get("page_scale_actual"), l10n.get("page_scale_fit"), l10n.get("page_scale_width")]); | ||
const style = getComputedStyle(items.scaleSelect), | ||
scaleSelectContainerWidth = parseInt(style.getPropertyValue("--scale-select-container-width"), 10), | ||
scaleSelectOverflow = parseInt(style.getPropertyValue("--scale-select-overflow"), 10); | ||
let canvas = document.createElement("canvas"); | ||
@@ -262,7 +262,3 @@ canvas.mozOpaque = true; | ||
await _ui_utils.animationStarted; | ||
const { | ||
fontSize, | ||
fontFamily | ||
} = getComputedStyle(items.scaleSelect); | ||
ctx.font = `${fontSize} ${fontFamily}`; | ||
ctx.font = `${style.fontSize} ${style.fontFamily}`; | ||
let maxWidth = 0; | ||
@@ -280,8 +276,7 @@ | ||
const overflow = SCALE_SELECT_WIDTH - SCALE_SELECT_CONTAINER_WIDTH; | ||
maxWidth += 2 * overflow; | ||
maxWidth += 2 * scaleSelectOverflow; | ||
if (maxWidth > SCALE_SELECT_CONTAINER_WIDTH) { | ||
items.scaleSelect.style.width = `${maxWidth + overflow}px`; | ||
items.scaleSelectContainer.style.width = `${maxWidth}px`; | ||
if (maxWidth > scaleSelectContainerWidth) { | ||
const doc = document.documentElement; | ||
doc.style.setProperty("--scale-select-container-width", `${maxWidth}px`); | ||
} | ||
@@ -288,0 +283,0 @@ |
@@ -49,5 +49,3 @@ /** | ||
exports.watchScroll = watchScroll; | ||
exports.WaitOnType = exports.VERTICAL_PADDING = exports.UNKNOWN_SCALE = exports.TextLayerMode = exports.SpreadMode = exports.SidebarView = exports.ScrollMode = exports.SCROLLBAR_PADDING = exports.RendererType = exports.ProgressBar = exports.PresentationModeState = exports.MIN_SCALE = exports.MAX_SCALE = exports.MAX_AUTO_SCALE = exports.EventBus = exports.DEFAULT_SCALE_VALUE = exports.DEFAULT_SCALE = exports.CSS_UNITS = exports.AutoPrintRegExp = exports.animationStarted = void 0; | ||
const CSS_UNITS = 96.0 / 72.0; | ||
exports.CSS_UNITS = CSS_UNITS; | ||
exports.WaitOnType = exports.VERTICAL_PADDING = exports.UNKNOWN_SCALE = exports.TextLayerMode = exports.SpreadMode = exports.SidebarView = exports.ScrollMode = exports.SCROLLBAR_PADDING = exports.RendererType = exports.ProgressBar = exports.PresentationModeState = exports.MIN_SCALE = exports.MAX_SCALE = exports.MAX_AUTO_SCALE = exports.EventBus = exports.DEFAULT_SCALE_VALUE = exports.DEFAULT_SCALE_DELTA = exports.DEFAULT_SCALE = exports.AutoPrintRegExp = exports.AutomationEventBus = exports.animationStarted = void 0; | ||
const DEFAULT_SCALE_VALUE = "auto"; | ||
@@ -57,2 +55,4 @@ exports.DEFAULT_SCALE_VALUE = DEFAULT_SCALE_VALUE; | ||
exports.DEFAULT_SCALE = DEFAULT_SCALE; | ||
const DEFAULT_SCALE_DELTA = 1.1; | ||
exports.DEFAULT_SCALE_DELTA = DEFAULT_SCALE_DELTA; | ||
const MIN_SCALE = 0.1; | ||
@@ -202,10 +202,9 @@ exports.MIN_SCALE = MIN_SCALE; | ||
function parseQueryString(query) { | ||
const parts = query.split("&"); | ||
const params = Object.create(null); | ||
const params = new Map(); | ||
for (let i = 0, ii = parts.length; i < ii; ++i) { | ||
const param = parts[i].split("="); | ||
const key = param[0].toLowerCase(); | ||
const value = param.length > 1 ? param[1] : null; | ||
params[decodeURIComponent(key)] = decodeURIComponent(value); | ||
for (const part of query.split("&")) { | ||
const param = part.split("="), | ||
key = param[0].toLowerCase(), | ||
value = param.length > 1 ? param[1] : ""; | ||
params.set(decodeURIComponent(key), decodeURIComponent(value)); | ||
} | ||
@@ -530,8 +529,4 @@ | ||
function dispatchDOMEvent(eventName, args = null) { | ||
throw new Error("Not implemented: dispatchDOMEvent"); | ||
} | ||
class EventBus { | ||
constructor(options) { | ||
constructor() { | ||
this._listeners = Object.create(null); | ||
@@ -554,3 +549,3 @@ } | ||
dispatch(eventName) { | ||
dispatch(eventName, data) { | ||
const eventListeners = this._listeners[eventName]; | ||
@@ -562,3 +557,2 @@ | ||
const args = Array.prototype.slice.call(arguments, 1); | ||
let externalListeners; | ||
@@ -576,7 +570,7 @@ | ||
if (external) { | ||
(externalListeners || (externalListeners = [])).push(listener); | ||
(externalListeners ||= []).push(listener); | ||
continue; | ||
} | ||
listener.apply(null, args); | ||
listener(data); | ||
} | ||
@@ -586,3 +580,3 @@ | ||
for (const listener of externalListeners) { | ||
listener.apply(null, args); | ||
listener(data); | ||
} | ||
@@ -595,5 +589,3 @@ | ||
_on(eventName, listener, options = null) { | ||
var _this$_listeners; | ||
const eventListeners = (_this$_listeners = this._listeners)[eventName] || (_this$_listeners[eventName] = []); | ||
const eventListeners = this._listeners[eventName] ||= []; | ||
eventListeners.push({ | ||
@@ -625,2 +617,11 @@ listener, | ||
class AutomationEventBus extends EventBus { | ||
dispatch(eventName, data) { | ||
throw new Error("Not implemented: AutomationEventBus.dispatch"); | ||
} | ||
} | ||
exports.AutomationEventBus = AutomationEventBus; | ||
function clamp(v, min, max) { | ||
@@ -627,0 +628,0 @@ return Math.min(Math.max(v, min), max); |
@@ -29,2 +29,4 @@ /** | ||
var _pdf_link_service = require("./pdf_link_service.js"); | ||
var _pdf = require("../pdf"); | ||
@@ -36,9 +38,11 @@ | ||
pdfPage, | ||
xfaHtml, | ||
annotationStorage | ||
annotationStorage, | ||
linkService, | ||
xfaHtml | ||
}) { | ||
this.pageDiv = pageDiv; | ||
this.pdfPage = pdfPage; | ||
this.annotationStorage = annotationStorage; | ||
this.linkService = linkService; | ||
this.xfaHtml = xfaHtml; | ||
this.annotationStorage = annotationStorage; | ||
this.div = null; | ||
@@ -58,2 +62,3 @@ this._cancelled = false; | ||
annotationStorage: this.annotationStorage, | ||
linkService: this.linkService, | ||
intent | ||
@@ -65,10 +70,12 @@ }; | ||
_pdf.XfaLayer.render(parameters); | ||
const result = _pdf.XfaLayer.render(parameters); | ||
return Promise.resolve(); | ||
return Promise.resolve(result); | ||
} | ||
return this.pdfPage.getXfa().then(xfa => { | ||
if (this._cancelled) { | ||
return; | ||
if (this._cancelled || !xfa) { | ||
return { | ||
textDivs: [] | ||
}; | ||
} | ||
@@ -84,2 +91,3 @@ | ||
annotationStorage: this.annotationStorage, | ||
linkService: this.linkService, | ||
intent | ||
@@ -89,10 +97,9 @@ }; | ||
if (this.div) { | ||
_pdf.XfaLayer.update(parameters); | ||
} else { | ||
this.div = document.createElement("div"); | ||
this.pageDiv.appendChild(this.div); | ||
parameters.div = this.div; | ||
return _pdf.XfaLayer.update(parameters); | ||
} | ||
_pdf.XfaLayer.render(parameters); | ||
} | ||
this.div = document.createElement("div"); | ||
this.pageDiv.appendChild(this.div); | ||
parameters.div = this.div; | ||
return _pdf.XfaLayer.render(parameters); | ||
}).catch(error => { | ||
@@ -125,2 +132,3 @@ console.error(error); | ||
annotationStorage, | ||
linkService: new _pdf_link_service.SimpleLinkService(), | ||
xfaHtml | ||
@@ -127,0 +135,0 @@ }); |
{ | ||
"name": "pdfjs-dist", | ||
"version": "2.10.377", | ||
"version": "2.11.338", | ||
"main": "build/pdf.js", | ||
@@ -16,4 +16,9 @@ "types": "types/src/pdf.d.ts", | ||
"peerDependencies": { | ||
"worker-loader": "^3.0.7" | ||
"worker-loader": "^3.0.8" | ||
}, | ||
"peerDependenciesMeta": { | ||
"worker-loader": { | ||
"optional": true | ||
} | ||
}, | ||
"browser": { | ||
@@ -20,0 +25,0 @@ "canvas": false, |
@@ -14,6 +14,7 @@ export type AnnotationElementParameters = { | ||
imageResourcesPath?: string | undefined; | ||
renderInteractiveForms: boolean; | ||
renderForms: boolean; | ||
svgFactory: Object; | ||
enableScripting?: boolean | undefined; | ||
hasJSActions?: boolean | undefined; | ||
fieldObjects?: Object | undefined; | ||
mouseState?: Object | undefined; | ||
@@ -33,3 +34,3 @@ }; | ||
imageResourcesPath?: string | undefined; | ||
renderInteractiveForms: boolean; | ||
renderForms: boolean; | ||
/** | ||
@@ -55,3 +56,3 @@ * - Enable embedded script execution. | ||
* for annotation icons. Include trailing slash. | ||
* @property {boolean} renderInteractiveForms | ||
* @property {boolean} renderForms | ||
* @property {boolean} [enableScripting] - Enable embedded script execution. | ||
@@ -58,0 +59,0 @@ * @property {boolean} [hasJSActions] - Some fields have JS actions. |
@@ -6,2 +6,3 @@ /** | ||
_storage: Map<any, any>; | ||
_timeStamp: number; | ||
_modified: boolean; | ||
@@ -41,2 +42,7 @@ onSetModified: any; | ||
get serializable(): Map<any, any> | null; | ||
/** | ||
* PLEASE NOTE: Only intended for usage within the API itself. | ||
* @ignore | ||
*/ | ||
get lastModified(): string; | ||
} |
@@ -59,3 +59,3 @@ export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array; | ||
*/ | ||
worker?: any; | ||
worker?: PDFWorker | undefined; | ||
/** | ||
@@ -202,47 +202,2 @@ * - Controls the logging level; the constants | ||
/** | ||
* The loading task controls the operations required to load a PDF document | ||
* (such as network requests) and provides a way to listen for completion, | ||
* after which individual pages can be rendered. | ||
*/ | ||
export type PDFDocumentLoadingTask = { | ||
/** | ||
* - Unique identifier for the document loading task. | ||
*/ | ||
docId: string; | ||
/** | ||
* - Whether the loading task is destroyed or not. | ||
*/ | ||
destroyed: boolean; | ||
/** | ||
* - Callback to request a password if a wrong | ||
* or no password was provided. The callback receives two parameters: a | ||
* function that should be called with the new password, and a reason (see | ||
* {@link PasswordResponses }). | ||
*/ | ||
onPassword?: Function | undefined; | ||
/** | ||
* - Callback to be able to monitor the | ||
* loading progress of the PDF file (necessary to implement e.g. a loading | ||
* bar). The callback receives an {@link OnProgressParameters } argument. | ||
*/ | ||
onProgress?: Function | undefined; | ||
/** | ||
* - Callback for when an | ||
* unsupported feature is used in the PDF document. The callback receives an | ||
* {@link UNSUPPORTED_FEATURES } argument. | ||
*/ | ||
onUnsupportedFeature?: Function | undefined; | ||
/** | ||
* - Promise for document loading | ||
* task completion. | ||
*/ | ||
promise: Promise<PDFDocumentProxy>; | ||
/** | ||
* - Abort all network requests and destroy | ||
* the worker. Returns a promise that is resolved when destruction is | ||
* completed. | ||
*/ | ||
destroy: Function; | ||
}; | ||
/** | ||
* Page getViewport parameters. | ||
@@ -390,4 +345,4 @@ */ | ||
* - Determines the annotations that are fetched, | ||
* can be either 'display' (viewable annotations) or 'print' (printable | ||
* annotations). If the parameter is omitted, all annotations are fetched. | ||
* can be 'display' (viewable annotations), 'print' (printable annotations), | ||
* or 'any' (all annotations). The default value is 'display'. | ||
*/ | ||
@@ -410,12 +365,21 @@ intent?: string | undefined; | ||
/** | ||
* - Rendering intent, can be 'display' or 'print'. | ||
* The default value is 'display'. | ||
* - Rendering intent, can be 'display', 'print', | ||
* or 'any'. The default value is 'display'. | ||
*/ | ||
intent?: string | undefined; | ||
/** | ||
* - Whether or not interactive | ||
* form elements are rendered in the display layer. If so, we do not render | ||
* them on the canvas as well. The default value is `false`. | ||
* Controls which annotations are rendered | ||
* onto the canvas, for annotations with appearance-data; the values from | ||
* {@link AnnotationMode } should be used. The following values are supported: | ||
* - `AnnotationMode.DISABLE`, which disables all annotations. | ||
* - `AnnotationMode.ENABLE`, which includes all possible annotations (thus | ||
* it also depends on the `intent`-option, see above). | ||
* - `AnnotationMode.ENABLE_FORMS`, which excludes annotations that contain | ||
* interactive form elements (those will be rendered in the display layer). | ||
* - `AnnotationMode.ENABLE_STORAGE`, which includes all possible annotations | ||
* (as above) but where interactive form elements are updated with data | ||
* from the {@link AnnotationStorage }-instance; useful e.g. for printing. | ||
* The default value is `AnnotationMode.ENABLE`. | ||
*/ | ||
renderInteractiveForms?: boolean | undefined; | ||
annotationMode?: number | undefined; | ||
/** | ||
@@ -445,8 +409,2 @@ * - Additional transform, applied just | ||
/** | ||
* - Render stored interactive | ||
* form element data, from the {@link AnnotationStorage }-instance, onto the | ||
* canvas itself; useful e.g. for printing. The default value is `false`. | ||
*/ | ||
includeAnnotationStorage?: boolean | undefined; | ||
/** | ||
* - | ||
@@ -464,6 +422,21 @@ * A promise that should resolve with an {@link OptionalContentConfig }created from `PDFDocumentProxy.getOptionalContentConfig`. If `null`, | ||
/** | ||
* - Rendering intent, can be 'display' or 'print'. | ||
* The default value is 'display'. | ||
* - Rendering intent, can be 'display', 'print', | ||
* or 'any'. The default value is 'display'. | ||
*/ | ||
intent?: string | undefined; | ||
/** | ||
* Controls which annotations are included | ||
* in the operatorList, for annotations with appearance-data; the values from | ||
* {@link AnnotationMode } should be used. The following values are supported: | ||
* - `AnnotationMode.DISABLE`, which disables all annotations. | ||
* - `AnnotationMode.ENABLE`, which includes all possible annotations (thus | ||
* it also depends on the `intent`-option, see above). | ||
* - `AnnotationMode.ENABLE_FORMS`, which excludes annotations that contain | ||
* interactive form elements (those will be rendered in the display layer). | ||
* - `AnnotationMode.ENABLE_STORAGE`, which includes all possible annotations | ||
* (as above) but where interactive form elements are updated with data | ||
* from the {@link AnnotationStorage }-instance; useful e.g. for printing. | ||
* The default value is `AnnotationMode.ENABLE`. | ||
*/ | ||
annotationMode?: number | undefined; | ||
}; | ||
@@ -523,4 +496,4 @@ /** | ||
/** | ||
* - Controls the logging level; the | ||
* constants from {@link VerbosityLevel } should be used. | ||
* - Controls the logging level; | ||
* the constants from {@link VerbosityLevel } should be used. | ||
*/ | ||
@@ -699,2 +672,59 @@ verbosity?: number | undefined; | ||
/** | ||
* @typedef {Object} OnProgressParameters | ||
* @property {number} loaded - Currently loaded number of bytes. | ||
* @property {number} total - Total number of bytes in the PDF file. | ||
*/ | ||
/** | ||
* The loading task controls the operations required to load a PDF document | ||
* (such as network requests) and provides a way to listen for completion, | ||
* after which individual pages can be rendered. | ||
*/ | ||
export class PDFDocumentLoadingTask { | ||
static get idCounters(): any; | ||
_capability: import("../shared/util.js").PromiseCapability; | ||
_transport: any; | ||
_worker: any; | ||
/** | ||
* Unique identifier for the document loading task. | ||
* @type {string} | ||
*/ | ||
docId: string; | ||
/** | ||
* Whether the loading task is destroyed or not. | ||
* @type {boolean} | ||
*/ | ||
destroyed: boolean; | ||
/** | ||
* Callback to request a password if a wrong or no password was provided. | ||
* The callback receives two parameters: a function that should be called | ||
* with the new password, and a reason (see {@link PasswordResponses}). | ||
* @type {function} | ||
*/ | ||
onPassword: Function; | ||
/** | ||
* Callback to be able to monitor the loading progress of the PDF file | ||
* (necessary to implement e.g. a loading bar). | ||
* The callback receives an {@link OnProgressParameters} argument. | ||
* @type {function} | ||
*/ | ||
onProgress: Function; | ||
/** | ||
* Callback for when an unsupported feature is used in the PDF document. | ||
* The callback receives an {@link UNSUPPORTED_FEATURES} argument. | ||
* @type {function} | ||
*/ | ||
onUnsupportedFeature: Function; | ||
/** | ||
* Promise for document loading task completion. | ||
* @type {Promise<PDFDocumentProxy>} | ||
*/ | ||
get promise(): Promise<PDFDocumentProxy>; | ||
/** | ||
* Abort all network requests and destroy the worker. | ||
* @returns {Promise<void>} A promise that is resolved when destruction is | ||
* completed. | ||
*/ | ||
destroy(): Promise<void>; | ||
} | ||
/** | ||
* Proxy to a `PDFDocument` in the worker thread. | ||
@@ -942,3 +972,3 @@ */ | ||
*/ | ||
destroy(): any; | ||
destroy(): Promise<void>; | ||
/** | ||
@@ -959,7 +989,9 @@ * @type {DocumentInitParameters} A subset of the current | ||
/** | ||
* @returns {Promise<Array<Object> | null>} A promise that is resolved with an | ||
* {Array<Object>} containing /AcroForm field data for the JS sandbox, | ||
* or `null` when no field data is present in the PDF file. | ||
* @returns {Promise<Object<string, Array<Object>> | null>} A promise that is | ||
* resolved with an {Object} containing /AcroForm field data for the JS | ||
* sandbox, or `null` when no field data is present in the PDF file. | ||
*/ | ||
getFieldObjects(): Promise<Array<Object> | null>; | ||
getFieldObjects(): Promise<{ | ||
[x: string]: Array<Object>; | ||
} | null>; | ||
/** | ||
@@ -1048,4 +1080,4 @@ * @returns {Promise<boolean>} A promise that is resolved with `true` | ||
* @property {string} [intent] - Determines the annotations that are fetched, | ||
* can be either 'display' (viewable annotations) or 'print' (printable | ||
* annotations). If the parameter is omitted, all annotations are fetched. | ||
* can be 'display' (viewable annotations), 'print' (printable annotations), | ||
* or 'any' (all annotations). The default value is 'display'. | ||
*/ | ||
@@ -1059,7 +1091,16 @@ /** | ||
* the `PDFPageProxy.getViewport` method. | ||
* @property {string} [intent] - Rendering intent, can be 'display' or 'print'. | ||
* The default value is 'display'. | ||
* @property {boolean} [renderInteractiveForms] - Whether or not interactive | ||
* form elements are rendered in the display layer. If so, we do not render | ||
* them on the canvas as well. The default value is `false`. | ||
* @property {string} [intent] - Rendering intent, can be 'display', 'print', | ||
* or 'any'. The default value is 'display'. | ||
* @property {number} [annotationMode] Controls which annotations are rendered | ||
* onto the canvas, for annotations with appearance-data; the values from | ||
* {@link AnnotationMode} should be used. The following values are supported: | ||
* - `AnnotationMode.DISABLE`, which disables all annotations. | ||
* - `AnnotationMode.ENABLE`, which includes all possible annotations (thus | ||
* it also depends on the `intent`-option, see above). | ||
* - `AnnotationMode.ENABLE_FORMS`, which excludes annotations that contain | ||
* interactive form elements (those will be rendered in the display layer). | ||
* - `AnnotationMode.ENABLE_STORAGE`, which includes all possible annotations | ||
* (as above) but where interactive form elements are updated with data | ||
* from the {@link AnnotationStorage}-instance; useful e.g. for printing. | ||
* The default value is `AnnotationMode.ENABLE`. | ||
* @property {Array<any>} [transform] - Additional transform, applied just | ||
@@ -1076,5 +1117,2 @@ * before viewport transform. | ||
* 'rgb(255,255,255)'. | ||
* @property {boolean} [includeAnnotationStorage] - Render stored interactive | ||
* form element data, from the {@link AnnotationStorage}-instance, onto the | ||
* canvas itself; useful e.g. for printing. The default value is `false`. | ||
* @property {Promise<OptionalContentConfig>} [optionalContentConfigPromise] - | ||
@@ -1090,4 +1128,16 @@ * A promise that should resolve with an {@link OptionalContentConfig} | ||
* @typedef {Object} GetOperatorListParameters | ||
* @property {string} [intent] - Rendering intent, can be 'display' or 'print'. | ||
* The default value is 'display'. | ||
* @property {string} [intent] - Rendering intent, can be 'display', 'print', | ||
* or 'any'. The default value is 'display'. | ||
* @property {number} [annotationMode] Controls which annotations are included | ||
* in the operatorList, for annotations with appearance-data; the values from | ||
* {@link AnnotationMode} should be used. The following values are supported: | ||
* - `AnnotationMode.DISABLE`, which disables all annotations. | ||
* - `AnnotationMode.ENABLE`, which includes all possible annotations (thus | ||
* it also depends on the `intent`-option, see above). | ||
* - `AnnotationMode.ENABLE_FORMS`, which excludes annotations that contain | ||
* interactive form elements (those will be rendered in the display layer). | ||
* - `AnnotationMode.ENABLE_STORAGE`, which includes all possible annotations | ||
* (as above) but where interactive form elements are updated with data | ||
* from the {@link AnnotationStorage}-instance; useful e.g. for printing. | ||
* The default value is `AnnotationMode.ENABLE`. | ||
*/ | ||
@@ -1135,2 +1185,3 @@ /** | ||
_intentStates: Map<any, any>; | ||
_annotationPromises: Map<any, any>; | ||
destroyed: boolean; | ||
@@ -1170,4 +1221,2 @@ /** | ||
getAnnotations({ intent }?: GetAnnotationsParameters): Promise<Array<any>>; | ||
_annotationsPromise: any; | ||
_annotationsIntent: any; | ||
/** | ||
@@ -1192,3 +1241,3 @@ * @returns {Promise<Object>} A promise that is resolved with an | ||
*/ | ||
render({ canvasContext, viewport, intent, renderInteractiveForms, transform, imageLayer, canvasFactory, background, includeAnnotationStorage, optionalContentConfigPromise, }: RenderParameters): RenderTask; | ||
render({ canvasContext, viewport, intent, annotationMode, transform, imageLayer, canvasFactory, background, optionalContentConfigPromise, }: RenderParameters, ...args: any[]): RenderTask; | ||
/** | ||
@@ -1200,3 +1249,3 @@ * @param {GetOperatorListParameters} params - Page getOperatorList | ||
*/ | ||
getOperatorList({ intent }?: GetOperatorListParameters): Promise<PDFOperatorList>; | ||
getOperatorList({ intent, annotationMode, }?: GetOperatorListParameters): Promise<PDFOperatorList>; | ||
/** | ||
@@ -1261,11 +1310,84 @@ * @param {getTextContentParameters} params - getTextContent parameters. | ||
/** | ||
* @typedef {Object} PDFWorkerParameters | ||
* @property {string} [name] - The name of the worker. | ||
* @property {Object} [port] - The `workerPort` object. | ||
* @property {number} [verbosity] - Controls the logging level; the | ||
* constants from {@link VerbosityLevel} should be used. | ||
* PDF.js web worker abstraction that controls the instantiation of PDF | ||
* documents. Message handlers are used to pass information from the main | ||
* thread to the worker thread and vice versa. If the creation of a web | ||
* worker is not possible, a "fake" worker will be used instead. | ||
* | ||
* @param {PDFWorkerParameters} params - The worker initialization parameters. | ||
*/ | ||
/** @type {any} */ | ||
export const PDFWorker: any; | ||
export class PDFWorker { | ||
static get _workerPorts(): any; | ||
/** | ||
* @param {PDFWorkerParameters} params - The worker initialization parameters. | ||
*/ | ||
static fromPort(params: PDFWorkerParameters): any; | ||
/** | ||
* The current `workerSrc`, when it exists. | ||
* @type {string} | ||
*/ | ||
static get workerSrc(): string; | ||
static get _mainThreadWorkerMessageHandler(): any; | ||
static get _setupFakeWorkerGlobal(): any; | ||
constructor({ name, port, verbosity, }?: { | ||
name?: null | undefined; | ||
port?: null | undefined; | ||
verbosity?: number | undefined; | ||
}); | ||
name: any; | ||
destroyed: boolean; | ||
postMessageTransfers: boolean; | ||
verbosity: number; | ||
_readyCapability: import("../shared/util.js").PromiseCapability; | ||
_port: any; | ||
_webWorker: Worker | null; | ||
_messageHandler: MessageHandler | null; | ||
/** | ||
* Promise for worker initialization completion. | ||
* @type {Promise<void>} | ||
*/ | ||
get promise(): Promise<void>; | ||
/** | ||
* The current `workerPort`, when it exists. | ||
* @type {Worker} | ||
*/ | ||
get port(): Worker; | ||
/** | ||
* The current MessageHandler-instance. | ||
* @type {MessageHandler} | ||
*/ | ||
get messageHandler(): MessageHandler; | ||
_initializeFromPort(port: any): void; | ||
_initialize(): void; | ||
_setupFakeWorker(): void; | ||
/** | ||
* Destroys the worker instance. | ||
*/ | ||
destroy(): void; | ||
} | ||
/** | ||
* Allows controlling of the rendering tasks. | ||
*/ | ||
export class RenderTask { | ||
constructor(internalRenderTask: any); | ||
_internalRenderTask: any; | ||
/** | ||
* Callback for incremental rendering -- a function that will be called | ||
* each time the rendering is paused. To continue rendering call the | ||
* function that is the first argument to the callback. | ||
* @type {function} | ||
*/ | ||
onContinue: Function; | ||
/** | ||
* Promise for rendering task completion. | ||
* @type {Promise<void>} | ||
*/ | ||
get promise(): Promise<void>; | ||
/** | ||
* Cancels the rendering task. If the task is currently rendering it will | ||
* not be cancelled until graphics pauses with a timeout. The promise that | ||
* this object extends will be rejected when cancelled. | ||
*/ | ||
cancel(): void; | ||
} | ||
/** | ||
* Sets the function that instantiates an {IPDFStream} as an alternative PDF | ||
@@ -1287,36 +1409,2 @@ * data transport. | ||
import { DOMStandardFontDataFactory } from "./display_utils.js"; | ||
/** | ||
* @typedef {Object} OnProgressParameters | ||
* @property {number} loaded - Currently loaded number of bytes. | ||
* @property {number} total - Total number of bytes in the PDF file. | ||
*/ | ||
/** | ||
* The loading task controls the operations required to load a PDF document | ||
* (such as network requests) and provides a way to listen for completion, | ||
* after which individual pages can be rendered. | ||
* | ||
* @typedef {Object} PDFDocumentLoadingTask | ||
* @property {string} docId - Unique identifier for the document loading task. | ||
* @property {boolean} destroyed - Whether the loading task is destroyed or not. | ||
* @property {function} [onPassword] - Callback to request a password if a wrong | ||
* or no password was provided. The callback receives two parameters: a | ||
* function that should be called with the new password, and a reason (see | ||
* {@link PasswordResponses}). | ||
* @property {function} [onProgress] - Callback to be able to monitor the | ||
* loading progress of the PDF file (necessary to implement e.g. a loading | ||
* bar). The callback receives an {@link OnProgressParameters} argument. | ||
* @property {function} [onUnsupportedFeature] - Callback for when an | ||
* unsupported feature is used in the PDF document. The callback receives an | ||
* {@link UNSUPPORTED_FEATURES} argument. | ||
* @property {Promise<PDFDocumentProxy>} promise - Promise for document loading | ||
* task completion. | ||
* @property {function} destroy - Abort all network requests and destroy | ||
* the worker. Returns a promise that is resolved when destruction is | ||
* completed. | ||
*/ | ||
/** | ||
* @type {any} | ||
* @ignore | ||
*/ | ||
declare const PDFDocumentLoadingTask: any; | ||
import { AnnotationStorage } from "./annotation_storage.js"; | ||
@@ -1347,3 +1435,3 @@ import { info } from "../shared/util.js"; | ||
*/ | ||
get(objId: any, callback?: any): any; | ||
get(objId: any, callback?: null): any; | ||
has(objId: any): any; | ||
@@ -1356,27 +1444,3 @@ /** | ||
} | ||
/** | ||
* Allows controlling of the rendering tasks. | ||
*/ | ||
declare class RenderTask { | ||
constructor(internalRenderTask: any); | ||
_internalRenderTask: any; | ||
/** | ||
* Callback for incremental rendering -- a function that will be called | ||
* each time the rendering is paused. To continue rendering call the | ||
* function that is the first argument to the callback. | ||
* @type {function} | ||
*/ | ||
onContinue: Function; | ||
/** | ||
* Promise for rendering task completion. | ||
* @type {Promise<void>} | ||
*/ | ||
get promise(): Promise<void>; | ||
/** | ||
* Cancels the rendering task. If the task is currently rendering it will | ||
* not be cancelled until graphics pauses with a timeout. The promise that | ||
* this object extends will be rejected when cancelled. | ||
*/ | ||
cancel(): void; | ||
} | ||
import { MessageHandler } from "../shared/message_handler.js"; | ||
export {}; |
@@ -15,3 +15,3 @@ export class BaseCanvasFactory { | ||
constructor({ baseUrl, isCompressed }: { | ||
baseUrl?: any; | ||
baseUrl?: null | undefined; | ||
isCompressed?: boolean | undefined; | ||
@@ -31,3 +31,3 @@ }); | ||
constructor({ baseUrl }: { | ||
baseUrl?: any; | ||
baseUrl?: null | undefined; | ||
}); | ||
@@ -34,0 +34,0 @@ baseUrl: any; |
@@ -0,4 +1,184 @@ | ||
export class CanvasGraphics { | ||
constructor(canvasCtx: any, commonObjs: any, objs: any, canvasFactory: any, imageLayer: any, optionalContentConfig: any); | ||
ctx: any; | ||
current: CanvasExtraState; | ||
stateStack: any[]; | ||
pendingClip: {} | null; | ||
pendingEOFill: boolean; | ||
res: any; | ||
xobjs: any; | ||
commonObjs: any; | ||
objs: any; | ||
canvasFactory: any; | ||
imageLayer: any; | ||
groupStack: any[]; | ||
processingType3: any; | ||
baseTransform: any; | ||
baseTransformStack: any[]; | ||
groupLevel: number; | ||
smaskStack: any[]; | ||
smaskCounter: number; | ||
tempSMask: any; | ||
contentVisible: boolean; | ||
markedContentStack: any[]; | ||
optionalContentConfig: any; | ||
cachedCanvases: CachedCanvases; | ||
cachedCanvasPatterns: LRUCache; | ||
cachedPatterns: Map<any, any>; | ||
_cachedGetSinglePixelWidth: number | null; | ||
beginDrawing({ transform, viewport, transparency, background, }: { | ||
transform: any; | ||
viewport: any; | ||
transparency?: boolean | undefined; | ||
background?: null | undefined; | ||
}): void; | ||
compositeCtx: any; | ||
transparentCanvas: any; | ||
_combinedScaleFactor: number | undefined; | ||
executeOperatorList(operatorList: any, executionStartIdx: any, continueCallback: any, stepper: any): any; | ||
endDrawing(): void; | ||
_scaleImage(img: any, inverseTransform: any): { | ||
img: any; | ||
paintWidth: any; | ||
paintHeight: any; | ||
}; | ||
_createMaskCanvas(img: any): { | ||
canvas: any; | ||
offsetX: number; | ||
offsetY: number; | ||
}; | ||
setLineWidth(width: any): void; | ||
setLineCap(style: any): void; | ||
setLineJoin(style: any): void; | ||
setMiterLimit(limit: any): void; | ||
setDash(dashArray: any, dashPhase: any): void; | ||
setRenderingIntent(intent: any): void; | ||
setFlatness(flatness: any): void; | ||
setGState(states: any): void; | ||
beginSMaskGroup(): void; | ||
suspendSMaskGroup(): void; | ||
resumeSMaskGroup(): void; | ||
endSMaskGroup(): void; | ||
save(): void; | ||
restore(): void; | ||
transform(a: any, b: any, c: any, d: any, e: any, f: any): void; | ||
constructPath(ops: any, args: any): void; | ||
closePath(): void; | ||
stroke(consumePath: any): void; | ||
closeStroke(): void; | ||
fill(consumePath: any): void; | ||
eoFill(): void; | ||
fillStroke(): void; | ||
eoFillStroke(): void; | ||
closeFillStroke(): void; | ||
closeEOFillStroke(): void; | ||
endPath(): void; | ||
clip(): void; | ||
eoClip(): void; | ||
beginText(): void; | ||
endText(): void; | ||
setCharSpacing(spacing: any): void; | ||
setWordSpacing(spacing: any): void; | ||
setHScale(scale: any): void; | ||
setLeading(leading: any): void; | ||
setFont(fontRefName: any, size: any): void; | ||
setTextRenderingMode(mode: any): void; | ||
setTextRise(rise: any): void; | ||
moveText(x: any, y: any): void; | ||
setLeadingMoveText(x: any, y: any): void; | ||
setTextMatrix(a: any, b: any, c: any, d: any, e: any, f: any): void; | ||
nextLine(): void; | ||
paintChar(character: any, x: any, y: any, patternTransform: any, resetLineWidthToOne: any): void; | ||
pendingTextPaths: any[] | undefined; | ||
get isFontSubpixelAAEnabled(): any; | ||
showText(glyphs: any): void; | ||
showType3Text(glyphs: any): void; | ||
setCharWidth(xWidth: any, yWidth: any): void; | ||
setCharWidthAndBounds(xWidth: any, yWidth: any, llx: any, lly: any, urx: any, ury: any): void; | ||
getColorN_Pattern(IR: any): any; | ||
setStrokeColorN(...args: any[]): void; | ||
setFillColorN(...args: any[]): void; | ||
setStrokeRGBColor(r: any, g: any, b: any): void; | ||
setFillRGBColor(r: any, g: any, b: any): void; | ||
_getPattern(objId: any, matrix?: null): any; | ||
shadingFill(objId: any): void; | ||
beginInlineImage(): void; | ||
beginImageData(): void; | ||
paintFormXObjectBegin(matrix: any, bbox: any): void; | ||
paintFormXObjectEnd(): void; | ||
beginGroup(group: any): void; | ||
endGroup(group: any): void; | ||
beginAnnotations(): void; | ||
endAnnotations(): void; | ||
beginAnnotation(id: any, rect: any, transform: any, matrix: any): void; | ||
endAnnotation(): void; | ||
paintImageMaskXObject(img: any): void; | ||
paintImageMaskXObjectRepeat(imgData: any, scaleX: any, skewX: number | undefined, skewY: number | undefined, scaleY: any, positions: any): void; | ||
paintImageMaskXObjectGroup(images: any): void; | ||
paintImageXObject(objId: any): void; | ||
paintImageXObjectRepeat(objId: any, scaleX: any, scaleY: any, positions: any): void; | ||
paintInlineImageXObject(imgData: any): void; | ||
paintInlineImageXObjectGroup(imgData: any, map: any): void; | ||
paintSolidColorImageMask(): void; | ||
markPoint(tag: any): void; | ||
markPointProps(tag: any, properties: any): void; | ||
beginMarkedContent(tag: any): void; | ||
beginMarkedContentProps(tag: any, properties: any): void; | ||
endMarkedContent(): void; | ||
beginCompat(): void; | ||
endCompat(): void; | ||
consumePath(): void; | ||
getSinglePixelWidth(): number; | ||
getCanvasPosition(x: any, y: any): any[]; | ||
isContentVisible(): boolean; | ||
} | ||
declare class CanvasExtraState { | ||
alphaIsShape: boolean; | ||
fontSize: number; | ||
fontSizeScale: number; | ||
textMatrix: number[]; | ||
textMatrixScale: number; | ||
fontMatrix: number[]; | ||
leading: number; | ||
x: number; | ||
y: number; | ||
lineX: number; | ||
lineY: number; | ||
charSpacing: number; | ||
wordSpacing: number; | ||
textHScale: number; | ||
textRenderingMode: number; | ||
textRise: number; | ||
fillColor: string; | ||
strokeColor: string; | ||
patternFill: boolean; | ||
fillAlpha: number; | ||
strokeAlpha: number; | ||
lineWidth: number; | ||
activeSMask: any; | ||
resumeSMaskCtx: any; | ||
transferMaps: any; | ||
clone(): any; | ||
setCurrentPoint(x: any, y: any): void; | ||
} | ||
declare class CachedCanvases { | ||
constructor(canvasFactory: any); | ||
canvasFactory: any; | ||
cache: any; | ||
getCanvas(id: any, width: any, height: any, trackTransform: any): any; | ||
clear(): void; | ||
} | ||
/** | ||
* @type {any} | ||
* Least recently used cache implemented with a JS Map. JS Map keys are ordered | ||
* by last insertion. | ||
*/ | ||
export const CanvasGraphics: any; | ||
declare class LRUCache { | ||
constructor(maxSize?: number); | ||
_cache: Map<any, any>; | ||
_maxSize: number; | ||
has(key: any): boolean; | ||
get(key: any): any; | ||
set(key: any, value: any): void; | ||
clear(): void; | ||
} | ||
export {}; |
@@ -72,7 +72,6 @@ export type ExternalLinkParameters = any; | ||
* Adds various attributes (href, title, target, rel) to hyperlinks. | ||
* @param {HTMLLinkElement} link - The link element. | ||
* @param {HTMLAnchorElement} link - The link element. | ||
* @param {ExternalLinkParameters} params | ||
*/ | ||
export function addLinkAttributes(link: HTMLLinkElement, { url, target, rel, enabled }?: any): void; | ||
export const DEFAULT_LINK_REL: "noopener noreferrer nofollow"; | ||
export function addLinkAttributes(link: HTMLAnchorElement, { url, target, rel, enabled }?: any): void; | ||
export function deprecated(details: any): void; | ||
@@ -225,2 +224,6 @@ export class DOMCanvasFactory extends BaseCanvasFactory { | ||
} | ||
export namespace PixelsPerInch { | ||
const CSS: number; | ||
const PDF: number; | ||
} | ||
declare const RenderingCancelledException_base: any; | ||
@@ -227,0 +230,0 @@ export class RenderingCancelledException extends RenderingCancelledException_base { |
@@ -7,3 +7,3 @@ export class FontFaceObject { | ||
onUnsupportedFeature: any; | ||
fontRegistry?: any; | ||
fontRegistry?: null | undefined; | ||
}); | ||
@@ -16,3 +16,3 @@ compiledGlyphs: any; | ||
fontRegistry: any; | ||
createNativeFontFace(): any; | ||
createNativeFontFace(): FontFace | null; | ||
createFontFaceRule(): string | null; | ||
@@ -19,0 +19,0 @@ getPathGenerator(objs: any, character: any): any; |
@@ -15,3 +15,3 @@ /** @implements {IPDFStream} */ | ||
declare class NetworkManager { | ||
constructor(url: any, args: any); | ||
constructor(url: any, args?: {}); | ||
url: any; | ||
@@ -52,5 +52,5 @@ isHttp: boolean; | ||
_onHeadersReceived(): void; | ||
_onDone(args: any): void; | ||
_onDone(data: any): void; | ||
_onError(status: any): void; | ||
_onProgress(data: any): void; | ||
_onProgress(evt: any): void; | ||
get filename(): string | null; | ||
@@ -69,2 +69,3 @@ get isRangeSupported(): boolean; | ||
_manager: any; | ||
_url: any; | ||
_requestId: any; | ||
@@ -74,2 +75,3 @@ _requests: any[]; | ||
_done: boolean; | ||
_storedError: import("../shared/util.js").MissingPDFException | import("../shared/util.js").UnexpectedResponseException | undefined; | ||
onProgress: any; | ||
@@ -79,2 +81,3 @@ onClosed: any; | ||
_onDone(data: any): void; | ||
_onError(status: any): void; | ||
_onProgress(evt: any): void; | ||
@@ -81,0 +84,0 @@ get isStreamingSupported(): boolean; |
@@ -1,2 +0,2 @@ | ||
export function getShadingPattern(IR: any): RadialAxialShadingPattern | MeshShadingPattern | DummyShadingPattern; | ||
export function getShadingPattern(IR: any, cachedCanvasPatterns: any): RadialAxialShadingPattern | MeshShadingPattern | DummyShadingPattern; | ||
export class TilingPattern { | ||
@@ -32,3 +32,3 @@ static get MAX_PATTERN_SIZE(): any; | ||
declare class RadialAxialShadingPattern extends BaseShadingPattern { | ||
constructor(IR: any); | ||
constructor(IR: any, cachedCanvasPatterns: any); | ||
_type: any; | ||
@@ -41,4 +41,4 @@ _bbox: any; | ||
_r1: any; | ||
_matrix: any; | ||
_patternCache: any; | ||
matrix: any; | ||
cachedCanvasPatterns: any; | ||
_createGradient(ctx: any): any; | ||
@@ -52,5 +52,5 @@ } | ||
_bounds: any; | ||
_matrix: any; | ||
_bbox: any; | ||
_background: any; | ||
matrix: any; | ||
_createMeshCanvas(combinedScale: any, backgroundColor: any, cachedCanvases: any): { | ||
@@ -57,0 +57,0 @@ canvas: any; |
@@ -24,3 +24,3 @@ /** @implements {IPDFStream} */ | ||
declare class PDFDataTransportStreamReader implements IPDFStreamReader { | ||
constructor(stream: any, queuedChunks: any, progressiveDone?: boolean, contentDispositionFilename?: any); | ||
constructor(stream: any, queuedChunks: any, progressiveDone?: boolean, contentDispositionFilename?: null); | ||
_stream: any; | ||
@@ -27,0 +27,0 @@ _done: boolean; |
export class XfaLayer { | ||
static setupStorage(html: any, id: any, element: any, storage: any, intent: any): void; | ||
static setAttributes(html: any, element: any, storage: any, intent: any): void; | ||
static render(parameters: any): void; | ||
static setAttributes({ html, element, storage, intent, linkService }: { | ||
html: any; | ||
element: any; | ||
storage?: null | undefined; | ||
intent: any; | ||
linkService: any; | ||
}): void; | ||
static render(parameters: any): { | ||
textDivs: Text[]; | ||
}; | ||
/** | ||
@@ -6,0 +14,0 @@ * Update the xfa layer. |
@@ -0,1 +1,5 @@ | ||
export type PDFDocumentLoadingTask = import("./display/api").PDFDocumentLoadingTask; | ||
export type PDFDocumentProxy = import("./display/api").PDFDocumentProxy; | ||
export type PDFPageProxy = import("./display/api").PDFPageProxy; | ||
export type RenderTask = import("./display/api").RenderTask; | ||
import { addLinkAttributes } from "./display/display_utils.js"; | ||
@@ -8,10 +12,6 @@ import { getFilenameFromUrl } from "./display/display_utils.js"; | ||
import { PDFDateString } from "./display/display_utils.js"; | ||
import { PixelsPerInch } from "./display/display_utils.js"; | ||
import { RenderingCancelledException } from "./display/display_utils.js"; | ||
import { getXfaPageViewport } from "./display/display_utils.js"; | ||
import { build } from "./display/api.js"; | ||
import { getDocument } from "./display/api.js"; | ||
import { LoopbackPort } from "./display/api.js"; | ||
import { PDFDataRangeTransport } from "./display/api.js"; | ||
import { PDFWorker } from "./display/api.js"; | ||
import { version } from "./display/api.js"; | ||
import { AnnotationMode } from "./shared/util.js"; | ||
import { CMapCompressionType } from "./shared/util.js"; | ||
@@ -32,2 +32,8 @@ import { createObjectURL } from "./shared/util.js"; | ||
import { VerbosityLevel } from "./shared/util.js"; | ||
import { build } from "./display/api.js"; | ||
import { getDocument } from "./display/api.js"; | ||
import { LoopbackPort } from "./display/api.js"; | ||
import { PDFDataRangeTransport } from "./display/api.js"; | ||
import { PDFWorker } from "./display/api.js"; | ||
import { version } from "./display/api.js"; | ||
import { AnnotationLayer } from "./display/annotation_layer.js"; | ||
@@ -38,2 +44,2 @@ import { GlobalWorkerOptions } from "./display/worker_options.js"; | ||
import { XfaLayer } from "./display/xfa_layer.js"; | ||
export { addLinkAttributes, getFilenameFromUrl, getPdfFilenameFromUrl, isPdfFile, LinkTarget, loadScript, PDFDateString, RenderingCancelledException, getXfaPageViewport, build, getDocument, LoopbackPort, PDFDataRangeTransport, PDFWorker, version, CMapCompressionType, createObjectURL, createPromiseCapability, createValidAbsoluteUrl, InvalidPDFException, MissingPDFException, OPS, PasswordResponses, PermissionFlag, removeNullCharacters, shadow, UnexpectedResponseException, UNSUPPORTED_FEATURES, Util, VerbosityLevel, AnnotationLayer, GlobalWorkerOptions, renderTextLayer, SVGGraphics, XfaLayer }; | ||
export { addLinkAttributes, getFilenameFromUrl, getPdfFilenameFromUrl, isPdfFile, LinkTarget, loadScript, PDFDateString, PixelsPerInch, RenderingCancelledException, getXfaPageViewport, AnnotationMode, CMapCompressionType, createObjectURL, createPromiseCapability, createValidAbsoluteUrl, InvalidPDFException, MissingPDFException, OPS, PasswordResponses, PermissionFlag, removeNullCharacters, shadow, UnexpectedResponseException, UNSUPPORTED_FEATURES, Util, VerbosityLevel, build, getDocument, LoopbackPort, PDFDataRangeTransport, PDFWorker, version, AnnotationLayer, GlobalWorkerOptions, renderTextLayer, SVGGraphics, XfaLayer }; |
@@ -28,2 +28,3 @@ /** | ||
[x: string]: any; | ||
constructor(msg: any); | ||
} | ||
@@ -91,2 +92,8 @@ export namespace AnnotationActionEventType { | ||
} | ||
export namespace AnnotationMode { | ||
const DISABLE: number; | ||
const ENABLE: number; | ||
const ENABLE_FORMS: number; | ||
const ENABLE_STORAGE: number; | ||
} | ||
export namespace AnnotationReplyType { | ||
@@ -183,6 +190,7 @@ const GROUP: string; | ||
* @param {URL|string} url - An absolute, or relative, URL. | ||
* @param {URL|string} baseUrl - An absolute URL. | ||
* @param {URL|string} [baseUrl] - An absolute URL. | ||
* @param {Object} [options] | ||
* @returns Either a valid {URL}, or `null` otherwise. | ||
*/ | ||
export function createValidAbsoluteUrl(url: URL | string, baseUrl: URL | string): URL | null; | ||
export function createValidAbsoluteUrl(url: URL | string, baseUrl?: string | URL | undefined, options?: Object | undefined): URL | null; | ||
export namespace DocumentActionEventType { | ||
@@ -217,2 +225,3 @@ const WC: string; | ||
[x: string]: any; | ||
constructor(msg: any); | ||
} | ||
@@ -231,2 +240,3 @@ export function getModificationDate(date?: Date): string; | ||
[x: string]: any; | ||
constructor(msg: any); | ||
} | ||
@@ -245,2 +255,3 @@ export function isArrayBuffer(v: any): boolean; | ||
[x: string]: any; | ||
constructor(msg: any); | ||
} | ||
@@ -372,2 +383,12 @@ export function objectFromMap(map: any): any; | ||
export function removeNullCharacters(str: string): string; | ||
export namespace RenderingIntentFlag { | ||
export const ANY: number; | ||
export const DISPLAY: number; | ||
const PRINT_2: number; | ||
export { PRINT_2 as PRINT }; | ||
export const ANNOTATIONS_FORMS: number; | ||
export const ANNOTATIONS_STORAGE: number; | ||
export const ANNOTATIONS_DISABLE: number; | ||
export const OPLIST: number; | ||
} | ||
export function setVerbosityLevel(level: any): void; | ||
@@ -441,2 +462,3 @@ export function shadow(obj: any, prop: any, value: any): any; | ||
const errorMarkedContent: string; | ||
const errorContentSubStream: string; | ||
} | ||
@@ -443,0 +465,0 @@ export function utf8StringToString(str: any): string; |
@@ -0,1 +1,2 @@ | ||
export type IPDFAnnotationLayerFactory = import("./interfaces").IPDFAnnotationLayerFactory; | ||
export type AnnotationLayerBuilderOptions = { | ||
@@ -10,3 +11,3 @@ pageDiv: HTMLDivElement; | ||
imageResourcesPath?: string | undefined; | ||
renderInteractiveForms: boolean; | ||
renderForms: boolean; | ||
linkService: any; | ||
@@ -20,2 +21,5 @@ downloadManager: any; | ||
hasJSActionsPromise?: Promise<boolean> | undefined; | ||
fieldObjectsPromise?: Promise<{ | ||
[x: string]: Object[]; | ||
} | null> | undefined; | ||
mouseState?: Object | undefined; | ||
@@ -30,3 +34,3 @@ }; | ||
* for annotation icons. Include trailing slash. | ||
* @property {boolean} renderInteractiveForms | ||
* @property {boolean} renderForms | ||
* @property {IPDFLinkService} linkService | ||
@@ -37,2 +41,4 @@ * @property {DownloadManager} downloadManager | ||
* @property {Promise<boolean>} [hasJSActionsPromise] | ||
* @property {Promise<Object<string, Array<Object>> | null>} | ||
* [fieldObjectsPromise] | ||
* @property {Object} [mouseState] | ||
@@ -44,3 +50,3 @@ */ | ||
*/ | ||
constructor({ pageDiv, pdfPage, linkService, downloadManager, annotationStorage, imageResourcesPath, renderInteractiveForms, l10n, enableScripting, hasJSActionsPromise, mouseState, }: AnnotationLayerBuilderOptions); | ||
constructor({ pageDiv, pdfPage, linkService, downloadManager, annotationStorage, imageResourcesPath, renderForms, l10n, enableScripting, hasJSActionsPromise, fieldObjectsPromise, mouseState, }: AnnotationLayerBuilderOptions); | ||
pageDiv: HTMLDivElement; | ||
@@ -51,3 +57,3 @@ pdfPage: any; | ||
imageResourcesPath: string; | ||
renderInteractiveForms: boolean; | ||
renderForms: boolean; | ||
l10n: any; | ||
@@ -57,2 +63,5 @@ annotationStorage: any; | ||
_hasJSActionsPromise: Promise<boolean>; | ||
_fieldObjectsPromise: Promise<{ | ||
[x: string]: Object[]; | ||
} | null>; | ||
_mouseState: Object; | ||
@@ -81,3 +90,3 @@ div: HTMLDivElement | null; | ||
* for annotation icons. Include trailing slash. | ||
* @param {boolean} renderInteractiveForms | ||
* @param {boolean} renderForms | ||
* @param {IL10n} l10n | ||
@@ -87,5 +96,9 @@ * @param {boolean} [enableScripting] | ||
* @param {Object} [mouseState] | ||
* @param {Promise<Object<string, Array<Object>> | null>} | ||
* [fieldObjectsPromise] | ||
* @returns {AnnotationLayerBuilder} | ||
*/ | ||
createAnnotationLayerBuilder(pageDiv: HTMLDivElement, pdfPage: any, annotationStorage?: any, imageResourcesPath?: string | undefined, renderInteractiveForms?: boolean, l10n?: any, enableScripting?: boolean | undefined, hasJSActionsPromise?: Promise<boolean> | undefined, mouseState?: Object | undefined): AnnotationLayerBuilder; | ||
createAnnotationLayerBuilder(pageDiv: HTMLDivElement, pdfPage: any, annotationStorage?: any, imageResourcesPath?: string | undefined, renderForms?: boolean, l10n?: any, enableScripting?: boolean | undefined, hasJSActionsPromise?: Promise<boolean> | undefined, mouseState?: Object | undefined, fieldObjectsPromise?: Promise<{ | ||
[x: string]: Object[]; | ||
} | null> | undefined): AnnotationLayerBuilder; | ||
} |
@@ -50,2 +50,10 @@ export type PDFViewerOptions = { | ||
/** | ||
* - Controls if the annotation layer is | ||
* created, and if interactive form elements or `AnnotationStorage`-data are | ||
* being rendered. The constants from {@link AnnotationMode } should be used; | ||
* see also {@link RenderParameters } and {@link GetOperatorListParameters }. | ||
* The default value is `AnnotationMode.ENABLE_FORMS`. | ||
*/ | ||
annotationMode?: number | undefined; | ||
/** | ||
* - Path for image resources, mainly | ||
@@ -56,7 +64,2 @@ * mainly for annotation icons. Include trailing slash. | ||
/** | ||
* - Enables rendering of | ||
* interactive form elements. The default value is `true`. | ||
*/ | ||
renderInteractiveForms?: boolean | undefined; | ||
/** | ||
* - Enables automatic rotation of | ||
@@ -85,13 +88,7 @@ * landscape pages upon printing. The default is `false`. | ||
l10n: any; | ||
/** | ||
* - Enable embedded script execution | ||
* (also requires {scriptingManager} being set). The default value is `false`. | ||
*/ | ||
enableScripting?: boolean | undefined; | ||
}; | ||
/** | ||
* Simple viewer control to display PDF content/pages. | ||
* @implements {IRenderableView} | ||
*/ | ||
export class BaseViewer implements IRenderableView { | ||
export class BaseViewer { | ||
/** | ||
@@ -101,3 +98,2 @@ * @param {PDFViewerOptions} options | ||
constructor(options: PDFViewerOptions); | ||
_name: string; | ||
container: HTMLDivElement; | ||
@@ -111,5 +107,5 @@ viewer: Element | null; | ||
removePageBorders: boolean; | ||
textLayerMode: number | undefined; | ||
textLayerMode: number; | ||
_annotationMode: any; | ||
imageResourcesPath: string; | ||
renderInteractiveForms: boolean; | ||
enablePrintAutoRotate: boolean; | ||
@@ -120,5 +116,5 @@ renderer: string; | ||
l10n: any; | ||
enableScripting: boolean; | ||
defaultRenderingQueue: boolean; | ||
renderingQueue: PDFRenderingQueue | undefined; | ||
_doc: HTMLElement; | ||
scroll: { | ||
@@ -141,2 +137,10 @@ right: boolean; | ||
/** | ||
* @type {boolean} | ||
*/ | ||
get renderForms(): boolean; | ||
/** | ||
* @type {boolean} | ||
*/ | ||
get enableScripting(): boolean; | ||
/** | ||
* @param {number} val - The page number. | ||
@@ -233,4 +237,4 @@ */ | ||
pageDiv: any; | ||
pageSpot?: any; | ||
pageNumber?: any; | ||
pageSpot?: null | undefined; | ||
pageNumber?: null | undefined; | ||
}): void; | ||
@@ -357,6 +361,13 @@ _setScaleUpdatePages(newScale: any, newValue: any, noScroll?: boolean, preset?: boolean): void; | ||
* @param {EventBus} eventBus | ||
* @param {TextHighlighter} highlighter | ||
* @returns {TextLayerBuilder} | ||
*/ | ||
createTextLayerBuilder(textLayerDiv: HTMLDivElement, pageIndex: number, viewport: any, enhanceTextSelection: boolean | undefined, eventBus: any): TextLayerBuilder; | ||
createTextLayerBuilder(textLayerDiv: HTMLDivElement, pageIndex: number, viewport: any, enhanceTextSelection: boolean | undefined, eventBus: any, highlighter: TextHighlighter): TextLayerBuilder; | ||
/** | ||
* @param {number} pageIndex | ||
* @param {EventBus} eventBus | ||
* @returns {TextHighlighter} | ||
*/ | ||
createTextHighlighter(pageIndex: number, eventBus: any): TextHighlighter; | ||
/** | ||
* @param {HTMLDivElement} pageDiv | ||
@@ -368,3 +379,3 @@ * @param {PDFPage} pdfPage | ||
* for annotation icons. Include trailing slash. | ||
* @param {boolean} renderInteractiveForms | ||
* @param {boolean} renderForms | ||
* @param {IL10n} l10n | ||
@@ -374,5 +385,9 @@ * @param {boolean} [enableScripting] | ||
* @param {Object} [mouseState] | ||
* @param {Promise<Object<string, Array<Object>> | null>} | ||
* [fieldObjectsPromise] | ||
* @returns {AnnotationLayerBuilder} | ||
*/ | ||
createAnnotationLayerBuilder(pageDiv: HTMLDivElement, pdfPage: any, annotationStorage?: any, imageResourcesPath?: string | undefined, renderInteractiveForms?: boolean, l10n?: any, enableScripting?: boolean | undefined, hasJSActionsPromise?: Promise<boolean> | undefined, mouseState?: Object | undefined): AnnotationLayerBuilder; | ||
createAnnotationLayerBuilder(pageDiv: HTMLDivElement, pdfPage: any, annotationStorage?: any, imageResourcesPath?: string | undefined, renderForms?: boolean, l10n?: any, enableScripting?: boolean | undefined, hasJSActionsPromise?: Promise<boolean> | undefined, mouseState?: Object | undefined, fieldObjectsPromise?: Promise<{ | ||
[x: string]: Object[]; | ||
} | null> | undefined): AnnotationLayerBuilder; | ||
/** | ||
@@ -420,3 +435,3 @@ * @param {HTMLDivElement} pageDiv | ||
get scrollMode(): number; | ||
_updateScrollMode(pageNumber?: any): void; | ||
_updateScrollMode(pageNumber?: null): void; | ||
/** | ||
@@ -432,3 +447,3 @@ * @param {number} mode - Group the pages in spreads, starting with odd- or | ||
get spreadMode(): number; | ||
_updateSpreadMode(pageNumber?: any): void; | ||
_updateSpreadMode(pageNumber?: null): void; | ||
/** | ||
@@ -448,2 +463,12 @@ * @private | ||
previousPage(): boolean; | ||
/** | ||
* Increase the current zoom level one, or more, times. | ||
* @param {number} [steps] - Defaults to zooming once. | ||
*/ | ||
increaseScale(steps?: number | undefined): void; | ||
/** | ||
* Decrease the current zoom level one, or more, times. | ||
* @param {number} [steps] - Defaults to zooming once. | ||
*/ | ||
decreaseScale(steps?: number | undefined): void; | ||
} | ||
@@ -470,6 +495,9 @@ import { PDFRenderingQueue } from "./pdf_rendering_queue.js"; | ||
* The default value is `TextLayerMode.ENABLE`. | ||
* @property {number} [annotationMode] - Controls if the annotation layer is | ||
* created, and if interactive form elements or `AnnotationStorage`-data are | ||
* being rendered. The constants from {@link AnnotationMode} should be used; | ||
* see also {@link RenderParameters} and {@link GetOperatorListParameters}. | ||
* The default value is `AnnotationMode.ENABLE_FORMS`. | ||
* @property {string} [imageResourcesPath] - Path for image resources, mainly | ||
* mainly for annotation icons. Include trailing slash. | ||
* @property {boolean} [renderInteractiveForms] - Enables rendering of | ||
* interactive form elements. The default value is `true`. | ||
* @property {boolean} [enablePrintAutoRotate] - Enables automatic rotation of | ||
@@ -484,4 +512,2 @@ * landscape pages upon printing. The default is `false`. | ||
* @property {IL10n} l10n - Localization service. | ||
* @property {boolean} [enableScripting] - Enable embedded script execution | ||
* (also requires {scriptingManager} being set). The default value is `false`. | ||
*/ | ||
@@ -509,6 +535,9 @@ declare function PDFPageViewBuffer(size: any): void; | ||
* The default value is `TextLayerMode.ENABLE`. | ||
* @property {number} [annotationMode] - Controls if the annotation layer is | ||
* created, and if interactive form elements or `AnnotationStorage`-data are | ||
* being rendered. The constants from {@link AnnotationMode} should be used; | ||
* see also {@link RenderParameters} and {@link GetOperatorListParameters}. | ||
* The default value is `AnnotationMode.ENABLE_FORMS`. | ||
* @property {string} [imageResourcesPath] - Path for image resources, mainly | ||
* mainly for annotation icons. Include trailing slash. | ||
* @property {boolean} [renderInteractiveForms] - Enables rendering of | ||
* interactive form elements. The default value is `true`. | ||
* @property {boolean} [enablePrintAutoRotate] - Enables automatic rotation of | ||
@@ -523,4 +552,2 @@ * landscape pages upon printing. The default is `false`. | ||
* @property {IL10n} l10n - Localization service. | ||
* @property {boolean} [enableScripting] - Enable embedded script execution | ||
* (also requires {scriptingManager} being set). The default value is `false`. | ||
*/ | ||
@@ -539,2 +566,3 @@ constructor(size: any); | ||
} | ||
import { TextHighlighter } from "./text_highlighter.js"; | ||
import { TextLayerBuilder } from "./text_layer_builder.js"; | ||
@@ -541,0 +569,0 @@ import { AnnotationLayerBuilder } from "./annotation_layer_builder.js"; |
@@ -7,4 +7,4 @@ export class GenericL10n { | ||
getDirection(): Promise<any>; | ||
get(key: any, args?: any, fallback?: any): Promise<any>; | ||
get(key: any, args?: null, fallback?: any): Promise<any>; | ||
translate(element: any): Promise<any>; | ||
} |
@@ -8,6 +8,6 @@ export function fixupLangCode(langCode: any): any; | ||
function getDirection(): Promise<string>; | ||
function get(key: any, args?: any, fallback?: any): Promise<any>; | ||
function get(key: any, args?: any, fallback?: any): Promise<any>; | ||
function get(key: any, args?: null, fallback?: any): Promise<any>; | ||
function get(key: any, args?: null, fallback?: any): Promise<any>; | ||
function translate(element: any): Promise<void>; | ||
function translate(element: any): Promise<void>; | ||
} |
@@ -54,3 +54,3 @@ export type PDFFindControllerOptions = { | ||
scrollMatchIntoView({ element, selectedLeft, pageIndex, matchIndex, }: { | ||
element?: any; | ||
element?: null | undefined; | ||
selectedLeft?: number | undefined; | ||
@@ -57,0 +57,0 @@ pageIndex?: number | undefined; |
@@ -0,1 +1,2 @@ | ||
export type IPDFLinkService = import("./interfaces").IPDFLinkService; | ||
export type PDFLinkServiceOptions = { | ||
@@ -56,3 +57,3 @@ /** | ||
_pagesRefCache: any; | ||
setDocument(pdfDocument: any, baseUrl?: any): void; | ||
setDocument(pdfDocument: any, baseUrl?: null): void; | ||
setViewer(pdfViewer: any): void; | ||
@@ -97,2 +98,9 @@ setHistory(pdfHistory: any): void; | ||
/** | ||
* Wrapper around the `addLinkAttributes`-function in the API. | ||
* @param {HTMLAnchorElement} link | ||
* @param {string} url | ||
* @param {boolean} [newWindow] | ||
*/ | ||
addLinkAttributes(link: HTMLAnchorElement, url: string, newWindow?: boolean | undefined): void; | ||
/** | ||
* @param {string|Array} dest - The PDF destination object. | ||
@@ -139,6 +147,3 @@ * @returns {string} The hyperlink to the PDF object. | ||
export class SimpleLinkService implements IPDFLinkService { | ||
externalLinkTarget: any; | ||
externalLinkRel: any; | ||
externalLinkEnabled: boolean; | ||
_ignoreDestinationZoom: boolean; | ||
/** | ||
@@ -173,2 +178,8 @@ * @type {number} | ||
/** | ||
* @param {HTMLAnchorElement} link | ||
* @param {string} url | ||
* @param {boolean} [newWindow] | ||
*/ | ||
addLinkAttributes(link: HTMLAnchorElement, url: string, newWindow?: boolean | undefined): void; | ||
/** | ||
* @param dest - The PDF destination object. | ||
@@ -175,0 +186,0 @@ * @returns {string} The hyperlink to the PDF object. |
@@ -0,1 +1,2 @@ | ||
export type IRenderableView = import("./interfaces").IRenderableView; | ||
export type PDFPageViewOptions = { | ||
@@ -40,5 +41,14 @@ /** | ||
textLayerMode?: number | undefined; | ||
/** | ||
* - Controls if the annotation layer is | ||
* created, and if interactive form elements or `AnnotationStorage`-data are | ||
* being rendered. The constants from {@link AnnotationMode } should be used; | ||
* see also {@link RenderParameters } and {@link GetOperatorListParameters }. | ||
* The default value is `AnnotationMode.ENABLE_FORMS`. | ||
*/ | ||
annotationMode?: number | undefined; | ||
annotationLayerFactory: any; | ||
xfaLayerFactory: any; | ||
structTreeLayerFactory: any; | ||
textHighlighterFactory?: Object | undefined; | ||
/** | ||
@@ -50,7 +60,2 @@ * - Path for image resources, mainly | ||
/** | ||
* - Turns on rendering of | ||
* interactive form elements. The default value is `true`. | ||
*/ | ||
renderInteractiveForms: boolean; | ||
/** | ||
* - 'canvas' or 'svg'. The default is 'canvas'. | ||
@@ -93,5 +98,5 @@ */ | ||
hasRestrictedScaling: boolean; | ||
textLayerMode: number | undefined; | ||
textLayerMode: number; | ||
_annotationMode: any; | ||
imageResourcesPath: string; | ||
renderInteractiveForms: boolean; | ||
useOnlyCssZoom: boolean; | ||
@@ -104,2 +109,3 @@ maxCanvasPixels: any; | ||
xfaLayerFactory: any; | ||
textHighlighter: any; | ||
structTreeLayerFactory: any; | ||
@@ -117,5 +123,6 @@ renderer: string; | ||
_renderError: any; | ||
_isStandalone: boolean; | ||
annotationLayer: any; | ||
textLayer: any; | ||
zoomLayer: (Node & ParentNode) | null; | ||
zoomLayer: ParentNode | null; | ||
xfaLayer: any; | ||
@@ -134,2 +141,3 @@ structTreeLayer: any; | ||
private _renderXfaLayer; | ||
_buildXfaTextContentItems(textDivs: any): Promise<void>; | ||
/** | ||
@@ -145,3 +153,7 @@ * @private | ||
loadingIconDiv: HTMLDivElement | undefined; | ||
update(scale: any, rotation: any, optionalContentConfigPromise?: any): void; | ||
update({ scale, rotation, optionalContentConfigPromise }: { | ||
scale?: number | undefined; | ||
rotation?: null | undefined; | ||
optionalContentConfigPromise?: null | undefined; | ||
}, ...args: any[]): void; | ||
/** | ||
@@ -148,0 +160,0 @@ * PLEASE NOTE: Most likely you want to use the `this.reset()` method, |
@@ -9,3 +9,4 @@ /** | ||
highestPriorityPage: any; | ||
idleTimeout: NodeJS.Timeout | null; | ||
/** @type {number} */ | ||
idleTimeout: number; | ||
printing: boolean; | ||
@@ -27,2 +28,6 @@ isThumbnailViewEnabled: boolean; | ||
/** | ||
* @returns {boolean} | ||
*/ | ||
hasViewer(): boolean; | ||
/** | ||
* @param {Object} currentlyVisiblePages | ||
@@ -35,4 +40,5 @@ */ | ||
* @param {boolean} scrolledDown | ||
* @param {boolean} [preRenderExtra] | ||
*/ | ||
getHighestPriority(visible: Object, views: any[], scrolledDown: boolean): any; | ||
getHighestPriority(visible: Object, views: any[], scrolledDown: boolean, preRenderExtra?: boolean | undefined): any; | ||
/** | ||
@@ -39,0 +45,0 @@ * @param {IRenderableView} view |
import { AnnotationLayerBuilder } from "./annotation_layer_builder.js"; | ||
import { DefaultAnnotationLayerFactory } from "./annotation_layer_builder.js"; | ||
import { DefaultStructTreeLayerFactory } from "./struct_tree_layer_builder.js"; | ||
import { DefaultTextLayerFactory } from "./text_layer_builder.js"; | ||
import { DefaultXfaLayerFactory } from "./xfa_layer_builder.js"; | ||
import { DownloadManager } from "./download_manager.js"; | ||
@@ -17,3 +19,5 @@ import { EventBus } from "./ui_utils.js"; | ||
import { SimpleLinkService } from "./pdf_link_service.js"; | ||
import { StructTreeLayerBuilder } from "./struct_tree_layer_builder.js"; | ||
import { TextLayerBuilder } from "./text_layer_builder.js"; | ||
export { AnnotationLayerBuilder, DefaultAnnotationLayerFactory, DefaultTextLayerFactory, DownloadManager, EventBus, GenericL10n, NullL10n, PDFFindController, PDFHistory, PDFLinkService, PDFPageView, PDFScriptingManager, PDFSinglePageViewer, PDFViewer, ProgressBar, SimpleLinkService, TextLayerBuilder }; | ||
import { XfaLayerBuilder } from "./xfa_layer_builder.js"; | ||
export { AnnotationLayerBuilder, DefaultAnnotationLayerFactory, DefaultStructTreeLayerFactory, DefaultTextLayerFactory, DefaultXfaLayerFactory, DownloadManager, EventBus, GenericL10n, NullL10n, PDFFindController, PDFHistory, PDFLinkService, PDFPageView, PDFScriptingManager, PDFSinglePageViewer, PDFViewer, ProgressBar, SimpleLinkService, StructTreeLayerBuilder, TextLayerBuilder, XfaLayerBuilder }; |
@@ -0,1 +1,2 @@ | ||
export type IPDFStructTreeLayerFactory = import("./interfaces").IPDFStructTreeLayerFactory; | ||
export type StructTreeLayerBuilderOptions = { | ||
@@ -2,0 +3,0 @@ pdfPage: any; |
@@ -0,1 +1,2 @@ | ||
export type IPDFTextLayerFactory = import("./interfaces").IPDFTextLayerFactory; | ||
export type TextLayerBuilderOptions = { | ||
@@ -18,4 +19,8 @@ /** | ||
viewport: any; | ||
findController: any; | ||
/** | ||
* - Optional object that will handle | ||
* highlighting text from the find controller. | ||
*/ | ||
highlighter: any; | ||
/** | ||
* - Option to turn on improved | ||
@@ -36,5 +41,6 @@ * text selection. | ||
* @param {EventBus} eventBus | ||
* @param {TextHighlighter} highlighter | ||
* @returns {TextLayerBuilder} | ||
*/ | ||
createTextLayerBuilder(textLayerDiv: HTMLDivElement, pageIndex: number, viewport: any, enhanceTextSelection: boolean | undefined, eventBus: any): TextLayerBuilder; | ||
createTextLayerBuilder(textLayerDiv: HTMLDivElement, pageIndex: number, viewport: any, enhanceTextSelection: boolean | undefined, eventBus: any, highlighter: any): TextLayerBuilder; | ||
} | ||
@@ -47,3 +53,4 @@ /** | ||
* @property {PageViewport} viewport - The viewport of the text layer. | ||
* @property {PDFFindController} findController | ||
* @property {TextHighlighter} highlighter - Optional object that will handle | ||
* highlighting text from the find controller. | ||
* @property {boolean} enhanceTextSelection - Option to turn on improved | ||
@@ -55,7 +62,6 @@ * text selection. | ||
* It does this by creating overlay divs over the PDF's text. These divs | ||
* contain text that matches the PDF text they are overlaying. This object | ||
* also provides a way to highlight text that is being searched for. | ||
* contain text that matches the PDF text they are overlaying. | ||
*/ | ||
export class TextLayerBuilder { | ||
constructor({ textLayerDiv, eventBus, pageIndex, viewport, findController, enhanceTextSelection, }: { | ||
constructor({ textLayerDiv, eventBus, pageIndex, viewport, highlighter, enhanceTextSelection, }: { | ||
textLayerDiv: any; | ||
@@ -65,3 +71,3 @@ eventBus: any; | ||
viewport: any; | ||
findController?: any; | ||
highlighter?: null | undefined; | ||
enhanceTextSelection?: boolean | undefined; | ||
@@ -75,11 +81,8 @@ }); | ||
renderingDone: boolean; | ||
pageIdx: any; | ||
pageNumber: any; | ||
matches: any[]; | ||
viewport: any; | ||
textDivs: any[]; | ||
findController: any; | ||
textLayerRenderTask: any; | ||
highlighter: any; | ||
enhanceTextSelection: boolean; | ||
_onUpdateTextLayerMatches: ((evt: any) => void) | null; | ||
/** | ||
@@ -102,10 +105,2 @@ * @private | ||
setTextContent(textContent: any): void; | ||
_convertMatches(matches: any, matchesLength: any): { | ||
begin: { | ||
divIdx: number; | ||
offset: number; | ||
}; | ||
}[]; | ||
_renderMatches(matches: any): void; | ||
_updateMatches(): void; | ||
/** | ||
@@ -112,0 +107,0 @@ * Improves text selection by adding an additional div where the mouse was |
@@ -0,1 +1,16 @@ | ||
export type GetPageSizeInchesParameters = { | ||
view: number[]; | ||
userUnit: number; | ||
rotate: number; | ||
}; | ||
export type PageSize = { | ||
/** | ||
* - In inches. | ||
*/ | ||
width: number; | ||
/** | ||
* - In inches. | ||
*/ | ||
height: number; | ||
}; | ||
export type GetVisibleElementsParameters = { | ||
@@ -75,2 +90,7 @@ /** | ||
export function approximateFraction(x: number): any[]; | ||
/** | ||
* NOTE: Only used to support various PDF viewer tests in `mozilla-central`. | ||
*/ | ||
export class AutomationEventBus extends EventBus { | ||
} | ||
export const AutoPrintRegExp: RegExp; | ||
@@ -99,4 +119,4 @@ /** | ||
export function binarySearchFirstItem(items: any, condition: any): number; | ||
export const CSS_UNITS: number; | ||
export const DEFAULT_SCALE: 1; | ||
export const DEFAULT_SCALE_DELTA: 1.1; | ||
export const DEFAULT_SCALE_VALUE: "auto"; | ||
@@ -108,5 +128,3 @@ /** | ||
export class EventBus { | ||
constructor(options: any); | ||
_listeners: any; | ||
_isInAutomation: boolean | undefined; | ||
/** | ||
@@ -124,11 +142,15 @@ * @param {string} eventName | ||
off(eventName: string, listener: Function, options?: Object | undefined): void; | ||
dispatch(eventName: any, ...args: any[]): void; | ||
/** | ||
* @param {string} eventName | ||
* @param {Object} data | ||
*/ | ||
dispatch(eventName: string, data: Object): void; | ||
/** | ||
* @ignore | ||
*/ | ||
_on(eventName: any, listener: any, options?: any): void; | ||
_on(eventName: any, listener: any, options?: null): void; | ||
/** | ||
* @ignore | ||
*/ | ||
_off(eventName: any, listener: any, options?: any): void; | ||
_off(eventName: any, listener: any, options?: null): void; | ||
} | ||
@@ -152,9 +174,18 @@ /** | ||
/** | ||
* @typedef {Object} GetPageSizeInchesParameters | ||
* @property {number[]} view | ||
* @property {number} userUnit | ||
* @property {number} rotate | ||
*/ | ||
/** | ||
* @typedef {Object} PageSize | ||
* @property {number} width - In inches. | ||
* @property {number} height - In inches. | ||
*/ | ||
/** | ||
* Gets the size of the specified page, converted from PDF units to inches. | ||
* @param {Object} An Object containing the properties: {Array} `view`, | ||
* {number} `userUnit`, and {number} `rotate`. | ||
* @returns {Object} An Object containing the properties: {number} `width` | ||
* and {number} `height`, given in inches. | ||
* @param {GetPageSizeInchesParameters} params | ||
* @returns {PageSize} | ||
*/ | ||
export function getPageSizeInches({ view, userUnit, rotate }: Object): Object; | ||
export function getPageSizeInches({ view, userUnit, rotate }: GetPageSizeInchesParameters): PageSize; | ||
/** | ||
@@ -214,5 +245,7 @@ * @typedef {Object} GetVisibleElementsParameters | ||
/** | ||
* Helper function to parse query string (e.g. ?param1=value&parm2=...). | ||
* Helper function to parse query string (e.g. ?param1=value¶m2=...). | ||
* @param {string} | ||
* @returns {Map} | ||
*/ | ||
export function parseQueryString(query: any): any; | ||
export function parseQueryString(query: any): Map<any, any>; | ||
export namespace PresentationModeState { | ||
@@ -232,3 +265,3 @@ const UNKNOWN: number; | ||
div: Element | null; | ||
bar: (Node & ParentNode) | null; | ||
bar: ParentNode | null; | ||
height: any; | ||
@@ -235,0 +268,0 @@ width: any; |
@@ -0,1 +1,2 @@ | ||
export type IPDFXfaLayerFactory = import("./interfaces").IPDFXfaLayerFactory; | ||
export type XfaLayerBuilderOptions = { | ||
@@ -5,2 +6,4 @@ pageDiv: HTMLDivElement; | ||
annotationStorage?: any; | ||
linkService: any; | ||
xfaHtml?: Object | undefined; | ||
}; | ||
@@ -24,2 +27,4 @@ /** | ||
* @property {AnnotationStorage} [annotationStorage] | ||
* @property {IPDFLinkService} linkService | ||
* @property {Object} [xfaHtml] | ||
*/ | ||
@@ -30,7 +35,8 @@ export class XfaLayerBuilder { | ||
*/ | ||
constructor({ pageDiv, pdfPage, xfaHtml, annotationStorage }: XfaLayerBuilderOptions); | ||
constructor({ pageDiv, pdfPage, annotationStorage, linkService, xfaHtml }: XfaLayerBuilderOptions); | ||
pageDiv: HTMLDivElement; | ||
pdfPage: any; | ||
xfaHtml: any; | ||
annotationStorage: any; | ||
linkService: any; | ||
xfaHtml: Object | undefined; | ||
div: HTMLDivElement | null; | ||
@@ -41,8 +47,9 @@ _cancelled: boolean; | ||
* @param {string} intent (default value is 'display') | ||
* @returns {Promise<void>} A promise that is resolved when rendering of the | ||
* annotations is complete. | ||
* @returns {Promise<Object | void>} A promise that is resolved when rendering | ||
* of the XFA layer is complete. The first rendering will return an object | ||
* with a `textDivs` property that can be used with the TextHighlighter. | ||
*/ | ||
render(viewport: any, intent?: string): Promise<void>; | ||
render(viewport: any, intent?: string): Promise<Object | void>; | ||
cancel(): void; | ||
hide(): void; | ||
} |
@@ -1,1 +0,1 @@ | ||
export * from "pdfjs-dist/types/web/pdf_viewer.component.d.ts"; | ||
export * from "../types/web/pdf_viewer.component"; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
35124515
530
323792