diff options
Diffstat (limited to 'vendor/pdfjs/web')
117 files changed, 12378 insertions, 10554 deletions
diff --git a/vendor/pdfjs/web/compatibility.js b/vendor/pdfjs/web/compatibility.js deleted file mode 100644 index 1119a27..0000000 --- a/vendor/pdfjs/web/compatibility.js +++ /dev/null @@ -1,593 +0,0 @@ -/* Copyright 2012 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* globals VBArray, PDFJS */ - -'use strict'; - -// Initializing PDFJS global object here, it case if we need to change/disable -// some PDF.js features, e.g. range requests -if (typeof PDFJS === 'undefined') { - (typeof window !== 'undefined' ? window : this).PDFJS = {}; -} - -// Checking if the typed arrays are supported -// Support: iOS<6.0 (subarray), IE<10, Android<4.0 -(function checkTypedArrayCompatibility() { - if (typeof Uint8Array !== 'undefined') { - // Support: iOS<6.0 - if (typeof Uint8Array.prototype.subarray === 'undefined') { - Uint8Array.prototype.subarray = function subarray(start, end) { - return new Uint8Array(this.slice(start, end)); - }; - Float32Array.prototype.subarray = function subarray(start, end) { - return new Float32Array(this.slice(start, end)); - }; - } - - // Support: Android<4.1 - if (typeof Float64Array === 'undefined') { - window.Float64Array = Float32Array; - } - return; - } - - function subarray(start, end) { - return new TypedArray(this.slice(start, end)); - } - - function setArrayOffset(array, offset) { - if (arguments.length < 2) { - offset = 0; - } - for (var i = 0, n = array.length; i < n; ++i, ++offset) { - this[offset] = array[i] & 0xFF; - } - } - - function TypedArray(arg1) { - var result, i, n; - if (typeof arg1 === 'number') { - result = []; - for (i = 0; i < arg1; ++i) { - result[i] = 0; - } - } else if ('slice' in arg1) { - result = arg1.slice(0); - } else { - result = []; - for (i = 0, n = arg1.length; i < n; ++i) { - result[i] = arg1[i]; - } - } - - result.subarray = subarray; - result.buffer = result; - result.byteLength = result.length; - result.set = setArrayOffset; - - if (typeof arg1 === 'object' && arg1.buffer) { - result.buffer = arg1.buffer; - } - return result; - } - - window.Uint8Array = TypedArray; - window.Int8Array = TypedArray; - - // we don't need support for set, byteLength for 32-bit array - // so we can use the TypedArray as well - window.Uint32Array = TypedArray; - window.Int32Array = TypedArray; - window.Uint16Array = TypedArray; - window.Float32Array = TypedArray; - window.Float64Array = TypedArray; -})(); - -// URL = URL || webkitURL -// Support: Safari<7, Android 4.2+ -(function normalizeURLObject() { - if (!window.URL) { - window.URL = window.webkitURL; - } -})(); - -// Object.defineProperty()? -// Support: Android<4.0, Safari<5.1 -(function checkObjectDefinePropertyCompatibility() { - if (typeof Object.defineProperty !== 'undefined') { - var definePropertyPossible = true; - try { - // some browsers (e.g. safari) cannot use defineProperty() on DOM objects - // and thus the native version is not sufficient - Object.defineProperty(new Image(), 'id', { value: 'test' }); - // ... another test for android gb browser for non-DOM objects - var Test = function Test() {}; - Test.prototype = { get id() { } }; - Object.defineProperty(new Test(), 'id', - { value: '', configurable: true, enumerable: true, writable: false }); - } catch (e) { - definePropertyPossible = false; - } - if (definePropertyPossible) { - return; - } - } - - Object.defineProperty = function objectDefineProperty(obj, name, def) { - delete obj[name]; - if ('get' in def) { - obj.__defineGetter__(name, def['get']); - } - if ('set' in def) { - obj.__defineSetter__(name, def['set']); - } - if ('value' in def) { - obj.__defineSetter__(name, function objectDefinePropertySetter(value) { - this.__defineGetter__(name, function objectDefinePropertyGetter() { - return value; - }); - return value; - }); - obj[name] = def.value; - } - }; -})(); - - -// No XMLHttpRequest#response? -// Support: IE<11, Android <4.0 -(function checkXMLHttpRequestResponseCompatibility() { - var xhrPrototype = XMLHttpRequest.prototype; - var xhr = new XMLHttpRequest(); - if (!('overrideMimeType' in xhr)) { - // IE10 might have response, but not overrideMimeType - // Support: IE10 - Object.defineProperty(xhrPrototype, 'overrideMimeType', { - value: function xmlHttpRequestOverrideMimeType(mimeType) {} - }); - } - if ('responseType' in xhr) { - return; - } - - // The worker will be using XHR, so we can save time and disable worker. - PDFJS.disableWorker = true; - - Object.defineProperty(xhrPrototype, 'responseType', { - get: function xmlHttpRequestGetResponseType() { - return this._responseType || 'text'; - }, - set: function xmlHttpRequestSetResponseType(value) { - if (value === 'text' || value === 'arraybuffer') { - this._responseType = value; - if (value === 'arraybuffer' && - typeof this.overrideMimeType === 'function') { - this.overrideMimeType('text/plain; charset=x-user-defined'); - } - } - } - }); - - // Support: IE9 - if (typeof VBArray !== 'undefined') { - Object.defineProperty(xhrPrototype, 'response', { - get: function xmlHttpRequestResponseGet() { - if (this.responseType === 'arraybuffer') { - return new Uint8Array(new VBArray(this.responseBody).toArray()); - } else { - return this.responseText; - } - } - }); - return; - } - - Object.defineProperty(xhrPrototype, 'response', { - get: function xmlHttpRequestResponseGet() { - if (this.responseType !== 'arraybuffer') { - return this.responseText; - } - var text = this.responseText; - var i, n = text.length; - var result = new Uint8Array(n); - for (i = 0; i < n; ++i) { - result[i] = text.charCodeAt(i) & 0xFF; - } - return result.buffer; - } - }); -})(); - -// window.btoa (base64 encode function) ? -// Support: IE<10 -(function checkWindowBtoaCompatibility() { - if ('btoa' in window) { - return; - } - - var digits = - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; - - window.btoa = function windowBtoa(chars) { - var buffer = ''; - var i, n; - for (i = 0, n = chars.length; i < n; i += 3) { - var b1 = chars.charCodeAt(i) & 0xFF; - var b2 = chars.charCodeAt(i + 1) & 0xFF; - var b3 = chars.charCodeAt(i + 2) & 0xFF; - var d1 = b1 >> 2, d2 = ((b1 & 3) << 4) | (b2 >> 4); - var d3 = i + 1 < n ? ((b2 & 0xF) << 2) | (b3 >> 6) : 64; - var d4 = i + 2 < n ? (b3 & 0x3F) : 64; - buffer += (digits.charAt(d1) + digits.charAt(d2) + - digits.charAt(d3) + digits.charAt(d4)); - } - return buffer; - }; -})(); - -// window.atob (base64 encode function)? -// Support: IE<10 -(function checkWindowAtobCompatibility() { - if ('atob' in window) { - return; - } - - // https://github.com/davidchambers/Base64.js - var digits = - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; - window.atob = function (input) { - input = input.replace(/=+$/, ''); - if (input.length % 4 === 1) { - throw new Error('bad atob input'); - } - for ( - // initialize result and counters - var bc = 0, bs, buffer, idx = 0, output = ''; - // get next character - buffer = input.charAt(idx++); - // character found in table? - // initialize bit storage and add its ascii value - ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer, - // and if not first of each 4 characters, - // convert the first 8 bits to one ascii character - bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0 - ) { - // try to find character in table (0-63, not found => -1) - buffer = digits.indexOf(buffer); - } - return output; - }; -})(); - -// Function.prototype.bind? -// Support: Android<4.0, iOS<6.0 -(function checkFunctionPrototypeBindCompatibility() { - if (typeof Function.prototype.bind !== 'undefined') { - return; - } - - Function.prototype.bind = function functionPrototypeBind(obj) { - var fn = this, headArgs = Array.prototype.slice.call(arguments, 1); - var bound = function functionPrototypeBindBound() { - var args = headArgs.concat(Array.prototype.slice.call(arguments)); - return fn.apply(obj, args); - }; - return bound; - }; -})(); - -// HTMLElement dataset property -// Support: IE<11, Safari<5.1, Android<4.0 -(function checkDatasetProperty() { - var div = document.createElement('div'); - if ('dataset' in div) { - return; // dataset property exists - } - - Object.defineProperty(HTMLElement.prototype, 'dataset', { - get: function() { - if (this._dataset) { - return this._dataset; - } - - var dataset = {}; - for (var j = 0, jj = this.attributes.length; j < jj; j++) { - var attribute = this.attributes[j]; - if (attribute.name.substring(0, 5) !== 'data-') { - continue; - } - var key = attribute.name.substring(5).replace(/\-([a-z])/g, - function(all, ch) { - return ch.toUpperCase(); - }); - dataset[key] = attribute.value; - } - - Object.defineProperty(this, '_dataset', { - value: dataset, - writable: false, - enumerable: false - }); - return dataset; - }, - enumerable: true - }); -})(); - -// HTMLElement classList property -// Support: IE<10, Android<4.0, iOS<5.0 -(function checkClassListProperty() { - var div = document.createElement('div'); - if ('classList' in div) { - return; // classList property exists - } - - function changeList(element, itemName, add, remove) { - var s = element.className || ''; - var list = s.split(/\s+/g); - if (list[0] === '') { - list.shift(); - } - var index = list.indexOf(itemName); - if (index < 0 && add) { - list.push(itemName); - } - if (index >= 0 && remove) { - list.splice(index, 1); - } - element.className = list.join(' '); - return (index >= 0); - } - - var classListPrototype = { - add: function(name) { - changeList(this.element, name, true, false); - }, - contains: function(name) { - return changeList(this.element, name, false, false); - }, - remove: function(name) { - changeList(this.element, name, false, true); - }, - toggle: function(name) { - changeList(this.element, name, true, true); - } - }; - - Object.defineProperty(HTMLElement.prototype, 'classList', { - get: function() { - if (this._classList) { - return this._classList; - } - - var classList = Object.create(classListPrototype, { - element: { - value: this, - writable: false, - enumerable: true - } - }); - Object.defineProperty(this, '_classList', { - value: classList, - writable: false, - enumerable: false - }); - return classList; - }, - enumerable: true - }); -})(); - -// Check console compatibility -// In older IE versions the console object is not available -// unless console is open. -// Support: IE<10 -(function checkConsoleCompatibility() { - if (!('console' in window)) { - window.console = { - log: function() {}, - error: function() {}, - warn: function() {} - }; - } else if (!('bind' in console.log)) { - // native functions in IE9 might not have bind - console.log = (function(fn) { - return function(msg) { return fn(msg); }; - })(console.log); - console.error = (function(fn) { - return function(msg) { return fn(msg); }; - })(console.error); - console.warn = (function(fn) { - return function(msg) { return fn(msg); }; - })(console.warn); - } -})(); - -// Check onclick compatibility in Opera -// Support: Opera<15 -(function checkOnClickCompatibility() { - // workaround for reported Opera bug DSK-354448: - // onclick fires on disabled buttons with opaque content - function ignoreIfTargetDisabled(event) { - if (isDisabled(event.target)) { - event.stopPropagation(); - } - } - function isDisabled(node) { - return node.disabled || (node.parentNode && isDisabled(node.parentNode)); - } - if (navigator.userAgent.indexOf('Opera') !== -1) { - // use browser detection since we cannot feature-check this bug - document.addEventListener('click', ignoreIfTargetDisabled, true); - } -})(); - -// Checks if possible to use URL.createObjectURL() -// Support: IE -(function checkOnBlobSupport() { - // sometimes IE loosing the data created with createObjectURL(), see #3977 - if (navigator.userAgent.indexOf('Trident') >= 0) { - PDFJS.disableCreateObjectURL = true; - } -})(); - -// Checks if navigator.language is supported -(function checkNavigatorLanguage() { - if ('language' in navigator) { - return; - } - PDFJS.locale = navigator.userLanguage || 'en-US'; -})(); - -(function checkRangeRequests() { - // Safari has issues with cached range requests see: - // https://github.com/mozilla/pdf.js/issues/3260 - // Last tested with version 6.0.4. - // Support: Safari 6.0+ - var isSafari = Object.prototype.toString.call( - window.HTMLElement).indexOf('Constructor') > 0; - - // Older versions of Android (pre 3.0) has issues with range requests, see: - // https://github.com/mozilla/pdf.js/issues/3381. - // Make sure that we only match webkit-based Android browsers, - // since Firefox/Fennec works as expected. - // Support: Android<3.0 - var regex = /Android\s[0-2][^\d]/; - var isOldAndroid = regex.test(navigator.userAgent); - - // Range requests are broken in Chrome 39 and 40, https://crbug.com/442318 - var isChromeWithRangeBug = /Chrome\/(39|40)\./.test(navigator.userAgent); - - if (isSafari || isOldAndroid || isChromeWithRangeBug) { - PDFJS.disableRange = true; - PDFJS.disableStream = true; - } -})(); - -// Check if the browser supports manipulation of the history. -// Support: IE<10, Android<4.2 -(function checkHistoryManipulation() { - // Android 2.x has so buggy pushState support that it was removed in - // Android 3.0 and restored as late as in Android 4.2. - // Support: Android 2.x - if (!history.pushState || navigator.userAgent.indexOf('Android 2.') >= 0) { - PDFJS.disableHistory = true; - } -})(); - -// Support: IE<11, Chrome<21, Android<4.4, Safari<6 -(function checkSetPresenceInImageData() { - // IE < 11 will use window.CanvasPixelArray which lacks set function. - if (window.CanvasPixelArray) { - if (typeof window.CanvasPixelArray.prototype.set !== 'function') { - window.CanvasPixelArray.prototype.set = function(arr) { - for (var i = 0, ii = this.length; i < ii; i++) { - this[i] = arr[i]; - } - }; - } - } else { - // Old Chrome and Android use an inaccessible CanvasPixelArray prototype. - // Because we cannot feature detect it, we rely on user agent parsing. - var polyfill = false, versionMatch; - if (navigator.userAgent.indexOf('Chrom') >= 0) { - versionMatch = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./); - // Chrome < 21 lacks the set function. - polyfill = versionMatch && parseInt(versionMatch[2]) < 21; - } else if (navigator.userAgent.indexOf('Android') >= 0) { - // Android < 4.4 lacks the set function. - // Android >= 4.4 will contain Chrome in the user agent, - // thus pass the Chrome check above and not reach this block. - polyfill = /Android\s[0-4][^\d]/g.test(navigator.userAgent); - } else if (navigator.userAgent.indexOf('Safari') >= 0) { - versionMatch = navigator.userAgent. - match(/Version\/([0-9]+)\.([0-9]+)\.([0-9]+) Safari\//); - // Safari < 6 lacks the set function. - polyfill = versionMatch && parseInt(versionMatch[1]) < 6; - } - - if (polyfill) { - var contextPrototype = window.CanvasRenderingContext2D.prototype; - var createImageData = contextPrototype.createImageData; - contextPrototype.createImageData = function(w, h) { - var imageData = createImageData.call(this, w, h); - imageData.data.set = function(arr) { - for (var i = 0, ii = this.length; i < ii; i++) { - this[i] = arr[i]; - } - }; - return imageData; - }; - // this closure will be kept referenced, so clear its vars - contextPrototype = null; - } - } -})(); - -// Support: IE<10, Android<4.0, iOS -(function checkRequestAnimationFrame() { - function fakeRequestAnimationFrame(callback) { - window.setTimeout(callback, 20); - } - - var isIOS = /(iPad|iPhone|iPod)/g.test(navigator.userAgent); - if (isIOS) { - // requestAnimationFrame on iOS is broken, replacing with fake one. - window.requestAnimationFrame = fakeRequestAnimationFrame; - return; - } - if ('requestAnimationFrame' in window) { - return; - } - window.requestAnimationFrame = - window.mozRequestAnimationFrame || - window.webkitRequestAnimationFrame || - fakeRequestAnimationFrame; -})(); - -(function checkCanvasSizeLimitation() { - var isIOS = /(iPad|iPhone|iPod)/g.test(navigator.userAgent); - var isAndroid = /Android/g.test(navigator.userAgent); - if (isIOS || isAndroid) { - // 5MP - PDFJS.maxCanvasPixels = 5242880; - } -})(); - -// Disable fullscreen support for certain problematic configurations. -// Support: IE11+ (when embedded). -(function checkFullscreenSupport() { - var isEmbeddedIE = (navigator.userAgent.indexOf('Trident') >= 0 && - window.parent !== window); - if (isEmbeddedIE) { - PDFJS.disableFullscreen = true; - } -})(); - -// Provides document.currentScript support -// Support: IE, Chrome<29. -(function checkCurrentScript() { - if ('currentScript' in document) { - return; - } - Object.defineProperty(document, 'currentScript', { - get: function () { - var scripts = document.getElementsByTagName('script'); - return scripts[scripts.length - 1]; - }, - enumerable: true, - configurable: true - }); -})(); diff --git a/vendor/pdfjs/web/debugger.js b/vendor/pdfjs/web/debugger.js index 9c35b63..925c32f 100644 --- a/vendor/pdfjs/web/debugger.js +++ b/vendor/pdfjs/web/debugger.js @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* globals PDFJS */ 'use strict'; @@ -65,7 +64,7 @@ var FontInspector = (function FontInspectorClosure() { name: 'Font Inspector', panel: null, manager: null, - init: function init() { + init: function init(pdfjsLib) { var panel = this.panel; panel.setAttribute('style', 'padding: 5px;'); var tmp = document.createElement('button'); @@ -120,7 +119,7 @@ var FontInspector = (function FontInspectorClosure() { download.href = url[1]; } else if (fontObj.data) { url = URL.createObjectURL(new Blob([fontObj.data], { - type: fontObj.mimeType + type: fontObj.mimeType, })); download.href = url; } @@ -150,29 +149,31 @@ var FontInspector = (function FontInspectorClosure() { fonts.appendChild(font); // Somewhat of a hack, should probably add a hook for when the text layer // is done rendering. - setTimeout(function() { + setTimeout(() => { if (this.active) { resetSelection(); } - }.bind(this), 2000); - } + }, 2000); + }, }; })(); +var opMap; + // Manages all the page steppers. var StepperManager = (function StepperManagerClosure() { var steppers = []; var stepperDiv = null; var stepperControls = null; var stepperChooser = null; - var breakPoints = {}; + var breakPoints = Object.create(null); return { // Properties/functions needed by PDFBug. id: 'Stepper', name: 'Stepper', panel: null, manager: null, - init: function init() { + init: function init(pdfjsLib) { var self = this; this.panel.setAttribute('style', 'padding: 5px;'); stepperControls = document.createElement('div'); @@ -187,6 +188,11 @@ var StepperManager = (function StepperManagerClosure() { if (sessionStorage.getItem('pdfjsBreakPoints')) { breakPoints = JSON.parse(sessionStorage.getItem('pdfjsBreakPoints')); } + + opMap = Object.create(null); + for (var key in pdfjsLib.OPS) { + opMap[pdfjsLib.OPS[key]] = key; + } }, cleanup: function cleanup() { stepperChooser.textContent = ''; @@ -237,7 +243,7 @@ var StepperManager = (function StepperManagerClosure() { saveBreakPoints: function saveBreakPoints(pageIndex, bps) { breakPoints[pageIndex] = bps; sessionStorage.setItem('pdfjsBreakPoints', JSON.stringify(breakPoints)); - } + }, }; })(); @@ -252,8 +258,6 @@ var Stepper = (function StepperClosure() { return d; } - var opMap = null; - function simplifyArgs(args) { if (typeof args === 'string') { var MAX_STRING_LENGTH = 75; @@ -291,7 +295,7 @@ var Stepper = (function StepperClosure() { this.operatorListIdx = 0; } Stepper.prototype = { - init: function init() { + init: function init(operatorList) { var panel = this.panel; var content = c('div', 'c=continue, s=step'); var table = c('table'); @@ -305,12 +309,7 @@ var Stepper = (function StepperClosure() { headerRow.appendChild(c('th', 'args')); panel.appendChild(content); this.table = table; - if (!opMap) { - opMap = Object.create(null); - for (var key in PDFJS.OPS) { - opMap[PDFJS.OPS[key]] = key; - } - } + this.updateOperatorList(operatorList); }, updateOperatorList: function updateOperatorList(operatorList) { var self = this; @@ -388,7 +387,9 @@ var Stepper = (function StepperClosure() { this.table.appendChild(chunk); }, getNextBreakPoint: function getNextBreakPoint() { - this.breakPoints.sort(function(a, b) { return a - b; }); + this.breakPoints.sort(function(a, b) { + return a - b; + }); for (var i = 0; i < this.breakPoints.length; i++) { if (this.breakPoints[i] > this.currentIdx) { return this.breakPoints[i]; @@ -404,13 +405,13 @@ var Stepper = (function StepperClosure() { var listener = function(e) { switch (e.keyCode) { case 83: // step - dom.removeEventListener('keydown', listener, false); + dom.removeEventListener('keydown', listener); self.nextBreakPoint = self.currentIdx + 1; self.goTo(-1); callback(); break; case 67: // continue - dom.removeEventListener('keydown', listener, false); + dom.removeEventListener('keydown', listener); var breakPoint = self.getNextBreakPoint(); self.nextBreakPoint = breakPoint; self.goTo(-1); @@ -418,7 +419,7 @@ var Stepper = (function StepperClosure() { break; } }; - dom.addEventListener('keydown', listener, false); + dom.addEventListener('keydown', listener); self.goTo(idx); }, goTo: function goTo(idx) { @@ -432,7 +433,7 @@ var Stepper = (function StepperClosure() { row.style.backgroundColor = null; } } - } + }, }; return Stepper; })(); @@ -458,14 +459,14 @@ var Stats = (function Stats() { name: 'Stats', panel: null, manager: null, - init: function init() { + init(pdfjsLib) { this.panel.setAttribute('style', 'padding: 5px;'); - PDFJS.enableStats = true; + pdfjsLib.PDFJS.enableStats = true; }, enabled: false, active: false, // Stats specific functions. - add: function(pageNumber, stat) { + add(pageNumber, stat) { if (!stat) { return; } @@ -484,22 +485,24 @@ var Stats = (function Stats() { statsDiv.textContent = stat.toString(); wrapper.appendChild(title); wrapper.appendChild(statsDiv); - stats.push({ pageNumber: pageNumber, div: wrapper }); - stats.sort(function(a, b) { return a.pageNumber - b.pageNumber; }); + stats.push({ pageNumber, div: wrapper, }); + stats.sort(function(a, b) { + return a.pageNumber - b.pageNumber; + }); clear(this.panel); for (var i = 0, ii = stats.length; i < ii; ++i) { this.panel.appendChild(stats[i].div); } }, - cleanup: function () { + cleanup() { stats = []; clear(this.panel); - } + }, }; })(); // Manages all the debugging tools. -var PDFBug = (function PDFBugClosure() { +window.PDFBug = (function PDFBugClosure() { var panelWidth = 300; var buttons = []; var activePanel = null; @@ -510,7 +513,7 @@ var PDFBug = (function PDFBugClosure() { StepperManager, Stats ], - enable: function(ids) { + enable(ids) { var all = false, tools = this.tools; if (ids.length === 1 && ids[0] === 'all') { all = true; @@ -532,7 +535,7 @@ var PDFBug = (function PDFBugClosure() { }); } }, - init: function init() { + init(pdfjsLib, container) { /* * Basic Layout: * PDFBug @@ -553,7 +556,6 @@ var PDFBug = (function PDFBugClosure() { panels.setAttribute('class', 'panels'); ui.appendChild(panels); - var container = document.getElementById('viewerContainer'); container.appendChild(ui); container.style.right = panelWidth + 'px'; @@ -576,24 +578,24 @@ var PDFBug = (function PDFBugClosure() { tool.panel = panel; tool.manager = this; if (tool.enabled) { - tool.init(); + tool.init(pdfjsLib); } else { panel.textContent = tool.name + ' is disabled. To enable add ' + ' "' + tool.id + '" to the pdfBug parameter ' + - 'and refresh (seperate multiple by commas).'; + 'and refresh (separate multiple by commas).'; } buttons.push(panelButton); } this.selectPanel(0); }, - cleanup: function cleanup() { + cleanup() { for (var i = 0, ii = this.tools.length; i < ii; i++) { if (this.tools[i].enabled) { this.tools[i].cleanup(); } } }, - selectPanel: function selectPanel(index) { + selectPanel(index) { if (typeof index !== 'number') { index = this.tools.indexOf(index); } @@ -613,6 +615,6 @@ var PDFBug = (function PDFBugClosure() { tools[j].panel.setAttribute('hidden', 'true'); } } - } + }, }; })(); diff --git a/vendor/pdfjs/web/images/secondaryToolbarButton-selectTool.png b/vendor/pdfjs/web/images/secondaryToolbarButton-selectTool.png Binary files differnew file mode 100644 index 0000000..25520a6 --- /dev/null +++ b/vendor/pdfjs/web/images/secondaryToolbarButton-selectTool.png diff --git a/vendor/pdfjs/web/images/secondaryToolbarButton-selectTool@2x.png b/vendor/pdfjs/web/images/secondaryToolbarButton-selectTool@2x.png Binary files differnew file mode 100644 index 0000000..a58aaef --- /dev/null +++ b/vendor/pdfjs/web/images/secondaryToolbarButton-selectTool@2x.png diff --git a/vendor/pdfjs/web/images/texture.png b/vendor/pdfjs/web/images/texture.png Binary files differindex eb5ccb5..12bae83 100644 --- a/vendor/pdfjs/web/images/texture.png +++ b/vendor/pdfjs/web/images/texture.png diff --git a/vendor/pdfjs/web/images/toolbarButton-menuArrows.png b/vendor/pdfjs/web/images/toolbarButton-menuArrows.png Binary files differindex 306eb43..e50ca4e 100644 --- a/vendor/pdfjs/web/images/toolbarButton-menuArrows.png +++ b/vendor/pdfjs/web/images/toolbarButton-menuArrows.png diff --git a/vendor/pdfjs/web/images/toolbarButton-viewAttachments@2x.png b/vendor/pdfjs/web/images/toolbarButton-viewAttachments@2x.png Binary files differindex b979e52..4a5e2b8 100644 --- a/vendor/pdfjs/web/images/toolbarButton-viewAttachments@2x.png +++ b/vendor/pdfjs/web/images/toolbarButton-viewAttachments@2x.png diff --git a/vendor/pdfjs/web/images/toolbarButton-viewThumbnail@2x.png b/vendor/pdfjs/web/images/toolbarButton-viewThumbnail@2x.png Binary files differindex fb7db93..a0208b4 100644 --- a/vendor/pdfjs/web/images/toolbarButton-viewThumbnail@2x.png +++ b/vendor/pdfjs/web/images/toolbarButton-viewThumbnail@2x.png diff --git a/vendor/pdfjs/web/images/treeitem-collapsed-rtl.png b/vendor/pdfjs/web/images/treeitem-collapsed-rtl.png Binary files differindex 1c8b9f7..0496b35 100644 --- a/vendor/pdfjs/web/images/treeitem-collapsed-rtl.png +++ b/vendor/pdfjs/web/images/treeitem-collapsed-rtl.png diff --git a/vendor/pdfjs/web/images/treeitem-collapsed-rtl@2x.png b/vendor/pdfjs/web/images/treeitem-collapsed-rtl@2x.png Binary files differindex 8427936..6ad9ebc 100644 --- a/vendor/pdfjs/web/images/treeitem-collapsed-rtl@2x.png +++ b/vendor/pdfjs/web/images/treeitem-collapsed-rtl@2x.png diff --git a/vendor/pdfjs/web/l10n.js b/vendor/pdfjs/web/l10n.js deleted file mode 100644 index 3d5ecff..0000000 --- a/vendor/pdfjs/web/l10n.js +++ /dev/null @@ -1,1033 +0,0 @@ -/** - * Copyright (c) 2011-2013 Fabien Cazenave, Mozilla. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ -/* - Additional modifications for PDF.js project: - - Disables language initialization on page loading; - - Removes consoleWarn and consoleLog and use console.log/warn directly. - - Removes window._ assignment. - - Remove compatibility code for OldIE. -*/ - -/*jshint browser: true, devel: true, es5: true, globalstrict: true */ -'use strict'; - -document.webL10n = (function(window, document, undefined) { - var gL10nData = {}; - var gTextData = ''; - var gTextProp = 'textContent'; - var gLanguage = ''; - var gMacros = {}; - var gReadyState = 'loading'; - - - /** - * Synchronously loading l10n resources significantly minimizes flickering - * from displaying the app with non-localized strings and then updating the - * strings. Although this will block all script execution on this page, we - * expect that the l10n resources are available locally on flash-storage. - * - * As synchronous XHR is generally considered as a bad idea, we're still - * loading l10n resources asynchronously -- but we keep this in a setting, - * just in case... and applications using this library should hide their - * content until the `localized' event happens. - */ - - var gAsyncResourceLoading = true; // read-only - - - /** - * DOM helpers for the so-called "HTML API". - * - * These functions are written for modern browsers. For old versions of IE, - * they're overridden in the 'startup' section at the end of this file. - */ - - function getL10nResourceLinks() { - return document.querySelectorAll('link[type="application/l10n"]'); - } - - function getL10nDictionary() { - var script = document.querySelector('script[type="application/l10n"]'); - // TODO: support multiple and external JSON dictionaries - return script ? JSON.parse(script.innerHTML) : null; - } - - function getTranslatableChildren(element) { - return element ? element.querySelectorAll('*[data-l10n-id]') : []; - } - - function getL10nAttributes(element) { - if (!element) - return {}; - - var l10nId = element.getAttribute('data-l10n-id'); - var l10nArgs = element.getAttribute('data-l10n-args'); - var args = {}; - if (l10nArgs) { - try { - args = JSON.parse(l10nArgs); - } catch (e) { - console.warn('could not parse arguments for #' + l10nId); - } - } - return { id: l10nId, args: args }; - } - - function fireL10nReadyEvent(lang) { - var evtObject = document.createEvent('Event'); - evtObject.initEvent('localized', true, false); - evtObject.language = lang; - document.dispatchEvent(evtObject); - } - - function xhrLoadText(url, onSuccess, onFailure) { - onSuccess = onSuccess || function _onSuccess(data) {}; - onFailure = onFailure || function _onFailure() { - console.warn(url + ' not found.'); - }; - - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, gAsyncResourceLoading); - if (xhr.overrideMimeType) { - xhr.overrideMimeType('text/plain; charset=utf-8'); - } - xhr.onreadystatechange = function() { - if (xhr.readyState == 4) { - if (xhr.status == 200 || xhr.status === 0) { - onSuccess(xhr.responseText); - } else { - onFailure(); - } - } - }; - xhr.onerror = onFailure; - xhr.ontimeout = onFailure; - - // in Firefox OS with the app:// protocol, trying to XHR a non-existing - // URL will raise an exception here -- hence this ugly try...catch. - try { - xhr.send(null); - } catch (e) { - onFailure(); - } - } - - - /** - * l10n resource parser: - * - reads (async XHR) the l10n resource matching `lang'; - * - imports linked resources (synchronously) when specified; - * - parses the text data (fills `gL10nData' and `gTextData'); - * - triggers success/failure callbacks when done. - * - * @param {string} href - * URL of the l10n resource to parse. - * - * @param {string} lang - * locale (language) to parse. Must be a lowercase string. - * - * @param {Function} successCallback - * triggered when the l10n resource has been successully parsed. - * - * @param {Function} failureCallback - * triggered when the an error has occured. - * - * @return {void} - * uses the following global variables: gL10nData, gTextData, gTextProp. - */ - - function parseResource(href, lang, successCallback, failureCallback) { - var baseURL = href.replace(/[^\/]*$/, '') || './'; - - // handle escaped characters (backslashes) in a string - function evalString(text) { - if (text.lastIndexOf('\\') < 0) - return text; - return text.replace(/\\\\/g, '\\') - .replace(/\\n/g, '\n') - .replace(/\\r/g, '\r') - .replace(/\\t/g, '\t') - .replace(/\\b/g, '\b') - .replace(/\\f/g, '\f') - .replace(/\\{/g, '{') - .replace(/\\}/g, '}') - .replace(/\\"/g, '"') - .replace(/\\'/g, "'"); - } - - // parse *.properties text data into an l10n dictionary - // If gAsyncResourceLoading is false, then the callback will be called - // synchronously. Otherwise it is called asynchronously. - function parseProperties(text, parsedPropertiesCallback) { - var dictionary = {}; - - // token expressions - var reBlank = /^\s*|\s*$/; - var reComment = /^\s*#|^\s*$/; - var reSection = /^\s*\[(.*)\]\s*$/; - var reImport = /^\s*@import\s+url\((.*)\)\s*$/i; - var reSplit = /^([^=\s]*)\s*=\s*(.+)$/; // TODO: escape EOLs with '\' - - // parse the *.properties file into an associative array - function parseRawLines(rawText, extendedSyntax, parsedRawLinesCallback) { - var entries = rawText.replace(reBlank, '').split(/[\r\n]+/); - var currentLang = '*'; - var genericLang = lang.split('-', 1)[0]; - var skipLang = false; - var match = ''; - - function nextEntry() { - // Use infinite loop instead of recursion to avoid reaching the - // maximum recursion limit for content with many lines. - while (true) { - if (!entries.length) { - parsedRawLinesCallback(); - return; - } - var line = entries.shift(); - - // comment or blank line? - if (reComment.test(line)) - continue; - - // the extended syntax supports [lang] sections and @import rules - if (extendedSyntax) { - match = reSection.exec(line); - if (match) { // section start? - // RFC 4646, section 4.4, "All comparisons MUST be performed - // in a case-insensitive manner." - - currentLang = match[1].toLowerCase(); - skipLang = (currentLang !== '*') && - (currentLang !== lang) && (currentLang !== genericLang); - continue; - } else if (skipLang) { - continue; - } - match = reImport.exec(line); - if (match) { // @import rule? - loadImport(baseURL + match[1], nextEntry); - return; - } - } - - // key-value pair - var tmp = line.match(reSplit); - if (tmp && tmp.length == 3) { - dictionary[tmp[1]] = evalString(tmp[2]); - } - } - } - nextEntry(); - } - - // import another *.properties file - function loadImport(url, callback) { - xhrLoadText(url, function(content) { - parseRawLines(content, false, callback); // don't allow recursive imports - }, null); - } - - // fill the dictionary - parseRawLines(text, true, function() { - parsedPropertiesCallback(dictionary); - }); - } - - // load and parse l10n data (warning: global variables are used here) - xhrLoadText(href, function(response) { - gTextData += response; // mostly for debug - - // parse *.properties text data into an l10n dictionary - parseProperties(response, function(data) { - - // find attribute descriptions, if any - for (var key in data) { - var id, prop, index = key.lastIndexOf('.'); - if (index > 0) { // an attribute has been specified - id = key.substring(0, index); - prop = key.substr(index + 1); - } else { // no attribute: assuming text content by default - id = key; - prop = gTextProp; - } - if (!gL10nData[id]) { - gL10nData[id] = {}; - } - gL10nData[id][prop] = data[key]; - } - - // trigger callback - if (successCallback) { - successCallback(); - } - }); - }, failureCallback); - } - - // load and parse all resources for the specified locale - function loadLocale(lang, callback) { - // RFC 4646, section 2.1 states that language tags have to be treated as - // case-insensitive. Convert to lowercase for case-insensitive comparisons. - if (lang) { - lang = lang.toLowerCase(); - } - - callback = callback || function _callback() {}; - - clear(); - gLanguage = lang; - - // check all <link type="application/l10n" href="..." /> nodes - // and load the resource files - var langLinks = getL10nResourceLinks(); - var langCount = langLinks.length; - if (langCount === 0) { - // we might have a pre-compiled dictionary instead - var dict = getL10nDictionary(); - if (dict && dict.locales && dict.default_locale) { - console.log('using the embedded JSON directory, early way out'); - gL10nData = dict.locales[lang]; - if (!gL10nData) { - var defaultLocale = dict.default_locale.toLowerCase(); - for (var anyCaseLang in dict.locales) { - anyCaseLang = anyCaseLang.toLowerCase(); - if (anyCaseLang === lang) { - gL10nData = dict.locales[lang]; - break; - } else if (anyCaseLang === defaultLocale) { - gL10nData = dict.locales[defaultLocale]; - } - } - } - callback(); - } else { - console.log('no resource to load, early way out'); - } - // early way out - fireL10nReadyEvent(lang); - gReadyState = 'complete'; - return; - } - - // start the callback when all resources are loaded - var onResourceLoaded = null; - var gResourceCount = 0; - onResourceLoaded = function() { - gResourceCount++; - if (gResourceCount >= langCount) { - callback(); - fireL10nReadyEvent(lang); - gReadyState = 'complete'; - } - }; - - // load all resource files - function L10nResourceLink(link) { - var href = link.href; - // Note: If |gAsyncResourceLoading| is false, then the following callbacks - // are synchronously called. - this.load = function(lang, callback) { - parseResource(href, lang, callback, function() { - console.warn(href + ' not found.'); - // lang not found, used default resource instead - console.warn('"' + lang + '" resource not found'); - gLanguage = ''; - // Resource not loaded, but we still need to call the callback. - callback(); - }); - }; - } - - for (var i = 0; i < langCount; i++) { - var resource = new L10nResourceLink(langLinks[i]); - resource.load(lang, onResourceLoaded); - } - } - - // clear all l10n data - function clear() { - gL10nData = {}; - gTextData = ''; - gLanguage = ''; - // TODO: clear all non predefined macros. - // There's no such macro /yet/ but we're planning to have some... - } - - - /** - * Get rules for plural forms (shared with JetPack), see: - * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html - * https://github.com/mozilla/addon-sdk/blob/master/python-lib/plural-rules-generator.p - * - * @param {string} lang - * locale (language) used. - * - * @return {Function} - * returns a function that gives the plural form name for a given integer: - * var fun = getPluralRules('en'); - * fun(1) -> 'one' - * fun(0) -> 'other' - * fun(1000) -> 'other'. - */ - - function getPluralRules(lang) { - var locales2rules = { - 'af': 3, - 'ak': 4, - 'am': 4, - 'ar': 1, - 'asa': 3, - 'az': 0, - 'be': 11, - 'bem': 3, - 'bez': 3, - 'bg': 3, - 'bh': 4, - 'bm': 0, - 'bn': 3, - 'bo': 0, - 'br': 20, - 'brx': 3, - 'bs': 11, - 'ca': 3, - 'cgg': 3, - 'chr': 3, - 'cs': 12, - 'cy': 17, - 'da': 3, - 'de': 3, - 'dv': 3, - 'dz': 0, - 'ee': 3, - 'el': 3, - 'en': 3, - 'eo': 3, - 'es': 3, - 'et': 3, - 'eu': 3, - 'fa': 0, - 'ff': 5, - 'fi': 3, - 'fil': 4, - 'fo': 3, - 'fr': 5, - 'fur': 3, - 'fy': 3, - 'ga': 8, - 'gd': 24, - 'gl': 3, - 'gsw': 3, - 'gu': 3, - 'guw': 4, - 'gv': 23, - 'ha': 3, - 'haw': 3, - 'he': 2, - 'hi': 4, - 'hr': 11, - 'hu': 0, - 'id': 0, - 'ig': 0, - 'ii': 0, - 'is': 3, - 'it': 3, - 'iu': 7, - 'ja': 0, - 'jmc': 3, - 'jv': 0, - 'ka': 0, - 'kab': 5, - 'kaj': 3, - 'kcg': 3, - 'kde': 0, - 'kea': 0, - 'kk': 3, - 'kl': 3, - 'km': 0, - 'kn': 0, - 'ko': 0, - 'ksb': 3, - 'ksh': 21, - 'ku': 3, - 'kw': 7, - 'lag': 18, - 'lb': 3, - 'lg': 3, - 'ln': 4, - 'lo': 0, - 'lt': 10, - 'lv': 6, - 'mas': 3, - 'mg': 4, - 'mk': 16, - 'ml': 3, - 'mn': 3, - 'mo': 9, - 'mr': 3, - 'ms': 0, - 'mt': 15, - 'my': 0, - 'nah': 3, - 'naq': 7, - 'nb': 3, - 'nd': 3, - 'ne': 3, - 'nl': 3, - 'nn': 3, - 'no': 3, - 'nr': 3, - 'nso': 4, - 'ny': 3, - 'nyn': 3, - 'om': 3, - 'or': 3, - 'pa': 3, - 'pap': 3, - 'pl': 13, - 'ps': 3, - 'pt': 3, - 'rm': 3, - 'ro': 9, - 'rof': 3, - 'ru': 11, - 'rwk': 3, - 'sah': 0, - 'saq': 3, - 'se': 7, - 'seh': 3, - 'ses': 0, - 'sg': 0, - 'sh': 11, - 'shi': 19, - 'sk': 12, - 'sl': 14, - 'sma': 7, - 'smi': 7, - 'smj': 7, - 'smn': 7, - 'sms': 7, - 'sn': 3, - 'so': 3, - 'sq': 3, - 'sr': 11, - 'ss': 3, - 'ssy': 3, - 'st': 3, - 'sv': 3, - 'sw': 3, - 'syr': 3, - 'ta': 3, - 'te': 3, - 'teo': 3, - 'th': 0, - 'ti': 4, - 'tig': 3, - 'tk': 3, - 'tl': 4, - 'tn': 3, - 'to': 0, - 'tr': 0, - 'ts': 3, - 'tzm': 22, - 'uk': 11, - 'ur': 3, - 've': 3, - 'vi': 0, - 'vun': 3, - 'wa': 4, - 'wae': 3, - 'wo': 0, - 'xh': 3, - 'xog': 3, - 'yo': 0, - 'zh': 0, - 'zu': 3 - }; - - // utility functions for plural rules methods - function isIn(n, list) { - return list.indexOf(n) !== -1; - } - function isBetween(n, start, end) { - return start <= n && n <= end; - } - - // list of all plural rules methods: - // map an integer to the plural form name to use - var pluralRules = { - '0': function(n) { - return 'other'; - }, - '1': function(n) { - if ((isBetween((n % 100), 3, 10))) - return 'few'; - if (n === 0) - return 'zero'; - if ((isBetween((n % 100), 11, 99))) - return 'many'; - if (n == 2) - return 'two'; - if (n == 1) - return 'one'; - return 'other'; - }, - '2': function(n) { - if (n !== 0 && (n % 10) === 0) - return 'many'; - if (n == 2) - return 'two'; - if (n == 1) - return 'one'; - return 'other'; - }, - '3': function(n) { - if (n == 1) - return 'one'; - return 'other'; - }, - '4': function(n) { - if ((isBetween(n, 0, 1))) - return 'one'; - return 'other'; - }, - '5': function(n) { - if ((isBetween(n, 0, 2)) && n != 2) - return 'one'; - return 'other'; - }, - '6': function(n) { - if (n === 0) - return 'zero'; - if ((n % 10) == 1 && (n % 100) != 11) - return 'one'; - return 'other'; - }, - '7': function(n) { - if (n == 2) - return 'two'; - if (n == 1) - return 'one'; - return 'other'; - }, - '8': function(n) { - if ((isBetween(n, 3, 6))) - return 'few'; - if ((isBetween(n, 7, 10))) - return 'many'; - if (n == 2) - return 'two'; - if (n == 1) - return 'one'; - return 'other'; - }, - '9': function(n) { - if (n === 0 || n != 1 && (isBetween((n % 100), 1, 19))) - return 'few'; - if (n == 1) - return 'one'; - return 'other'; - }, - '10': function(n) { - if ((isBetween((n % 10), 2, 9)) && !(isBetween((n % 100), 11, 19))) - return 'few'; - if ((n % 10) == 1 && !(isBetween((n % 100), 11, 19))) - return 'one'; - return 'other'; - }, - '11': function(n) { - if ((isBetween((n % 10), 2, 4)) && !(isBetween((n % 100), 12, 14))) - return 'few'; - if ((n % 10) === 0 || - (isBetween((n % 10), 5, 9)) || - (isBetween((n % 100), 11, 14))) - return 'many'; - if ((n % 10) == 1 && (n % 100) != 11) - return 'one'; - return 'other'; - }, - '12': function(n) { - if ((isBetween(n, 2, 4))) - return 'few'; - if (n == 1) - return 'one'; - return 'other'; - }, - '13': function(n) { - if ((isBetween((n % 10), 2, 4)) && !(isBetween((n % 100), 12, 14))) - return 'few'; - if (n != 1 && (isBetween((n % 10), 0, 1)) || - (isBetween((n % 10), 5, 9)) || - (isBetween((n % 100), 12, 14))) - return 'many'; - if (n == 1) - return 'one'; - return 'other'; - }, - '14': function(n) { - if ((isBetween((n % 100), 3, 4))) - return 'few'; - if ((n % 100) == 2) - return 'two'; - if ((n % 100) == 1) - return 'one'; - return 'other'; - }, - '15': function(n) { - if (n === 0 || (isBetween((n % 100), 2, 10))) - return 'few'; - if ((isBetween((n % 100), 11, 19))) - return 'many'; - if (n == 1) - return 'one'; - return 'other'; - }, - '16': function(n) { - if ((n % 10) == 1 && n != 11) - return 'one'; - return 'other'; - }, - '17': function(n) { - if (n == 3) - return 'few'; - if (n === 0) - return 'zero'; - if (n == 6) - return 'many'; - if (n == 2) - return 'two'; - if (n == 1) - return 'one'; - return 'other'; - }, - '18': function(n) { - if (n === 0) - return 'zero'; - if ((isBetween(n, 0, 2)) && n !== 0 && n != 2) - return 'one'; - return 'other'; - }, - '19': function(n) { - if ((isBetween(n, 2, 10))) - return 'few'; - if ((isBetween(n, 0, 1))) - return 'one'; - return 'other'; - }, - '20': function(n) { - if ((isBetween((n % 10), 3, 4) || ((n % 10) == 9)) && !( - isBetween((n % 100), 10, 19) || - isBetween((n % 100), 70, 79) || - isBetween((n % 100), 90, 99) - )) - return 'few'; - if ((n % 1000000) === 0 && n !== 0) - return 'many'; - if ((n % 10) == 2 && !isIn((n % 100), [12, 72, 92])) - return 'two'; - if ((n % 10) == 1 && !isIn((n % 100), [11, 71, 91])) - return 'one'; - return 'other'; - }, - '21': function(n) { - if (n === 0) - return 'zero'; - if (n == 1) - return 'one'; - return 'other'; - }, - '22': function(n) { - if ((isBetween(n, 0, 1)) || (isBetween(n, 11, 99))) - return 'one'; - return 'other'; - }, - '23': function(n) { - if ((isBetween((n % 10), 1, 2)) || (n % 20) === 0) - return 'one'; - return 'other'; - }, - '24': function(n) { - if ((isBetween(n, 3, 10) || isBetween(n, 13, 19))) - return 'few'; - if (isIn(n, [2, 12])) - return 'two'; - if (isIn(n, [1, 11])) - return 'one'; - return 'other'; - } - }; - - // return a function that gives the plural form name for a given integer - var index = locales2rules[lang.replace(/-.*$/, '')]; - if (!(index in pluralRules)) { - console.warn('plural form unknown for [' + lang + ']'); - return function() { return 'other'; }; - } - return pluralRules[index]; - } - - // pre-defined 'plural' macro - gMacros.plural = function(str, param, key, prop) { - var n = parseFloat(param); - if (isNaN(n)) - return str; - - // TODO: support other properties (l20n still doesn't...) - if (prop != gTextProp) - return str; - - // initialize _pluralRules - if (!gMacros._pluralRules) { - gMacros._pluralRules = getPluralRules(gLanguage); - } - var index = '[' + gMacros._pluralRules(n) + ']'; - - // try to find a [zero|one|two] key if it's defined - if (n === 0 && (key + '[zero]') in gL10nData) { - str = gL10nData[key + '[zero]'][prop]; - } else if (n == 1 && (key + '[one]') in gL10nData) { - str = gL10nData[key + '[one]'][prop]; - } else if (n == 2 && (key + '[two]') in gL10nData) { - str = gL10nData[key + '[two]'][prop]; - } else if ((key + index) in gL10nData) { - str = gL10nData[key + index][prop]; - } else if ((key + '[other]') in gL10nData) { - str = gL10nData[key + '[other]'][prop]; - } - - return str; - }; - - - /** - * l10n dictionary functions - */ - - // fetch an l10n object, warn if not found, apply `args' if possible - function getL10nData(key, args, fallback) { - var data = gL10nData[key]; - if (!data) { - console.warn('#' + key + ' is undefined.'); - if (!fallback) { - return null; - } - data = fallback; - } - - /** This is where l10n expressions should be processed. - * The plan is to support C-style expressions from the l20n project; - * until then, only two kinds of simple expressions are supported: - * {[ index ]} and {{ arguments }}. - */ - var rv = {}; - for (var prop in data) { - var str = data[prop]; - str = substIndexes(str, args, key, prop); - str = substArguments(str, args, key); - rv[prop] = str; - } - return rv; - } - - // replace {[macros]} with their values - function substIndexes(str, args, key, prop) { - var reIndex = /\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/; - var reMatch = reIndex.exec(str); - if (!reMatch || !reMatch.length) - return str; - - // an index/macro has been found - // Note: at the moment, only one parameter is supported - var macroName = reMatch[1]; - var paramName = reMatch[2]; - var param; - if (args && paramName in args) { - param = args[paramName]; - } else if (paramName in gL10nData) { - param = gL10nData[paramName]; - } - - // there's no macro parser yet: it has to be defined in gMacros - if (macroName in gMacros) { - var macro = gMacros[macroName]; - str = macro(str, param, key, prop); - } - return str; - } - - // replace {{arguments}} with their values - function substArguments(str, args, key) { - var reArgs = /\{\{\s*(.+?)\s*\}\}/g; - return str.replace(reArgs, function(matched_text, arg) { - if (args && arg in args) { - return args[arg]; - } - if (arg in gL10nData) { - return gL10nData[arg]; - } - console.log('argument {{' + arg + '}} for #' + key + ' is undefined.'); - return matched_text; - }); - } - - // translate an HTML element - function translateElement(element) { - var l10n = getL10nAttributes(element); - if (!l10n.id) - return; - - // get the related l10n object - var data = getL10nData(l10n.id, l10n.args); - if (!data) { - console.warn('#' + l10n.id + ' is undefined.'); - return; - } - - // translate element (TODO: security checks?) - if (data[gTextProp]) { // XXX - if (getChildElementCount(element) === 0) { - element[gTextProp] = data[gTextProp]; - } else { - // this element has element children: replace the content of the first - // (non-empty) child textNode and clear other child textNodes - var children = element.childNodes; - var found = false; - for (var i = 0, l = children.length; i < l; i++) { - if (children[i].nodeType === 3 && /\S/.test(children[i].nodeValue)) { - if (found) { - children[i].nodeValue = ''; - } else { - children[i].nodeValue = data[gTextProp]; - found = true; - } - } - } - // if no (non-empty) textNode is found, insert a textNode before the - // first element child. - if (!found) { - var textNode = document.createTextNode(data[gTextProp]); - element.insertBefore(textNode, element.firstChild); - } - } - delete data[gTextProp]; - } - - for (var k in data) { - element[k] = data[k]; - } - } - - // webkit browsers don't currently support 'children' on SVG elements... - function getChildElementCount(element) { - if (element.children) { - return element.children.length; - } - if (typeof element.childElementCount !== 'undefined') { - return element.childElementCount; - } - var count = 0; - for (var i = 0; i < element.childNodes.length; i++) { - count += element.nodeType === 1 ? 1 : 0; - } - return count; - } - - // translate an HTML subtree - function translateFragment(element) { - element = element || document.documentElement; - - // check all translatable children (= w/ a `data-l10n-id' attribute) - var children = getTranslatableChildren(element); - var elementCount = children.length; - for (var i = 0; i < elementCount; i++) { - translateElement(children[i]); - } - - // translate element itself if necessary - translateElement(element); - } - - return { - // get a localized string - get: function(key, args, fallbackString) { - var index = key.lastIndexOf('.'); - var prop = gTextProp; - if (index > 0) { // An attribute has been specified - prop = key.substr(index + 1); - key = key.substring(0, index); - } - var fallback; - if (fallbackString) { - fallback = {}; - fallback[prop] = fallbackString; - } - var data = getL10nData(key, args, fallback); - if (data && prop in data) { - return data[prop]; - } - return '{{' + key + '}}'; - }, - - // debug - getData: function() { return gL10nData; }, - getText: function() { return gTextData; }, - - // get|set the document language - getLanguage: function() { return gLanguage; }, - setLanguage: function(lang, callback) { - loadLocale(lang, function() { - if (callback) - callback(); - translateFragment(); - }); - }, - - // get the direction (ltr|rtl) of the current language - getDirection: function() { - // http://www.w3.org/International/questions/qa-scripts - // Arabic, Hebrew, Farsi, Pashto, Urdu - var rtlList = ['ar', 'he', 'fa', 'ps', 'ur']; - var shortCode = gLanguage.split('-', 1)[0]; - return (rtlList.indexOf(shortCode) >= 0) ? 'rtl' : 'ltr'; - }, - - // translate an element or document fragment - translate: translateFragment, - - // this can be used to prevent race conditions - getReadyState: function() { return gReadyState; }, - ready: function(callback) { - if (!callback) { - return; - } else if (gReadyState == 'complete' || gReadyState == 'interactive') { - window.setTimeout(function() { - callback(); - }); - } else if (document.addEventListener) { - document.addEventListener('localized', function once() { - document.removeEventListener('localized', once); - callback(); - }); - } - } - }; -}) (window, document); diff --git a/vendor/pdfjs/web/locale/ach/viewer.properties b/vendor/pdfjs/web/locale/ach/viewer.properties index 50747b6..fd5c1d0 100644 --- a/vendor/pdfjs/web/locale/ach/viewer.properties +++ b/vendor/pdfjs/web/locale/ach/viewer.properties @@ -18,12 +18,15 @@ previous_label=Mukato next.title=Pot buk malubo next_label=Malubo -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Pot buk: -page_of=pi {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Pot buk +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=pi {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} me {{pagesCount}}) zoom_out.title=Jwik Matidi zoom_out_label=Jwik Matidi @@ -57,10 +60,7 @@ page_rotate_ccw.title=Wire i tung lacam page_rotate_ccw.label=Wire i tung lacam page_rotate_ccw_label=Wire i tung lacam -hand_tool_enable.title=Ye gintic me cing -hand_tool_enable_label=Ye gintic me cing -hand_tool_disable.title=Juk gintic me cing -hand_tool_disable_label=Juk gintic me cing +cursor_hand_tool.title=Cak gitic me cing # Document properties dialog box document_properties.title=Jami me gin acoya… @@ -75,7 +75,7 @@ document_properties_kb={{size_kb}} KB ({{size_b}} bytes) document_properties_mb={{size_mb}} MB ({{size_b}} bytes) document_properties_title=Wiye: document_properties_author=Ngat mucoyo: -document_properties_subject=Lok: +document_properties_subject=Subjek: document_properties_keywords=Lok mapire tek: document_properties_creation_date=Nino dwe me cwec: document_properties_modification_date=Nino dwe me yub: @@ -88,13 +88,18 @@ document_properties_version=Kit PDF: document_properties_page_count=Kwan me pot buk: document_properties_close=Lor +print_progress_message=Yubo coc me agoya… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Juki + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Lok gintic ma inget toggle_sidebar_label=Lok gintic ma inget -outline.title=Nyut rek pa gin acoya -outline_label=Pek pa gin acoya +document_outline_label=Pek pa gin acoya attachments.title=Nyut twec attachments_label=Twec thumbs.title=Nyut cal @@ -111,7 +116,8 @@ thumb_page_title=Pot buk {{page}} thumb_page_canvas=Cal me pot buk {{page}} # Find panel button title and messages -find_label=Nong: +find_input.title=Nong +find_input.placeholder=Nong i dokumen… find_previous.title=Nong timme pa lok mukato find_previous_label=Mukato find_next.title=Nong timme pa lok malubo @@ -165,9 +171,9 @@ text_annotation_type.alt=[{{type}} Lok angea manok] password_label=Ket mung me donyo me yabo pwail me PDF man. password_invalid=Mung me donyo pe atir. Tim ber i tem doki. password_ok=OK -password_cancel=Juk +password_cancel=Juki printing_not_supported=Ciko: Layeny ma pe teno goyo liweng. printing_not_ready=Ciko: PDF pe ocane weng me agoya. web_fonts_disabled=Kijuko dit pa coc me kakube woko: pe romo tic ki dit pa coc me PDF ma kiketo i kine. -document_colors_not_allowed=Pe ki ye ki gin acoya me PDF me tic ki rangi gi kengi: 'Ye pot buk me yero rangi mamegi kengi' kijuko woko i layeny. +document_colors_not_allowed=Pe ki yee ki gin acoya me PDF me tic ki rangi gi kengi: Kijuko woko “Yee pot buk me yero rangi mamegi kengi†ki i layeny. diff --git a/vendor/pdfjs/web/locale/af/viewer.properties b/vendor/pdfjs/web/locale/af/viewer.properties index 052413d..8cf0880 100644 --- a/vendor/pdfjs/web/locale/af/viewer.properties +++ b/vendor/pdfjs/web/locale/af/viewer.properties @@ -18,12 +18,15 @@ previous_label=Vorige next.title=Volgende bladsy next_label=Volgende -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Bladsy: -page_of=van {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Bladsy +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=van {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} van {{pagesCount}}) zoom_out.title=Zoem uit zoom_out_label=Zoem uit @@ -57,10 +60,10 @@ page_rotate_ccw.title=Roteer anti-kloksgewys page_rotate_ccw.label=Roteer anti-kloksgewys page_rotate_ccw_label=Roteer anti-kloksgewys -hand_tool_enable.title=Aktiveer handjie -hand_tool_enable_label=Aktiveer handjie -hand_tool_disable.title=Deaktiveer handjie -hand_tool_disable_label=Deaktiveer handjie +cursor_text_select_tool.title=Aktiveer gereedskap om teks te merk +cursor_text_select_tool_label=Teksmerkgereedskap +cursor_hand_tool.title=Aktiveer handjie +cursor_hand_tool_label=Handjie # Document properties dialog box document_properties.title=Dokumenteienskappe… @@ -88,13 +91,20 @@ document_properties_version=PDF-weergawe: document_properties_page_count=Aantal bladsye: document_properties_close=Sluit +print_progress_message=Berei tans dokument voor om te druk… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Kanselleer + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Sypaneel aan/af +toggle_sidebar_notification.title=Sypaneel aan/af (dokument bevat skema/aanhegsels) toggle_sidebar_label=Sypaneel aan/af -outline.title=Wys dokumentoorsig -outline_label=Dokumentoorsig +document_outline.title=Wys dokumentskema (dubbelklik om alle items oop/toe te vou) +document_outline_label=Dokumentoorsig attachments.title=Wys aanhegsels attachments_label=Aanhegsels thumbs.title=Wys duimnaels @@ -111,12 +121,13 @@ thumb_page_title=Bladsy {{page}} thumb_page_canvas=Duimnael van bladsy {{page}} # Find panel button title and messages -find_label=Vind: +find_input.title=Vind +find_input.placeholder=Soek in dokument… find_previous.title=Vind die vorige voorkoms van die frase find_previous_label=Vorige find_next.title=Vind die volgende voorkoms van die frase find_next_label=Volgende -find_highlight=Verlig alle +find_highlight=Verlig almal find_match_case_label=Kassensitief find_reached_top=Bokant van dokument is bereik; gaan voort van onder af find_reached_bottom=Einde van dokument is bereik; gaan voort van bo af @@ -161,7 +172,7 @@ unexpected_response_error=Onverwagse antwoord van bediener. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). # Some common types are e.g.: "Check", "Text", "Comment", "Note" -text_annotation_type.alt=[{{type}}-annotasie +text_annotation_type.alt=[{{type}}-annotasie] password_label=Gee die wagwoord om dié PDF-lêer mee te open. password_invalid=Ongeldige wagwoord. Probeer gerus weer. password_ok=OK @@ -170,4 +181,4 @@ password_cancel=Kanselleer printing_not_supported=Waarskuwing: Dié blaaier ondersteun nie drukwerk ten volle nie. printing_not_ready=Waarskuwing: Die PDF is nog nie volledig gelaai vir drukwerk nie. web_fonts_disabled=Webfonte is gedeaktiveer: kan nie PDF-fonte wat ingebed is, gebruik nie. -document_colors_not_allowed=PDF-dokumente word nie toegelaat om hul eie kleure te gebruik nie: 'Laat bladsye toe om hul eie kleure te kies' is gedeaktiveer in die blaaier. +document_colors_not_allowed=PDF-dokumente word nie toegelaat om hul eie kleure te gebruik nie: “Laat bladsye toe om hul eie kleure te kies†is gedeaktiveer in die blaaier. diff --git a/vendor/pdfjs/web/locale/ak/viewer.properties b/vendor/pdfjs/web/locale/ak/viewer.properties index 83eacd6..25dc62e 100644 --- a/vendor/pdfjs/web/locale/ak/viewer.properties +++ b/vendor/pdfjs/web/locale/ak/viewer.properties @@ -18,12 +18,12 @@ previous_label=Ekyiri-baako next.title=Krataafa a edi so baako next_label=Dea-É›-di-so-baako -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Krataafa: -page_of=wÉ” {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom_out.title=Zuum pue zoom_out_label=Zuum ba abÉ”nten @@ -53,17 +53,18 @@ document_properties_title=Ti asÉ›m: # LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" # will be replaced by the creation/modification date, and time, of the PDF file. +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=SÉ” anaaso dum saedbaa toggle_sidebar_label=SÉ” anaaso dum saedbaa -outline.title=KyerÉ› dÉ”komÉ›nt bÉ”bea -outline_label=DÉ”komÉ›nt bÉ”bea +document_outline_label=DÉ”komÉ›nt bÉ”bea thumbs.title=KyerÉ› mfoniwaa thumbs_label=Mfoniwaa findbar.title=Hu wÉ” dÉ”komÉ›nt no mu -findbar_label=Hu # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -74,7 +75,6 @@ thumb_page_title=Krataafa {{page}} thumb_page_canvas=Krataafa ne mfoniwaa {{page}} # Find panel button title and messages -find_label=Hunu: find_previous.title=San hu fres wÉ” ekyiri baako find_previous_label=Ekyiri baako find_next.title=San hu fres no wÉ” enim baako @@ -123,7 +123,6 @@ missing_file_error=PDF fael no ayera. # Some common types are e.g.: "Check", "Text", "Comment", "Note" text_annotation_type.alt=[{{type}} TÉ›kst-nyiano] password_ok=OK -password_cancel=Twa-mu printing_not_supported=KÉ”kÉ”bÉ”: Brawsa yi nnhyÉ› daa mma prent ho kwan. printing_not_ready=KÉ”kÉ”bÉ”: WÉ”nntwee PDF fael no nyinara mmbaee ama wo É› tumi aprente. diff --git a/vendor/pdfjs/web/locale/an/viewer.properties b/vendor/pdfjs/web/locale/an/viewer.properties index ad26285..e42a22a 100644 --- a/vendor/pdfjs/web/locale/an/viewer.properties +++ b/vendor/pdfjs/web/locale/an/viewer.properties @@ -18,12 +18,15 @@ previous_label=Anterior next.title=Pachina siguient next_label=Siguient -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Pachina: -page_of=de {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Pachina +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=de {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} de {{pagesCount}}) zoom_out.title=Achiquir zoom_out_label=Achiquir @@ -57,10 +60,6 @@ page_rotate_ccw.title=Chirar enta la zurda page_rotate_ccw.label=Chirar en sentiu antihorario page_rotate_ccw_label=Chirar enta la zurda -hand_tool_enable.title=Activar a ferramienta man -hand_tool_enable_label=Activar a ferramenta man -hand_tool_disable.title=Desactivar a ferramienta man -hand_tool_disable_label=Desactivar a ferramienta man # Document properties dialog box document_properties.title=Propiedatz d'o documento... @@ -88,13 +87,20 @@ document_properties_version=Versión de PDF: document_properties_page_count=Numero de pachinas: document_properties_close=Zarrar +print_progress_message=Se ye preparando la documentación pa imprentar… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancelar + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Amostrar u amagar a barra lateral +toggle_sidebar_notification.title=Cambiar barra lateral (lo documento contiene esquema/adchuntos) toggle_sidebar_label=Amostrar a barra lateral -outline.title=Amostrar o esquema d'o documento -outline_label=Esquema d'o documento +document_outline.title=Amostrar esquema d'o documento (fer doble clic pa expandir/compactar totz los items) +document_outline_label=Esquema d'o documento attachments.title=Amostrar os adchuntos attachments_label=Adchuntos thumbs.title=Amostrar as miniaturas @@ -111,7 +117,8 @@ thumb_page_title=Pachina {{page}} thumb_page_canvas=Miniatura d'a pachina {{page}} # Find panel button title and messages -find_label=Trobar: +find_input.title=Trobar +find_input.placeholder=Trobar en o documento… find_previous.title=Trobar l'anterior coincidencia d'a frase find_previous_label=Anterior find_next.title=Trobar a siguient coincidencia d'a frase @@ -170,4 +177,4 @@ password_cancel=Cancelar printing_not_supported=Pare cuenta: Iste navegador no maneya totalment as impresions. printing_not_ready=Aviso: Encara no se ha cargau completament o PDF ta imprentar-lo. web_fonts_disabled=As fuents web son desactivadas: no se puet incrustar fichers PDF. -document_colors_not_allowed=Os documentos PDF no pueden fer servir as suyas propias colors: 'Permitir que as pachinas triguen as suyas propias colors' ye desactivau en o navegador. +document_colors_not_allowed=Los documentos PDF no pueden fer servir las suyas propias colors: 'Permitir que as pachinas triguen as suyas propias colors' ye desactivau en o navegador. diff --git a/vendor/pdfjs/web/locale/ar/viewer.properties b/vendor/pdfjs/web/locale/ar/viewer.properties index 3dd50c8..93dbc9b 100644 --- a/vendor/pdfjs/web/locale/ar/viewer.properties +++ b/vendor/pdfjs/web/locale/ar/viewer.properties @@ -18,12 +18,15 @@ previous_label=السابقة next.title=الصÙØØ© التالية next_label=التالية -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=صÙØØ©: -page_of=من {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=صÙØØ© +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=من {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} من {{pagesCount}}) zoom_out.title=بعّد zoom_out_label=بعّد @@ -57,10 +60,10 @@ page_rotate_ccw.title=أدر بعكس اتجاه عقارب الساعة page_rotate_ccw.label=أدر بعكس اتجاه عقارب الساعة page_rotate_ccw_label=أدر بعكس اتجاه عقارب الساعة -hand_tool_enable.title=Ùعّل أداة اليد -hand_tool_enable_label=Ùعّل أداة اليد -hand_tool_disable.title=عطّل أداة اليد -hand_tool_disable_label=عطّل أداة اليد +cursor_text_select_tool.title=Ùعّل أداة اختيار النص +cursor_text_select_tool_label=أداة اختيار النص +cursor_hand_tool.title=Ùعّل أداة اليد +cursor_hand_tool_label=أداة اليد # Document properties dialog box document_properties.title=خصائص المستند… @@ -88,13 +91,20 @@ document_properties_version=إصدارة PDF: document_properties_page_count=عدد الصÙØات: document_properties_close=أغلق +print_progress_message=ÙŠÙØضّر المستند للطباعة… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}Ùª +print_progress_close=ألغ٠+ # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) -toggle_sidebar.title=بدّل الشريط الجانبي -toggle_sidebar_label=بدّل الشريط الجانبي -outline.title=اعرض مخطط المستند -outline_label=مخطط المستند +toggle_sidebar.title=بدّل ظهور الشريط الجانبي +toggle_sidebar_notification.title=بدّل ظهور الشريط الجانبي (ÙŠØتوي المستند على مخطط أو مرÙقات) +toggle_sidebar_label=بدّل ظهور الشريط الجانبي +document_outline.title=اعرض Ùهرس المستند (نقر مزدوج لتمديد أو تقليص كل العناصر) +document_outline_label=مخطط المستند attachments.title=اعرض المرÙقات attachments_label=المÙرÙقات thumbs.title=اعرض Ù…Ùصغرات @@ -111,7 +121,8 @@ thumb_page_title=صÙØØ© {{page}} thumb_page_canvas=مصغّرة صÙØØ© {{page}} # Find panel button title and messages -find_label=ابØØ«: +find_input.title=ابØØ« +find_input.placeholder=ابØØ« ÙÙŠ المستند… find_previous.title=ابØØ« عن التّواجد السّابق للعبارة find_previous_label=السابق find_next.title=ابØØ« عن التّواجد التّالي للعبارة @@ -170,4 +181,4 @@ password_cancel=ألغ٠printing_not_supported=تØذير: لا يدعم هذا المتصÙØ Ø§Ù„Ø·Ø¨Ø§Ø¹Ø© بشكل كامل. printing_not_ready=تØذير: مل٠PDF لم ÙŠÙØمّل كاملًا للطباعة. web_fonts_disabled=خطوط الوب Ù…Ùعطّلة: تعذّر استخدام خطوط PDF المÙضمّنة. -document_colors_not_allowed=ليس مسموØًا لملÙات PDF باستخدام ألوانها الخاصة: خيار 'Ø§Ø³Ù…Ø Ù„Ù„ØµÙØات باختيار ألوانها الخاصة' ليس Ù…ÙÙعّلًا ÙÙŠ المتصÙØ. +document_colors_not_allowed=ليس مسموØًا لملÙات PDF باستخدام ألوانها الخاصة: خيار â€Ø§Ø³Ù…Ø Ù„Ù„ØµÙØات باختيار ألوانها الخاصة“ ليس Ù…ÙÙعّلًا ÙÙŠ المتصÙØ. diff --git a/vendor/pdfjs/web/locale/as/viewer.properties b/vendor/pdfjs/web/locale/as/viewer.properties index 58ccd84..ea3ecc7 100644 --- a/vendor/pdfjs/web/locale/as/viewer.properties +++ b/vendor/pdfjs/web/locale/as/viewer.properties @@ -18,12 +18,12 @@ previous_label=পূৰà§à¦¬à§±à§°à§à¦¤à§€ next.title=পৰৱৰà§à¦¤à§€ পৃষà§à¦ া next_label=পৰৱৰà§à¦¤à§€ -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=পৃষà§à¦ া: -page_of=ৰ {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom_out.title=জà§à¦® আউট zoom_out_label=জà§à¦® আউট @@ -57,10 +57,6 @@ page_rotate_ccw.title=ঘড়ীৰ ওলোটা দিশত ঘà§à§°à¦¾à¦“à page_rotate_ccw.label=ঘড়ীৰ ওলোটা দিশত ঘà§à§°à¦¾à¦“ক page_rotate_ccw_label=ঘড়ীৰ ওলোটা দিশত ঘà§à§°à¦¾à¦“ক -hand_tool_enable.title=হাà¦à¦¤ সà¦à¦œà§à¦²à¦¿ সামৰà§à¦¥à¦¬à¦¾à¦¨ কৰক -hand_tool_enable_label=হাà¦à¦¤ সà¦à¦œà§à¦²à¦¿ সামৰà§à¦¥à¦¬à¦¾à¦¨ কৰক -hand_tool_disable.title=হাà¦à¦¤ সà¦à¦œà§à¦²à¦¿ অসামৰà§à¦¥à¦¬à¦¾à¦¨ কৰক -hand_tool_disable_label=হাà¦à¦¤ সà¦à¦œà§à¦²à¦¿ অসামৰà§à¦¥à¦¬à¦¾à¦¨ কৰক # Document properties dialog box document_properties.title=দসà§à¦¤à¦¾à¦¬à§‡à¦œà§° বৈশিষà§à¦Ÿà§à¦¯à¦¸à¦®à§‚হ… @@ -88,19 +84,20 @@ document_properties_version=PDF সংসà§à¦•à§°à¦£: document_properties_page_count=পৃষà§à¦ াৰ গণনা: document_properties_close=বনà§à¦§ কৰক +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=কাষবাৰ টগল কৰক toggle_sidebar_label=কাষবাৰ টগল কৰক -outline.title=দসà§à¦¤à¦¾à¦¬à§‡à¦œ আউটলাইন দেখà§à§±à¦¾à¦“ক -outline_label=দসà§à¦¤à¦¾à¦¬à§‡à¦œ আউটলাইন +document_outline_label=দসà§à¦¤à¦¾à¦¬à§‡à¦œ আউটলাইন attachments.title=à¦à¦Ÿà¦¾à¦šà¦®à§‡à¦¨à§à¦Ÿà¦¸à¦®à§‚হ দেখà§à§±à¦¾à¦“ক attachments_label=à¦à¦Ÿà¦¾à¦šà¦®à§‡à¦¨à§à¦Ÿà¦¸à¦®à§‚হ thumbs.title=থামà§à¦¬à¦¨à§‡à¦‡à¦²à¦¸à¦®à§‚হ দেখà§à§±à¦¾à¦“ক thumbs_label=থামà§à¦¬à¦¨à§‡à¦‡à¦²à¦¸à¦®à§‚হ findbar.title=দসà§à¦¤à¦¾à¦¬à§‡à¦œà¦¤ সনà§à¦§à¦¾à¦¨ কৰক -findbar_label=সনà§à¦§à¦¾à¦¨ কৰক # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -111,7 +108,6 @@ thumb_page_title=পৃষà§à¦ া {{page}} thumb_page_canvas=পৃষà§à¦ াৰ থামà§à¦¬à¦¨à§‡à¦‡à¦² {{page}} # Find panel button title and messages -find_label=সনà§à¦§à¦¾à¦¨ কৰক: find_previous.title=বাকà§à¦¯à¦¾à¦‚শৰ পূৰà§à¦¬à§±à§°à§à¦¤à§€ উপসà§à¦¥à¦¿à¦¤à¦¿ সনà§à¦§à¦¾à¦¨ কৰক find_previous_label=পূৰà§à¦¬à§±à§°à§à¦¤à§€ find_next.title=বাকà§à¦¯à¦¾à¦‚শৰ পৰৱৰà§à¦¤à§€ উপসà§à¦¥à¦¿à¦¤à¦¿ সনà§à¦§à¦¾à¦¨ কৰক @@ -164,7 +160,6 @@ text_annotation_type.alt=[{{type}} টোকা] password_label=à¦à¦‡ PDF ফাইল খোলিবলৈ পাছৱৰà§à¦¡ সà§à¦®à§à§±à¦¾à¦“ক। password_invalid=অবৈধ পাছৱৰà§à¦¡à¥¤ অনà§à¦—à§à§°à¦¹ কৰি পà§à¦¨à§° চেষà§à¦Ÿà¦¾ কৰক। password_ok=ঠিক আছে -password_cancel=বাতিল কৰক printing_not_supported=সতৰà§à¦•à¦¬à¦¾à§°à§à¦¤à¦¾: পà§à§°à¦¿à¦¨à§à¦Ÿà¦¿à¦‚ à¦à¦‡ বà§à§°à¦¾à¦‰à¦›à¦¾à§° দà§à¦¬à¦¾à§°à¦¾ সমà§à¦ªà§‚ৰà§à¦£à¦à¦¾à§±à§‡ সমৰà§à¦¥à¦¿à¦¤ নহয়। printing_not_ready=সতৰà§à¦•à¦¬à¦¾à§°à§à¦¤à¦¾: PDF পà§à§°à¦¿à¦¨à§à¦Ÿà¦¿à¦‚ৰ বাবে সমà§à¦ªà§‚ৰà§à¦£à¦à¦¾à§±à§‡ ল'ডেড নহয়। diff --git a/vendor/pdfjs/web/locale/ast/viewer.properties b/vendor/pdfjs/web/locale/ast/viewer.properties index 2346c54..e57fc4a 100644 --- a/vendor/pdfjs/web/locale/ast/viewer.properties +++ b/vendor/pdfjs/web/locale/ast/viewer.properties @@ -1,111 +1,177 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. -previous.title = Páxina anterior -previous_label = Anterior -next.title = Páxina siguiente -next_label = Siguiente -page_label = Páxina: -page_of = de {{pageCount}} -zoom_out.title = Reducir -zoom_out_label = Reducir -zoom_in.title = Aumentar -zoom_in_label = Aumentar -zoom.title = Tamañu -print.title = Imprentar -print_label = Imprentar -open_file.title = Abrir ficheru -open_file_label = Abrir -download.title = Descargar -download_label = Descargar -bookmark.title = Vista actual (copiar o abrir nuna nueva ventana) -bookmark_label = Vista actual -outline.title = Amosar l'esquema del documentu -outline_label = Esquema del documentu -thumbs.title = Amosar miniatures -thumbs_label = Miniatures -thumb_page_title = Páxina {{page}} -thumb_page_canvas = Miniatura de la páxina {{page}} -error_more_info = Más información -error_less_info = Menos información -error_close = Zarrar -error_message = Mensaxe: {{message}} -error_stack = Pila: {{stack}} -error_file = Ficheru: {{file}} -error_line = Llinia: {{line}} -rendering_error = Hebo un fallu al renderizar la páxina. -page_scale_width = Anchor de la páxina -page_scale_fit = Axuste de la páxina -page_scale_auto = Tamañu automáticu -page_scale_actual = Tamañu actual -loading_error_indicator = Fallu -loading_error = Hebo un fallu al cargar el PDF. -printing_not_supported = Avisu: Imprentar nun tien sofitu téunicu completu nesti navegador. -presentation_mode_label = -presentation_mode.title = -page_rotate_cw.label = -page_rotate_ccw.label = -last_page.label = Dir a la cabera páxina -invalid_file_error = Ficheru PDF inválidu o corruptu. -first_page.label = Dir a la primer páxina -findbar_label = Guetar -findbar.title = Guetar nel documentu -find_previous_label = Anterior -find_previous.title = Alcontrar l'anterior apaición de la fras -find_not_found = Frase non atopada -find_next_label = Siguiente -find_next.title = Alcontrar la siguiente apaición d'esta fras -find_match_case_label = Coincidencia de mayús./minús. -find_label = Guetar: -find_highlight = Remarcar toos +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Páxina anterior +previous_label=Anterior +next.title=Páxina siguiente +next_label=Siguiente + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Páxina +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=de {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} de {{pagesCount}}) + +zoom_out.title=Reducir +zoom_out_label=Reducir +zoom_in.title=Aumentar +zoom_in_label=Aumentar +zoom.title=Tamañu +presentation_mode.title= +presentation_mode_label= +open_file.title=Abrir ficheru +open_file_label=Abrir +print.title=Imprentar +print_label=Imprentar +download.title=Descargar +download_label=Descargar +bookmark.title=Vista actual (copiar o abrir nuna nueva ventana) +bookmark_label=Vista actual + +# Secondary toolbar and context menu +tools.title=Ferramientes +tools_label=Ferramientes +first_page.title=Dir a la primer páxina +first_page.label=Dir a la primer páxina +first_page_label=Dir a la primer páxina +last_page.title=Dir a la postrer páxina +last_page.label=Dir a la cabera páxina +last_page_label=Dir a la postrer páxina +page_rotate_cw.title=Xirar en sen horariu +page_rotate_cw.label= +page_rotate_cw_label=Xirar en sen horariu +page_rotate_ccw.title=Xirar en sen antihorariu +page_rotate_ccw.label= +page_rotate_ccw_label=Xirar en sen antihorariu + + +# Document properties dialog box +document_properties.title=Propiedaes del documentu… +document_properties_label=Propiedaes del documentu… +document_properties_file_name=Nome de ficheru: +document_properties_file_size=Tamañu de ficheru: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) +document_properties_title=TÃtulu: +document_properties_author=Autor: +document_properties_subject=Asuntu: +document_properties_keywords=Pallabres clave: +document_properties_creation_date=Data de creación: +document_properties_modification_date=Data de modificación: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Creador: +document_properties_producer=Productor PDF: +document_properties_version=Versión PDF: +document_properties_page_count=Númberu de páxines: +document_properties_close=Zarrar + +print_progress_message=Tresnando documentu pa imprentar… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Encaboxar + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Camudar barra llateral +toggle_sidebar_label=Camudar barra llateral +document_outline.title=Amosar esquema del documentu (duble clic pa espander/contrayer tolos elementos) +document_outline_label=Esquema del documentu +attachments.title=Amosar axuntos +attachments_label=Axuntos +thumbs.title=Amosar miniatures +thumbs_label=Miniatures +findbar.title=Guetar nel documentu +findbar_label=Guetar + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Páxina {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatura de la páxina {{page}} + +# Find panel button title and messages +find_previous.title=Alcontrar l'anterior apaición de la fras +find_previous_label=Anterior +find_next.title=Alcontrar la siguiente apaición d'esta fras +find_next_label=Siguiente +find_highlight=Remarcar toos +find_match_case_label=Coincidencia de mayús./minús. find_reached_top=Algamóse'l principiu del documentu, siguir dende'l final find_reached_bottom=Algamóse'l final del documentu, siguir dende'l principiu -web_fonts_disabled = Les fontes web tán desactivaes: ye imposible usar les fontes PDF embebÃes. -toggle_sidebar_label = Camudar barra llateral -toggle_sidebar.title = Camudar barra llateral -missing_file_error = Nun hai ficheru PDF. -error_version_info = PDF.js v{{version}} (build: {{build}}) -printing_not_ready = Avisu: Esti PDF nun se cargó completamente pa poder imprentase. -text_annotation_type.alt = [Anotación {{type}}] -document_colors_disabled = Los documentos PDF nun tienen permitÃo usar los sos propios colores: 'Permitir a les páxines elexir los sos propios colores' ta desactivao nel navegador. -tools_label = Ferramientes -tools.title = Ferramientes -password_ok = Aceutar -password_label = Introduz la contraseña p'abrir esti ficheru PDF -password_invalid = Contraseña non válida. Vuelvi a intentalo. -password_cancel = Encaboxar -page_rotate_cw_label = Xirar en sen horariu -page_rotate_cw.title = Xirar en sen horariu -page_rotate_ccw_label = Xirar en sen antihorariu -page_rotate_ccw.title = Xirar en sen antihorariu -last_page_label = Dir a la postrer páxina -last_page.title = Dir a la postrer páxina -hand_tool_enable_label = Activar ferramienta mano -hand_tool_enable.title = Activar ferramienta mano -hand_tool_disable_label = Desactivar ferramienta mano -hand_tool_disable.title = Desactivar ferramienta mano -first_page_label = Dir a la primer páxina -first_page.title = Dir a la primer páxina -document_properties_version = Versión PDF: -document_properties_title = TÃtulu: -document_properties_subject = Asuntu: -document_properties_producer = Productor PDF: -document_properties_page_count = Númberu de páxines: -document_properties_modification_date = Data de modificación: -document_properties_mb = {{size_mb}} MB ({{size_b}} bytes) -document_properties_label = Propiedaes del documentu… -document_properties_keywords = Pallabres clave: -document_properties_kb = {{size_kb}} KB ({{size_b}} bytes) -document_properties_file_size = Tamañu de ficheru: -document_properties_file_name = Nome de ficheru: -document_properties_date_string = {{date}}, {{time}} -document_properties_creator = Creador: -document_properties_creation_date = Data de creación: -document_properties_close = Zarrar -document_properties_author = Autor: -document_properties.title = Propiedaes del documentu… -attachments_label = Axuntos -attachments.title = Amosar axuntos -unexpected_response_error = Rempuesta inesperada del sirvidor. -page_scale_percent = {{scale}}% +find_not_found=Frase non atopada + +# Error panel labels +error_more_info=Más información +error_less_info=Menos información +error_close=Zarrar +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Mensaxe: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Pila: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Ficheru: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Llinia: {{line}} +rendering_error=Hebo un fallu al renderizar la páxina. + +# Predefined zoom values +page_scale_width=Anchor de la páxina +page_scale_fit=Axuste de la páxina +page_scale_auto=Tamañu automáticu +page_scale_actual=Tamañu actual +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Fallu +loading_error=Hebo un fallu al cargar el PDF. +invalid_file_error=Ficheru PDF inválidu o corruptu. +missing_file_error=Nun hai ficheru PDF. +unexpected_response_error=Rempuesta inesperada del sirvidor. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Anotación {{type}}] +password_label=Introduz la contraseña p'abrir esti ficheru PDF +password_invalid=Contraseña non válida. Vuelvi a intentalo. +password_ok=Aceutar +password_cancel=Encaboxar + +printing_not_supported=Alvertencia: La imprentación entá nun ta sofitada dafechu nesti restolador. +printing_not_ready=Avisu: Esti PDF nun se cargó completamente pa poder imprentase. +web_fonts_disabled=Les fontes web tán desactivaes: ye imposible usar les fontes PDF embebÃes. +document_colors_not_allowed=Los documentos PDF nun tienen permisu pa usar les sos colores: «Permitir que les páxines escueyan les sos colores» ta desactivao nel restolador. diff --git a/vendor/pdfjs/web/locale/az/viewer.properties b/vendor/pdfjs/web/locale/az/viewer.properties index b998838..be878d3 100644 --- a/vendor/pdfjs/web/locale/az/viewer.properties +++ b/vendor/pdfjs/web/locale/az/viewer.properties @@ -18,12 +18,15 @@ previous_label=ÆvvÉ™lkini tap next.title=NövbÉ™ti sÉ™hifÉ™ next_label=Ä°rÉ™li -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=SÉ™hifÉ™: -page_of=/ {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=SÉ™hifÉ™ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=/ {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} / {{pagesCount}}) zoom_out.title=UzaqlaÅŸ zoom_out_label=UzaqlaÅŸ @@ -57,10 +60,10 @@ page_rotate_ccw.title=Saat Ä°stiqamÉ™tinin ÆksinÉ™ Fırlat page_rotate_ccw.label=Saat Ä°stiqamÉ™tinin ÆksinÉ™ Fırlat page_rotate_ccw_label=Saat Ä°stiqamÉ™tinin ÆksinÉ™ Fırlat -hand_tool_enable.title=Æl alÉ™tini aktiv et -hand_tool_enable_label=Æl alÉ™tini aktiv et -hand_tool_disable.title=Æl alÉ™tini deaktiv et -hand_tool_disable_label=Æl alÉ™tini deaktiv et +cursor_text_select_tool.title=Yazı seçmÉ™ alÉ™tini aktivləşdir +cursor_text_select_tool_label=Yazı seçmÉ™ alÉ™ti +cursor_hand_tool.title=Æl alÉ™tini aktivləşdir +cursor_hand_tool_label=Æl alÉ™ti # Document properties dialog box document_properties.title=SÉ™nÉ™d xüsusiyyÉ™tlÉ™ri… @@ -88,13 +91,20 @@ document_properties_version=PDF versiyası: document_properties_page_count=SÉ™hifÉ™ sayı: document_properties_close=Qapat +print_progress_message=SÉ™nÉ™d çap üçün hazırlanır… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Ləğv et + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Yan Paneli Aç/BaÄŸla +toggle_sidebar_notification.title=Yan paneli çevir (sÉ™nÉ™ddÉ™ icmal/baÄŸlama var) toggle_sidebar_label=Yan Paneli Aç/BaÄŸla -outline.title=SÉ™nÉ™d struktunu göstÉ™r -outline_label=SÉ™nÉ™d strukturu +document_outline.title=SÉ™nÉ™din eskizini göstÉ™r (bütün bÉ™ndlÉ™ri açmaq/yığmaq üçün iki dÉ™fÉ™ kliklÉ™yin) +document_outline_label=SÉ™nÉ™d strukturu attachments.title=BaÄŸlamaları göstÉ™r attachments_label=BaÄŸlamalar thumbs.title=Kiçik ÅŸÉ™killÉ™ri göstÉ™r @@ -111,7 +121,8 @@ thumb_page_title=SÉ™hifÉ™{{page}} thumb_page_canvas={{page}} sÉ™hifÉ™sinin kiçik vÉ™ziyyÉ™ti # Find panel button title and messages -find_label=Tap: +find_input.title=Tap +find_input.placeholder=SÉ™nÉ™ddÉ™ tap… find_previous.title=Bir öncÉ™ki uyÄŸun gÉ™lÉ™n sözü tapır find_previous_label=Geri find_next.title=Bir sonrakı uyÄŸun gÉ™lÉ™n sözü tapır @@ -164,10 +175,10 @@ unexpected_response_error=GözlÉ™nilmÉ™z server cavabı. text_annotation_type.alt=[{{type}} Annotasiyası] password_label=Bu PDF faylı açmaq üçün ÅŸifrÉ™ni daxil edin. password_invalid=ÅžifrÉ™ yanlışdır. Bir daha sınayın. -password_ok=OK +password_ok=Tamam password_cancel=Ləğv et printing_not_supported=XÉ™bÉ™rdarlıq: Çap bu sÉ™yyah tÉ™rÉ™findÉ™n tam olaraq dÉ™stÉ™klÉ™nmir. printing_not_ready=XÉ™bÉ™rdarlıq: PDF çap üçün tam yüklÉ™nmÉ™yib. web_fonts_disabled=Web ÅžriftlÉ™r söndürülüb: yerləşdirilmiÅŸ PDF ÅŸriftlÉ™rini istifadÉ™ etmÉ™k mümkün deyil. -document_colors_not_allowed=PDF sÉ™nÉ™dlÉ™rÉ™ öz rÉ™nglÉ™rini iÅŸlÉ™tmÉ™yÉ™ icazÉ™ verilmir: 'SÉ™hifÉ™lÉ™rÉ™ öz rÉ™nglÉ™rini istifadÉ™ etmÉ™yÉ™ icazÉ™ vermÉ™' sÉ™yyahda söndürülüb. +document_colors_not_allowed=PDF sÉ™nÉ™dlÉ™rÉ™ öz rÉ™nglÉ™rini iÅŸlÉ™tmÉ™yÉ™ icazÉ™ verilmir: “SÉ™hifÉ™lÉ™rÉ™ öz rÉ™nglÉ™rini istifadÉ™ etmÉ™yÉ™ icazÉ™ verâ€mÉ™ sÉ™yyahda söndürülüb. diff --git a/vendor/pdfjs/web/locale/be/viewer.properties b/vendor/pdfjs/web/locale/be/viewer.properties index 031b1df..f0e3fa2 100644 --- a/vendor/pdfjs/web/locale/be/viewer.properties +++ b/vendor/pdfjs/web/locale/be/viewer.properties @@ -1,105 +1,184 @@ -previous.title = ПапÑÑ€ÑднÑÑ Ñтаронка -previous_label = ПапÑÑ€ÑднÑÑ -next.title = ÐаÑÑ‚ÑƒÐ¿Ð½Ð°Ñ Ñтаронка -next_label = ÐаÑÑ‚ÑƒÐ¿Ð½Ð°Ñ -page_label = Старонка: -page_of = з {{pageCount}} -zoom_out.title = Паменшыць -zoom_out_label = Паменшыць -zoom_in.title = ПавÑлічыць -zoom_in_label = ПавÑлічыць -zoom.title = ПавÑлічÑнне Ñ‚ÑкÑту -presentation_mode.title = Пераключыцца Ñž Ñ€Ñжым паказу -presentation_mode_label = Ð Ñжым паказу -open_file.title = Ðдчыніць файл -open_file_label = Ðдчыніць -print.title = Друкаваць -print_label = Друкаваць -download.title = Загрузка -download_label = Загрузка -bookmark.title = ЦÑперашнÑÑ Ð¿Ñ€Ð°Ñва (ÑкапіÑваць або адчыніць у новым акне) -bookmark_label = ЦÑперашнÑÑ Ð¿Ñ€Ð°Ñва -tools.title = Прылады -tools_label = Прылады -first_page.title = ПерайÑці на першую Ñтаронку -first_page.label = ПерайÑці на першую Ñтаронку -first_page_label = ПерайÑці на першую Ñтаронку -last_page.title = ПерайÑці на апошнюю Ñтаронку -last_page.label = ПерайÑці на апошнюю Ñтаронку -last_page_label = ПерайÑці на апошнюю Ñтаронку -page_rotate_cw.title = ПавÑрнуць па гадзіннікавай ÑÑ‚Ñ€Ñлцы -page_rotate_cw.label = ПавÑрнуць па гадзіннікавай ÑÑ‚Ñ€Ñлцы -page_rotate_cw_label = ПавÑрнуць па гадзіннікавай ÑÑ‚Ñ€Ñлцы -page_rotate_ccw.title = ПавÑрнуць Ñупраць гадзіннікавай ÑÑ‚Ñ€Ñлкі -page_rotate_ccw.label = ПавÑрнуць Ñупраць гадзіннікавай ÑÑ‚Ñ€Ñлкі -page_rotate_ccw_label = ПавÑрнуць Ñупраць гадзіннікавай ÑÑ‚Ñ€Ñлкі -hand_tool_enable.title = Дазволіць ручную прыладу -hand_tool_enable_label = Дазволіць ручную прыладу -hand_tool_disable.title = Забараніць ручную прыладу -hand_tool_disable_label = Забараніць ручную прыладу -document_properties.title = УлаÑціваÑці дакумента… -document_properties_label = УлаÑціваÑці дакумента… -document_properties_file_name = Ðазва файла: -document_properties_file_size = Памер файла: -document_properties_kb = {{size_kb}} КБ ({{size_b}} байт) -document_properties_mb = {{size_mb}} МБ ({{size_b}} байт) -document_properties_title = Загаловак: -document_properties_author = Ðўтар: -document_properties_subject = ТÑма: -document_properties_keywords = ÐšÐ»ÑŽÑ‡Ð°Ð²Ñ‹Ñ Ñловы: -document_properties_creation_date = Дата ÑтварÑннÑ: -document_properties_modification_date = Дата змÑненнÑ: -document_properties_date_string = {{date}}, {{time}} -document_properties_creator = Стваральнік: -document_properties_producer = Вырабнік PDF: -document_properties_version = ВерÑÑ–Ñ PDF: -document_properties_page_count = КолькаÑць Ñтаронак: -document_properties_close = Зачыніць -toggle_sidebar.title = ПераключÑнне палічкі -toggle_sidebar_label = Пераключыць палічку -outline.title = Паказ будовы дакумента -outline_label = Будова дакумента -attachments.title = Паказаць далучÑнні -attachments_label = ДалучÑнні -thumbs.title = Паказ накідаў -thumbs_label = Ðакіды -findbar.title = Пошук у дакуменце -findbar_label = ЗнайÑці -thumb_page_title = Старонка {{page}} -thumb_page_canvas = Ðакід Ñтаронкі {{page}} -find_label = Пошук: -find_previous.title = ЗнайÑці папÑÑ€Ñдні выпадак выразу -find_previous_label = ПапÑÑ€Ñдні -find_next.title = ЗнайÑці наÑтупны выпадак выразу -find_next_label = ÐаÑтупны -find_highlight = Падфарбаваць уÑе -find_match_case_label = Ðдрозніваць вÑлікіÑ/Ð¼Ð°Ð»Ñ‹Ñ Ð»Ñ–Ñ‚Ð°Ñ€Ñ‹ -find_reached_top = ДаÑÑгнуты пачатак дакумента, працÑг з канца -find_reached_bottom = ДаÑÑгнуты канец дакумента, працÑг з пачатку -find_not_found = Выраз не знойдзены -error_more_info = ПадрабÑзней -error_less_info = СціÑла -error_close = Закрыць -error_version_info = PDF.js в{{version}} (пабудова: {{build}}) -error_message = Паведамленне: {{message}} -error_stack = СтоÑ: {{stack}} -error_file = Файл: {{file}} -error_line = Радок: {{line}} -rendering_error = ЗдарылаÑÑ Ð¿Ð°Ð¼Ñ‹Ð»ÐºÐ° Ð¿Ð°Ð´Ñ‡Ð°Ñ Ð°Ð´Ð»ÑŽÑÑ‚Ñ€Ð°Ð²Ð°Ð½Ð½Ñ Ñтаронкі. -page_scale_width = Ð¨Ñ‹Ñ€Ñ‹Ð½Ñ Ñтаронкі -page_scale_fit = УціÑненне Ñтаронкі -page_scale_auto = СамаÑтойнае павÑлічÑнне -page_scale_actual = Сапраўдны памер -loading_error_indicator = Памылка -loading_error = ЗдарылаÑÑ Ð¿Ð°Ð¼Ñ‹Ð»ÐºÐ° Ð¿Ð°Ð´Ñ‡Ð°Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÑ– PDF. -invalid_file_error = ÐÑÑпраўны або пашкоджаны файл PDF. -missing_file_error = ÐдÑутны файл PDF. -text_annotation_type.alt = [{{type}} Annotation] -password_label = УвÑдзіце пароль, каб адчыніць гÑÑ‚Ñ‹ файл PDF. -password_invalid = Крывы пароль. ПаÑпрабуйце зноў. -password_ok = Добра -password_cancel = СкаÑаваць -printing_not_supported = ПапÑÑ€Ñджанне: друк не падтрымлівацца цалкам гÑтым азіральнікам. -printing_not_ready = Увага: PDF не ÑцÑгнуты цалкам Ð´Ð»Ñ Ð´Ñ€ÑƒÐºÐ°Ð²Ð°Ð½Ð½Ñ. -web_fonts_disabled = Шрыфты Сеціва забаронены: немгчыма ўжываць ÑƒÐºÐ»Ð°Ð´Ð·ÐµÐ½Ñ‹Ñ ÑˆÑ€Ñ‹Ñ„Ñ‚Ñ‹ PDF. -document_colors_disabled = Дакументам PDF не дазволена карыÑтацца Ñваімі ўлаÑнымі колерамі: 'Дазволіць Ñтаронкам выбіраць Ñвае ўлаÑÐ½Ñ‹Ñ ÐºÐ¾Ð»ÐµÑ€Ñ‹' абÑздзейнена Ñž азіральніку. +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Main toolbar buttons (tooltips and alt text for images) +previous.title=ПапÑÑ€ÑднÑÑ Ñтаронка +previous_label=ПапÑÑ€ÑднÑÑ +next.title=ÐаÑÑ‚ÑƒÐ¿Ð½Ð°Ñ Ñтаронка +next_label=ÐаÑÑ‚ÑƒÐ¿Ð½Ð°Ñ + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Старонка +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=з {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} з {{pagesCount}}) + +zoom_out.title=Паменшыць +zoom_out_label=Паменшыць +zoom_in.title=ПавÑлічыць +zoom_in_label=ПавÑлічыць +zoom.title=ПавÑлічÑнне Ñ‚ÑкÑту +presentation_mode.title=Пераключыцца Ñž Ñ€Ñжым паказу +presentation_mode_label=Ð Ñжым паказу +open_file.title=Ðдкрыць файл +open_file_label=Ðдкрыць +print.title=Друкаваць +print_label=Друкаваць +download.title=СцÑгнуць +download_label=СцÑгнуць +bookmark.title=ЦÑперашнÑÑ Ð¿Ñ€Ð°Ñва (ÑкапіÑваць або адчыніць у новым акне) +bookmark_label=ЦÑперашнÑÑ Ð¿Ñ€Ð°Ñва + +# Secondary toolbar and context menu +tools.title=Прылады +tools_label=Прылады +first_page.title=ПерайÑці на першую Ñтаронку +first_page.label=ПерайÑці на першую Ñтаронку +first_page_label=ПерайÑці на першую Ñтаронку +last_page.title=ПерайÑці на апошнюю Ñтаронку +last_page.label=ПерайÑці на апошнюю Ñтаронку +last_page_label=ПерайÑці на апошнюю Ñтаронку +page_rotate_cw.title=ПавÑрнуць па Ñонцу +page_rotate_cw.label=ПавÑрнуць па Ñонцу +page_rotate_cw_label=ПавÑрнуць па Ñонцу +page_rotate_ccw.title=ПавÑрнуць Ñупраць Ñонца +page_rotate_ccw.label=ПавÑрнуць Ñупраць Ñонца +page_rotate_ccw_label=ПавÑрнуць Ñупраць Ñонца + +cursor_text_select_tool.title=Уключыць прыладу выбару Ñ‚ÑкÑту +cursor_text_select_tool_label=Прылада выбару Ñ‚ÑкÑту +cursor_hand_tool.title=Уключыць ручную прыладу +cursor_hand_tool_label=Ð ÑƒÑ‡Ð½Ð°Ñ Ð¿Ñ€Ñ‹Ð»Ð°Ð´Ð° + +# Document properties dialog box +document_properties.title=УлаÑціваÑці дакумента… +document_properties_label=УлаÑціваÑці дакумента… +document_properties_file_name=Ðазва файла: +document_properties_file_size=Памер файла: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} КБ ({{size_b}} байт) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} МБ ({{size_b}} байт) +document_properties_title=Загаловак: +document_properties_author=Ðўтар: +document_properties_subject=ТÑма: +document_properties_keywords=ÐšÐ»ÑŽÑ‡Ð°Ð²Ñ‹Ñ Ñловы: +document_properties_creation_date=Дата ÑтварÑннÑ: +document_properties_modification_date=Дата змÑненнÑ: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Стваральнік: +document_properties_producer=Вырабнік PDF: +document_properties_version=ВерÑÑ–Ñ PDF: +document_properties_page_count=КолькаÑць Ñтаронак: +document_properties_close=Закрыць + +print_progress_message=Падрыхтоўка дакумента да друку… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=СкаÑаваць + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Паказаць/Ñхаваць бакавую панÑль +toggle_sidebar_notification.title=Паказаць/Ñхаваць бакавую панÑль (дакумент мае змеÑÑ‚/укладанні) +toggle_sidebar_label=Паказаць/Ñхаваць бакавую панÑль +document_outline.title=Паказаць Ñтруктуру дакумента (Ð´Ð²Ð°Ð¹Ð½Ð°Ñ Ð¿Ñтрычка, каб разгарнуць /згарнуць уÑе Ñлементы) +document_outline_label=Структура дакумента +attachments.title=Паказаць далучÑнні +attachments_label=ДалучÑнні +thumbs.title=Паказ мініÑцюр +thumbs_label=МініÑцюры +findbar.title=Пошук у дакуменце +findbar_label=ЗнайÑці + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Старонка {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=МініÑцюра Ñтаронкі {{page}} + +# Find panel button title and messages +find_input.title=Шукаць +find_input.placeholder=Шукаць у дакуменце… +find_previous.title=ЗнайÑці папÑÑ€Ñдні выпадак выразу +find_previous_label=ПапÑÑ€Ñдні +find_next.title=ЗнайÑці наÑтупны выпадак выразу +find_next_label=ÐаÑтупны +find_highlight=Падфарбаваць уÑе +find_match_case_label=Ðдрозніваць вÑлікіÑ/Ð¼Ð°Ð»Ñ‹Ñ Ð»Ñ–Ñ‚Ð°Ñ€Ñ‹ +find_reached_top=ДаÑÑгнуты пачатак дакумента, працÑг з канца +find_reached_bottom=ДаÑÑгнуты канец дакумента, працÑг з пачатку +find_not_found=Выраз не знойдзены + +# Error panel labels +error_more_info=ПадрабÑзней +error_less_info=СціÑла +error_close=Закрыць +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js в{{version}} (зборка: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Паведамленне: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=СтоÑ: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Файл: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Радок: {{line}} +rendering_error=ЗдарылаÑÑ Ð¿Ð°Ð¼Ñ‹Ð»ÐºÐ° Ð¿Ð°Ð´Ñ‡Ð°Ñ Ð°Ð´Ð»ÑŽÑÑ‚Ñ€Ð°Ð²Ð°Ð½Ð½Ñ Ñтаронкі. + +# Predefined zoom values +page_scale_width=Ð¨Ñ‹Ñ€Ñ‹Ð½Ñ Ñтаронкі +page_scale_fit=УціÑненне Ñтаронкі +page_scale_auto=Ðўтаматычнае павелічÑнне +page_scale_actual=Сапраўдны памер +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Памылка +loading_error=ЗдарылаÑÑ Ð¿Ð°Ð¼Ñ‹Ð»ÐºÐ° Ð¿Ð°Ð´Ñ‡Ð°Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÑ– PDF. +invalid_file_error=ÐÑÑпраўны або пашкоджаны файл PDF. +missing_file_error=ÐдÑутны файл PDF. +unexpected_response_error=Ðечаканы адказ Ñервера. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[{{type}} Annotation] +password_label=УвÑдзіце пароль, каб адкрыць гÑÑ‚Ñ‹ файл PDF. +password_invalid=ÐÑдзейÑны пароль. ПаÑпрабуйце зноў. +password_ok=Добра +password_cancel=СкаÑаваць + +printing_not_supported=ПапÑÑ€Ñджанне: друк не падтрымліваецца цалкам гÑтым браўзерам. +printing_not_ready=Увага: PDF не ÑцÑгнуты цалкам Ð´Ð»Ñ Ð´Ñ€ÑƒÐºÐ°Ð²Ð°Ð½Ð½Ñ. +web_fonts_disabled=Шрыфты Сеціва забаронены: немагчыма ўжываць ÑƒÐºÐ»Ð°Ð´Ð·ÐµÐ½Ñ‹Ñ ÑˆÑ€Ñ‹Ñ„Ñ‚Ñ‹ PDF. +document_colors_not_allowed=PDF-дакументам не дазволена выкарыÑтоўваць Ñвае колеры: у браўзеры адключаны параметр "Дазволіць вÑб-Ñайтам выкарыÑтоўваць Ñвае колеры". diff --git a/vendor/pdfjs/web/locale/bg/viewer.properties b/vendor/pdfjs/web/locale/bg/viewer.properties index 576cb56..a6928a8 100644 --- a/vendor/pdfjs/web/locale/bg/viewer.properties +++ b/vendor/pdfjs/web/locale/bg/viewer.properties @@ -18,17 +18,20 @@ previous_label=Предишна next.title=Следваща Ñтраница next_label=Следваща -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Страница: -page_of=от {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Страница +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=от {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} от {{pagesCount}}) -zoom_out.title=Отдалечаване -zoom_out_label=Отдалечаване -zoom_in.title=Приближаване -zoom_in_label=Приближаване +zoom_out.title=ÐамалÑване +zoom_out_label=ÐамалÑване +zoom_in.title=Увеличаване +zoom_in_label=Увеличаване zoom.title=Мащабиране presentation_mode.title=Превключване към режим на предÑтавÑне presentation_mode_label=Режим на предÑтавÑне @@ -50,17 +53,17 @@ first_page_label=Към първата Ñтраница last_page.title=Към поÑледната Ñтраница last_page.label=Към поÑледната Ñтраница last_page_label=Към поÑледната Ñтраница -page_rotate_cw.title=Превъртане по чаÑовниковата Ñтрелка -page_rotate_cw.label=Превъртане по чаÑовниковата Ñтрелка -page_rotate_cw_label=Превъртане по чаÑовниковата Ñтрелка -page_rotate_ccw.title=Превъртане обратно на чаÑовниковата Ñтрелка -page_rotate_ccw.label=Превъртане обратно на чаÑовниковата Ñтрелка -page_rotate_ccw_label=Превъртане обратно на чаÑовниковата Ñтрелка +page_rotate_cw.title=Завъртане по чаÑовниковата Ñтрелка +page_rotate_cw.label=Завъртане по чаÑовниковата Ñтрелка +page_rotate_cw_label=Завъртане по чаÑовниковата Ñтрелка +page_rotate_ccw.title=Завъртане обратно на чаÑовниковата Ñтрелка +page_rotate_ccw.label=Завъртане обратно на чаÑовниковата Ñтрелка +page_rotate_ccw_label=Завъртане обратно на чаÑовниковата Ñтрелка -hand_tool_enable.title=Включване на инÑтрумента ръка -hand_tool_enable_label=Включване на инÑтрумента ръка -hand_tool_disable.title=Изключване на инÑтрумента ръка -hand_tool_disable_label=Изключване на инÑтрумента ръка +cursor_text_select_tool.title=Включване на инÑтрумента за избор на текÑÑ‚ +cursor_text_select_tool_label=ИнÑтрумент за избор на текÑÑ‚ +cursor_hand_tool.title=Включване на инÑтрумента ръка +cursor_hand_tool_label=ИнÑтрумент ръка # Document properties dialog box document_properties.title=СвойÑтва на документа… @@ -88,13 +91,20 @@ document_properties_version=PDF верÑиÑ: document_properties_page_count=Брой Ñтраници: document_properties_close=ЗатварÑне +print_progress_message=ПодготвÑне на документа за отпечатване… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Отказ + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Превключване на Ñтраничната лента +toggle_sidebar_notification.title=Превключване на Ñтраничната лента (документи ÑÑŠÑ Ñтруктура/прикачени файлове) toggle_sidebar_label=Превключване на Ñтраничната лента -outline.title=Показване на очертаниÑта на документа -outline_label=Очертание на документа +document_outline.title=Показване на Ñтруктурата на документа (двукратно щракване за Ñвиване/разгъване на вÑичко) +document_outline_label=Структура на документа attachments.title=Показване на притурките attachments_label=Притурки thumbs.title=Показване на миниатюрите @@ -111,13 +121,14 @@ thumb_page_title=Страница {{page}} thumb_page_canvas=Миниатюра на Ñтраница {{page}} # Find panel button title and messages -find_label=ТърÑене: -find_previous.title=Ðамиране на предното Ñпоменаване на тази фраза +find_input.title=ТърÑене +find_input.placeholder=ТърÑене в документа… +find_previous.title=Ðамиране на предишно Ñъвпадение на фразата find_previous_label=Предишна -find_next.title=Ðамиране на Ñледващото Ñпоменаване на тази фраза +find_next.title=Ðамиране на Ñледващо Ñъвпадение на фразата find_next_label=Следваща -find_highlight=Маркирай вÑички -find_match_case_label=Точно ÑÑŠÐ²Ð¿Ð°Ð´ÐµÐ½Ð¸Ñ +find_highlight=ОткроÑване на вÑички +find_match_case_label=ЧувÑтвителноÑÑ‚ към региÑтъра find_reached_top=ДоÑтигнато е началото на документа, продължаване от ÐºÑ€Ð°Ñ find_reached_bottom=ДоÑтигнат е краÑÑ‚ на документа, продължаване от началото find_not_found=Фразата не е намерена diff --git a/vendor/pdfjs/web/locale/bn-BD/viewer.properties b/vendor/pdfjs/web/locale/bn-BD/viewer.properties index b5e3048..53e3c1e 100644 --- a/vendor/pdfjs/web/locale/bn-BD/viewer.properties +++ b/vendor/pdfjs/web/locale/bn-BD/viewer.properties @@ -18,12 +18,15 @@ previous_label=পূরà§à¦¬à¦¬à¦°à§à¦¤à§€ next.title=পরবরà§à¦¤à§€ পৃষà§à¦ া next_label=পরবরà§à¦¤à§€ -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=পৃষà§à¦ া: -page_of={{pageCount}} à¦à¦° +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=পাতা +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}} à¦à¦° +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pagesCount}} à¦à¦° {{pageNumber}}) zoom_out.title=ছোট আকারে পà§à¦°à¦¦à¦°à§à¦¶à¦¨ zoom_out_label=ছোট আকারে পà§à¦°à¦¦à¦°à§à¦¶à¦¨ @@ -57,10 +60,7 @@ page_rotate_ccw.title=ঘড়ির কাà¦à¦Ÿà¦¾à¦° বিপরীতে à page_rotate_ccw.label=ঘড়ির কাà¦à¦Ÿà¦¾à¦° বিপরীতে ঘোরাও page_rotate_ccw_label=ঘড়ির কাà¦à¦Ÿà¦¾à¦° বিপরীতে ঘোরাও -hand_tool_enable.title=হà§à¦¯à¦¾à¦¨à§à¦¡ টà§à¦² সকà§à¦°à¦¿à¦¯à¦¼ করà§à¦¨ -hand_tool_enable_label=হà§à¦¯à¦¾à¦¨à§à¦¡ টà§à¦² সকà§à¦°à¦¿à¦¯à¦¼ করà§à¦¨ -hand_tool_disable.title=হà§à¦¯à¦¾à¦¨à§à¦¡ টà§à¦² নিসà§à¦•à§à¦°à¦¿à§Ÿ করà§à¦¨ -hand_tool_disable_label=হà§à¦¯à¦¾à¦¨à§à¦¡ টà§à¦² নিসà§à¦•à§à¦°à¦¿à§Ÿ করà§à¦¨ +cursor_hand_tool.title=হà§à¦¯à¦¾à¦¨à§à¦¡ টà§à¦² সকà§à¦°à¦¿à¦¯à¦¼ করà§à¦¨ # Document properties dialog box document_properties.title=নথি বৈশিষà§à¦Ÿà§à¦¯â€¦ @@ -88,19 +88,26 @@ document_properties_version=পিডিà¦à¦« সংষà§à¦•à¦°à¦£: document_properties_page_count=মোট পাতা: document_properties_close=বনà§à¦§ +print_progress_message=মà§à¦¦à§à¦°à¦£à§‡à¦° জনà§à¦¯ নথি পà§à¦°à¦¸à§à¦¤à§à¦¤ করা হচà§à¦›à§‡â€¦ +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=বাতিল + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=সাইডবার টগল করà§à¦¨ +toggle_sidebar_notification.title=সাইডবার টগল (নথিতে আউটলাইন/à¦à¦Ÿà¦¾à¦šà¦®à§‡à¦¨à§à¦Ÿ রয়েছে) toggle_sidebar_label=সাইডবার টগল করà§à¦¨ -outline.title=নথির রূপরেখা পà§à¦°à¦¦à¦°à§à¦¶à¦¨ করà§à¦¨ -outline_label=নথির রূপরেখা +document_outline.title=নথির আউটলাইন দেখাও (সব আইটেম পà§à¦°à¦¸à¦¾à¦°à¦¿à¦¤/সঙà§à¦•à§à¦šà¦¿à¦¤ করতে ডবল কà§à¦²à¦¿à¦• করà§à¦¨) +document_outline_label=নথির রূপরেখা attachments.title=সংযà§à¦•à§à¦¤à¦¿ দেখাও attachments_label=সংযà§à¦•à§à¦¤à¦¿ -thumbs.title=থামà§à¦¬à¦¨à§‡à¦‡à¦² সমূহ পà§à¦°à¦¦à¦°à§à¦¶à¦¨ করà§à¦¨ +thumbs.title=থামà§à¦¬à¦¨à§‡à¦‡à¦² সমূহ পà§à¦°à¦¦à¦°à§à¦¶à¦¨ করà§à¦¨ thumbs_label=থামà§à¦¬à¦¨à§‡à¦‡à¦² সমূহ findbar.title=নথির মধà§à¦¯à§‡ খà§à¦à¦œà§à¦¨ -findbar_label=অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨ +findbar_label=খà§à¦à¦œà§à¦¨ # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -111,7 +118,8 @@ thumb_page_title=পৃষà§à¦ া {{page}} thumb_page_canvas={{page}} পৃষà§à¦ ার থামà§à¦¬à¦¨à§‡à¦‡à¦² # Find panel button title and messages -find_label=অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨: +find_input.title=খà§à¦à¦œà§à¦¨ +find_input.placeholder=নথির মধà§à¦¯à§‡ খà§à¦à¦œà§à¦¨â€¦ find_previous.title=বাকà§à¦¯à¦¾à¦‚শের পূরà§à¦¬à¦¬à¦°à§à¦¤à§€ উপসà§à¦¥à¦¿à¦¤à¦¿ অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨ find_previous_label=পূরà§à¦¬à¦¬à¦°à§à¦¤à§€ find_next.title=বাকà§à¦¯à¦¾à¦‚শের পরবরà§à¦¤à§€ উপসà§à¦¥à¦¿à¦¤à¦¿ অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨ @@ -154,7 +162,7 @@ page_scale_percent={{scale}}% loading_error_indicator=তà§à¦°à§à¦Ÿà¦¿ loading_error=পিডিà¦à¦« লোড করার সময় তà§à¦°à§à¦Ÿà¦¿ দেখা দিয়েছে। invalid_file_error=অকারà§à¦¯à¦•à¦° অথবা কà§à¦·à¦¤à¦¿à¦—à§à¦°à¦¸à§à¦¤ পিডিà¦à¦« ফাইল। -missing_file_error=পিডিà¦à¦« ফাইল পাওয়া যাচà§à¦›à§‡ না। +missing_file_error=নিখোà¦à¦œ PDF ফাইল। unexpected_response_error=অপà§à¦°à¦¤à§à¦¯à¦¾à¦¶à§€à¦¤ সারà§à¦à¦¾à¦° পà§à¦°à¦¤à¦¿à¦•à§à¦°à¦¿à§Ÿà¦¾à¥¤ # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. diff --git a/vendor/pdfjs/web/locale/bn-IN/viewer.properties b/vendor/pdfjs/web/locale/bn-IN/viewer.properties index 9aef9ff..4e22923 100644 --- a/vendor/pdfjs/web/locale/bn-IN/viewer.properties +++ b/vendor/pdfjs/web/locale/bn-IN/viewer.properties @@ -18,12 +18,15 @@ previous_label=পূরà§à¦¬à¦¬à¦°à§à¦¤à§€ next.title=পরবরà§à¦¤à§€ পৃষà§à¦ া next_label=পরবরà§à¦¤à§€ -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=পৃষà§à¦ া: -page_of=সরà§à¦¬à¦®à§‹à¦Ÿ {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=পেজ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pagesCount}} à¦à¦° {{pageNumber}}) zoom_out.title=ছোট মাপে পà§à¦°à¦¦à¦°à§à¦¶à¦¨ zoom_out_label=ছোট মাপে পà§à¦°à¦¦à¦°à§à¦¶à¦¨ @@ -57,10 +60,6 @@ page_rotate_ccw.title=বাà¦à¦¦à¦¿à¦•à§‡ ঘোরানো হবে page_rotate_ccw.label=বাà¦à¦¦à¦¿à¦•à§‡ ঘোরানো হবে page_rotate_ccw_label=বাà¦à¦¦à¦¿à¦•à§‡ ঘোরানো হবে -hand_tool_enable.title=হà§à¦¯à¦¾à¦¨à§à¦¡ টà§à¦² সকà§à¦°à¦¿à§Ÿ করà§à¦¨ -hand_tool_enable_label=হà§à¦¯à¦¾à¦¨à§à¦¡ টà§à¦² সকà§à¦°à¦¿à§Ÿ করà§à¦¨ -hand_tool_disable.title=হà§à¦¯à¦¾à¦¨à§à¦¡ টà§à¦² নিসà§à¦•à§à¦°à¦¿à§Ÿ করà§à¦¨ -hand_tool_disable_label=হà§à¦¯à¦¾à¦¨à§à¦¡ টà§à¦² নিসà§à¦•à§à¦°à¦¿à§Ÿ করà§à¦¨ # Document properties dialog box document_properties.title=নথির বৈশিষà§à¦Ÿà§à¦¯â€¦ @@ -88,13 +87,19 @@ document_properties_version=PDF সংসà§à¦•à¦°à¦£: document_properties_page_count=মোট পৃষà§à¦ া: document_properties_close=বনà§à¦§ করà§à¦¨ +print_progress_message=ডকà§à¦®à§‡à¦¨à§à¦Ÿ পà§à¦°à¦¿à¦¨à§à¦Ÿà¦¿à¦‚-র জনà§à¦¯ তৈরি করা হচà§à¦›à§‡... +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=বাতিল + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=সাইডবার টগল করà§à¦¨ toggle_sidebar_label=সাইডবার টগল করà§à¦¨ -outline.title=নথির রূপরেখা পà§à¦°à¦¦à¦°à§à¦¶à¦¨ -outline_label=নথির রূপরেখা পà§à¦°à¦¦à¦°à§à¦¶à¦¨ +document_outline.title=ডকà§à¦®à§‡à¦¨à§à¦Ÿ আউটলাইন দেখান (দà§à¦¬à¦¾à¦° কà§à¦²à¦¿à¦• করà§à¦¨ বাড়াতে//collapse সমসà§à¦¤ আইটেম) +document_outline_label=ডকà§à¦®à§‡à¦¨à§à¦Ÿ আউটলাইন attachments.title=সংযà§à¦•à§à¦¤à¦¿à¦¸à¦®à§‚হ দেখান attachments_label=সংযà§à¦•à§à¦¤ বসà§à¦¤à§ thumbs.title=থামà§à¦¬-নেইল পà§à¦°à¦¦à¦°à§à¦¶à¦¨ @@ -111,7 +116,6 @@ thumb_page_title=পৃষà§à¦ া {{page}} thumb_page_canvas=পৃষà§à¦ া {{page}}-র থামà§à¦¬-নেইল # Find panel button title and messages -find_label=অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨: find_previous.title=চিহà§à¦¨à¦¿à¦¤ পংকà§à¦¤à¦¿à¦° পূরà§à¦¬à¦¬à¦°à§à¦¤à§€ উপসà§à¦¥à¦¿à¦¤à¦¿ অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨ করà§à¦¨ find_previous_label=পূরà§à¦¬à¦¬à¦°à§à¦¤à§€ find_next.title=চিহà§à¦¨à¦¿à¦¤ পংকà§à¦¤à¦¿à¦° পরবরà§à¦¤à§€ উপসà§à¦¥à¦¿à¦¤à¦¿ অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨ করà§à¦¨ diff --git a/vendor/pdfjs/web/locale/br/viewer.properties b/vendor/pdfjs/web/locale/br/viewer.properties index f967227..94dac29 100644 --- a/vendor/pdfjs/web/locale/br/viewer.properties +++ b/vendor/pdfjs/web/locale/br/viewer.properties @@ -18,12 +18,15 @@ previous_label=A-raok next.title=Pajenn war-lerc'h next_label=War-lerc'h -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Pajenn : -page_of=eus {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Pajenn +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=eus {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} war {{pagesCount}}) zoom_out.title=Zoum bihanaat zoom_out_label=Zoum bihanaat @@ -57,10 +60,6 @@ page_rotate_ccw.title=C'hwelañ gant roud gin ar bizied page_rotate_ccw.label=C'hwelañ gant roud gin ar bizied page_rotate_ccw_label=C'hwelañ gant roud gin ar bizied -hand_tool_enable.title=Gweredekaat an ostilh "dorn" -hand_tool_enable_label=Gweredekaat an ostilh "dorn" -hand_tool_disable.title=Diweredekaat an ostilh "dorn" -hand_tool_disable_label=Diweredekaat an ostilh "dorn" # Document properties dialog box document_properties.title=Perzhioù an teul… @@ -88,13 +87,20 @@ document_properties_version=Handelv PDF : document_properties_page_count=Niver a bajennoù : document_properties_close=Serriñ +print_progress_message=O prientiñ an teul evit moullañ... +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Nullañ + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Diskouez/kuzhat ar varrenn gostez +toggle_sidebar_notification.title=Trec'haoliñ ar verrenn-gostez (ur steuñv pe stagadennoù a zo en teul) toggle_sidebar_label=Diskouez/kuzhat ar varrenn gostez -outline.title=Diskouez ar sinedoù -outline_label=Sinedoù an teuliad +document_outline.title=Diskouez steuñv an teul (daouglikit evit brasaat/bihanaat an holl elfennoù) +document_outline_label=Sinedoù an teuliad attachments.title=Diskouez ar c'henstagadurioù attachments_label=Kenstagadurioù thumbs.title=Diskouez ar melvennoù @@ -111,7 +117,8 @@ thumb_page_title=Pajenn {{page}} thumb_page_canvas=Melvenn ar bajenn {{page}} # Find panel button title and messages -find_label=Kavout : +find_input.title=Klask +find_input.placeholder=Klask e-barzh an teuliad find_previous.title=Kavout an tamm frazenn kent o klotañ ganti find_previous_label=Kent find_next.title=Kavout an tamm frazenn war-lerc'h o klotañ ganti @@ -170,4 +177,4 @@ password_cancel=Nullañ printing_not_supported=Kemenn : N'eo ket skoret penn-da-benn ar moullañ gant ar merdeer-mañ. printing_not_ready=Kemenn : N'hall ket bezañ moullet ar restr PDF rak n'eo ket karget penn-da-benn. web_fonts_disabled=Diweredekaet eo an nodrezhoù web : n'haller ket arverañ an nodrezhoù PDF enframmet. -document_colors_not_allowed=N'eo ket aotreet an teuliadoù PDF da arverañ o livioù dezho : diweredekaet eo 'Aotren ar pajennoù da zibab o livioù dezho' e-barzh ar merdeer. +document_colors_not_allowed=N'eo ket aotreet an teuliadoù PDF da arverañ o livioù dezho : diweredekaet eo “Aotren ar pajennoù da zibab o livioù dezho†e-barzh ar merdeer. diff --git a/vendor/pdfjs/web/locale/bs/viewer.properties b/vendor/pdfjs/web/locale/bs/viewer.properties index ccc8bec..64735be 100644 --- a/vendor/pdfjs/web/locale/bs/viewer.properties +++ b/vendor/pdfjs/web/locale/bs/viewer.properties @@ -18,12 +18,15 @@ previous_label=Prethodna next.title=Sljedeća strna next_label=Sljedeća -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Strana: -page_of=od {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Strana +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=od {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} od {{pagesCount}}) zoom_out.title=Umanji zoom_out_label=Umanji @@ -57,10 +60,6 @@ page_rotate_ccw.title=Rotiraj suprotno smjeru kazaljke na satu page_rotate_ccw.label=Rotiraj suprotno smjeru kazaljke na satu page_rotate_ccw_label=Rotiraj suprotno smjeru kazaljke na satu -hand_tool_enable.title=Omogući ruÄni alat -hand_tool_enable_label=Omogući ruÄni alat -hand_tool_disable.title=Onemogući ruÄni alat -hand_tool_disable_label=Onemogući ruÄni alat # Document properties dialog box document_properties.title=Svojstva dokumenta... @@ -88,13 +87,20 @@ document_properties_version=PDF verzija: document_properties_page_count=Broj stranica: document_properties_close=Zatvori +print_progress_message=Pripremam dokument za Å¡tampu… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Otkaži + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=UkljuÄi/iskljuÄi boÄnu traku +toggle_sidebar_notification.title=UkljuÄi/iskljuÄi sidebar (dokument sadrži outline/priloge) toggle_sidebar_label=UkljuÄi/iskljuÄi boÄnu traku -outline.title=Prikaži konture dokumenta -outline_label=Konture dokumenta +document_outline.title=Prikaži outline dokumenta (dvoklik za skupljanje/Å¡irenje svih stavki) +document_outline_label=Konture dokumenta attachments.title=Prikaži priloge attachments_label=Prilozi thumbs.title=Prikaži thumbnailove @@ -111,7 +117,8 @@ thumb_page_title=Strana {{page}} thumb_page_canvas=Thumbnail strane {{page}} # Find panel button title and messages -find_label=PronaÄ‘i: +find_input.title=PronaÄ‘i +find_input.placeholder=PronaÄ‘i u dokumentu… find_previous.title=PronaÄ‘i prethodno pojavljivanje fraze find_previous_label=Prethodno find_next.title=PronaÄ‘i sljedeće pojavljivanje fraze diff --git a/vendor/pdfjs/web/locale/ca/viewer.properties b/vendor/pdfjs/web/locale/ca/viewer.properties index 6b85bb1..2bc7ffa 100644 --- a/vendor/pdfjs/web/locale/ca/viewer.properties +++ b/vendor/pdfjs/web/locale/ca/viewer.properties @@ -18,12 +18,15 @@ previous_label=Anterior next.title=Pà gina següent next_label=Següent -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Pà gina: -page_of=de {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Pà gina +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=de {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} de {{pagesCount}}) zoom_out.title=Allunya zoom_out_label=Allunya @@ -57,10 +60,10 @@ page_rotate_ccw.title=Gira cap a l'esquerra page_rotate_ccw.label=Gira cap a l'esquerra page_rotate_ccw_label=Gira cap a l'esquerra -hand_tool_enable.title=Habilita l'eina de mà -hand_tool_enable_label=Habilita l'eina de mà -hand_tool_disable.title=Inhabilita l'eina de mà -hand_tool_disable_label=Inhabilita l'eina de mà +cursor_text_select_tool.title=Habilita l'eina de selecció de text +cursor_text_select_tool_label=Eina de selecció de text +cursor_hand_tool.title=Habilita l'eina de mà +cursor_hand_tool_label=Eina de mà # Document properties dialog box document_properties.title=Propietats del document… @@ -88,13 +91,20 @@ document_properties_version=Versió de PDF: document_properties_page_count=Nombre de pà gines: document_properties_close=Tanca +print_progress_message=S'està preparant la impressió del document… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancel·la + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Mostra/amaga la barra lateral +toggle_sidebar_notification.title=Mostra/amaga la barra lateral (el document conté un esquema o adjuncions) toggle_sidebar_label=Mostra/amaga la barra lateral -outline.title=Mostra el contorn del document -outline_label=Contorn del document +document_outline.title=Mostra l'esquema del document (doble clic per ampliar/reduir tots els elements) +document_outline_label=Contorn del document attachments.title=Mostra les adjuncions attachments_label=Adjuncions thumbs.title=Mostra les miniatures @@ -111,7 +121,8 @@ thumb_page_title=Pà gina {{page}} thumb_page_canvas=Miniatura de la pà gina {{page}} # Find panel button title and messages -find_label=Cerca: +find_input.title=Cerca +find_input.placeholder=Cerca al document… find_previous.title=Cerca l'anterior coincidència de l'expressió find_previous_label=Anterior find_next.title=Cerca la següent coincidència de l'expressió @@ -169,5 +180,5 @@ password_cancel=Cancel·la printing_not_supported=AvÃs: la impressió no és plenament funcional en aquest navegador. printing_not_ready=Atenció: el PDF no s'ha acabat de carregar per imprimir-lo. -web_fonts_disabled=Les fonts web estan inhabilitades: no es poden incrustar fitxers PDF. +web_fonts_disabled=Els tipus de lletra web estan desactivats: no es poden utilitzar els tipus de lletra incrustats al PDF. document_colors_not_allowed=Els documents PDF no poden usar els seus colors propis: «Permet a les pà gines triar els colors propis» es troba desactivat al navegador. diff --git a/vendor/pdfjs/web/locale/cs/viewer.properties b/vendor/pdfjs/web/locale/cs/viewer.properties index e1ab256..13b36fc 100644 --- a/vendor/pdfjs/web/locale/cs/viewer.properties +++ b/vendor/pdfjs/web/locale/cs/viewer.properties @@ -13,24 +13,27 @@ # limitations under the License. # Main toolbar buttons (tooltips and alt text for images) -previous.title=PÅ™edchozà stránka +previous.title=PÅ™ejde na pÅ™edchozà stránku previous_label=PÅ™edchozà -next.title=DalÅ¡Ã stránka +next.title=PÅ™ejde na následujÃcà stránku next_label=DalÅ¡Ã -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Stránka: -page_of=z {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Stránka +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=z {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} z {{pagesCount}}) zoom_out.title=ZmenÅ¡Ã velikost zoom_out_label=ZmenÅ¡it zoom_in.title=ZvÄ›tÅ¡Ã velikost zoom_in_label=ZvÄ›tÅ¡it zoom.title=Nastavà velikost -presentation_mode.title=PÅ™epne režimu prezentace +presentation_mode.title=PÅ™epne do režimu prezentace presentation_mode_label=Režim prezentace open_file.title=OtevÅ™e soubor open_file_label=OtevÅ™Ãt @@ -38,8 +41,8 @@ print.title=Vytiskne dokument print_label=Tisk download.title=Stáhne dokument download_label=Stáhnout -bookmark.title=Aktuálnà pohled (kopÃrovat nebo otevÅ™Ãt v novém oknÄ›) -bookmark_label=Aktuálnà pohled +bookmark.title=SouÄasný pohled (kopÃrovat nebo otevÅ™Ãt v novém oknÄ›) +bookmark_label=SouÄasný pohled # Secondary toolbar and context menu tools.title=Nástroje @@ -57,24 +60,30 @@ page_rotate_ccw.title=OtoÄà proti smÄ›ru hodin page_rotate_ccw.label=OtoÄit proti smÄ›ru hodin page_rotate_ccw_label=OtoÄit proti smÄ›ru hodin -hand_tool_enable.title=Povolit nástroj ruÄiÄka -hand_tool_enable_label=Povolit nástroj ruÄiÄka -hand_tool_disable.title=Zakázat nástroj ruÄiÄka -hand_tool_disable_label=Zakázat nástroj ruÄiÄka +cursor_text_select_tool.title=Povolà výbÄ›r textu +cursor_text_select_tool_label=VýbÄ›r textu +cursor_hand_tool.title=Povolà nástroj ruÄiÄka +cursor_hand_tool_label=Nástroj ruÄiÄka # Document properties dialog box document_properties.title=Vlastnosti dokumentu… document_properties_label=Vlastnosti dokumentu… document_properties_file_name=Název souboru: document_properties_file_size=Velikost souboru: -document_properties_kb={{size_kb}} kB ({{size_b}} bajtů) +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bajtů) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. document_properties_mb={{size_mb}} MB ({{size_b}} bajtů) document_properties_title=Nadpis: document_properties_author=Autor: -document_properties_subject=Subjekt: +document_properties_subject=PÅ™edmÄ›t: document_properties_keywords=KlÃÄová slova: document_properties_creation_date=Datum vytvoÅ™enÃ: document_properties_modification_date=Datum úpravy: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. document_properties_date_string={{date}}, {{time}} document_properties_creator=VytvoÅ™il: document_properties_producer=Tvůrce PDF: @@ -82,13 +91,20 @@ document_properties_version=Verze PDF: document_properties_page_count=PoÄet stránek: document_properties_close=ZavÅ™Ãt +print_progress_message=PÅ™Ãprava dokumentu pro tisk… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}} % +print_progress_close=ZruÅ¡it + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Postrannà liÅ¡ta +toggle_sidebar_notification.title=PÅ™epne postrannà liÅ¡tu (dokument obsahuje osnovu/pÅ™Ãlohy) toggle_sidebar_label=Postrannà liÅ¡ta -outline.title=Zobrazà osnovu dokumentu -outline_label=Osnova dokumentu +document_outline.title=Zobrazà osnovu dokumentu (dvojité klepnutà rozbalÃ/sbalà vÅ¡echny položky) +document_outline_label=Osnova dokumentu attachments.title=Zobrazà pÅ™Ãlohy attachments_label=PÅ™Ãlohy thumbs.title=Zobrazà náhledy @@ -105,16 +121,17 @@ thumb_page_title=Strana {{page}} thumb_page_canvas=Náhled strany {{page}} # Find panel button title and messages -find_label=NajÃt: -find_previous.title=Najde pÅ™edchozà výskyt hledaného spojenà +find_input.title=NajÃt +find_input.placeholder=NajÃt v dokumentu… +find_previous.title=Najde pÅ™edchozà výskyt hledaného textu find_previous_label=PÅ™edchozà -find_next.title=Najde dalÅ¡Ã výskyt hledaného spojenà +find_next.title=Najde dalÅ¡Ã výskyt hledaného textu find_next_label=DalÅ¡Ã find_highlight=Zvýraznit find_match_case_label=RozliÅ¡ovat velikost find_reached_top=Dosažen zaÄátek dokumentu, pokraÄuje se od konce -find_reached_bottom=Dosažen konec dokumentu, pokraÄuje se o zaÄátku -find_not_found=Hledané spojenà nenalezeno +find_reached_bottom=Dosažen konec dokumentu, pokraÄuje se od zaÄátku +find_not_found=Hledaný text nenalezen # Error panel labels error_more_info=VÃce informacà @@ -132,7 +149,7 @@ error_stack=ZásobnÃk: {{stack}} # LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename error_file=Soubor: {{file}} # LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number -error_line=Řádka: {{line}} +error_line=Řádek: {{line}} rendering_error=PÅ™i vykreslovánà stránky nastala chyba. # Predefined zoom values @@ -164,4 +181,4 @@ password_cancel=ZruÅ¡it printing_not_supported=UpozornÄ›nÃ: Tisk nenà v tomto prohlÞeÄi plnÄ› podporován. printing_not_ready=UpozornÄ›nÃ: Dokument PDF nenà kompletnÄ› naÄten. web_fonts_disabled=Webová pÃsma jsou zakázána, proto nenà možné použÃt vložená pÃsma PDF. -document_colors_disabled=PDF dokumenty nemajà povoleny použÃvánà vlastnÃch barev: volba "Povolit stránkám použÃvat vlastnà barvy namÃsto výše zvolených" je v prohlÞeÄi deaktivována. +document_colors_not_allowed=PDF dokumenty nemajà povoleno použÃvat vlastnà barvy: volba 'Povolit stránkám použÃvat vlastnà barvy' je v prohlÞeÄi deaktivována. diff --git a/vendor/pdfjs/web/locale/cy/viewer.properties b/vendor/pdfjs/web/locale/cy/viewer.properties index 3762815..193768b 100644 --- a/vendor/pdfjs/web/locale/cy/viewer.properties +++ b/vendor/pdfjs/web/locale/cy/viewer.properties @@ -18,12 +18,15 @@ previous_label=Blaenorol next.title=Tudalen Nesaf next_label=Nesaf -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Tudalen: -page_of=o {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Tudalen +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=o {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} o {{pagesCount}}) zoom_out.title=Chwyddo Allan zoom_out_label=Chwyddo Allan @@ -57,10 +60,10 @@ page_rotate_ccw.title=Cylchdroi Gwrthglocwedd page_rotate_ccw.label=Cylchdroi Gwrthglocwedd page_rotate_ccw_label=Cylchdroi Gwrthglocwedd -hand_tool_enable.title=Galluogi offeryn llaw -hand_tool_enable_label=Galluogi offeryn llaw -hand_tool_disable.title=Analluogi offeryn llaw -hand_tool_disable_label=Analluogi offeryn llaw +cursor_text_select_tool.title=Galluogi Dewis Offeryn Testun +cursor_text_select_tool_label=Offeryn Dewis Testun +cursor_hand_tool.title=Galluogi Offeryn Llaw +cursor_hand_tool_label=Offeryn Llaw # Document properties dialog box document_properties.title=Priodweddau Dogfen… @@ -88,13 +91,20 @@ document_properties_version=Fersiwn PDF: document_properties_page_count=Cyfrif Tudalen: document_properties_close=Cau +print_progress_message=Paratoi dogfen ar gyfer ei hargraffu… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Diddymu + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Toglo'r Bar Ochr +toggle_sidebar_notification.title=Toglo'r Bar Ochr (mae'r ddogfen yn cynnwys outline/attachments) toggle_sidebar_label=Toglo'r Bar Ochr -outline.title=Dangos Amlinell Dogfen -outline_label=Amlinelliad Dogfen +document_outline.title=Dangos Amlinell Dogfen (clic dwbl i ymestyn/cau pob eitem) +document_outline_label=Amlinelliad Dogfen attachments.title=Dangos Atodiadau attachments_label=Atodiadau thumbs.title=Dangos Lluniau Bach @@ -111,7 +121,8 @@ thumb_page_title=Tudalen {{page}} thumb_page_canvas=Llun Bach Tudalen {{page}} # Find panel button title and messages -find_label=Canfod: +find_input.title=Canfod +find_input.placeholder=Canfod yn y ddogfen… find_previous.title=Canfod enghraifft flaenorol o'r ymadrodd find_previous_label=Blaenorol find_next.title=Canfod enghraifft nesaf yr ymadrodd @@ -169,5 +180,5 @@ password_cancel=Diddymu printing_not_supported=Rhybudd: Nid yw argraffu yn cael ei gynnal yn llawn gan y porwr. printing_not_ready=Rhybudd: Nid yw'r PDF wedi ei lwytho'n llawn ar gyfer argraffu. -web_fonts_disabled=Ffontiau gwe wedi eu hanablu: methu defnyddio ffontiau PDF mewnblanedig. -document_colors_not_allowed=Nid oes caniatâd i ddogfennau PDF i ddefnyddio eu lliwiau eu hunain: Mae 'Caniatáu i dudalennau ddefnyddio eu lliwiau eu hunain' wedi ei atal yn y porwr. +web_fonts_disabled=Ffontiau gwe wedi eu hanalluogi: methu defnyddio ffontiau PDF mewnblanedig. +document_colors_not_allowed=Nid oes caniatâd i ddogfennau PDF i ddefnyddio eu lliwiau eu hunain: Mae “Caniatáu i dudalennau ddefnyddio eu lliwiau eu hunain†wedi ei atal yn y porwr. diff --git a/vendor/pdfjs/web/locale/da/viewer.properties b/vendor/pdfjs/web/locale/da/viewer.properties index ddd428b..765d6a7 100644 --- a/vendor/pdfjs/web/locale/da/viewer.properties +++ b/vendor/pdfjs/web/locale/da/viewer.properties @@ -18,12 +18,15 @@ previous_label=Forrige next.title=Næste side next_label=Næste -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Side: -page_of=af {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Side +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=af {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} af {{pagesCount}}) zoom_out.title=Zoom ud zoom_out_label=Zoom ud @@ -57,17 +60,21 @@ page_rotate_ccw.title=Roter mod uret page_rotate_ccw.label=Roter mod uret page_rotate_ccw_label=Roter mod uret -hand_tool_enable.title=Aktiver hÃ¥ndværktøj -hand_tool_enable_label=Aktiver hÃ¥ndværktøj -hand_tool_disable.title=Deaktiver hÃ¥ndværktøj -hand_tool_disable_label=Deaktiver hÃ¥ndværktøj +cursor_text_select_tool.title=Aktiver markeringsværktøj +cursor_text_select_tool_label=Markeringsværktøj +cursor_hand_tool.title=Aktiver hÃ¥ndværktøj +cursor_hand_tool_label=HÃ¥ndværktøj # Document properties dialog box document_properties.title=Dokumentegenskaber… document_properties_label=Dokumentegenskaber… document_properties_file_name=Filnavn: document_properties_file_size=Filstørrelse: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. document_properties_mb={{size_mb}} MB ({{size_b}} bytes) document_properties_title=Titel: document_properties_author=Forfatter: @@ -75,6 +82,8 @@ document_properties_subject=Emne: document_properties_keywords=Nøgleord: document_properties_creation_date=Oprettet: document_properties_modification_date=Redigeret: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. document_properties_date_string={{date}}, {{time}} document_properties_creator=Program: document_properties_producer=PDF-producent: @@ -82,13 +91,20 @@ document_properties_version=PDF-version: document_properties_page_count=Antal sider: document_properties_close=Luk +print_progress_message=Forbereder dokument til udskrivning… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Annuller + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=SlÃ¥ sidepanel til eller fra +toggle_sidebar_notification.title=SlÃ¥ sidepanel til eller fra (dokumentet indeholder disposition/vedhæftede filer) toggle_sidebar_label=SlÃ¥ sidepanel til eller fra -outline.title=Vis dokumentets disposition -outline_label=Dokument-disposition +document_outline.title=Vis dokumentets disposition (dobbeltklik for at vise/skjule alle elementer) +document_outline_label=Dokument-disposition attachments.title=Vis vedhæftede filer attachments_label=Vedhæftede filer thumbs.title=Vis miniaturer @@ -105,7 +121,8 @@ thumb_page_title=Side {{page}} thumb_page_canvas=Miniature af side {{page}} # Find panel button title and messages -find_label=Find: +find_input.title=Find +find_input.placeholder=Find i dokument… find_previous.title=Find den forrige forekomst find_previous_label=Forrige find_next.title=Find den næste forekomst @@ -164,4 +181,4 @@ password_cancel=Fortryd printing_not_supported=Advarsel: Udskrivning er ikke fuldt understøttet af browseren. printing_not_ready=Advarsel: PDF-filen er ikke fuldt indlæst til udskrivning. web_fonts_disabled=Webskrifttyper er deaktiverede. De indlejrede skrifttyper i PDF-filen kan ikke anvendes. -document_colors_disabled=PDF-dokumenter mÃ¥ ikke bruge deres egne farver: \u0022'Tillad sider at vælge deres egne farver\u0022' er deaktiveret i browseren. +document_colors_not_allowed=PDF-dokumenter mÃ¥ ikke bruge deres egne farver: 'Tillad sider at vælge deres egne farver' er deaktiveret i browseren. diff --git a/vendor/pdfjs/web/locale/de/viewer.properties b/vendor/pdfjs/web/locale/de/viewer.properties index 685154c..3f5a4e2 100644 --- a/vendor/pdfjs/web/locale/de/viewer.properties +++ b/vendor/pdfjs/web/locale/de/viewer.properties @@ -18,12 +18,15 @@ previous_label=Zurück next.title=Eine Seite vor next_label=Vor -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Seite: -page_of=von {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Seite +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=von {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} von {{pagesCount}}) zoom_out.title=Verkleinern zoom_out_label=Verkleinern @@ -57,17 +60,21 @@ page_rotate_ccw.title=Gegen Uhrzeigersinn drehen page_rotate_ccw.label=Gegen Uhrzeigersinn drehen page_rotate_ccw_label=Gegen Uhrzeigersinn drehen -hand_tool_enable.title=Hand-Werkzeug aktivieren -hand_tool_enable_label=Hand-Werkzeug aktivieren -hand_tool_disable.title=Hand-Werkzeug deaktivieren -hand_tool_disable_label=Hand-Werkzeug deaktivieren +cursor_text_select_tool.title=Textauswahl-Werkzeug aktivieren +cursor_text_select_tool_label=Textauswahl-Werkzeug +cursor_hand_tool.title=Hand-Werkzeug aktivieren +cursor_hand_tool_label=Hand-Werkzeug # Document properties dialog box document_properties.title=Dokumenteigenschaften document_properties_label=Dokumenteigenschaften… document_properties_file_name=Dateiname: document_properties_file_size=Dateigröße: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. document_properties_kb={{size_kb}} KB ({{size_b}} Bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. document_properties_mb={{size_mb}} MB ({{size_b}} Bytes) document_properties_title=Titel: document_properties_author=Autor: @@ -75,6 +82,8 @@ document_properties_subject=Thema: document_properties_keywords=Stichwörter: document_properties_creation_date=Erstelldatum: document_properties_modification_date=Bearbeitungsdatum: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. document_properties_date_string={{date}} {{time}} document_properties_creator=Anwendung: document_properties_producer=PDF erstellt mit: @@ -82,13 +91,20 @@ document_properties_version=PDF-Version: document_properties_page_count=Seitenzahl: document_properties_close=Schließen +print_progress_message=Dokument wird für Drucken vorbereitet… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Abbrechen + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Sidebar umschalten +toggle_sidebar_notification.title=Sidebar umschalten (Dokument enthält Dokumentstruktur/Anhänge) toggle_sidebar_label=Sidebar umschalten -outline.title=Dokumentstruktur anzeigen -outline_label=Dokumentstruktur +document_outline.title=Dokumentstruktur anzeigen (Doppelklicken, um alle Einträge aus- bzw. einzuklappen) +document_outline_label=Dokumentstruktur attachments.title=Anhänge anzeigen attachments_label=Anhänge thumbs.title=Miniaturansichten anzeigen @@ -105,10 +121,11 @@ thumb_page_title=Seite {{page}} thumb_page_canvas=Miniaturansicht von Seite {{page}} # Find panel button title and messages -find_label=Suchen: -find_previous.title=Vorheriges Auftreten des Suchbegriffs finden +find_input.title=Suchen +find_input.placeholder=Im Dokument suchen… +find_previous.title=Vorheriges Vorkommen des Suchbegriffs finden find_previous_label=Zurück -find_next.title=Nächstes Auftreten des Suchbegriffs finden +find_next.title=Nächstes Vorkommen des Suchbegriffs finden find_next_label=Weiter find_highlight=Alle hervorheben find_match_case_label=Groß-/Kleinschreibung beachten @@ -164,4 +181,4 @@ password_cancel=Abbrechen printing_not_supported=Warnung: Die Drucken-Funktion wird durch diesen Browser nicht vollständig unterstützt. printing_not_ready=Warnung: Die PDF-Datei ist nicht vollständig geladen, dies ist für das Drucken aber empfohlen. web_fonts_disabled=Web-Schriftarten sind deaktiviert: Eingebettete PDF-Schriftarten konnten nicht geladen werden. -document_colors_disabled=PDF-Dokumenten ist es nicht erlaubt, ihre eigenen Farben zu verwenden: \'Seiten das Verwenden von eigenen Farben erlauben\' ist im Browser deaktiviert. +document_colors_not_allowed=PDF-Dokumenten ist es nicht erlaubt, ihre eigenen Farben zu verwenden: 'Seiten das Verwenden von eigenen Farben erlauben' ist im Browser deaktiviert. diff --git a/vendor/pdfjs/web/locale/el/viewer.properties b/vendor/pdfjs/web/locale/el/viewer.properties index 9d968c9..5e3f6ee 100644 --- a/vendor/pdfjs/web/locale/el/viewer.properties +++ b/vendor/pdfjs/web/locale/el/viewer.properties @@ -18,19 +18,22 @@ previous_label=Î ÏοηγοÏμενη next.title=Επόμενη σελίδα next_label=Επόμενη -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Σελίδα: -page_of=από {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Σελίδα +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=από {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} από {{pagesCount}}) zoom_out.title=ΣμίκÏυνση zoom_out_label=ΣμίκÏυνση zoom_in.title=ΜεγÎθυνση zoom_in_label=ΜεγÎθυνση -zoom.title=ΜεγÎθυνση -presentation_mode.title=Μετάβαση σε λειτουÏγία παÏουσίασης +zoom.title=Ζουμ +presentation_mode.title=Εναλλαγή σε λειτουÏγία παÏουσίασης presentation_mode_label=ΛειτουÏγία παÏουσίασης open_file.title=Άνοιγμα αÏχείου open_file_label=Άνοιγμα @@ -38,7 +41,7 @@ print.title=ΕκτÏπωση print_label=ΕκτÏπωση download.title=Λήψη download_label=Λήψη -bookmark.title=ΤÏÎχουσα Ï€Ïοβολή (αντίγÏαφο ή άνοιγμα σε νÎο παÏάθυÏο) +bookmark.title=ΤÏÎχουσα Ï€Ïοβολή (αντιγÏαφή ή άνοιγμα σε νÎο παÏάθυÏο) bookmark_label=ΤÏÎχουσα Ï€Ïοβολή # Secondary toolbar and context menu @@ -47,9 +50,9 @@ tools_label=ΕÏγαλεία first_page.title=Μετάβαση στην Ï€Ïώτη σελίδα first_page.label=Μετάβαση στην Ï€Ïώτη σελίδα first_page_label=Μετάβαση στην Ï€Ïώτη σελίδα -last_page.title=Μετάβαση στη τελευταία σελίδα -last_page.label=Μετάβαση στη τελευταία σελίδα -last_page_label=Μετάβαση στη τελευταία σελίδα +last_page.title=Μετάβαση στην τελευταία σελίδα +last_page.label=Μετάβαση στην τελευταία σελίδα +last_page_label=Μετάβαση στην τελευταία σελίδα page_rotate_cw.title=ΔεξιόστÏοφη πεÏιστÏοφή page_rotate_cw.label=ΔεξιόστÏοφη πεÏιστÏοφή page_rotate_cw_label=ΔεξιόστÏοφη πεÏιστÏοφή @@ -57,10 +60,10 @@ page_rotate_ccw.title=ΑÏιστεÏόστÏοφη πεÏιστÏοφή page_rotate_ccw.label=ΑÏιστεÏόστÏοφη πεÏιστÏοφή page_rotate_ccw_label=ΑÏιστεÏόστÏοφη πεÏιστÏοφή -hand_tool_enable.title=ΕνεÏγοποίηση εÏγαλείου χεÏÎ¹Î¿Ï -hand_tool_enable_label=ΕνεÏγοποίηση εÏγαλείου χεÏÎ¹Î¿Ï -hand_tool_disable.title=ΑπενεÏγοποίηση εÏγαλείου χεÏÎ¹Î¿Ï -hand_tool_disable_label=ΑπενεÏγοποίηση εÏγαλείου χεÏÎ¹Î¿Ï +cursor_text_select_tool.title=ΕνεÏγοποίηση εÏγαλείου επιλογής κειμÎνου +cursor_text_select_tool_label=ΕÏγαλείο επιλογής κειμÎνου +cursor_hand_tool.title=ΕνεÏγοποίηση εÏγαλείου χεÏÎ¹Î¿Ï +cursor_hand_tool_label=ΕÏγαλείο χεÏÎ¹Î¿Ï # Document properties dialog box document_properties.title=Ιδιότητες εγγÏάφου… @@ -69,8 +72,10 @@ document_properties_file_name=Όνομα αÏχείου: document_properties_file_size=ÎœÎγεθος αÏχείου: # LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" # will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) # LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" # will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) document_properties_title=Τίτλος: document_properties_author=ΣυγγÏαφÎας: document_properties_subject=ΘÎμα: @@ -79,20 +84,28 @@ document_properties_creation_date=ΗμεÏομηνία δημιουÏγίας: document_properties_modification_date=ΗμεÏομηνία Ï„Ïοποποίησης: # LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" # will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} document_properties_creator=ΔημιουÏγός: document_properties_producer=ΠαÏαγωγός PDF: document_properties_version=Έκδοση PDF: document_properties_page_count=ΑÏιθμός σελίδων: document_properties_close=Κλείσιμο +print_progress_message=Î Ïοετοιμασία του εγγÏάφου για εκτÏπωση… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=ΆκυÏο + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) -toggle_sidebar.title=Εναλλαγή Ï€Ïοβολής πλευÏικής στήλης -toggle_sidebar_label=Εναλλαγή Ï€Ïοβολής πλευÏικής στήλης -outline.title=Î Ïοβολή διάÏθÏωσης κειμÎνου -outline_label=ΔιάÏθÏωση κειμÎνου -attachments.title=Î Ïοβολή συνημμÎνου +toggle_sidebar.title=(Απ)ενεÏγοποίηση πλευÏικής στήλης +toggle_sidebar_notification.title=(Απ)ενεÏγοποίηση πλευÏικής στήλης (το ÎγγÏαφο πεÏιÎχει πεÏίγÏαμμα/συνημμÎνα) +toggle_sidebar_label=(Απ)ενεÏγοποίηση πλευÏικής στήλης +document_outline.title=Εμφάνιση διάÏθÏωσης εγγÏάφου (διπλό κλικ για ανάπτυξη/σÏμπτυξη όλων των στοιχείων) +document_outline_label=ΔιάÏθÏωση εγγÏάφου +attachments.title=Î Ïοβολή συνημμÎνων attachments_label=ΣυνημμÎνα thumbs.title=Î Ïοβολή μικÏογÏαφιών thumbs_label=ΜικÏογÏαφίες @@ -108,7 +121,8 @@ thumb_page_title=Σελίδα {{page}} thumb_page_canvas=ΜικÏογÏαφία της σελίδας {{page}} # Find panel button title and messages -find_label=ΕÏÏεση: +find_input.title=ΕÏÏεση +find_input.placeholder=ΕÏÏεση στο ÎγγÏαφο… find_previous.title=ΕÏÏεση της Ï€ÏοηγοÏμενης εμφάνισης της φÏάσης find_previous_label=Î ÏοηγοÏμενο find_next.title=ΕÏÏεση της επόμενης εμφάνισης της φÏάσης @@ -125,29 +139,34 @@ error_less_info=ΛιγότεÏες πληÏοφοÏίες error_close=Κλείσιμο # LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be # replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) # LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an # english string describing the error. error_message=Μήνυμα: {{message}} # LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack # trace. +error_stack=Στοίβα: {{stack}} # LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename error_file=ΑÏχείο: {{file}} # LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=ΓÏαμμή: {{line}} rendering_error=Î ÏοÎκυψε σφάλμα κατά την ανάλυση της σελίδας. # Predefined zoom values page_scale_width=Πλάτος σελίδας page_scale_fit=ÎœÎγεθος σελίδας -page_scale_auto=Αυτόματη μεγÎθυνση +page_scale_auto=Αυτόματο ζουμ page_scale_actual=Î Ïαγματικό μÎγεθος # LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a # numerical scale value. +page_scale_percent={{scale}}% # Loading indicator messages loading_error_indicator=Σφάλμα loading_error=Î ÏοÎκυψε Îνα σφάλμα κατά τη φόÏτωση του PDF. invalid_file_error=Μη ÎγκυÏο ή κατεστÏαμμÎνο αÏχείο PDF. missing_file_error=Λείπει αÏχείο PDF. +unexpected_response_error=Μη αναμενόμενη απόκÏιση από το διακομιστή. # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in @@ -162,4 +181,4 @@ password_cancel=ΑκÏÏωση printing_not_supported=Î Ïοειδοποίηση: Η εκτÏπωση δεν υποστηÏίζεται πλήÏως από αυτόν τον πεÏιηγητή. printing_not_ready=Î Ïοειδοποίηση: Το PDF δεν φοÏτώθηκε πλήÏως για εκτÏπωση. web_fonts_disabled=Οι γÏαμματοσειÏÎÏ‚ Web απενεÏγοποιημÎνες: αδυναμία χÏήσης των ενσωματωμÎνων γÏαμματοσειÏών PDF. -document_colors_disabled=Δεν επιτÏÎπεται στα ÎγγÏαφα PDF να χÏησιμοποιοÏν τα δικά τους χÏώματα: Η επιλογή \'Îα επιτÏÎπεται η χÏήση χÏωμάτων της σελίδας\' δεν είναι ενεÏγή στην εφαÏμογή. +document_colors_not_allowed=Στα PDF ÎγγÏαφα δεν επιτÏÎπεται να χÏησιμοποιοÏν τα δικά τους χÏώματα: Το “Îα επιτÏÎπεται στις σελίδες να επιλÎγουν τα δικά τους χÏώματα†είναι απενεÏγοποιημÎνο στον πεÏιηγητή. diff --git a/vendor/pdfjs/web/locale/en-GB/viewer.properties b/vendor/pdfjs/web/locale/en-GB/viewer.properties index f9e1dfb..a3e0bab 100644 --- a/vendor/pdfjs/web/locale/en-GB/viewer.properties +++ b/vendor/pdfjs/web/locale/en-GB/viewer.properties @@ -18,12 +18,15 @@ previous_label=Previous next.title=Next Page next_label=Next -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Page: -page_of=of {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Page +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=of {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} of {{pagesCount}}) zoom_out.title=Zoom Out zoom_out_label=Zoom Out @@ -57,17 +60,21 @@ page_rotate_ccw.title=Rotate Anti-Clockwise page_rotate_ccw.label=Rotate Anti-Clockwise page_rotate_ccw_label=Rotate Anti-Clockwise -hand_tool_enable.title=Enable hand tool -hand_tool_enable_label=Enable hand tool -hand_tool_disable.title=Disable hand tool -hand_tool_disable_label=Disable hand tool +cursor_text_select_tool.title=Enable Text Selection Tool +cursor_text_select_tool_label=Text Selection Tool +cursor_hand_tool.title=Enable Hand Tool +cursor_hand_tool_label=Hand Tool # Document properties dialog box document_properties.title=Document Properties… document_properties_label=Document Properties… document_properties_file_name=File name: document_properties_file_size=File size: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. document_properties_kb={{size_kb}} kB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. document_properties_mb={{size_mb}} MB ({{size_b}} bytes) document_properties_title=Title: document_properties_author=Author: @@ -75,6 +82,8 @@ document_properties_subject=Subject: document_properties_keywords=Keywords: document_properties_creation_date=Creation Date: document_properties_modification_date=Modification Date: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. document_properties_date_string={{date}}, {{time}} document_properties_creator=Creator: document_properties_producer=PDF Producer: @@ -82,13 +91,20 @@ document_properties_version=PDF Version: document_properties_page_count=Page Count: document_properties_close=Close +print_progress_message=Preparing document for printing… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancel + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Toggle Sidebar +toggle_sidebar_notification.title=Toggle Sidebar (document contains outline/attachments) toggle_sidebar_label=Toggle Sidebar -outline.title=Show Document Outline -outline_label=Document Outline +document_outline.title=Show Document Outline (double-click to expand/collapse all items) +document_outline_label=Document Outline attachments.title=Show Attachments attachments_label=Attachments thumbs.title=Show Thumbnails @@ -105,7 +121,8 @@ thumb_page_title=Page {{page}} thumb_page_canvas=Thumbnail of Page {{page}} # Find panel button title and messages -find_label=Find: +find_input.title=Find +find_input.placeholder=Find in document… find_previous.title=Find the previous occurrence of the phrase find_previous_label=Previous find_next.title=Find the next occurrence of the phrase @@ -164,4 +181,4 @@ password_cancel=Cancel printing_not_supported=Warning: Printing is not fully supported by this browser. printing_not_ready=Warning: The PDF is not fully loaded for printing. web_fonts_disabled=Web fonts are disabled: unable to use embedded PDF fonts. -document_colors_disabled=PDF documents are not allowed to use their own colours: 'Allow pages to choose their own colours' is deactivated in the browser. +document_colors_not_allowed=PDF documents are not allowed to use their own colours: “Allow pages to choose their own colours†is deactivated in the browser. diff --git a/vendor/pdfjs/web/locale/en-US/viewer.properties b/vendor/pdfjs/web/locale/en-US/viewer.properties index 20c9195..f1c5054 100644 --- a/vendor/pdfjs/web/locale/en-US/viewer.properties +++ b/vendor/pdfjs/web/locale/en-US/viewer.properties @@ -18,12 +18,15 @@ previous_label=Previous next.title=Next Page next_label=Next -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Page: -page_of=of {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Page +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=of {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} of {{pagesCount}}) zoom_out.title=Zoom Out zoom_out_label=Zoom Out @@ -57,10 +60,10 @@ page_rotate_ccw.title=Rotate Counterclockwise page_rotate_ccw.label=Rotate Counterclockwise page_rotate_ccw_label=Rotate Counterclockwise -hand_tool_enable.title=Enable hand tool -hand_tool_enable_label=Enable hand tool -hand_tool_disable.title=Disable hand tool -hand_tool_disable_label=Disable hand tool +cursor_text_select_tool.title=Enable Text Selection Tool +cursor_text_select_tool_label=Text Selection Tool +cursor_hand_tool.title=Enable Hand Tool +cursor_hand_tool_label=Hand Tool # Document properties dialog box document_properties.title=Document Properties… @@ -88,13 +91,20 @@ document_properties_version=PDF Version: document_properties_page_count=Page Count: document_properties_close=Close +print_progress_message=Preparing document for printing… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancel + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Toggle Sidebar +toggle_sidebar_notification.title=Toggle Sidebar (document contains outline/attachments) toggle_sidebar_label=Toggle Sidebar -outline.title=Show Document Outline -outline_label=Document Outline +document_outline.title=Show Document Outline (double-click to expand/collapse all items) +document_outline_label=Document Outline attachments.title=Show Attachments attachments_label=Attachments thumbs.title=Show Thumbnails @@ -111,7 +121,8 @@ thumb_page_title=Page {{page}} thumb_page_canvas=Thumbnail of Page {{page}} # Find panel button title and messages -find_label=Find: +find_input.title=Find +find_input.placeholder=Find in document… find_previous.title=Find the previous occurrence of the phrase find_previous_label=Previous find_next.title=Find the next occurrence of the phrase @@ -170,4 +181,4 @@ password_cancel=Cancel printing_not_supported=Warning: Printing is not fully supported by this browser. printing_not_ready=Warning: The PDF is not fully loaded for printing. web_fonts_disabled=Web fonts are disabled: unable to use embedded PDF fonts. -document_colors_not_allowed=PDF documents are not allowed to use their own colors: 'Allow pages to choose their own colors' is deactivated in the browser. +document_colors_not_allowed=PDF documents are not allowed to use their own colors: “Allow pages to choose their own colors†is deactivated in the browser. diff --git a/vendor/pdfjs/web/locale/en-ZA/viewer.properties b/vendor/pdfjs/web/locale/en-ZA/viewer.properties index edb9fd0..832d558 100644 --- a/vendor/pdfjs/web/locale/en-ZA/viewer.properties +++ b/vendor/pdfjs/web/locale/en-ZA/viewer.properties @@ -18,12 +18,13 @@ previous_label=Previous next.title=Next Page next_label=Next -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Page: -page_of=of {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=of {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom_out.title=Zoom Out zoom_out_label=Zoom Out @@ -57,10 +58,6 @@ page_rotate_ccw.title=Rotate Counterclockwise page_rotate_ccw.label=Rotate Counterclockwise page_rotate_ccw_label=Rotate Counterclockwise -hand_tool_enable.title=Enable hand tool -hand_tool_enable_label=Enable hand tool -hand_tool_disable.title=Disable hand tool -hand_tool_disable_label=Disable hand tool # Document properties dialog box document_properties.title=Document Properties… @@ -88,19 +85,21 @@ document_properties_version=PDF Version: document_properties_page_count=Page Count: document_properties_close=Close +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Toggle Sidebar toggle_sidebar_label=Toggle Sidebar -outline.title=Show Document Outline -outline_label=Document Outline +document_outline.title=Show Document Outline (double-click to expand/collapse all items) +document_outline_label=Document Outline attachments.title=Show Attachments attachments_label=Attachments thumbs.title=Show Thumbnails thumbs_label=Thumbnails findbar.title=Find in Document -findbar_label=Find # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -111,7 +110,6 @@ thumb_page_title=Page {{page}} thumb_page_canvas=Thumbnail of Page {{page}} # Find panel button title and messages -find_label=Find: find_previous.title=Find the previous occurrence of the phrase find_previous_label=Previous find_next.title=Find the next occurrence of the phrase @@ -165,9 +163,8 @@ text_annotation_type.alt=[{{type}} Annotation] password_label=Enter the password to open this PDF file. password_invalid=Invalid password. Please try again. password_ok=OK -password_cancel=Cancel printing_not_supported=Warning: Printing is not fully supported by this browser. printing_not_ready=Warning: The PDF is not fully loaded for printing. web_fonts_disabled=Web fonts are disabled: unable to use embedded PDF fonts. -document_colors_not_allowed=PDF documents are not allowed to use their own colours: 'Allow pages to choose their own colours' is deactivated in the browser. +document_colors_not_allowed=PDF documents are not allowed to use their own colours: “Allow pages to choose their own colours†is deactivated in the browser. diff --git a/vendor/pdfjs/web/locale/eo/viewer.properties b/vendor/pdfjs/web/locale/eo/viewer.properties index 7cc95c6..d4bbd7a 100644 --- a/vendor/pdfjs/web/locale/eo/viewer.properties +++ b/vendor/pdfjs/web/locale/eo/viewer.properties @@ -18,12 +18,15 @@ previous_label=MalantaÅen next.title=Venonta paÄo next_label=AntaÅen -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=PaÄo: -page_of=el {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=PaÄo +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=el {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} el {{pagesCount}}) zoom_out.title=Malpligrandigi zoom_out_label=Malpligrandigi @@ -57,10 +60,10 @@ page_rotate_ccw.title=Rotaciigi maldekstrume page_rotate_ccw.label=Rotaciigi maldekstrume page_rotate_ccw_label=Rotaciigi maldekstrume -hand_tool_enable.title=Aktivigi manan ilon -hand_tool_enable_label=Aktivigi manan ilon -hand_tool_disable.title=Malaktivigi manan ilon -hand_tool_disable_label=Malaktivigi manan ilon +cursor_text_select_tool.title=Aktivigi tekstan elektilon +cursor_text_select_tool_label=Teksta elektilo +cursor_hand_tool.title=Aktivigi ilon de mano +cursor_hand_tool_label=Ilo de mano # Document properties dialog box document_properties.title=Atributoj de dokumento… @@ -88,13 +91,20 @@ document_properties_version=Versio de PDF: document_properties_page_count=Nombro de paÄoj: document_properties_close=Fermi +print_progress_message=Preparo de dokumento por presi Äin … +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Nuligi + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Montri/kaÅi flankan strion +toggle_sidebar_notification.title=Montri/kaÅi flankan strion (la dokumento enhavas konturon/aneksaĵojn) toggle_sidebar_label=Montri/kaÅi flankan strion -outline.title=Montri skemon de dokumento -outline_label=Skemo de dokumento +document_outline.title=Montri la konturon de dokumento (alklaku duoble por faldi/malfaldi ĉiujn elementojn) +document_outline_label=Konturo de dokumento attachments.title=Montri kunsendaĵojn attachments_label=Kunsendaĵojn thumbs.title=Montri miniaturojn @@ -111,7 +121,8 @@ thumb_page_title=PaÄo {{page}} thumb_page_canvas=Miniaturo de paÄo {{page}} # Find panel button title and messages -find_label=Serĉi: +find_input.title=Serĉi +find_input.placeholder=Serĉi en dokumento… find_previous.title=Serĉi la antaÅan aperon de la frazo find_previous_label=MalantaÅen find_next.title=Serĉi la venontan aperon de la frazo @@ -170,4 +181,4 @@ password_cancel=Nuligi printing_not_supported=Averto: tiu ĉi retumilo ne plene subtenas presadon. printing_not_ready=Averto: La PDF dosiero ne estas plene Åargita por presado. web_fonts_disabled=Neaktivaj teksaĵaj tiparoj: ne elbas uzi enmetitajn tiparojn de PDF. -document_colors_disabled=Dokumentoj PDF ne rajtas havi siajn proprajn kolorojn: \'Permesi al paÄoj elekti siajn proprajn kolorojn\' estas malaktiva en la retumilo. +document_colors_not_allowed=PDF dokumentoj ne rajtas uzi siajn proprajn kolorojn: 'Permesi al paÄoj uzi siajn proprajn kolorojn' ne estas aktiva en la retumilo. diff --git a/vendor/pdfjs/web/locale/es-AR/viewer.properties b/vendor/pdfjs/web/locale/es-AR/viewer.properties index 733be7b..970de09 100644 --- a/vendor/pdfjs/web/locale/es-AR/viewer.properties +++ b/vendor/pdfjs/web/locale/es-AR/viewer.properties @@ -18,24 +18,27 @@ previous_label=Anterior next.title=Página siguiente next_label=Siguiente -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Página: -page_of=de {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Página +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=de {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=( {{pageNumber}} de {{pagesCount}} ) zoom_out.title=Alejar zoom_out_label=Alejar zoom_in.title=Acercar zoom_in_label=Acercar zoom.title=Zoom -print.title=Imprimir -print_label=Imprimir presentation_mode.title=Cambiar a modo presentación presentation_mode_label=Modo presentación open_file.title=Abrir archivo open_file_label=Abrir +print.title=Imprimir +print_label=Imprimir download.title=Descargar download_label=Descargar bookmark.title=Vista actual (copiar o abrir en nueva ventana) @@ -57,17 +60,21 @@ page_rotate_ccw.title=Rotar antihorario page_rotate_ccw.label=Rotar antihorario page_rotate_ccw_label=Rotar antihorario -hand_tool_enable.title=Habilitar herramienta mano -hand_tool_enable_label=Habilitar herramienta mano -hand_tool_disable.title=Deshabilitar herramienta mano -hand_tool_disable_label=Deshabilitar herramienta mano +cursor_text_select_tool.title=Habilitar herramienta de selección de texto +cursor_text_select_tool_label=Herramienta de selección de texto +cursor_hand_tool.title=Habilitar herramienta mano +cursor_hand_tool_label=Herramienta mano # Document properties dialog box document_properties.title=Propiedades del documento… document_properties_label=Propiedades del documento… document_properties_file_name=Nombre de archivo: document_properties_file_size=Tamaño de archovo: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. document_properties_mb={{size_mb}} MB ({{size_b}} bytes) document_properties_title=TÃtulo: document_properties_author=Autor: @@ -75,6 +82,8 @@ document_properties_subject=Asunto: document_properties_keywords=Palabras clave: document_properties_creation_date=Fecha de creación: document_properties_modification_date=Fecha de modificación: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. document_properties_date_string={{date}}, {{time}} document_properties_creator=Creador: document_properties_producer=PDF Productor: @@ -82,13 +91,20 @@ document_properties_version=Versión de PDF: document_properties_page_count=Cantidad de páginas: document_properties_close=Cerrar +print_progress_message=Preparando documento para imprimir… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancelar + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Alternar barra lateral +toggle_sidebar_notification.title=Intercambiar barra lateral (el documento contiene esquema/adjuntos) toggle_sidebar_label=Alternar barra lateral -outline.title=Mostrar esquema del documento -outline_label=Esquema del documento +document_outline.title=Mostrar esquema del documento (doble clic para expandir/colapsar todos los Ãtems) +document_outline_label=Esquema del documento attachments.title=Mostrar adjuntos attachments_label=Adjuntos thumbs.title=Mostrar miniaturas @@ -105,7 +121,8 @@ thumb_page_title=Página {{page}} thumb_page_canvas=Miniatura de página {{page}} # Find panel button title and messages -find_label=Buscar: +find_input.title=Buscar +find_input.placeholder=Buscar en documento… find_previous.title=Buscar la aparición anterior de la frase find_previous_label=Anterior find_next.title=Buscar la siguiente aparición de la frase @@ -164,4 +181,4 @@ password_cancel=Cancelar printing_not_supported=Advertencia: La impresión no está totalmente soportada por este navegador. printing_not_ready=Advertencia: El PDF no está completamente cargado para impresión. web_fonts_disabled=TipografÃa web deshabilitada: no se pueden usar tipos incrustados en PDF. -document_colors_disabled=Los documentos PDF no tienen permitido usar sus propios colores: \'Permitir a las páginas elegir sus propios colores\' está desactivado en el navegador. +document_colors_not_allowed=Los documentos PDF no tienen permitido usar sus propios colores: 'Permitir a las páginas elegir sus propios colores' está desactivado en el navegador. diff --git a/vendor/pdfjs/web/locale/es-CL/viewer.properties b/vendor/pdfjs/web/locale/es-CL/viewer.properties index 0c610e6..3bafb7f 100644 --- a/vendor/pdfjs/web/locale/es-CL/viewer.properties +++ b/vendor/pdfjs/web/locale/es-CL/viewer.properties @@ -12,27 +12,39 @@ # See the License for the specific language governing permissions and # limitations under the License. -previous.title = Página anterior -previous_label = Anterior -next.title = Página siguiente -next_label = Siguiente -page_label = Página: -page_of = de {{pageCount}} -zoom_out.title = Alejar -zoom_out_label = Alejar -zoom_in.title = Acercar -zoom_in_label = Acercar -zoom.title = Ampliación -print.title = Imprimir -print_label = Imprimir -presentation_mode.title = Cambiar al modo de presentación -presentation_mode_label = Modo de presentación -open_file.title = Abrir archivo -open_file_label = Abrir -download.title = Descargar -download_label = Descargar -bookmark.title = Vista actual (copiar o abrir en nueva ventana) -bookmark_label = Vista actual +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Página anterior +previous_label=Anterior +next.title=Página siguiente +next_label=Siguiente + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Página +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=de {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} de {{pagesCount}}) + +zoom_out.title=Alejar +zoom_out_label=Alejar +zoom_in.title=Acercar +zoom_in_label=Acercar +zoom.title=Ampliación +presentation_mode.title=Cambiar al modo de presentación +presentation_mode_label=Modo de presentación +open_file.title=Abrir archivo +open_file_label=Abrir +print.title=Imprimir +print_label=Imprimir +download.title=Descargar +download_label=Descargar +bookmark.title=Vista actual (copiar o abrir en nueva ventana) +bookmark_label=Vista actual + +# Secondary toolbar and context menu tools.title=Herramientas tools_label=Herramientas first_page.title=Ir a la primera página @@ -48,16 +60,21 @@ page_rotate_ccw.title=Girar a la izquierda page_rotate_ccw.label=Girar a la izquierda page_rotate_ccw_label=Girar a la izquierda -hand_tool_enable.title=Activar herramienta de mano -hand_tool_enable_label=Activar herramienta de mano -hand_tool_disable.title=Desactivar herramienta de mano -hand_tool_disable_label=Desactivar herramienta de mano +cursor_text_select_tool.title=Activar la herramienta de selección de texto +cursor_text_select_tool_label=Herramienta de selección de texto +cursor_hand_tool.title=Activar la herramienta de mano +cursor_hand_tool_label=Herramienta de mano +# Document properties dialog box document_properties.title=Propiedades del documento… document_properties_label=Propiedades del documento… -document_properties_file_name=Nombre del archivo: +document_properties_file_name=Nombre de archivo: document_properties_file_size=Tamaño del archivo: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. document_properties_mb={{size_mb}} MB ({{size_b}} bytes) document_properties_title=TÃtulo: document_properties_author=Autor: @@ -65,6 +82,8 @@ document_properties_subject=Asunto: document_properties_keywords=Palabras clave: document_properties_creation_date=Fecha de creación: document_properties_modification_date=Fecha de modificación: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. document_properties_date_string={{date}}, {{time}} document_properties_creator=Creador: document_properties_producer=Productor del PDF: @@ -72,59 +91,94 @@ document_properties_version=Versión de PDF: document_properties_page_count=Cantidad de páginas: document_properties_close=Cerrar +print_progress_message=Preparando documento para impresión… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancelar + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) toggle_sidebar.title=Barra lateral +toggle_sidebar_notification.title=Cambiar barra lateral (Ãndice de contenidos del documento/adjuntos) toggle_sidebar_label=Mostrar u ocultar la barra lateral -outline.title = Mostrar esquema del documento -outline_label = Esquema del documento +document_outline.title=Mostrar esquema del documento (doble clic para expandir/contraer todos los elementos) +document_outline_label=Esquema del documento attachments.title=Mostrar adjuntos attachments_label=Adjuntos -thumbs.title = Mostrar miniaturas -thumbs_label = Miniaturas -findbar.title = Buscar en el documento -findbar_label = Buscar -thumb_page_title = Página {{page}} -thumb_page_canvas = Miniatura de la página {{page}} -first_page.label = Ir a la primera página -last_page.label = Ir a la última página -page_rotate_cw.label = Rotar en sentido de los punteros del reloj -page_rotate_ccw.label = Rotar en sentido contrario a los punteros del reloj -find_label = Buscar: -find_previous.title = Encontrar la aparición anterior de la frase -find_previous_label = Previo -find_next.title = Encontrar la siguiente aparición de la frase -find_next_label = Siguiente -find_highlight = Destacar todos -find_match_case_label = Coincidir mayús./minús. +thumbs.title=Mostrar miniaturas +thumbs_label=Miniaturas +findbar.title=Buscar en el documento +findbar_label=Buscar + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Página {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatura de la página {{page}} + +# Find panel button title and messages +find_input.title=Encontrar +find_input.placeholder=Encontrar en el documento… +find_previous.title=Buscar la aparición anterior de la frase +find_previous_label=Previo +find_next.title=Buscar la siguiente aparición de la frase +find_next_label=Siguiente +find_highlight=Destacar todos +find_match_case_label=Coincidir mayús./minús. find_reached_top=Se alcanzó el inicio del documento, continuando desde el final find_reached_bottom=Se alcanzó el final del documento, continuando desde el inicio -find_not_found = Frase no encontrada -error_more_info = Más información -error_less_info = Menos información -error_close = Cerrar +find_not_found=Frase no encontrada + +# Error panel labels +error_more_info=Más información +error_less_info=Menos información +error_close=Cerrar +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. error_version_info=PDF.js v{{version}} (compilación: {{build}}) -error_message = Mensaje: {{message}} -error_stack = Pila: {{stack}} -error_file = Archivo: {{file}} -error_line = LÃnea: {{line}} -rendering_error = Ha ocurrido un error al renderizar la página. -page_scale_width = Ancho de página -page_scale_fit = Ajuste de página -page_scale_auto = Aumento automático -page_scale_actual = Tamaño actual +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Mensaje: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Pila: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Archivo: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=LÃnea: {{line}} +rendering_error=Ha ocurrido un error al renderizar la página. + +# Predefined zoom values +page_scale_width=Ancho de página +page_scale_fit=Ajuste de página +page_scale_auto=Aumento automático +page_scale_actual=Tamaño actual +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. page_scale_percent={{scale}}% -loading_error_indicator = Error -loading_error = Ha ocurrido un error al cargar el PDF. -invalid_file_error = Archivo PDF inválido o corrupto. + +# Loading indicator messages +loading_error_indicator=Error +loading_error=Ha ocurrido un error al cargar el PDF. +invalid_file_error=Archivo PDF inválido o corrupto. missing_file_error=Falta el archivo PDF. unexpected_response_error=Respuesta del servidor inesperada. +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" text_annotation_type.alt=[{{type}} Anotación] password_label=Ingrese la contraseña para abrir este archivo PDF. -password_invalid=Contraseña inválida. Por favor, vuelva a intentarlo. +password_invalid=Contraseña inválida. Por favor, vuelve a intentarlo. password_ok=Aceptar password_cancel=Cancelar -printing_not_supported = Advertencia: Imprimir no está soportado completamente por este navegador. +printing_not_supported=Advertencia: Imprimir no está soportado completamente por este navegador. printing_not_ready=Advertencia: El PDF no está completamente cargado para ser impreso. -web_fonts_disabled=Las fuentes web están desactivadas: imposible usar las fuentes PDF embebidas. +web_fonts_disabled=Las tipografÃas web están desactivadas: imposible usar las fuentes PDF embebidas. document_colors_not_allowed=Los documentos PDF no tienen permitido usar sus propios colores: 'Permitir a las páginas elegir sus propios colores' está desactivado en el navegador. diff --git a/vendor/pdfjs/web/locale/es-ES/viewer.properties b/vendor/pdfjs/web/locale/es-ES/viewer.properties index 54e17d2..9505b3a 100644 --- a/vendor/pdfjs/web/locale/es-ES/viewer.properties +++ b/vendor/pdfjs/web/locale/es-ES/viewer.properties @@ -6,8 +6,9 @@ previous.title = Página anterior previous_label = Anterior next.title = Página siguiente next_label = Siguiente -page_label = Página: -page_of = de {{pageCount}} +page.title = Página +of_pages = de {{pagesCount}} +page_of_pages = ({{pageNumber}} de {{pagesCount}}) zoom_out.title = Reducir zoom_out_label = Reducir zoom_in.title = Aumentar @@ -37,10 +38,10 @@ page_rotate_cw_label = Rotar en sentido horario page_rotate_ccw.title = Rotar en sentido antihorario page_rotate_ccw.label = Rotar en sentido antihorario page_rotate_ccw_label = Rotar en sentido antihorario -hand_tool_enable.title = Activar herramienta mano -hand_tool_enable_label = Activar herramienta mano -hand_tool_disable.title = Desactivar herramienta mano -hand_tool_disable_label = Desactivar herramienta mano +cursor_text_select_tool.title = Activar herramienta de selección de texto +cursor_text_select_tool_label = Herramienta de selección de texto +cursor_hand_tool.title = Activar herramienta de mano +cursor_hand_tool_label = Herramienta de mano document_properties.title = Propiedades del documento… document_properties_label = Propiedades del documento… document_properties_file_name = Nombre de archivo: @@ -59,10 +60,14 @@ document_properties_producer = Productor PDF: document_properties_version = Versión PDF: document_properties_page_count = Número de páginas: document_properties_close = Cerrar +print_progress_message = Preparando documento para impresión… +print_progress_percent = {{progress}}% +print_progress_close = Cancelar toggle_sidebar.title = Cambiar barra lateral +toggle_sidebar_notification.title = Alternar panel lateral (el documento contiene un esquema o adjuntos) toggle_sidebar_label = Cambiar barra lateral -outline.title = Mostrar el esquema del documento -outline_label = Esquema del documento +document_outline.title = Mostrar resumen del documento (doble clic para expandir/contraer todos los elementos) +document_outline_label = Resumen de documento attachments.title = Mostrar adjuntos attachments_label = Adjuntos thumbs.title = Mostrar miniaturas @@ -71,7 +76,8 @@ findbar.title = Buscar en el documento findbar_label = Buscar thumb_page_title = Página {{page}} thumb_page_canvas = Miniatura de la página {{page}} -find_label = Buscar: +find_input.title = Buscar +find_input.placeholder = Buscar en el documento… find_previous.title = Encontrar la anterior aparición de la frase find_previous_label = Anterior find_next.title = Encontrar la siguiente aparición de esta frase diff --git a/vendor/pdfjs/web/locale/es-MX/viewer.properties b/vendor/pdfjs/web/locale/es-MX/viewer.properties index 4b85e8f..6d36e92 100644 --- a/vendor/pdfjs/web/locale/es-MX/viewer.properties +++ b/vendor/pdfjs/web/locale/es-MX/viewer.properties @@ -18,12 +18,15 @@ previous_label=Anterior next.title=Página siguiente next_label=Siguiente -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Página: -page_of=de {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Página +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=de {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} de {{pagesCount}}) zoom_out.title=Reducir zoom_out_label=Reducir @@ -57,10 +60,10 @@ page_rotate_ccw.title=Girar a la izquierda page_rotate_ccw.label=Girar a la izquierda page_rotate_ccw_label=Girar a la izquierda -hand_tool_enable.title=Activar herramienta mano -hand_tool_enable_label=Activar herramienta mano -hand_tool_disable.title=Desactivar herramienta mano -hand_tool_disable_label=Desactivar herramienta mano +cursor_text_select_tool.title=Activar la herramienta de selección de texto +cursor_text_select_tool_label=Herramienta de selección de texto +cursor_hand_tool.title=Activar la herramienta de mano +cursor_hand_tool_label=Herramienta de mano # Document properties dialog box document_properties.title=Propiedades del documento… @@ -88,13 +91,20 @@ document_properties_version=Versión PDF: document_properties_page_count=Número de páginas: document_properties_close=Cerrar +print_progress_message=Preparando documento para impresión… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancelar + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Cambiar barra lateral +toggle_sidebar_notification.title=Cambiar barra lateral (Ãndice de contenidos del documento/adjuntos) toggle_sidebar_label=Cambiar barra lateral -outline.title=Mostrar esquema del documento -outline_label=Esquema del documento +document_outline.title=Mostrar esquema del documento (doble clic para expandir/contraer todos los elementos) +document_outline_label=Esquema del documento attachments.title=Mostrar adjuntos attachments_label=Adjuntos thumbs.title=Mostrar miniaturas @@ -111,7 +121,8 @@ thumb_page_title=Página {{page}} thumb_page_canvas=Miniatura de la página {{page}} # Find panel button title and messages -find_label=Encontrar: +find_input.title=Buscar +find_input.placeholder=Buscar en el documento… find_previous.title=Ir a la anterior frase encontrada find_previous_label=Anterior find_next.title=Ir a la siguiente frase encontrada diff --git a/vendor/pdfjs/web/locale/et/viewer.properties b/vendor/pdfjs/web/locale/et/viewer.properties index 83da357..4601784 100644 --- a/vendor/pdfjs/web/locale/et/viewer.properties +++ b/vendor/pdfjs/web/locale/et/viewer.properties @@ -18,12 +18,15 @@ previous_label=Eelmine next.title=Järgmine lehekülg next_label=Järgmine -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Lehekülg: -page_of=(kokku {{pageCount}}) +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Leht +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=/ {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}}/{{pagesCount}}) zoom_out.title=Vähenda zoom_out_label=Vähenda @@ -57,17 +60,17 @@ page_rotate_ccw.title=Pööra vastupäeva page_rotate_ccw.label=Pööra vastupäeva page_rotate_ccw_label=Pööra vastupäeva -hand_tool_enable.title=Luba sirvimine -hand_tool_enable_label=Luba sirvimine -hand_tool_disable.title=Keela sirvimine -hand_tool_disable_label=Keela sirvimine # Document properties dialog box document_properties.title=Dokumendi omadused… document_properties_label=Dokumendi omadused… document_properties_file_name=Faili nimi: document_properties_file_size=Faili suurus: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. document_properties_kb={{size_kb}} KiB ({{size_b}} baiti) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. document_properties_mb={{size_mb}} MiB ({{size_b}} baiti) document_properties_title=Pealkiri: document_properties_author=Autor: @@ -75,6 +78,8 @@ document_properties_subject=Teema: document_properties_keywords=Märksõnad: document_properties_creation_date=Loodud: document_properties_modification_date=Muudetud: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. document_properties_date_string={{date}} {{time}} document_properties_creator=Looja: document_properties_producer=Generaator: @@ -82,13 +87,20 @@ document_properties_version=Generaatori versioon: document_properties_page_count=Lehekülgi: document_properties_close=Sulge +print_progress_message=Dokumendi ettevalmistamine printimiseks… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Loobu + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Näita külgriba +toggle_sidebar_notification.title=Näita külgriba (dokument sisaldab sisukorda/manuseid) toggle_sidebar_label=Näita külgriba -outline.title=Näita sisukorda -outline_label=Näita sisukorda +document_outline.title=Näita sisukorda (kõigi punktide laiendamiseks/ahendamiseks topeltklõpsa) +document_outline_label=Näita sisukorda attachments.title=Näita manuseid attachments_label=Manused thumbs.title=Näita pisipilte @@ -105,7 +117,8 @@ thumb_page_title={{page}}. lehekülg thumb_page_canvas={{page}}. lehekülje pisipilt # Find panel button title and messages -find_label=Otsi: +find_input.title=Otsi +find_input.placeholder=Otsi dokumendist… find_previous.title=Otsi fraasi eelmine esinemiskoht find_previous_label=Eelmine find_next.title=Otsi fraasi järgmine esinemiskoht @@ -151,7 +164,7 @@ invalid_file_error=Vigane või rikutud PDF-fail. missing_file_error=PDF-fail puudub. unexpected_response_error=Ootamatu vastus serverilt. -# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip. +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). # Some common types are e.g.: "Check", "Text", "Comment", "Note" @@ -164,4 +177,4 @@ password_cancel=Loobu printing_not_supported=Hoiatus: printimine pole selle brauseri poolt täielikult toetatud. printing_not_ready=Hoiatus: PDF pole printimiseks täielikult laaditud. web_fonts_disabled=Veebifondid on keelatud: PDFiga kaasatud fonte pole võimalik kasutada. -document_colors_disabled=PDF-dokumentidel pole oma värvide kasutamine lubatud: \'Veebilehtedel on lubatud kasutada oma värve\' on brauseris deaktiveeritud. +document_colors_not_allowed=PDF-dokumentidel pole oma värvide kasutamine lubatud: “Veebilehtedel on lubatud kasutada oma värve†on brauseris deaktiveeritud. diff --git a/vendor/pdfjs/web/locale/eu/viewer.properties b/vendor/pdfjs/web/locale/eu/viewer.properties index c302989..ac1216f 100644 --- a/vendor/pdfjs/web/locale/eu/viewer.properties +++ b/vendor/pdfjs/web/locale/eu/viewer.properties @@ -18,12 +18,15 @@ previous_label=Aurrekoa next.title=Hurrengo orria next_label=Hurrengoa -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Orria: -page_of=/ {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Orria +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=/ {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages={{pagesCount}}/{{pageNumber}} zoom_out.title=Urrundu zooma zoom_out_label=Urrundu zooma @@ -57,10 +60,10 @@ page_rotate_ccw.title=Biratu erlojuaren aurkako norantzan page_rotate_ccw.label=Biratu erlojuaren aurkako norantzan page_rotate_ccw_label=Biratu erlojuaren aurkako norantzan -hand_tool_enable.title=Gaitu eskuaren tresna -hand_tool_enable_label=Gaitu eskuaren tresna -hand_tool_disable.title=Desgaitu eskuaren tresna -hand_tool_disable_label=Desgaitu eskuaren tresna +cursor_text_select_tool.title=Gaitu testuaren hautapen tresna +cursor_text_select_tool_label=Testuaren hautapen tresna +cursor_hand_tool.title=Gaitu eskuaren tresna +cursor_hand_tool_label=Eskuaren tresna # Document properties dialog box document_properties.title=Dokumentuaren propietateak… @@ -88,13 +91,20 @@ document_properties_version=PDF bertsioa: document_properties_page_count=Orrialde kopurua: document_properties_close=Itxi +print_progress_message=Dokumentua inprimatzeko prestatzen… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent=%{{progress}} +print_progress_close=Utzi + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Txandakatu alboko barra +toggle_sidebar_notification.title=Txandakatu alboko barra (dokumentuak eskema/eranskinak ditu) toggle_sidebar_label=Txandakatu alboko barra -outline.title=Erakutsi dokumentuaren eskema -outline_label=Dokumentuaren eskema +document_outline.title=Erakutsi dokumentuaren eskema (klik bikoitza elementu guztiak zabaltzeko/tolesteko) +document_outline_label=Dokumentuaren eskema attachments.title=Erakutsi eranskinak attachments_label=Eranskinak thumbs.title=Erakutsi koadro txikiak @@ -111,7 +121,8 @@ thumb_page_title={{page}}. orria thumb_page_canvas={{page}}. orriaren koadro txikia # Find panel button title and messages -find_label=Bilatu: +find_input.title=Bilatu +find_input.placeholder=Bilatu dokumentuan… find_previous.title=Bilatu esaldiaren aurreko parekatzea find_previous_label=Aurrekoa find_next.title=Bilatu esaldiaren hurrengo parekatzea diff --git a/vendor/pdfjs/web/locale/fa/viewer.properties b/vendor/pdfjs/web/locale/fa/viewer.properties index 28f2cb6..577a4e1 100644 --- a/vendor/pdfjs/web/locale/fa/viewer.properties +++ b/vendor/pdfjs/web/locale/fa/viewer.properties @@ -18,12 +18,15 @@ previous_label=قبلی next.title=صÙØÙ‡Ù” بعدی next_label=بعدی -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=صÙØÙ‡: -page_of=از {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=صÙØÙ‡ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=از {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}}از {{pagesCount}}) zoom_out.title=کوچک‌نمایی zoom_out_label=کوچک‌نمایی @@ -57,10 +60,10 @@ page_rotate_ccw.title=چرخش پاد ساعتگرد page_rotate_ccw.label=چرخش پاد ساعتگرد page_rotate_ccw_label=چرخش پاد ساعتگرد -hand_tool_enable.title=Ùعال سازی ابزار دست -hand_tool_enable_label=Ùعال سازی ابزار دست -hand_tool_disable.title=غیر‌Ùعال سازی ابزار دست -hand_tool_disable_label=غیر‌Ùعال سازی ابزار دست +cursor_text_select_tool.title=Ùعال کردن ابزار٠انتخاب٠متن +cursor_text_select_tool_label=ابزار٠انتخاب٠متن +cursor_hand_tool.title=Ùعال کردن ابزار٠دست +cursor_hand_tool_label=ابزار دست # Document properties dialog box document_properties.title=خصوصیات سند... @@ -88,13 +91,20 @@ document_properties_version=نسخه PDF: document_properties_page_count=تعداد صÙØات: document_properties_close=بستن +print_progress_message=آماده سازی مدارک برای چاپ کردن… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=لغو + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=باز Ùˆ بسته کردن نوار کناری +toggle_sidebar_notification.title=تغییر وضعیت نوار کناری (سند Øاوی طرØ/پیوست است) toggle_sidebar_label=تغییرØالت نوارکناری -outline.title=نمایش Ø·Ø±Ø Ù†ÙˆØ´ØªØ§Ø± -outline_label=Ø·Ø±Ø Ù†ÙˆØ´ØªØ§Ø± +document_outline.title=نمایش رئوس مطالب مدارک(برای بازشدن/جمع شدن همه موارد دوبار کلیک کنید) +document_outline_label=Ø·Ø±Ø Ù†ÙˆØ´ØªØ§Ø± attachments.title=نمایش پیوست‌ها attachments_label=پیوست‌ها thumbs.title=نمایش تصاویر بندانگشتی @@ -111,7 +121,8 @@ thumb_page_title=صÙØÙ‡ {{page}} thumb_page_canvas=تصویر بند‌ انگشتی صÙØÙ‡ {{page}} # Find panel button title and messages -find_label=جستجو: +find_input.title=پیدا کردن +find_input.placeholder=پیدا کردن در سند… find_previous.title=پیدا کردن رخداد قبلی عبارت find_previous_label=قبلی find_next.title=پیدا کردن رخداد بعدی عبارت @@ -165,9 +176,9 @@ text_annotation_type.alt=[{{type}} Annotation] password_label=جهت باز کردن پرونده PDF گذرواژه را وارد نمائید. password_invalid=گذرواژه نامعتبر. لطÙا مجددا تلاش کنید. password_ok=تأیید -password_cancel=انصرا٠+password_cancel=لغو printing_not_supported=هشدار: قابلیت چاپ به‌طور کامل در این مرورگر پشتیبانی نمی‌شود. printing_not_ready=اخطار: پرونده PDF بطور کامل بارگیری نشده Ùˆ امکان چاپ وجود ندارد. web_fonts_disabled=Ùونت های تØت وب غیر Ùعال شده اند: امکان استÙاده از نمایش دهنده داخلی PDF وجود ندارد. -document_colors_not_allowed=Ùایلهای PDF نمیتوانند Ú©Ù‡ رنگ های خود را داشته باشند. لذا گزینه 'اجازه تغییر رنگ" در مرورگر غیر Ùعال شده است. +document_colors_not_allowed=Ùایلهای PDF اجازه ندارند تا از رنگ‌های خود استÙاده کنند: گزینه «به صÙØات اجازه بده تا از رنگ‌های خود استÙاده کنند» در مرورگر غیر Ùعال است. diff --git a/vendor/pdfjs/web/locale/ff/viewer.properties b/vendor/pdfjs/web/locale/ff/viewer.properties index 026c4bf..23d3b49 100644 --- a/vendor/pdfjs/web/locale/ff/viewer.properties +++ b/vendor/pdfjs/web/locale/ff/viewer.properties @@ -18,12 +18,15 @@ previous_label=ÆennuÉ—o next.title=Hello faango next_label=Yeeso -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Hello: -page_of=e nder {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Hello +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=e nder {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} of {{pagesCount}}) zoom_out.title=Lonngo WoÉ—É—a zoom_out_label=Lonngo WoÉ—É—a @@ -57,10 +60,10 @@ page_rotate_ccw.title=Yiiltu Faya Nano page_rotate_ccw.label=Yiiltu Faya Nano page_rotate_ccw_label=Yiiltu Faya Nano -hand_tool_enable.title=Hurmin kuutorgal junngo -hand_tool_enable_label=Hurmin kuutorgal junngo -hand_tool_disable.title=DaaÆ´ kuutorgal junngo -hand_tool_disable_label=DaaÆ´ kuutorgal junngo +cursor_text_select_tool.title=Gollin kaÉ“irgel cuÉ“irgel binndi +cursor_text_select_tool_label=KaÉ“irgel cuÉ“irgel binndi +cursor_hand_tool.title=Hurmin kuutorgal junngo +cursor_hand_tool_label=KaÉ“irgel junngo # Document properties dialog box document_properties.title=KeeroraaÉ—i Winndannde… @@ -88,13 +91,20 @@ document_properties_version=Yamre PDF: document_properties_page_count=Limoore Kelle: document_properties_close=Uddu +print_progress_message=Nana heboo winnditaade fiilannde… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Haaytu + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Toggilo Palal Sawndo +toggle_sidebar_notification.title=Palal sawndo (dokimaa oo ina waÉ—i taarngo/cinnde) toggle_sidebar_label=Toggilo Palal Sawndo -outline.title=Hollu ToÉ“É“e Fiilannde -outline_label=ToÉ“É“e Fiilannde +document_outline.title=Hollu Ƴiyal Fiilannde (dobdobo ngam wertude/taggude teme fof) +document_outline_label=ToÉ“É“e Fiilannde attachments.title=Hollu ÆŠisanÉ—e attachments_label=ÆŠisanÉ—e thumbs.title=Hollu DooÉ“e @@ -111,7 +121,8 @@ thumb_page_title=Hello {{page}} thumb_page_canvas=DooÉ“re Hello {{page}} # Find panel button title and messages -find_label=Yiytu: +find_input.title=Yiytu +find_input.placeholder=Yiylo nder dokimaa find_previous.title=Yiylo cilol É“ennugol konngol ngol find_previous_label=ÆennuÉ—o find_next.title=Yiylo cilol garowol konngol ngol diff --git a/vendor/pdfjs/web/locale/fi/viewer.properties b/vendor/pdfjs/web/locale/fi/viewer.properties index d64a0a8..241d5af 100644 --- a/vendor/pdfjs/web/locale/fi/viewer.properties +++ b/vendor/pdfjs/web/locale/fi/viewer.properties @@ -18,12 +18,15 @@ previous_label=Edellinen next.title=Seuraava sivu next_label=Seuraava -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Sivu: -page_of=/ {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Sivu +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=/ {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} / {{pagesCount}}) zoom_out.title=Loitonna zoom_out_label=Loitonna @@ -57,17 +60,21 @@ page_rotate_ccw.title=Kierrä vasemmalle page_rotate_ccw.label=Kierrä vasemmalle page_rotate_ccw_label=Kierrä vasemmalle -hand_tool_enable.title=Käytä käsityökalua -hand_tool_enable_label=Käytä käsityökalua -hand_tool_disable.title=Poista käsityökalu käytöstä -hand_tool_disable_label=Poista käsityökalu käytöstä +cursor_text_select_tool.title=Käytä tekstinvalintatyökalua +cursor_text_select_tool_label=Tekstinvalintatyökalu +cursor_hand_tool.title=Käytä käsityökalua +cursor_hand_tool_label=Käsityökalu # Document properties dialog box document_properties.title=Dokumentin ominaisuudet… document_properties_label=Dokumentin ominaisuudet… document_properties_file_name=Tiedostonimi: document_properties_file_size=Tiedoston koko: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. document_properties_kb={{size_kb}} kt ({{size_b}} tavua) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. document_properties_mb={{size_mb}} Mt ({{size_b}} tavua) document_properties_title=Otsikko: document_properties_author=Tekijä: @@ -75,6 +82,8 @@ document_properties_subject=Aihe: document_properties_keywords=Avainsanat: document_properties_creation_date=Luomispäivämäärä: document_properties_modification_date=Muokkauspäivämäärä: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. document_properties_date_string={{date}}, {{time}} document_properties_creator=Luoja: document_properties_producer=PDF-tuottaja: @@ -82,13 +91,20 @@ document_properties_version=PDF-versio: document_properties_page_count=Sivujen määrä: document_properties_close=Sulje +print_progress_message=Valmistellaan dokumenttia tulostamista varten… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}} % +print_progress_close=Peruuta + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Näytä/piilota sivupaneeli +toggle_sidebar_notification.title=Näytä/piilota sivupaneeli (dokumentissa on sisällys tai liitteitä) toggle_sidebar_label=Näytä/piilota sivupaneeli -outline.title=Näytä dokumentin rakenne -outline_label=Dokumentin rakenne +document_outline.title=Näytä dokumentin sisällys (laajenna tai kutista kohdat kaksoisnapsauttamalla) +document_outline_label=Dokumentin sisällys attachments.title=Näytä liitteet attachments_label=Liitteet thumbs.title=Näytä pienoiskuvat @@ -105,7 +121,8 @@ thumb_page_title=Sivu {{page}} thumb_page_canvas=Pienoiskuva sivusta {{page}} # Find panel button title and messages -find_label=Etsi: +find_input.title=Etsi +find_input.placeholder=Etsi dokumentista… find_previous.title=Etsi hakusanan edellinen osuma find_previous_label=Edellinen find_next.title=Etsi hakusanan seuraava osuma @@ -164,4 +181,4 @@ password_cancel=Peruuta printing_not_supported=Varoitus: Selain ei tue kaikkia tulostustapoja. printing_not_ready=Varoitus: PDF-tiedosto ei ole vielä latautunut kokonaan, eikä sitä voi vielä tulostaa. web_fonts_disabled=Verkkosivujen omat kirjasinlajit on estetty: ei voida käyttää upotettuja PDF-kirjasinlajeja. -document_colors_disabled=PDF-dokumenttien ei ole sallittua käyttää omia värejään: Asetusta "Sivut saavat käyttää omia värejään oletusten sijaan" ei ole valittu selaimen asetuksissa. +document_colors_not_allowed=PDF-dokumenttien ei ole sallittua käyttää omia värejään: Asetusta â€Sivut saavat käyttää omia värejään oletusten sijaan†ei ole valittu selaimen asetuksissa. diff --git a/vendor/pdfjs/web/locale/fr/viewer.properties b/vendor/pdfjs/web/locale/fr/viewer.properties index ee947e4..2c0f0ff 100644 --- a/vendor/pdfjs/web/locale/fr/viewer.properties +++ b/vendor/pdfjs/web/locale/fr/viewer.properties @@ -18,12 +18,15 @@ previous_label=Précédent next.title=Page suivante next_label=Suivant -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Page : -page_of=sur {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Page +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=sur {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} sur {{pagesCount}}) zoom_out.title=Zoom arrière zoom_out_label=Zoom arrière @@ -57,39 +60,21 @@ page_rotate_ccw.title=Rotation anti-horaire page_rotate_ccw.label=Rotation anti-horaire page_rotate_ccw_label=Rotation anti-horaire -# Tooltips and alt text for side panel toolbar buttons -# (the _label strings are alt text for the buttons, the .title strings are -# tooltips) -toggle_sidebar.title=Afficher/Masquer le panneau latéral -toggle_sidebar_label=Afficher/Masquer le panneau latéral -outline.title=Afficher les signets -outline_label=Signets du document -attachments.title=Afficher les pièces jointes -attachments_label=Pièces jointes -thumbs.title=Afficher les vignettes -thumbs_label=Vignettes -findbar.title=Rechercher dans le document -findbar_label=Rechercher - -# Thumbnails panel item (tooltip and alt text for images) -# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page -# number. -thumb_page_title=Page {{page}} -# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page -# number. -thumb_page_canvas=Vignette de la page {{page}} - -hand_tool_enable.title=Activer l'outil main -hand_tool_enable_label=Activer l'outil main -hand_tool_disable.title=Désactiver l'outil main -hand_tool_disable_label=Désactiver l'outil main +cursor_text_select_tool.title=Activer l’outil de sélection de texte +cursor_text_select_tool_label=Outil de sélection de texte +cursor_hand_tool.title=Activer l’outil main +cursor_hand_tool_label=Outil main # Document properties dialog box document_properties.title=Propriétés du document… document_properties_label=Propriétés du document… document_properties_file_name=Nom du fichier : document_properties_file_size=Taille du fichier : +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. document_properties_kb={{size_kb}} Ko ({{size_b}} octets) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. document_properties_mb={{size_mb}} Mo ({{size_b}} octets) document_properties_title=Titre : document_properties_author=Auteur : @@ -97,6 +82,8 @@ document_properties_subject=Sujet : document_properties_keywords=Mots-clés : document_properties_creation_date=Date de création : document_properties_modification_date=Modifié le : +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. document_properties_date_string={{date}} à {{time}} document_properties_creator=Créé par : document_properties_producer=Outil de conversion PDF : @@ -104,9 +91,39 @@ document_properties_version=Version PDF : document_properties_page_count=Nombre de pages : document_properties_close=Fermer +print_progress_message=Préparation du document pour l’impression… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}} % +print_progress_close=Annuler + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Afficher/Masquer le panneau latéral +toggle_sidebar_notification.title=Afficher/Masquer le panneau latéral (le document contient des signets/pièces jointes) +toggle_sidebar_label=Afficher/Masquer le panneau latéral +document_outline.title=Afficher les signets du document (double-cliquer pour développer/réduire tous les éléments) +document_outline_label=Signets du document +attachments.title=Afficher les pièces jointes +attachments_label=Pièces jointes +thumbs.title=Afficher les vignettes +thumbs_label=Vignettes +findbar.title=Rechercher dans le document +findbar_label=Rechercher + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Page {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Vignette de la page {{page}} + # Find panel button title and messages -find_label=Rechercher : -find_previous.title=Trouver l'occurrence précédente de la phrase +find_input.title=Rechercher +find_input.placeholder=Rechercher dans le document… +find_previous.title=Trouver l’occurrence précédente de la phrase find_previous_label=Précédent find_next.title=Trouver la prochaine occurrence de la phrase find_next_label=Suivant @@ -117,8 +134,8 @@ find_reached_bottom=Bas de la page atteint, poursuite au début find_not_found=Phrase introuvable # Error panel labels -error_more_info=Plus d'informations -error_less_info=Moins d'informations +error_more_info=Plus d’informations +error_less_info=Moins d’informations error_close=Fermer # LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be # replaced by the PDF.JS version and build ID. @@ -133,7 +150,7 @@ error_stack=Pile : {{stack}} error_file=Fichier : {{file}} # LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number error_line=Ligne : {{line}} -rendering_error=Une erreur s'est produite lors de l'affichage de la page. +rendering_error=Une erreur s’est produite lors de l’affichage de la page. # Predefined zoom values page_scale_width=Pleine largeur @@ -146,7 +163,7 @@ page_scale_percent={{scale}} % # Loading indicator messages loading_error_indicator=Erreur -loading_error=Une erreur s'est produite lors du chargement du fichier PDF. +loading_error=Une erreur s’est produite lors du chargement du fichier PDF. invalid_file_error=Fichier PDF invalide ou corrompu. missing_file_error=Fichier PDF manquant. unexpected_response_error=Réponse inattendue du serveur. @@ -161,7 +178,7 @@ password_invalid=Mot de passe incorrect. Veuillez réessayer. password_ok=OK password_cancel=Annuler -printing_not_supported=Attention : l'impression n'est pas totalement prise en charge par ce navigateur. -printing_not_ready=Attention : le PDF n'est pas entièrement chargé pour pouvoir l'imprimer. -web_fonts_disabled=Les polices web sont désactivées : impossible d'utiliser les polices intégrées au PDF. +printing_not_supported=Attention : l’impression n’est pas totalement prise en charge par ce navigateur. +printing_not_ready=Attention : le PDF n’est pas entièrement chargé pour pouvoir l’imprimer. +web_fonts_disabled=Les polices web sont désactivées : impossible d’utiliser les polices intégrées au PDF. document_colors_not_allowed=Les documents PDF ne peuvent pas utiliser leurs propres couleurs : « Autoriser les pages web à utiliser leurs propres couleurs » est désactivé dans le navigateur. diff --git a/vendor/pdfjs/web/locale/fy-NL/viewer.properties b/vendor/pdfjs/web/locale/fy-NL/viewer.properties index 4a0f747..5f04144 100644 --- a/vendor/pdfjs/web/locale/fy-NL/viewer.properties +++ b/vendor/pdfjs/web/locale/fy-NL/viewer.properties @@ -18,26 +18,29 @@ previous_label=Foarige next.title=Folgjende side next_label=Folgjende -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=side: -page_of=fan {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Side +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=fa {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} fan {{pagesCount}}) zoom_out.title=Utzoome zoom_out_label=Utzoome zoom_in.title=Ynzoome zoom_in_label=Ynzoome zoom.title=Zoome -print.title=Ofdrukke -print_label=Ofdrukke -presentation_mode.title=Wikselje nei presintaasjemoadus -presentation_mode_label=Presintaasjemoadus +presentation_mode.title=Wikselje nei presintaasjemodus +presentation_mode_label=Presintaasjemodus open_file.title=Bestân iepenje open_file_label=Iepenje -download.title=Ynlade -download_label=Ynlade +print.title=Ofdrukke +print_label=Ofdrukke +download.title=Downloade +download_label=Downloade bookmark.title=Aktuele finster (kopiearje of iepenje yn nij finster) bookmark_label=Aktuele finster @@ -45,22 +48,22 @@ bookmark_label=Aktuele finster tools.title=Ark tools_label=Ark first_page.title=Gean nei earste side -first_page.label=Gean nei earste side +first_page.label=Nei earste side gean first_page_label=Gean nei earste side last_page.title=Gean nei lêste side -last_page.label=Gean nei lêste side +last_page.label=Nei lêste side gean last_page_label=Gean nei lêste side page_rotate_cw.title=Rjochtsom draaie page_rotate_cw.label=Rjochtsom draaie page_rotate_cw_label=Rjochtsom draaie -page_rotate_ccw.title=Linksom draaie -page_rotate_ccw.label=Linksom draaie -page_rotate_ccw_label=Linksom draaie +page_rotate_ccw.title=Loftsom draaie +page_rotate_ccw.label=Loftsom draaie +page_rotate_ccw_label=Loftsom draaie -hand_tool_enable.title=Hânark ynskeakelje -hand_tool_enable_label=Hânark ynskeakelje -hand_tool_disable.title=Hânark úyskeakelje -hand_tool_disable_label=Hânark úyskeakelje +cursor_text_select_tool.title=Tekstseleksjehelpmiddel ynskeakelje +cursor_text_select_tool_label=Tekstseleksjehelpmiddel +cursor_hand_tool.title=Hânhelpmiddel ynskeakelje +cursor_hand_tool_label=Hânhelpmiddel # Document properties dialog box document_properties.title=Dokuminteigenskippen… @@ -88,13 +91,20 @@ document_properties_version=PDF-ferzje: document_properties_page_count=Siden: document_properties_close=Slute +print_progress_message=Dokumint tariede oar ôfdrukken… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Annulearje + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Sidebalke yn-/útskeakelje +toggle_sidebar_notification.title=Sidebalke yn-/útskeakelje (dokumint befettet outline/bylagen) toggle_sidebar_label=Sidebalke yn-/útskeakelje -outline.title=Dokumint ynhâldsopjefte toane -outline_label=Dokumint ynhâldsopjefte +document_outline.title=Dokumintoersjoch toane (dûbelklik om alle items út/yn te klappen) +document_outline_label=Dokumintoersjoch attachments.title=Bylagen toane attachments_label=Bylagen thumbs.title=Foarbylden toane @@ -110,22 +120,17 @@ thumb_page_title=Side {{page}} # number. thumb_page_canvas=Foarbyld fan side {{page}} -# Context menu -first_page.label=Nei earste side gean -last_page.label=Nei lêste side gean -page_rotate_cw.label=Rjochtsom draaie -page_rotate_ccw.label=Linksom draaie - # Find panel button title and messages -find_label=Sykje: +find_input.title=Sykje +find_input.placeholder=Sykje yn dokumint… find_previous.title=It foarige foarkommen fan de tekst sykje find_previous_label=Foarige find_next.title=It folgjende foarkommen fan de tekst sykje find_next_label=Folgjende find_highlight=Alles markearje find_match_case_label=Haadlettergefoelich -find_reached_top=Boppekant fan dokumint berikt, trochgien fanôf ûnder -find_reached_bottom=Ein fan dokumint berikt, trochgien fanôf boppe +find_reached_top=Boppekant fan dokumint berikt, trochgien fan ûnder ôf +find_reached_bottom=Ein fan dokumint berikt, trochgien fan boppe ôf find_not_found=Tekst net fûn # Error panel labels @@ -151,7 +156,7 @@ rendering_error=Der is in flater bard by it renderjen fan de side. page_scale_width=Sidebreedte page_scale_fit=Hiele side page_scale_auto=Automatysk zoome -page_scale_actual=Wurklike grutte +page_scale_actual=Werklike grutte # LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a # numerical scale value. page_scale_percent={{scale}}% @@ -161,7 +166,7 @@ loading_error_indicator=Flater loading_error=Der is in flater bard by it laden fan de PDF. invalid_file_error=Ynfalide of korruptearre PDF-bestân. missing_file_error=PDF-bestân ûntbrekt. -unexpected_response_error=Unferwacht tsjinnerantwurd. +unexpected_response_error=Unferwacht serverantwurd. # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in @@ -176,4 +181,4 @@ password_cancel=Annulearje printing_not_supported=Warning: Printen is net folslein stipe troch dizze browser. printing_not_ready=Warning: PDF is net folslein laden om ôf te drukken. web_fonts_disabled=Weblettertypen binne útskeakele: gebrûk fan ynsluten PDF-lettertypen is net mooglik. -document_colors_disabled=PDF-dokuminten binne net tastien om har eigen kleuren te brûken: ‘Siden tastean har eigen kleuren te kiezen’ is útskeakele yn de browser. +document_colors_not_allowed=PDF-dokuminten meie harren eigen kleuren net brûke: ‘Siden tastean om harren eigen kleuren te kiezen’ is útskeakele yn de browser. diff --git a/vendor/pdfjs/web/locale/ga-IE/viewer.properties b/vendor/pdfjs/web/locale/ga-IE/viewer.properties index 7fa5076..62f1a55 100644 --- a/vendor/pdfjs/web/locale/ga-IE/viewer.properties +++ b/vendor/pdfjs/web/locale/ga-IE/viewer.properties @@ -18,12 +18,15 @@ previous_label=Roimhe Seo next.title=An Chéad Leathanach Eile next_label=Ar Aghaidh -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Leathanach: -page_of=as {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Leathanach +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=as {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} as {{pagesCount}}) zoom_out.title=Súmáil Amach zoom_out_label=Súmáil Amach @@ -36,8 +39,8 @@ open_file.title=Oscail Comhad open_file_label=Oscail print.title=Priontáil print_label=Priontáil -download.title=Ãosluchtaigh -download_label=Ãosluchtaigh +download.title=Ãoslódáil +download_label=Ãoslódáil bookmark.title=An t-amharc reatha (cóipeáil nó oscail i bhfuinneog nua) bookmark_label=An tAmharc Reatha @@ -57,10 +60,10 @@ page_rotate_ccw.title=Rothlaigh ar tuathal page_rotate_ccw.label=Rothlaigh ar tuathal page_rotate_ccw_label=Rothlaigh ar tuathal -hand_tool_enable.title=Cumasaigh uirlis láimhe -hand_tool_enable_label=Cumasaigh uirlis láimhe -hand_tool_disable.title=DÃchumasaigh uirlis láimhe -hand_tool_disable_label=DÃchumasaigh uirlis láimhe +cursor_text_select_tool.title=Cumasaigh an Uirlis Roghnaithe Téacs +cursor_text_select_tool_label=Uirlis Roghnaithe Téacs +cursor_hand_tool.title=Cumasaigh an Uirlis Láimhe +cursor_hand_tool_label=Uirlis Láimhe # Document properties dialog box document_properties.title=AirÃonna na Cáipéise… @@ -88,13 +91,20 @@ document_properties_version=Leagan PDF: document_properties_page_count=LÃon Leathanach: document_properties_close=Dún +print_progress_message=Cáipéis á hullmhú le priontáil… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cealaigh + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Scoránaigh an Barra Taoibh +toggle_sidebar_notification.title=Scoránaigh an Barra Taoibh (achoimre/iatáin sa cháipéis) toggle_sidebar_label=Scoránaigh an Barra Taoibh -outline.title=Taispeáin Creatlach na Cáipéise -outline_label=Creatlach na Cáipéise +document_outline.title=Taispeáin ImlÃne na Cáipéise (déchliceáil chun chuile rud a leathnú nó a laghdú) +document_outline_label=Creatlach na Cáipéise attachments.title=Taispeáin Iatáin attachments_label=Iatáin thumbs.title=Taispeáin Mionsamhlacha @@ -111,7 +121,8 @@ thumb_page_title=Leathanach {{page}} thumb_page_canvas=Mionsamhail Leathanaigh {{page}} # Find panel button title and messages -find_label=Aimsigh: +find_input.title=Aimsigh +find_input.placeholder=Aimsigh sa cháipéis… find_previous.title=Aimsigh an sampla roimhe seo den nath seo find_previous_label=Roimhe seo find_next.title=Aimsigh an chéad sampla eile den nath sin @@ -120,7 +131,7 @@ find_highlight=Aibhsigh uile find_match_case_label=CásÃogair find_reached_top=Ag barr na cáipéise, ag leanúint ón mbun find_reached_bottom=Ag bun na cáipéise, ag leanúint ón mbarr -find_not_found=AbairtÃn gan aimsiú +find_not_found=Frása gan aimsiú # Error panel labels error_more_info=Tuilleadh Eolais @@ -152,10 +163,10 @@ page_scale_percent={{scale}}% # Loading indicator messages loading_error_indicator=Earráid -loading_error=Tharla earráid agus an cháipéis PDF á luchtú. +loading_error=Tharla earráid agus an cháipéis PDF á lódáil. invalid_file_error=Comhad neamhbhailà nó truaillithe PDF. missing_file_error=Comhad PDF ar iarraidh. -unexpected_response_error=Freagra ón bhfreastalaà gan súil leis. +unexpected_response_error=Freagra ón bhfreastalaà nach rabhthas ag súil leis. # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in @@ -168,6 +179,6 @@ password_ok=OK password_cancel=Cealaigh printing_not_supported=Rabhadh: Nà thacaÃonn an brabhsálaà le priontáil go hiomlán. -printing_not_ready=Rabhadh: Nà féidir an PDF a phriontáil go dtà go mbeidh an cháipéis iomlán luchtaithe. +printing_not_ready=Rabhadh: Nà féidir an PDF a phriontáil go dtà go mbeidh an cháipéis iomlán lódáilte. web_fonts_disabled=Tá clófhoirne Gréasáin dÃchumasaithe: nà féidir clófhoirne leabaithe PDF a úsáid. -document_colors_not_allowed=NÃl cead ag cáipéisà PDF a ndathanna féin a roghnú; tá 'Tabhair cead do leathanaigh a ndathanna féin a roghnú' dÃchumasaithe sa mbrabhsálaÃ. +document_colors_not_allowed=NÃl cead ag cáipéisà PDF a ndathanna féin a roghnú: tá “Tabhair cead do leathanaigh a ndathanna féin a roghnú†dÃchumasaithe sa mbrabhsálaÃ. diff --git a/vendor/pdfjs/web/locale/gd/viewer.properties b/vendor/pdfjs/web/locale/gd/viewer.properties index 509b71b..ad752b8 100644 --- a/vendor/pdfjs/web/locale/gd/viewer.properties +++ b/vendor/pdfjs/web/locale/gd/viewer.properties @@ -18,12 +18,15 @@ previous_label=Air ais next.title=An ath-dhuilleag next_label=Air adhart -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Duilleag: -page_of=à {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Duilleag +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=à {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} à {{pagesCount}}) zoom_out.title=Sùm a-mach zoom_out_label=Sùm a-mach @@ -57,10 +60,10 @@ page_rotate_ccw.title=Cuairtich gu tuathail page_rotate_ccw.label=Cuairtich gu tuathail page_rotate_ccw_label=Cuairtich gu tuathail -hand_tool_enable.title=Cuir inneal na là imhe an comas -hand_tool_enable_label=Cuir inneal na là imhe an comas -hand_tool_disable.title=Cuir inneal na là imhe à comas -hand_tool_disable_label=Cuir à comas inneal na là imhe +cursor_text_select_tool.title=Cuir an comas inneal taghadh an teacsa +cursor_text_select_tool_label=Inneal taghadh an teacsa +cursor_hand_tool.title=Cuir inneal na là imhe an comas +cursor_hand_tool_label=Inneal na là imhe # Document properties dialog box document_properties.title=Roghainnean na sgrìobhainne… @@ -88,13 +91,20 @@ document_properties_version=Tionndadh a' PDF: document_properties_page_count=Àireamh de dhuilleagan: document_properties_close=Dùin +print_progress_message=Ag ullachadh na sgrìobhainn airson clò-bhualadh… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Sguir dheth + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Toglaich am bà r-taoibh +toggle_sidebar_notification.title=Toglaich am bà r-taoibh (tha oir-loidhne/ceanglachain aig an sgrìobhainn) toggle_sidebar_label=Toglaich am bà r-taoibh -outline.title=Seall an sgrìobhainn far loidhne -outline_label=Oir-loidhne na sgrìobhainne +document_outline.title=Seall oir-loidhne na sgrìobhainn (dèan briogadh dùbailte airson a h-uile nì a leudachadh/a cho-theannadh) +document_outline_label=Oir-loidhne na sgrìobhainne attachments.title=Seall na ceanglachain attachments_label=Ceanglachain thumbs.title=Seall na dealbhagan @@ -111,7 +121,8 @@ thumb_page_title=Duilleag a {{page}} thumb_page_canvas=Dealbhag duilleag a {{page}} # Find panel button title and messages -find_label=Lorg: +find_input.title=Lorg +find_input.placeholder=Lorg san sgrìobhainn... find_previous.title=Lorg là thair roimhe na h-abairt seo find_previous_label=Air ais find_next.title=Lorg ath-là thair na h-abairt seo @@ -170,4 +181,4 @@ password_cancel=Sguir dheth printing_not_supported=Rabhadh: Chan eil am brabhsair seo a' cur là n-taic ri clò-bhualadh. printing_not_ready=Rabhadh: Cha deach am PDF a luchdadh gu tur airson clò-bhualadh. web_fonts_disabled=Tha cruthan-clò lìn à comas: Chan urrainn dhuinn cruthan-clò PDF leabaichte a chleachdadh. -document_colors_not_allowed=Chan fhaod sgrìobhainnean PDF na dathan aca fhèin a chleachdadh: Tha "Leig le duilleagan na dathan aca fhèin a chleachdadh" à comas sa bhrabhsair. +document_colors_not_allowed=Chan fhaod sgrìobhainnean PDF na dathan aca fhèin a chleachdadh: Tha “Leig le duilleagan na dathan aca fhèin a chleachdadh†à comas sa bhrabhsair. diff --git a/vendor/pdfjs/web/locale/gl/viewer.properties b/vendor/pdfjs/web/locale/gl/viewer.properties index 0acc4f7..f393fca 100644 --- a/vendor/pdfjs/web/locale/gl/viewer.properties +++ b/vendor/pdfjs/web/locale/gl/viewer.properties @@ -18,12 +18,12 @@ previous_label=Anterior next.title=Seguinte páxina next_label=Seguinte -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Páxina: -page_of=de {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom_out.title=Reducir zoom_out_label=Reducir @@ -57,10 +57,6 @@ page_rotate_ccw.title=Rotar no sentido contrario ás agullas do reloxo page_rotate_ccw.label=Rotar no sentido contrario ás agullas do reloxo page_rotate_ccw_label=Rotar no sentido contrario ás agullas do reloxo -hand_tool_enable.title=Activar ferramenta man -hand_tool_enable_label=Activar ferramenta man -hand_tool_disable.title=Desactivar ferramenta man -hand_tool_disable_label=Desactivar ferramenta man # Document properties dialog box document_properties.title=Propiedades do documento… @@ -88,13 +84,14 @@ document_properties_version=Versión de PDF: document_properties_page_count=Número de páxinas: document_properties_close=Pechar +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Amosar/agochar a barra lateral toggle_sidebar_label=Amosar/agochar a barra lateral -outline.title=Amosar esquema do documento -outline_label=Esquema do documento attachments.title=Amosar anexos attachments_label=Anexos thumbs.title=Amosar miniaturas @@ -111,7 +108,6 @@ thumb_page_title=Páxina {{page}} thumb_page_canvas=Miniatura da páxina {{page}} # Find panel button title and messages -find_label=Atopar: find_previous.title=Atopar a anterior aparición da frase find_previous_label=Anterior find_next.title=Atopar a seguinte aparición da frase @@ -170,4 +166,3 @@ password_cancel=Cancelar printing_not_supported=Aviso: A impresión non é compatÃbel de todo con este navegador. printing_not_ready=Aviso: O PDF non se cargou completamente para imprimirse. web_fonts_disabled=Desactiváronse as fontes web: foi imposÃbel usar as fontes incrustadas no PDF. -document_colors_disabled=Non se permite que os documentos PDF usen as súas propias cores: «Permitir que as páxinas escollan as súas propias cores» está desactivado no navegador. diff --git a/vendor/pdfjs/web/locale/gu-IN/viewer.properties b/vendor/pdfjs/web/locale/gu-IN/viewer.properties index df6bb15..433cabf 100644 --- a/vendor/pdfjs/web/locale/gu-IN/viewer.properties +++ b/vendor/pdfjs/web/locale/gu-IN/viewer.properties @@ -18,12 +18,12 @@ previous_label=પહેલાનૠnext.title=આગળનૠપાનà«àª‚ next_label=આગળનà«àª‚ -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=પાનà«àª‚: -page_of={{pageCount}} નà«àª‚ +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom_out.title=મોટૠકરો zoom_out_label=મોટૠકરો @@ -53,10 +53,6 @@ page_rotate_cw_label=ઘડિયાળનાં કાંટા તરફ ફૠpage_rotate_ccw.label=ઘડિયાળનાં કાંટાની ઉલટી દિશામાં ફેરવો page_rotate_ccw_label=ઘડિયાળનાં કાંટાની વિરà«àª¦à«àª¦ ફેરવો -hand_tool_enable.title=હાથનાં સાધનને સકà«àª°àª¿àª¯ કરો -hand_tool_enable_label=હાથનાં સાધનને સકà«àª°àª¿àª¯ કરો -hand_tool_disable.title=હાથનાં સાધનને નિષà«àª•à«àª°àª¿àª¯ કરો -hand_tool_disable_label=હાથનાં સાધનને નિષà«àª•à«àª°àª¿àª¯ કરો # Document properties dialog box document_properties.title=દસà«àª¤àª¾àªµà«‡àªœ ગà«àª£àª§àª°à«àª®à«‹â€¦ @@ -84,13 +80,15 @@ document_properties_version=PDF આવૃતà«àª¤àª¿: document_properties_page_count=પાનાં ગણતરી: document_properties_close=બંધ કરો +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=ટૉગલ બાજà«àªªàªŸà«àªŸà«€ toggle_sidebar_label=ટૉગલ બાજà«àªªàªŸà«àªŸà«€ -outline.title=દસà«àª¤àª¾àªµà«‡àªœ રૂપરેખા બતાવો -outline_label=દસà«àª¤àª¾àªµà«‡àªœ રૂપરેખા +document_outline_label=દસà«àª¤àª¾àªµà«‡àªœ રૂપરેખા attachments.title=જોડાણોને બતાવો attachments_label=જોડાણો thumbs.title=થંબનેલà«àª¸ બતાવો @@ -107,7 +105,6 @@ thumb_page_title=પાનà«àª‚ {{page}} thumb_page_canvas=પાનાં {{page}} નà«àª‚ થંબનેલà«àª¸ # Find panel button title and messages -find_label=શોધો: find_previous.title=શબà«àª¦àª¸àª®à«‚હની પાછલી ઘટનાને શોધો find_previous_label=પહેલાંનૠfind_next.title=શબà«àª¦àª¸àª®à«‚હની આગળની ઘટનાને શોધો @@ -159,7 +156,6 @@ text_annotation_type.alt=[{{type}} Annotation] password_label=આ PDF ફાઇલને ખોલવા પાસવરà«àª¡àª¨à«‡ દાખલ કરો. password_invalid=અયોગà«àª¯ પાસવરà«àª¡. મહેરબાની કરીને ફરી પà«àª°àª¯àª¤à«àª¨ કરો. password_ok=બરાબર -password_cancel=રદ કરો printing_not_supported=ચેતવણી: છાપવાનà«àª‚ આ બà«àª°àª¾àª‰àªàª° દà«àª¦àª¾àª°àª¾ સંપૂરà«àª£àªªàª£à«‡ આધારàªà«‚ત નથી. printing_not_ready=Warning: PDF ઠછાપવા માટે સંપૂરà«àª£àªªàª£à«‡ લાવેલ છે. diff --git a/vendor/pdfjs/web/locale/he/viewer.properties b/vendor/pdfjs/web/locale/he/viewer.properties index 10f1177..070bbde 100644 --- a/vendor/pdfjs/web/locale/he/viewer.properties +++ b/vendor/pdfjs/web/locale/he/viewer.properties @@ -18,12 +18,15 @@ previous_label=×§×•×“× next.title=דף ×”×‘× next_label=×”×‘× -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=עמוד: -page_of=מתוך {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=דף +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=מתוך {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} מתוך {{pagesCount}}) zoom_out.title=התרחקות zoom_out_label=התרחקות @@ -57,10 +60,10 @@ page_rotate_ccw.title=הטיה ×›× ×’×“ כיוון השעון page_rotate_ccw.label=הטיה ×›× ×’×“ כיוון השעון page_rotate_ccw_label=הטיה ×›× ×’×“ כיוון השעון -hand_tool_enable.title=הפעלת כלי היד -hand_tool_enable_label=הפעלת כלי היד -hand_tool_disable.title=× ×˜×¨×•×œ כלי היד -hand_tool_disable_label=× ×˜×¨×•×œ כלי היד +cursor_text_select_tool.title=הפעלת כלי בחירת טקסט +cursor_text_select_tool_label=כלי בחירת טקסט +cursor_hand_tool.title=הפעלת כלי היד +cursor_hand_tool_label=כלי יד # Document properties dialog box document_properties.title=מ××¤×™×™× ×™ מסמך… @@ -88,13 +91,20 @@ document_properties_version=גרסת PDF: document_properties_page_count=מספר דפי×: document_properties_close=סגירה +print_progress_message=מסמך ×‘×”×›× ×” להדפסה… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=ביטול + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=הצגה/הסתרה של סרגל הצד +toggle_sidebar_notification.title=החלפת תצוגת סרגל צד (מסמך שמכיל מת×ר/צרופות) toggle_sidebar_label=הצגה/הסתרה של סרגל הצד -outline.title=הצגת מת×ר מסמך -outline_label=מת×ר מסמך +document_outline.title=הצגת מת×ר מסמך (לחיצה כפולה כדי להרחיב ×ו ×œ×¦×ž×¦× ×ת כל הפריטי×) +document_outline_label=מת×ר מסמך attachments.title=הצגת צרופות attachments_label=צרופות thumbs.title=הצגת תצוגה מקדימה @@ -111,7 +121,8 @@ thumb_page_title=עמוד {{page}} thumb_page_canvas=תצוגה מקדימה של עמוד {{page}} # Find panel button title and messages -find_label=חיפוש: +find_input.title=חיפוש +find_input.placeholder=חיפוש במסמך… find_previous.title=חיפוש מופע ×§×•×“× ×©×œ הביטוי find_previous_label=×§×•×“× find_next.title=חיפוש המופע ×”×‘× ×©×œ הביטוי @@ -170,4 +181,4 @@ password_cancel=ביטול printing_not_supported=×זהרה: הדפסה ××™× ×” × ×ª×ž×›×ª במלו××” בדפדפן ×–×”. printing_not_ready=×זהרה: ×”Ö¾PDF ×œ× × ×™×ª×Ÿ לחלוטין עד מצב שמ×פשר הדפסה. web_fonts_disabled=×’×•×¤× ×™ רשת ×ž× ×•×˜×¨×œ×™×: ×œ× × ×™×ª×Ÿ להשתמש ×‘×’×•×¤× ×™ PDF מוטבעי×. -document_colors_disabled=מסמכי PDF ×œ× ×™×›×•×œ×™× ×œ×”×©×ª×ž×© ×‘×¦×‘×¢×™× ×ž×©×œ×”×: ×”×פשרות \\'ל×פשר ×œ×¢×ž×•×“×™× ×œ×‘×—×•×¨ ×¦×‘×¢×™× ×ž×©×œ×”×\\' ××™× ×” פעילה בדפדפן. +document_colors_not_allowed=מסמכי PDF ××™× × ×ž×•×¨×©×™× ×œ×”×©×ª×ž×© ×‘×¦×‘×¢×™× ×ž×©×œ×”×: ×”×פשרות „×פשר ×œ×¢×ž×•×“×™× ×œ×‘×—×•×¨ ×¦×‘×¢×™× ×ž×©×œ×”×†××™× ×” פעילה בדפדפן. diff --git a/vendor/pdfjs/web/locale/hi-IN/viewer.properties b/vendor/pdfjs/web/locale/hi-IN/viewer.properties index d65eb92..3280c9b 100644 --- a/vendor/pdfjs/web/locale/hi-IN/viewer.properties +++ b/vendor/pdfjs/web/locale/hi-IN/viewer.properties @@ -18,12 +18,15 @@ previous_label=पिछला next.title=अगला पृषà¥à¤ next_label=आगे -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=पृषà¥à¤ : -page_of={{pageCount}} का +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=पृषà¥à¤ : +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}} का +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} of {{pagesCount}}) zoom_out.title=\u0020छोटा करें zoom_out_label=\u0020छोटा करें @@ -57,10 +60,6 @@ page_rotate_ccw.title=घड़ी की दिशा से उलà¥à¤Ÿà¤¾ ठpage_rotate_ccw.label=घड़ी की दिशा से उलà¥à¤Ÿà¤¾ घà¥à¤®à¤¾à¤à¤ page_rotate_ccw_label=\u0020घड़ी की दिशा से उलà¥à¤Ÿà¤¾ घà¥à¤®à¤¾à¤à¤ -hand_tool_enable.title=हाथ औजार सकà¥à¤°à¤¿à¤¯ करें -hand_tool_enable_label=हाथ औजार सकà¥à¤°à¤¿à¤¯ करें -hand_tool_disable.title=हाथ औजार निषà¥à¤•à¥à¤°à¤¿à¤¯ करना -hand_tool_disable_label=हाथ औजार निषà¥à¤•à¥à¤°à¤¿à¤¯ करना # Document properties dialog box document_properties.title=दसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤¼ विशेषता... @@ -69,10 +68,10 @@ document_properties_file_name=फ़ाइल नाम: document_properties_file_size=फाइल आकारः # LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" # will be replaced by the PDF file size in kilobytes, respectively in bytes. -document_properties_kb={{size_kb}} KB ({{size_b}} बाइट) +document_properties_kb={{size_kb}} KB ({{size_b}} bytes) # LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" # will be replaced by the PDF file size in megabytes, respectively in bytes. -document_properties_mb={{size_mb}} MB ({{size_b}} बाइट) +document_properties_mb={{size_mb}} MB ({{size_b}} bytes) document_properties_title=शीरà¥à¤·à¤•: document_properties_author=लेखकः document_properties_subject=विषय: @@ -88,19 +87,24 @@ document_properties_version=PDF संसà¥à¤•à¤°à¤£: document_properties_page_count=पृषà¥à¤ गिनती: document_properties_close=बंद करें +print_progress_message=छपाई के लिठदसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤¼ को तैयार किया जा रहा है... +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=रदà¥à¤¦ करें + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=\u0020सà¥à¤²à¤¾à¤‡à¤¡à¤° टॉगल करें toggle_sidebar_label=सà¥à¤²à¤¾à¤‡à¤¡à¤° टॉगल करें -outline.title=\u0020दसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤¼ आउटलाइन दिखाà¤à¤ -outline_label=दसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤¼ आउटलाइन +document_outline.title=दसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤¼ की रूपरेखा दिखाइठ(सारी वसà¥à¤¤à¥à¤“ं को फलने अथवा समेटने के लिठदो बार कà¥à¤²à¤¿à¤• करें) +document_outline_label=दसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤¼ आउटलाइन attachments.title=संलगà¥à¤¨à¤• दिखायें attachments_label=संलगà¥à¤¨à¤• thumbs.title=लघà¥à¤›à¤µà¤¿à¤¯à¤¾à¤ दिखाà¤à¤ thumbs_label=लघॠछवि findbar.title=\u0020दसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤¼ में ढूà¤à¤¢à¤¼à¥‡à¤‚ -findbar_label=ढूà¤à¤¢à¤¼à¥‡à¤‚ # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -111,7 +115,6 @@ thumb_page_title=पृषà¥à¤ {{page}} thumb_page_canvas=पृषà¥à¤ {{page}} की लघà¥-छवि # Find panel button title and messages -find_label=ढूंढें: find_previous.title=वाकà¥à¤¯à¤¾à¤‚श की पिछली उपसà¥à¤¥à¤¿à¤¤à¤¿ ढूà¤à¤¢à¤¼à¥‡à¤‚ find_previous_label=पिछला find_next.title=वाकà¥à¤¯à¤¾à¤‚श की अगली उपसà¥à¤¥à¤¿à¤¤à¤¿ ढूà¤à¤¢à¤¼à¥‡à¤‚ @@ -152,7 +155,7 @@ page_scale_percent={{scale}}% # Loading indicator messages loading_error_indicator=तà¥à¤°à¥à¤Ÿà¤¿ -loading_error=पीडीà¤à¤« लोड करते समय à¤à¤• तà¥à¤°à¥à¤Ÿà¤¿ हà¥à¤ˆ. +loading_error=PDF लोड करते समय à¤à¤• तà¥à¤°à¥à¤Ÿà¤¿ हà¥à¤ˆ. invalid_file_error=अमानà¥à¤¯ या à¤à¥à¤°à¤·à¥à¤Ÿ PDF फ़ाइल. missing_file_error=\u0020अनà¥à¤ªà¤¸à¥à¤¥à¤¿à¤¤ PDF फ़ाइल. unexpected_response_error=अपà¥à¤°à¤¤à¥à¤¯à¤¾à¤¶à¤¿à¤¤ सरà¥à¤µà¤° पà¥à¤°à¤¤à¤¿à¤•à¥à¤°à¤¿à¤¯à¤¾. @@ -162,12 +165,12 @@ unexpected_response_error=अपà¥à¤°à¤¤à¥à¤¯à¤¾à¤¶à¤¿à¤¤ सरà¥à¤µà¤° पà # the PDF spec (32000-1:2008 Table 169 – Annotation types). # Some common types are e.g.: "Check", "Text", "Comment", "Note" text_annotation_type.alt=\u0020[{{type}} Annotation] -password_label=इस पीडीà¤à¤« फ़ाइल को खोलने के लिठकृपया कूटशबà¥à¤¦ à¤à¤°à¥‡à¤‚. +password_label=इस PDF फ़ाइल को खोलने के लिठकृपया कूटशबà¥à¤¦ à¤à¤°à¥‡à¤‚. password_invalid=अवैध कूटशबà¥à¤¦, कृपया फिर कोशिश करें. -password_ok=ठीक +password_ok=OK password_cancel=रदà¥à¤¦ करें printing_not_supported=चेतावनी: इस बà¥à¤°à¤¾à¤‰à¤œà¤¼à¤° पर छपाई पूरी तरह से समरà¥à¤¥à¤¿à¤¤ नहीं है. -printing_not_ready=\u0020चेतावनी: पीडीà¤à¤« छपाई के लिठपूरी तरह से लोड नहीं है. +printing_not_ready=चेतावनी: PDF छपाई के लिठपूरी तरह से लोड नहीं है. web_fonts_disabled=वेब फॉनà¥à¤Ÿà¥à¤¸ निषà¥à¤•à¥à¤°à¤¿à¤¯ हैं: अंतःसà¥à¤¥à¤¾à¤ªà¤¿à¤¤ PDF फॉनà¥à¤Ÿà¤¸ के उपयोग में असमरà¥à¤¥. -document_colors_not_allowed=PDF दसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤¼ उनके अपने रंग को उपयोग करने के लिठअनà¥à¤®à¤¤à¤¿ पà¥à¤°à¤¾à¤ªà¥à¤¤ नहीं है: 'पृषà¥à¤ ों को उनके अपने रंग को चà¥à¤¨à¤¨à¥‡ के लिठसà¥à¤µà¥€à¤•à¥ƒà¤¤à¤¿ दें कि वह उस बà¥à¤°à¤¾à¤‰à¤œà¤¼à¤° में निषà¥à¤•à¥à¤°à¤¿à¤¯ है. +document_colors_not_allowed=PDF दसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤¼ उनके अपने रंग को उपयोग करने के लिठअनà¥à¤®à¤¤à¤¿ पà¥à¤°à¤¾à¤ªà¥à¤¤ नहीं है: "पृषà¥à¤ ों को उनके अपने रंग को चà¥à¤¨à¤¨à¥‡ के लिठसà¥à¤µà¥€à¤•à¥ƒà¤¤à¤¿ दें" कि वह उस बà¥à¤°à¤¾à¤‰à¤œà¤¼à¤° में निषà¥à¤•à¥à¤°à¤¿à¤¯ है. diff --git a/vendor/pdfjs/web/locale/hr/viewer.properties b/vendor/pdfjs/web/locale/hr/viewer.properties index b163fdb..ca39552 100644 --- a/vendor/pdfjs/web/locale/hr/viewer.properties +++ b/vendor/pdfjs/web/locale/hr/viewer.properties @@ -15,19 +15,22 @@ # Main toolbar buttons (tooltips and alt text for images) previous.title=Prethodna stranica previous_label=Prethodna -next.title=Iduća stranica -next_label=Iduća +next.title=Sljedeća stranica +next_label=Sljedeća -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Stranica: -page_of=od {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Stranica +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=od {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} od {{pagesCount}}) zoom_out.title=Uvećaj zoom_out_label=Smanji -zoom_in.title=Uvaćaj +zoom_in.title=Uvećaj zoom_in_label=Smanji zoom.title=Uvećanje presentation_mode.title=Prebaci u prezentacijski naÄin rada @@ -57,10 +60,10 @@ page_rotate_ccw.title=Rotiraj obrnutno od smjera kazaljke na satu page_rotate_ccw.label=Rotiraj obrnutno od smjera kazaljke na satu page_rotate_ccw_label=Rotiraj obrnutno od smjera kazaljke na satu -hand_tool_enable.title=Omogući ruÄni alat -hand_tool_enable_label=Omogući ruÄni alat -hand_tool_disable.title=Onemogući ruÄni alat -hand_tool_disable_label=Onemogući ruÄni alat +cursor_text_select_tool.title=Omogući alat za oznaÄavanje teksta +cursor_text_select_tool_label=Alat za oznaÄavanje teksta +cursor_hand_tool.title=Omogući ruÄni alat +cursor_hand_tool_label=RuÄni alat # Document properties dialog box document_properties.title=Svojstva dokumenta... @@ -82,19 +85,26 @@ document_properties_modification_date=Datum promjene: # LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" # will be replaced by the creation/modification date, and time, of the PDF file. document_properties_date_string={{date}}, {{time}} -document_properties_creator=Stvaralac: +document_properties_creator=Stvaratelj: document_properties_producer=PDF stvaratelj: document_properties_version=PDF inaÄica: document_properties_page_count=Broj stranica: document_properties_close=Zatvori +print_progress_message=Pripremanje dokumenta za ispis… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Odustani + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Prikaži/sakrij boÄnu traku +toggle_sidebar_notification.title=Prikazivanje i sklanjanje boÄne trake (dokument sadrži konturu/privitke) toggle_sidebar_label=Prikaži/sakrij boÄnu traku -outline.title=Prikaži obris dokumenta -outline_label=Obris dokumenta +document_outline.title=Prikaži obris dokumenta (dvostruki klik za proÅ¡irivanje/skupljanje svih stavki) +document_outline_label=Obris dokumenta attachments.title=Prikaži privitke attachments_label=Privitci thumbs.title=Prikaži sliÄice @@ -111,11 +121,12 @@ thumb_page_title=Stranica {{page}} thumb_page_canvas=SliÄica stranice {{page}} # Find panel button title and messages -find_label=Traži: +find_input.title=Traži +find_input.placeholder=Traži u dokumentu… find_previous.title=PronaÄ‘i prethodno javljanje ovog izraza find_previous_label=Prethodno find_next.title=PronaÄ‘i iduće javljanje ovog izraza -find_next_label=Iduće +find_next_label=Sljedeće find_highlight=Istankni sve find_match_case_label=SluÄaj podudaranja find_reached_top=Dosegnut vrh dokumenta, nastavak od dna diff --git a/vendor/pdfjs/web/locale/hu/viewer.properties b/vendor/pdfjs/web/locale/hu/viewer.properties index 549137c..03990af 100644 --- a/vendor/pdfjs/web/locale/hu/viewer.properties +++ b/vendor/pdfjs/web/locale/hu/viewer.properties @@ -18,12 +18,15 @@ previous_label=ElÅ‘zÅ‘ next.title=KövetkezÅ‘ oldal next_label=Tovább -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Oldal: -page_of=összesen: {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Oldal +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=összesen: {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} / {{pagesCount}}) zoom_out.title=KicsinyÃtés zoom_out_label=KicsinyÃtés @@ -57,10 +60,10 @@ page_rotate_ccw.title=Forgatás az óramutató járásával ellentétesen page_rotate_ccw.label=Forgatás az óramutató járásával ellentétesen page_rotate_ccw_label=Forgatás az óramutató járásával ellentétesen -hand_tool_enable.title=Kéz eszköz bekapcsolása -hand_tool_enable_label=Kéz eszköz bekapcsolása -hand_tool_disable.title=Kéz eszköz kikapcsolása -hand_tool_disable_label=Kéz eszköz kikapcsolása +cursor_text_select_tool.title=SzövegkijelölÅ‘ eszköz bekapcsolása +cursor_text_select_tool_label=SzövegkijelölÅ‘ eszköz +cursor_hand_tool.title=Kéz eszköz bekapcsolása +cursor_hand_tool_label=Kéz eszköz # Document properties dialog box document_properties.title=Dokumentum tulajdonságai… @@ -88,13 +91,20 @@ document_properties_version=PDF verzió: document_properties_page_count=Oldalszám: document_properties_close=Bezárás +print_progress_message=Dokumentum elÅ‘készÃtése nyomtatáshoz… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Mégse + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Oldalsáv be/ki +toggle_sidebar_notification.title=Oldalsáv be/ki (a dokumentum vázlatot/mellékleteket tartalmaz) toggle_sidebar_label=Oldalsáv be/ki -outline.title=Dokumentumvázlat megjelenÃtése -outline_label=Dokumentumvázlat +document_outline.title=Dokumentum megjelenÃtése online (dupla kattintás minden elem kinyitásához/összecsukásához) +document_outline_label=Dokumentumvázlat attachments.title=Mellékletek megjelenÃtése attachments_label=Van melléklet thumbs.title=Bélyegképek megjelenÃtése @@ -111,7 +121,8 @@ thumb_page_title={{page}}. oldal thumb_page_canvas={{page}}. oldal bélyegképe # Find panel button title and messages -find_label=Keresés: +find_input.title=Keresés +find_input.placeholder=Keresés a dokumentumban… find_previous.title=A kifejezés elÅ‘zÅ‘ elÅ‘fordulásának keresése find_previous_label=ElÅ‘zÅ‘ find_next.title=A kifejezés következÅ‘ elÅ‘fordulásának keresése diff --git a/vendor/pdfjs/web/locale/hy-AM/viewer.properties b/vendor/pdfjs/web/locale/hy-AM/viewer.properties index d490517..5542d8d 100644 --- a/vendor/pdfjs/web/locale/hy-AM/viewer.properties +++ b/vendor/pdfjs/web/locale/hy-AM/viewer.properties @@ -18,12 +18,15 @@ previous_label=Õ†Õ¡ÕÕ¸Ö€Õ¤Õ¨ next.title=Õ€Õ¡Õ»Õ¸Ö€Õ¤ Õ§Õ»Õ¨ next_label=Õ€Õ¡Õ»Õ¸Ö€Õ¤Õ¨ -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Ô·Õ». -page_of={{pageCount}}-Õ«Ö +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Ô·Õ». +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}}-Õ«Ö\u0020 +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}}-Õ¨ {{pagesCount}})-Õ«Ö zoom_out.title=Õ“Õ¸Ö„Ö€Õ¡ÖÕ¶Õ¥Õ¬ zoom_out_label=Õ“Õ¸Ö„Ö€Õ¡ÖÕ¶Õ¥Õ¬ @@ -57,10 +60,6 @@ page_rotate_ccw.title=ÕŠÕ¿Õ¿Õ¥Õ¬ Õ°Õ¡Õ¯Õ¡Õ¼Õ¡Õ¯ ÕªÕ¡Õ´Õ¡ÖÕ¸Ö‚ÕµÖÕ« Õ½Õ¬Õ¡Ö„Õ« page_rotate_ccw.label=ÕŠÕ¿Õ¿Õ¥Õ¬ Õ°Õ¡Õ¯Õ¡Õ¼Õ¡Õ¯ ÕªÕ¡Õ´Õ¡ÖÕ¸Ö‚ÕµÖÕ« Õ½Õ¬Õ¡Ö„Õ« page_rotate_ccw_label=ÕŠÕ¿Õ¿Õ¥Õ¬ Õ°Õ¡Õ¯Õ¡Õ¼Õ¡Õ¯ ÕªÕ¡Õ´Õ¡ÖÕ¸Ö‚ÕµÖÕ« Õ½Õ¬Õ¡Ö„Õ« -hand_tool_enable.title=Õ„Õ«Õ¡ÖÕ¶Õ¥Õ¬ Õ±Õ¥Õ¼Ö„Õ« Õ£Õ¸Ö€Õ®Õ«Ö„Õ¨ -hand_tool_enable_label=Õ„Õ«Õ¡ÖÕ¶Õ¥Õ¬ Õ±Õ¥Õ¼Ö„Õ« Õ£Õ¸Ö€Õ®Õ«Ö„Õ¨ -hand_tool_disable.title=Ô±Õ¶Õ»Õ¡Õ¿Õ¥Õ¬ Õ±Õ¥Õ¼Ö„Õ« Õ£Õ¸Ö€Õ®Õ«Ö„Õ¨ -hand_tool_disable_label=Ô±Õ†Õ»Õ¡Õ¿Õ¥Õ¬ Õ±Õ¥Õ¼Ö„Õ« Õ£Õ¸Ö€Õ®Õ«Ö„Õ¨ # Document properties dialog box document_properties.title=Õ“Õ¡Õ½Õ¿Õ¡Õ©Õ²Õ©Õ« Õ°Õ¡Õ¿Õ¯Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¶Õ¥Ö€Õ¨... @@ -88,13 +87,20 @@ document_properties_version=PDF-Õ« Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯Õ¨. document_properties_page_count=Ô·Õ»Õ¥Ö€Õ« Ö„Õ¡Õ¶Õ¡Õ¯Õ¨. document_properties_close=Õ“Õ¡Õ¯Õ¥Õ¬ +print_progress_message=Õ†Õ¡ÕÕ¡ÕºÕ¡Õ¿Ö€Õ¡Õ½Õ¿Õ¸Ö‚Õ´ Õ§ ÖƒÕ¡Õ½Õ¿Õ¡Õ©Õ¸Ö‚Õ²Õ©Õ¨ Õ¿ÕºÕ¥Õ¬Õ¸Ö‚Õ¶... +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Õ‰Õ¥Õ²Õ¡Ö€Õ¯Õ¥Õ¬ + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Ô²Õ¡ÖÕ¥Õ¬/Õ“Õ¡Õ¯Õ¥Õ¬ Ô¿Õ¸Õ²Õ¡ÕµÕ«Õ¶ Õ¾Õ¡Õ°Õ¡Õ¶Õ¡Õ¯Õ¨ +toggle_sidebar_notification.title=Õ“Õ¸ÕÕ¡Õ¶Õ»Õ¡Õ¿Õ¥Õ¬ Ô¿Õ¸Õ²Õ¡ÕµÕ«Õ¶ Õ£Õ¸Õ¿Õ«Õ¶ (ÖƒÕ¡Õ½Õ¿Õ¡Õ©Õ¸Ö‚Õ²Õ©Õ¨ ÕºÕ¡Ö€Õ¸Ö‚Õ¶Õ¡Õ¯Õ¸Ö‚Õ´ Õ§ Õ¸Ö‚Ö€Õ¾Õ¡Õ£Õ«Õ®/Õ¯ÖÕ¸Ö€Õ¤) toggle_sidebar_label=Ô²Õ¡ÖÕ¥Õ¬/Õ“Õ¡Õ¯Õ¥Õ¬ Ô¿Õ¸Õ²Õ¡ÕµÕ«Õ¶ Õ¾Õ¡Õ°Õ¡Õ¶Õ¡Õ¯Õ¨ -outline.title=Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ ÖƒÕ¡Õ½Õ¿Õ¡Õ©Õ²Õ©Õ« Õ¢Õ¸Õ¾Õ¡Õ¶Õ¤Õ¡Õ¯Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ -outline_label=Õ“Õ¡Õ½Õ¿Õ¡Õ©Õ²Õ©Õ« Õ¢Õ¸Õ¾Õ¡Õ¶Õ¤Õ¡Õ¯Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ +document_outline.title=Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ ÖƒÕ¡Õ½Õ¿Õ¡Õ©Õ²Õ©Õ« Õ¸Ö‚Ö€Õ¾Õ¡Õ£Õ«Õ®Õ¨ (Õ¯Ö€Õ¯Õ¶Õ¡Õ¯Õ« Õ½Õ¥Õ²Õ´Õ¥Ö„Õ Õ´Õ«Õ¸Ö‚ÕµÕ©Õ¶Õ¥Ö€Õ¨ Õ¨Õ¶Õ¤Õ¡Ö€Õ±Õ¡Õ¯Õ¥Õ¬Õ¸Ö‚/Õ¯Õ¸Õ®Õ¯Õ¥Õ¬Õ¸Ö‚ Õ°Õ¡Õ´Õ¡Ö€) +document_outline_label=Õ“Õ¡Õ½Õ¿Õ¡Õ©Õ²Õ©Õ« Õ¢Õ¸Õ¾Õ¡Õ¶Õ¤Õ¡Õ¯Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ attachments.title=Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ Õ¯ÖÕ¸Ö€Õ¤Õ¶Õ¥Ö€Õ¨ attachments_label=Ô¿ÖÕ¸Ö€Õ¤Õ¶Õ¥Ö€ thumbs.title=Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ Õ„Õ¡Õ¶Ö€Õ¡ÕºÕ¡Õ¿Õ¯Õ¥Ö€Õ¨ @@ -111,7 +117,8 @@ thumb_page_title=Ô·Õ»Õ¨ {{page}} thumb_page_canvas=Ô·Õ»Õ« Õ´Õ¡Õ¶Ö€Õ¡ÕºÕ¡Õ¿Õ¯Õ¥Ö€Õ¨ {{page}} # Find panel button title and messages -find_label=Ô³Õ¿Õ¶Õ¥Õ¬` +find_input.title=ÕˆÖ€Õ¸Õ¶Õ¸Ö‚Õ´ +find_input.placeholder=Ô³Õ¿Õ¶Õ¥Õ¬ ÖƒÕ¡Õ½Õ¿Õ¡Õ©Õ²Õ©Õ¸Ö‚Õ´... find_previous.title=Ô³Õ¿Õ¶Õ¥Õ¬ Õ¡Õ¶Ö€Õ¡Õ°Õ¡ÕµÕ¿Õ¸Ö‚Õ©ÕµÕ¡Õ¶ Õ¶Õ¡ÕÕ¸Ö€Õ¤ Õ°Õ¡Õ¶Õ¤Õ«ÕºÕ¸Ö‚Õ´Õ¨ find_previous_label=Õ†Õ¡ÕÕ¸Ö€Õ¤Õ¨ find_next.title=Ô³Õ¿Õ«Ö€ Õ¡Ö€Õ¿Õ¡Õ°Õ¡ÕµÕ¿Õ¸Ö‚Õ©ÕµÕ¡Õ¶ Õ°Õ¡Õ»Õ¸Ö€Õ¤ Õ°Õ¡Õ¶Õ¤Õ«ÕºÕ¸Ö‚Õ´Õ¨ @@ -164,10 +171,10 @@ unexpected_response_error=ÕÕºÕ¡Õ½Õ¡Ö€Õ¯Õ«Õ¹Õ« Õ¡Õ¶Õ½ÕºÕ¡Õ½Õ¥Õ¬Õ« ÕºÕ¡Õ¿Õ¡Õ½ÕÕ¡ text_annotation_type.alt=[{{type}} Ô¾Õ¡Õ¶Õ¸Õ©Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶] password_label=Õ„Õ¸Ö‚Õ¿Ö„Õ¡Õ£Ö€Õ¥Ö„ PDF-Õ« Õ£Õ¡Õ²Õ¿Õ¶Õ¡Õ¢Õ¡Õ¼Õ¨: password_invalid=Ô³Õ¡Õ²Õ¿Õ¶Õ¡Õ¢Õ¡Õ¼Õ¨ Õ½ÕÕ¡Õ¬ Õ§: Ô¿Ö€Õ¯Õ«Õ¶ ÖƒÕ¸Ö€Õ±Õ¥Ö„: -password_ok=Ô¼Ô±ÕŽ +password_ok=Ô¼Õ¡Õ¾ password_cancel=Õ‰Õ¥Õ²Õ¡Ö€Õ¯Õ¥Õ¬ printing_not_supported=Ô¶Õ£Õ¸Ö‚Õ·Õ¡ÖÕ¸Ö‚Õ´. ÕÕºÕ¥Õ¬Õ¨ Õ¡Õ´Õ¢Õ¸Õ²Õ»Õ¸Ö‚Õ©ÕµÕ¡Õ´Õ¢ Õ¹Õ« Õ¡Õ»Õ¡Õ¯ÖÕ¾Õ¸Ö‚Õ´ Õ¤Õ«Õ¿Õ¡Ö€Õ¯Õ«Õ¹Õ« Õ¯Õ¸Õ²Õ´Õ«ÖÖ‰ printing_not_ready=Ô¶Õ£Õ¸Ö‚Õ·Õ¡ÖÕ¸Ö‚Õ´. PDF-Õ¨ Õ¡Õ´Õ¢Õ¸Õ²Õ»Õ¸Ö‚Õ©ÕµÕ¡Õ´Õ¢ Õ¹Õ« Õ¢Õ¥Õ¼Õ¶Õ¡Õ¾Õ¸Ö€Õ¾Õ¥Õ¬ Õ¿ÕºÕ¥Õ¬Õ¸Ö‚ Õ°Õ¡Õ´Õ¡Ö€: web_fonts_disabled=ÕŽÕ¥Õ¢-Õ¿Õ¡Õ¼Õ¡Õ¿Õ¥Õ½Õ¡Õ¯Õ¶Õ¥Ö€Õ¨ Õ¡Õ¶Õ»Õ¡Õ¿Õ¾Õ¡Õ® Õ¥Õ¶. Õ°Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ§ Ö…Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¥Õ¬ Õ¶Õ¥Ö€Õ¯Õ¡Õ¼Õ¸Ö‚ÖÕ¾Õ¡Õ® PDF Õ¿Õ¡Õ¼Õ¡Õ¿Õ¥Õ½Õ¡Õ¯Õ¶Õ¥Ö€Õ¨: -document_colors_not_allowed=PDF ÖƒÕ¡Õ½Õ¿Õ¡Õ©Õ²Õ©Õ¥Ö€Õ«Õ¶ Õ©Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¾Õ¡Õ® Õ¹Õ§ Ö…Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¥Õ¬ Õ«Ö€Õ¥Õ¶Ö Õ½Õ¥ÖƒÕ¡Õ¯Õ¡Õ¶ Õ£Õ¸Ö‚ÕµÕ¶Õ¥Ö€Õ¨: 'Ô¹Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¥Õ¬ Õ§Õ»Õ¥Ö€Õ«Õ¶ Õ¨Õ¶Õ¿Ö€Õ¥Õ¬ Õ«Ö€Õ¥Õ¶Ö Õ½Õ¥ÖƒÕ¡Õ¯Õ¡Õ¶ Õ£Õ¸Ö‚ÕµÕ¶Õ¥Ö€Õ¨' Õ¨Õ¶Õ¿Ö€Õ¡Õ¶Ö„Õ¨ Õ¡Õ¶Õ»Õ¡Õ¿Õ¾Õ¡Õ® Õ§ Õ¤Õ«Õ¿Õ¡Ö€Õ¯Õ«Õ¹Õ¸Ö‚Õ´: +document_colors_not_allowed=PDF ÖƒÕ¡Õ½Õ¿Õ¡Õ©Õ²Õ©Õ¥Ö€Õ«Õ¶ Õ©Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¾Õ¡Õ® Õ¹Õ§ Ö…Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¥Õ¬ Õ«Ö€Õ¥Õ¶Ö Õ½Õ¥ÖƒÕ¡Õ¯Õ¡Õ¶ Õ£Õ¸Ö‚ÕµÕ¶Õ¥Ö€Õ¨: “Թույլատրել Õ§Õ»Õ¥Ö€Õ«Õ¶ Õ¨Õ¶Õ¿Ö€Õ¥Õ¬ Õ«Ö€Õ¥Õ¶Ö Õ½Õ¥ÖƒÕ¡Õ¯Õ¡Õ¶ գույները“ Õ¨Õ¶Õ¿Ö€Õ¡Õ¶Ö„Õ¨ Õ¡Õ¶Õ»Õ¡Õ¿Õ¾Õ¡Õ® Õ§ Õ¤Õ«Õ¿Õ¡Ö€Õ¯Õ«Õ¹Õ¸Ö‚Õ´: diff --git a/vendor/pdfjs/web/locale/id/viewer.properties b/vendor/pdfjs/web/locale/id/viewer.properties index 762a472..fa847e2 100644 --- a/vendor/pdfjs/web/locale/id/viewer.properties +++ b/vendor/pdfjs/web/locale/id/viewer.properties @@ -18,12 +18,15 @@ previous_label=Sebelumnya next.title=Laman Selanjutnya next_label=Selanjutnya -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Laman: -page_of=dari {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Halaman +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=dari {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} dari {{pagesCount}}) zoom_out.title=Perkecil zoom_out_label=Perkecil @@ -57,10 +60,10 @@ page_rotate_ccw.title=Putar Berlawanan Arah Jarum Jam page_rotate_ccw.label=Putar Berlawanan Arah Jarum Jam page_rotate_ccw_label=Putar Berlawanan Arah Jarum Jam -hand_tool_enable.title=Aktifkan alat tangan -hand_tool_enable_label=Aktifkan alat tangan -hand_tool_disable.title=Nonaktifkan alat tangan -hand_tool_disable_label=Nonaktifkan alat tangan +cursor_text_select_tool.title=Aktifkan Alat Seleksi Teks +cursor_text_select_tool_label=Alat Seleksi Teks +cursor_hand_tool.title=Aktifkan Alat Tangan +cursor_hand_tool_label=Alat Tangan # Document properties dialog box document_properties.title=Properti Dokumen… @@ -88,13 +91,20 @@ document_properties_version=Versi PDF: document_properties_page_count=Jumlah Halaman: document_properties_close=Tutup +print_progress_message=Menyiapkan dokumen untuk pencetakan… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Batalkan + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Aktif/Nonaktifkan Bilah Samping +toggle_sidebar_notification.title=Aktif/Nonaktifkan Bilah Samping (dokumen berisi kerangka/lampiran) toggle_sidebar_label=Aktif/Nonaktifkan Bilah Samping -outline.title=Buka Kerangka Dokumen -outline_label=Kerangka Dokumen +document_outline.title=Tampilkan Kerangka Dokumen (klik ganda untuk membentangkan/menciutkan semua item) +document_outline_label=Kerangka Dokumen attachments.title=Tampilkan Lampiran attachments_label=Lampiran thumbs.title=Tampilkan Miniatur @@ -111,7 +121,8 @@ thumb_page_title=Laman {{page}} thumb_page_canvas=Miniatur Laman {{page}} # Find panel button title and messages -find_label=Temukan: +find_input.title=Temukan +find_input.placeholder=Temukan di dokumen… find_previous.title=Temukan kata sebelumnya find_previous_label=Sebelumnya find_next.title=Temukan lebih lanjut diff --git a/vendor/pdfjs/web/locale/is/viewer.properties b/vendor/pdfjs/web/locale/is/viewer.properties index e969f4e..2cfd266 100644 --- a/vendor/pdfjs/web/locale/is/viewer.properties +++ b/vendor/pdfjs/web/locale/is/viewer.properties @@ -18,12 +18,15 @@ previous_label=Fyrri next.title=Næsta sÃða next_label=Næsti -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=SÃða: -page_of=af {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=SÃða +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=af {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} af {{pagesCount}}) zoom_out.title=Minnka zoom_out_label=Minnka @@ -57,10 +60,10 @@ page_rotate_ccw.title=Snúa rangsælis page_rotate_ccw.label=Snúa rangsælis page_rotate_ccw_label=Snúa rangsælis -hand_tool_enable.title=Virkja handarverkfæri -hand_tool_enable_label=Virkja handarverkfæri -hand_tool_disable.title=Gera handarverkfæri óvirkt -hand_tool_disable_label=Gera handarverkfæri óvirkt +cursor_text_select_tool.title=Virkja textavalsáhald +cursor_text_select_tool_label=Textavalsáhald +cursor_hand_tool.title=Virkja handarverkfæri +cursor_hand_tool_label=Handarverkfæri # Document properties dialog box document_properties.title=Eiginleikar skjals… @@ -88,13 +91,20 @@ document_properties_version=PDF útgáfa: document_properties_page_count=BlaðsÃðufjöldi: document_properties_close=Loka +print_progress_message=Undirbý skjal fyrir prentun… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Hætta við + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=VÃxla hliðslá +toggle_sidebar_notification.title=VÃxla hliðarslá (skjal inniheldur yfirlit/viðhengi) toggle_sidebar_label=VÃxla hliðslá -outline.title=Sýna efniskipan skjals -outline_label=Efnisskipan skjals +document_outline.title=Sýna yfirlit skjals (tvÃsmelltu til að opna/loka öllum hlutum) +document_outline_label=Efnisskipan skjals attachments.title=Sýna viðhengi attachments_label=Viðhengi thumbs.title=Sýna smámyndir @@ -111,7 +121,8 @@ thumb_page_title=SÃða {{page}} thumb_page_canvas=Smámynd af sÃðu {{page}} # Find panel button title and messages -find_label=Leita: +find_input.title=Leita +find_input.placeholder=Leita à skjali… find_previous.title=Leita að fyrra tilfelli þessara orða find_previous_label=Fyrri find_next.title=Leita að næsta tilfelli þessara orða @@ -170,4 +181,4 @@ password_cancel=Hætta við printing_not_supported=Aðvörun: Prentun er ekki með fyllilegan stuðning á þessum vafra. printing_not_ready=Aðvörun: Ekki er búið að hlaða inn allri PDF skránni fyrir prentun. web_fonts_disabled=Vef leturgerðir eru óvirkar: get ekki notað innbyggðar PDF leturgerðir. -document_colors_not_allowed=PDF skjöl hafa ekki leyfi til að nota sÃna eigin liti: 'Leyfa sÃðum að velja eigin liti' er óvirkt à vafranum. +document_colors_not_allowed=PDF skjöl hafa ekki leyfi til að nota sÃna eigin liti: “Leyfa sÃðum að velja eigin liti†er óvirkt à vafranum. diff --git a/vendor/pdfjs/web/locale/it/viewer.properties b/vendor/pdfjs/web/locale/it/viewer.properties index e9c633a..f385aa8 100644 --- a/vendor/pdfjs/web/locale/it/viewer.properties +++ b/vendor/pdfjs/web/locale/it/viewer.properties @@ -6,8 +6,9 @@ previous.title = Pagina precedente previous_label = Precedente next.title = Pagina successiva next_label = Successiva -page_label = Pagina: -page_of = di {{pageCount}} +page.title = Pagina +of_pages = di {{pagesCount}} +page_of_pages = ({{pageNumber}} di {{pagesCount}}) zoom_out.title = Riduci zoom zoom_out_label = Riduci zoom zoom_in.title = Aumenta zoom @@ -16,7 +17,7 @@ zoom.title = Zoom presentation_mode.title = Passa alla modalità presentazione presentation_mode_label = Modalità presentazione open_file.title = Apri file -open_file_label = Apri file +open_file_label = Apri print.title = Stampa print_label = Stampa download.title = Scarica questo documento @@ -37,10 +38,10 @@ page_rotate_cw_label = Ruota in senso orario page_rotate_ccw.title = Ruota in senso antiorario page_rotate_ccw.label = Ruota in senso antiorario page_rotate_ccw_label = Ruota in senso antiorario -hand_tool_enable.title = Attiva strumento mano -hand_tool_enable_label = Attiva strumento mano -hand_tool_disable.title = Disattiva strumento mano -hand_tool_disable_label = Disattiva strumento mano +cursor_text_select_tool.title = Attiva strumento di selezione testo +cursor_text_select_tool_label = Strumento di selezione testo +cursor_hand_tool.title = Attiva strumento mano +cursor_hand_tool_label = Strumento mano document_properties.title = Proprietà del documento… document_properties_label = Proprietà del documento… document_properties_file_name = Nome file: @@ -59,10 +60,14 @@ document_properties_producer = Produttore PDF: document_properties_version = Versione PDF: document_properties_page_count = Conteggio pagine: document_properties_close = Chiudi +print_progress_message = Preparazione documento per la stampa… +print_progress_percent = {{progress}}% +print_progress_close = Annulla toggle_sidebar.title = Attiva/disattiva barra laterale +toggle_sidebar_notification.title = Attiva/disattiva barra laterale (il documento contiene struttura/allegati) toggle_sidebar_label = Attiva/disattiva barra laterale -outline.title = Visualizza la struttura del documento -outline_label = Struttura documento +document_outline.title = Visualizza la struttura del documento (doppio clic per visualizzare/nascondere tutti gli elementi) +document_outline_label = Struttura documento attachments.title = Visualizza allegati attachments_label = Allegati thumbs.title = Mostra le miniature @@ -71,7 +76,8 @@ findbar.title = Trova nel documento findbar_label = Trova thumb_page_title = Pagina {{page}} thumb_page_canvas = Miniatura della pagina {{page}} -find_label = Trova: +find_input.title = Trova +find_input.placeholder = Trova nel documento… find_previous.title = Trova l’occorrenza precedente del testo da cercare find_previous_label = Precedente find_next.title = Trova l’occorrenza successiva del testo da cercare @@ -81,8 +87,8 @@ find_match_case_label = Maiuscole/minuscole find_reached_top = Raggiunto l’inizio della pagina, continua dalla fine find_reached_bottom = Raggiunta la fine della pagina, continua dall’inizio find_not_found = Testo non trovato -error_more_info = Più informazioni -error_less_info = Meno informazioni +error_more_info = Ulteriori informazioni +error_less_info = Nascondi dettagli error_close = Chiudi error_version_info = PDF.js v{{version}} (build: {{build}}) error_message = Messaggio: {{message}} @@ -108,4 +114,4 @@ password_cancel = Annulla printing_not_supported = Attenzione: la stampa non è completamente supportata da questo browser. printing_not_ready = Attenzione: il PDF non è ancora stato caricato completamente per la stampa. web_fonts_disabled = I web font risultano disattivati: impossibile utilizzare i caratteri inclusi nel PDF. -document_colors_not_allowed = Non è possibile per i documenti PDF utilizzare i propri colori: l’opzione del browser “Permetti alle pagine di scegliere i propri colori invece di quelli impostati†è disattivata. +document_colors_not_allowed = Non è possibile visualizzare i colori originali definiti nel file PDF: l’opzione del browser “Consenti alle pagine di scegliere i propri colori invece di quelli impostati†è disattivata. diff --git a/vendor/pdfjs/web/locale/ja/viewer.properties b/vendor/pdfjs/web/locale/ja/viewer.properties index 10a21d9..4149d9e 100644 --- a/vendor/pdfjs/web/locale/ja/viewer.properties +++ b/vendor/pdfjs/web/locale/ja/viewer.properties @@ -18,12 +18,15 @@ previous_label=å‰ã¸ next.title=次ã®ãƒšãƒ¼ã‚¸ã¸é€²ã¿ã¾ã™ next_label=次㸠-# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=ページ: -page_of=/ {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=ページ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=/ {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} / {{pagesCount}}) zoom_out.title=表示を縮å°ã—ã¾ã™ zoom_out_label=ç¸®å° @@ -32,7 +35,7 @@ zoom_in_label=拡大 zoom.title=拡大/ç¸®å° presentation_mode.title=プレゼンテーションモードã«åˆ‡ã‚Šæ›¿ãˆã¾ã™ presentation_mode_label=プレゼンテーションモード -open_file.title=ファイルを指定ã—ã¦é–‹ãã¾ã™ +open_file.title=ファイルを開ãã¾ã™ open_file_label=é–‹ã print.title=å°åˆ·ã—ã¾ã™ print_label=å°åˆ· @@ -57,17 +60,21 @@ page_rotate_ccw.title=ページを左ã¸å›žè»¢ã—ã¾ã™ page_rotate_ccw.label=左回転 page_rotate_ccw_label=左回転 -hand_tool_enable.title=手ã®ã²ã‚‰ãƒ„ールを有効ã«ã—ã¾ã™ -hand_tool_enable_label=手ã®ã²ã‚‰ãƒ„ールを有効ã«ã™ã‚‹ -hand_tool_disable.title=手ã®ã²ã‚‰ãƒ„ールを無効ã«ã—ã¾ã™ -hand_tool_disable_label=手ã®ã²ã‚‰ãƒ„ールを無効ã«ã™ã‚‹ +cursor_text_select_tool.title=テã‚ストé¸æŠžãƒ„ールを有効ã«ã™ã‚‹ +cursor_text_select_tool_label=テã‚ストé¸æŠžãƒ„ール +cursor_hand_tool.title=手ã®ã²ã‚‰ãƒ„ールを有効ã«ã™ã‚‹ +cursor_hand_tool_label=手ã®ã²ã‚‰ãƒ„ール # Document properties dialog box document_properties.title=文書ã®ãƒ—ãƒãƒ‘ティ... document_properties_label=文書ã®ãƒ—ãƒãƒ‘ティ... document_properties_file_name=ファイルå: document_properties_file_size=ファイルサイズ: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. document_properties_mb={{size_mb}} MB ({{size_b}} bytes) document_properties_title=タイトル: document_properties_author=作æˆè€…: @@ -75,6 +82,8 @@ document_properties_subject=件å: document_properties_keywords=ã‚ーワード: document_properties_creation_date=作æˆæ—¥: document_properties_modification_date=æ›´æ–°æ—¥: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. document_properties_date_string={{date}}, {{time}} document_properties_creator=アプリケーション: document_properties_producer=PDF 作æˆ: @@ -82,13 +91,20 @@ document_properties_version=PDF ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³: document_properties_page_count=ページ数: document_properties_close=é–‰ã˜ã‚‹ +print_progress_message=文書ã®å°åˆ·ã‚’準備ã—ã¦ã„ã¾ã™... +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=ã‚ャンセル + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=サイドãƒãƒ¼è¡¨ç¤ºã‚’切り替ãˆã¾ã™ +toggle_sidebar_notification.title=サイドãƒãƒ¼è¡¨ç¤ºã‚’切り替ãˆã¾ã™ (文書ã«å«ã¾ã‚Œã‚‹ã‚¢ã‚¦ãƒˆãƒ©ã‚¤ãƒ³ / 添付) toggle_sidebar_label=サイドãƒãƒ¼ã®åˆ‡ã‚Šæ›¿ãˆ -outline.title=文書ã®ç›®æ¬¡ã‚’表示ã—ã¾ã™ -outline_label=文書ã®ç›®æ¬¡ +document_outline.title=文書ã®ç›®æ¬¡ã‚’表示ã—ã¾ã™ (ダブルクリックã§é …目を開閉ã—ã¾ã™) +document_outline_label=文書ã®ç›®æ¬¡ attachments.title=添付ファイルを表示ã—ã¾ã™ attachments_label=添付ファイル thumbs.title=縮å°ç‰ˆã‚’表示ã—ã¾ã™ @@ -105,20 +121,21 @@ thumb_page_title={{page}} ページ thumb_page_canvas=ページã®ç¸®å°ç‰ˆ {{page}} # Find panel button title and messages -find_label=検索: -find_previous.title=指定文å—列ã«ä¸€è‡´ã™ã‚‹ 1 ã¤å‰ã®éƒ¨åˆ†ã‚’検索ã—ã¾ã™ +find_input.title=検索 +find_input.placeholder=文書内を検索... +find_previous.title=ç¾åœ¨ã‚ˆã‚Šå‰ã®ä½ç½®ã§æŒ‡å®šæ–‡å—列ãŒç¾ã‚Œã‚‹éƒ¨åˆ†ã‚’検索ã—ã¾ã™ find_previous_label=å‰ã¸ -find_next.title=指定文å—列ã«ä¸€è‡´ã™ã‚‹æ¬¡ã®éƒ¨åˆ†ã‚’検索ã—ã¾ã™ +find_next.title=ç¾åœ¨ã‚ˆã‚Šå¾Œã®ä½ç½®ã§æŒ‡å®šæ–‡å—列ãŒç¾ã‚Œã‚‹éƒ¨åˆ†ã‚’検索ã—ã¾ã™ find_next_label=次㸠find_highlight=ã™ã¹ã¦å¼·èª¿è¡¨ç¤º find_match_case_label=大文å—/å°æ–‡å—を区別 -find_reached_top=文書先é ã«åˆ°é”ã—ãŸã®ã§æœ«å°¾ã«æˆ»ã£ã¦æ¤œç´¢ã—ã¾ã—ãŸã€‚ -find_reached_bottom=文書末尾ã«åˆ°é”ã—ãŸã®ã§å…ˆé ã«æˆ»ã£ã¦æ¤œç´¢ã—ã¾ã—ãŸã€‚ -find_not_found=見ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚ +find_reached_top=文書先é ã«åˆ°é”ã—ãŸã®ã§æœ«å°¾ã‹ã‚‰ç¶šã‘ã¦æ¤œç´¢ã—ã¾ã™ +find_reached_bottom=文書末尾ã«åˆ°é”ã—ãŸã®ã§å…ˆé ã‹ã‚‰ç¶šã‘ã¦æ¤œç´¢ã—ã¾ã™ +find_not_found=見ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—㟠# Error panel labels error_more_info=è©³ç´°æƒ…å ± -error_less_info=è©³ç´°æƒ…å ±ã®éžè¡¨ç¤º +error_less_info=è©³ç´°æƒ…å ±ã‚’éš ã™ error_close=é–‰ã˜ã‚‹ # LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be # replaced by the PDF.JS version and build ID. @@ -133,7 +150,7 @@ error_stack=スタック: {{stack}} error_file=ファイル: {{file}} # LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number error_line=è¡Œ: {{line}} -rendering_error=ページã®ãƒ¬ãƒ³ãƒ€ãƒªãƒ³ã‚°ä¸ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—㟠+rendering_error=ページã®ãƒ¬ãƒ³ãƒ€ãƒªãƒ³ã‚°ä¸ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚ # Predefined zoom values page_scale_width=å¹…ã«åˆã‚ã›ã‚‹ @@ -146,10 +163,10 @@ page_scale_percent={{scale}}% # Loading indicator messages loading_error_indicator=エラー -loading_error=PDF ã®èªã¿è¾¼ã¿ä¸ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—㟠-invalid_file_error=無効ã¾ãŸã¯ç ´æã—㟠PDF ファイル +loading_error=PDF ã®èªã¿è¾¼ã¿ä¸ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚ +invalid_file_error=無効ã¾ãŸã¯ç ´æã—㟠PDF ファイル。 missing_file_error=PDF ファイルãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。 -unexpected_response_error=サーãƒã‹ã‚‰äºˆæœŸã›ã¬å¿œç”ãŒã‚ã‚Šã¾ã—ãŸã€‚ +unexpected_response_error=サーãƒãƒ¼ã‹ã‚‰äºˆæœŸã›ã¬å¿œç”ãŒã‚ã‚Šã¾ã—ãŸã€‚ # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in @@ -161,7 +178,7 @@ password_invalid=無効ãªãƒ‘スワードã§ã™ã€‚ã‚‚ã†ä¸€åº¦ã‚„ã‚Šç›´ã—ã¦ã password_ok=OK password_cancel=ã‚ャンセル -printing_not_supported=è¦å‘Š: ã“ã®ãƒ–ラウザã§ã¯å°åˆ·ãŒå®Œå…¨ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“ -printing_not_ready=è¦å‘Š: PDF ã‚’å°åˆ·ã™ã‚‹ãŸã‚ã®èªã¿è¾¼ã¿ãŒçµ‚了ã—ã¦ã„ã¾ã›ã‚“ -web_fonts_disabled=Web フォントãŒç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™: 埋ã‚è¾¼ã¾ã‚ŒãŸ PDF ã®ãƒ•ã‚©ãƒ³ãƒˆã‚’使用ã§ãã¾ã›ã‚“ -document_colors_disabled=PDF 文書ã¯ã€Web ページãŒæŒ‡å®šã—ãŸé…色を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“: \u0027Web ページãŒæŒ‡å®šã—ãŸé…色\u0027 ã¯ãƒ–ラウザã§ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ +printing_not_supported=è¦å‘Š: ã“ã®ãƒ–ラウザーã§ã¯å°åˆ·ãŒå®Œå…¨ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。 +printing_not_ready=è¦å‘Š: PDF ã‚’å°åˆ·ã™ã‚‹ãŸã‚ã®èªã¿è¾¼ã¿ãŒçµ‚了ã—ã¦ã„ã¾ã›ã‚“。 +web_fonts_disabled=ウェブフォントãŒç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™: 埋ã‚è¾¼ã¾ã‚ŒãŸ PDF ã®ãƒ•ã‚©ãƒ³ãƒˆã‚’使用ã§ãã¾ã›ã‚“。 +document_colors_not_allowed=PDF 文書ã¯ã€ã‚¦ã‚§ãƒ–ページãŒæŒ‡å®šã—ãŸé…色を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“: 'ウェブページãŒæŒ‡å®šã—ãŸé…色' ã¯ãƒ–ラウザーã§ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚ diff --git a/vendor/pdfjs/web/locale/ka/viewer.properties b/vendor/pdfjs/web/locale/ka/viewer.properties index 6644ad2..ac033c2 100644 --- a/vendor/pdfjs/web/locale/ka/viewer.properties +++ b/vendor/pdfjs/web/locale/ka/viewer.properties @@ -13,66 +13,172 @@ # limitations under the License. # Main toolbar buttons (tooltips and alt text for images) +previous.title=წინრგვერდი +previous_label=წინრ+next.title=შემდეგი გვერდი +next_label=შემდეგი -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=გვერდი +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}}-დáƒáƒœ +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} {{pagesCount}}-დáƒáƒœ) -zoom.title=მáƒáƒ¡áƒ¨áƒ¢áƒáƒ‘ი +zoom_out.title=დáƒáƒ¨áƒáƒ ებრ+zoom_out_label=დáƒáƒ¨áƒáƒ ებრ+zoom_in.title=მიáƒáƒ®áƒšáƒáƒ”ბრ+zoom_in_label=მიáƒáƒ®áƒšáƒáƒ”ბრ+zoom.title=ზáƒáƒ›áƒ˜áƒ¡ ცვლილებრ+presentation_mode.title=პრეზენტáƒáƒªáƒ˜áƒ˜áƒ¡ რეჟიმზე გáƒáƒ“áƒáƒ თვრ+presentation_mode_label=პრეზენტáƒáƒªáƒ˜áƒ˜áƒ¡ რეჟიმი open_file.title=ფáƒáƒ˜áƒšáƒ˜áƒ¡ გáƒáƒ®áƒ¡áƒœáƒ open_file_label=გáƒáƒ®áƒ¡áƒœáƒ +print.title=დáƒáƒ‘ეáƒáƒ“ვრ+print_label=დáƒáƒ‘ეáƒáƒ“ვრ+download.title=ჩáƒáƒ›áƒáƒ¢áƒ•áƒ˜áƒ თვრ+download_label=ჩáƒáƒ›áƒáƒ¢áƒ•áƒ˜áƒ თვრ+bookmark.title=მიმდინáƒáƒ ე ხედი (დáƒáƒ™áƒáƒžáƒ˜áƒ ებრáƒáƒœ გáƒáƒ®áƒ¡áƒœáƒ áƒáƒ®áƒáƒš ფáƒáƒœáƒ¯áƒáƒ áƒáƒ¨áƒ˜) +bookmark_label=მიმდინáƒáƒ ე ხედი # Secondary toolbar and context menu +tools.title=ხელსáƒáƒ¬áƒ§áƒáƒ”ბი +tools_label=ხელსáƒáƒ¬áƒ§áƒáƒ”ბი +first_page.title=პირველ გვერდზე გáƒáƒ“áƒáƒ¡áƒ•áƒšáƒ +first_page.label=პირველ გვერდზე გáƒáƒ“áƒáƒ¡áƒ•áƒšáƒ +first_page_label=პირველ გვერდზე გáƒáƒ“áƒáƒ¡áƒ•áƒšáƒ +last_page.title=ბáƒáƒšáƒ გვერდზე გáƒáƒ“áƒáƒ¡áƒ•áƒšáƒ +last_page.label=ბáƒáƒšáƒ გვერდზე გáƒáƒ“áƒáƒ¡áƒ•áƒšáƒ +last_page_label=ბáƒáƒšáƒ გვერდზე გáƒáƒ“áƒáƒ¡áƒ•áƒšáƒ +page_rotate_cw.title=ისრის მიმáƒáƒ თულებით შებრუნებრ+page_rotate_cw.label=ისრის მიმáƒáƒ თულებით შებრუნებრ+page_rotate_cw_label=ისრის მიმáƒáƒ თულებით შებრუნებრ+page_rotate_ccw.title=ისრის სáƒáƒžáƒ˜áƒ ისპირáƒáƒ“ შებრუნებრ+page_rotate_ccw.label=ისრის სáƒáƒžáƒ˜áƒ ისპირáƒáƒ“ შებრუნებრ+page_rotate_ccw_label=ისრის სáƒáƒžáƒ˜áƒ ისპირáƒáƒ“ შებრუნებრ+cursor_text_select_tool.title=მáƒáƒ¡áƒáƒœáƒ˜áƒ¨áƒœáƒ˜ კურსáƒáƒ ის ჩáƒáƒ თვრ+cursor_text_select_tool_label=მáƒáƒ¡áƒáƒœáƒ˜áƒ¨áƒœáƒ˜ კურსáƒáƒ ი +cursor_hand_tool.title=გáƒáƒ“áƒáƒ¡áƒáƒáƒ“გილებელი კურსáƒáƒ ის ჩáƒáƒ თვრ+cursor_hand_tool_label=გáƒáƒ“áƒáƒ¡áƒáƒáƒ“გილებელი კურსáƒáƒ ი # Document properties dialog box +document_properties.title=დáƒáƒ™áƒ£áƒ›áƒ”ნტის თვისებები… +document_properties_label=დáƒáƒ™áƒ£áƒ›áƒ”ნტის თვისებები… +document_properties_file_name=ფáƒáƒ˜áƒšáƒ˜áƒ¡ სáƒáƒ®áƒ”ლი: +document_properties_file_size=ფáƒáƒ˜áƒšáƒ˜áƒ¡ ზáƒáƒ›áƒ: # LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" # will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} კბ ({{size_b}} ბáƒáƒ˜áƒ¢áƒ˜) # LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" # will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} მბ ({{size_b}} ბáƒáƒ˜áƒ¢áƒ˜) document_properties_title=სáƒáƒ—áƒáƒ£áƒ ი: +document_properties_author=áƒáƒ•áƒ¢áƒáƒ ი: +document_properties_subject=თემáƒ: +document_properties_keywords=სáƒáƒ™áƒ•áƒáƒœáƒ«áƒ სიტყვები: +document_properties_creation_date=შექმნის თáƒáƒ იღი: +document_properties_modification_date=სáƒáƒ®áƒ”ცვáƒáƒšáƒ”ბის თáƒáƒ იღი: # LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" # will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=შემქმნელი: +document_properties_producer=PDF მწáƒáƒ მáƒáƒ”ბელი: +document_properties_version=PDF ვერსიáƒ: +document_properties_page_count=გვერდების რáƒáƒáƒ“ენáƒáƒ‘áƒ: +document_properties_close=დáƒáƒ®áƒ£áƒ ვრ+ +print_progress_message=დáƒáƒ™áƒ£áƒ›áƒ”ნტი მზáƒáƒ“დებრáƒáƒ›áƒáƒ¡áƒáƒ‘ეáƒáƒ“áƒáƒ“… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=გáƒáƒ£áƒ¥áƒ›áƒ”ბრ# Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) -findbar_label=პáƒáƒ•áƒœáƒ +toggle_sidebar.title=გვერდითრზáƒáƒšáƒ˜áƒ¡ გáƒáƒ›áƒáƒ©áƒ”ნრ+toggle_sidebar_notification.title=გვერდითრზáƒáƒšáƒ˜áƒ¡ ჩáƒáƒ თვáƒ/გáƒáƒ›áƒáƒ თვრ(დáƒáƒ™áƒ£áƒ›áƒ”ნტი შეიცáƒáƒ•áƒ¡ მáƒáƒ®áƒáƒ–ულáƒáƒ‘áƒ/დáƒáƒœáƒáƒ თს) +toggle_sidebar_label=გვერდითრზáƒáƒšáƒ˜áƒ¡ გáƒáƒ›áƒáƒ©áƒ”ნრ+document_outline.title=დáƒáƒ™áƒ£áƒ›áƒ”ნტის მáƒáƒ®áƒáƒ–ულáƒáƒ‘ის ჩვენებრ(áƒáƒ ჯერდáƒáƒ¬áƒ™áƒáƒžáƒ”ბით ყველრელემენტის გáƒáƒ¨áƒšáƒ/áƒáƒ™áƒ”ცვáƒ) +document_outline_label=დáƒáƒ™áƒ£áƒ›áƒ”ნტის მáƒáƒ®áƒáƒ–ულáƒáƒ‘რ+attachments.title=დáƒáƒœáƒáƒ თების ჩვენებრ+attachments_label=დáƒáƒœáƒáƒ თები +thumbs.title=ესკიზების ჩვენებრ+thumbs_label=ესკიზები +findbar.title=ძიებრდáƒáƒ™áƒ£áƒ›áƒ”ნტში +findbar_label=ძიებრ# Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page # number. +thumb_page_title=გვერდი {{page}} # LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page # number. +thumb_page_canvas=გვერდის ესკიზი {{page}} # Find panel button title and messages +find_input.title=ძიებრ+find_input.placeholder=ძიებრდáƒáƒ™áƒ£áƒ›áƒ”ნტში… find_previous.title=ფრáƒáƒ–ის წინრკáƒáƒœáƒ¢áƒ”ქსტის პáƒáƒ•áƒœáƒ +find_previous_label=წინრfind_next.title=ფრáƒáƒ–ის შემდეგი კáƒáƒœáƒ¢áƒ”ქსტის პáƒáƒ•áƒœáƒ +find_next_label=შემდეგი +find_highlight=ყველáƒáƒ¡ მáƒáƒœáƒ˜áƒ¨áƒ•áƒœáƒ +find_match_case_label=მთáƒáƒ•áƒ ულის გáƒáƒ—ვáƒáƒšáƒ˜áƒ¡áƒ¬áƒ˜áƒœáƒ”ბრ+find_reached_top=მიღწეულირდáƒáƒ™áƒ£áƒ›áƒ”ნტის ზედრწერტილáƒáƒ›áƒ“ე, გრძელდებრქვემáƒáƒ“áƒáƒœ +find_reached_bottom=მიღწეულირდáƒáƒ™áƒ£áƒ›áƒ”ნტის ბáƒáƒšáƒ წერტილáƒáƒ›áƒ“ე, გრძელდებრზემáƒáƒ“áƒáƒœ find_not_found=კáƒáƒœáƒ¢áƒ”ქსტი ვერმáƒáƒ˜áƒ«áƒ”ბნრ# Error panel labels error_more_info=დáƒáƒ›áƒáƒ¢áƒ”ბითი ინფáƒáƒ მáƒáƒªáƒ˜áƒ +error_less_info=ნáƒáƒ™áƒšáƒ”ბი ინფáƒáƒ მáƒáƒªáƒ˜áƒ +error_close=დáƒáƒ®áƒ£áƒ ვრ# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be # replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) # LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an # english string describing the error. +error_message=შეტყáƒáƒ‘ინებáƒ: {{message}} # LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack # trace. +error_stack=სტეკი: {{stack}} # LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=ფáƒáƒ˜áƒšáƒ˜: {{file}} # LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=ხáƒáƒ–ი: {{line}} +rendering_error=გვერდის რენდერისáƒáƒ¡ დáƒáƒ¤áƒ˜áƒ¥áƒ¡áƒ˜áƒ დრშეცდáƒáƒ›áƒ. # Predefined zoom values +page_scale_width=გვერდის სიგáƒáƒœáƒ” +page_scale_fit=გვერდის მáƒáƒ გებრ+page_scale_auto=ზáƒáƒ›áƒ˜áƒ¡ áƒáƒ•áƒ¢áƒáƒ›áƒáƒ¢áƒ£áƒ ი ცვლილებრ+page_scale_actual=áƒáƒ¥áƒ¢áƒ£áƒáƒšáƒ£áƒ ი ზáƒáƒ›áƒ # LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a # numerical scale value. +page_scale_percent={{scale}}% # Loading indicator messages loading_error_indicator=შეცდáƒáƒ›áƒ +loading_error=PDF-ის ჩáƒáƒ¢áƒ•áƒ˜áƒ თვისáƒáƒ¡ დáƒáƒ¤áƒ˜áƒ¥áƒ¡áƒ˜áƒ დრშეცდáƒáƒ›áƒ. +invalid_file_error=áƒáƒ áƒáƒ›áƒáƒ თებული áƒáƒœ დáƒáƒ–იáƒáƒœáƒ”ბული PDF ფáƒáƒ˜áƒšáƒ˜. +missing_file_error=ნáƒáƒ™áƒšáƒ£áƒšáƒ˜ PDF ფáƒáƒ˜áƒšáƒ˜. +unexpected_response_error=სერვერის მáƒáƒ£áƒšáƒáƒ“ნელი პáƒáƒ¡áƒ£áƒ®áƒ˜. # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). # Some common types are e.g.: "Check", "Text", "Comment", "Note" -password_ok=დიáƒáƒ® +text_annotation_type.alt=[{{type}} áƒáƒœáƒáƒ¢áƒáƒªáƒ˜áƒ] +password_label=შეიყვáƒáƒœáƒ”თ პáƒáƒ áƒáƒšáƒ˜, რáƒáƒ—რგáƒáƒ®áƒ¡áƒœáƒáƒ— ეს PDF ფáƒáƒ˜áƒšáƒ˜. +password_invalid=áƒáƒ áƒáƒ¡áƒ¬áƒáƒ ი პáƒáƒ áƒáƒšáƒ˜. გთხáƒáƒ•áƒ—, სცáƒáƒ“ეთ ხელáƒáƒ®áƒšáƒ. +password_ok=კáƒáƒ გი password_cancel=გáƒáƒ£áƒ¥áƒ›áƒ”ბრ+printing_not_supported=გáƒáƒ¤áƒ თხილებáƒ: áƒáƒ› ბრáƒáƒ£áƒ–ერის მიერდáƒáƒ‘ეáƒáƒ“ვრბáƒáƒšáƒáƒ›áƒ“ე მხáƒáƒ დáƒáƒáƒ”რილი áƒáƒ áƒáƒ. +printing_not_ready=გáƒáƒ¤áƒ თხილებáƒ: PDF áƒáƒ›áƒáƒ‘ეáƒáƒ“ვისთვის ბáƒáƒšáƒáƒ›áƒ“ე ჩáƒáƒ¢áƒ•áƒ˜áƒ თული áƒáƒ áƒáƒ. +web_fonts_disabled=ვებშრიფტები გáƒáƒ›áƒáƒ თულიáƒ: ჩáƒáƒ¨áƒ”ნებული PDF შრიფტების გáƒáƒ›áƒáƒ§áƒ”ნებრვერხერხდებáƒ. +document_colors_not_allowed=PDF დáƒáƒ™áƒ£áƒ›áƒ”ნტებს áƒáƒ áƒáƒ¥áƒ•áƒ— სáƒáƒ™áƒ£áƒ—áƒáƒ ი ფერების გáƒáƒ›áƒáƒ§áƒ”ნების უფლებáƒ: ბრáƒáƒ£áƒ–ერში გáƒáƒ›áƒáƒ თულირ"გვერდებისთვის სáƒáƒ™áƒ£áƒ—áƒáƒ ი ფერების გáƒáƒ›áƒáƒ§áƒ”ნების უფლებáƒ". diff --git a/vendor/pdfjs/web/locale/kk/viewer.properties b/vendor/pdfjs/web/locale/kk/viewer.properties index 39e7118..a401108 100644 --- a/vendor/pdfjs/web/locale/kk/viewer.properties +++ b/vendor/pdfjs/web/locale/kk/viewer.properties @@ -18,12 +18,15 @@ previous_label=ÐлдыңғыÑÑ‹ next.title=КелеÑÑ– парақ next_label=КелеÑÑ– -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Парақ: -page_of={{pageCount}} ішінен +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Парақ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}} ішінен +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=(парақ {{pageNumber}}, {{pagesCount}} ішінен) zoom_out.title=Кішірейту zoom_out_label=Кішірейту @@ -57,10 +60,10 @@ page_rotate_ccw.title=Сағат тілі бағытына қарÑÑ‹ бұру page_rotate_ccw.label=Сағат тілі бағытына қарÑÑ‹ бұру page_rotate_ccw_label=Сағат тілі бағытына қарÑÑ‹ бұру -hand_tool_enable.title=Қол Ñайманын Ñ–Ñке қоÑу -hand_tool_enable_label=Қол Ñайманын Ñ–Ñке қоÑу -hand_tool_disable.title=Қол Ñайманын Ñөндіру -hand_tool_disable_label=Қол Ñайманын Ñөндіру +cursor_text_select_tool.title=Мәтінді таңдау Ñайманын Ñ–Ñке қоÑу +cursor_text_select_tool_label=Мәтінді таңдау Ñайманы +cursor_hand_tool.title=Қол Ñайманын Ñ–Ñке қоÑу +cursor_hand_tool_label=Қол Ñайманы # Document properties dialog box document_properties.title=Құжат қаÑиеттері… @@ -73,7 +76,7 @@ document_properties_kb={{size_kb}} КБ ({{size_b}} байт) # LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" # will be replaced by the PDF file size in megabytes, respectively in bytes. document_properties_mb={{size_mb}} МБ ({{size_b}} байт) -document_properties_title=Тақырыбы... +document_properties_title=Тақырыбы: document_properties_author=Ðвторы: document_properties_subject=Тақырыбы: document_properties_keywords=Кілт Ñөздер: @@ -88,13 +91,20 @@ document_properties_version=PDF нұÑқаÑÑ‹: document_properties_page_count=Беттер Ñаны: document_properties_close=Жабу +print_progress_message=Құжатты баÑпаға шығару үшін дайындау… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Ð‘Ð°Ñ Ñ‚Ð°Ñ€Ñ‚Ñƒ + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Бүйір панелін көрÑету/жаÑыру +toggle_sidebar_notification.title=Бүйір панелін көрÑету/жаÑыру (құжатта құрылымы/Ñалынымдар бар) toggle_sidebar_label=Бүйір панелін көрÑету/жаÑыру -outline.title=Құжат құрамаÑын көрÑету -outline_label=Құжат құрамаÑÑ‹ +document_outline.title=Құжат құрылымын көрÑету (барлық нәрÑелерді жазық қылу/жинау үшін Ò›Ð¾Ñ ÑˆÐµÑ€Ñ‚Ñƒ керек) +document_outline_label=Құжат құрамаÑÑ‹ attachments.title=Салынымдарды көрÑету attachments_label=Салынымдар thumbs.title=Кіші көрініÑтерді көрÑету @@ -111,7 +121,8 @@ thumb_page_title={{page}} парағы thumb_page_canvas={{page}} парағы үшін кіші көрініÑÑ– # Find panel button title and messages -find_label=Табу: +find_input.title=Табу +find_input.placeholder=Құжаттан табу… find_previous.title=ОÑÑ‹ Ñөздердің мәтіннен алдыңғы кездеÑуін табу find_previous_label=ÐлдыңғыÑÑ‹ find_next.title=ОÑÑ‹ Ñөздердің мәтіннен келеÑÑ– кездеÑуін табу diff --git a/vendor/pdfjs/web/locale/km/viewer.properties b/vendor/pdfjs/web/locale/km/viewer.properties index 87f700e..e5403cc 100644 --- a/vendor/pdfjs/web/locale/km/viewer.properties +++ b/vendor/pdfjs/web/locale/km/viewer.properties @@ -18,12 +18,15 @@ previous_label=មុន next.title=ទំពáŸážšâ€‹áž”ន្ទាប់ next_label=បន្ទាប់ -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=ទំពáŸážšÂ ៖ -page_of=នៃ {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=ទំពáŸážš +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=នៃ {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} នៃ {{pagesCount}}) zoom_out.title=​បង្រួម zoom_out_label=​បង្រួម @@ -57,10 +60,10 @@ page_rotate_ccw.title=បង្វិល​ច្រាស​ទ្រនិចâ page_rotate_ccw.label=បង្វិល​ច្រាស​ទ្រនិច​នាឡិកា​​ page_rotate_ccw_label=បង្វិល​ច្រាស​ទ្រនិច​នាឡិកា​​ -hand_tool_enable.title=បើក​ឧបករណáŸâ€‹ážŠáŸ„យ​ដៃ -hand_tool_enable_label=បើក​ឧបករណáŸâ€‹ážŠáŸ„យ​ដៃ -hand_tool_disable.title=បិទ​ឧបករណáŸâ€‹áž”្រើ​ដៃ -hand_tool_disable_label=បិទ​ឧបករណáŸâ€‹áž”្រើ​ដៃ +cursor_text_select_tool.title=បើក​ឧបករណáŸâ€‹áž‡áŸ’រើស​អážáŸ’ážáž”áž‘ +cursor_text_select_tool_label=ឧបករណáŸâ€‹áž‡áŸ’រើស​អážáŸ’ážáž”áž‘ +cursor_hand_tool.title=បើក​ឧបករណáŸâ€‹ážŠáŸƒ +cursor_hand_tool_label=ឧបករណáŸâ€‹ážŠáŸƒ # Document properties dialog box document_properties.title=លក្ážážŽâ€‹ážŸáž˜áŸ’áž”ážáŸ’ážáž·â€‹áž¯áž€ážŸáž¶ážšâ€¦ @@ -69,11 +72,11 @@ document_properties_file_name=ឈ្មោះ​ឯកសារ៖ document_properties_file_size=ទំហំ​ឯកសារ៖ # LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" # will be replaced by the PDF file size in kilobytes, respectively in bytes. -document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +document_properties_kb={{size_kb}} KB ({{size_b}} បៃ) # LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" # will be replaced by the PDF file size in megabytes, respectively in bytes. -document_properties_mb={{size_mb}} MB ({{size_b}} bytes) -document_properties_title=ចំណងជើង ៖ +document_properties_mb={{size_mb}} MB ({{size_b}} បៃ) +document_properties_title=ចំណងជើង៖ document_properties_author=អ្នក​និពន្ធ៖ document_properties_subject=ប្រធានបទ៖ document_properties_keywords=ពាក្យ​គន្លឹះ៖ @@ -88,13 +91,20 @@ document_properties_version=កំណែ PDF ៖ document_properties_page_count=ចំនួន​ទំពáŸážšáŸ– document_properties_close=បិទ +print_progress_message=កំពុង​រៀបចំ​ឯកសារ​សម្រាប់​បោះពុម្ព… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=បោះបង់ + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=បិទ/បើក​គ្រាប់​រំកិល +toggle_sidebar_notification.title=បិទ/បើក​របារ​ចំហៀង (ឯកសារ​មាន​មាážáž·áž€áž¶â€‹áž“ៅ​ក្រៅ/attachments) toggle_sidebar_label=បិទ/បើក​គ្រាប់​រំកិល -outline.title=បង្ហាញ​គ្រោង​ឯកសារ -outline_label=គ្រោង​ឯកសារ +document_outline.title=បង្ហាញ​គ្រោង​ឯកសារ (ចុច​ទ្វáŸâ€‹ážŠáž„​ដើម្បី​ពង្រីក/បង្រួម​ធាážáž»â€‹áž‘ាំងអស់) +document_outline_label=គ្រោង​ឯកសារ attachments.title=បង្ហាញ​ឯកសារ​ភ្ជាប់ attachments_label=ឯកសារ​ភ្ជាប់ thumbs.title=បង្ហាញ​រូបភាព​ážáž¼áž…ៗ @@ -111,7 +121,8 @@ thumb_page_title=ទំពáŸážš {{page}} thumb_page_canvas=រូបភាព​ážáž¼áž…​របស់​ទំពáŸážš {{page}} # Find panel button title and messages -find_label=រក ៖ +find_input.title=រក +find_input.placeholder=រក​នៅ​ក្នុង​ឯកសារ... find_previous.title=រក​ពាក្យ ឬ​ឃ្លា​ដែល​បាន​ជួប​មុន find_previous_label=មុន find_next.title=រក​ពាក្យ ឬ​ឃ្លា​ដែល​បាន​ជួប​បន្ទាប់ diff --git a/vendor/pdfjs/web/locale/kn/viewer.properties b/vendor/pdfjs/web/locale/kn/viewer.properties index f206717..7b2dc17 100644 --- a/vendor/pdfjs/web/locale/kn/viewer.properties +++ b/vendor/pdfjs/web/locale/kn/viewer.properties @@ -18,12 +18,13 @@ previous_label=ಹಿಂದಿನ next.title=ಮà³à²‚ದಿನ ಪà³à²Ÿ next_label=ಮà³à²‚ದಿನ -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=ಪà³à²Ÿ: -page_of={{pageCount}} ರಲà³à²²à²¿ +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}} ರಲà³à²²à²¿ +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom_out.title=ಕಿರಿದಾಗಿಸೠzoom_out_label=ಕಿರಿದಾಗಿಸಿ @@ -57,10 +58,6 @@ page_rotate_ccw.title=ಅಪà³à²°à²¦à²•à³à²·à²¿à²£à³†à²¯à²²à³à²²à²¿ ತಿರ page_rotate_ccw.label=ಅಪà³à²°à²¦à²•à³à²·à²¿à²£à³†à²¯à²²à³à²²à²¿ ತಿರà³à²—ಿಸೠpage_rotate_ccw_label=ಅಪà³à²°à²¦à²•à³à²·à²¿à²£à³†à²¯à²²à³à²²à²¿ ತಿರà³à²—ಿಸೠ-hand_tool_enable.title=ಕೈ ಉಪಕರಣವನà³à²¨à³ ಸಕà³à²°à²¿à²¯à²—ೊಳಿಸೠ-hand_tool_enable_label=ಕೈ ಉಪಕರಣವನà³à²¨à³ ಸಕà³à²°à²¿à²¯à²—ೊಳಿಸೠ-hand_tool_disable.title=ಕೈ ಉಪಕರಣವನà³à²¨à³ ನಿಷà³à²•à³à²°à²¿à²¯à²—ೊಳಿಸೠ-hand_tool_disable_label=ಕೈ ಉಪಕರಣವನà³à²¨à³ ನಿಷà³à²•à³à²°à²¿à²¯à²—ೊಳಿಸೠ# Document properties dialog box document_properties.title=ಡಾಕà³à²¯à³à²®à³†à²‚ಟà³â€Œ ಗà³à²£à²—ಳà³... @@ -88,19 +85,20 @@ document_properties_version=PDF ಆವೃತà³à²¤à²¿: document_properties_page_count=ಪà³à²Ÿà²¦ ಎಣಿಕೆ: document_properties_close=ಮà³à²šà³à²šà³ +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=ಬದಿಪಟà³à²Ÿà²¿à²¯à²¨à³à²¨à³ ಹೊರಳಿಸೠtoggle_sidebar_label=ಬದಿಪಟà³à²Ÿà²¿à²¯à²¨à³à²¨à³ ಹೊರಳಿಸೠ-outline.title=ದಸà³à²¤à²¾à²µà³‡à²œà²¿à²¨ ಹೊರರೇಖೆಯನà³à²¨à³ ತೋರಿಸೠ-outline_label=ದಸà³à²¤à²¾à²µà³‡à²œà²¿à²¨ ಹೊರರೇಖೆ +document_outline_label=ದಸà³à²¤à²¾à²µà³‡à²œà²¿à²¨ ಹೊರರೇಖೆ attachments.title=ಲಗತà³à²¤à³à²—ಳನà³à²¨à³ ತೋರಿಸೠattachments_label=ಲಗತà³à²¤à³à²—ಳೠthumbs.title=ಚಿಕà³à²•à²šà²¿à²¤à³à²°à²¦à²‚ತೆ ತೋರಿಸೠthumbs_label=ಚಿಕà³à²•à²šà²¿à²¤à³à²°à²—ಳೠfindbar.title=ದಸà³à²¤à²¾à²µà³‡à²œà²¿à²¨à²²à³à²²à²¿ ಹà³à²¡à³à²•à³ -findbar_label=ಹà³à²¡à³à²•à³ # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -111,7 +109,6 @@ thumb_page_title=ಪà³à²Ÿ {{page}} thumb_page_canvas=ಪà³à²Ÿà²µà²¨à³à²¨à³ ಚಿಕà³à²•à²šà²¿à²¤à³à²°à²¦à²‚ತೆ ತೋರಿಸೠ{{page}} # Find panel button title and messages -find_label=ಹà³à²¡à³à²•à³: find_previous.title=ವಾಕà³à²¯à²¦ ಹಿಂದಿನ ಇರà³à²µà²¿à²•à³†à²¯à²¨à³à²¨à³ ಹà³à²¡à³à²•à³ find_previous_label=ಹಿಂದಿನ find_next.title=ವಾಕà³à²¯à²¦ ಮà³à²‚ದಿನ ಇರà³à²µà²¿à²•à³†à²¯à²¨à³à²¨à³ ಹà³à²¡à³à²•à³ @@ -165,7 +162,6 @@ text_annotation_type.alt=[{{type}} ಟಿಪà³à²ªà²£à²¿] password_label=PDF ಅನà³à²¨à³ ತೆರೆಯಲೠಗà³à²ªà³à²¤à²ªà²¦à²µà²¨à³à²¨à³ ನಮೂದಿಸಿ. password_invalid=ಅಮಾನà³à²¯à²µà²¾à²¦ ಗà³à²ªà³à²¤à²ªà²¦, ದಯವಿಟà³à²Ÿà³ ಇನà³à²¨à³Šà²®à³à²®à³† ಪà³à²°à²¯à²¤à³à²¨à²¿à²¸à²¿. password_ok=OK -password_cancel=ರದà³à²¦à³ ಮಾಡೠprinting_not_supported=ಎಚà³à²šà²°à²¿à²•à³†: ಈ ಜಾಲವೀಕà³à²·à²•à²¦à²²à³à²²à²¿ ಮà³à²¦à³à²°à²£à²•à³à²•à³† ಸಂಪೂರà³à²£ ಬೆಂಬಲವಿಲà³à²². printing_not_ready=ಎಚà³à²šà²°à²¿à²•à³†: PDF ಕಡತವೠಮà³à²¦à³à²°à²¿à²¸à²²à³ ಸಂಪೂರà³à²£à²µà²¾à²—ಿ ಲೋಡೠಆಗಿಲà³à²². diff --git a/vendor/pdfjs/web/locale/ko/viewer.properties b/vendor/pdfjs/web/locale/ko/viewer.properties index 3f1e9ba..ea3732b 100644 --- a/vendor/pdfjs/web/locale/ko/viewer.properties +++ b/vendor/pdfjs/web/locale/ko/viewer.properties @@ -18,12 +18,15 @@ previous_label=ì´ì „ next.title=ë‹¤ìŒ íŽ˜ì´ì§€ next_label=ë‹¤ìŒ -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=페ì´ì§€: -page_of=/{{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=페ì´ì§€ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=ì „ì²´ {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pagesCount}} 중 {{pageNumber}}) zoom_out.title=축소 zoom_out_label=축소 @@ -57,10 +60,10 @@ page_rotate_ccw.title=시계 반대방향으로 íšŒì „ page_rotate_ccw.label=시계 반대방향으로 íšŒì „ page_rotate_ccw_label=시계 반대방향으로 íšŒì „ -hand_tool_enable.title=ì† ë„구 켜기 -hand_tool_enable_label=ì† ë„구 켜기 -hand_tool_disable.title=ì† ë„구 ë„기 -hand_tool_disable_label=ì† ë„구 ë„기 +cursor_text_select_tool.title=í…스트 ì„ íƒ ë„구 활성화 +cursor_text_select_tool_label=í…스트 ì„ íƒ ë„구 +cursor_hand_tool.title=ì† ë„구 활성화 +cursor_hand_tool_label=ì† ë„구 # Document properties dialog box document_properties.title=문서 ì†ì„±â€¦ @@ -88,13 +91,20 @@ document_properties_version=PDF ë²„ì „: document_properties_page_count=ì´ íŽ˜ì´ì§€: document_properties_close=닫기 +print_progress_message=문서 ì¶œë ¥ 준비중… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=취소 + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=íƒìƒ‰ì°½ ì—´ê³ ë‹«ê¸° +toggle_sidebar_notification.title=íƒìƒ‰ì°½ ì—´ê³ ë‹«ê¸° (ë¬¸ì„œì— ì•„ì›ƒë¼ì¸ì´ë‚˜ 첨부파ì¼ì´ 들어있ìŒ) toggle_sidebar_label=íƒìƒ‰ì°½ ì—´ê³ ë‹«ê¸° -outline.title=문서 개요 보기 -outline_label=문서 개요 +document_outline.title=문서 아웃ë¼ì¸ 보기(ë”블 í´ë¦í•´ì„œ ëª¨ë“ í•ëª© ì—´ê³ ë‹«ê¸°) +document_outline_label=문서 아웃ë¼ì¸ attachments.title=ì²¨ë¶€íŒŒì¼ ë³´ê¸° attachments_label=ì²¨ë¶€íŒŒì¼ thumbs.title=미리보기 @@ -111,7 +121,8 @@ thumb_page_title={{page}}쪽 thumb_page_canvas={{page}}쪽 미리보기 # Find panel button title and messages -find_label=검색: +find_input.title=찾기 +find_input.placeholder=문서ì—ì„œ 찾기… find_previous.title=ì§€ì • 문ìžì—´ì— ì¼ì¹˜í•˜ëŠ” 1ê°œ ë¶€ë¶„ì„ ê²€ìƒ‰ find_previous_label=ì´ì „ find_next.title=ì§€ì • 문ìžì—´ì— ì¼ì¹˜í•˜ëŠ” ë‹¤ìŒ ë¶€ë¶„ì„ ê²€ìƒ‰ @@ -170,4 +181,4 @@ password_cancel=취소 printing_not_supported=ê²½ê³ : ì´ ë¸Œë¼ìš°ì €ëŠ” ì¸ì‡„를 ì™„ì „ížˆ 지ì›í•˜ì§€ 않습니다. printing_not_ready=ê²½ê³ : ì´ PDF를 ì¸ì‡„를 í• ìˆ˜ ìžˆì„ ì •ë„ë¡œ ì½ì–´ë“¤ì´ì§€ 못했습니다. web_fonts_disabled=웹 í°íŠ¸ê°€ êº¼ì ¸ìžˆìŒ: ë‚´ìž¥ëœ PDF ê¸€ê¼´ì„ ì“¸ 수 없습니다. -document_colors_disabled=PDF ë¬¸ì„œì˜ ìƒ‰ìƒì„ 쓰지 못하게 ë˜ì–´ 있ìŒ: \'웹 페ì´ì§€ ìžì²´ ìƒ‰ìƒ ì‚¬ìš© 허용\'ì´ ë¸Œë¼ìš°ì €ì—ì„œ êº¼ì ¸ 있습니다. +document_colors_not_allowed=PDF ë¬¸ì„œì˜ ìƒ‰ìƒì„ 쓰지 못하게 ë˜ì–´ 있ìŒ: '웹 페ì´ì§€ ìžì²´ ìƒ‰ìƒ ì‚¬ìš© 허용'ì´ ë¸Œë¼ìš°ì €ì—ì„œ êº¼ì ¸ 있습니다. diff --git a/vendor/pdfjs/web/locale/ku/viewer.properties b/vendor/pdfjs/web/locale/ku/viewer.properties index 8f40dba..c3462f6 100644 --- a/vendor/pdfjs/web/locale/ku/viewer.properties +++ b/vendor/pdfjs/web/locale/ku/viewer.properties @@ -18,12 +18,12 @@ previous_label=PaÅŸve next.title=Rûpela pêş next_label=Pêş -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Rûpel: -page_of=/ {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom_out.title=Dûr bike zoom_out_label=Dûr bike @@ -67,17 +67,18 @@ document_properties_title=Sernav: # LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" # will be replaced by the creation/modification date, and time, of the PDF file. +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Darikê kêlekê veke/bigire toggle_sidebar_label=Darikê kêlekê veke/bigire -outline.title=Åžemaya belgeyê nîşan bide -outline_label=Åžemaya belgeyê +document_outline_label=Åžemaya belgeyê thumbs.title=Wênekokan nîşan bide thumbs_label=Wênekok findbar.title=Di belgeyê de bibîne -findbar_label=Bibîne # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -88,7 +89,6 @@ thumb_page_title=Rûpel {{page}} thumb_page_canvas=Wênekoka rûpelê {{page}} # Find panel button title and messages -find_label=Bibîne: find_previous.title=Peyva berê bibîne find_previous_label=PaÅŸve find_next.title=Peyya pêş bibîne @@ -139,7 +139,6 @@ text_annotation_type.alt=[Nîşaneya {{type}}ê] password_label=Ji bo PDFê vekî şîfreyê binivîse. password_invalid=Şîfre çewt e. Tika ye dîsa biceribîne. password_ok=Temam -password_cancel=Betal printing_not_supported=HiÅŸyarî: Çapkirin ji hêla vê gerokê ve bi temamî nayê destekirin. printing_not_ready=HiÅŸyarî: PDF bi temamî nehat barkirin û ji bo çapê ne amade ye. diff --git a/vendor/pdfjs/web/locale/lg/viewer.properties b/vendor/pdfjs/web/locale/lg/viewer.properties index 3cac56e..5658d54 100644 --- a/vendor/pdfjs/web/locale/lg/viewer.properties +++ b/vendor/pdfjs/web/locale/lg/viewer.properties @@ -16,12 +16,13 @@ previous.title=Omuko Ogubadewo next.title=Omuko Oguddako -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Omuko: -page_of=ku {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=ku {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom_out.title=Zimbulukusa zoom_out_label=Zimbulukusa @@ -48,14 +49,15 @@ bookmark_label=Endabika Eriwo # LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" # will be replaced by the creation/modification date, and time, of the PDF file. +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) -outline.title=Laga Ensalo ze Kiwandiko -outline_label=Ensalo ze Ekiwandiko +document_outline_label=Ensalo ze Ekiwandiko thumbs.title=Laga Ekifanyi Mubufunze thumbs_label=Ekifanyi Mubufunze -findbar_label=Zuula # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -106,6 +108,5 @@ loading_error=Wabadewo ensobi mukutika PDF. # Some common types are e.g.: "Check", "Text", "Comment", "Note" text_annotation_type.alt=[{{type}} Enyonyola] password_ok=OK -password_cancel=Sazaamu printing_not_supported=Okulaabula: Okulumya empapula tekuwagirwa enonyeso enno. diff --git a/vendor/pdfjs/web/locale/lij/viewer.properties b/vendor/pdfjs/web/locale/lij/viewer.properties index 04445c0..06bdfd0 100644 --- a/vendor/pdfjs/web/locale/lij/viewer.properties +++ b/vendor/pdfjs/web/locale/lij/viewer.properties @@ -1,124 +1,180 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. -previous.title = Pagina precedente -previous_label = Precedente -next.title = Pagina dòppo -next_label = Pròscima -page_label = Pagina: -page_of = de {{pageCount}} -zoom_out.title = Diminoisci zoom -zoom_out_label = Diminoisci zoom -zoom_in.title = Aomenta zoom -zoom_in_label = Aomenta zoom -zoom.title = Zoom -print.title = Stanpa -print_label = Stanpa -open_file.title = Arvi file -open_file_label = Arvi -download.title = Descaregamento -download_label = Descaregamento -bookmark.title = Vixon corente (còpia ò arvi inte 'n neuvo barcon) -bookmark_label = Vixon corente -outline.title = Veddi strutua documento -outline_label = Strutua documento -thumbs.title = Mostra miniatue -thumbs_label = Miniatue -thumb_page_title = Pagina {{page}} -thumb_page_canvas = Miniatua da pagina {{page}} -error_more_info = Ciù informaçioin -error_less_info = Meno informaçioin -error_version_info = PDF.js v{{version}} (build: {{build}}) -error_close = Særa -missing_file_error = O file PDF o no gh'é. -toggle_sidebar.title = Ativa/dizativa bara de scianco -toggle_sidebar_label = Ativa/dizativa bara de scianco -error_message = Mesaggio: {{message}} -error_stack = Stack: {{stack}} -error_file = File: {{file}} -error_line = Linia: {{line}} -rendering_error = Gh'é stæto 'n'erô itno rendering da pagina. -page_scale_width = Larghessa pagina -page_scale_fit = Adatta a una pagina -page_scale_auto = Zoom aotomatico -page_scale_actual = Dimenscioin efetive -loading_error_indicator = Erô -loading_error = S'é verificou 'n'erô itno caregamento do PDF. -printing_not_supported = Atençion: a stanpa a no l'é conpletamente soportâ da sto navegatô. +# Main toolbar buttons (tooltips and alt text for images) +previous.title=Pagina primma +previous_label=Precedente +next.title=Pagina dòppo +next_label=Pròscima -# Context menu -page_rotate_cw.label=Gia in senso do releuio -page_rotate_ccw.label=Gia in senso do releuio a-a reversa +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Pagina +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=de {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} de {{pagesCount}}) +zoom_out.title=Diminoisci zoom +zoom_out_label=Diminoisci zoom +zoom_in.title=Aomenta zoom +zoom_in_label=Aomenta zoom +zoom.title=Zoom presentation_mode.title=Vanni into mòddo de prezentaçion presentation_mode_label=Mòddo de prezentaçion +open_file.title=Arvi file +open_file_label=Arvi +print.title=Stanpa +print_label=Stanpa +download.title=Descaregamento +download_label=Descaregamento +bookmark.title=Vixon corente (còpia ò arvi inte 'n neuvo barcon) +bookmark_label=Vixon corente + +# Secondary toolbar and context menu +tools.title=Strumenti +tools_label=Strumenti +first_page.title=Vanni a-a primma pagina +first_page.label=Vanni a-a primma pagina +first_page_label=Vanni a-a primma pagina +last_page.title=Vanni a l'urtima pagina +last_page.label=Vanni a l'urtima pagina +last_page_label=Vanni a l'urtima pagina +page_rotate_cw.title=Gia into verso oraio +page_rotate_cw.label=Gia in senso do releuio +page_rotate_cw_label=Gia into verso oraio +page_rotate_ccw.title=Gia into verso antioraio +page_rotate_ccw.label=Gia in senso do releuio a-a reversa +page_rotate_ccw_label=Gia into verso antioraio + -find_label = Treuva: -find_previous.title = Treuva a ripetiçion precedente do testo da çercâ -find_previous_label = Precedente -find_next.title = Treuva a ripetiçion dòppo do testo da çercâ -find_next_label = Segoente -find_highlight = Evidençia -find_match_case_label = Maioscole/minoscole -find_reached_bottom = Razonto l'iniçio da pagina, continoa da-a fin -find_reached_top = Razonto a fin da pagina, continoa da l'iniçio -find_not_found = Testo no trovou -findbar.title = Treuva into documento -findbar_label = Treuva -first_page.label = Vanni a-a primma pagina -last_page.label = Vanni a l'urtima pagina -invalid_file_error = O file PDF o l'é no valido ò aroinou. +# Document properties dialog box +document_properties.title=Propietæ do documento… +document_properties_label=Propietæ do documento… +document_properties_file_name=Nomme file: +document_properties_file_size=Dimenscion file: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} kB ({{size_b}} byte) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_kb}} MB ({{size_b}} byte) +document_properties_title=Titolo: +document_properties_author=Aoto: +document_properties_subject=Ogetto: +document_properties_keywords=Paròlle ciave: +document_properties_creation_date=Dæta creaçion: +document_properties_modification_date=Dæta cangiamento: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Aotô originale: +document_properties_producer=Produtô PDF: +document_properties_version=Verscion PDF: +document_properties_page_count=Contezzo pagine: +document_properties_close=Særa -web_fonts_disabled = I font do web en dizativæ: inposcibile adeuviâ i carateri do PDF. -printing_not_ready = Atençion: o PDF o no l'é ancon caregou conpletamente pe-a stanpa. +print_progress_message=Praparo o documento pe-a stanpa… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Anulla -document_colors_not_allowed = No l'é poscibile adeuviâ i pròpi coî pe-i documenti PDF: l'opçion do navegatô “Permetti a-e pagine de çerne i pròpi coî in cangio de quelli inpostæ†a l'é dizativâ. -text_annotation_type.alt = [Anotaçion: {{type}}] +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Ativa/dizativa bara de scianco +toggle_sidebar_notification.title=Cangia bara de löo (o documento o contegne di alegæ) +toggle_sidebar_label=Ativa/dizativa bara de scianco +document_outline.title=Fanni vedde o contorno do documento (scicca doggio pe espande/ridue tutti i elementi) +document_outline_label=Contorno do documento +attachments.title=Fanni vedde alegæ +attachments_label=Alegæ +thumbs.title=Mostra miniatue +thumbs_label=Miniatue +findbar.title=Treuva into documento +findbar_label=Treuva -first_page.title = Vanni a-a primma pagina -first_page_label = Vanni a-a primma pagina -last_page.title = Vanni a l'urtima pagina -last_page_label = Vanni a l'urtima pagina -page_rotate_ccw.title = Gia into verso antioraio -page_rotate_ccw_label = Gia into verso antioraio -page_rotate_cw.title = Gia into verso oraio -page_rotate_cw_label = Gia into verso oraio -tools.title = Strumenti -tools_label = Strumenti -password_label = Dimme a paròlla segreta pe arvî sto file PDF. -password_invalid = Paròlla segreta sbalia. Preuva torna. -password_ok = Va ben -password_cancel = Anulla +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Pagina {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Miniatua da pagina {{page}} -document_properties.title = Propietæ do documento… -document_properties_label = Propietæ do documento… -document_properties_file_name = Nomme file: -document_properties_file_size = Dimenscion file: -document_properties_kb = {{size_kb}} kB ({{size_b}} byte) -document_properties_mb = {{size_kb}} MB ({{size_b}} byte) -document_properties_title = Titolo: -document_properties_author = Aoto: -document_properties_subject = Ogetto: -document_properties_keywords = Paròlle ciave: -document_properties_creation_date = Dæta creaçion: -document_properties_modification_date = Dæta cangiamento: -document_properties_date_string = {{date}}, {{time}} -document_properties_creator = Aotô originale: -document_properties_producer = Produtô PDF: -document_properties_version = Verscion PDF: -document_properties_page_count = Contezzo pagine: -document_properties_close = Særa +# Find panel button title and messages +find_input.title=Treuva +find_input.placeholder=Treuva into documento… +find_previous.title=Treuva a ripetiçion precedente do testo da çercâ +find_previous_label=Precedente +find_next.title=Treuva a ripetiçion dòppo do testo da çercâ +find_next_label=Segoente +find_highlight=Evidençia +find_match_case_label=Maioscole/minoscole +find_reached_top=Razonto a fin da pagina, continoa da l'iniçio +find_reached_bottom=Razonto l'iniçio da pagina, continoa da-a fin +find_not_found=Testo no trovou -hand_tool_enable.title = Ativa strumento man -hand_tool_enable_label = Ativa strumento man -hand_tool_disable.title = Dizativa strumento man -hand_tool_disable_label = Dizativa strumento man -attachments.title = Fanni vedde alegæ -attachments_label = Alegæ -page_scale_percent = {{scale}}% -unexpected_response_error = Risposta inprevista do-u server +# Error panel labels +error_more_info=Ciù informaçioin +error_less_info=Meno informaçioin +error_close=Særa +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Mesaggio: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Stack: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=File: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Linia: {{line}} +rendering_error=Gh'é stæto 'n'erô itno rendering da pagina. +# Predefined zoom values +page_scale_width=Larghessa pagina +page_scale_fit=Adatta a una pagina +page_scale_auto=Zoom aotomatico +page_scale_actual=Dimenscioin efetive +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% +# Loading indicator messages +loading_error_indicator=Erô +loading_error=S'é verificou 'n'erô itno caregamento do PDF. +invalid_file_error=O file PDF o l'é no valido ò aroinou. +missing_file_error=O file PDF o no gh'é. +unexpected_response_error=Risposta inprevista do-u server +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[Anotaçion: {{type}}] +password_label=Dimme a paròlla segreta pe arvî sto file PDF. +password_invalid=Paròlla segreta sbalia. Preuva torna. +password_ok=Va ben +password_cancel=Anulla +printing_not_supported=Atençion: a stanpa a no l'é conpletamente soportâ da sto navegatô. +printing_not_ready=Atençion: o PDF o no l'é ancon caregou conpletamente pe-a stanpa. +web_fonts_disabled=I font do web en dizativæ: inposcibile adeuviâ i carateri do PDF. +document_colors_not_allowed=No l'é poscibile adeuviâ i pròpi coî pe-i documenti PDF: l'opçion do navegatô “Permetti a-e pagine de çerne i pròpi coî in cangio de quelli inpostæ†a l'é dizativâ. diff --git a/vendor/pdfjs/web/locale/lt/viewer.properties b/vendor/pdfjs/web/locale/lt/viewer.properties index e2f50b9..e2ad07b 100644 --- a/vendor/pdfjs/web/locale/lt/viewer.properties +++ b/vendor/pdfjs/web/locale/lt/viewer.properties @@ -18,12 +18,15 @@ previous_label=Ankstesnis next.title=Kitas puslapis next_label=Kitas -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Puslapis: -page_of=iÅ¡ {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Puslapis +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=iÅ¡ {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} iÅ¡ {{pagesCount}}) zoom_out.title=Sumažinti zoom_out_label=Sumažinti @@ -57,10 +60,10 @@ page_rotate_ccw.title=Pasukti prieÅ¡ laikrodžio rodyklÄ™ page_rotate_ccw.label=Pasukti prieÅ¡ laikrodžio rodyklÄ™ page_rotate_ccw_label=Pasukti prieÅ¡ laikrodžio rodyklÄ™ -hand_tool_enable.title=Ä®galinti vilkimo veiksenÄ… -hand_tool_enable_label=Ä®galinti vilkimo veiksenÄ… -hand_tool_disable.title=IÅ¡jungti vilkimo veiksenÄ… -hand_tool_disable_label=IÅ¡jungti vilkimo veiksenÄ… +cursor_text_select_tool.title=Ä®jungti teksto žymÄ—jimo įrankį +cursor_text_select_tool_label=Teksto žymÄ—jimo įrankis +cursor_hand_tool.title=Ä®jungti vilkimo įrankį +cursor_hand_tool_label=Vilkimo įrankis # Document properties dialog box document_properties.title=Dokumento savybÄ—s… @@ -88,19 +91,26 @@ document_properties_version=PDF versija: document_properties_page_count=Puslapių skaiÄius: document_properties_close=Užverti +print_progress_message=Dokumentas ruoÅ¡iamas spausdinimui… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Atsisakyti + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Rodyti / slÄ—pti Å¡oninį polangį +toggle_sidebar_notification.title=ParankinÄ— (dokumentas turi struktÅ«rÄ… / priedų) toggle_sidebar_label=Å oninis polangis -outline.title=Rodyti dokumento metmenis -outline_label=Dokumento metmenys +document_outline.title=Rodyti dokumento struktÅ«rÄ… (spustelÄ—kite dukart norÄ—dami iÅ¡plÄ—sti/suskleisti visus elementus) +document_outline_label=Dokumento struktÅ«ra attachments.title=Rodyti priedus attachments_label=Priedai thumbs.title=Rodyti puslapių miniatiÅ«ras thumbs_label=MiniatiÅ«ros findbar.title=IeÅ¡koti dokumente -findbar_label=IeÅ¡koti +findbar_label=Rasti # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -111,7 +121,8 @@ thumb_page_title={{page}} puslapis thumb_page_canvas={{page}} puslapio miniatiÅ«ra # Find panel button title and messages -find_label=IeÅ¡koti: +find_input.title=Rasti +find_input.placeholder=Rasti dokumente… find_previous.title=IeÅ¡koti ankstesnio frazÄ—s egzemplioriaus find_previous_label=Ankstesnis find_next.title=IeÅ¡koti tolesnio frazÄ—s egzemplioriaus @@ -139,7 +150,7 @@ error_stack=DÄ—klas: {{stack}} error_file=Failas: {{file}} # LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number error_line=EilutÄ—: {{line}} -rendering_error=Atvaizduojant puslapį, įvyko klaida. +rendering_error=Atvaizduojant puslapį įvyko klaida. # Predefined zoom values page_scale_width=Priderinti prie lapo ploÄio @@ -152,7 +163,7 @@ page_scale_percent={{scale}}% # Loading indicator messages loading_error_indicator=Klaida -loading_error=Ä®keliant PDF failÄ…, įvyko klaida. +loading_error=Ä®keliant PDF failÄ… įvyko klaida. invalid_file_error=Tai nÄ—ra PDF failas arba jis yra sugadintas. missing_file_error=PDF failas nerastas. unexpected_response_error=NetikÄ—tas serverio atsakas. @@ -169,5 +180,5 @@ password_cancel=Atsisakyti printing_not_supported=DÄ—mesio! Spausdinimas Å¡ioje narÅ¡yklÄ—je nÄ—ra pilnai realizuotas. printing_not_ready=DÄ—mesio! PDF failas dar nÄ—ra pilnai įkeltas spausdinimui. -web_fonts_disabled=Neįgalinti saityno Å¡riftai – Å¡iame PDF faile esanÄių Å¡riftų naudoti negalima. +web_fonts_disabled=Saityno Å¡riftai iÅ¡jungti – PDF faile esanÄių Å¡riftų naudoti negalima. document_colors_not_allowed=PDF dokumentams neleidžiama nurodyti savo spalvų, nes iÅ¡jungta narÅ¡yklÄ—s nuostata „Leisti tinklalapiams nurodyti spalvas“. diff --git a/vendor/pdfjs/web/locale/lv/viewer.properties b/vendor/pdfjs/web/locale/lv/viewer.properties index 58aa953..9d7ae41 100644 --- a/vendor/pdfjs/web/locale/lv/viewer.properties +++ b/vendor/pdfjs/web/locale/lv/viewer.properties @@ -18,12 +18,15 @@ previous_label=IepriekÅ¡Ä“jÄ next.title=NÄkamÄ lapa next_label=NÄkamÄ -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Lapa: -page_of=no {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Lapa +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=no {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} no {{pagesCount}}) zoom_out.title=AttÄlinÄt\u0020 zoom_out_label=AttÄlinÄt @@ -57,10 +60,6 @@ page_rotate_ccw.title=Pagriezt pret pulksteni page_rotate_ccw.label=Pagriezt pret pulksteni page_rotate_ccw_label=Pagriezt pret pulksteni -hand_tool_enable.title=AktivÄ“t rokas rÄ«ku -hand_tool_enable_label=AktivÄ“t rokas rÄ«ku -hand_tool_disable.title=DeaktivÄ“t rokas rÄ«ku -hand_tool_disable_label=DeaktivÄ“t rokas rÄ«ku # Document properties dialog box document_properties.title=Dokumenta iestatÄ«jumi… @@ -88,13 +87,20 @@ document_properties_version=PDF versija: document_properties_page_count=Lapu skaits: document_properties_close=AizvÄ“rt +print_progress_message=Gatavo dokumentu drukÄÅ¡anai... +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Atcelt + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=PÄrslÄ“gt sÄnu joslu +toggle_sidebar_notification.title=PÄrslÄ“gt sÄnu joslu (dokumenta saturu un pielikumus) toggle_sidebar_label=PÄrslÄ“gt sÄnu joslu -outline.title=ParÄdÄ«t dokumenta saturu -outline_label=Dokumenta saturs +document_outline.title=RÄdÄ«t dokumenta struktÅ«ru (veiciet dubultklikÅ¡Ä·i lai izvÄ“rstu/sakļautu visus vienumus) +document_outline_label=Dokumenta saturs attachments.title=RÄdÄ«t pielikumus attachments_label=Pielikumi thumbs.title=ParÄdÄ«t sÄ«ktÄ“lus @@ -111,7 +117,8 @@ thumb_page_title=Lapa {{page}} thumb_page_canvas=Lapas {{page}} sÄ«ktÄ“ls # Find panel button title and messages -find_label=MeklÄ“t: +find_input.title=MeklÄ“t +find_input.placeholder=MeklÄ“t dokumentÄ… find_previous.title=Atrast iepriekÅ¡Ä“jo find_previous_label=IepriekÅ¡Ä“jÄ find_next.title=Atrast nÄkamo diff --git a/vendor/pdfjs/web/locale/mai/viewer.properties b/vendor/pdfjs/web/locale/mai/viewer.properties index 4eb0b17..356223f 100644 --- a/vendor/pdfjs/web/locale/mai/viewer.properties +++ b/vendor/pdfjs/web/locale/mai/viewer.properties @@ -18,12 +18,12 @@ previous_label=पछिला next.title=अगिला पृषà¥à¤ next_label=आगाठ-# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=पृषà¥à¤ : -page_of={{pageCount}} क +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom_out.title=छोट करू zoom_out_label=छोट करू @@ -57,10 +57,6 @@ page_rotate_ccw.title=घड़ीक दिशा सठउनटा घà¥à¤® page_rotate_ccw.label=घड़ीक दिशा सठउनटा घà¥à¤®à¤¾à¤‰ page_rotate_ccw_label=घड़ीक दिशा सठउनटा घà¥à¤®à¤¾à¤‰ -hand_tool_enable.title=हाथ अओजार सकà¥à¤°à¤¿à¤¯ करू -hand_tool_enable_label=हाथ अओजार सकà¥à¤°à¤¿à¤¯ करू -hand_tool_disable.title=हाथ अओजार निषà¥à¤•à¥à¤°à¤¿à¤¯ कà¤à¤¨à¤¾à¤‡ -hand_tool_disable_label=हाथ अओजार निषà¥à¤•à¥à¤°à¤¿à¤¯ कà¤à¤¨à¤¾à¤‡ # Document properties dialog box document_properties.title=दसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤¼ विशेषता... @@ -88,19 +84,20 @@ document_properties_version=PDF संसà¥à¤•à¤°à¤£: document_properties_page_count=पृषà¥à¤ गिनती: document_properties_close=बनà¥à¤¨ करू +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=सà¥à¤²à¤¾à¤‡à¤¡à¤° टागल toggle_sidebar_label=सà¥à¤²à¤¾à¤‡à¤¡à¤° टागल -outline.title=दसà¥à¤¤à¤¾à¤µà¥‡à¤œ आउटलाइन देखाउ -outline_label=दसà¥à¤¤à¤¾à¤µà¥‡à¤œ खाका +document_outline_label=दसà¥à¤¤à¤¾à¤µà¥‡à¤œ खाका attachments.title=संलगà¥à¤¨à¤• देखाबू attachments_label=संलगà¥à¤¨à¤• thumbs.title=लघà¥-छवि देखाउ thumbs_label=लघॠछवि findbar.title=दसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤®à¥‡ ढूà¤à¤¢à¥‚ -findbar_label=ताकू # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -111,7 +108,6 @@ thumb_page_title=पृषà¥à¤ {{page}} thumb_page_canvas=पृषà¥à¤ {{page}} का लघà¥-चितà¥à¤° # Find panel button title and messages -find_label=ताकू: find_previous.title=खोजक पछिला उपसà¥à¤¥à¤¿à¤¤à¤¿ ताकू find_previous_label=पछिला find_next.title=खोजक अगिला उपसà¥à¤¥à¤¿à¤¤à¤¿ ताकू @@ -165,7 +161,6 @@ text_annotation_type.alt=[{{type}} Annotation] password_label=à¤à¤¹à¤¿ पीडीà¤à¤« फ़ाइल केठखोलबाक लेल कृपया कूटशबà¥à¤¦ à¤à¤°à¥‚. password_invalid=अवैध कूटशबà¥à¤¦, कृपया फिनॠकोशिश करू. password_ok=बेस -password_cancel=रदà¥à¤¦ करू\u0020 printing_not_supported=चेतावनी: ई बà¥à¤°à¤¾à¤‰à¤œà¤° पर छपाइ पूरà¥à¤£ तरह सठसमरà¥à¤¥à¤¿à¤¤ नहि अछि. printing_not_ready=चेतावनी: पीडीà¤à¤« छपाइक लेल पूरà¥à¤£ तरह सठलोड नहि अछि. diff --git a/vendor/pdfjs/web/locale/mk/viewer.properties b/vendor/pdfjs/web/locale/mk/viewer.properties index 18ded89..094ef76 100644 --- a/vendor/pdfjs/web/locale/mk/viewer.properties +++ b/vendor/pdfjs/web/locale/mk/viewer.properties @@ -1,6 +1,16 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Main toolbar buttons (tooltips and alt text for images) previous.title=Претходна Ñтраница @@ -8,39 +18,57 @@ previous_label=Претходна next.title=Следна Ñтраница next_label=Следна -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Страница: -page_of=од {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom_out.title=Ðамалување zoom_out_label=Ðамали zoom_in.title=Зголемување zoom_in_label=Зголеми zoom.title=Променување на големина +presentation_mode.title=Премини во презентациÑки режим +presentation_mode_label=ПрезентациÑки режим +open_file.title=Отворање датотека +open_file_label=Отвори print.title=Печатење print_label=Печати -open_file.title=Отварање датотека -open_file_label=Отвори download.title=Преземање download_label=Преземи bookmark.title=Овој преглед (копирај или отвори во нов прозорец) bookmark_label=Овој преглед +# Secondary toolbar and context menu +tools.title=Ðлатки +first_page.label=Оди до првата Ñтраница +last_page.label=Оди до поÑледната Ñтраница +page_rotate_cw.label=Ротирај по Ñтрелките на чаÑовникот +page_rotate_ccw.label=Ротирај Ñпротивно од Ñтрелките на чаÑовникот + + +# Document properties dialog box +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. + +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) -toggle_slider.title=Вклучување на лизгач -toggle_slider_label=Вклучи лизгач -outline.title=Прикажување на Ñодржина на документот -outline_label=Содржина на документот +toggle_sidebar.title=Вклучи Ñтранична лента +toggle_sidebar_label=Вклучи Ñтранична лента thumbs.title=Прикажување на икони thumbs_label=Икони - -# Document outline messages -no_outline=Ðема Ñодржина +findbar.title=Ðајди во документот +findbar_label=Ðајди # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -50,13 +78,24 @@ thumb_page_title=Страница {{page}} # number. thumb_page_canvas=Икона од Ñтраница {{page}} +# Find panel button title and messages +find_previous.title=Ðајди ја предходната појава на фразата +find_previous_label=Претходно +find_next.title=Ðајди ја Ñледната појава на фразата +find_next_label=Следно +find_highlight=Означи ÑÑ +find_match_case_label=Токму така +find_reached_top=Барањето Ñтигна до почетокот на документот и почнува од крајот +find_reached_bottom=Барањето Ñтигна до крајот на документот и почнува од почеток +find_not_found=Фразата не е пронајдена + # Error panel labels error_more_info=Повеќе информации error_less_info=Помалку информации error_close=Затвори -# LOCALIZATION NOTE (error_build): "{{build}}" will be replaced by the PDF.JS -# build ID. -error_build=PDF.JS Build: {{build}} +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (build: {{build}}) # LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an # english string describing the error. error_message=Порака: {{message}} @@ -74,53 +113,21 @@ page_scale_width=Ширина на Ñтраница page_scale_fit=Цела Ñтраница page_scale_auto=ÐвтоматÑка големина page_scale_actual=ВиÑтинÑка големина +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +# Loading indicator messages loading_error_indicator=Грешка loading_error=ÐаÑтана грешка при вчитувањето на PDF-от. +invalid_file_error=Ðевалидна или корумпирана PDF датотека. +missing_file_error=ÐедоÑтаÑува PDF документ. -# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip. -# "{{[type}}" will be replaced with an annotation type from a list defined in +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). # Some common types are e.g.: "Check", "Text", "Comment", "Note" -text_annotation_type=[{{type}} Забелешка] -request_password=PDF-от е заштитен Ñо лозинка: - printing_not_supported=Предупредување: Печатењето не е целоÑно поддржано во овој прелиÑтувач. - -find_highlight=Означи ÑÑ - -# Find panel button title and messages -find_label=Ðајди: -find_match_case_label=Токму така -find_next.title=Ðајди ја Ñледната појава на фразата -find_next_label=Следно -find_not_found=Фразата не е пронајдена -find_previous.title=Ðајди ја предходната појава на фразата -find_previous_label=Претходно -find_reached_bottom=Барањето Ñтигна до крајот на документот и почнува од почеток -find_reached_top=Барањето Ñтигна до почетокот на документот и почнува од крајот -findbar.title=Ðајди во документот -findbar_label=Ðајди - -# Context menu -first_page.label=Оди до првата Ñтраница -invalid_file_error=Ðевалидна или корумпирана PDF датотека. -last_page.label=Оди до поÑледната Ñтраница -page_rotate_ccw.label=Ротирај Ñпротивно од Ñтрелките на чаÑовникот -page_rotate_cw.label=Ротирај по Ñтрелките на чаÑовникот -presentation_mode.title=Премини во презентациÑки режим -presentation_mode_label=ПрезентациÑки режим - -# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be -# replaced by the PDF.JS version and build ID. -error_version_info=PDF.js v{{version}} (build: {{build}}) -missing_file_error=ÐедоÑтаÑува PDF документ. printing_not_ready=Предупредување: PDF документот не е целоÑно вчитан за печатење. - -# Tooltips and alt text for side panel toolbar buttons -# (the _label strings are alt text for the buttons, the .title strings are -# tooltips) -toggle_sidebar.title=Вклучи Ñтранична лента -toggle_sidebar_label=Вклучи Ñтранична лента web_fonts_disabled=Интернет фонтовите Ñе оневозможени: не може да Ñе кориÑтат вградените PDF фонтови. +document_colors_not_allowed=PDF-документите немаат дозвола да кориÑтат ÑопÑтвени бои: ПоÑтавката „Дозволи Ñтраниците Ñами да ги избираат Ñвоите бои“ е деактивирана од прелиÑтувачот. diff --git a/vendor/pdfjs/web/locale/ml/viewer.properties b/vendor/pdfjs/web/locale/ml/viewer.properties index 084d877..20c124d 100644 --- a/vendor/pdfjs/web/locale/ml/viewer.properties +++ b/vendor/pdfjs/web/locale/ml/viewer.properties @@ -18,12 +18,12 @@ previous_label=à´®àµà´®àµà´ªàµàµ next.title=à´…à´Ÿàµà´¤àµà´¤ താളàµâ€ next_label=à´…à´Ÿàµà´¤àµà´¤à´¤àµàµ -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=താളàµâ€: -page_of={{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom_out.title=ചെറàµà´¤à´¾à´•àµà´•àµà´• zoom_out_label=ചെറàµà´¤à´¾à´•àµà´•àµà´• @@ -57,10 +57,6 @@ page_rotate_ccw.title=ഘടികാര ദിശയàµà´•àµà´•àµàµ വിഠpage_rotate_ccw.label=ഘടികാര ദിശയàµà´•àµà´•àµàµ വിപരീതമായി കറകàµà´•àµà´• page_rotate_ccw_label=ഘടികാര ദിശയàµà´•àµà´•àµàµ വിപരീതമായി കറകàµà´•àµà´• -hand_tool_enable.title=ഹാനàµâ€à´¡àµ ടൂളàµâ€ à´ªàµà´°à´µà´°àµâ€à´¤àµà´¤à´¨ സജàµà´œà´®à´¾à´•àµà´•àµà´• -hand_tool_enable_label=ഹാനàµâ€à´¡àµ ടൂളàµâ€ à´ªàµà´°à´µà´°àµâ€à´¤àµà´¤à´¨ സജàµà´œà´®à´¾à´•àµà´•àµà´• -hand_tool_disable.title=ഹാനàµâ€à´¡àµ ടൂളàµâ€ à´ªàµà´°à´µà´°àµâ€à´¤àµà´¤à´¨ രഹിതമാകàµà´•àµà´• -hand_tool_disable_label=ഹാനàµâ€à´¡àµ ടൂളàµâ€ à´ªàµà´°à´µà´°àµâ€à´¤àµà´¤à´¨ രഹിതമാകàµà´•àµà´• # Document properties dialog box document_properties.title=രേഖയàµà´Ÿàµ† വിശേഷതകളàµâ€... @@ -88,19 +84,20 @@ document_properties_version=പിഡിഎഫൠപതിപàµà´ªàµ: document_properties_page_count=താളിനàµà´±àµ† à´Žà´£àµà´£à´‚: document_properties_close=à´…à´Ÿà´¯àµà´•àµà´•àµà´• +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=സൈഡൠബാറിലേകàµà´•àµàµ മാറàµà´±àµà´• toggle_sidebar_label=സൈഡൠബാറിലേകàµà´•àµàµ മാറàµà´±àµà´• -outline.title=രേഖയàµà´Ÿàµ† ഔടàµà´Ÿàµà´²àµˆà´¨àµâ€ കാണിയàµà´•àµà´•àµà´• -outline_label=രേഖയàµà´Ÿàµ† ഔടàµà´Ÿàµà´²àµˆà´¨àµâ€ +document_outline_label=രേഖയàµà´Ÿàµ† ഔടàµà´Ÿàµà´²àµˆà´¨àµâ€ attachments.title=à´…à´±àµà´±à´¾à´šàµà´®àµ†à´¨àµà´±àµà´•à´³àµâ€ കാണിയàµà´•àµà´•àµà´• attachments_label=à´…à´±àµà´±à´¾à´šàµà´®àµ†à´¨àµà´±àµà´•à´³àµâ€ thumbs.title=തംബàµà´¨àµ†à´¯à´¿à´²àµà´•à´³àµâ€ കാണിയàµà´•àµà´•àµà´• thumbs_label=തംബàµà´¨àµ†à´¯à´¿à´²àµà´•à´³àµâ€ findbar.title=രേഖയിലàµâ€ à´•à´£àµà´Ÿàµà´ªà´¿à´Ÿà´¿à´¯àµà´•àµà´•àµà´• -findbar_label=à´•à´£àµà´Ÿàµ†à´¤àµà´¤àµà´•\u0020 # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -111,7 +108,6 @@ thumb_page_title=താളàµâ€ {{page}} thumb_page_canvas={{page}} താളിനàµà´³àµà´³ തംബàµà´¨àµ†à´¯à´¿à´²àµâ€ # Find panel button title and messages -find_label=à´•à´£àµà´Ÿàµ†à´¤àµà´¤àµà´• find_previous.title=വാചകം ഇതിനൠമàµà´¨àµâ€à´ªàµâ€Œ ആവരàµâ€à´¤àµà´¤à´¿à´šàµà´šà´¤àµâ€Œ à´•à´£àµà´Ÿàµ†à´¤àµà´¤àµà´•\u0020 find_previous_label=à´®àµà´®àµà´ªàµàµ find_next.title=വാചകം വീണàµà´Ÿàµà´‚ ആവരàµâ€à´¤àµà´¤à´¿à´•àµà´•àµà´¨àµà´¨à´¤àµâ€Œ à´•à´£àµà´Ÿàµ†à´¤àµà´¤àµà´•\u0020 @@ -165,7 +161,6 @@ text_annotation_type.alt=[{{type}} Annotation] password_label=à´ˆ പിഡിഎഫൠഫയലàµâ€ à´¤àµà´±à´•àµà´•àµà´¨àµà´¨à´¤à´¿à´¨àµàµ രഹസàµà´¯à´µà´¾à´•àµà´•àµ നലàµâ€à´•àµà´•. password_invalid=തെറàµà´±à´¾à´¯ രഹസàµà´¯à´µà´¾à´•àµà´•àµ, ദയവായി വീണàµà´Ÿàµà´‚ à´¶àµà´°à´®à´¿à´¯àµà´•àµà´•àµà´•. password_ok=ശരി -password_cancel=റദàµà´¦à´¾à´•àµà´•àµà´• printing_not_supported=à´®àµà´¨àµà´¨à´±à´¿à´¯à´¿à´ªàµà´ªàµàµ: à´ˆ à´¬àµà´°àµŒà´¸à´°àµâ€ പൂരàµâ€à´£àµà´£à´®à´¾à´¯à´¿ à´ªàµà´°à´¿à´¨àµà´±à´¿à´™àµ പിനàµà´¤àµà´£à´¯àµà´•àµà´•àµà´¨àµà´¨à´¿à´²àµà´². printing_not_ready=à´®àµà´¨àµà´¨à´±à´¿à´¯à´¿à´ªàµà´ªàµàµ: à´ªàµà´°à´¿à´¨àµà´±àµ ചെയàµà´¯àµà´¨àµà´¨à´¤à´¿à´¨àµàµ പിഡിഎഫൠപൂരàµâ€à´£àµà´£à´®à´¾à´¯à´¿ à´²à´àµà´¯à´®à´²àµà´². diff --git a/vendor/pdfjs/web/locale/mn/viewer.properties b/vendor/pdfjs/web/locale/mn/viewer.properties index dfa1d6d..39edeb2 100644 --- a/vendor/pdfjs/web/locale/mn/viewer.properties +++ b/vendor/pdfjs/web/locale/mn/viewer.properties @@ -14,10 +14,12 @@ # Main toolbar buttons (tooltips and alt text for images) -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom.title=ТÑлÑлт open_file.title=Файл нÑÑ @@ -36,10 +38,12 @@ document_properties_title=Гарчиг: # LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" # will be replaced by the creation/modification date, and time, of the PDF file. +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) -findbar_label=Ол # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -75,5 +79,4 @@ loading_error_indicator=Ðлдаа # the PDF spec (32000-1:2008 Table 169 – Annotation types). # Some common types are e.g.: "Check", "Text", "Comment", "Note" password_ok=OK -password_cancel=Цуцал diff --git a/vendor/pdfjs/web/locale/mr/viewer.properties b/vendor/pdfjs/web/locale/mr/viewer.properties index b96782d..38d3565 100644 --- a/vendor/pdfjs/web/locale/mr/viewer.properties +++ b/vendor/pdfjs/web/locale/mr/viewer.properties @@ -18,12 +18,15 @@ previous_label=मागील next.title=पà¥à¤¢à¥€à¤² पृषà¥à¤ next_label=पà¥à¤¢à¥€à¤² -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=पृषà¥à¤ : -page_of=पैकी {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=पृषà¥à¤ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pageCount}}पैकी +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pagesCount}} पैकी {{pageNumber}}) zoom_out.title=छोटे करा zoom_out_label=छोटे करा @@ -38,18 +41,18 @@ print.title=छपाई करा print_label=छपाई करा download.title=डाउनलोड करा download_label=डाउनलोड करा -bookmark.title=सधà¥à¤¯à¤¾à¤šà¥‡ अवलोकन (नविन पटलात पà¥à¤°à¤¤ बनवा किंवा उघडा) +bookmark.title=सधà¥à¤¯à¤¾à¤šà¥‡ अवलोकन (नवीन पटलात पà¥à¤°à¤¤ बनवा किंवा उघडा) bookmark_label=सधà¥à¤¯à¤¾à¤šà¥‡ अवलोकन # Secondary toolbar and context menu tools.title=साधने tools_label=साधने -first_page.title=पहिलà¥à¤¯à¤¾ पानावर जा -first_page.label=पहिलà¥à¤¯à¤¾ पानावर जा -first_page_label=पहिलà¥à¤¯à¤¾ पानावर जा -last_page.title=शेवटचà¥à¤¯à¤¾ पानावर जा -last_page.label=शेवटचà¥à¤¯à¤¾ पानावर जा -last_page_label=शेवटचà¥à¤¯à¤¾ पानावर जा +first_page.title=पहिलà¥à¤¯à¤¾ पृषà¥à¤ ावर जा +first_page.label=पहिलà¥à¤¯à¤¾ पृषà¥à¤ ावर जा +first_page_label=पहिलà¥à¤¯à¤¾ पृषà¥à¤ ावर जा +last_page.title=शेवटचà¥à¤¯à¤¾ पृषà¥à¤ ावर जा +last_page.label=शेवटचà¥à¤¯à¤¾ पृषà¥à¤ ावर जा +last_page_label=शेवटचà¥à¤¯à¤¾ पृषà¥à¤ ावर जा page_rotate_cw.title=घडà¥à¤¯à¤¾à¤³à¤¾à¤šà¥à¤¯à¤¾ काटà¥à¤¯à¤¾à¤šà¥à¤¯à¤¾ दिशेने फिरवा page_rotate_cw.label=घडà¥à¤¯à¤¾à¤³à¤¾à¤šà¥à¤¯à¤¾ काटà¥à¤¯à¤¾à¤šà¥à¤¯à¤¾ दिशेने फिरवा page_rotate_cw_label=घडà¥à¤¯à¤¾à¤³à¤¾à¤šà¥à¤¯à¤¾ काटà¥à¤¯à¤¾à¤šà¥à¤¯à¤¾ दिशेने फिरवा @@ -57,10 +60,10 @@ page_rotate_ccw.title=घडà¥à¤¯à¤¾à¤³à¤¾à¤šà¥à¤¯à¤¾ काटà¥à¤¯à¤¾à¤šà¥ page_rotate_ccw.label=घडà¥à¤¯à¤¾à¤³à¤¾à¤šà¥à¤¯à¤¾ काटà¥à¤¯à¤¾à¤šà¥à¤¯à¤¾ उलट दिशेने फिरवा page_rotate_ccw_label=घडà¥à¤¯à¤¾à¤³à¤¾à¤šà¥à¤¯à¤¾ काटà¥à¤¯à¤¾à¤šà¥à¤¯à¤¾ उलट दिशेने फिरवा -hand_tool_enable.title=हात साधन सà¥à¤°à¥‚ करा -hand_tool_enable_label=हात साधन सà¥à¤°à¥‚ करा -hand_tool_disable.title=हात साधन बंद करा -hand_tool_disable_label=हात साधन बंद करा +cursor_text_select_tool.title=मजकूर निवड साधन कारà¥à¤¯à¤¾à¤¨à¥à¤µà¤¯à¥€à¤¤ करा +cursor_text_select_tool_label=मजकूर निवड साधन +cursor_hand_tool.title=हात साधन कारà¥à¤¯à¤¾à¤¨à¥à¤µà¤¿à¤¤ करा +cursor_hand_tool_label=हसà¥à¤¤ साधन # Document properties dialog box document_properties.title=दसà¥à¤¤à¤à¤µà¤œ गà¥à¤£à¤§à¤°à¥à¤®â€¦ @@ -88,13 +91,20 @@ document_properties_version=PDF आवृतà¥à¤¤à¥€: document_properties_page_count=पृषà¥à¤ संखà¥à¤¯à¤¾: document_properties_close=बंद करा +print_progress_message=छपाई करीता पृषà¥à¤ तयार करीत आहे… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=रदà¥à¤¦ करा + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=बाजूचीपटà¥à¤Ÿà¥€ टॉगल करा +toggle_sidebar_notification.title=बाजूची पटà¥à¤Ÿà¥€ टॉगल करा (दसà¥à¤¤à¤à¤µà¤œà¤¾à¤®à¤§à¥à¤¯à¥‡ रà¥à¤ªà¤°à¥‡à¤·à¤¾/जोडणà¥à¤¯à¤¾ आहेत) toggle_sidebar_label=बाजूचीपटà¥à¤Ÿà¥€ टॉगल करा -outline.title=दसà¥à¤¤à¤à¤µà¤œ रूपरेषा दाखवा -outline_label=दसà¥à¤¤à¤à¤µà¤œ रूपरेषा +document_outline.title=दसà¥à¤¤à¤à¤µà¤œ बाहà¥à¤¯à¤°à¥‡à¤–ा दरà¥à¤¶à¤µà¤¾ (विसà¥à¤¤à¥ƒà¤¤ करणà¥à¤¯à¤¾à¤¸à¤¾à¤ ी दोनवेळा कà¥à¤²à¤¿à¤• करा /सरà¥à¤µ घटक दाखवा) +document_outline_label=दसà¥à¤¤à¤à¤µà¤œ रूपरेषा attachments.title=जोडपतà¥à¤° दाखवा attachments_label=जोडपतà¥à¤° thumbs.title=थंबनेलà¥à¤¸à¥ दाखवा @@ -111,7 +121,8 @@ thumb_page_title=पृषà¥à¤ {{page}} thumb_page_canvas=पृषà¥à¤ ाचे थंबनेल {{page}} # Find panel button title and messages -find_label=शोधा: +find_input.title=शोधा +find_input.placeholder=दसà¥à¤¤à¤à¤µà¤œà¤¾à¤¤ शोधा… find_previous.title=वाकपà¥à¤°à¤¯à¥‹à¤—ची मागील घटना शोधा find_previous_label=मागील find_next.title=वाकपà¥à¤°à¤¯à¥‹à¤—ची पà¥à¤¢à¥€à¤² घटना शोधा @@ -167,7 +178,7 @@ password_invalid=अवैध पासवरà¥à¤¡. कृपया पà¥à¤¨à¥ password_ok=ठीक आहे password_cancel=रदà¥à¤¦ करा -printing_not_supported=सावधानता: या बà¥à¤°à¤¾à¤‰à¤œà¤°à¤¤à¤°à¥à¤«à¥‡ छपाइ पूरà¥à¤£à¤ªà¤£à¥‡ समरà¥à¤¥à¥€à¤¤ नाही. +printing_not_supported=सावधानता: या बà¥à¤°à¤¾à¤‰à¤à¤°à¤¤à¤°à¥à¤«à¥‡ छपाइ पूरà¥à¤£à¤ªà¤£à¥‡ समरà¥à¤¥à¥€à¤¤ नाही. printing_not_ready=सावधानता: छपाईकरिता PDF पूरà¥à¤£à¤¤à¤¯à¤¾ लोड à¤à¤¾à¤²à¥‡ नाही. -web_fonts_disabled=वेब फाà¤à¤Ÿà¥à¤¸ असमरà¥à¤¥à¥€à¤¤ आहेत: à¤à¤®à¥à¤¬à¥‡à¤¡à¥‡à¤¡ PDF फाà¤à¤Ÿà¥à¤¸à¥à¤šà¤¾ वापर अशकà¥à¤¯. -document_colors_not_allowed=PDF दसà¥à¤¤à¤¾à¤à¤µà¤œà¤¾à¤‚ना तà¥à¤¯à¤¾à¤‚चे रंग वापरणà¥à¤¯à¤¾à¤¸ अनà¥à¤®à¤¤à¥€ नाही: बà¥à¤°à¤¾à¤‰à¤œà¤°à¤®à¤§à¥à¤¯à¥‡ ' पानांना तà¥à¤¯à¤¾à¤‚चे रंग निवडणà¥à¤¯à¤¾à¤¸ अनà¥à¤®à¤¤à¥€ दà¥à¤¯à¤¾' बंद केले आहे. +web_fonts_disabled=वेब टंक असमरà¥à¤¥à¥€à¤¤ आहेत: à¤à¤®à¥à¤¬à¥‡à¤¡à¥‡à¤¡ PDF टंक वापर अशकà¥à¤¯. +document_colors_not_allowed=PDF दसà¥à¤¤à¤à¤µà¤œà¤¾à¤‚ना तà¥à¤¯à¤¾à¤‚चे रंग वापरणà¥à¤¯à¤¾à¤¸ अनà¥à¤®à¤¤à¥€ नाही: बà¥à¤°à¤¾à¤‰à¤à¤°à¤®à¤§à¥à¤¯à¥‡ ' पृषà¥à¤ ांना तà¥à¤¯à¤¾à¤‚चे रंग निवडणà¥à¤¯à¤¾à¤¸ अनà¥à¤®à¤¤à¥€ दà¥à¤¯à¤¾' बंद केले आहे. diff --git a/vendor/pdfjs/web/locale/ms/viewer.properties b/vendor/pdfjs/web/locale/ms/viewer.properties index cc6b70b..62f1d3e 100644 --- a/vendor/pdfjs/web/locale/ms/viewer.properties +++ b/vendor/pdfjs/web/locale/ms/viewer.properties @@ -13,24 +13,27 @@ # limitations under the License. # Main toolbar buttons (tooltips and alt text for images) -previous.title=Laman Sebelumnya +previous.title=Halaman Sebelum previous_label=Terdahulu -next.title=Laman seterusnya +next.title=Halaman Seterusnya next_label=Berikut -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Laman: -page_of=daripada {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Halaman +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=daripada {{pageCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} daripada {{pagesCount}}) zoom_out.title=Zum Keluar zoom_out_label=Zum Keluar zoom_in.title=Zum Masuk zoom_in_label=Zum Masuk zoom.title=Zum -presentation_mode.title=Bertukar ke Mod Persembahan +presentation_mode.title=Tukar ke Mod Persembahan presentation_mode_label=Mod Persembahan open_file.title=Buka Fail open_file_label=Buka @@ -38,8 +41,8 @@ print.title=Cetak print_label=Cetak download.title=Muat turun download_label=Muat turun -bookmark.title=Pandangan semasa (salinan atau dibuka dalam tetingkap baru) -bookmark_label=Lihat semasa +bookmark.title=Paparan semasa (salin atau buka dalam tetingkap baru) +bookmark_label=Paparan Semasa # Secondary toolbar and context menu tools.title=Alatan @@ -57,14 +60,14 @@ page_rotate_ccw.title=Pusing berlawan arah jam page_rotate_ccw.label=Pusing berlawan arah jam page_rotate_ccw_label=Pusing berlawan arah jam -hand_tool_enable.title=Bolehkan alatan tangan -hand_tool_enable_label=Bolehkan alatan tangan -hand_tool_disable.title=Lumpuhkan alatan tangan -hand_tool_disable_label=Lumpuhkan alatan tangan +cursor_text_select_tool.title=Dayakan Alatan Pilihan Teks +cursor_text_select_tool_label=Alatan Pilihan Teks +cursor_hand_tool.title=Dayakan Alatan Tangan +cursor_hand_tool_label=Alatan Tangan # Document properties dialog box -document_properties.title=Ciri Dokumen… -document_properties_label=Ciri Dokumen… +document_properties.title=Sifat Dokumen… +document_properties_label=Sifat Dokumen… document_properties_file_name=Nama fail: document_properties_file_size=Saiz fail: # LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" @@ -88,16 +91,23 @@ document_properties_version=Versi PDF: document_properties_page_count=Kiraan Laman: document_properties_close=Tutup +print_progress_message=Menyediakan dokumen untuk dicetak… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Batal + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Togol Bar Sisi +toggle_sidebar_notification.title=Togol Sidebar (dokumen mengandungi rangka/attachments) toggle_sidebar_label=Togol Bar Sisi -outline.title=Tunjuk Rangka Dokumen -outline_label=Rangka Dokument -attachments.title=Tunjuk Lampiran +document_outline.title=Papar Rangka Dokumen (klik-dua-kali untuk kembangkan/kolaps semua item) +document_outline_label=Rangka Dokumen +attachments.title=Papar Lampiran attachments_label=Lampiran -thumbs.title=Tunjuk Imej kecil +thumbs.title=Papar Thumbnails thumbs_label=Imej kecil findbar.title=Cari didalam Dokumen findbar_label=Cari @@ -111,7 +121,8 @@ thumb_page_title=Halaman {{page}} thumb_page_canvas=Halaman Imej kecil {{page}} # Find panel button title and messages -find_label=Cari: +find_input.title=Cari +find_input.placeholder=Cari dalam dokumen… find_previous.title=Cari teks frasa berkenaan yang terdahulu find_previous_label=Sebelumnya find_next.title=Cari teks frasa berkenaan yang berikut @@ -148,12 +159,14 @@ page_scale_auto=Zoom Automatik page_scale_actual=Saiz Sebenar # LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a # numerical scale value. +page_scale_percent={{scale}}% # Loading indicator messages loading_error_indicator=Ralat loading_error=Masalah berlaku semasa menuatkan sebuah PDF. invalid_file_error=Tidak sah atau fail PDF rosak. missing_file_error=Fail PDF Hilang. +unexpected_response_error=Respon pelayan yang tidak dijangka. # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in @@ -167,5 +180,5 @@ password_cancel=Batal printing_not_supported=Amaran: Cetakan ini tidak sepenuhnya disokong oleh pelayar ini. printing_not_ready=Amaran: PDF tidak sepenuhnya dimuatkan untuk dicetak. -web_fonts_disabled=Fon web dilumpuhkan: tidak dapat fon PDF terbenam. -document_colors_not_allowed=Dokumen PDF tidak dibenarkan untuk menggunakan warna sendiri: 'Benarkan muka surat untuk memilih warna sendiri' telah dinyahaktif dalam pelayar. +web_fonts_disabled=Fon web dinyahdayakan: tidak dapat menggunakan fon terbenam PDF. +document_colors_not_allowed=Dokumen PDF tidak dibenarkan untuk menggunakan warna sendiri: “Izinkan halaman untuk memilih warna sendiri†telah dinyahaktifkan dalam pelayar. diff --git a/vendor/pdfjs/web/locale/my/viewer.properties b/vendor/pdfjs/web/locale/my/viewer.properties index 303a9db..ff9f5e2 100644 --- a/vendor/pdfjs/web/locale/my/viewer.properties +++ b/vendor/pdfjs/web/locale/my/viewer.properties @@ -18,20 +18,23 @@ previous_label=အရင်နေရာ next.title=ရှေ့ စာမျက်နှာ next_label=နောက်á€á€á€¯ -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=စာမျက်နှာ - -page_of=á {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=စာမျက်နှာ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}} á +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pagesCount}} á {{pageNumber}}) zoom_out.title=á€á€»á€¯á€¶á€·á€•á€« zoom_out_label=á€á€»á€¯á€¶á€·á€•á€« zoom_in.title=á€á€»á€²á€·á€•á€« zoom_in_label=á€á€»á€²á€·á€•á€« zoom.title=á€á€»á€¯á€¶á€·/á€á€»á€²á€·á€•á€« -presentation_mode.title=Switch to Presentation Mode -presentation_mode_label=Presentation Mode +presentation_mode.title=ဆွေးနွေးá€á€„်ပြစနစ်သá€á€¯á€· ကူးပြောင်းပါ +presentation_mode_label=ဆွေးနွေးá€á€„်ပြစနစ် open_file.title=ဖá€á€¯á€„်အားဖွင့်ပါዠopen_file_label=ဖွင့်ပါ print.title=ပုံနှá€á€¯á€•á€ºá€•á€« @@ -57,10 +60,6 @@ page_rotate_ccw.title=နာရီလက်á€á€¶ ပြောင်းပြန page_rotate_ccw.label=နာရီလက်á€á€¶ ပြောင်းပြန် page_rotate_ccw_label=နာရီလက်á€á€¶ ပြောင်းပြန် -hand_tool_enable.title=လက်ကá€á€¯á€„် ကá€á€›á€á€šá€¬á€¡á€¬á€¸á€žá€¯á€¶á€¸ -hand_tool_enable_label=လက်ကá€á€¯á€„် ကá€á€›á€á€šá€¬á€–ွင့် -hand_tool_disable.title=လက်ကá€á€¯á€„် ကá€á€›á€á€šá€¬á€¡á€¬á€¸á€•á€á€á€º -hand_tool_disable_label=လက်ကá€á€¯á€„်ကá€á€›á€á€šá€¬ အားပá€á€á€º # Document properties dialog box document_properties.title=မှá€á€ºá€á€™á€ºá€¸á€™á€¾á€á€ºá€›á€¬ ဂုá€á€ºá€žá€á€¹á€á€á€™á€»á€¬á€¸ @@ -88,13 +87,20 @@ document_properties_version=PDF ဗားရှင်း: document_properties_page_count=စာမျက်နှာအရေအá€á€½á€€á€º: document_properties_close=ပá€á€á€º +print_progress_message=Preparing document for printing… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=ပယ်​ဖျက်ပါ + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=ဘေးá€á€”်းဖွင့်ပá€á€á€º +toggle_sidebar_notification.title=ဘေးဘားá€á€”်းကá€á€¯ အဖွင့်/အပá€á€á€º လုပ်ရန် (စာá€á€™á€ºá€¸á€á€½á€„် outline/attachments ပါá€á€„်နá€á€¯á€„်သည်) toggle_sidebar_label=ဖွင့်ပá€á€á€º ဆလá€á€¯á€€á€ºá€’ါ -outline.title=စာá€á€™á€ºá€¸ မူကြမ်း ကá€á€¯á€•á€¼á€•á€« -outline_label=စာá€á€™á€ºá€¸ မူကြမ်း +document_outline.title=စာá€á€™á€ºá€¸á€¡á€€á€»á€‰á€ºá€¸á€á€»á€¯á€•á€ºá€€á€á€¯ ပြပါ (စာရင်းအားလုံးကá€á€¯ á€á€»á€¯á€¶á€·/á€á€»á€²á€·á€›á€”် ကလစ်နှစ်á€á€»á€€á€ºá€”ှá€á€•á€ºá€•á€«) +document_outline_label=စာá€á€™á€ºá€¸á€¡á€€á€»á€‰á€ºá€¸á€á€»á€¯á€•á€º attachments.title=á€á€½á€²á€á€»á€€á€ºá€™á€»á€¬á€¸ ပြပါ attachments_label=á€á€½á€²á€‘ားá€á€»á€€á€ºá€™á€»á€¬á€¸ thumbs.title=ပုံရá€á€•á€ºá€„ယ်များကá€á€¯ ပြပါ @@ -111,7 +117,8 @@ thumb_page_title=စာမျက်နှာ {{page}} thumb_page_canvas=စာမျက်နှာရဲ့ ပုံရá€á€•á€ºá€„ယ် {{page}} # Find panel button title and messages -find_label=ရှာဖွေပါ - +find_input.title=ရှာဖွေပါ +find_input.placeholder=စာá€á€™á€ºá€¸á€‘ဲá€á€½á€„် ရှာဖွေရန်… find_previous.title=စကားစုရဲ့ အရင် ​ဖြစ်ပွားမှုကá€á€¯ ရှာဖွေပါ find_previous_label=နောက်သá€á€¯á€· find_next.title=စကားစုရဲ့ နောက်ထပ် ​ဖြစ်ပွားမှုကá€á€¯ ရှာဖွေပါ diff --git a/vendor/pdfjs/web/locale/nb-NO/viewer.properties b/vendor/pdfjs/web/locale/nb-NO/viewer.properties index 9b3839f..a04a57a 100644 --- a/vendor/pdfjs/web/locale/nb-NO/viewer.properties +++ b/vendor/pdfjs/web/locale/nb-NO/viewer.properties @@ -18,12 +18,15 @@ previous_label=Forrige next.title=Neste side next_label=Neste -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Side: -page_of=av {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Side +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=av {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} av {{pagesCount}}) zoom_out.title=Zoom ut zoom_out_label=Zoom ut @@ -57,24 +60,30 @@ page_rotate_ccw.title=Roter mot klokken page_rotate_ccw.label=Roter mot klokken page_rotate_ccw_label=Roter mot klokken -hand_tool_enable.title=SlÃ¥ pÃ¥ hÃ¥nd-verktøy -hand_tool_enable_label=SlÃ¥ pÃ¥ hÃ¥nd-verktøy -hand_tool_disable.title=SlÃ¥ av hÃ¥nd-verktøy -hand_tool_disable_label=SlÃ¥ av hÃ¥nd-verktøy +cursor_text_select_tool.title=Aktiver tekstmarkeringsverktøy +cursor_text_select_tool_label=Tekstmarkeringsverktøy +cursor_hand_tool.title=Aktiver handverktøy +cursor_hand_tool_label=Handverktøy # Document properties dialog box document_properties.title=Dokumentegenskaper … document_properties_label=Dokumentegenskaper … document_properties_file_name=Filnavn: document_properties_file_size=Filstørrelse: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. document_properties_mb={{size_mb}} MB ({{size_b}} bytes) -document_properties_title=Tittel: +document_properties_title=Dokumentegenskaper … document_properties_author=Forfatter: document_properties_subject=Emne: document_properties_keywords=Nøkkelord: document_properties_creation_date=Opprettet dato: document_properties_modification_date=Endret dato: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. document_properties_date_string={{date}}, {{time}} document_properties_creator=Opprettet av: document_properties_producer=PDF-verktøy: @@ -82,13 +91,20 @@ document_properties_version=PDF-versjon: document_properties_page_count=Sideantall: document_properties_close=Lukk +print_progress_message=Forbereder dokument for utskrift … +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Avbryt + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=SlÃ¥ av/pÃ¥ sidestolpe +toggle_sidebar_notification.title=Vis/gjem sidestolpe (dokumentet inneholder oversikt/vedlegg) toggle_sidebar_label=SlÃ¥ av/pÃ¥ sidestolpe -outline.title=Vis dokumentdisposisjon -outline_label=Dokumentdisposisjon +document_outline.title=Vis dokumentdisposisjonen (dobbeltklikk for Ã¥ utvide/skjule alle elementer) +document_outline_label=Dokumentdisposisjon attachments.title=Vis vedlegg attachments_label=Vedlegg thumbs.title=Vis miniatyrbilde @@ -105,7 +121,8 @@ thumb_page_title=Side {{page}} thumb_page_canvas=Miniatyrbilde av side {{page}} # Find panel button title and messages -find_label=Finn: +find_input.title=Søk +find_input.placeholder=Søk i dokument… find_previous.title=Finn forrige forekomst av frasen find_previous_label=Forrige find_next.title=Finn neste forekomst av frasen @@ -164,4 +181,4 @@ password_cancel=Avbryt printing_not_supported=Advarsel: Utskrift er ikke fullstendig støttet av denne nettleseren. printing_not_ready=Advarsel: PDF er ikke fullstendig innlastet for utskrift. web_fonts_disabled=Web-fonter er avslÃ¥tt: Kan ikke bruke innbundne PDF-fonter. -document_colors_disabled=PDF-dokumenter tillates ikke Ã¥ bruke deres egne farger: 'Tillat sider Ã¥ velge egne farger' er deaktivert i nettleseren. +document_colors_not_allowed=PDF-dokumenter tillates ikke Ã¥ bruke deres egne farger: "Tillat sider Ã¥ velge egne farger" er deaktivert i nettleseren. diff --git a/vendor/pdfjs/web/locale/nl/viewer.properties b/vendor/pdfjs/web/locale/nl/viewer.properties index 79895d2..c66d035 100644 --- a/vendor/pdfjs/web/locale/nl/viewer.properties +++ b/vendor/pdfjs/web/locale/nl/viewer.properties @@ -18,12 +18,15 @@ previous_label=Vorige next.title=Volgende pagina next_label=Volgende -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Pagina: -page_of=van {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Pagina +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=van {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} van {{pagesCount}}) zoom_out.title=Uitzoomen zoom_out_label=Uitzoomen @@ -57,10 +60,10 @@ page_rotate_ccw.title=Linksom draaien page_rotate_ccw.label=Linksom draaien page_rotate_ccw_label=Linksom draaien -hand_tool_enable.title=Handhulpmiddel inschakelen -hand_tool_enable_label=Handhulpmiddel inschakelen -hand_tool_disable.title=Handhulpmiddel uitschakelen -hand_tool_disable_label=Handhulpmiddel uitschakelen +cursor_text_select_tool.title=Tekstselectiehulpmiddel inschakelen +cursor_text_select_tool_label=Tekstselectiehulpmiddel +cursor_hand_tool.title=Handhulpmiddel inschakelen +cursor_hand_tool_label=Handhulpmiddel # Document properties dialog box document_properties.title=Documenteigenschappen… @@ -88,13 +91,20 @@ document_properties_version=PDF-versie: document_properties_page_count=Aantal pagina’s: document_properties_close=Sluiten +print_progress_message=Document voorbereiden voor afdrukken… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Annuleren + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Zijbalk in-/uitschakelen +toggle_sidebar_notification.title=Zijbalk in-/uitschakelen (document bevat overzicht/bijlagen) toggle_sidebar_label=Zijbalk in-/uitschakelen -outline.title=Documentoverzicht tonen -outline_label=Documentoverzicht +document_outline.title=Documentoverzicht tonen (dubbelklik om alle items uit/samen te vouwen) +document_outline_label=Documentoverzicht attachments.title=Bijlagen tonen attachments_label=Bijlagen thumbs.title=Miniaturen tonen @@ -111,15 +121,16 @@ thumb_page_title=Pagina {{page}} thumb_page_canvas=Miniatuur van pagina {{page}} # Find panel button title and messages -find_label=Zoeken: -find_previous.title=Het vorige voorkomen van de tekst zoeken +find_input.title=Zoeken +find_input.placeholder=Zoeken in document… +find_previous.title=De vorige overeenkomst van de tekst zoeken find_previous_label=Vorige -find_next.title=Het volgende voorkomen van de tekst zoeken +find_next.title=De volgende overeenkomst van de tekst zoeken find_next_label=Volgende find_highlight=Alles markeren find_match_case_label=Hoofdlettergevoelig -find_reached_top=Bovenkant van het document bereikt, doorgegaan vanaf de onderkant -find_reached_bottom=Onderkant van het document bereikt, doorgegaan vanaf de bovenkant +find_reached_top=Bovenkant van document bereikt, doorgegaan vanaf onderkant +find_reached_bottom=Onderkant van document bereikt, doorgegaan vanaf bovenkant find_not_found=Tekst niet gevonden # Error panel labels @@ -170,4 +181,4 @@ password_cancel=Annuleren printing_not_supported=Waarschuwing: afdrukken wordt niet volledig ondersteund door deze browser. printing_not_ready=Waarschuwing: de PDF is niet volledig geladen voor afdrukken. web_fonts_disabled=Weblettertypen zijn uitgeschakeld: gebruik van ingebedde PDF-lettertypen is niet mogelijk. -document_colors_disabled=PDF-documenten mogen hun eigen kleuren niet gebruiken: ‘Pagina’s toestaan om hun eigen kleuren te kiezen’ is uitgeschakeld in de browser. +document_colors_not_allowed=PDF-documenten mogen hun eigen kleuren niet gebruiken: ‘Pagina’s toestaan om hun eigen kleuren te kiezen’ is uitgeschakeld in de browser. diff --git a/vendor/pdfjs/web/locale/nn-NO/viewer.properties b/vendor/pdfjs/web/locale/nn-NO/viewer.properties index b3c8089..82473da 100644 --- a/vendor/pdfjs/web/locale/nn-NO/viewer.properties +++ b/vendor/pdfjs/web/locale/nn-NO/viewer.properties @@ -13,40 +13,43 @@ # limitations under the License. # Main toolbar buttons (tooltips and alt text for images) -previous.title=Førre side -previous_label=Førre +previous.title=FøregÃ¥ande side +previous_label=FøregÃ¥ande next.title=Neste side next_label=Neste -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Side: -page_of=av {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Side +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=av {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} av {{pagesCount}}) -zoom_out.title=Mindre -zoom_out_label=Mindre -zoom_in.title=Større -zoom_in_label=Større -zoom.title=Skalering +zoom_out.title=Zoom ut +zoom_out_label=Zoom ut +zoom_in.title=Zoom inn +zoom_in_label=Zoom inn +zoom.title=Zoom presentation_mode.title=Byt til presentasjonsmodus presentation_mode_label=Presentasjonsmodus -open_file.title=Opna fil -open_file_label=Opna +open_file.title=Opne fil +open_file_label=Opne print.title=Skriv ut print_label=Skriv ut download.title=Last ned download_label=Last ned -bookmark.title=Gjeldande vising (kopier eller opna i nytt vindauge) +bookmark.title=Gjeldande vising (kopier eller opne i nytt vindauge) bookmark_label=Gjeldande vising # Secondary toolbar and context menu tools.title=Verktøy tools_label=Verktøy -first_page.title=GÃ¥ til fyrstesida -first_page.label=GÃ¥ til fyrstesida -first_page_label=GÃ¥ til fyrstesida +first_page.title=GÃ¥ til første side +first_page.label=GÃ¥ til første side +first_page_label=GÃ¥ til første side last_page.title=GÃ¥ til siste side last_page.label=GÃ¥ til siste side last_page_label=GÃ¥ til siste side @@ -57,24 +60,30 @@ page_rotate_ccw.title=Roter mot klokka page_rotate_ccw.label=Roter mot klokka page_rotate_ccw_label=Roter mot klokka -hand_tool_enable.title=SlÃ¥ pÃ¥ handverktøy -hand_tool_enable_label=SlÃ¥ pÃ¥ handverktøy -hand_tool_disable.title=SÃ¥ av handverktøy -hand_tool_disable_label=SlÃ¥ av handverktøy +cursor_text_select_tool.title=Aktiver tekstmarkeringsverktøy +cursor_text_select_tool_label=Tekstmarkeringsverktøy +cursor_hand_tool.title=Aktiver handverktøy +cursor_hand_tool_label=Handverktøy # Document properties dialog box -document_properties.title=Dokumenteigenskapar … -document_properties_label=Dokumenteigenskapar … +document_properties.title=Dokumenteigenskapar… +document_properties_label=Dokumenteigenskapar… document_properties_file_name=Filnamn: document_properties_file_size=Filstorleik: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. document_properties_mb={{size_mb}} MB ({{size_b}} bytes) -document_properties_title=Dokumenteigenskapar … +document_properties_title=Tittel: document_properties_author=Forfattar: document_properties_subject=Emne: document_properties_keywords=Stikkord: document_properties_creation_date=Dato oppretta: document_properties_modification_date=Dato endra: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. document_properties_date_string={{date}}, {{time}} document_properties_creator=Oppretta av: document_properties_producer=PDF-verktøy: @@ -82,13 +91,20 @@ document_properties_version=PDF-versjon: document_properties_page_count=Sidetal: document_properties_close=Lukk +print_progress_message=Førebur dokumentet for utskrift… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Avbryt + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=SlÃ¥ av/pÃ¥ sidestolpe +toggle_sidebar_notification.title=Vis/gøym sidestolpen (dokumentet inneheld oversikt/vedlegg) toggle_sidebar_label=SlÃ¥ av/pÃ¥ sidestolpe -outline.title=Vis dokumentdisposisjon -outline_label=Dokumentdisposisjon +document_outline.title=Vis dokumentdisposisjonen (dobbelklikk for Ã¥ utvide/gøyme alle elementa) +document_outline_label=Dokumentdisposisjon attachments.title=Vis vedlegg attachments_label=Vedlegg thumbs.title=Vis miniatyrbilde @@ -105,15 +121,16 @@ thumb_page_title=Side {{page}} thumb_page_canvas=Miniatyrbilde av side {{page}} # Find panel button title and messages -find_label=Finn: -find_previous.title=Finn tidlegare førekomst av frasen +find_input.title=Søk +find_input.placeholder=Søk i dokument… +find_previous.title=Finn førre førekomst av frasen find_previous_label=Førre find_next.title=Finn neste førekomst av frasen find_next_label=Neste find_highlight=Uthev alle find_match_case_label=Skil store/smÃ¥ bokstavar -find_reached_top=NÃ¥dde toppen av dokumentet, held fram frÃ¥ botnen -find_reached_bottom=NÃ¥dde botnen av dokumentet, held fram frÃ¥ toppen +find_reached_top=NÃ¥dde toppen av dokumentet, fortset frÃ¥ botnen +find_reached_bottom=NÃ¥dde botnen av dokumentet, fortset frÃ¥ toppen find_not_found=Fann ikkje teksten # Error panel labels @@ -133,7 +150,7 @@ error_stack=Stakk: {{stack}} error_file=Fil: {{file}} # LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number error_line=Linje: {{line}} -rendering_error=Ein feil oppstod ved oppteikning av sida. +rendering_error=Ein feil oppstod under vising av sida. # Predefined zoom values page_scale_width=Sidebreidde @@ -156,12 +173,12 @@ unexpected_response_error=Uventa tenarrespons. # the PDF spec (32000-1:2008 Table 169 – Annotation types). # Some common types are e.g.: "Check", "Text", "Comment", "Note" text_annotation_type.alt=[{{type}} annotasjon] -password_label=Skriv inn passordet for Ã¥ opna denne PDF-fila. +password_label=Skriv inn passordet for Ã¥ opne denne PDF-fila. password_invalid=Ugyldig passord. Prøv igjen. password_ok=OK password_cancel=Avbryt printing_not_supported=Ã…tvaring: Utskrift er ikkje fullstendig støtta av denne nettlesaren. printing_not_ready=Ã…tvaring: PDF ikkje fullstendig innlasta for utskrift. -web_fonts_disabled=Vev-skrifter er slÃ¥tt av: Kan ikkje bruka innbundne PDF-skrifter. -document_colors_disabled=PDF-dokument har ikkje løyve til Ã¥ bruka eigne fargar: 'Tillat sider Ã¥ velja eigne fargar' er slÃ¥tt av i nettlesaren. +web_fonts_disabled=Web-skrifter er slÃ¥tt av: Kan ikkje bruke innbundne PDF-skrifter. +document_colors_not_allowed=PDF-dokument kan ikkje bruke eigne fargar: «Tillat sider Ã¥ velje eigne fargar» er deaktivert i nettlesaren. diff --git a/vendor/pdfjs/web/locale/nso/viewer.properties b/vendor/pdfjs/web/locale/nso/viewer.properties index 02cc7d8..d95406c 100644 --- a/vendor/pdfjs/web/locale/nso/viewer.properties +++ b/vendor/pdfjs/web/locale/nso/viewer.properties @@ -18,12 +18,12 @@ previous_label=Fetilego next.title=Letlakala le latelago next_label=Latelago -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Letlakala: -page_of=la {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom_out.title=BuÅ¡etÅ¡a ka gare zoom_out_label=BuÅ¡etÅ¡a ka gare @@ -54,17 +54,18 @@ document_properties_title=Thaetlele: # LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" # will be replaced by the creation/modification date, and time, of the PDF file. +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Å ielanya para ya ka thoko toggle_sidebar_label=Å ielanya para ya ka thoko -outline.title=LaetÅ¡a kakaretÅ¡o ya tokumente -outline_label=KakaretÅ¡o ya tokumente +document_outline_label=KakaretÅ¡o ya tokumente thumbs.title=LaetÅ¡a dikhutÅ¡ofatÅ¡o thumbs_label=DikhutÅ¡ofatÅ¡o findbar.title=HwetÅ¡a go tokumente -findbar_label=HwetÅ¡a # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -75,7 +76,6 @@ thumb_page_title=Letlakala {{page}} thumb_page_canvas=KhutÅ¡ofatÅ¡o ya letlakala {{page}} # Find panel button title and messages -find_label=HwetÅ¡a: find_previous.title=HwetÅ¡a tiragalo e fetilego ya sekafoko find_previous_label=Fetilego find_next.title=HwetÅ¡a tiragalo e latelago ya sekafoko @@ -124,7 +124,6 @@ missing_file_error=Faele yeo e sego gona ya PDF. # Some common types are e.g.: "Check", "Text", "Comment", "Note" text_annotation_type.alt=[{{type}} Tlhaloso] password_ok=LOKILE -password_cancel=Khansela printing_not_supported=TemoÅ¡o: Go gatiÅ¡a ga go thekgwe ke praosara ye ka botlalo. printing_not_ready=TemoÅ¡o: PDF ga ya hlahlelwa ka botlalo bakeng sa go gatiÅ¡wa. diff --git a/vendor/pdfjs/web/locale/oc/viewer.properties b/vendor/pdfjs/web/locale/oc/viewer.properties index d9a9165..fbea267 100644 --- a/vendor/pdfjs/web/locale/oc/viewer.properties +++ b/vendor/pdfjs/web/locale/oc/viewer.properties @@ -18,12 +18,14 @@ previous_label=Precedent next.title=Pagina seguenta next_label=Seguent -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Pagina : -page_of=sus {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Pagina +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=sus {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom_out.title=Zoom arrièr zoom_out_label=Zoom arrièr @@ -88,19 +90,21 @@ document_properties_version=Version PDF : document_properties_page_count=Nombre de paginas : document_properties_close=Tampar +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_close=Anullar + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Afichar/amagar lo panèl lateral toggle_sidebar_label=Afichar/amagar lo panèl lateral -outline.title=Afichar los marcapaginas -outline_label=Marcapaginas del document +document_outline_label=Marcapaginas del document attachments.title=Visualizar las pèças juntas attachments_label=Pèças juntas thumbs.title=Afichar las vinhetas thumbs_label=Vinhetas findbar.title=Trobar dins lo document -findbar_label=Recercar # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -111,7 +115,6 @@ thumb_page_title=Pagina {{page}} thumb_page_canvas=Vinheta de la pagina {{page}} # Find panel button title and messages -find_label=Recercar find_previous.title=Tròba l'ocurréncia precedenta de la frasa find_previous_label=Precedent find_next.title=Tròba l'ocurréncia venenta de la frasa @@ -139,7 +142,7 @@ error_stack=Pila : {{stack}} error_file=Fichièr : {{file}} # LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number error_line=Linha : {{line}} -rendering_error=Una error s'es producha pendent l'afichatge de la pagina. +rendering_error=Una error s'es produita pendent l'afichatge de la pagina. # Predefined zoom values page_scale_width=Largor plena @@ -151,7 +154,7 @@ page_scale_actual=Talha vertadièra # Loading indicator messages loading_error_indicator=Error -loading_error=Una error s'es producha pendent lo cargament del fichièr PDF. +loading_error=Una error s'es produita pendent lo cargament del fichièr PDF. invalid_file_error=Fichièr PDF invalid o corromput. missing_file_error=Fichièr PDF mancant. @@ -165,7 +168,7 @@ password_invalid=Senhal incorrècte. Tornatz ensajar. password_ok=D'acòrdi password_cancel=Anullar -printing_not_supported=Atencion : l'estampatge es pas completament gerit per aqueste navigador. +printing_not_supported=Atencion : l'impression es pas completament gerit per aqueste navigador. printing_not_ready=Atencion : lo PDF es pas entièrament cargat per lo poder imprimir. web_fonts_disabled=Las poliças web son desactivadas : impossible d'utilizar las poliças integradas al PDF. document_colors_not_allowed=Los documents PDF pòdon pas utilizar lors pròprias colors : « Autorizar las paginas web d'utilizar lors pròprias colors » es desactivat dins lo navigador. diff --git a/vendor/pdfjs/web/locale/or/viewer.properties b/vendor/pdfjs/web/locale/or/viewer.properties index 279407d..831eace 100644 --- a/vendor/pdfjs/web/locale/or/viewer.properties +++ b/vendor/pdfjs/web/locale/or/viewer.properties @@ -18,12 +18,12 @@ previous_label=ପà‚ରàବ next.title=ପର ପàƒà¬·àଠା next_label=ପର -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=ପàƒà¬·àଠା: -page_of={{pageCount}} ର +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom_out.title=ଛà‹à¬Ÿ କରନàତà zoom_out_label=ଛà‹à¬Ÿ କରନàତà @@ -57,10 +57,6 @@ page_rotate_ccw.title=ବାମାବରàତàà¬¤à€ à¬˜àରାନàତà page_rotate_ccw.label=ବାମାବରàତàà¬¤à€ à¬˜àରାନàତà page_rotate_ccw_label=ବାମାବରàତàà¬¤à€ à¬˜àରାନàତà -hand_tool_enable.title=ହସàତକàƒà¬¤ ସାଧନକà ସକàà¬°à¬¿àŸ à¬•à¬°à¬¨àତà -hand_tool_enable_label=ହସàତକàƒà¬¤ ସାଧନକà ସକàà¬°à¬¿àŸ à¬•à¬°à¬¨àତà -hand_tool_disable.title=ହସàତକàƒà¬¤ ସାଧନକà ନିଷàକàà¬°à¬¿àŸ à¬•à¬°à¬¨àତà -hand_tool_disable_label=ହସàତକàƒà¬¤ ସାଧନକà ନିଷàକàà¬°à¬¿àŸ à¬•à¬°à¬¨àତà # Document properties dialog box document_properties.title=ଦଲିଲ ଗàଣଧରàମ… @@ -88,19 +84,20 @@ document_properties_version=PDF ସଂସàକରଣ: document_properties_page_count=ପàƒà¬·àଠା ଗଣନା: document_properties_close=ବନàଦ କରନàତà +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=ପାରàଶàà±à¬ªà¬Ÿà¬¿à¬•à ଆଗପଛ କରନàତà toggle_sidebar_label=ପାରàଶàà±à¬ªà¬Ÿà¬¿à¬•à ଆଗପଛ କରନàତà -outline.title=ଦଲିଲ ସାରାଂଶ ଦରàଶାନàତà -outline_label=ଦଲିଲ ସାରାଂଶ +document_outline_label=ଦଲିଲ ସାରାଂଶ attachments.title=ସଂଲଗàନକଗàଡ଼ିକà ଦରàଶାନàତà attachments_label=ସଲଗàନକଗàଡିକ thumbs.title=ସଂକàଷିପàତ à¬¬à¬¿à¬¬à¬°à¬£à€ à¬¦à¬°àଶାନàତà thumbs_label=ସଂକàଷିପàତ à¬¬à¬¿à¬¬à¬°à¬£à€ findbar.title=à¬¦à¬²à¬¿à¬²à¬°à‡ à¬–à‹à¬œà¬¨àତà -findbar_label=ଖà‹à¬œà¬¨àତà # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -111,7 +108,6 @@ thumb_page_title=ପàƒà¬·àଠା {{page}} thumb_page_canvas=ପàƒà¬·àଠାର ସଂକàଷିପàତ à¬¬à¬¿à¬¬à¬°à¬£à€ {{page}} # Find panel button title and messages -find_label=ଖà‹à¬œà¬¨àତà: find_previous.title=à¬à¬¹à¬¿ ବାକààŸà¬¾à¬‚ଶର ପà‚ରàବ ଉପସàଥିତିକà ଖà‹à¬œà¬¨àତà find_previous_label=ପà‚ରàବବରàତàà¬¤à€ find_next.title=à¬à¬¹à¬¿ ବାକààŸà¬¾à¬‚ଶର ପରବରàତàà¬¤à€ à¬‰à¬ªà¬¸àଥିତିକà ଖà‹à¬œà¬¨àତà @@ -164,7 +160,6 @@ text_annotation_type.alt=[{{type}} Annotation] password_label=à¬à¬¹à¬¿ PDF ଫାଇଲକà ଖà‹à¬²à¬¿à¬¬à¬¾ ପାଇଠପàରବà‡à¬¶ ସଂକà‡à¬¤ à¬à¬°à¬£ କରନàତà। password_invalid=à¬àଲ ପàରବà‡à¬¶ ସଂକà‡à¬¤à¥¤ ଦàŸà¬¾à¬•à¬°à¬¿ ପàଣି ଚà‡à¬·àଟା କରନàତà। password_ok=ଠିକ ଅଛି -password_cancel=ବାତିଲ କରନàତà printing_not_supported=ଚà‡à¬¤à¬¾à¬¬à¬¨à€: à¬à¬¹à¬¿ ବàରାଉଜର ଦàà±à¬¾à¬°à¬¾ ମàଦàରଣ କàରିàŸà¬¾ ସମàପà‚ରàଣàଣ à¬à¬¾à¬¬à¬°à‡ ସହାàŸà¬¤à¬¾ ପàରାପàତ ନàହà¬à¥¤ printing_not_ready=ଚà‡à¬¤à¬¾à¬¬à¬¨à€: PDF ଟି ମàଦàରଣ ପାଇଠସମàପà‚ରàଣàଣ à¬à¬¾à¬¬à¬°à‡ ଧାରଣ ହà‹à¬‡ ନାହିà¬à¥¤ diff --git a/vendor/pdfjs/web/locale/pa-IN/viewer.properties b/vendor/pdfjs/web/locale/pa-IN/viewer.properties index fb26fc3..dc202da 100644 --- a/vendor/pdfjs/web/locale/pa-IN/viewer.properties +++ b/vendor/pdfjs/web/locale/pa-IN/viewer.properties @@ -18,25 +18,27 @@ previous_label=ਪਿੱਛੇ next.title=ਸਫ਼ਾ ਅੱਗੇ next_label=ਅੱਗੇ -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=ਸਫ਼ਾ: -page_of={{pageCount}} ਵਿੱਚੋਂ +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Page +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=of {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} of {{pagesCount}}) zoom_out.title=ਜ਼ੂਮ ਆਉਟ zoom_out_label=ਜ਼ੂਮ ਆਉਟ zoom_in.title=ਜ਼ੂਮ ਇਨ zoom_in_label=ਜ਼ੂਮ ਇਨ zoom.title=ਜ਼ੂਨ -print.title=ਪਰਿੰਟ -print_label=ਪਰਿੰਟ presentation_mode.title=ਪਰਿਜੈਂਟੇਸ਼ਨ ਮੋਡ ਵਿੱਚ ਜਾਓ presentation_mode_label=ਪਰਿਜੈਂਟੇਸ਼ਨ ਮੋਡ - -open_file.title=ਫਾਈਲ ਖੋਲà©à¨¹à©‹ +open_file.title=ਫਾਈਲ ਨੂੰ ਖੋਲà©à¨¹à©‹ open_file_label=ਖੋਲà©à¨¹à©‹ +print.title=ਪਰਿੰਟ +print_label=ਪਰਿੰਟ download.title=ਡਾਊਨਲੋਡ download_label=ਡਾਊਨਲੋਡ bookmark.title=ਮੌਜੂਦਾ à¨à¨²à¨• (ਨਵੀਂ ਵਿੰਡੋ ਵਿੱਚ ਕਾਪੀ ਕਰੋ ਜਾਂ ਖੋਲà©à¨¹à©‹) @@ -48,57 +50,64 @@ tools_label=ਟੂਲ first_page.title=ਪਹਿਲੇ ਸਫ਼ੇ ਉੱਤੇ ਜਾਓ first_page.label=ਪਹਿਲੇ ਸਫ਼ੇ ਉੱਤੇ ਜਾਓ first_page_label=ਪਹਿਲੇ ਸਫ਼ੇ ਉੱਤੇ ਜਾਓ - last_page.title=ਆਖਰੀ ਸਫ਼ੇ ਉੱਤੇ ਜਾਓ +last_page.label=ਆਖਰੀ ਸਫ਼ੇ ਉੱਤੇ ਜਾਓ last_page_label=ਆਖਰੀ ਸਫ਼ੇ ਉੱਤੇ ਜਾਓ page_rotate_cw.title=ਸੱਜੇ ਦਾਅ ਘà©à©°à¨®à¨¾à¨“ -page_rotate_cw.label=ਸੱਜੇ ਦਾਅ ਘà©à©°à¨®à¨¾à¨“ +page_rotate_cw.label=ਸੱਜੇ ਦਾਅ ਘà©à©°à¨®à¨¾à¨‰ page_rotate_cw_label=ਸੱਜੇ ਦਾਅ ਘà©à©°à¨®à¨¾à¨“ page_rotate_ccw.title=ਖੱਬੇ ਦਾਅ ਘà©à©°à¨®à¨¾à¨“ +page_rotate_ccw.label=ਖੱਬੇ ਦਾਅ ਘà©à©°à¨®à¨¾à¨‰ page_rotate_ccw_label=ਖੱਬੇ ਦਾਅ ਘà©à©°à¨®à¨¾à¨“ -hand_tool_enable.title=ਹੱਥ ਟੂਲ ਚਾਲੂ -hand_tool_enable_label=ਹੱਥ ਟੂਲ ਚਾਲੂ -hand_tool_disable.title=ਹੱਥ ਟੂਲ ਬੰਦ -hand_tool_disable_label=ਹੱਥ ਟੂਲ ਬੰਦ # Document properties dialog box -document_properties.title=…ਦਸਤਾਵੇਜ਼ ਵਿਸ਼ੇਸ਼ਤਾ -document_properties_label=…ਦਸਤਾਵੇਜ਼ ਵਿਸ਼ੇਸ਼ਤਾ -document_properties_file_name=ਫਾਈਲ ਨਾਂ: -document_properties_file_size=ਫਾਈਲ ਆਕਾਰ: +document_properties.title=…ਦਸਤਾਵੇਜ਼ ਦੀ ਵਿਸ਼ੇਸ਼ਤਾ +document_properties_label=…ਦਸਤਾਵੇਜ਼ ਦੀ ਵਿਸ਼ੇਸ਼ਤਾ +document_properties_file_name=ਫਾਈਲ ਦਾ ਨਾਂ: +document_properties_file_size=ਫਾਈਲ ਦਾ ਆਕਾਰ: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. document_properties_kb={{size_kb}} KB ({{size_b}} ਬਾਈਟ) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. document_properties_mb={{size_mb}} MB ({{size_b}} ਬਾਈਟ) document_properties_title=ਟਾਈਟਲ: document_properties_author=ਲੇਖਕ: document_properties_subject=ਵਿਸ਼ਾ: document_properties_keywords=ਸ਼ਬਦ: -document_properties_creation_date=ਬਣਾਉਣ ਮਿਤੀ: -document_properties_modification_date=ਸੋਧ ਮਿਤੀ: +document_properties_creation_date=ਬਣਾਉਣ ਦੀ ਮਿਤੀ: +document_properties_modification_date=ਸੋਧ ਦੀ ਮਿਤੀ: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. document_properties_date_string={{date}}, {{time}} document_properties_creator=ਨਿਰਮਾਤਾ: document_properties_producer=PDF ਪà©à¨°à©‹à¨¡à¨¿à¨Šà¨¸à¨°: document_properties_version=PDF ਵਰਜਨ: -document_properties_page_count=ਸਫ਼ਾ ਗਿਣਤੀ: +document_properties_page_count=ਸਫ਼ੇ ਦੀ ਗਿਣਤੀ: document_properties_close=ਬੰਦ ਕਰੋ +print_progress_message=Preparing document for printing… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancel # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=ਬਾਹੀ ਬਦਲੋ +toggle_sidebar_notification.title=Toggle Sidebar (document contains outline/attachments) toggle_sidebar_label=ਬਾਹੀ ਬਦਲੋ - -outline.title=ਦਸਤਾਵੇਜ਼ ਆਉਟਲਾਈਨ ਵੇਖਾਓ -outline_label=ਦਸਤਾਵੇਜ਼ ਆਉਟਲਾਈਨ -attachments.title=ਅਟੈਚਮੈਂਟ ਵੇਖਾਓ +document_outline.title=Show Document Outline (double-click to expand/collapse all items) +document_outline_label=Document Outline +attachments.title=ਅਟੈਚਮੈਂਟ ਨੂੰ ਵੇਖਾਓ attachments_label=ਅਟੈਚਮੈਂਟ -thumbs.title=ਥੰਮਨੇਲ ਵੇਖਾਓ +thumbs.title=ਥੰਮਨੇਲ ਨੂੰ ਵੇਖਾਓ thumbs_label=ਥੰਮਨੇਲ findbar.title=ਦਸਤਾਵੇਜ਼ ਵਿੱਚ ਲੱà¨à©‹ findbar_label=ਲੱà¨à©‹ - # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page # number. @@ -107,35 +116,24 @@ thumb_page_title=ਸਫ਼ਾ {{page}} # number. thumb_page_canvas={{page}} ਸਫ਼ੇ ਦਾ ਥੰਮਨੇਲ - -# Context menu -first_page.label=ਪਹਿਲੇ ਸਫ਼ੇ ਉੱਤੇ ਜਾਓ -last_page.label=ਆਖਰੀ ਸਫ਼ੇ ਉੱਤੇ ਜਾਓ -page_rotate_cw.label=ਸੱਜੇ ਦਾਅ ਘà©à©°à¨®à¨¾à¨‰ -page_rotate_ccw.label=ਖੱਬੇ ਦਾਅ ਘà©à©°à¨®à¨¾à¨‰ - # Find panel button title and messages -find_label=ਲੱà¨à©‹: find_previous.title=ਵਾਕ ਦੀ ਪਿਛਲੀ ਮੌਜੂਦਗੀ ਲੱà¨à©‹ find_previous_label=ਪਿੱਛੇ find_next.title=ਵਾਕ ਦੀ ਅਗਲੀ ਮੌਜੂਦਗੀ ਲੱà¨à©‹ find_next_label=ਅੱਗੇ find_highlight=ਸਠਉà¨à¨¾à¨°à©‹ -find_match_case_label=ਅੱਖਰ ਆਕਾਰ ਮਿਲਾਉ +find_match_case_label=ਅੱਖਰ ਆਕਾਰ ਨੂੰ ਮਿਲਾਉ find_reached_top=ਦਸਤਾਵੇਜ਼ ਦੇ ਉੱਤੇ ਆ ਗਠਹਾਂ, ਥੱਲੇ ਤੋਂ ਜਾਰੀ ਰੱਖਿਆ ਹੈ find_reached_bottom=ਦਸਤਾਵੇਜ਼ ਦੇ ਅੰਤ ਉੱਤੇ ਆ ਗਠਹਾਂ, ਉੱਤੇ ਤੋਂ ਜਾਰੀ ਰੱਖਿਆ ਹੈ find_not_found=ਵਾਕ ਨਹੀਂ ਲੱà¨à¨¿à¨† - # Error panel labels error_more_info=ਹੋਰ ਜਾਣਕਾਰੀ error_less_info=ਘੱਟ ਜਾਣਕਾਰੀ error_close=ਬੰਦ ਕਰੋ - # LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be # replaced by the PDF.JS version and build ID. error_version_info=PDF.js v{{version}} (ਬਿਲਡ: {{build}} - # LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an # english string describing the error. error_message=ਸà©à¨¨à©‡à¨¹à¨¾: {{message}} @@ -149,16 +147,15 @@ error_line=ਲਾਈਨ: {{line}} rendering_error=ਸਫ਼ਾ ਰੈਡਰ ਕਰਨ ਦੇ ਦੌਰਾਨ ਗਲਤੀ ਆਈ ਹੈ। # Predefined zoom values -page_scale_width=ਸਫ਼ਾ ਚੌੜਾਈ +page_scale_width=ਸਫ਼ੇ ਦੀ ਚੌੜਾਈ page_scale_fit=ਸਫ਼ਾ ਫਿੱਟ -page_scale_auto=ਆਟੋਮੈਟਿਕ ਜ਼ੂਮ +page_scale_auto=ਆਟੋਮੈਟਿਕ ਜ਼ੂਮ ਕਰੋ page_scale_actual=ਆਟੋਮੈਟਿਕ ਆਕਾਰ # LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a # numerical scale value. page_scale_percent={{scale}}% # Loading indicator messages -# LOCALIZATION NOTE (error_line): "{{[percent}}" will be replaced with a percentage loading_error_indicator=ਗਲਤੀ loading_error=PDF ਲੋਡ ਕਰਨ ਦੇ ਦੌਰਾਨ ਗਲਤੀ ਆਈ ਹੈ। invalid_file_error=ਗਲਤ ਜਾਂ ਨਿਕਾਰਾ PDF ਫਾਈਲ ਹੈ। @@ -170,12 +167,12 @@ unexpected_response_error=ਅਣਜਾਣ ਸਰਵਰ ਜਵਾਬ। # the PDF spec (32000-1:2008 Table 169 – Annotation types). # Some common types are e.g.: "Check", "Text", "Comment", "Note" text_annotation_type.alt=[{{type}} ਵਿਆਖਿਆ] -password_label=ਇਹ PDF ਫਾਈਲ ਖੋਲà©à¨¹à¨£ ਲਈ ਪਾਸਵਰਡ ਦਿਉ। +password_label=ਇਹ PDF ਫਾਈਲ ਨੂੰ ਖੋਲà©à¨¹à¨£ ਲਈ ਪਾਸਵਰਡ ਦਿਉ। password_invalid=ਗਲਤ ਪਾਸਵਰਡ। ਫੇਰ ਕੋਸ਼ਿਸ਼ ਕਰੋ ਜੀ। password_ok=ਠੀਕ ਹੈ password_cancel=ਰੱਦ ਕਰੋ printing_not_supported=ਸਾਵਧਾਨ: ਇਹ ਬਰਾਊਜ਼ਰ ਪਰਿੰਟ ਕਰਨ ਲਈ ਪੂਰੀ ਤਰà©à¨¹à¨¾à¨‚ ਸਹਾਇਕ ਨਹੀਂ ਹੈ। -printing_not_ready=ਸਾਵਧਾਨ: PDF ਪਰਿੰਟ ਕਰਨ ਲਈ ਪੂਰੀ ਤਰà©à¨¹à¨¾à¨‚ ਲੋਡ ਨਹੀਂ ਹੈ। -web_fonts_disabled=ਵੈਬ ਫੋਂਟ ਬੰਦ ਹਨ: ਇੰਬੈਡ PDF ਫੋਂਟ ਵਰਤਨ ਲਈ ਅਸਮਰੱਥ ਹੈ। -document_colors_disabled=PDF ਡੌਕੂਮੈਂਟ ਨੂੰ ਆਪਣੇ ਰੰਗ ਵਰਤਣ ਦੀ ਇਜ਼ਾਜ਼ਤ ਨਹੀਂ ਹੈ।: ਬਰਾਊਜ਼ਰ ਵਿੱਚ \u0022ਸਫ਼ਿਆਂ ਨੂੰ ਆਪਣੇ ਰੰਗ ਵਰਤਣ ਦਿਉ\u0022 ਨੂੰ ਬੰਦ ਕੀਤਾ ਹੋਇਆ ਹੈ।
\ No newline at end of file +printing_not_ready=ਸਾਵਧਾਨ: PDF ਨੂੰ ਪਰਿੰਟ ਕਰਨ ਲਈ ਪੂਰੀ ਤਰà©à¨¹à¨¾à¨‚ ਲੋਡ ਨਹੀਂ ਹੈ। +web_fonts_disabled=ਵੈਬ ਫੋਂਟ ਬੰਦ ਹਨ: ਇੰਬੈਡ PDF ਫੋਂਟ ਨੂੰ ਵਰਤਣ ਲਈ ਅਸਮਰੱਥ ਹੈ। +document_colors_not_allowed=PDF ਦਸਤਾਵੇਜ਼ਾਂ ਨੂੰ ਆਪਣੇ ਰੰਗ ਵਰਤਣ ਦੀ ਇਜ਼ਾਜ਼ਤ ਨਹੀਂ ਹੈ।: ਬਰਾਊਜ਼ਰ ਵਿੱਚ “ਸਫ਼ਿਆਂ ਨੂੰ ਆਪਣੇ ਰੰਗ ਚà©à¨£à¨¨ ਦੀ ਇਜ਼ਾਜ਼ਤ ਦਿਓ†ਨਾ-ਸਰਗਰਮ ਹੈ। diff --git a/vendor/pdfjs/web/locale/pl/viewer.properties b/vendor/pdfjs/web/locale/pl/viewer.properties index d52c880..fc26be8 100644 --- a/vendor/pdfjs/web/locale/pl/viewer.properties +++ b/vendor/pdfjs/web/locale/pl/viewer.properties @@ -2,18 +2,14 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -# Main toolbar buttons (tooltips and alt text for images) previous.title=Poprzednia strona previous_label=Poprzednia next.title=NastÄ™pna strona next_label=NastÄ™pna -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Strona: -page_of=z {{pageCount}} +page.title==Strona: +of_pages=z {{pagesCount}} +page_of_pages=({{pageNumber}} z {{pagesCount}}) zoom_out.title=Pomniejszenie zoom_out_label=Pomniejsz @@ -31,8 +27,8 @@ download_label=Pobierz bookmark.title=Bieżąca pozycja (skopiuj lub otwórz jako odnoÅ›nik w nowym oknie) bookmark_label=Bieżąca pozycja -tools.title=Tools -tools_label=Tools +tools.title=NarzÄ™dzia +tools_label=NarzÄ™dzia first_page.title=Przechodzenie do pierwszej strony first_page.label=Przejdź do pierwszej strony first_page_label=Przejdź do pierwszej strony @@ -46,10 +42,10 @@ page_rotate_ccw.title=Obracanie przeciwnie do ruchu wskazówek zegara page_rotate_ccw.label=Obróć przeciwnie do ruchu wskazówek zegara page_rotate_ccw_label=Obróć przeciwnie do ruchu wskazówek zegara -hand_tool_enable.title=WÅ‚Ä…czanie narzÄ™dzia rÄ…czka -hand_tool_enable_label=WÅ‚Ä…cz narzÄ™dzie rÄ…czka -hand_tool_disable.title=WyÅ‚Ä…czanie narzÄ™dzia rÄ…czka -hand_tool_disable_label=WyÅ‚Ä…cz narzÄ™dzie rÄ…czka +cursor_text_select_tool.title=WÅ‚Ä…cza narzÄ™dzie zaznaczania tekstu +cursor_text_select_tool_label=NarzÄ™dzie zaznaczania tekstu +cursor_hand_tool.title=WÅ‚Ä…cza narzÄ™dzie rÄ…czka +cursor_hand_tool_label=NarzÄ™dzie rÄ…czka document_properties.title=WÅ‚aÅ›ciwoÅ›ci dokumentu… document_properties_label=WÅ‚aÅ›ciwoÅ›ci dokumentu… @@ -70,13 +66,15 @@ document_properties_version=Wersja PDF: document_properties_page_count=Liczba stron: document_properties_close=Zamknij -# Tooltips and alt text for side panel toolbar buttons -# (the _label strings are alt text for the buttons, the .title strings are -# tooltips) +print_progress_message=Przygotowywanie dokumentu do druku… +print_progress_percent={{progress}}% +print_progress_close=Anuluj + toggle_sidebar.title=PrzeÅ‚Ä…czanie panelu bocznego +toggle_sidebar_notification.title=PrzeÅ‚Ä…czanie panelu bocznego (dokument zawiera konspekt/zaÅ‚Ä…czniki) toggle_sidebar_label=PrzeÅ‚Ä…cz panel boczny -outline.title=WyÅ›wietlanie zarysu dokumentu -outline_label=Zarys dokumentu +document_outline.title=WyÅ›wietlanie zarysu dokumentu (podwójne klikniÄ™cie rozwija lub zwija wszystkie pozycje) +document_outline_label=Zarys dokumentu attachments.title=WyÅ›wietlanie zaÅ‚Ä…czników attachments_label=ZaÅ‚Ä…czniki thumbs.title=WyÅ›wietlanie miniaturek @@ -84,16 +82,11 @@ thumbs_label=Miniaturki findbar.title=Znajdź w dokumencie findbar_label=Znajdź -# Thumbnails panel item (tooltip and alt text for images) -# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page -# number. thumb_page_title=Strona {{page}} -# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page -# number. thumb_page_canvas=Miniaturka strony {{page}} -# Find panel button title and messages -find_label=Znajdź: +find_input.title=Wyszukiwanie +find_input.placeholder=Szukaj w dokumencie… find_previous.title=Znajdź poprzednie wystÄ…pienie tekstu find_previous_label=Poprzednie find_next.title=Znajdź nastÄ™pne wystÄ…pienie tekstu @@ -104,26 +97,16 @@ find_reached_top=OsiÄ…gniÄ™to poczÄ…tek dokumentu, kontynuacja od koÅ„ca find_reached_bottom=OsiÄ…gniÄ™to koniec dokumentu, kontynuacja od poczÄ…tku find_not_found=Tekst nieznaleziony -# Error panel labels error_more_info=WiÄ™cej informacji error_less_info=Mniej informacji error_close=Zamknij -# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be -# replaced by the PDF.JS version and build ID. error_version_info=PDF.js v{{version}} (kompilacja: {{build}}) -# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an -# english string describing the error. error_message=Wiadomość: {{message}} -# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack -# trace. error_stack=Stos: {{stack}} -# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename error_file=Plik: {{file}} -# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number error_line=Wiersz: {{line}} rendering_error=Podczas renderowania strony wystÄ…piÅ‚ bÅ‚Ä…d. -# Predefined zoom values page_scale_width=Szerokość strony page_scale_fit=Dopasowanie strony page_scale_auto=Skala automatyczna @@ -136,17 +119,13 @@ invalid_file_error=NieprawidÅ‚owy lub uszkodzony plik PDF. missing_file_error=Brak pliku PDF. unexpected_response_error=Nieoczekiwana odpowiedź serwera. -# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. -# "{{type}}" will be replaced with an annotation type from a list defined in -# the PDF spec (32000-1:2008 Table 169 – Annotation types). -# Some common types are e.g.: "Check", "Text", "Comment", "Note" text_annotation_type.alt=[Adnotacja: {{type}}] password_label=Wprowadź hasÅ‚o, aby otworzyć ten dokument PDF. password_invalid=NieprawidÅ‚owe hasÅ‚o. ProszÄ™ spróbować ponownie. password_ok=OK password_cancel=Anuluj -printing_not_supported=Ostrzeżenie: Drukowanie nie jest w peÅ‚ni wspierane przez przeglÄ…darkÄ™. +printing_not_supported=Ostrzeżenie: Drukowanie nie jest w peÅ‚ni obsÅ‚ugiwane przez przeglÄ…darkÄ™. printing_not_ready=Ostrzeżenie: Dokument PDF nie jest caÅ‚kowicie wczytany, wiÄ™c nie można go wydrukować. web_fonts_disabled=Czcionki sieciowe sÄ… wyÅ‚Ä…czone: nie można użyć osadzonych czcionek PDF. document_colors_not_allowed=Dokumenty PDF nie mogÄ… używać wÅ‚asnych kolorów: Opcja „Pozwalaj stronom stosować inne kolory†w przeglÄ…darce jest nieaktywna. diff --git a/vendor/pdfjs/web/locale/pt-BR/viewer.properties b/vendor/pdfjs/web/locale/pt-BR/viewer.properties index cdfd8f0..c2371c4 100644 --- a/vendor/pdfjs/web/locale/pt-BR/viewer.properties +++ b/vendor/pdfjs/web/locale/pt-BR/viewer.properties @@ -18,19 +18,22 @@ previous_label=Anterior next.title=Próxima página next_label=Próxima -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Página: -page_of=de {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Página +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=de {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} de {{pagesCount}}) -zoom_out.title=Diminuir zoom -zoom_out_label=Diminuir zoom -zoom_in.title=Aumentar zoom -zoom_in_label=Aumentar zoom +zoom_out.title=Reduzir +zoom_out_label=Reduzir +zoom_in.title=Ampliar +zoom_in_label=Ampliar zoom.title=Zoom -presentation_mode.title=Alternar para modo de apresentação +presentation_mode.title=Alternar para o modo de apresentação presentation_mode_label=Modo de apresentação open_file.title=Abrir arquivo open_file_label=Abrir @@ -38,7 +41,7 @@ print.title=Imprimir print_label=Imprimir download.title=Download download_label=Download -bookmark.title=Visualização atual (copie ou abra em uma nova janela) +bookmark.title=Visualização atual (copiar ou abrir em uma nova janela) bookmark_label=Visualização atual # Secondary toolbar and context menu @@ -57,10 +60,10 @@ page_rotate_ccw.title=Girar no sentido anti-horário page_rotate_ccw.label=Girar no sentido anti-horário page_rotate_ccw_label=Girar no sentido anti-horário -hand_tool_enable.title=Ativar ferramenta da mão -hand_tool_enable_label=Ativar ferramenta da mão -hand_tool_disable.title=Desativar ferramenta da mão -hand_tool_disable_label=Desativar ferramenta da mão +cursor_text_select_tool.title=Habilitar a ferramenta de seleção de texto +cursor_text_select_tool_label=Ferramenta de seleção de texto +cursor_hand_tool.title=Habilitar ferramenta de mão +cursor_hand_tool_label=Ferramenta de mão # Document properties dialog box document_properties.title=Propriedades do documento… @@ -88,16 +91,23 @@ document_properties_version=Versão do PDF: document_properties_page_count=Número de páginas: document_properties_close=Fechar +print_progress_message=Preparando documento para impressão… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}} % +print_progress_close=Cancelar + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) -toggle_sidebar.title=Exibir/ocultar painel -toggle_sidebar_label=Exibir/ocultar painel -outline.title=Exibir estrutura de tópicos -outline_label=Estrutura de tópicos do documento -attachments.title=Exibir anexos +toggle_sidebar.title=Alternar painel +toggle_sidebar_notification.title=Alternar o painel (documento contém marcadores e anexos) +toggle_sidebar_label=Alternar painel +document_outline.title=Mostrar a estrutura do documento (duplo-clique para expandir/recolher todos os Ãtens) +document_outline_label=Estrutura do documento +attachments.title=Mostrar anexos attachments_label=Anexos -thumbs.title=Exibir miniaturas das páginas +thumbs.title=Mostrar miniaturas thumbs_label=Miniaturas findbar.title=Localizar no documento findbar_label=Localizar @@ -111,16 +121,17 @@ thumb_page_title=Página {{page}} thumb_page_canvas=Miniatura da página {{page}} # Find panel button title and messages -find_label=Localizar: -find_previous.title=Localizar a ocorrência anterior do texto +find_input.title=Localizar +find_input.placeholder=Localizar no documento… +find_previous.title=Localizar a ocorrência anterior da frase find_previous_label=Anterior -find_next.title=Localizar a próxima ocorrência do texto +find_next.title=Localizar a próxima ocorrência da frase find_next_label=Próxima find_highlight=Realçar tudo find_match_case_label=Diferenciar maiúsculas/minúsculas -find_reached_top=Atingido o inÃcio do documento, continuando do fim -find_reached_bottom=Atingido o fim do documento, continuando do inÃcio -find_not_found=Texto não encontrado +find_reached_top=InÃcio do documento alcançado, continuando do fim +find_reached_bottom=Fim do documento alcançado, continuando do inÃcio +find_not_found=Frase não encontrada # Error panel labels error_more_info=Mais informações @@ -128,13 +139,13 @@ error_less_info=Menos informações error_close=Fechar # LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be # replaced by the PDF.JS version and build ID. -error_version_info=PDF.js v{{version}} (build: {{build}}) +error_version_info=PDF.js v{{version}} (compilação: {{build}}) # LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an # english string describing the error. error_message=Mensagem: {{message}} # LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack # trace. -error_stack=Stack: {{stack}} +error_stack=Pilha: {{stack}} # LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename error_file=Arquivo: {{file}} # LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number @@ -163,11 +174,11 @@ unexpected_response_error=Resposta inesperada do servidor. # Some common types are e.g.: "Check", "Text", "Comment", "Note" text_annotation_type.alt=[Anotação {{type}}] password_label=Forneça a senha para abrir este arquivo PDF. -password_invalid=Senha inválida. Por favor, tente de novo. +password_invalid=Senha inválida. Por favor, tentar de novo. password_ok=OK password_cancel=Cancelar -printing_not_supported=Alerta: a impressão não é totalmente suportada neste navegador. -printing_not_ready=Alerta: o PDF não está totalmente carregado para impressão. -web_fonts_disabled=Fontes da web estão desativadas: não é possÃvel usar fontes incorporadas do PDF. -document_colors_not_allowed=Documentos PDF não estão autorizados a usar suas próprias cores: “Páginas podem usar outras cores†está desativado no navegador. +printing_not_supported=Aviso: a impressão não é totalmente suportada neste navegador. +printing_not_ready=Aviso: o PDF não está totalmente carregado para impressão. +web_fonts_disabled=As fontes web estão desabilitadas: não foi possÃvel usar fontes incorporadas do PDF. +document_colors_not_allowed=Os documentos em PDF não estão autorizados a usar suas próprias cores: “Permitir que as páginas escolham suas próprias cores†está desabilitado no navegador. diff --git a/vendor/pdfjs/web/locale/pt-PT/viewer.properties b/vendor/pdfjs/web/locale/pt-PT/viewer.properties index 06c68ed..6ae8bea 100644 --- a/vendor/pdfjs/web/locale/pt-PT/viewer.properties +++ b/vendor/pdfjs/web/locale/pt-PT/viewer.properties @@ -18,19 +18,22 @@ previous_label=Anterior next.title=Página seguinte next_label=Seguinte -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Página: -page_of=de {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Página +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=de {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} de {{pagesCount}}) zoom_out.title=Reduzir zoom_out_label=Reduzir zoom_in.title=Ampliar zoom_in_label=Ampliar -zoom.title=Ampliação -presentation_mode.title=Mudar para modo de apresentação +zoom.title=Zoom +presentation_mode.title=Trocar para o modo de apresentação presentation_mode_label=Modo de apresentação open_file.title=Abrir ficheiro open_file_label=Abrir @@ -38,7 +41,7 @@ print.title=Imprimir print_label=Imprimir download.title=Descarregar download_label=Descarregar -bookmark.title=Visão atual (copiar ou abrir numa nova janela) +bookmark.title=Visão atual (copiar ou abrir em nova janela) bookmark_label=Visão atual # Secondary toolbar and context menu @@ -57,10 +60,10 @@ page_rotate_ccw.title=Rodar à esquerda page_rotate_ccw.label=Rodar à esquerda page_rotate_ccw_label=Rodar à esquerda -hand_tool_enable.title=Ativar ferramenta de mão -hand_tool_enable_label=Ativar ferramenta de mão -hand_tool_disable.title=Desativar ferramenta de mão -hand_tool_disable_label=Desativar ferramenta de mão +cursor_text_select_tool.title=Ativar ferramenta de seleção de texto +cursor_text_select_tool_label=Ferramenta de seleção de texto +cursor_hand_tool.title=Ativar ferramenta de mão +cursor_hand_tool_label=Ferramenta de mão # Document properties dialog box document_properties.title=Propriedades do documento… @@ -88,13 +91,20 @@ document_properties_version=Versão do PDF: document_properties_page_count=N.º de páginas: document_properties_close=Fechar +print_progress_message=A preparar o documento para impressão… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Cancelar + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) -toggle_sidebar.title=Comutar barra lateral -toggle_sidebar_label=Comutar barra lateral -outline.title=Mostrar estrutura do documento -outline_label=Estrutura do documento +toggle_sidebar.title=Alternar barra lateral +toggle_sidebar_notification.title=Alternar barra lateral (documento contém contorno/anexos) +toggle_sidebar_label=Alternar barra lateral +document_outline.title=Mostrar esquema do documento (duplo clique para expandir/colapsar todos os itens) +document_outline_label=Estrutura do documento attachments.title=Mostrar anexos attachments_label=Anexos thumbs.title=Mostrar miniaturas @@ -111,15 +121,16 @@ thumb_page_title=Página {{page}} thumb_page_canvas=Miniatura da página {{page}} # Find panel button title and messages -find_label=Localizar: +find_input.title=Localizar +find_input.placeholder=Localizar no documento… find_previous.title=Localizar ocorrência anterior da frase find_previous_label=Anterior find_next.title=Localizar ocorrência seguinte da frase find_next_label=Seguinte find_highlight=Destacar tudo find_match_case_label=Correspondência -find_reached_top=InÃcio de documento atingido, a continuar do fim -find_reached_bottom=Fim da página atingido, a continuar do inÃcio +find_reached_top=Topo do documento atingido, a continuar a partir do fundo +find_reached_bottom=Fim do documento atingido, a continuar a partir do topo find_not_found=Frase não encontrada # Error panel labels @@ -134,7 +145,7 @@ error_version_info=PDF.js v{{version}} (compilação: {{build}}) error_message=Mensagem: {{message}} # LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack # trace. -error_stack=Pilha: {{stack}} +error_stack=Stack: {{stack}} # LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename error_file=Ficheiro: {{file}} # LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number @@ -144,7 +155,7 @@ rendering_error=Ocorreu um erro ao processar a página. # Predefined zoom values page_scale_width=Ajustar à largura page_scale_fit=Ajustar à página -page_scale_auto=Tamanho automático +page_scale_auto=Zoom automático page_scale_actual=Tamanho real # LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a # numerical scale value. @@ -162,7 +173,7 @@ unexpected_response_error=Resposta inesperada do servidor. # the PDF spec (32000-1:2008 Table 169 – Annotation types). # Some common types are e.g.: "Check", "Text", "Comment", "Note" text_annotation_type.alt=[Anotação {{type}}] -password_label=Digite a palavra-passe para abrir este PDF. +password_label=Digite a palavra-passe para abrir este ficheiro PDF. password_invalid=Palavra-passe inválida. Por favor, tente novamente. password_ok=OK password_cancel=Cancelar @@ -170,4 +181,4 @@ password_cancel=Cancelar printing_not_supported=Aviso: a impressão não é totalmente suportada por este navegador. printing_not_ready=Aviso: o PDF ainda não está totalmente carregado. web_fonts_disabled=Os tipos de letra web estão desativados: não é possÃvel utilizar os tipos de letra PDF incorporados. -document_colors_not_allowed=Os documentos PDF não permitem a utilização das suas próprias cores: 'Autorizar as páginas a escolher as suas próprias cores' está desativada no navegador. +document_colors_not_allowed=Os documentos PDF não permitem a utilização das suas próprias cores: “Permitir à s páginas escolher as suas próprias cores†está desativado no navegador. diff --git a/vendor/pdfjs/web/locale/rm/viewer.properties b/vendor/pdfjs/web/locale/rm/viewer.properties index 5564738..d9eb524 100644 --- a/vendor/pdfjs/web/locale/rm/viewer.properties +++ b/vendor/pdfjs/web/locale/rm/viewer.properties @@ -18,12 +18,15 @@ previous_label=Enavos next.title=Proxima pagina next_label=Enavant -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Pagina: -page_of=da {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Pagina +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=da {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} da {{pagesCount}}) zoom_out.title=Empitschnir zoom_out_label=Empitschnir @@ -57,17 +60,21 @@ page_rotate_ccw.title=Rotar en direcziun cuntraria a l'ura page_rotate_ccw.label=Rotar en direcziun cuntraria a l'ura page_rotate_ccw_label=Rotar en direcziun cuntraria a l'ura -hand_tool_enable.title=Activar l'utensil da maun -hand_tool_enable_label=Activar l'utensil da maun -hand_tool_disable.title=Deactivar l'utensil da maun -hand_tool_disable_label=Deactivar l'utensil da maun +cursor_text_select_tool.title=Activar l'utensil per selecziunar text +cursor_text_select_tool_label=Utensil per selecziunar text +cursor_hand_tool.title=Activar l'utensil da maun +cursor_hand_tool_label=Utensil da maun # Document properties dialog box document_properties.title=Caracteristicas dal document… document_properties_label=Caracteristicas dal document… document_properties_file_name=Num da la datoteca: document_properties_file_size=Grondezza da la datoteca: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. document_properties_kb={{size_kb}} KB ({{size_b}} bytes) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. document_properties_mb={{size_mb}} MB ({{size_b}} bytes) document_properties_title=Titel: document_properties_author=Autur: @@ -75,6 +82,8 @@ document_properties_subject=Tema: document_properties_keywords=Chavazzins: document_properties_creation_date=Data da creaziun: document_properties_modification_date=Data da modificaziun: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. document_properties_date_string={{date}} {{time}} document_properties_creator=Creà da: document_properties_producer=Creà il PDF cun: @@ -82,13 +91,20 @@ document_properties_version=Versiun da PDF: document_properties_page_count=Dumber da paginas: document_properties_close=Serrar +print_progress_message=Preparar il document per stampar… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Interrumper + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Activar/deactivar la trav laterala +toggle_sidebar_notification.title=Activar/deactivar la trav laterala (structura dal document/agiuntas) toggle_sidebar_label=Activar/deactivar la trav laterala -outline.title=Mussar la structura da la pagina -outline_label=Structura da la pagina +document_outline.title=Mussar la structura dal document (cliccar duas giadas per extender/cumprimer tut ils elements) +document_outline_label=Structura dal document attachments.title=Mussar agiuntas attachments_label=Agiuntas thumbs.title=Mussar las miniaturas @@ -105,7 +121,8 @@ thumb_page_title=Pagina {{page}} thumb_page_canvas=Miniatura da la pagina {{page}} # Find panel button title and messages -find_label=Tschertgar: +find_input.title=Tschertgar +find_input.placeholder=Tschertgar en il document… find_previous.title=Tschertgar la posiziun precedenta da l'expressiun find_previous_label=Enavos find_next.title=Tschertgar la proxima posiziun da l'expressiun @@ -164,4 +181,4 @@ password_cancel=Interrumper printing_not_supported=Attenziun: Il stampar na funcziunescha anc betg dal tut en quest navigatur. printing_not_ready=Attenziun: Il PDF n'è betg chargià cumplettamain per stampar. web_fonts_disabled=Scrittiras dal web èn deactivadas: impussibel dad utilisar las scrittiras integradas en il PDF. -document_colors_disabled=Documents da PDF na pon betg utilisar lur atgnas colurs: \'Permetter a las paginas d'utilisar lur atgnas colurs empè da las colurs tschernidas survart\' è deactivà en il navigatur. +document_colors_not_allowed=Documents da PDF na dastgan betg duvrar las atgnas colurs: 'Permetter a paginas da tscherner lur atgna colur' è deactivà en il navigatur. diff --git a/vendor/pdfjs/web/locale/ro/viewer.properties b/vendor/pdfjs/web/locale/ro/viewer.properties index c47c93f..c987c7b 100644 --- a/vendor/pdfjs/web/locale/ro/viewer.properties +++ b/vendor/pdfjs/web/locale/ro/viewer.properties @@ -18,18 +18,21 @@ previous_label=ÃŽnapoi next.title=Pagina următoare next_label=ÃŽnainte -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Pagină: -page_of=din {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Pagina +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=din {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} din {{pagesCount}}) zoom_out.title=MicÈ™orează zoom_out_label=MicÈ™orează zoom_in.title=MăreÈ™te zoom_in_label=MăreÈ™te -zoom.title=Scalare +zoom.title=Zoom presentation_mode.title=Schimbă la modul de prezentare presentation_mode_label=Mod de prezentare open_file.title=Deschide un fiÈ™ier @@ -45,7 +48,7 @@ bookmark_label=Vizualizare actuală tools.title=Unelte tools_label=Unelte first_page.title=Mergi la prima pagină -first_page.label=MergeÈ›i la prima pagină +first_page.label=Mergi la prima pagină first_page_label=Mergi la prima pagină last_page.title=Mergi la ultima pagină last_page.label=Mergi la ultima pagină @@ -54,19 +57,15 @@ page_rotate_cw.title=RoteÈ™te în sensul acelor de ceasornic page_rotate_cw.label=RoteÈ™te în sensul acelor de ceasornic page_rotate_cw_label=RoteÈ™te în sensul acelor de ceasornic page_rotate_ccw.title=RoteÈ™te în sens invers al acelor de ceasornic -page_rotate_ccw.label=Rotate Counter-Clockwise -page_rotate_ccw_label=RoteÈ™te în sens invers acelor de ceasornic +page_rotate_ccw.label=RoteÈ™te în sens invers al acelor de ceasornic +page_rotate_ccw_label=RoteÈ™te în sens invers al acelor de ceasornic -hand_tool_enable.title=Activează instrumentul mână -hand_tool_enable_label=Activează instrumentul mână -hand_tool_disable.title=Dezactivează instrumentul mână -hand_tool_disable_label=Dezactivează instrumentul mână # Document properties dialog box document_properties.title=Proprietățile documentului… document_properties_label=Proprietățile documentului… -document_properties_file_name=Nume fiÈ™ier: -document_properties_file_size=Dimensiune fiÈ™ier: +document_properties_file_name=Numele fiÈ™ierului: +document_properties_file_size=Dimensiunea fiÈ™ierului: # LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" # will be replaced by the PDF file size in kilobytes, respectively in bytes. document_properties_kb={{size_kb}} KB ({{size_b}} byÈ›i) @@ -88,19 +87,25 @@ document_properties_version=Versiune PDF: document_properties_page_count=Număr de pagini: document_properties_close=ÃŽnchide +print_progress_message=Se pregăteÈ™te documentul pentru imprimare… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Renunță + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Comută bara laterală +toggle_sidebar_notification.title=Comută bara laterală (documentul conÈ›ine schiÈ›e/ataÈ™amente) toggle_sidebar_label=Comută bara laterală -outline.title=Arată schiÈ›a documentului -outline_label=Schiță document +document_outline.title=Arată schiÈ›a documentului (dublu-clic pentru a expanda/colapsa toate elementele +document_outline_label=Schiță document attachments.title=AfiÈ™ează ataÈ™amentele attachments_label=AtaÈ™amente thumbs.title=Arată miniaturi thumbs_label=Miniaturi -findbar.title=Caută în document -findbar_label=CăutaÈ›i +findbar.title=GăseÈ™te în document # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -111,10 +116,9 @@ thumb_page_title=Pagina {{page}} thumb_page_canvas=Miniatura paginii {{page}} # Find panel button title and messages -find_label=Caută: find_previous.title=GăseÈ™te instanÈ›a anterioară în frază find_previous_label=Anterior -find_next.title=GăsteÈ™te următoarea instanță în frază +find_next.title=GăseÈ™te instanÈ›a următoare în frază find_next_label=Următor find_highlight=EvidenÈ›iază apariÈ›iile find_match_case_label=PotriveÈ™te literele mari È™i mici @@ -124,7 +128,7 @@ find_not_found=Nu s-a găsit textul # Error panel labels error_more_info=Mai multe informaÈ›ii -error_less_info=Mai puÈ›ină informaÈ›ie +error_less_info=Mai puÈ›ine informaÈ›ii error_close=ÃŽnchide # LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be # replaced by the PDF.JS version and build ID. @@ -144,7 +148,7 @@ rendering_error=A intervenit o eroare la afiÈ™area paginii. # Predefined zoom values page_scale_width=Lățime pagină page_scale_fit=Potrivire la pagină -page_scale_auto=Dimensiune automată +page_scale_auto=Zoom automat page_scale_actual=Dimensiune reală # LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a # numerical scale value. @@ -167,7 +171,7 @@ password_invalid=Parolă greÈ™ită. Vă rugăm să încercaÈ›i din nou. password_ok=Ok password_cancel=Renunță -printing_not_supported=AtenÈ›ie: Tipărirea nu este suportată în totalitate de acest browser. -printing_not_ready=AtenÈ›ie: FiÈ™ierul PDF nu este încărcat complet pentru tipărire. +printing_not_supported=Avertisment: Tipărirea nu este suportată în totalitate de acest browser. +printing_not_ready=Avertisment: FiÈ™ierul PDF nu este încărcat complet pentru tipărire. web_fonts_disabled=Fonturile web sunt dezactivate: nu pot utiliza fonturile PDF încorporate. document_colors_not_allowed=Documentele PDF nu sunt autorizate să folosească propriile culori: 'Permite paginilor să aleagă propriile culori' este dezactivată în browser. diff --git a/vendor/pdfjs/web/locale/ru/viewer.properties b/vendor/pdfjs/web/locale/ru/viewer.properties index c1af976..47a322b 100644 --- a/vendor/pdfjs/web/locale/ru/viewer.properties +++ b/vendor/pdfjs/web/locale/ru/viewer.properties @@ -1,111 +1,184 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. -previous.title = ÐŸÑ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰Ð°Ñ Ñтраница -previous_label = ÐŸÑ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰Ð°Ñ -next.title = Ð¡Ð»ÐµÐ´ÑƒÑŽÑ‰Ð°Ñ Ñтраница -next_label = Ð¡Ð»ÐµÐ´ÑƒÑŽÑ‰Ð°Ñ -page_label = Страница: -page_of = из {{pageCount}} -zoom_out.title = Уменьшить -zoom_out_label = Уменьшить -zoom_in.title = Увеличить -zoom_in_label = Увеличить -zoom.title = МаÑштаб -presentation_mode.title = Перейти в режим презентации -presentation_mode_label = Режим презентации -open_file.title = Открыть файл -open_file_label = Открыть -print.title = Печать -print_label = Печать -download.title = Загрузить -download_label = Загрузить -bookmark.title = СÑылка на текущий вид (Ñкопировать или открыть в новом окне) -bookmark_label = Текущий вид -tools.title = ИнÑтрументы -tools_label = ИнÑтрументы -first_page.title = Перейти на первую Ñтраницу -first_page.label = Перейти на первую Ñтраницу -first_page_label = Перейти на первую Ñтраницу -last_page.title = Перейти на поÑледнюю Ñтраницу -last_page.label = Перейти на поÑледнюю Ñтраницу -last_page_label = Перейти на поÑледнюю Ñтраницу -page_rotate_cw.title = Повернуть по чаÑовой Ñтрелке -page_rotate_cw.label = Повернуть по чаÑовой Ñтрелке -page_rotate_cw_label = Повернуть по чаÑовой Ñтрелке -page_rotate_ccw.title = Повернуть против чаÑовой Ñтрелки -page_rotate_ccw.label = Повернуть против чаÑовой Ñтрелки -page_rotate_ccw_label = Повернуть против чаÑовой Ñтрелки -hand_tool_enable.title = Включить ИнÑтрумент «Рука» -hand_tool_enable_label = Включить ИнÑтрумент «Рука» -hand_tool_disable.title = Отключить ИнÑтрумент «Рука» -hand_tool_disable_label = Отключить ИнÑтрумент «Рука» -document_properties.title = СвойÑтва документа… -document_properties_label = СвойÑтва документа… -document_properties_file_name = Ð˜Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°: -document_properties_file_size = Размер файла: -document_properties_kb = {{size_kb}} КБ ({{size_b}} байт) -document_properties_mb = {{size_mb}} МБ ({{size_b}} байт) -document_properties_title = Заголовок: -document_properties_author = Ðвтор: -document_properties_subject = Тема: -document_properties_keywords = Ключевые Ñлова: -document_properties_creation_date = Дата ÑозданиÑ: -document_properties_modification_date = Дата изменениÑ: -document_properties_date_string = {{date}}, {{time}} -document_properties_creator = Приложение: -document_properties_producer = Производитель PDF: -document_properties_version = ВерÑÐ¸Ñ PDF: -document_properties_page_count = ЧиÑло Ñтраниц: -document_properties_close = Закрыть -toggle_sidebar.title = Открыть/закрыть боковую панель -toggle_sidebar_label = Открыть/закрыть боковую панель -outline.title = Показать Ñодержание документа -outline_label = Содержание документа -attachments.title = Показать Ð²Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ -attachments_label = Ð’Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ -thumbs.title = Показать миниатюры -thumbs_label = Миниатюры -findbar.title = Ðайти в документе -findbar_label = Ðайти -thumb_page_title = Страница {{page}} -thumb_page_canvas = Миниатюра Ñтраницы {{page}} -find_label = Ðайти: -find_previous.title = Ðайти предыдущее вхождение фразы в текÑÑ‚ -find_previous_label = Ðазад -find_next.title = Ðайти Ñледующее вхождение фразы в текÑÑ‚ -find_next_label = Далее -find_highlight = ПодÑветить вÑе -find_match_case_label = С учётом региÑтра -find_reached_top = ДоÑтигнут верх документа, продолжено Ñнизу -find_reached_bottom = ДоÑтигнут конец документа, продолжено Ñверху -find_not_found = Фраза не найдена -error_more_info = Детали -error_less_info = Скрыть детали -error_close = Закрыть -error_version_info = PDF.js v{{version}} (Ñборка: {{build}}) -error_message = Сообщение: {{message}} -error_stack = Стeк: {{stack}} -error_file = Файл: {{file}} -error_line = Строка: {{line}} -rendering_error = При Ñоздании Ñтраницы произошла ошибка. -page_scale_width = По ширине Ñтраницы -page_scale_fit = По размеру Ñтраницы -page_scale_auto = ÐвтоматичеÑки -page_scale_actual = Реальный размер -page_scale_percent = {{scale}}% -loading_error_indicator = Ошибка -loading_error = При загрузке PDF произошла ошибка. -invalid_file_error = Ðекорректный или повреждённый PDF-файл. -missing_file_error = PDF-файл отÑутÑтвует. -unexpected_response_error = Ðеожиданный ответ Ñервера. -text_annotation_type.alt = [ÐÐ½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñ {{type}}] -password_label = Введите пароль, чтобы открыть Ñтот PDF-файл. -password_invalid = Ðеверный пароль. ПожалуйÑта, попробуйте Ñнова. -password_ok = OK -password_cancel = Отмена -printing_not_supported = Предупреждение: Ð’ Ñтом браузере не полноÑтью поддерживаетÑÑ Ð¿ÐµÑ‡Ð°Ñ‚ÑŒ. -printing_not_ready = Предупреждение: PDF не полноÑтью загружен Ð´Ð»Ñ Ð¿ÐµÑ‡Ð°Ñ‚Ð¸. -web_fonts_disabled = Веб-шрифты отключены: невозможно иÑпользовать вÑтроенные PDF-шрифты. -document_colors_not_allowed = PDF-документам не разрешено иÑпользовать Ñвои цвета: в браузере отключён параметр «Разрешить веб-Ñайтам иÑпользовать Ñвои цвета». +# Main toolbar buttons (tooltips and alt text for images) +previous.title=ÐŸÑ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰Ð°Ñ Ñтраница +previous_label=ÐŸÑ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰Ð°Ñ +next.title=Ð¡Ð»ÐµÐ´ÑƒÑŽÑ‰Ð°Ñ Ñтраница +next_label=Ð¡Ð»ÐµÐ´ÑƒÑŽÑ‰Ð°Ñ + +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Страница +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=из {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} из {{pagesCount}}) + +zoom_out.title=Уменьшить +zoom_out_label=Уменьшить +zoom_in.title=Увеличить +zoom_in_label=Увеличить +zoom.title=МаÑштаб +presentation_mode.title=Перейти в режим презентации +presentation_mode_label=Режим презентации +open_file.title=Открыть файл +open_file_label=Открыть +print.title=Печать +print_label=Печать +download.title=Загрузить +download_label=Загрузить +bookmark.title=СÑылка на текущий вид (Ñкопировать или открыть в новом окне) +bookmark_label=Текущий вид + +# Secondary toolbar and context menu +tools.title=ИнÑтрументы +tools_label=ИнÑтрументы +first_page.title=Перейти на первую Ñтраницу +first_page.label=Перейти на первую Ñтраницу +first_page_label=Перейти на первую Ñтраницу +last_page.title=Перейти на поÑледнюю Ñтраницу +last_page.label=Перейти на поÑледнюю Ñтраницу +last_page_label=Перейти на поÑледнюю Ñтраницу +page_rotate_cw.title=Повернуть по чаÑовой Ñтрелке +page_rotate_cw.label=Повернуть по чаÑовой Ñтрелке +page_rotate_cw_label=Повернуть по чаÑовой Ñтрелке +page_rotate_ccw.title=Повернуть против чаÑовой Ñтрелки +page_rotate_ccw.label=Повернуть против чаÑовой Ñтрелки +page_rotate_ccw_label=Повернуть против чаÑовой Ñтрелки + +cursor_text_select_tool.title=Включить ИнÑтрумент «Выделение текÑта» +cursor_text_select_tool_label=ИнÑтрумент «Выделение текÑта» +cursor_hand_tool.title=Включить ИнÑтрумент «Рука» +cursor_hand_tool_label=ИнÑтрумент «Рука» + +# Document properties dialog box +document_properties.title=СвойÑтва документа… +document_properties_label=СвойÑтва документа… +document_properties_file_name=Ð˜Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°: +document_properties_file_size=Размер файла: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} КБ ({{size_b}} байт) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} МБ ({{size_b}} байт) +document_properties_title=Заголовок: +document_properties_author=Ðвтор: +document_properties_subject=Тема: +document_properties_keywords=Ключевые Ñлова: +document_properties_creation_date=Дата ÑозданиÑ: +document_properties_modification_date=Дата изменениÑ: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. +document_properties_date_string={{date}}, {{time}} +document_properties_creator=Приложение: +document_properties_producer=Производитель PDF: +document_properties_version=ВерÑÐ¸Ñ PDF: +document_properties_page_count=ЧиÑло Ñтраниц: +document_properties_close=Закрыть + +print_progress_message=Подготовка документа к печати… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Отмена + +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) +toggle_sidebar.title=Показать/Ñкрыть боковую панель +toggle_sidebar_notification.title=Показать/Ñкрыть боковую панель (документ имеет Ñодержание/вложениÑ) +toggle_sidebar_label=Показать/Ñкрыть боковую панель +document_outline.title=Показать Ñодержание документа (двойной щелчок, чтобы развернуть/Ñвернуть вÑе Ñлементы) +document_outline_label=Содержание документа +attachments.title=Показать Ð²Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ +attachments_label=Ð’Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ +thumbs.title=Показать миниатюры +thumbs_label=Миниатюры +findbar.title=Ðайти в документе +findbar_label=Ðайти + +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. +thumb_page_title=Страница {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. +thumb_page_canvas=Миниатюра Ñтраницы {{page}} + +# Find panel button title and messages +find_input.title=Ðайти +find_input.placeholder=Ðайти в документе… +find_previous.title=Ðайти предыдущее вхождение фразы в текÑÑ‚ +find_previous_label=Ðазад +find_next.title=Ðайти Ñледующее вхождение фразы в текÑÑ‚ +find_next_label=Далее +find_highlight=ПодÑветить вÑе +find_match_case_label=С учётом региÑтра +find_reached_top=ДоÑтигнут верх документа, продолжено Ñнизу +find_reached_bottom=ДоÑтигнут конец документа, продолжено Ñверху +find_not_found=Фраза не найдена + +# Error panel labels +error_more_info=Детали +error_less_info=Скрыть детали +error_close=Закрыть +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. +error_version_info=PDF.js v{{version}} (Ñборка: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. +error_message=Сообщение: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. +error_stack=Стeк: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename +error_file=Файл: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number +error_line=Строка: {{line}} +rendering_error=При Ñоздании Ñтраницы произошла ошибка. + +# Predefined zoom values +page_scale_width=По ширине Ñтраницы +page_scale_fit=По размеру Ñтраницы +page_scale_auto=ÐвтоматичеÑки +page_scale_actual=Реальный размер +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. +page_scale_percent={{scale}}% + +# Loading indicator messages +loading_error_indicator=Ошибка +loading_error=При загрузке PDF произошла ошибка. +invalid_file_error=Ðекорректный или повреждённый PDF-файл. +missing_file_error=PDF-файл отÑутÑтвует. +unexpected_response_error=Ðеожиданный ответ Ñервера. + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" +text_annotation_type.alt=[ÐÐ½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñ {{type}}] +password_label=Введите пароль, чтобы открыть Ñтот PDF-файл. +password_invalid=Ðеверный пароль. ПожалуйÑта, попробуйте Ñнова. +password_ok=OK +password_cancel=Отмена + +printing_not_supported=Предупреждение: Ð’ Ñтом браузере не полноÑтью поддерживаетÑÑ Ð¿ÐµÑ‡Ð°Ñ‚ÑŒ. +printing_not_ready=Предупреждение: PDF не полноÑтью загружен Ð´Ð»Ñ Ð¿ÐµÑ‡Ð°Ñ‚Ð¸. +web_fonts_disabled=Веб-шрифты отключены: невозможно иÑпользовать вÑтроенные PDF-шрифты. +document_colors_not_allowed=PDF-документам не разрешено иÑпользовать Ñвои цвета: в браузере отключён параметр «Разрешить веб-Ñайтам иÑпользовать Ñвои цвета». diff --git a/vendor/pdfjs/web/locale/rw/viewer.properties b/vendor/pdfjs/web/locale/rw/viewer.properties index 7858fe6..68a893d 100644 --- a/vendor/pdfjs/web/locale/rw/viewer.properties +++ b/vendor/pdfjs/web/locale/rw/viewer.properties @@ -14,10 +14,12 @@ # Main toolbar buttons (tooltips and alt text for images) -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom.title=Ihindurangano open_file.title=Gufungura Dosiye @@ -35,10 +37,12 @@ document_properties_title=Umutwe: # LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" # will be replaced by the creation/modification date, and time, of the PDF file. +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) -findbar_label=Gushakisha # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -47,7 +51,6 @@ findbar_label=Gushakisha # number. # Find panel button title and messages -find_label="Gushaka:" find_previous.title=Gushaka aho uyu murongo ugaruka mbere y'aha find_next.title=Gushaka aho uyu murongo wongera kugaruka find_not_found=Umurongo ntubonetse @@ -75,5 +78,4 @@ loading_error_indicator=Ikosa # Some common types are e.g.: "Check", "Text", "Comment", "Note" password_invalid=Ijambo ry'ibanga ridahari. Wakongera ukagerageza password_ok=YEGO -password_cancel=Kureka diff --git a/vendor/pdfjs/web/locale/sah/viewer.properties b/vendor/pdfjs/web/locale/sah/viewer.properties index d0e0861..1786c40 100644 --- a/vendor/pdfjs/web/locale/sah/viewer.properties +++ b/vendor/pdfjs/web/locale/sah/viewer.properties @@ -18,12 +18,12 @@ previous_label=ИннинÑÑҕи next.title=ÐныгыÑкы ÑирÑй next_label=ÐныгыÑкы -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=СирÑй: -page_of=мантан {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom_out.title=Куччат zoom_out_label=Куччат @@ -57,10 +57,6 @@ page_rotate_ccw.title=Чаһы утары Ñргит page_rotate_ccw.label=Чаһы утары Ñргит page_rotate_ccw_label=Чаһы утары Ñргит -hand_tool_enable.title=«Илии» диÑн Ñ‚Ñрили холбоо -hand_tool_enable_label=«Илии» диÑн Ñ‚Ñрили холбоо -hand_tool_disable.title=«Илии» диÑн Ñ‚Ñрили араар -hand_tool_disable_label=«Илии» диÑн Ñ‚Ñрили араар # Document properties dialog box document_properties.title=Докумуон туруоруулара... @@ -87,19 +83,20 @@ document_properties_version=PDF барыла: document_properties_page_count=СирÑй ахÑаана: document_properties_close=Сап +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=ÐžÐ¹Ð¾Ò•Ð¾Ñ Ñ…Ð°Ð¿Ñ‚Ð°Ð»Ñ‹ арый/Ñап toggle_sidebar_label=ÐžÐ¹Ð¾Ò•Ð¾Ñ Ñ…Ð°Ð¿Ñ‚Ð°Ð»Ñ‹ арый/Ñап -outline.title=Дөкүмүөн иһинÑÑҕитин көрдөр -outline_label=Дөкүмүөн иһинÑÑÒ•Ð¸Ñ‚Ñ +document_outline_label=Дөкүмүөн иһинÑÑÒ•Ð¸Ñ‚Ñ attachments.title=Кыбытыктары көрдөр attachments_label=Кыбытык thumbs.title=Ойуучааннары көрдөр thumbs_label=Ойуучааннар findbar.title=ДөкүмүөнтÑн бул -findbar_label=Бул # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -110,7 +107,6 @@ thumb_page_title=СирÑй {{page}} thumb_page_canvas=СирÑй ойуучаана {{page}} # Find panel button title and messages -find_label=Бул: find_previous.title=Ðтии тиÑкиÑÐºÑ Ð±Ñƒ иннинÑÑҕи киириитин бул find_previous_label=ИннинÑÑҕи find_next.title=Ðтии тиÑкиÑÐºÑ Ð±Ñƒ кÑннинÑÑҕи киириитин бул @@ -163,7 +159,6 @@ text_annotation_type.alt=[{{type}} туһунан] password_label=Бу PDF-билÑни арыйарга көмүÑкÑл тылы киллÑриÑÑ…Ñ‚ÑÑхин. password_invalid=Киирии тыл алҕаÑтаах. Бука диÑн, хатылаан көр. password_ok=СӨП -password_cancel=Салҕаама printing_not_supported=СÑÑ€Ñтии: Бу браузер бÑчÑÑттиири толору өйөөбөт. printing_not_ready=СÑÑ€Ñтии: PDF бÑчÑÑÑ‚Ñ‚Ð¸Ð¸Ñ€Ð³Ñ Ñ‚Ð¾Ð»Ð¾Ñ€Ñƒ хачайдана илик. diff --git a/vendor/pdfjs/web/locale/si/viewer.properties b/vendor/pdfjs/web/locale/si/viewer.properties index 80cae85..4137ec1 100644 --- a/vendor/pdfjs/web/locale/si/viewer.properties +++ b/vendor/pdfjs/web/locale/si/viewer.properties @@ -18,12 +18,13 @@ previous_label=පෙර next.title=මීළඟ පිටුව next_label=මීළඟ -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=පිටුව: -page_of={{pageCount}} කින් +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=පිටුව +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom_out.title=කුඩ෠කරන්න zoom_out_label=කුඩ෠කරන්න @@ -57,10 +58,6 @@ page_rotate_ccw.title=à·€à·à¶¸à·à·€à¶»à·Šà¶à·€ භ්â€à¶»à¶¸à¶«à¶º page_rotate_ccw.label=à·€à·à¶¸à·à·€à¶»à·Šà¶à·€ භ්â€à¶»à¶¸à¶«à¶º page_rotate_ccw_label=à·€à·à¶¸à·à·€à¶»à·Šà¶à·€ භ්â€à¶»à¶¸à¶«à¶º -hand_tool_enable.title=හස්චමෙවලම සක්â€à¶»à·“ය -hand_tool_enable_label=හස්චමෙවලම සක්â€à¶»à·“ය -hand_tool_disable.title=හස්චමෙවලම අක්â€à¶»à·“ය -hand_tool_disable_label=හස්චමෙවලම අක්â€à¶»à·“ය # Document properties dialog box document_properties.title=ලේඛන à·€à¶à·Šà¶šà¶¸à·Š... @@ -88,13 +85,16 @@ document_properties_version=PDF නිකුà¶à·”à·€: document_properties_page_count=පිටු ගණන: document_properties_close=වසන්න +print_progress_message=ලේඛනය මුද්â€à¶»à¶«à¶º සඳහ෠සූදà·à¶±à¶¸à·Š කරමින්… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_close=අවලංගු කරන්න + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=පà·à¶à·’ à¶à·“රුවට මà·à¶»à·”වන්න toggle_sidebar_label=පà·à¶à·’ à¶à·“රුවට මà·à¶»à·”වන්න -outline.title=ලේඛනයේ පිට මà·à¶ºà·’ම පෙන්වන්න -outline_label=ලේඛනයේ පිට මà·à¶ºà·’ම attachments.title=ඇමිණුම් පෙන්වන්න attachments_label=ඇමිණුම් thumbs.title=සිඟිà¶à·’ රූ පෙන්වන්න @@ -111,7 +111,6 @@ thumb_page_title=පිටුව {{page}} thumb_page_canvas=පිටුවෙ සිඟිචරූව {{page}} # Find panel button title and messages -find_label=සොයන්න: find_previous.title=මේ à·€à·à¶šà·Šâ€à¶º ඛණ්ඩය මීට පෙර යෙදුණු ස්ථà·à¶±à¶º සොයන්න find_previous_label=පෙර: find_next.title=මේ à·€à·à¶šà·Šâ€à¶º ඛණ්ඩය මීළඟට යෙදෙන ස්ථà·à¶±à¶º සොයන්න @@ -170,4 +169,3 @@ password_cancel=එප෠printing_not_supported=අවවà·à¶¯à¶ºà¶ºà·’: මෙම ගවේà·à¶šà¶º මුද්â€à¶»à¶«à¶º සඳහ෠සම්පූර්ණයෙන් සහය නොදක්වයි. printing_not_ready=අවවà·à¶¯à¶ºà¶ºà·’: මුද්â€à¶»à¶«à¶º සඳහ෠PDF සම්පූර්ණයෙන් පූර්ණය වී නොමà·à¶. web_fonts_disabled=ජà·à¶½ අකුරු අක්â€à¶»à·“යයි: à¶à·’à·…à·à¶½à·’ PDF අකුරු භà·à·€à·’චකළ නොහà·à¶š. -document_colors_disabled=PDF ලේඛනයට ඔවුන්ගේම වර්ණ භà·à·€à·’à¶à¶ºà¶§ ඉඩ නොලà·à¶¶à·š: 'පිටු වෙචඔවුන්ගේම වර්ණ භà·à·€à·’à¶à¶ºà¶§ ඉඩදෙන්න' ගවේà·à¶šà¶º මචඅක්â€à¶»à·“ය කර ඇà¶. diff --git a/vendor/pdfjs/web/locale/sk/viewer.properties b/vendor/pdfjs/web/locale/sk/viewer.properties index a410e56..57a621d 100644 --- a/vendor/pdfjs/web/locale/sk/viewer.properties +++ b/vendor/pdfjs/web/locale/sk/viewer.properties @@ -18,12 +18,15 @@ previous_label=Predchádzajúca next.title=Nasledujúca strana next_label=Nasledujúca -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Strana: -page_of=z {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Strana +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=z {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} z {{pagesCount}}) zoom_out.title=VzdialiÅ¥ zoom_out_label=VzdialiÅ¥ @@ -57,10 +60,10 @@ page_rotate_ccw.title=OtoÄiÅ¥ proti smeru hodinových ruÄiÄiek page_rotate_ccw.label=OtoÄiÅ¥ proti smeru hodinových ruÄiÄiek page_rotate_ccw_label=OtoÄiÅ¥ proti smeru hodinových ruÄiÄiek -hand_tool_enable.title=Zapnúť nástroj Ruka -hand_tool_enable_label=Zapnúť nástroj Ruka -hand_tool_disable.title=Vypnúť nástroj Ruka -hand_tool_disable_label=Vypnúť nástroj Ruka +cursor_text_select_tool.title=PovoliÅ¥ výber textu +cursor_text_select_tool_label=Výber textu +cursor_hand_tool.title=PovoliÅ¥ nástroj ruka +cursor_hand_tool_label=Nástroj ruka # Document properties dialog box document_properties.title=Vlastnosti dokumentu… @@ -88,13 +91,20 @@ document_properties_version=Verzia PDF: document_properties_page_count=PoÄet strán: document_properties_close=ZavrieÅ¥ +print_progress_message=PrÃprava dokumentu na tlaÄ… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=ZruÅ¡iÅ¥ + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Prepnúť boÄný panel +toggle_sidebar_notification.title=Prepnúť boÄný panel (dokument obsahuje osnovu/prÃlohy) toggle_sidebar_label=Prepnúť boÄný panel -outline.title=ZobraziÅ¥ prehľad dokumentu -outline_label=Prehľad dokumentu +document_outline.title=ZobraziÅ¥ prehľad dokumentu (dvojitým kliknutÃm rozbalÃte/zbalÃte vÅ¡etky položky) +document_outline_label=Prehľad dokumentu attachments.title=ZobraziÅ¥ prÃlohy attachments_label=PrÃlohy thumbs.title=ZobraziÅ¥ miniatúry @@ -111,7 +121,8 @@ thumb_page_title=Strana {{page}} thumb_page_canvas=Miniatúra strany {{page}} # Find panel button title and messages -find_label=HľadaÅ¥: +find_input.title=HľadaÅ¥ +find_input.placeholder=HľadaÅ¥ v dokumente… find_previous.title=VyhľadaÅ¥ predchádzajúci výskyt reÅ¥azca find_previous_label=Predchádzajúce find_next.title=VyhľadaÅ¥ ÄalÅ¡Ã výskyt reÅ¥azca @@ -170,4 +181,4 @@ password_cancel=ZruÅ¡iÅ¥ printing_not_supported=Upozornenie: tlaÄ nie je v tomto prehliadaÄi plne podporovaná. printing_not_ready=Upozornenie: súbor PDF nie je plne naÄÃtaný pre tlaÄ. web_fonts_disabled=Webové pÃsma sú vypnuté: nie je možné použiÅ¥ pÃsma vložené do súboru PDF. -document_colors_disabled=Dokumenty PDF nemajú povolené použÃvaÅ¥ vlastné farby, pretože voľba "PovoliÅ¥ stránkam použÃvaÅ¥ vlastné farby" je v nastaveniach prehliadaÄa vypnutá. +document_colors_not_allowed=Dokumenty PDF nemajú povolené použÃvaÅ¥ vlastné farby, pretože voľba "PovoliÅ¥ stránkam použÃvaÅ¥ vlastné farby" je v nastaveniach prehliadaÄa vypnutá. diff --git a/vendor/pdfjs/web/locale/sl/viewer.properties b/vendor/pdfjs/web/locale/sl/viewer.properties index 047c0f9..0000a9b 100644 --- a/vendor/pdfjs/web/locale/sl/viewer.properties +++ b/vendor/pdfjs/web/locale/sl/viewer.properties @@ -18,12 +18,15 @@ previous_label=Nazaj next.title=Naslednja stran next_label=Naprej -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Stran: -page_of=od {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Stran +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=od {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} od {{pagesCount}}) zoom_out.title=PomanjÅ¡aj zoom_out_label=PomanjÅ¡aj @@ -57,10 +60,10 @@ page_rotate_ccw.title=Zavrti v nasprotni smeri urninega kazalca page_rotate_ccw.label=Zavrti v nasprotni smeri urninega kazalca page_rotate_ccw_label=Zavrti v nasprotni smeri urninega kazalca -hand_tool_enable.title=OmogoÄi roko -hand_tool_enable_label=OmogoÄi roko -hand_tool_disable.title=OnemogoÄi roko -hand_tool_disable_label=OnemogoÄi roko +cursor_text_select_tool.title=OmogoÄi orodje za izbor besedila +cursor_text_select_tool_label=Orodje za izbor besedila +cursor_hand_tool.title=OmogoÄi roko +cursor_hand_tool_label=Roka # Document properties dialog box document_properties.title=Lastnosti dokumenta … @@ -88,19 +91,26 @@ document_properties_version=RazliÄica PDF: document_properties_page_count=Å tevilo strani: document_properties_close=Zapri +print_progress_message=Priprava dokumenta na tiskanje … +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}} % +print_progress_close=PrekliÄi + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Preklopi stransko vrstico +toggle_sidebar_notification.title=Preklopi stransko vrstico (dokument vsebuje oris/priponke) toggle_sidebar_label=Preklopi stransko vrstico -outline.title=Prikaži oris dokumenta -outline_label=Oris dokumenta +document_outline.title=Prikaži oris dokumenta (dvokliknite za razÅ¡iritev/strnitev vseh predmetov) +document_outline_label=Oris dokumenta attachments.title=Prikaži priponke attachments_label=Priponke thumbs.title=Prikaži sliÄice thumbs_label=SliÄice findbar.title=Iskanje po dokumentu -findbar_label=Iskanje +findbar_label=Najdi # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -111,7 +121,8 @@ thumb_page_title=Stran {{page}} thumb_page_canvas=SliÄica strani {{page}} # Find panel button title and messages -find_label=Najdi: +find_input.title=Najdi +find_input.placeholder=Najdi v dokumentu … find_previous.title=Najdi prejÅ¡njo ponovitev iskanega find_previous_label=Najdi nazaj find_next.title=Najdi naslednjo ponovitev iskanega @@ -170,4 +181,4 @@ password_cancel=PrekliÄi printing_not_supported=Opozorilo: ta brskalnik ne podpira vseh možnosti tiskanja. printing_not_ready=Opozorilo: PDF ni v celoti naložen za tiskanje. web_fonts_disabled=Spletne pisave so onemogoÄene: vgradnih pisav za PDF ni mogoÄe uporabiti. -document_colors_disabled=Dokumenti PDF ne smejo uporabljati svojih lastnih barv: možnost 'Dovoli stranem uporabo lastnih barv' je v brskalniku onemogoÄena. +document_colors_not_allowed=Dokumenti PDF ne smejo uporabljati svojih lastnih barv: možnost 'Dovoli stranem uporabo lastnih barv' je v brskalniku onemogoÄena. diff --git a/vendor/pdfjs/web/locale/son/viewer.properties b/vendor/pdfjs/web/locale/son/viewer.properties index c7742e4..f5c1b46 100644 --- a/vendor/pdfjs/web/locale/son/viewer.properties +++ b/vendor/pdfjs/web/locale/son/viewer.properties @@ -18,12 +18,15 @@ previous_label=Bisante next.title=Jinehere moo next_label=Jine -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=&Moo: -page_of={{pageCount}} ga +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Moo +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}} ra +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} ka hun {{pagesCount}}) ra zoom_out.title=Nakasandi zoom_out_label=Nakasandi @@ -57,10 +60,6 @@ page_rotate_ccw.title=Kuubi kanbe wowa here page_rotate_ccw.label=Kuubi kanbe wowa here page_rotate_ccw_label=Kuubi kanbe wowa here -hand_tool_enable.title=Kanbe goyjinay tunandi -hand_tool_enable_label=Kanbe goyjinay tunandi -hand_tool_disable.title=Kanbe joyjinay kaa -hand_tool_disable_label=Kanbe goyjinay kaa # Document properties dialog box document_properties.title=Takadda mayrawey… @@ -88,13 +87,20 @@ document_properties_version=PDF dumi: document_properties_page_count=Moo hinna: document_properties_close=Daabu +print_progress_message=Goo ma takaddaa soolu k'a kar se… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=NaÅ‹ + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Kanjari ceraw zuu +toggle_sidebar_notification.title=Kanjari ceraw-zuu (takaddaa goo nda filla-boÅ‹/hangandiyaÅ‹) toggle_sidebar_label=Kanjari ceraw zuu -outline.title=Takadda filla-boÅ‹ cebe -outline_label=Takadda filla-boÅ‹ +document_outline.title=Takaddaa korfur alhaaloo cebe (naagu cee hinka ka haya-izey kul hayandi/kankamandi) +document_outline_label=Takadda filla-boÅ‹ attachments.title=Hangarey cebe attachments_label=Hangarey thumbs.title=Kabeboy biyey cebe @@ -111,7 +117,8 @@ thumb_page_title={{page}} moo thumb_page_canvas=Kabeboy bii {{page}} moo Å¡e # Find panel button title and messages -find_label=Ceeci: +find_input.title=Ceeci +find_input.placeholder=Ceeci takaddaa ra… find_previous.title=KalimaɲaÅ‹oo bangayri bisantaa ceeci find_previous_label=Bisante find_next.title=KalimaɲaÅ‹oo hiino bangayroo ceeci @@ -131,7 +138,7 @@ error_close=Daabu error_version_info=PDF.js v{{version}} (build: {{build}}) # LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an # english string describing the error. -error_message=Alhabar: {{message}} +error_message=Alhabar: {{message}} # LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack # trace. error_stack=Dekeri: {{stack}} @@ -170,4 +177,4 @@ password_cancel=NaÅ‹ printing_not_supported=Yaamar: Karyan Å¡i tee ka timme nda ceecikaa woo. printing_not_ready=Yaamar: PDF Å¡i zunbu ka timme karyan Å¡e. web_fonts_disabled=Interneti Å¡igirawey kay: Å¡i hin ka goy nda PDF Å¡igira hurantey. -document_colors_not_allowed=PDF takaddawey Å¡i duu fondo ka ngey boÅ‹ noonawey zaa: 'NaÅ‹ moɲey ma ngey boÅ‹ noonawey suuba' Å¡i dira ceecikaa ga. +document_colors_not_allowed=PDF takaddawey Å¡i duu fondo ka ngey boÅ‹ noonawey zaa: “NaÅ‹ moɲey ma ngey boÅ‹ noonawey suuba†ši dira ceecikaa ga. diff --git a/vendor/pdfjs/web/locale/sq/viewer.properties b/vendor/pdfjs/web/locale/sq/viewer.properties index 68ab16b..8f5dcbf 100644 --- a/vendor/pdfjs/web/locale/sq/viewer.properties +++ b/vendor/pdfjs/web/locale/sq/viewer.properties @@ -1,6 +1,16 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# Copyright 2012 Mozilla Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Main toolbar buttons (tooltips and alt text for images) previous.title=Faqja e Mëparshme @@ -8,56 +18,59 @@ previous_label=E mëparshmja next.title=Faqja Pasuese next_label=Pasuesja -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Faqja: -page_of=nga {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Faqe +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=nga {{pagesCount}} gjithsej +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} nga {{pagesCount}}) zoom_out.title=Zmadhim zoom_out_label=Zmadhoji zoom_in.title=Zvogëlim zoom_in_label=Zvogëloji zoom.title=Zoom -print.title=Shtypje -print_label=Shtypeni presentation_mode.title=Kalo te Mënyra Paraqitje presentation_mode_label=Mënyra Paraqitje open_file.title=Hapni Kartelë -open_file_label=Hapeni +open_file_label=Hape +print.title=Shtypje +print_label=Shtype download.title=Shkarkim -download_label=Shkarkojeni +download_label=Shkarkoje bookmark.title=Pamja e tanishme (kopjojeni ose hapeni në dritare të re) bookmark_label=Pamja e Tanishme # Secondary toolbar and context menu tools.title=Mjete tools_label=Mjete -first_page.title=Shkoni te Faqja e Parë -first_page.label=Shkoni te Faqja e Parë -first_page_label=Shkoni te Faqja e Parë -last_page.title=Shkoni te Faqja e Fundit -last_page.label=Shkoni te Faqja e Fundit -last_page_label=Shkoni te Faqja e Fundit +first_page.title=Kaloni te Faqja e Parë +first_page.label=Kalo te Faqja e Parë +first_page_label=Kalo te Faqja e Parë +last_page.title=Kaloni te Faqja e Fundit +last_page.label=Kalo te Faqja e Fundit +last_page_label=Kalo te Faqja e Fundit page_rotate_cw.title=Rrotullojeni Në Kahun Orar -page_rotate_cw.label=Rrotullojeni Në Kahun Orar -page_rotate_cw_label=Rrotullojeni Në Kahun Orar +page_rotate_cw.label=Rrotulloje Në Kahun Orar +page_rotate_cw_label=Rrotulloje Në Kahun Orar page_rotate_ccw.title=Rrotullojeni Në Kahun Kundërorar -page_rotate_ccw.label=Rrotullojeni Në Kahun Kundërorar -page_rotate_ccw_label=Rrotullojeni Në Kahun Kundërorar +page_rotate_ccw.label=Rrotulloje Në Kahun Kundërorar +page_rotate_ccw_label=Rrotulloje Në Kahun Kundërorar -hand_tool_enable.title=Aktivizoni mjet dore -hand_tool_enable_label=Aktivizoni mjet dore -hand_tool_disable.title=Çaktivizoni mjet dore -hand_tool_disable_label=Çaktivizoni mjet dore # Document properties dialog box document_properties.title=Veti Dokumenti… document_properties_label=Veti Dokumenti… document_properties_file_name=Emër kartele: document_properties_file_size=Madhësi kartele: +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. document_properties_kb={{size_kb}} KB ({{size_b}} bajte) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. document_properties_mb={{size_mb}} MB ({{size_b}} bajte) document_properties_title=Titull: document_properties_author=Autor: @@ -65,6 +78,8 @@ document_properties_subject=Subjekt: document_properties_keywords=Fjalëkyçe: document_properties_creation_date=Datë Krijimi: document_properties_modification_date=Datë Ndryshimi: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. document_properties_date_string={{date}}, {{time}} document_properties_creator=Krijues: document_properties_producer=Prodhues PDF-je: @@ -72,19 +87,25 @@ document_properties_version=Version PDF-je: document_properties_page_count=Numër Faqesh: document_properties_close=Mbylle +print_progress_message=Po përgatitet dokumenti për shtypje… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Anuloje # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Shfaqni/Fshihni Anështyllën -toggle_sidebar_label=Shfaqni/Fshihni Anështyllën -outline.title=Shfaq Përvijim Dokumenti -outline_label=Shfaq Përvijim Dokumenti -attachments.title=Shfaq Bashkëngjitje +toggle_sidebar_notification.title=Shfaqni Anështyllën (dokumenti përmban përvijim/bashkëngjitje) +toggle_sidebar_label=Shfaq/Fshih Anështyllën +document_outline.title=Shfaqni Përvijim Dokumenti (dyklikoni që të shfaqen/fshihen krejt elementët) +document_outline_label=Përvijim Dokumenti +attachments.title=Shfaqni Bashkëngjitje attachments_label=Bashkëngjitje -thumbs.title=Shfaq Miniatura +thumbs.title=Shfaqni Miniatura thumbs_label=Miniatura -findbar.title=Gjej në Dokument +findbar.title=Gjeni në Dokument findbar_label=Gjej # Thumbnails panel item (tooltip and alt text for images) @@ -95,23 +116,18 @@ thumb_page_title=Faqja {{page}} # number. thumb_page_canvas=Miniaturë e Faqes {{page}} -# Context menu -first_page.label=Kalo te Faqja e Parë -last_page.label=Kalo te Faqja e Fundit -page_rotate_cw.label=Rrotulloje Në Kahun Orar -page_rotate_ccw.label=Rrotulloje Në Kahun Antiorar - # Find panel button title and messages -find_label=Gjej: +find_input.title=Gjeje +find_input.placeholder=Gjeni në dokument… find_previous.title=Gjeni hasjen e mëparshme të togfjalëshit find_previous_label=E mëparshmja find_next.title=Gjeni hasjen pasuese të togfjalëshit find_next_label=Pasuesja -find_highlight=Theksoji të gjitha +find_highlight=Theksoji të tëra find_match_case_label=Siç është shkruar find_reached_top=U mbërrit në krye të dokumentit, vazhduar prej fundit find_reached_bottom=U mbërrit në fund të dokumentit, vazhduar prej kreut -find_not_found=Nuk u gjet togfjalëshi +find_not_found=Togfjalësh që s’gjendet # Error panel labels error_more_info=Më Tepër të Dhëna @@ -142,7 +158,6 @@ page_scale_actual=Madhësia Faktike page_scale_percent={{scale}}% # Loading indicator messages -# LOCALIZATION NOTE (error_line): "{{[percent}}" will be replaced with a percentage loading_error_indicator=Gabim loading_error=Ndodhi një gabim gjatë ngarkimit të PDF-së. invalid_file_error=Kartelë PDF e pavlefshme ose e dëmtuar. @@ -159,7 +174,7 @@ password_invalid=Fjalëkalim i pavlefshëm. Ju lutemi, riprovoni. password_ok=OK password_cancel=Anuloje -printing_not_supported=Kujdes: Shtypja nuk mbulohet plotësisht nga ky shfletues. -printing_not_ready=Kujdes: PDF-ja nuk është ngarkuar plotësisht që ta shtypni. -web_fonts_disabled=Shkronjat Web janë të çaktivizuara: i pazoti të përdorë shkronja të trupëzuara në PDF. -document_colors_disabled=Dokumenteve PDF nuk u është lejuar të përdorin ngjyrat e veta: 'Lejoji faqet t'i zgjedhin vetë ngjyrat', te shfletuesi, është e çaktivizuar. +printing_not_supported=Kujdes: Shtypja s’mbulohet plotësisht nga ky shfletues. +printing_not_ready=Kujdes: PDF-ja s’është ngarkuar plotësisht që ta shtypni. +web_fonts_disabled=Shkronjat Web janë të çaktivizuara: s’arrihet të përdoren shkronja të trupëzuara në PDF. +document_colors_not_allowed=Dokumenteve PDF s’u lejohet të përdorin ngjyrat e tyre: 'Lejoji faqet t’i zgjedhin vetë ngjyrat' është e çaktivizuar te shfletuesi. diff --git a/vendor/pdfjs/web/locale/sr/viewer.properties b/vendor/pdfjs/web/locale/sr/viewer.properties index 185496b..754d9c4 100644 --- a/vendor/pdfjs/web/locale/sr/viewer.properties +++ b/vendor/pdfjs/web/locale/sr/viewer.properties @@ -18,18 +18,21 @@ previous_label=Претходна next.title=Следећа Ñтраница next_label=Следећа -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Страница: -page_of=од {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Страница +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=од {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} од {{pagesCount}}) zoom_out.title=Умањи zoom_out_label=Умањи zoom_in.title=Увеличај zoom_in_label=Увеличај -zoom.title=Зумирање +zoom.title=Увеличавање presentation_mode.title=Промени на приказ у режиму презентације presentation_mode_label=Режим презентације open_file.title=Отвори датотеку @@ -57,10 +60,10 @@ page_rotate_ccw.title=Ротирај у Ñмеру Ñупротном од каРpage_rotate_ccw.label=Ротирај у Ñмеру Ñупротном од казаљке на Ñату page_rotate_ccw_label=Ротирај у Ñмеру Ñупротном од казаљке на Ñату -hand_tool_enable.title=Омогући алатку за померање -hand_tool_enable_label=Омогући алатку за померање -hand_tool_disable.title=Онемогући алатку за померање -hand_tool_disable_label=Онемогући алатку за померање +cursor_text_select_tool.title=Омогући алат за Ñелектовање текÑта +cursor_text_select_tool_label=Ðлат за Ñелектовање текÑта +cursor_hand_tool.title=Омогући алат за померање +cursor_hand_tool_label=Ðлат за померање # Document properties dialog box document_properties.title=Параметри документа… @@ -88,13 +91,20 @@ document_properties_version=PDF верзија: document_properties_page_count=Број Ñтраница: document_properties_close=Затвори +print_progress_message=Припремам документ за штампање… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Откажи + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Прикажи додатну палету +toggle_sidebar_notification.title=Прикажи додатну траку (докуменат Ñадржи оквире/прилоге) toggle_sidebar_label=Прикажи додатну палету -outline.title=Прикажи контуру документа -outline_label=Контура документа +document_outline.title=Прикажи контуру документа (дупли клик за проширење/Ñкупљање елемената) +document_outline_label=Контура документа attachments.title=Прикажи прилоге attachments_label=Прилози thumbs.title=Прикажи Ñличице @@ -111,7 +121,8 @@ thumb_page_title=Страница {{page}} thumb_page_canvas=Сличица од Ñтранице {{page}} # Find panel button title and messages -find_label=Пронађи: +find_input.title=Пронађи +find_input.placeholder=Пронађи у документу… find_previous.title=Пронађи претходну појаву фразе find_previous_label=Претходна find_next.title=Пронађи Ñледећу појаву фразе @@ -143,7 +154,7 @@ rendering_error=Дошло је до грешке приликом рендерР# Predefined zoom values page_scale_width=Ширина Ñтранице -page_scale_fit=Уклапање Ñтранице +page_scale_fit=Прилагоди Ñтраницу page_scale_auto=ÐутоматÑко увеличавање page_scale_actual=Стварна величина # LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a diff --git a/vendor/pdfjs/web/locale/sv-SE/viewer.properties b/vendor/pdfjs/web/locale/sv-SE/viewer.properties index 97be61d..412b765 100644 --- a/vendor/pdfjs/web/locale/sv-SE/viewer.properties +++ b/vendor/pdfjs/web/locale/sv-SE/viewer.properties @@ -18,12 +18,15 @@ previous_label=FöregÃ¥ende next.title=Nästa sida next_label=Nästa -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Sida: -page_of=av {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Sida +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=av {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} av {{pagesCount}}) zoom_out.title=Zooma ut zoom_out_label=Zooma ut @@ -57,10 +60,10 @@ page_rotate_ccw.title=Rotera moturs page_rotate_ccw.label=Rotera moturs page_rotate_ccw_label=Rotera moturs -hand_tool_enable.title=Aktivera handverktyg -hand_tool_enable_label=Aktivera handverktyg -hand_tool_disable.title=Inaktivera handverktyg -hand_tool_disable_label=Inaktivera handverktyg +cursor_text_select_tool.title=Aktivera textmarkeringsverktyg +cursor_text_select_tool_label=Textmarkeringsverktyg +cursor_hand_tool.title=Aktivera handverktyg +cursor_hand_tool_label=Handverktyg # Document properties dialog box document_properties.title=Dokumentegenskaper… @@ -88,13 +91,20 @@ document_properties_version=PDF-version: document_properties_page_count=Sidantal: document_properties_close=Stäng +print_progress_message=Förbereder sidor för utskrift… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Avbryt + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Visa/dölj sidofält +toggle_sidebar_notification.title=Visa/dölj sidofält (dokument innehÃ¥ller översikt/bilagor) toggle_sidebar_label=Visa/dölj sidofält -outline.title=Visa dokumentöversikt -outline_label=Dokumentöversikt +document_outline.title=Visa dokumentdisposition (dubbelklicka för att expandera/komprimera alla objekt) +document_outline_label=Dokumentöversikt attachments.title=Visa Bilagor attachments_label=Bilagor thumbs.title=Visa miniatyrer @@ -111,7 +121,8 @@ thumb_page_title=Sida {{page}} thumb_page_canvas=Miniatyr av sida {{page}} # Find panel button title and messages -find_label=Sök: +find_input.title=Sök +find_input.placeholder=Sök i dokument… find_previous.title=Hitta föregÃ¥ende förekomst av frasen find_previous_label=FöregÃ¥ende find_next.title=Hitta nästa förekomst av frasen @@ -170,4 +181,4 @@ password_cancel=Avbryt printing_not_supported=Varning: Utskrifter stöds inte helt av den här webbläsaren. printing_not_ready=Varning: PDF:en är inte klar för utskrift. web_fonts_disabled=Webbtypsnitt är inaktiverade: kan inte använda inbäddade PDF-typsnitt. -document_colors_not_allowed=PDF-dokument tillÃ¥ts inte använda egna färger: 'LÃ¥t sidor använda egna färger' är inaktiverat i webbläsaren. +document_colors_not_allowed=PDF-dokument tillÃ¥ts inte använda egna färger: “LÃ¥t sidor använda egna färger†är inaktiverat i webbläsaren. diff --git a/vendor/pdfjs/web/locale/sw/viewer.properties b/vendor/pdfjs/web/locale/sw/viewer.properties index 7f0f1b8..9ec4e21 100644 --- a/vendor/pdfjs/web/locale/sw/viewer.properties +++ b/vendor/pdfjs/web/locale/sw/viewer.properties @@ -18,12 +18,12 @@ previous_label=Iliyotangulia next.title=Ukurasa Ufuatao next_label=Ifuatayo -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Ukurasa: -page_of=ya {{Hesabu ya ukurasa}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom_out.title=Kuza Nje zoom_out_label=Kuza Nje @@ -53,17 +53,18 @@ document_properties_title=Kichwa: # LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" # will be replaced by the creation/modification date, and time, of the PDF file. +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Kibiano cha Upau wa Kando toggle_sidebar_label=Kibiano cha Upau wa Kando -outline.title=Onyesha Ufupisho wa Waraka -outline_label=Ufupisho wa Waraka +document_outline_label=Ufupisho wa Waraka thumbs.title=Onyesha Kijipicha thumbs_label=Vijipicha findbar.title=Pata katika Waraka -findbar_label=Tafuta # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -74,7 +75,6 @@ thumb_page_title=Ukurasa {{ukurasa}} thumb_page_canvas=Kijipicha cha ukurasa {{ukurasa}} # Find panel button title and messages -find_label=Tafuta: find_previous.title=Tafuta tukio kabla ya msemo huu find_previous_label=Iliyotangulia find_next.title=Tafuta tukio linalofuata la msemo @@ -123,7 +123,6 @@ missing_file_error=Faili ya PDF isiyopo. # Some common types are e.g.: "Check", "Text", "Comment", "Note" text_annotation_type.alt=[{{type}} Ufafanuzi] password_ok=SAWA -password_cancel=Ghairi printing_not_supported=Onyo: Uchapishaji hauauniwi kabisa kwa kivinjari hiki. web_fonts_disabled=Fonti za tovuti zimelemazwa: haziwezi kutumia fonti za PDF zilizopachikwa. diff --git a/vendor/pdfjs/web/locale/ta-LK/viewer.properties b/vendor/pdfjs/web/locale/ta-LK/viewer.properties index 178b619..f0b1f43 100644 --- a/vendor/pdfjs/web/locale/ta-LK/viewer.properties +++ b/vendor/pdfjs/web/locale/ta-LK/viewer.properties @@ -14,10 +14,12 @@ # Main toolbar buttons (tooltips and alt text for images) -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom.title=அளவ௠open_file.title=கோபà¯à®ªà®¿à®©à¯ˆà®¤à¯ திறகà¯à®• @@ -34,6 +36,9 @@ open_file_label=திறகà¯à®• # LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" # will be replaced by the creation/modification date, and time, of the PDF file. +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) diff --git a/vendor/pdfjs/web/locale/ta/viewer.properties b/vendor/pdfjs/web/locale/ta/viewer.properties index b0d40f1..2e216ea 100644 --- a/vendor/pdfjs/web/locale/ta/viewer.properties +++ b/vendor/pdfjs/web/locale/ta/viewer.properties @@ -18,12 +18,15 @@ previous_label=à®®à¯à®¨à¯à®¤à¯ˆà®¯à®¤à¯ next.title=அடà¯à®¤à¯à®¤ பகà¯à®•à®®à¯ next_label=அடà¯à®¤à¯à®¤à¯ -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=பகà¯à®•à®®à¯: -page_of=இல௠{{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=பகà¯à®•à®®à¯ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}} இல௠+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages={{pagesCount}}) இல௠({{pageNumber}} zoom_out.title=சிறிதாகà¯à®•à¯ zoom_out_label=சிறிதாகà¯à®•à¯ @@ -57,10 +60,10 @@ page_rotate_ccw.title=இடஞà¯à®šà¯à®´à®¿à®¯à®¾à®• சà¯à®´à®±à¯à®±à¯ page_rotate_ccw.label=இடஞà¯à®šà¯à®´à®¿à®¯à®¾à®• சà¯à®´à®±à¯à®±à¯ page_rotate_ccw_label=இடஞà¯à®šà¯à®´à®¿à®¯à®¾à®• சà¯à®´à®±à¯à®±à¯ -hand_tool_enable.title=கை கரà¯à®µà®¿à®¯à¯ˆ செயலாகà¯à®•à¯ -hand_tool_enable_label=கை கரà¯à®µà®¿à®¯à¯ˆ செயலாகà¯à®•à¯ -hand_tool_disable.title=கை கரà¯à®µà®¿à®¯à¯ˆ à®®à¯à®Ÿà®•à¯à®•à¯ -hand_tool_disable_label=கை கரà¯à®µà®¿à®¯à¯ˆ à®®à¯à®Ÿà®•à¯à®•à¯ +cursor_text_select_tool.title=உரைத௠தெரிவ௠கரà¯à®µà®¿à®¯à¯ˆà®šà¯ செயலà¯à®ªà®Ÿà¯à®¤à¯à®¤à¯ +cursor_text_select_tool_label=உரைத௠தெரிவ௠கரà¯à®µà®¿ +cursor_hand_tool.title=கைக௠கரà¯à®µà®¿à®•à¯à®šà¯ செயறà¯à®ªà®Ÿà¯à®¤à¯à®¤à¯ +cursor_hand_tool_label=கைகà¯à®•à¯à®°à¯à®µà®¿ # Document properties dialog box document_properties.title=ஆவண பணà¯à®ªà¯à®•à®³à¯... @@ -88,19 +91,26 @@ document_properties_version=PDF பதிபà¯à®ªà¯: document_properties_page_count=பகà¯à®• எணà¯à®£à®¿à®•à¯à®•à¯ˆ: document_properties_close=மூடà¯à®• +print_progress_message=அசà¯à®šà®¿à®Ÿà¯à®µà®¤à®±à¯à®•à®¾à®© ஆவணம௠தயாராகிறதà¯... +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=ரதà¯à®¤à¯ + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=பகà¯à®•à®ªà¯ படà¯à®Ÿà®¿à®¯à¯ˆ நிலைமாறà¯à®±à¯ +toggle_sidebar_notification.title=பகà¯à®•à®ªà¯à®ªà®Ÿà¯à®Ÿà¯ˆà®¯à¯ˆ நிலைமாறà¯à®±à¯ (வெளிகà¯à®•à¯‹à®Ÿà¯/இணைபà¯à®ªà¯à®•à®³à¯ˆ ஆவணம௠கொணà¯à®Ÿà¯à®³à¯à®³à®¤à¯) toggle_sidebar_label=பகà¯à®•à®ªà¯ படà¯à®Ÿà®¿à®¯à¯ˆ நிலைமாறà¯à®±à¯ -outline.title=ஆவண வெளிவரையைக௠காணà¯à®ªà®¿ -outline_label=ஆவண வெளிவரை +document_outline.title=ஆவண அடகà¯à®•à®¤à¯à®¤à¯ˆà®•à¯ காடà¯à®Ÿà¯ (இரà¯à®®à¯à®±à¯ˆà®šà¯ சொடà¯à®•à¯à®•à®¿ அனைதà¯à®¤à¯ உறà¯à®ªà¯à®ªà®¿à®Ÿà®¿à®•à®³à¯ˆà®¯à¯à®®à¯ விரி/சேரà¯) +document_outline_label=ஆவண வெளிவரை attachments.title=இணைபà¯à®ªà¯à®•à®³à¯ˆ காணà¯à®ªà®¿ attachments_label=இணைபà¯à®ªà¯à®•à®³à¯ thumbs.title=சிறà¯à®ªà®Ÿà®™à¯à®•à®³à¯ˆà®•à¯ காணà¯à®ªà®¿ thumbs_label=சிறà¯à®ªà®Ÿà®™à¯à®•à®³à¯ findbar.title=ஆவணதà¯à®¤à®¿à®²à¯ கணà¯à®Ÿà®±à®¿ -findbar_label=கணà¯à®Ÿà¯à®ªà®¿à®Ÿà®¿ +findbar_label=தேட௠# Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -111,7 +121,8 @@ thumb_page_title=பகà¯à®•à®®à¯ {{page}} thumb_page_canvas=பகà¯à®•à®¤à¯à®¤à®¿à®©à¯ சிறà¯à®ªà®Ÿà®®à¯ {{page}} # Find panel button title and messages -find_label=கணà¯à®Ÿà®±à®¿: +find_input.title=கணà¯à®Ÿà¯à®ªà®¿à®Ÿà®¿ +find_input.placeholder=ஆவணதà¯à®¤à®¿à®²à¯ கணà¯à®Ÿà®±à®¿â€¦ find_previous.title=இநà¯à®¤ சொறà¯à®±à¯Šà®Ÿà®°à®¿à®©à¯ à®®à¯à®¨à¯à®¤à¯ˆà®¯ நிகழà¯à®µà¯ˆ தேட௠find_previous_label=à®®à¯à®¨à¯à®¤à¯ˆà®¯à®¤à¯ find_next.title=இநà¯à®¤ சொறà¯à®±à¯Šà®Ÿà®°à®¿à®©à¯ அடà¯à®¤à¯à®¤ நிகழà¯à®µà¯ˆ தேட௠@@ -165,9 +176,9 @@ text_annotation_type.alt=[{{type}} விளகà¯à®•à®®à¯] password_label=இநà¯à®¤ PDF கோபà¯à®ªà¯ˆ திறகà¯à®• கடவà¯à®šà¯à®šà¯†à®¾à®²à¯à®²à¯ˆ உளà¯à®³à®¿à®Ÿà®µà¯à®®à¯. password_invalid=செலà¯à®²à¯à®ªà®Ÿà®¿à®¯à®¾à®•à®¾à®¤ கடவà¯à®šà¯à®šà¯Šà®²à¯, தயை செயà¯à®¤à¯ மீணà¯à®Ÿà¯à®®à¯ à®®à¯à®¯à®±à¯à®šà®¿ செயà¯à®•. password_ok=சரி -password_cancel=இரதà¯à®¤à¯ +password_cancel=ரதà¯à®¤à¯ printing_not_supported=எசà¯à®šà®°à®¿à®•à¯à®•à¯ˆ: இநà¯à®¤ உலாவி அசà¯à®šà®¿à®Ÿà¯à®¤à®²à¯ˆ à®®à¯à®´à¯à®®à¯ˆà®¯à®¾à®• ஆதரிகà¯à®•à®µà®¿à®²à¯à®²à¯ˆ. printing_not_ready=எசà¯à®šà®°à®¿à®•à¯à®•à¯ˆ: PDF அசà¯à®šà®¿à®Ÿ à®®à¯à®´à¯à®µà®¤à¯à®®à®¾à®• à®à®±à¯à®±à®ªà¯à®ªà®Ÿà®µà®¿à®²à¯à®²à¯ˆ. web_fonts_disabled=வலை எழà¯à®¤à¯à®¤à¯à®°à¯à®•à¯à®•à®³à¯ à®®à¯à®Ÿà®•à¯à®•à®ªà¯à®ªà®Ÿà¯à®Ÿà¯à®³à¯à®³à®©: உடà¯à®ªà¯Šà®¤à®¿à®•à¯à®•à®ªà¯à®ªà®Ÿà¯à®Ÿ PDF எழà¯à®¤à¯à®¤à¯à®°à¯à®•à¯à®•à®³à¯ˆà®ªà¯ பயனà¯à®ªà®Ÿà¯à®¤à¯à®¤ à®®à¯à®Ÿà®¿à®¯à®µà®¿à®²à¯à®²à¯ˆ. -document_colors_not_allowed=PDF ஆவணஙà¯à®•à®³à¯à®•à¯à®•à¯ அவறà¯à®±à®¿à®©à¯ சொநà¯à®¤ நிறஙà¯à®•à®³à¯ˆà®ªà¯ பயனà¯à®ªà®Ÿà¯à®¤à¯à®¤ அனà¯à®®à®¤à®¿à®¯à®¿à®²à¯à®²à¯ˆ: உலாவியில௠'பகà¯à®•à®™à¯à®•à®³à¯ தஙà¯à®•à®³à¯ சொநà¯à®¤ நிறஙà¯à®•à®³à¯ˆà®¤à¯ தேரà¯à®µà¯ செயà¯à®¤à¯à®•à¯Šà®³à¯à®³ அனà¯à®®à®¤à®¿' எனà¯à®©à¯à®®à¯ விரà¯à®ªà¯à®ªà®®à¯ à®®à¯à®Ÿà®•à¯à®•à®ªà¯à®ªà®Ÿà¯à®Ÿà¯à®³à¯à®³à®¤à¯. +document_colors_not_allowed=PDF ஆவணஙà¯à®•à®³à¯à®•à¯à®•à¯à®šà¯ சொநà¯à®¤ நிறஙà¯à®•à®³à¯ˆà®ªà¯ பயனà¯à®ªà®Ÿà¯à®¤à¯à®¤ அனà¯à®®à®¤à®¿à®¯à®¿à®²à¯à®²à¯ˆ: உலாவியில௠"பகà¯à®•à®™à¯à®•à®³à¯ தஙà¯à®•à®³à¯ சொநà¯à®¤ நிறஙà¯à®•à®³à¯ˆà®¤à¯ தேரà¯à®µà¯ செயà¯à®¤à¯à®•à¯Šà®³à¯à®³ அனà¯à®®à®¤à®¿" எனà¯à®©à¯à®®à¯ விரà¯à®ªà¯à®ªà®®à¯ à®®à¯à®Ÿà®•à¯à®•à®ªà¯à®ªà®Ÿà¯à®Ÿà¯à®³à¯à®³à®¤à¯. diff --git a/vendor/pdfjs/web/locale/te/viewer.properties b/vendor/pdfjs/web/locale/te/viewer.properties index e08d5e7..10d8fa8 100644 --- a/vendor/pdfjs/web/locale/te/viewer.properties +++ b/vendor/pdfjs/web/locale/te/viewer.properties @@ -13,17 +13,20 @@ # limitations under the License. # Main toolbar buttons (tooltips and alt text for images) -previous.title=à°•à±à°°à°¿à°¤à°‚ పేజీ +previous.title=à°®à±à°¨à±à°ªà°Ÿà°¿ పేజీ previous_label=à°•à±à°°à°¿à°¤à°‚ next.title=తరà±à°µà°¾à°¤ పేజీ next_label=తరà±à°µà°¾à°¤ -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=పేజీ: -page_of=మొతà±à°¤à°‚ {{pageCount}} లో +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=పేజీ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=మొతà±à°¤à°‚ {{pageCount}} లో +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=(మొతà±à°¤à°‚ {{pagesCount}} లో {{pageNumber}}వది) zoom_out.title=జూమౠతగà±à°—à°¿à°‚à°šà± zoom_out_label=జూమౠతగà±à°—à°¿à°‚à°šà± @@ -36,9 +39,9 @@ open_file.title=ఫైలౠతెరà±à°µà± open_file_label=తెరà±à°µà± print.title=à°®à±à°¦à±à°°à°¿à°‚à°šà± print_label=à°®à±à°¦à±à°°à°¿à°‚à°šà± -download.title=డౌనà±à°²à±‹à°¡à± -download_label=డౌనà±à°²à±‹à°¡à± -bookmark.title=à°ªà±à°°à°¸à±à°¤à±à°¤ దరà±à°¶à°¨à°‚ (నకలà±à°¤à±€à°¯à°¿ లేదా కొతà±à°¤ విండోనందౠతెరà±à°µà±à°®à±) +download.title=దింపà±à°•à±‹à°³à±à°³à± +download_label=దింపà±à°•à±‹à°³à±à°³à± +bookmark.title=à°ªà±à°°à°¸à±à°¤à±à°¤ దరà±à°¶à°¨à°‚ (కాపీ చేయి లేదా కొతà±à°¤ విండోలో తెరà±à°µà±) bookmark_label=à°ªà±à°°à°¸à±à°¤à±à°¤ దరà±à°¶à°¨à°‚ # Secondary toolbar and context menu @@ -50,17 +53,17 @@ first_page_label=మొదటి పేజీకి వెళà±à°³à± last_page.title=చివరి పేజీకి వెళà±à°³à± last_page.label=చివరి పేజీకి వెళà±à°³à± last_page_label=చివరి పేజీకి వెళà±à°³à± -page_rotate_cw.title=సవà±à°¯à°¦à°¿à°¶à°²à±‹ తిపà±à°ªà±à°®à± -page_rotate_cw.label=సవà±à°¯à°¦à°¿à°¶à°²à±‹ తిపà±à°ªà±à°®à± -page_rotate_cw_label=సవà±à°¯à°¦à°¿à°¶à°²à±‹ తిపà±à°ªà±à°®à± -page_rotate_ccw.title=అపసవà±à°¯à°¦à°¿à°¶à°²à±‹ తిపà±à°ªà±à°®à± -page_rotate_ccw.label=అపసవà±à°¯à°¦à°¿à°¶à°²à±‹ తిపà±à°ªà±à°®à± -page_rotate_ccw_label=అపసవà±à°¯à°¦à°¿à°¶à°²à±‹ తిపà±à°ªà±à°®à± +page_rotate_cw.title=సవà±à°¯à°¦à°¿à°¶à°²à±‹ తిపà±à°ªà± +page_rotate_cw.label=సవà±à°¯à°¦à°¿à°¶à°²à±‹ తిపà±à°ªà± +page_rotate_cw_label=సవà±à°¯à°¦à°¿à°¶à°²à±‹ తిపà±à°ªà± +page_rotate_ccw.title=అపసవà±à°¯à°¦à°¿à°¶à°²à±‹ తిపà±à°ªà± +page_rotate_ccw.label=అపసవà±à°¯à°¦à°¿à°¶à°²à±‹ తిపà±à°ªà± +page_rotate_ccw_label=అపసవà±à°¯à°¦à°¿à°¶à°²à±‹ తిపà±à°ªà± -hand_tool_enable.title=చేతి సాధనం చేతనించౠ-hand_tool_enable_label=చేతి సాధనం చేతనించౠ-hand_tool_disable.title=చేతి సాధనం అచేతనించౠ-hand_tool_disable_label=చేతి సాధనం అచేతనించౠ+cursor_text_select_tool.title=టెకà±à°¸à±à°Ÿà± ఎంపిక సాధనానà±à°¨à°¿ à°ªà±à°°à°¾à°°à°‚à°à°¿à°‚à°šà°‚à°¡à°¿ +cursor_text_select_tool_label=టెకà±à°¸à±à°Ÿà± ఎంపిక సాధనం +cursor_hand_tool.title=చేతి సాధనం చేతనించౠ+cursor_hand_tool_label=చేతి సాధనం # Document properties dialog box document_properties.title=పతà±à°°à°®à± లకà±à°·à°£à°¾à°²à±... @@ -76,7 +79,7 @@ document_properties_mb={{size_mb}} MB ({{size_b}} bytes) document_properties_title=శీరà±à°·à°¿à°•: document_properties_author=మూలకరà±à°¤: document_properties_subject=విషయం: -document_properties_keywords=కీపదాలà±: +document_properties_keywords=à°•à±€ పదాలà±: document_properties_creation_date=సృషà±à°Ÿà°¿à°‚à°šà°¿à°¨ తేదీ: document_properties_modification_date=సవరించిన తేదీ: # LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" @@ -88,18 +91,24 @@ document_properties_version=PDF వరà±à°·à°¨à±: document_properties_page_count=పేజీల సంఖà±à°¯: document_properties_close=మూసివేయి +print_progress_message=à°®à±à°¦à±à°°à°¿à°‚చడానికి పతà±à°°à°®à± సిదà±à°§à°®à°µà±à°¤à±à°¨à±à°¨à°¦à°¿â€¦ +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=à°°à°¦à±à°¦à±à°šà±‡à°¯à°¿ + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=పకà±à°•à°ªà°Ÿà±à°Ÿà±€ మారà±à°šà± toggle_sidebar_label=పకà±à°•à°ªà°Ÿà±à°Ÿà±€ మారà±à°šà± -outline.title=పతà±à°°à°®à± à°…à°µà±à°Ÿà±â€Œà°²à±ˆà°¨à± చూపౠ-outline_label=పతà±à°°à°®à± à°…à°µà±à°Ÿà±â€Œà°²à±ˆà°¨à± +document_outline.title=పతà±à°°à°®à± రూపమౠచూపించౠ(à°¡à°¬à±à°²à± à°•à±à°²à°¿à°•à± చేసి à°…à°¨à±à°¨à°¿ అంశాలనౠవిసà±à°¤à°°à°¿à°‚à°šà±/కూలà±à°šà±) +document_outline_label=పతà±à°°à°®à± à°…à°µà±à°Ÿà±â€Œà°²à±ˆà°¨à± attachments.title=à°…à°¨à±à°¬à°‚ధాలౠచూపౠattachments_label=à°…à°¨à±à°¬à°‚ధాలౠthumbs.title=థంబà±â€Œà°¨à±ˆà°²à±à°¸à± చూపౠthumbs_label=థంబà±â€Œà°¨à±ˆà°²à±à°¸à± -findbar.title=à°ˆ పతà±à°°à°®à±à°¨à°‚దౠకనà±à°—ొనà±à°®à± +findbar.title=పతà±à°°à°®à±à°²à±‹ à°•à°¨à±à°—ొనà±à°®à± findbar_label=à°•à°¨à±à°—ొనౠ# Thumbnails panel item (tooltip and alt text for images) @@ -111,13 +120,14 @@ thumb_page_title=పేజీ {{page}} thumb_page_canvas=పేజీ {{page}} యొకà±à°• థంబà±â€Œà°¨à±ˆà°²à± # Find panel button title and messages -find_label=à°•à°¨à±à°—ొనà±: -find_previous.title=పదంయొకà±à°• à°®à±à°‚దలి సంà°à°µà°¾à°¨à±à°¨à°¿ à°•à°¨à±à°—ొనౠ+find_input.title=à°•à°¨à±à°—ొనౠ+find_input.placeholder=పతà±à°°à°®à±à°²à±‹ à°•à°¨à±à°—ొనà±â€¦ +find_previous.title=పదం యొకà±à°• à°®à±à°‚దౠసంà°à°µà°¾à°¨à±à°¨à°¿ à°•à°¨à±à°—ొనౠfind_previous_label=à°®à±à°¨à±à°ªà°Ÿà°¿ -find_next.title=పదం యొకà±à°• తరà±à°µà°¾à°¤à°¿ సంà°à°µà°¾à°¨à±à°¨à°¿ à°•à°¨à±à°—ొనౠ+find_next.title=పదం యొకà±à°• తరà±à°µà°¾à°¤à°¿ సంà°à°µà°¾à°¨à±à°¨à°¿ à°•à°¨à±à°—ొనౠfind_next_label=తరà±à°µà°¾à°¤ -find_highlight=à°…à°¨à±à°¨à°¿à°Ÿà°¿à°¨à°¿ ఉదà±à°¦à±€à°ªà°¨à°‚ చేయà±à°®à± -find_match_case_label=à°…à°•à±à°·à°°à°®à±à°²à°¤à±‡à°¡à°¾à°¤à±‹ పోలà±à°šà±à°®à± +find_highlight=à°…à°¨à±à°¨à°¿à°Ÿà°¿à°¨à°¿ ఉదà±à°¦à±€à°ªà°¨à°‚ చేయà±à°®à± +find_match_case_label=à°…à°•à±à°·à°°à°®à±à°² తేడాతో పోలà±à°šà± find_reached_top=పేజీ పైకి చేరà±à°•à±à°¨à±à°¨à°¦à°¿, à°•à±à°°à°¿à°‚ది à°¨à±à°‚à°¡à°¿ కొనసాగించండి find_reached_bottom=పేజీ చివరకౠచేరà±à°•à±à°¨à±à°¨à°¦à°¿, పైనà±à°‚à°¡à°¿ కొనసాగించండి find_not_found=పదం కనబడలేదౠ@@ -139,7 +149,7 @@ error_stack=à°¸à±à°Ÿà°¾à°•à±: {{stack}} error_file=ఫైలà±: {{file}} # LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number error_line=వరà±à°¸: {{line}} -rendering_error=పేజీనౠరెండరౠచేయà±à°Ÿà°²à±‹ వొక దోషం యెదà±à°°à±ˆà°‚ది. +rendering_error=పేజీనౠరెండరౠచేయà±à°Ÿà°²à±‹ à°’à°• దోషం à°Žà°¦à±à°°à±ˆà°‚ది. # Predefined zoom values page_scale_width=పేజీ వెడలà±à°ªà± @@ -152,22 +162,22 @@ page_scale_percent={{scale}}% # Loading indicator messages loading_error_indicator=దోషం -loading_error=PDF లోడవà±à°šà±à°¨à±à°¨à°ªà±à°ªà±à°¡à± వొక దోషం యెదà±à°°à±ˆà°‚ది. +loading_error=PDF లోడవà±à°šà±à°¨à±à°¨à°ªà±à°ªà±à°¡à± à°’à°• దోషం à°Žà°¦à±à°°à±ˆà°‚ది. invalid_file_error=చెలà±à°²à°¨à°¿ లేదా పాడైన PDF ఫైలà±. missing_file_error=దొరకని PDF ఫైలà±. -unexpected_response_error=à°…à°¨à±à°•à±‹à°¨à°¿ సేవిక à°¸à±à°ªà°‚దన. +unexpected_response_error=à°…à°¨à±à°•à±‹à°¨à°¿ సరà±à°µà°°à± à°¸à±à°ªà°‚దన. # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). # Some common types are e.g.: "Check", "Text", "Comment", "Note" text_annotation_type.alt=[{{type}} టీకా] -password_label=à°ˆ PDF ఫైలౠతెరà±à°šà±à°Ÿà°•à± సంకేతపదం à°ªà±à°°à°µà±‡à°¶à°ªà±†à°Ÿà±à°Ÿà±à°®à± +password_label=à°ˆ PDF ఫైలౠతెరà±à°šà±à°Ÿà°•à± సంకేతపదం à°ªà±à°°à°µà±‡à°¶à°ªà±†à°Ÿà±à°Ÿà±à°®à±. password_invalid=సంకేతపదం చెలà±à°²à°¦à±. దయచేసి మళà±à°³à±€ à°ªà±à°°à°¯à°¤à±à°¨à°¿à°‚à°šà°‚à°¡à°¿. password_ok=సరే password_cancel=à°°à°¦à±à°¦à±à°šà±‡à°¯à°¿ -printing_not_supported=హెచà±à°šà°°à°¿à°•: à°ˆ విహారిణి చేత à°®à±à°¦à±à°°à°£ పూరà±à°¤à°¿à°—à°¾ తోడà±à°ªà°¾à°Ÿà±à°¨à±€à°¯à°¬à°¡à±à°Ÿ లేదౠ+printing_not_supported=హెచà±à°šà°°à°¿à°•: à°ˆ విహారిణి చేత à°®à±à°¦à±à°°à°£ పూరà±à°¤à°¿à°—à°¾ తోడà±à°ªà°¾à°Ÿà± లేదà±. printing_not_ready=హెచà±à°šà°°à°¿à°•: à°®à±à°¦à±à°°à°£ కొరకౠఈ PDF పూరà±à°¤à°¿à°—à°¾ లోడవలేదà±. -web_fonts_disabled=వెబౠఫాంటà±à°²à± అచేతనపరచ బడెనà±: ఎంబెడెడౠPDF ఫాంటà±à°²à± à°µà±à°ªà°¯à±‹à°—ించలేక పోయింది. -document_colors_not_allowed=PDF పతà±à°°à°¾à°²à± వాటి à°¸à±à°µà°‚à°¤ à°°à°‚à°—à±à°²à°¨à± à°µà±à°ªà°¯à±‹à°—à°¿à°‚à°šà±à°•à±Šà°¨à±à°Ÿà°•à± à°…à°¨à±à°®à°¤à°¿à°‚చబడవà±: విహరణి నందౠ'పేజీలనౠవాటి à°¸à±à°µà°‚à°¤ à°°à°‚à°—à±à°²à°¨à± యెంచà±à°•à±Šà°¨à±à°Ÿà°•à± à°…à°¨à±à°®à°¤à°¿à°‚à°šà±' à°…à°¨à±à°¨à°¦à°¿ అచేతనం చేయబడివà±à°‚ది. +web_fonts_disabled=వెబౠఫాంటà±à°²à± అచేతనించబడెనà±: ఎంబెడెడౠPDF ఫాంటà±à°²à± ఉపయోగించలేక పోయింది. +document_colors_not_allowed=PDF పతà±à°°à°¾à°²à± వాటి à°¸à±à°µà°‚à°¤ à°°à°‚à°—à±à°²à°¨à± ఉపయోగించà±à°•à±Šà°¨à±à°Ÿà°•à± à°…à°¨à±à°®à°¤à°¿à°‚చబడవà±: విహరణి నందౠ“పేజీలనౠవాటి à°¸à±à°µà°‚à°¤ à°°à°‚à°—à±à°²à°¨à± à°Žà°‚à°šà±à°•à±Šà°¨à±à°Ÿà°•à± à°…à°¨à±à°®à°¤à°¿à°‚à°šà±â€ అచేతనం చేయబడివà±à°‚ది. diff --git a/vendor/pdfjs/web/locale/th/viewer.properties b/vendor/pdfjs/web/locale/th/viewer.properties index 151e6b8..f1fd545 100644 --- a/vendor/pdfjs/web/locale/th/viewer.properties +++ b/vendor/pdfjs/web/locale/th/viewer.properties @@ -18,21 +18,24 @@ previous_label=à¸à¹ˆà¸à¸™à¸«à¸™à¹‰à¸² next.title=หน้าถัดไป next_label=ถัดไป -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=หน้า: -page_of=จาภ{{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=หน้า +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=จาภ{{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} จาภ{{pagesCount}}) -zoom_out.title=ย่ภ-zoom_out_label=ย่ภOut -zoom_in.title=ขยาย -zoom_in_label=ขยาย -zoom.title=ย่à¸-ขยาย -presentation_mode.title=สลับเข้าสู่รูปà¹à¸šà¸šà¸à¸²à¸£à¸™à¸³à¹€à¸ªà¸™à¸ -presentation_mode_label=รูปà¹à¸šà¸šà¸à¸²à¸£à¸™à¸³à¹€à¸ªà¸™à¸ -open_file.title=เปิดà¹à¸Ÿà¹‰à¸¡ +zoom_out.title=ซูมà¸à¸à¸ +zoom_out_label=ซูมà¸à¸à¸ +zoom_in.title=ซูมเข้า +zoom_in_label=ซูมเข้า +zoom.title=ซูม +presentation_mode.title=สลับเป็นโหมดà¸à¸²à¸£à¸™à¸³à¹€à¸ªà¸™à¸ +presentation_mode_label=โหมดà¸à¸²à¸£à¸™à¸³à¹€à¸ªà¸™à¸ +open_file.title=เปิดไฟล์ open_file_label=เปิด print.title=พิมพ์ print_label=พิมพ์ @@ -57,46 +60,49 @@ page_rotate_ccw.title=หมุนทวนเข็มนาฬิà¸à¸² page_rotate_ccw.label=หมุนทวนเข็มนาฬิà¸à¸² page_rotate_ccw_label=หมุนทวนเข็มนาฬิà¸à¸² -hand_tool_enable.title=เปิดใช้งานเครื่à¸à¸‡à¸¡à¸·à¸à¸£à¸¹à¸›à¸¡à¸·à¸ -hand_tool_enable_label=เปิดใช้งานเครื่à¸à¸‡à¸¡à¸·à¸à¸£à¸¹à¸›à¸¡à¸·à¸ -hand_tool_disable.title=ปิดใช้งานเครื่à¸à¸‡à¸¡à¸·à¸à¸£à¸¹à¸›à¸¡à¸·à¸ -hand_tool_disable_label=ปิดใช้งานเครื่à¸à¸‡à¸¡à¸·à¸à¸£à¸¹à¸›à¸¡à¸·à¸ # Document properties dialog box document_properties.title=คุณสมบัติเà¸à¸à¸ªà¸²à¸£â€¦ document_properties_label=คุณสมบัติเà¸à¸à¸ªà¸²à¸£â€¦ -document_properties_file_name=ชื่à¸à¹à¸Ÿà¹‰à¸¡ : -document_properties_file_size=ขนาดà¹à¸Ÿà¹‰à¸¡ : +document_properties_file_name=ชื่à¸à¹„ฟล์: +document_properties_file_size=ขนาดไฟล์: # LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" # will be replaced by the PDF file size in kilobytes, respectively in bytes. document_properties_kb={{size_kb}} à¸à¸´à¹‚ลไบต์ ({{size_b}} ไบต์) # LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" # will be replaced by the PDF file size in megabytes, respectively in bytes. document_properties_mb={{size_mb}} เมà¸à¸°à¹„บต์ ({{size_b}} ไบต์) -document_properties_title=หัวเรื่à¸à¸‡ : -document_properties_author=ผู้à¹à¸•à¹ˆà¸‡ : -document_properties_subject=หัวข้ภ: -document_properties_keywords=คำสำคัภ: -document_properties_creation_date=วันที่สร้าง : -document_properties_modification_date=วันที่à¹à¸à¹‰à¹„ข : +document_properties_title=ชื่à¸: +document_properties_author=ผู้สร้าง: +document_properties_subject=ชื่à¸à¹€à¸£à¸·à¹ˆà¸à¸‡: +document_properties_keywords=คำสำคัà¸: +document_properties_creation_date=วันที่สร้าง: +document_properties_modification_date=วันที่à¹à¸à¹‰à¹„ข: # LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" # will be replaced by the creation/modification date, and time, of the PDF file. document_properties_date_string={{date}}, {{time}} -document_properties_creator=สร้างโดย : -document_properties_producer=ผู้ผลิต PDF : -document_properties_version=รุ่น PDF : -document_properties_page_count=จำนวนหน้า : +document_properties_creator=ผู้สร้าง: +document_properties_producer=ผู้ผลิต PDF: +document_properties_version=รุ่น PDF: +document_properties_page_count=จำนวนหน้า: document_properties_close=ปิด +print_progress_message=à¸à¸³à¸¥à¸±à¸‡à¹€à¸•à¸£à¸µà¸¢à¸¡à¹€à¸à¸à¸ªà¸²à¸£à¸ªà¸³à¸«à¸£à¸±à¸šà¸à¸²à¸£à¸žà¸´à¸¡à¸žà¹Œâ€¦ +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=ยà¸à¹€à¸¥à¸´à¸ + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) -toggle_sidebar.title=สลับà¹à¸–บข้าง -toggle_sidebar_label=สลับà¹à¸–บข้าง -outline.title=à¹à¸ªà¸”งโครงเà¸à¸à¸ªà¸²à¸£ -outline_label=โครงเà¸à¸à¸ªà¸²à¸£ -attachments.title=à¹à¸ªà¸”งสิ่งที่à¹à¸™à¸šà¸¡à¸² -attachments_label=สิ่งที่à¹à¸™à¸šà¸¡à¸² +toggle_sidebar.title=เปิด/ปิดà¹à¸–บข้าง +toggle_sidebar_notification.title=เปิด/ปิดà¹à¸–บข้าง (เà¸à¸à¸ªà¸²à¸£à¸¡à¸µà¹€à¸„้าร่าง/ไฟล์à¹à¸™à¸š) +toggle_sidebar_label=เปิด/ปิดà¹à¸–บข้าง +document_outline.title=à¹à¸ªà¸”งเค้าร่างเà¸à¸à¸ªà¸²à¸£ (คลิà¸à¸ªà¸à¸‡à¸„รั้งเพื่à¸à¸‚ยาย/ยุบรายà¸à¸²à¸£à¸—ั้งหมด) +document_outline_label=เค้าร่างเà¸à¸à¸ªà¸²à¸£ +attachments.title=à¹à¸ªà¸”งไฟล์à¹à¸™à¸š +attachments_label=ไฟล์à¹à¸™à¸š thumbs.title=à¹à¸ªà¸”งภาพขนาดย่ภthumbs_label=ภาพขนาดย่ภfindbar.title=ค้นหาในเà¸à¸à¸ªà¸²à¸£ @@ -111,20 +117,21 @@ thumb_page_title=หน้า {{page}} thumb_page_canvas=ภาพขนาดย่à¸à¸‚à¸à¸‡à¸«à¸™à¹‰à¸² {{page}} # Find panel button title and messages -find_label=ค้นหา: -find_previous.title=หาตำà¹à¸«à¸™à¹ˆà¸‡à¸à¹ˆà¸à¸™à¸«à¸™à¹‰à¸²à¸‚à¸à¸‡à¸„ำค้น +find_input.title=ค้นหา +find_input.placeholder=ค้นหาในเà¸à¸à¸ªà¸²à¸£â€¦ +find_previous.title=หาตำà¹à¸«à¸™à¹ˆà¸‡à¸à¹ˆà¸à¸™à¸«à¸™à¹‰à¸²à¸‚à¸à¸‡à¸§à¸¥à¸µ find_previous_label=à¸à¹ˆà¸à¸™à¸«à¸™à¹‰à¸² -find_next.title=หาตำà¹à¸«à¸™à¹ˆà¸‡à¸–ัดไปขà¸à¸‡à¸„ำค้น +find_next.title=หาตำà¹à¸«à¸™à¹ˆà¸‡à¸–ัดไปขà¸à¸‡à¸§à¸¥à¸µ find_next_label=ถัดไป find_highlight=เน้นสีทั้งหมด -find_match_case_label=ตัวพิมพ์ตรงà¸à¸±à¸™ +find_match_case_label=ตัวพิมพ์ใหà¸à¹ˆà¹€à¸¥à¹‡à¸à¸•à¸£à¸‡à¸à¸±à¸™ find_reached_top=ค้นหาถึงจุดเริ่มต้นขà¸à¸‡à¸«à¸™à¹‰à¸² เริ่มค้นต่à¸à¸ˆà¸²à¸à¸”้านล่าง find_reached_bottom=ค้นหาถึงจุดสิ้นสุดหน้า เริ่มค้นต่à¸à¸ˆà¸²à¸à¸”้านบน -find_not_found=ไม่พบวลีที่ต้à¸à¸‡à¸à¸²à¸£ +find_not_found=ไม่พบวลี # Error panel labels error_more_info=ข้à¸à¸¡à¸¹à¸¥à¹€à¸žà¸´à¹ˆà¸¡à¹€à¸•à¸´à¸¡ -error_less_info=ข้à¸à¸¡à¸¹à¸¥à¸™à¹‰à¸à¸¢ +error_less_info=ข้à¸à¸¡à¸¹à¸¥à¸™à¹‰à¸à¸¢à¸¥à¸‡ error_close=ปิด # LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be # replaced by the PDF.JS version and build ID. @@ -136,16 +143,16 @@ error_message=ข้à¸à¸„วาม: {{message}} # trace. error_stack=สà¹à¸•à¹‡à¸: {{stack}} # LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename -error_file=à¹à¸Ÿà¹‰à¸¡: {{file}} +error_file=ไฟล์: {{file}} # LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number error_line=บรรทัด: {{line}} -rendering_error=เà¸à¸´à¸”ข้à¸à¸œà¸´à¸”พลาดขณะà¸à¸³à¸¥à¸±à¸‡à¸„ำนวณà¸à¸²à¸£à¹à¸ªà¸”งผลขà¸à¸‡à¸«à¸™à¹‰à¸² +rendering_error=เà¸à¸´à¸”ข้à¸à¸œà¸´à¸”พลาดขณะà¸à¸³à¸¥à¸±à¸‡à¹€à¸£à¸™à¹€à¸”à¸à¸£à¹Œà¸«à¸™à¹‰à¸² # Predefined zoom values page_scale_width=ความà¸à¸§à¹‰à¸²à¸‡à¸«à¸™à¹‰à¸² page_scale_fit=พà¸à¸”ีหน้า -page_scale_auto=ย่à¸-ขยายà¸à¸±à¸•à¹‚นมัติ -page_scale_actual=ขนาดเท่าจริง +page_scale_auto=ซูมà¸à¸±à¸•à¹‚นมัติ +page_scale_actual=ขนาดจริง # LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a # numerical scale value. page_scale_percent={{scale}}% @@ -153,21 +160,21 @@ page_scale_percent={{scale}}% # Loading indicator messages loading_error_indicator=ข้à¸à¸œà¸´à¸”พลาด loading_error=เà¸à¸´à¸”ข้à¸à¸œà¸´à¸”พลาดขณะà¸à¸³à¸¥à¸±à¸‡à¹‚หลด PDF -invalid_file_error=à¹à¸Ÿà¹‰à¸¡ PDF ไม่ถูà¸à¸•à¹‰à¸à¸‡à¸«à¸£à¸·à¸à¹„ม่สมบูรณ์ -missing_file_error=à¹à¸Ÿà¹‰à¸¡ PDF หาย -unexpected_response_error=à¸à¸²à¸£à¸•à¸à¸šà¸ªà¸™à¸à¸‡à¹€à¸‹à¸´à¸£à¹Œà¸Ÿà¹€à¸§à¸à¸£à¹Œà¸—ี่ไม่คาดหวัง +invalid_file_error=ไฟล์ PDF ไม่ถูà¸à¸•à¹‰à¸à¸‡à¸«à¸£à¸·à¸à¹€à¸ªà¸µà¸¢à¸«à¸²à¸¢ +missing_file_error=ไฟล์ PDF ขาดหาย +unexpected_response_error=à¸à¸²à¸£à¸•à¸à¸šà¸ªà¸™à¸à¸‡à¸‚à¸à¸‡à¹€à¸‹à¸´à¸£à¹Œà¸Ÿà¹€à¸§à¸à¸£à¹Œà¸—ี่ไม่คาดคิด # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). # Some common types are e.g.: "Check", "Text", "Comment", "Note" text_annotation_type.alt=[คำà¸à¸˜à¸´à¸šà¸²à¸¢à¸›à¸£à¸°à¸à¸à¸š {{type}}] -password_label=ใส่รหัสผ่านเพื่à¸à¹€à¸›à¸´à¸”ไฟล์ PDF นี้ +password_label=ป้à¸à¸™à¸£à¸«à¸±à¸ªà¸œà¹ˆà¸²à¸™à¹€à¸žà¸·à¹ˆà¸à¹€à¸›à¸´à¸”ไฟล์ PDF นี้ password_invalid=รหัสผ่านไม่ถูà¸à¸•à¹‰à¸à¸‡ โปรดลà¸à¸‡à¸à¸µà¸à¸„รั้ง password_ok=ตà¸à¸¥à¸‡ password_cancel=ยà¸à¹€à¸¥à¸´à¸ printing_not_supported=คำเตืà¸à¸™: เบราว์เซà¸à¸£à¹Œà¸™à¸µà¹‰à¹„ม่ได้สนับสนุนà¸à¸²à¸£à¸žà¸´à¸¡à¸žà¹Œà¸à¸¢à¹ˆà¸²à¸‡à¹€à¸•à¹‡à¸¡à¸—ี่ printing_not_ready=คำเตืà¸à¸™: PDF ไม่ได้รับà¸à¸²à¸£à¹‚หลดà¸à¸¢à¹ˆà¸²à¸‡à¹€à¸•à¹‡à¸¡à¸—ี่สำหรับà¸à¸²à¸£à¸žà¸´à¸¡à¸žà¹Œ -web_fonts_disabled=à¹à¸šà¸šà¸à¸±à¸à¸©à¸£à¹€à¸§à¹‡à¸šà¸–ูà¸à¸›à¸´à¸”à¸à¸²à¸£à¹ƒà¸Šà¹‰à¸‡à¸²à¸™: ไม่สามารถใช้à¹à¸šà¸šà¸à¸±à¸à¸©à¸£à¸à¸±à¸‡à¸•à¸±à¸§à¹ƒà¸™ PDF -document_colors_not_allowed=เà¸à¸à¸ªà¸²à¸£ PDF ไม่ได้รับà¸à¸™à¸¸à¸à¸²à¸•à¹ƒà¸«à¹‰à¹ƒà¸Šà¹‰à¸ªà¸µà¸‚à¸à¸‡à¸•à¸±à¸§à¹€à¸à¸‡: 'à¸à¸™à¸¸à¸à¸²à¸•à¹ƒà¸«à¹‰à¸«à¸™à¹‰à¸²à¹€à¸à¸à¸ªà¸²à¸£à¸ªà¸²à¸¡à¸²à¸£à¸–เลืà¸à¸à¸ªà¸µà¸‚à¸à¸‡à¸•à¸±à¸§à¹€à¸à¸‡' ถูà¸à¸›à¸´à¸”ใช้งานในเบราว์เซà¸à¸£à¹Œ +web_fonts_disabled=à¹à¸šà¸šà¸à¸±à¸à¸©à¸£à¹€à¸§à¹‡à¸šà¸–ูà¸à¸›à¸´à¸”ใช้งาน: ไม่สามารถใช้à¹à¸šà¸šà¸à¸±à¸à¸©à¸£ PDF à¸à¸±à¸‡à¸•à¸±à¸§ +document_colors_not_allowed=เà¸à¸à¸ªà¸²à¸£ PDF ไม่ได้รับà¸à¸™à¸¸à¸à¸²à¸•à¹ƒà¸«à¹‰à¹ƒà¸Šà¹‰à¸ªà¸µà¸‚à¸à¸‡à¸•à¸±à¸§à¹€à¸à¸‡: "à¸à¸™à¸¸à¸à¸²à¸•à¹ƒà¸«à¹‰à¸«à¸™à¹‰à¸²à¹€à¸à¸à¸ªà¸²à¸£à¸ªà¸²à¸¡à¸²à¸£à¸–เลืà¸à¸à¸ªà¸µà¸‚à¸à¸‡à¸•à¸±à¸§à¹€à¸à¸‡" ถูà¸à¸›à¸´à¸”ใช้งานในเบราว์เซà¸à¸£à¹Œ diff --git a/vendor/pdfjs/web/locale/tl/viewer.properties b/vendor/pdfjs/web/locale/tl/viewer.properties index e83cc87..de4d1bf 100644 --- a/vendor/pdfjs/web/locale/tl/viewer.properties +++ b/vendor/pdfjs/web/locale/tl/viewer.properties @@ -16,12 +16,12 @@ previous.title=Naunang Pahina next.title=Sunod na Pahina -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Pahina: -page_of=ng {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. open_file.title=Magbukas ng file open_file_label=Buksan @@ -42,11 +42,13 @@ document_properties_title=Pamagat: # LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" # will be replaced by the creation/modification date, and time, of the PDF file. +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_close=Kanselahin + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) -outline.title=Ipakita ang banghay ng dokumento -outline_label=Banghay ng dokumento thumbs.title=Ipakita ang mga Thumbnails findbar_label=Hanapin @@ -91,4 +93,5 @@ loading_error=May maling nangyari habang kinakarga ang PDF. # the PDF spec (32000-1:2008 Table 169 – Annotation types). # Some common types are e.g.: "Check", "Text", "Comment", "Note" password_ok=OK +password_cancel=Kanselahin diff --git a/vendor/pdfjs/web/locale/tn/viewer.properties b/vendor/pdfjs/web/locale/tn/viewer.properties index 3c9b503..eda077c 100644 --- a/vendor/pdfjs/web/locale/tn/viewer.properties +++ b/vendor/pdfjs/web/locale/tn/viewer.properties @@ -14,11 +14,12 @@ # Main toolbar buttons (tooltips and alt text for images) -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Tsebe: +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom.title=Zuma/gogela open_file.title=Bula Faele @@ -26,8 +27,6 @@ open_file_label=Bula # Secondary toolbar and context menu -hand_tool_disable.title=Thibela go dira ga sediriswa sa seatla -hand_tool_disable_label=Thibela go dira ga sediriswa sa seatla # Document properties dialog box document_properties_file_name=Leina la faele: @@ -39,10 +38,12 @@ document_properties_title=Leina: # LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" # will be replaced by the creation/modification date, and time, of the PDF file. +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) -findbar_label=Batla # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -78,6 +79,5 @@ loading_error_indicator=Phoso # the PDF spec (32000-1:2008 Table 169 – Annotation types). # Some common types are e.g.: "Check", "Text", "Comment", "Note" password_ok=Siame -password_cancel=Khansela web_fonts_disabled=Mefutatlhaka ya Webo ga e dire: ga e kgone go dirisa mofutatlhaka wa PDF o tsentsweng. diff --git a/vendor/pdfjs/web/locale/tr/viewer.properties b/vendor/pdfjs/web/locale/tr/viewer.properties index 19b4773..2c60df2 100644 --- a/vendor/pdfjs/web/locale/tr/viewer.properties +++ b/vendor/pdfjs/web/locale/tr/viewer.properties @@ -18,17 +18,20 @@ previous_label=Önceki next.title=Sonraki sayfa next_label=Sonraki -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Sayfa: -page_of=/ {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Sayfa +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=/ {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} / {{pagesCount}}) -zoom_out.title=UzaklaÈ™ -zoom_out_label=UzaklaÈ™ -zoom_in.title=YaklaÅŸ -zoom_in_label=YaklaÅŸ +zoom_out.title=UzaklaÅŸtır +zoom_out_label=UzaklaÅŸtır +zoom_in.title=YaklaÅŸtır +zoom_in_label=YaklaÅŸtır zoom.title=YakınlaÅŸtırma presentation_mode.title=Sunum moduna geç presentation_mode_label=Sunum Modu @@ -57,10 +60,10 @@ page_rotate_ccw.title=Saat yönünün tersine döndür page_rotate_ccw.label=Saat yönünün tersine döndür page_rotate_ccw_label=Saat yönünün tersine döndür -hand_tool_enable.title=El aracını etkinleÅŸtir -hand_tool_enable_label=El aracını etkinleÅŸtir -hand_tool_disable.title=El aracını kapat -hand_tool_disable_label=El aracını kapat +cursor_text_select_tool.title=Metin seçme aracını etkinleÅŸtir +cursor_text_select_tool_label=Metin seçme aracı +cursor_hand_tool.title=El aracını etkinleÅŸtir +cursor_hand_tool_label=El aracı # Document properties dialog box document_properties.title=Belge özellikleri… @@ -88,13 +91,20 @@ document_properties_version=PDF sürümü: document_properties_page_count=Sayfa sayısı: document_properties_close=Kapat +print_progress_message=Belge yazdırılmaya hazırlanıyor… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent=%{{progress}} +print_progress_close=Ä°ptal + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Kenar çubuÄŸunu aç/kapat +toggle_sidebar_notification.title=Kenar çubuÄŸunu aç/kapay (Belge anahat/ekler içeriyor) toggle_sidebar_label=Kenar çubuÄŸunu aç/kapat -outline.title=Belge ÅŸemasını göster -outline_label=Belge ÅŸeması +document_outline.title=Belge ÅŸemasını göster (Tüm öğeleri geniÅŸletmek/daraltmak için çift tıklayın) +document_outline_label=Belge ÅŸeması attachments.title=Ekleri göster attachments_label=Ekler thumbs.title=Küçük resimleri göster @@ -111,13 +121,14 @@ thumb_page_title=Sayfa {{page}} thumb_page_canvas={{page}}. sayfanın küçük hâli # Find panel button title and messages -find_label=Bul: +find_input.title=Bul +find_input.placeholder=Belgede bul… find_previous.title=Önceki eÅŸleÅŸmeyi bul find_previous_label=Önceki find_next.title=Sonraki eÅŸleÅŸmeyi bul find_next_label=Sonraki find_highlight=Tümünü vurgula -find_match_case_label=Büyük-küçük harf eÅŸleÅŸtir +find_match_case_label=Büyük-küçük harfe duyarlı find_reached_top=Belgenin başına ulaşıldı, sonundan devam edildi find_reached_bottom=Belgenin sonuna ulaşıldı, başından devam edildi find_not_found=EÅŸleÅŸme bulunamadı @@ -162,7 +173,7 @@ unexpected_response_error=Beklenmeyen sunucu yanıtı. # the PDF spec (32000-1:2008 Table 169 – Annotation types). # Some common types are e.g.: "Check", "Text", "Comment", "Note" text_annotation_type.alt=[{{type}} iÅŸareti] -password_label=Bu PDF dosyasını açmak için parolasını girin. +password_label=Bu PDF dosyasını açmak için parolasını yazın. password_invalid=Geçersiz parola. Lütfen tekrar deneyin. password_ok=Tamam password_cancel=Ä°ptal @@ -170,4 +181,4 @@ password_cancel=Ä°ptal printing_not_supported=Uyarı: Yazdırma bu tarayıcı tarafından tam olarak desteklenmemektedir. printing_not_ready=Uyarı: PDF tamamen yüklenmedi ve yazdırmaya hazır deÄŸil. web_fonts_disabled=Web fontları devre dışı: Gömülü PDF fontları kullanılamıyor. -document_colors_not_allowed=PDF belgelerinin kendi renklerini kullanması için izin verilmiyor: 'Sayfalara kendi renklerini seçmesi için izin ver' tarayıcıda etkinleÅŸtirilmemiÅŸ. +document_colors_not_allowed=PDF belgelerinin kendi renklerini kullanması için izin verilmiyor: “Sayfalara kendi renklerini seçmesi için izin ver†tarayıcıda etkinleÅŸtirilmemiÅŸ. diff --git a/vendor/pdfjs/web/locale/uk/viewer.properties b/vendor/pdfjs/web/locale/uk/viewer.properties index f899197..b2eda93 100644 --- a/vendor/pdfjs/web/locale/uk/viewer.properties +++ b/vendor/pdfjs/web/locale/uk/viewer.properties @@ -18,12 +18,15 @@ previous_label=ÐŸÐ¾Ð¿ÐµÑ€ÐµÐ´Ð½Ñ next.title=ÐаÑтупна Ñторінка next_label=ÐаÑтупна -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Сторінка: -page_of=з {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Сторінка +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=із {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} із {{pagesCount}}) zoom_out.title=Зменшити zoom_out_label=Зменшити @@ -38,7 +41,7 @@ print.title=Друк print_label=Друк download.title=Завантажити download_label=Завантажити -bookmark.title=Поточний виглÑд (копіювати чи відкрити у новому вікні) +bookmark.title=Поточний виглÑд (копіювати чи відкрити в новому вікні) bookmark_label=Поточний виглÑд # Secondary toolbar and context menu @@ -57,10 +60,10 @@ page_rotate_ccw.title=Повернути проти годинникової ÑÑ page_rotate_ccw.label=Повернути проти годинникової Ñтрілки page_rotate_ccw_label=Повернути проти годинникової Ñтрілки -hand_tool_enable.title=Увімкнути інÑтрумент «Рука» -hand_tool_enable_label=Увімкнути інÑтрумент «Рука» -hand_tool_disable.title=Вимкнути інÑтрумент «Рука» -hand_tool_disable_label=Вимкнути інÑтрумент «Рука» +cursor_text_select_tool.title=Увімкнути інÑтрумент вибору текÑту +cursor_text_select_tool_label=ІнÑтрумент вибору текÑту +cursor_hand_tool.title=Увімкнути інÑтрумент «Рука» +cursor_hand_tool_label=ІнÑтрумент «Рука» # Document properties dialog box document_properties.title=ВлаÑтивоÑÑ‚Ñ– документа… @@ -88,18 +91,25 @@ document_properties_version=ВерÑÑ–Ñ PDF: document_properties_page_count=КількіÑÑ‚ÑŒ Ñторінок: document_properties_close=Закрити +print_progress_message=Підготовка документу до друку… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=СкаÑувати + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Бічна панель +toggle_sidebar_notification.title=Перемкнути бічну панель (документ має вміÑÑ‚/вкладеннÑ) toggle_sidebar_label=Перемкнути бічну панель -outline.title=Показувати Ñхему документа -outline_label=Схема документа +document_outline.title=Показати Ñхему документу (подвійний клік Ð´Ð»Ñ Ñ€Ð¾Ð·Ð³Ð¾Ñ€Ñ‚Ð°Ð½Ð½Ñ/Ð·Ð³Ð¾Ñ€Ñ‚Ð°Ð½Ð½Ñ ÐµÐ»ÐµÐ¼ÐµÐ½Ñ‚Ñ–Ð²) +document_outline_label=Схема документа attachments.title=Показати Ð¿Ñ€Ð¸ÐºÑ€Ñ–Ð¿Ð»ÐµÐ½Ð½Ñ attachments_label=ÐŸÑ€Ð¸ÐºÑ€Ñ–Ð¿Ð»ÐµÐ½Ð½Ñ thumbs.title=Показувати еÑкізи thumbs_label=ЕÑкізи -findbar.title=Шукати в документі +findbar.title=Знайти в документі findbar_label=Пошук # Thumbnails panel item (tooltip and alt text for images) @@ -111,7 +121,8 @@ thumb_page_title=Сторінка {{page}} thumb_page_canvas=ЕÑкіз Ñторінки {{page}} # Find panel button title and messages -find_label=Знайти: +find_input.title=Знайти +find_input.placeholder=Знайти в документі… find_previous.title=Знайти попереднє Ð²Ñ…Ð¾Ð´Ð¶ÐµÐ½Ð½Ñ Ñ„Ñ€Ð°Ð·Ð¸ find_previous_label=Попереднє find_next.title=Знайти наÑтупне Ð²Ñ…Ð¾Ð´Ð¶ÐµÐ½Ð½Ñ Ñ„Ñ€Ð°Ð·Ð¸ diff --git a/vendor/pdfjs/web/locale/ur/viewer.properties b/vendor/pdfjs/web/locale/ur/viewer.properties index 4551f63..35a4458 100644 --- a/vendor/pdfjs/web/locale/ur/viewer.properties +++ b/vendor/pdfjs/web/locale/ur/viewer.properties @@ -18,12 +18,15 @@ previous_label=پچھلا next.title=اگلا صÙØÛ next_label=Ø¢Ú¯Û’ -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=صÙØÛ: -page_of={{pageCount}} کا +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=صÙØÛ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages={{pagesCount}} کا +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} کا {{pagesCount}}) zoom_out.title=باÛر زوم کریں zoom_out_label=باÛر زوم کریں @@ -57,10 +60,6 @@ page_rotate_ccw.title=ضد Ú¯Ú¾Ú‘ÛŒ وار گھمائیں page_rotate_ccw.label=ضد Ú¯Ú¾Ú‘ÛŒ وار گھمائیں page_rotate_ccw_label=ضد Ú¯Ú¾Ú‘ÛŒ وار گھمائیں -hand_tool_enable.title=Ûاتھ ٹول اÛÙ„ بنائیں -hand_tool_enable_label=Ûاتھ ٹول اÛÙ„ بنائیں -hand_tool_disable.title=Ûاتھ ٹول nنااÛÙ„ بنائیں\u0020 -hand_tool_disable_label=Ûاتھ ٹول نااÛÙ„ بنائیں # Document properties dialog box document_properties.title=دستاویز خواص… @@ -88,19 +87,24 @@ document_properties_version=PDF ورژن: document_properties_page_count=صÙØÛ Ø´Ù…Ø§Ø±: document_properties_close=بند کریں +print_progress_message=چھاپنے کرنے Ú©Û’ لیے دستاویز تیار کیے جا رھے ھیں +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent=*{{progress}}%* +print_progress_close=منسوخ کریں + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=سلائیڈ ٹوگل کریں toggle_sidebar_label=سلائیڈ ٹوگل کریں -outline.title=دستاویز آؤٹ لائن دکھائیں -outline_label=دستاویز آؤٹ لائن +document_outline.title=دستاویز Ú©ÛŒ سرخیاں دکھایں (تمام اشیاء وسیع / غائب کرنے Ú©Û’ لیے ڈبل Ú©Ù„Ú© کریں) +document_outline_label=دستاویز آؤٹ لائن attachments.title=منسلکات دکھائیں attachments_label=منسلکات thumbs.title=تھمبنیل دکھائیں thumbs_label=مجمل findbar.title=دستاویز میں ڈھونڈیں -findbar_label=ڈھونڈیں # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -111,7 +115,6 @@ thumb_page_title=صÙØÛ {{page}} thumb_page_canvas=صÙØÛ’ کا مجمل {{page}} # Find panel button title and messages -find_label=ڈھونڈیں: find_previous.title=Ùقرے کا پچھلا وقوع ڈھونڈیں find_previous_label=پچھلا find_next.title=Ùقرے کا Ø§Ú¯Ù„Û ÙˆÙ‚ÙˆØ¹ ڈھونڈیں diff --git a/vendor/pdfjs/web/locale/vi/viewer.properties b/vendor/pdfjs/web/locale/vi/viewer.properties index 93a9540..3623b65 100644 --- a/vendor/pdfjs/web/locale/vi/viewer.properties +++ b/vendor/pdfjs/web/locale/vi/viewer.properties @@ -18,12 +18,14 @@ previous_label=TrÆ°á»›c next.title=Trang Sau next_label=Tiếp -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Trang: -page_of=trên {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=trên {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} trên {{pagesCount}}) zoom_out.title=Thu nhá» zoom_out_label=Thu nhá» @@ -57,10 +59,6 @@ page_rotate_ccw.title=Xoay ngược chiá»u kim đồng hồ page_rotate_ccw.label=Xoay ngược chiá»u kim đồng hồ page_rotate_ccw_label=Xoay ngược chiá»u kim đồng hồ -hand_tool_enable.title=Cho phép kéo để cuá»™n trang -hand_tool_enable_label=Cho phép kéo để cuá»™n trang -hand_tool_disable.title=Tắt kéo để cuá»™n trang -hand_tool_disable_label=Tắt kéo để cuá»™n trang # Document properties dialog box document_properties.title=Thuá»™c tÃnh của tà i liệu… @@ -88,13 +86,17 @@ document_properties_version=Phiên bản PDF: document_properties_page_count=Tổng số trang: document_properties_close=Ãóng +print_progress_message=Chuẩn bị trang để in… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Báºt/Tắt thanh lá» toggle_sidebar_label=Báºt/Tắt thanh lá» -outline.title=Hiển thị bản phác tà i liệu -outline_label=Bản phác tà i liệu +document_outline_label=Bản phác tà i liệu attachments.title=Hiện ná»™i dung Ä‘Ãnh kèm attachments_label=Ná»™i dung Ä‘Ãnh kèm thumbs.title=Hiển thị ảnh thu nhá» @@ -111,7 +113,6 @@ thumb_page_title=Trang {{page}} thumb_page_canvas=Ảnh thu nhá» của trang {{page}} # Find panel button title and messages -find_label=Tìm: find_previous.title=Tìm cụm từ ở phần trÆ°á»›c find_previous_label=TrÆ°á»›c find_next.title=Tìm cụm từ ở phần sau @@ -165,7 +166,6 @@ text_annotation_type.alt=[{{type}} Chú thÃch] password_label=Nháºp máºt khẩu để mở táºp tin PDF nà y. password_invalid=Máºt khẩu không đúng. Vui lòng thá» lại. password_ok=OK -password_cancel=Hủy bá» printing_not_supported=Cảnh báo: In ấn không được há»— trợ đầy đủ ở trình duyệt nà y. printing_not_ready=Cảnh báo: PDF chÆ°a được tải hết để in. diff --git a/vendor/pdfjs/web/locale/wo/viewer.properties b/vendor/pdfjs/web/locale/wo/viewer.properties index 1e70845..8c999ad 100644 --- a/vendor/pdfjs/web/locale/wo/viewer.properties +++ b/vendor/pdfjs/web/locale/wo/viewer.properties @@ -18,12 +18,12 @@ previous_label=Bi jiitu next.title=Xët wi ci topp next_label=Bi ci topp -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Xët: -page_of=ci {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom_out.title=Wà ññi zoom_out_label=Wà ññi @@ -53,11 +53,12 @@ document_properties_title=Bopp: # LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" # will be replaced by the creation/modification date, and time, of the PDF file. +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) -outline.title=Wone takku yi -outline_label=Takku jukki yi thumbs.title=Wone nataal yu ndaw yi thumbs_label=Nataal yu ndaw yi findbar.title=Gis ci biir jukki bi @@ -72,7 +73,6 @@ thumb_page_title=Xët {{xët}} thumb_page_canvas=Wiñet bu xët{{xët}} # Find panel button title and messages -find_label=Wut: find_previous.title=Seet beneen kaddu bu ni mel te jiitu find_previous_label=Bi jiitu find_next.title=Seet beneen kaddu bu ni mel diff --git a/vendor/pdfjs/web/locale/xh/viewer.properties b/vendor/pdfjs/web/locale/xh/viewer.properties index db46b4c..1fa394b 100644 --- a/vendor/pdfjs/web/locale/xh/viewer.properties +++ b/vendor/pdfjs/web/locale/xh/viewer.properties @@ -18,12 +18,15 @@ previous_label=Okwangaphambili next.title=Iphepha elilandelayo next_label=Okulandelayo -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Iphepha: -page_of=kwali- {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Iphepha +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=kwali- {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} kwali {{pagesCount}}) zoom_out.title=Bhekelisela Kudana zoom_out_label=Bhekelisela Kudana @@ -57,10 +60,10 @@ page_rotate_ccw.title=Jikelisa ngasekhohlo page_rotate_ccw.label=Jikelisa ngasekhohlo page_rotate_ccw_label=Jikelisa ngasekhohlo -hand_tool_enable.title=Yenza isixhobo sesandla sisebenze -hand_tool_enable_label=Yenza isixhobo sesandla sisebenze -hand_tool_disable.title=Yenza isixhobo sesandla singasebenzi -hand_tool_disable_label=Yenza isixhobo sesandla singasebenzi +cursor_text_select_tool.title=Vumela iSixhobo sokuKhetha iTeksti +cursor_text_select_tool_label=ISixhobo sokuKhetha iTeksti +cursor_hand_tool.title=Yenza iSixhobo seSandla siSebenze +cursor_hand_tool_label=ISixhobo seSandla # Document properties dialog box document_properties.title=Iipropati zoxwebhu… @@ -88,13 +91,20 @@ document_properties_version=Uhlelo lwe-PDF: document_properties_page_count=Inani lamaphepha: document_properties_close=Vala +print_progress_message=Ilungisa uxwebhu ukuze iprinte… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=Rhoxisa + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Togola ngebha eseCaleni +toggle_sidebar_notification.title=ISidebar yeQhosha (uxwebhu lunolwandlalo/iziqhotyoshelwa) toggle_sidebar_label=Togola ngebha eseCaleni -outline.title=Bonisa isishwankathelo soxwebhu -outline_label=Isishwankathelo soxwebhu +document_outline.title=Bonisa uLwandlalo loXwebhu (cofa kabini ukuze wandise/diliza zonke izinto) +document_outline_label=Isishwankathelo soxwebhu attachments.title=Bonisa iziqhotyoshelwa attachments_label=Iziqhoboshelo thumbs.title=Bonisa ukrobiso kumfanekiso @@ -111,7 +121,8 @@ thumb_page_title=Iphepha {{page}} thumb_page_canvas=Ukrobiso kumfanekiso wephepha {{page}} # Find panel button title and messages -find_label=Fumanisa: +find_input.title=Fumana +find_input.placeholder=Fumana kuXwebhu… find_previous.title=Fumanisa isenzeko sangaphambili sebinzana lamagama find_previous_label=Okwangaphambili find_next.title=Fumanisa isenzeko esilandelayo sebinzana lamagama diff --git a/vendor/pdfjs/web/locale/zh-CN/viewer.properties b/vendor/pdfjs/web/locale/zh-CN/viewer.properties index b3d0de9..5140824 100644 --- a/vendor/pdfjs/web/locale/zh-CN/viewer.properties +++ b/vendor/pdfjs/web/locale/zh-CN/viewer.properties @@ -18,12 +18,15 @@ previous_label=上一页 next.title=下一页 next_label=下一页 -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=页é¢ï¼š -page_of=/ {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=é¡µé¢ +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=/ {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=({{pageNumber}} / {{pagesCount}}) zoom_out.title=ç¼©å° zoom_out_label=ç¼©å° @@ -38,8 +41,8 @@ print.title=æ‰“å° print_label=æ‰“å° download.title=下载 download_label=下载 -bookmark.title=当å‰è§†å›¾ï¼ˆå¤åˆ¶æˆ–在新窗å£ä¸æ‰“开) -bookmark_label=当å‰è§†å›¾ +bookmark.title=当å‰åœ¨çœ‹çš„内容(å¤åˆ¶æˆ–在新窗å£ä¸æ‰“开) +bookmark_label=当å‰åœ¨çœ‹ # Secondary toolbar and context menu tools.title=工具 @@ -57,10 +60,10 @@ page_rotate_ccw.title=逆时针旋转 page_rotate_ccw.label=逆时针旋转 page_rotate_ccw_label=逆时针旋转 -hand_tool_enable.title=å¯ç”¨æ‰‹å½¢å·¥å…· -hand_tool_enable_label=å¯ç”¨æ‰‹å½¢å·¥å…· -hand_tool_disable.title=ç¦ç”¨æ‰‹å½¢å·¥å…· -hand_tool_disable_label=ç¦ç”¨æ‰‹å½¢å·¥å…· +cursor_text_select_tool.title=å¯ç”¨æ–‡æœ¬é€‰æ‹©å·¥å…· +cursor_text_select_tool_label=文本选择工具 +cursor_hand_tool.title=å¯ç”¨æ‰‹å½¢å·¥å…· +cursor_hand_tool_label=手形工具 # Document properties dialog box document_properties.title=文档属性… @@ -88,13 +91,20 @@ document_properties_version=PDF 版本: document_properties_page_count=页数: document_properties_close=å…³é— +print_progress_message=æ£åœ¨å‡†å¤‡æ‰“å°æ–‡æ¡£â€¦ +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=å–消 + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=切æ¢ä¾§æ +toggle_sidebar_notification.title=切æ¢ä¾§æ (文档所å«çš„大纲/附件) toggle_sidebar_label=切æ¢ä¾§æ -outline.title=显示文档大纲 -outline_label=文档大纲 +document_outline.title=显示文档大纲(åŒå‡»å±•å¼€/折å 所有项) +document_outline_label=文档大纲 attachments.title=显示附件 attachments_label=附件 thumbs.title=显示缩略图 @@ -111,7 +121,8 @@ thumb_page_title=页ç {{page}} thumb_page_canvas=é¡µé¢ {{page}} 的缩略图 # Find panel button title and messages -find_label=查找: +find_input.title=查找 +find_input.placeholder=在文档ä¸æŸ¥æ‰¾â€¦ find_previous.title=查找è¯è¯ä¸Šä¸€æ¬¡å‡ºçŽ°çš„ä½ç½® find_previous_label=上一页 find_next.title=查找è¯è¯åŽä¸€æ¬¡å‡ºçŽ°çš„ä½ç½® @@ -120,7 +131,7 @@ find_highlight=全部高亮显示 find_match_case_label=区分大å°å†™ find_reached_top=åˆ°è¾¾æ–‡æ¡£å¼€å¤´ï¼Œä»Žæœ«å°¾ç»§ç» find_reached_bottom=åˆ°è¾¾æ–‡æ¡£æœ«å°¾ï¼Œä»Žå¼€å¤´ç»§ç» -find_not_found=è¯è¯æœªæ‰¾åˆ° +find_not_found=找ä¸åˆ°æŒ‡å®šè¯è¯ # Error panel labels error_more_info=æ›´å¤šä¿¡æ¯ @@ -167,7 +178,7 @@ password_invalid=密ç æ— æ•ˆã€‚è¯·é‡è¯•ã€‚ password_ok=确定 password_cancel=å–消 -printing_not_supported=è¦å‘Šï¼šæ‰“å°åŠŸèƒ½ä¸å®Œå…¨æ”¯æŒæ¤æµè§ˆå™¨ã€‚ -printing_not_ready=è¦å‘Šï¼šè¯¥ PDF æœªå®Œå…¨åŠ è½½ä»¥ä¾›æ‰“å°ã€‚ +printing_not_supported=è¦å‘Šï¼šæ¤æµè§ˆå™¨å°šæœªå®Œæ•´æ”¯æŒæ‰“å°åŠŸèƒ½ã€‚ +printing_not_ready=è¦å‘Šï¼šè¯¥ PDF 未完全载入以供打å°ã€‚ web_fonts_disabled=Web å—体已被ç¦ç”¨ï¼šæ— 法使用嵌入的PDFå—体。 document_colors_not_allowed=ä¸å…许 PDF 文档使用自己的颜色:æµè§ˆå™¨ä¸â€œå…许页é¢é€‰æ‹©è‡ªå·±çš„颜色â€çš„选项已åœç”¨ã€‚ diff --git a/vendor/pdfjs/web/locale/zh-TW/viewer.properties b/vendor/pdfjs/web/locale/zh-TW/viewer.properties index 495ce10..67f6425 100644 --- a/vendor/pdfjs/web/locale/zh-TW/viewer.properties +++ b/vendor/pdfjs/web/locale/zh-TW/viewer.properties @@ -18,12 +18,15 @@ previous_label=上一é next.title=下一é next_label=下一é -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=é : -page_of=/ {{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=第 +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +of_pages=é ,共 {{pagesCount}} é +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. +page_of_pages=(第 {{pageNumber}} é ,共 {{pagesCount}} é ) zoom_out.title=ç¸®å° zoom_out_label=ç¸®å° @@ -57,10 +60,10 @@ page_rotate_ccw.title=逆時é‡æ—‹è½‰ page_rotate_ccw.label=逆時é‡æ—‹è½‰ page_rotate_ccw_label=逆時é‡æ—‹è½‰ -hand_tool_enable.title=啟用掌型工具 -hand_tool_enable_label=啟用掌型工具 -hand_tool_disable.title=åœç”¨æŽŒåž‹å·¥å…· -hand_tool_disable_label=åœç”¨æŽŒåž‹å·¥å…· +cursor_text_select_tool.title=é–‹å•Ÿæ–‡å—é¸æ“‡å·¥å…· +cursor_text_select_tool_label=æ–‡å—é¸æ“‡å·¥å…· +cursor_hand_tool.title=é–‹å•Ÿé é¢ç§»å‹•å·¥å…· +cursor_hand_tool_label=é é¢ç§»å‹•å·¥å…· # Document properties dialog box document_properties.title=文件內容… @@ -88,13 +91,20 @@ document_properties_version=PDF 版本: document_properties_page_count=é 數: document_properties_close=關閉 +print_progress_message=æ£åœ¨æº–備列å°æ–‡ä»¶â€¦ +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. +print_progress_percent={{progress}}% +print_progress_close=å–消 + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=切æ›å´é‚Šæ¬„ +toggle_sidebar_notification.title=切æ›å´é‚Šæ””(文件包å«å¤§ç¶±æˆ–附件) toggle_sidebar_label=切æ›å´é‚Šæ¬„ -outline.title=顯示文件大綱 -outline_label=文件大綱 +document_outline.title=顯示文件大綱(雙擊展開/æ‘ºç–Šæ‰€æœ‰é …ç›®ï¼‰ +document_outline_label=文件大綱 attachments.title=顯示附件 attachments_label=附件 thumbs.title=顯示縮圖 @@ -111,7 +121,8 @@ thumb_page_title=é {{page}} thumb_page_canvas=é {{page}} 的縮圖 # Find panel button title and messages -find_label=尋找: +find_input.title=æœå°‹ +find_input.placeholder=在文件ä¸æœå°‹â€¦ find_previous.title=尋找文å—å‰æ¬¡å‡ºç¾çš„ä½ç½® find_previous_label=上一個 find_next.title=尋找文å—下次出ç¾çš„ä½ç½® @@ -170,5 +181,4 @@ password_cancel=å–消 printing_not_supported=è¦å‘Š: æ¤ç€è¦½å™¨æœªå®Œæ•´æ”¯æ´åˆ—å°åŠŸèƒ½ã€‚ printing_not_ready=è¦å‘Š: æ¤ PDF 未完æˆä¸‹è¼‰ä»¥ä¾›åˆ—å°ã€‚ web_fonts_disabled=å·²åœç”¨ç¶²è·¯å—åž‹ (Web fonts): 無法使用 PDF 內嵌å—型。 -document_colors_not_allowed=ä¸å…許 PDF 文件使用自訂色彩: å·²åœç”¨ç€è¦½å™¨çš„「優先使用網é 指定的色彩ã€è¨å®šã€‚ - +document_colors_not_allowed=ç€è¦½å™¨çš„「優先使用網é 指定的色彩ã€æœªè¢«å‹¾é¸ï¼ŒPDF 文件無法使用自己的色彩。 diff --git a/vendor/pdfjs/web/locale/zu/viewer.properties b/vendor/pdfjs/web/locale/zu/viewer.properties index 2ccf70c..8fc77f2 100644 --- a/vendor/pdfjs/web/locale/zu/viewer.properties +++ b/vendor/pdfjs/web/locale/zu/viewer.properties @@ -18,12 +18,12 @@ previous_label=Okudlule next.title=Ikhasi elilandelayo next_label=Okulandelayo -# LOCALIZATION NOTE (page_label, page_of): -# These strings are concatenated to form the "Page: X of Y" string. -# Do not translate "{{pageCount}}", it will be substituted with a number -# representing the total number of pages. -page_label=Ikhasi: -page_of=kwe-{{pageCount}} +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. zoom_out.title=Hlehlisela emuva zoom_out_label=Hlehlisela emuva @@ -54,17 +54,18 @@ document_properties_title=Isihloko: # LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" # will be replaced by the creation/modification date, and time, of the PDF file. +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. + # Tooltips and alt text for side panel toolbar buttons # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=I-toggle yebha yaseceleni toggle_sidebar_label=i-toggle yebha yaseceleni -outline.title=Bonisa umugqa waseceleni wedokhumenti -outline_label=Umugqa waseceleni wedokhumenti +document_outline_label=Umugqa waseceleni wedokhumenti thumbs.title=Bonisa izithombe ezincane thumbs_label=Izithonjana findbar.title=Thola kwidokhumenti -findbar_label=Thola # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page @@ -75,7 +76,6 @@ thumb_page_title=Ikhasi {{page}} thumb_page_canvas=Isithonjana sekhasi {{page}} # Find panel button title and messages -find_label=Thola find_previous.title=Thola indawo eyandulelayo okuvela kuyo lomshwana find_previous_label=Okudlulile find_next.title=Thola enye indawo okuvela kuyo lomshwana @@ -124,7 +124,6 @@ missing_file_error=Ifayela le-PDF elilahlekile. # Some common types are e.g.: "Check", "Text", "Comment", "Note" text_annotation_type.alt=[Amazwibela e-{{type}}] password_ok=Kulungile -password_cancel=Khansela printing_not_supported=Isixwayiso: Ukuphrinta akuxhasiwe yilesisiphequluli ngokugcwele. printing_not_ready=Isixwayiso: I-PDF ayikalayishwa ngokuphelele yiPhrinta. diff --git a/vendor/pdfjs/web/viewer.css b/vendor/pdfjs/web/viewer.css index da2cf65..c259f08 100644 --- a/vendor/pdfjs/web/viewer.css +++ b/vendor/pdfjs/web/viewer.css @@ -110,6 +110,76 @@ cursor: pointer; } +.annotationLayer .textWidgetAnnotation input, +.annotationLayer .textWidgetAnnotation textarea, +.annotationLayer .choiceWidgetAnnotation select, +.annotationLayer .buttonWidgetAnnotation.checkBox input, +.annotationLayer .buttonWidgetAnnotation.radioButton input { + background-color: rgba(0, 54, 255, 0.13); + border: 1px solid transparent; + box-sizing: border-box; + font-size: 9px; + height: 100%; + padding: 0 3px; + vertical-align: top; + width: 100%; +} + +.annotationLayer .textWidgetAnnotation textarea { + font: message-box; + font-size: 9px; + resize: none; +} + +.annotationLayer .textWidgetAnnotation input[disabled], +.annotationLayer .textWidgetAnnotation textarea[disabled], +.annotationLayer .choiceWidgetAnnotation select[disabled], +.annotationLayer .buttonWidgetAnnotation.checkBox input[disabled], +.annotationLayer .buttonWidgetAnnotation.radioButton input[disabled] { + background: none; + border: 1px solid transparent; + cursor: not-allowed; +} + +.annotationLayer .textWidgetAnnotation input:hover, +.annotationLayer .textWidgetAnnotation textarea:hover, +.annotationLayer .choiceWidgetAnnotation select:hover, +.annotationLayer .buttonWidgetAnnotation.checkBox input:hover, +.annotationLayer .buttonWidgetAnnotation.radioButton input:hover { + border: 1px solid #000; +} + +.annotationLayer .textWidgetAnnotation input:focus, +.annotationLayer .textWidgetAnnotation textarea:focus, +.annotationLayer .choiceWidgetAnnotation select:focus { + background: none; + border: 1px solid transparent; +} + +.annotationLayer .textWidgetAnnotation input.comb { + font-family: monospace; + padding-left: 2px; + padding-right: 0; +} + +.annotationLayer .textWidgetAnnotation input.comb:focus { + /* + * Letter spacing is placed on the right side of each character. Hence, the + * letter spacing of the last character may be placed outside the visible + * area, causing horizontal scrolling. We avoid this by extending the width + * when the element has focus and revert this when it loses focus. + */ + width: 115%; +} + +.annotationLayer .buttonWidgetAnnotation.checkBox input, +.annotationLayer .buttonWidgetAnnotation.radioButton input { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; +} + .annotationLayer .popupWrapper { position: absolute; width: 20em; @@ -141,7 +211,9 @@ .annotationLayer .highlightAnnotation, .annotationLayer .underlineAnnotation, .annotationLayer .squigglyAnnotation, -.annotationLayer .strikeoutAnnotation { +.annotationLayer .strikeoutAnnotation, +.annotationLayer .lineAnnotation svg line, +.annotationLayer .fileAttachmentAnnotation { cursor: pointer; } @@ -167,11 +239,24 @@ border: none; } +.pdfViewer.singlePageView { + display: inline-block; +} + +.pdfViewer.singlePageView .page { + margin: 0; + border: none; +} + .pdfViewer .page canvas { margin: 0; display: block; } +.pdfViewer .page canvas[hidden] { + display: none; +} + .pdfViewer .page .loadingIcon { position: absolute; display: block; @@ -209,12 +294,14 @@ html { height: 100%; + width: 100%; /* Font size is needed to make the activity bar the correct size. */ font-size: 10px; } body { height: 100%; + width: 100%; background-color: #404040; background-image: url(images/texture.png); } @@ -320,32 +407,6 @@ select { cursor: default; } -/* outer/inner center provides horizontal center */ -.outerCenter { - pointer-events: none; - position: relative; -} -html[dir='ltr'] .outerCenter { - float: right; - right: 50%; -} -html[dir='rtl'] .outerCenter { - float: left; - left: 50%; -} -.innerCenter { - pointer-events: auto; - position: relative; -} -html[dir='ltr'] .innerCenter { - float: right; - right: -50%; -} -html[dir='rtl'] .innerCenter { - float: left; - left: -50%; -} - #outerContainer { width: 100%; height: 100%; @@ -558,8 +619,7 @@ html[dir='rtl'] #toolbarContainer, .findbar, .secondaryToolbar { top: 32px; position: absolute; z-index: 10000; - height: 32px; - + height: auto; min-width: 16px; padding: 0px 6px 0px 6px; margin: 4px 2px 4px 2px; @@ -570,10 +630,21 @@ html[dir='rtl'] #toolbarContainer, .findbar, .secondaryToolbar { cursor: default; } +.findbar { + min-width: 300px; +} +.findbar > div { + height: 32px; +} +.findbar.wrapContainers > div { + clear: both; +} +.findbar.wrapContainers > div#findbarMessageContainer { + height: auto; +} html[dir='ltr'] .findbar { left: 68px; } - html[dir='rtl'] .findbar { right: 68px; } @@ -583,6 +654,21 @@ html[dir='rtl'] .findbar { -moz-user-select: none; } +#findInput { + width: 200px; +} +#findInput::-webkit-input-placeholder { + font-style: italic; +} +#findInput::-moz-placeholder { + font-style: italic; +} +#findInput:-ms-input-placeholder { + font-style: italic; +} +#findInput::placeholder { + font-style: italic; +} #findInput[data-status="pending"] { background-image: url(images/loading-small.png); background-repeat: no-repeat; @@ -674,41 +760,39 @@ html[dir='ltr'] .doorHangerRight:before { font-style: italic; color: #A6B7D0; } +#findMsg:empty { + display: none; +} #findInput.notFound { background-color: rgb(255, 102, 102); } -html[dir='ltr'] #toolbarViewerLeft { - margin-left: -1px; -} -html[dir='rtl'] #toolbarViewerRight { - margin-right: -1px; +#toolbarViewerMiddle { + position: absolute; + left: 50%; + transform: translateX(-50%); } html[dir='ltr'] #toolbarViewerLeft, html[dir='rtl'] #toolbarViewerRight { - position: absolute; - top: 0; - left: 0; + float: left; } html[dir='ltr'] #toolbarViewerRight, html[dir='rtl'] #toolbarViewerLeft { - position: absolute; - top: 0; - right: 0; + float: right; } html[dir='ltr'] #toolbarViewerLeft > *, html[dir='ltr'] #toolbarViewerMiddle > *, html[dir='ltr'] #toolbarViewerRight > *, -html[dir='ltr'] .findbar > * { +html[dir='ltr'] .findbar * { position: relative; float: left; } html[dir='rtl'] #toolbarViewerLeft > *, html[dir='rtl'] #toolbarViewerMiddle > *, html[dir='rtl'] #toolbarViewerRight > *, -html[dir='rtl'] .findbar > * { +html[dir='rtl'] .findbar * { position: relative; float: right; } @@ -752,10 +836,6 @@ html[dir='rtl'] .splitToolbarButton > .toolbarButton { opacity: .5; } -.toolbarButton.group { - margin-right: 0; -} - .splitToolbarButton.toggled .toolbarButton { margin: 0; } @@ -993,12 +1073,6 @@ html[dir='rtl'] .toolbarButton:first-child { height: 1px; } -.toolbarButtonFlexibleSpacer { - -webkit-box-flex: 1; - -moz-box-flex: 1; - min-width: 30px; -} - html[dir='ltr'] #findPrevious { margin-left: 3px; } @@ -1142,6 +1216,24 @@ html[dir="rtl"] #viewOutline.toolbarButton::before { content: url(images/toolbarButton-search.png); } +.toolbarButton.pdfSidebarNotification::after { + position: absolute; + display: inline-block; + top: 1px; + /* Create a filled circle, with a diameter of 9 pixels, using only CSS: */ + content: ''; + background-color: #70DB55; + height: 9px; + width: 9px; + border-radius: 50%; +} +html[dir='ltr'] .toolbarButton.pdfSidebarNotification::after { + left: 17px; +} +html[dir='rtl'] .toolbarButton.pdfSidebarNotification::after { + right: 17px; +} + .secondaryToolbarButton { position: relative; margin: 0 0 4px 0; @@ -1190,6 +1282,10 @@ html[dir="rtl"] .secondaryToolbarButton > span { content: url(images/secondaryToolbarButton-rotateCw.png); } +.secondaryToolbarButton.selectTool::before { + content: url(images/secondaryToolbarButton-selectTool.png); +} + .secondaryToolbarButton.handTool::before { content: url(images/secondaryToolbarButton-handTool.png); } @@ -1915,6 +2011,10 @@ html[dir='rtl'] #documentPropertiesOverlay .row > * { content: url(images/secondaryToolbarButton-rotateCw@2x.png); } + .secondaryToolbarButton.selectTool::before { + content: url(images/secondaryToolbarButton-selectTool@2x.png); + } + .secondaryToolbarButton.handTool::before { content: url(images/secondaryToolbarButton-handTool@2x.png); } @@ -1980,21 +2080,29 @@ html[dir='rtl'] #documentPropertiesOverlay .row > * { display: none; } - /* Rules for browsers that support mozPrintCallback */ - body[data-mozPrintCallback] #outerContainer { + /* Rules for browsers that support PDF.js printing */ + body[data-pdfjsprinting] #outerContainer { display: none; } - body[data-mozPrintCallback] #printContainer { + body[data-pdfjsprinting] #printContainer { display: block; } + #printContainer { + height: 100%; + } /* wrapper around (scaled) print canvas elements */ #printContainer > div { position: relative; top: 0; left: 0; - overflow: hidden; + width: 1px; + height: 1px; + overflow: visible; + page-break-after: always; + page-break-inside: avoid; } - #printContainer canvas { + #printContainer canvas, + #printContainer img { display: block; } } @@ -2005,38 +2113,47 @@ html[dir='rtl'] #documentPropertiesOverlay .row > * { display: none; } -@media all and (max-width: 960px) { - html[dir='ltr'] #outerContainer.sidebarMoving .outerCenter, - html[dir='ltr'] #outerContainer.sidebarOpen .outerCenter { - float: left; - left: 205px; - } - html[dir='rtl'] #outerContainer.sidebarMoving .outerCenter, - html[dir='rtl'] #outerContainer.sidebarOpen .outerCenter { - float: right; - right: 205px; +@media all and (max-width: 1040px) { + #outerContainer.sidebarMoving #toolbarViewerMiddle, + #outerContainer.sidebarOpen #toolbarViewerMiddle { + display: table; + margin: auto; + left: auto; + position: inherit; + transform: none; } } -@media all and (max-width: 900px) { +@media all and (max-width: 980px) { + .sidebarMoving .hiddenLargeView, .sidebarOpen .hiddenLargeView { display: none; } + .sidebarMoving .visibleLargeView, .sidebarOpen .visibleLargeView { display: inherit; } } -@media all and (max-width: 860px) { +@media all and (max-width: 900px) { + #toolbarViewerMiddle { + display: table; + margin: auto; + left: auto; + position: inherit; + transform: none; + } + .sidebarMoving .hiddenMediumView, .sidebarOpen .hiddenMediumView { display: none; } + .sidebarMoving .visibleMediumView, .sidebarOpen .visibleMediumView { display: inherit; } } -@media all and (max-width: 770px) { +@media all and (max-width: 840px) { #sidebarContainer { top: 32px; z-index: 100; @@ -2056,15 +2173,6 @@ html[dir='rtl'] #documentPropertiesOverlay .row > * { right: 0px; } - html[dir='ltr'] .outerCenter { - float: left; - left: 205px; - } - html[dir='rtl'] .outerCenter { - float: right; - right: 205px; - } - #outerContainer .hiddenLargeView, #outerContainer .hiddenMediumView { display: inherit; @@ -2075,7 +2183,7 @@ html[dir='rtl'] #documentPropertiesOverlay .row > * { } } -@media all and (max-width: 700px) { +@media all and (max-width: 770px) { #outerContainer .hiddenLargeView { display: none; } @@ -2084,7 +2192,7 @@ html[dir='rtl'] #documentPropertiesOverlay .row > * { } } -@media all and (max-width: 660px) { +@media all and (max-width: 700px) { #outerContainer .hiddenMediumView { display: none; } @@ -2093,30 +2201,26 @@ html[dir='rtl'] #documentPropertiesOverlay .row > * { } } -@media all and (max-width: 600px) { - .hiddenSmallView { +@media all and (max-width: 640px) { + .hiddenSmallView, .hiddenSmallView * { display: none; } .visibleSmallView { display: inherit; } - html[dir='ltr'] #outerContainer.sidebarMoving .outerCenter, - html[dir='ltr'] #outerContainer.sidebarOpen .outerCenter, - html[dir='ltr'] .outerCenter { - left: 156px; - } - html[dir='rtl'] #outerContainer.sidebarMoving .outerCenter, - html[dir='rtl'] #outerContainer.sidebarOpen .outerCenter, - html[dir='rtl'] .outerCenter { - right: 156px; - } .toolbarButtonSpacer { width: 0; } + html[dir='ltr'] .findbar { + left: 38px; + } + html[dir='rtl'] .findbar { + right: 38px; + } } -@media all and (max-width: 510px) { - #scaleSelectContainer, #pageNumberLabel { +@media all and (max-width: 535px) { + #scaleSelectContainer { display: none; } } diff --git a/vendor/pdfjs/web/viewer.js b/vendor/pdfjs/web/viewer.js index ecf1a6a..1e8cd8e 100644 --- a/vendor/pdfjs/web/viewer.js +++ b/vendor/pdfjs/web/viewer.js @@ -1,4 +1,4 @@ -/* Copyright 2012 Mozilla Foundation +/* Copyright 2017 Mozilla Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -12,67 +12,134 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* globals PDFJS, PDFBug, FirefoxCom, Stats, ProgressBar, - DownloadManager, getFileName, getPDFFileNameFromURL, - PDFHistory, Preferences, SidebarView, ViewHistory, Stats, - PDFThumbnailViewer, URL, noContextMenuHandler, SecondaryToolbar, - PasswordPrompt, PDFPresentationMode, PDFDocumentProperties, HandTool, - Promise, PDFLinkService, PDFOutlineView, PDFAttachmentView, - OverlayManager, PDFFindController, PDFFindBar, PDFViewer, - PDFRenderingQueue, PresentationModeState, parseQueryString, - RenderingStates, UNKNOWN_SCALE, DEFAULT_SCALE_VALUE, - IGNORE_CURRENT_POSITION_ON_ZOOM: true */ - -'use strict'; -var DEFAULT_URL = 'compressed.tracemonkey-pldi-09.pdf'; -var DEFAULT_SCALE_DELTA = 1.1; -var MIN_SCALE = 0.25; -var MAX_SCALE = 10.0; -var SCALE_SELECT_CONTAINER_PADDING = 8; -var SCALE_SELECT_PADDING = 22; -var PAGE_NUMBER_LOADING_INDICATOR = 'visiblePageIsLoading'; -var DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT = 5000; +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 33); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.localized = exports.animationStarted = exports.normalizeWheelEventDelta = exports.binarySearchFirstItem = exports.watchScroll = exports.scrollIntoView = exports.getOutputScale = exports.approximateFraction = exports.roundToDivide = exports.getVisibleElements = exports.parseQueryString = exports.noContextMenuHandler = exports.getPDFFileNameFromURL = exports.ProgressBar = exports.EventBus = exports.NullL10n = exports.mozL10n = exports.RendererType = exports.cloneObj = exports.VERTICAL_PADDING = exports.SCROLLBAR_PADDING = exports.MAX_AUTO_SCALE = exports.UNKNOWN_SCALE = exports.MAX_SCALE = exports.MIN_SCALE = exports.DEFAULT_SCALE = exports.DEFAULT_SCALE_VALUE = exports.CSS_UNITS = undefined; -function configure(PDFJS) { - PDFJS.imageResourcesPath = './images/'; - PDFJS.cMapUrl = '../web/cmaps/'; - PDFJS.cMapPacked = true; -} +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -var mozL10n = document.mozL10n || document.webL10n; +var _pdfjsLib = __webpack_require__(1); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var CSS_UNITS = 96.0 / 72.0; var DEFAULT_SCALE_VALUE = 'auto'; var DEFAULT_SCALE = 1.0; +var MIN_SCALE = 0.25; +var MAX_SCALE = 10.0; var UNKNOWN_SCALE = 0; var MAX_AUTO_SCALE = 1.25; var SCROLLBAR_PADDING = 40; var VERTICAL_PADDING = 5; - -function getFileName(url) { - var anchor = url.indexOf('#'); - var query = url.indexOf('?'); - var end = Math.min( - anchor > 0 ? anchor : url.length, - query > 0 ? query : url.length); - return url.substring(url.lastIndexOf('/', end) + 1, end); +var RendererType = { + CANVAS: 'canvas', + SVG: 'svg' +}; +function formatL10nValue(text, args) { + if (!args) { + return text; + } + return text.replace(/\{\{\s*(\w+)\s*\}\}/g, function (all, name) { + return name in args ? args[name] : '{{' + name + '}}'; + }); +} +var NullL10n = { + get: function get(property, args, fallback) { + return Promise.resolve(formatL10nValue(fallback, args)); + }, + translate: function translate(element) { + return Promise.resolve(); + } +}; +_pdfjsLib.PDFJS.disableFullscreen = _pdfjsLib.PDFJS.disableFullscreen === undefined ? false : _pdfjsLib.PDFJS.disableFullscreen; +_pdfjsLib.PDFJS.useOnlyCssZoom = _pdfjsLib.PDFJS.useOnlyCssZoom === undefined ? false : _pdfjsLib.PDFJS.useOnlyCssZoom; +_pdfjsLib.PDFJS.maxCanvasPixels = _pdfjsLib.PDFJS.maxCanvasPixels === undefined ? 16777216 : _pdfjsLib.PDFJS.maxCanvasPixels; +_pdfjsLib.PDFJS.disableHistory = _pdfjsLib.PDFJS.disableHistory === undefined ? false : _pdfjsLib.PDFJS.disableHistory; +_pdfjsLib.PDFJS.disableTextLayer = _pdfjsLib.PDFJS.disableTextLayer === undefined ? false : _pdfjsLib.PDFJS.disableTextLayer; +_pdfjsLib.PDFJS.ignoreCurrentPositionOnZoom = _pdfjsLib.PDFJS.ignoreCurrentPositionOnZoom === undefined ? false : _pdfjsLib.PDFJS.ignoreCurrentPositionOnZoom; +{ + _pdfjsLib.PDFJS.locale = _pdfjsLib.PDFJS.locale === undefined && typeof navigator !== 'undefined' ? navigator.language : _pdfjsLib.PDFJS.locale; } - -/** - * Returns scale factor for the canvas. It makes sense for the HiDPI displays. - * @return {Object} The object with horizontal (sx) and vertical (sy) - scales. The scaled property is set to false if scaling is - not required, true otherwise. - */ function getOutputScale(ctx) { var devicePixelRatio = window.devicePixelRatio || 1; - var backingStoreRatio = ctx.webkitBackingStorePixelRatio || - ctx.mozBackingStorePixelRatio || - ctx.msBackingStorePixelRatio || - ctx.oBackingStorePixelRatio || - ctx.backingStorePixelRatio || 1; + var backingStoreRatio = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1; var pixelRatio = devicePixelRatio / backingStoreRatio; return { sx: pixelRatio, @@ -80,29 +147,17 @@ function getOutputScale(ctx) { scaled: pixelRatio !== 1 }; } +function scrollIntoView(element, spot) { + var skipOverflowHiddenElements = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; -/** - * Scrolls specified element into view of its parent. - * @param {Object} element - The element to be visible. - * @param {Object} spot - An object with optional top and left properties, - * specifying the offset from the top left edge. - * @param {boolean} skipOverflowHiddenElements - Ignore elements that have - * the CSS rule `overflow: hidden;` set. The default is false. - */ -function scrollIntoView(element, spot, skipOverflowHiddenElements) { - // Assuming offsetParent is available (it's not available when viewer is in - // hidden iframe or object). We have to scroll: if the offsetParent is not set - // producing the error. See also animationStartedClosure. var parent = element.offsetParent; if (!parent) { console.error('offsetParent is not set -- cannot scroll'); return; } - var checkOverflow = skipOverflowHiddenElements || false; var offsetY = element.offsetTop + element.clientTop; var offsetX = element.offsetLeft + element.clientLeft; - while (parent.clientHeight === parent.scrollHeight || - (checkOverflow && getComputedStyle(parent).overflow === 'hidden')) { + while (parent.clientHeight === parent.scrollHeight || skipOverflowHiddenElements && getComputedStyle(parent).overflow === 'hidden') { if (parent.dataset._scaleY) { offsetY /= parent.dataset._scaleY; offsetX /= parent.dataset._scaleX; @@ -111,7 +166,7 @@ function scrollIntoView(element, spot, skipOverflowHiddenElements) { offsetX += parent.offsetLeft; parent = parent.offsetParent; if (!parent) { - return; // no need to scroll + return; } } if (spot) { @@ -125,20 +180,13 @@ function scrollIntoView(element, spot, skipOverflowHiddenElements) { } parent.scrollTop = offsetY; } - -/** - * Helper function to start monitoring the scroll event and converting them into - * PDF.js friendly one: with scroll debounce and scroll direction. - */ function watchScroll(viewAreaElement, callback) { var debounceScroll = function debounceScroll(evt) { if (rAF) { return; } - // schedule an invocation of scroll for next animation frame. rAF = window.requestAnimationFrame(function viewAreaElementScrolled() { rAF = null; - var currentY = viewAreaElement.scrollTop; var lastY = state.lastY; if (currentY !== lastY) { @@ -148,24 +196,18 @@ function watchScroll(viewAreaElement, callback) { callback(state); }); }; - var state = { down: true, lastY: viewAreaElement.scrollTop, _eventHandler: debounceScroll }; - var rAF = null; viewAreaElement.addEventListener('scroll', debounceScroll, true); return state; } - -/** - * Helper function to parse query string (e.g. ?param1=value&parm2=...). - */ function parseQueryString(query) { var parts = query.split('&'); - var params = {}; + var params = Object.create(null); for (var i = 0, ii = parts.length; i < ii; ++i) { var param = parts[i].split('='); var key = param[0].toLowerCase(); @@ -174,29 +216,17 @@ function parseQueryString(query) { } return params; } - -/** - * Use binary search to find the index of the first item in a given array which - * passes a given condition. The items are expected to be sorted in the sense - * that if the condition is true for one item in the array, then it is also true - * for all following items. - * - * @returns {Number} Index of the first array element to pass the test, - * or |items.length| if no such element exists. - */ function binarySearchFirstItem(items, condition) { var minIndex = 0; var maxIndex = items.length - 1; - if (items.length === 0 || !condition(items[maxIndex])) { return items.length; } if (condition(items[minIndex])) { return minIndex; } - while (minIndex < maxIndex) { - var currentIndex = (minIndex + maxIndex) >> 1; + var currentIndex = minIndex + maxIndex >> 1; var currentItem = items[currentIndex]; if (condition(currentItem)) { maxIndex = currentIndex; @@ -204,18 +234,9 @@ function binarySearchFirstItem(items, condition) { minIndex = currentIndex + 1; } } - return minIndex; /* === maxIndex */ + return minIndex; } - -/** - * Approximates float number as a fraction using Farey sequence (max order - * of 8). - * @param {number} x - Positive float number. - * @returns {Array} Estimated fraction: the first array item is a numerator, - * the second one is a denominator. - */ function approximateFraction(x) { - // Fast paths for int numbers or their inversions. if (Math.floor(x) === x) { return [x, 1]; } @@ -223,78 +244,77 @@ function approximateFraction(x) { var limit = 8; if (xinv > limit) { return [1, limit]; - } else if (Math.floor(xinv) === xinv) { + } else if (Math.floor(xinv) === xinv) { return [1, xinv]; } - var x_ = x > 1 ? xinv : x; - // a/b and c/d are neighbours in Farey sequence. - var a = 0, b = 1, c = 1, d = 1; - // Limiting search to order 8. + var a = 0, + b = 1, + c = 1, + d = 1; while (true) { - // Generating next term in sequence (order of q). - var p = a + c, q = b + d; + var p = a + c, + q = b + d; if (q > limit) { break; } if (x_ <= p / q) { - c = p; d = q; + c = p; + d = q; } else { - a = p; b = q; + a = p; + b = q; } } - // Select closest of the neighbours to x. + var result = void 0; if (x_ - a / b < c / d - x_) { - return x_ === x ? [a, b] : [b, a]; + result = x_ === x ? [a, b] : [b, a]; } else { - return x_ === x ? [c, d] : [d, c]; + result = x_ === x ? [c, d] : [d, c]; } + return result; } - function roundToDivide(x, div) { var r = x % div; return r === 0 ? x : Math.round(x - r + div); } +function getVisibleElements(scrollEl, views) { + var sortByVisibility = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; -/** - * Generic helper to find out what elements are visible within a scroll pane. - */ -function getVisibleElements(scrollEl, views, sortByVisibility) { - var top = scrollEl.scrollTop, bottom = top + scrollEl.clientHeight; - var left = scrollEl.scrollLeft, right = left + scrollEl.clientWidth; - + var top = scrollEl.scrollTop, + bottom = top + scrollEl.clientHeight; + var left = scrollEl.scrollLeft, + right = left + scrollEl.clientWidth; function isElementBottomBelowViewTop(view) { var element = view.div; - var elementBottom = - element.offsetTop + element.clientTop + element.clientHeight; + var elementBottom = element.offsetTop + element.clientTop + element.clientHeight; return elementBottom > top; } - - var visible = [], view, element; - var currentHeight, viewHeight, hiddenHeight, percentHeight; - var currentWidth, viewWidth; - var firstVisibleElementInd = (views.length === 0) ? 0 : - binarySearchFirstItem(views, isElementBottomBelowViewTop); - + var visible = [], + view = void 0, + element = void 0; + var currentHeight = void 0, + viewHeight = void 0, + hiddenHeight = void 0, + percentHeight = void 0; + var currentWidth = void 0, + viewWidth = void 0; + var firstVisibleElementInd = views.length === 0 ? 0 : binarySearchFirstItem(views, isElementBottomBelowViewTop); for (var i = firstVisibleElementInd, ii = views.length; i < ii; i++) { view = views[i]; element = view.div; currentHeight = element.offsetTop + element.clientTop; viewHeight = element.clientHeight; - if (currentHeight > bottom) { break; } - currentWidth = element.offsetLeft + element.clientLeft; viewWidth = element.clientWidth; if (currentWidth + viewWidth < left || currentWidth > right) { continue; } - hiddenHeight = Math.max(0, top - currentHeight) + - Math.max(0, currentHeight + viewHeight - bottom); - percentHeight = ((viewHeight - hiddenHeight) * 100 / viewHeight) | 0; - + hiddenHeight = Math.max(0, top - currentHeight) + Math.max(0, currentHeight + viewHeight - bottom); + percentHeight = (viewHeight - hiddenHeight) * 100 / viewHeight | 0; visible.push({ id: view.id, x: currentWidth, @@ -303,129 +323,191 @@ function getVisibleElements(scrollEl, views, sortByVisibility) { percent: percentHeight }); } - var first = visible[0]; var last = visible[visible.length - 1]; - if (sortByVisibility) { - visible.sort(function(a, b) { + visible.sort(function (a, b) { var pc = a.percent - b.percent; if (Math.abs(pc) > 0.001) { return -pc; } - return a.id - b.id; // ensure stability + return a.id - b.id; }); } - return {first: first, last: last, views: visible}; + return { + first: first, + last: last, + views: visible + }; } - -/** - * Event handler to suppress context menu. - */ -function noContextMenuHandler(e) { - e.preventDefault(); +function noContextMenuHandler(evt) { + evt.preventDefault(); +} +function isDataSchema(url) { + var i = 0, + ii = url.length; + while (i < ii && url[i].trim() === '') { + i++; + } + return url.substr(i, 5).toLowerCase() === 'data:'; } - -/** - * Returns the filename or guessed filename from the url (see issue 3455). - * url {String} The original PDF location. - * @return {String} Guessed PDF file name. - */ function getPDFFileNameFromURL(url) { - var reURI = /^(?:([^:]+:)?\/\/[^\/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/; - // SCHEME HOST 1.PATH 2.QUERY 3.REF - // Pattern to get last matching NAME.pdf + var defaultFilename = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'document.pdf'; + + if (isDataSchema(url)) { + console.warn('getPDFFileNameFromURL: ' + 'ignoring "data:" URL for performance reasons.'); + return defaultFilename; + } + var reURI = /^(?:(?:[^:]+:)?\/\/[^\/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/; var reFilename = /[^\/?#=]+\.pdf\b(?!.*\.pdf\b)/i; var splitURI = reURI.exec(url); - var suggestedFilename = reFilename.exec(splitURI[1]) || - reFilename.exec(splitURI[2]) || - reFilename.exec(splitURI[3]); + var suggestedFilename = reFilename.exec(splitURI[1]) || reFilename.exec(splitURI[2]) || reFilename.exec(splitURI[3]); if (suggestedFilename) { suggestedFilename = suggestedFilename[0]; if (suggestedFilename.indexOf('%') !== -1) { - // URL-encoded %2Fpath%2Fto%2Ffile.pdf should be file.pdf try { - suggestedFilename = - reFilename.exec(decodeURIComponent(suggestedFilename))[0]; - } catch(e) { // Possible (extremely rare) errors: - // URIError "Malformed URI", e.g. for "%AA.pdf" - // TypeError "null has no properties", e.g. for "%2F.pdf" - } + suggestedFilename = reFilename.exec(decodeURIComponent(suggestedFilename))[0]; + } catch (ex) {} } } - return suggestedFilename || 'document.pdf'; + return suggestedFilename || defaultFilename; +} +function normalizeWheelEventDelta(evt) { + var delta = Math.sqrt(evt.deltaX * evt.deltaX + evt.deltaY * evt.deltaY); + var angle = Math.atan2(evt.deltaY, evt.deltaX); + if (-0.25 * Math.PI < angle && angle < 0.75 * Math.PI) { + delta = -delta; + } + var MOUSE_DOM_DELTA_PIXEL_MODE = 0; + var MOUSE_DOM_DELTA_LINE_MODE = 1; + var MOUSE_PIXELS_PER_LINE = 30; + var MOUSE_LINES_PER_PAGE = 30; + if (evt.deltaMode === MOUSE_DOM_DELTA_PIXEL_MODE) { + delta /= MOUSE_PIXELS_PER_LINE * MOUSE_LINES_PER_PAGE; + } else if (evt.deltaMode === MOUSE_DOM_DELTA_LINE_MODE) { + delta /= MOUSE_LINES_PER_PAGE; + } + return delta; } +function cloneObj(obj) { + var result = Object.create(null); + for (var i in obj) { + if (Object.prototype.hasOwnProperty.call(obj, i)) { + result[i] = obj[i]; + } + } + return result; +} +var animationStarted = new Promise(function (resolve) { + window.requestAnimationFrame(resolve); +}); +var mozL10n = void 0; +var localized = Promise.resolve(); -var ProgressBar = (function ProgressBarClosure() { +var EventBus = function () { + function EventBus() { + _classCallCheck(this, EventBus); - function clamp(v, min, max) { - return Math.min(Math.max(v, min), max); + this._listeners = Object.create(null); } - function ProgressBar(id, opts) { - this.visible = true; + _createClass(EventBus, [{ + key: 'on', + value: function on(eventName, listener) { + var eventListeners = this._listeners[eventName]; + if (!eventListeners) { + eventListeners = []; + this._listeners[eventName] = eventListeners; + } + eventListeners.push(listener); + } + }, { + key: 'off', + value: function off(eventName, listener) { + var eventListeners = this._listeners[eventName]; + var i = void 0; + if (!eventListeners || (i = eventListeners.indexOf(listener)) < 0) { + return; + } + eventListeners.splice(i, 1); + } + }, { + key: 'dispatch', + value: function dispatch(eventName) { + var eventListeners = this._listeners[eventName]; + if (!eventListeners || eventListeners.length === 0) { + return; + } + var args = Array.prototype.slice.call(arguments, 1); + eventListeners.slice(0).forEach(function (listener) { + listener.apply(null, args); + }); + } + }]); - // Fetch the sub-elements for later. - this.div = document.querySelector(id + ' .progress'); + return EventBus; +}(); - // Get the loading bar element, so it can be resized to fit the viewer. - this.bar = this.div.parentNode; +function clamp(v, min, max) { + return Math.min(Math.max(v, min), max); +} - // Get options, with sensible defaults. - this.height = opts.height || 100; - this.width = opts.width || 100; - this.units = opts.units || '%'; +var ProgressBar = function () { + function ProgressBar(id) { + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + height = _ref.height, + width = _ref.width, + units = _ref.units; - // Initialize heights. + _classCallCheck(this, ProgressBar); + + this.visible = true; + this.div = document.querySelector(id + ' .progress'); + this.bar = this.div.parentNode; + this.height = height || 100; + this.width = width || 100; + this.units = units || '%'; this.div.style.height = this.height + this.units; this.percent = 0; } - ProgressBar.prototype = { - - updateBar: function ProgressBar_updateBar() { + _createClass(ProgressBar, [{ + key: '_updateBar', + value: function _updateBar() { if (this._indeterminate) { this.div.classList.add('indeterminate'); this.div.style.width = this.width + this.units; return; } - this.div.classList.remove('indeterminate'); var progressSize = this.width * this._percent / 100; this.div.style.width = progressSize + this.units; - }, - - get percent() { - return this._percent; - }, - - set percent(val) { - this._indeterminate = isNaN(val); - this._percent = clamp(val, 0, 100); - this.updateBar(); - }, - - setWidth: function ProgressBar_setWidth(viewer) { - if (viewer) { - var container = viewer.parentNode; - var scrollbarWidth = container.offsetWidth - viewer.offsetWidth; - if (scrollbarWidth > 0) { - this.bar.setAttribute('style', 'width: calc(100% - ' + - scrollbarWidth + 'px);'); - } + } + }, { + key: 'setWidth', + value: function setWidth(viewer) { + if (!viewer) { + return; } - }, - - hide: function ProgressBar_hide() { + var container = viewer.parentNode; + var scrollbarWidth = container.offsetWidth - viewer.offsetWidth; + if (scrollbarWidth > 0) { + this.bar.setAttribute('style', 'width: calc(100% - ' + scrollbarWidth + 'px);'); + } + } + }, { + key: 'hide', + value: function hide() { if (!this.visible) { return; } this.visible = false; this.bar.classList.add('hidden'); document.body.classList.remove('loadingInProgress'); - }, - - show: function ProgressBar_show() { + } + }, { + key: 'show', + value: function show() { if (this.visible) { return; } @@ -433,771 +515,2717 @@ var ProgressBar = (function ProgressBarClosure() { document.body.classList.add('loadingInProgress'); this.bar.classList.remove('hidden'); } - }; + }, { + key: 'percent', + get: function get() { + return this._percent; + }, + set: function set(val) { + this._indeterminate = isNaN(val); + this._percent = clamp(val, 0, 100); + this._updateBar(); + } + }]); return ProgressBar; -})(); - - - -var DEFAULT_PREFERENCES = { - showPreviousViewOnLoad: true, - defaultZoomValue: '', - sidebarViewOnLoad: 0, - enableHandToolOnLoad: false, - enableWebGL: false, - pdfBugEnabled: false, - disableRange: false, - disableStream: false, - disableAutoFetch: false, - disableFontFace: false, - disableTextLayer: false, - useOnlyCssZoom: false, - externalLinkTarget: 0, -}; +}(); + +exports.CSS_UNITS = CSS_UNITS; +exports.DEFAULT_SCALE_VALUE = DEFAULT_SCALE_VALUE; +exports.DEFAULT_SCALE = DEFAULT_SCALE; +exports.MIN_SCALE = MIN_SCALE; +exports.MAX_SCALE = MAX_SCALE; +exports.UNKNOWN_SCALE = UNKNOWN_SCALE; +exports.MAX_AUTO_SCALE = MAX_AUTO_SCALE; +exports.SCROLLBAR_PADDING = SCROLLBAR_PADDING; +exports.VERTICAL_PADDING = VERTICAL_PADDING; +exports.cloneObj = cloneObj; +exports.RendererType = RendererType; +exports.mozL10n = mozL10n; +exports.NullL10n = NullL10n; +exports.EventBus = EventBus; +exports.ProgressBar = ProgressBar; +exports.getPDFFileNameFromURL = getPDFFileNameFromURL; +exports.noContextMenuHandler = noContextMenuHandler; +exports.parseQueryString = parseQueryString; +exports.getVisibleElements = getVisibleElements; +exports.roundToDivide = roundToDivide; +exports.approximateFraction = approximateFraction; +exports.getOutputScale = getOutputScale; +exports.scrollIntoView = scrollIntoView; +exports.watchScroll = watchScroll; +exports.binarySearchFirstItem = binarySearchFirstItem; +exports.normalizeWheelEventDelta = normalizeWheelEventDelta; +exports.animationStarted = animationStarted; +exports.localized = localized; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var pdfjsLib; +if (typeof window !== 'undefined' && window['pdfjs-dist/build/pdf']) { + pdfjsLib = window['pdfjs-dist/build/pdf']; +} else { + pdfjsLib = require('../build/pdf.js'); +} +module.exports = pdfjsLib; +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { -var SidebarView = { - NONE: 0, - THUMBS: 1, - OUTLINE: 2, - ATTACHMENTS: 3 -}; +"use strict"; -/** - * Preferences - Utility for storing persistent settings. - * Used for settings that should be applied to all opened documents, - * or every time the viewer is loaded. - */ -var Preferences = { - prefs: Object.create(DEFAULT_PREFERENCES), - isInitializedPromiseResolved: false, - initializedPromise: null, - - /** - * Initialize and fetch the current preference values from storage. - * @return {Promise} A promise that is resolved when the preferences - * have been initialized. - */ - initialize: function preferencesInitialize() { - return this.initializedPromise = - this._readFromStorage(DEFAULT_PREFERENCES).then(function(prefObj) { - this.isInitializedPromiseResolved = true; - if (prefObj) { - this.prefs = prefObj; - } - }.bind(this)); - }, - /** - * Stub function for writing preferences to storage. - * NOTE: This should be overridden by a build-specific function defined below. - * @param {Object} prefObj The preferences that should be written to storage. - * @return {Promise} A promise that is resolved when the preference values - * have been written. - */ - _writeToStorage: function preferences_writeToStorage(prefObj) { - return Promise.resolve(); - }, +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getGlobalEventBus = exports.attachDOMEventsToEventBus = undefined; - /** - * Stub function for reading preferences from storage. - * NOTE: This should be overridden by a build-specific function defined below. - * @param {Object} prefObj The preferences that should be read from storage. - * @return {Promise} A promise that is resolved with an {Object} containing - * the preferences that have been read. - */ - _readFromStorage: function preferences_readFromStorage(prefObj) { - return Promise.resolve(); - }, +var _ui_utils = __webpack_require__(0); - /** - * Reset the preferences to their default values and update storage. - * @return {Promise} A promise that is resolved when the preference values - * have been reset. - */ - reset: function preferencesReset() { - return this.initializedPromise.then(function() { - this.prefs = Object.create(DEFAULT_PREFERENCES); - return this._writeToStorage(DEFAULT_PREFERENCES); - }.bind(this)); - }, +function attachDOMEventsToEventBus(eventBus) { + eventBus.on('documentload', function () { + var event = document.createEvent('CustomEvent'); + event.initCustomEvent('documentload', true, true, {}); + window.dispatchEvent(event); + }); + eventBus.on('pagerendered', function (evt) { + var event = document.createEvent('CustomEvent'); + event.initCustomEvent('pagerendered', true, true, { + pageNumber: evt.pageNumber, + cssTransform: evt.cssTransform + }); + evt.source.div.dispatchEvent(event); + }); + eventBus.on('textlayerrendered', function (evt) { + var event = document.createEvent('CustomEvent'); + event.initCustomEvent('textlayerrendered', true, true, { pageNumber: evt.pageNumber }); + evt.source.textLayerDiv.dispatchEvent(event); + }); + eventBus.on('pagechange', function (evt) { + var event = document.createEvent('UIEvents'); + event.initUIEvent('pagechange', true, true, window, 0); + event.pageNumber = evt.pageNumber; + evt.source.container.dispatchEvent(event); + }); + eventBus.on('pagesinit', function (evt) { + var event = document.createEvent('CustomEvent'); + event.initCustomEvent('pagesinit', true, true, null); + evt.source.container.dispatchEvent(event); + }); + eventBus.on('pagesloaded', function (evt) { + var event = document.createEvent('CustomEvent'); + event.initCustomEvent('pagesloaded', true, true, { pagesCount: evt.pagesCount }); + evt.source.container.dispatchEvent(event); + }); + eventBus.on('scalechange', function (evt) { + var event = document.createEvent('UIEvents'); + event.initUIEvent('scalechange', true, true, window, 0); + event.scale = evt.scale; + event.presetValue = evt.presetValue; + evt.source.container.dispatchEvent(event); + }); + eventBus.on('updateviewarea', function (evt) { + var event = document.createEvent('UIEvents'); + event.initUIEvent('updateviewarea', true, true, window, 0); + event.location = evt.location; + evt.source.container.dispatchEvent(event); + }); + eventBus.on('find', function (evt) { + if (evt.source === window) { + return; + } + var event = document.createEvent('CustomEvent'); + event.initCustomEvent('find' + evt.type, true, true, { + query: evt.query, + phraseSearch: evt.phraseSearch, + caseSensitive: evt.caseSensitive, + highlightAll: evt.highlightAll, + findPrevious: evt.findPrevious + }); + window.dispatchEvent(event); + }); + eventBus.on('attachmentsloaded', function (evt) { + var event = document.createEvent('CustomEvent'); + event.initCustomEvent('attachmentsloaded', true, true, { attachmentsCount: evt.attachmentsCount }); + evt.source.container.dispatchEvent(event); + }); + eventBus.on('sidebarviewchanged', function (evt) { + var event = document.createEvent('CustomEvent'); + event.initCustomEvent('sidebarviewchanged', true, true, { view: evt.view }); + evt.source.outerContainer.dispatchEvent(event); + }); + eventBus.on('pagemode', function (evt) { + var event = document.createEvent('CustomEvent'); + event.initCustomEvent('pagemode', true, true, { mode: evt.mode }); + evt.source.pdfViewer.container.dispatchEvent(event); + }); + eventBus.on('namedaction', function (evt) { + var event = document.createEvent('CustomEvent'); + event.initCustomEvent('namedaction', true, true, { action: evt.action }); + evt.source.pdfViewer.container.dispatchEvent(event); + }); + eventBus.on('presentationmodechanged', function (evt) { + var event = document.createEvent('CustomEvent'); + event.initCustomEvent('presentationmodechanged', true, true, { + active: evt.active, + switchInProgress: evt.switchInProgress + }); + window.dispatchEvent(event); + }); + eventBus.on('outlineloaded', function (evt) { + var event = document.createEvent('CustomEvent'); + event.initCustomEvent('outlineloaded', true, true, { outlineCount: evt.outlineCount }); + evt.source.container.dispatchEvent(event); + }); +} +var globalEventBus = null; +function getGlobalEventBus() { + if (globalEventBus) { + return globalEventBus; + } + globalEventBus = new _ui_utils.EventBus(); + attachDOMEventsToEventBus(globalEventBus); + return globalEventBus; +} +exports.attachDOMEventsToEventBus = attachDOMEventsToEventBus; +exports.getGlobalEventBus = getGlobalEventBus; - /** - * Replace the current preference values with the ones from storage. - * @return {Promise} A promise that is resolved when the preference values - * have been updated. - */ - reload: function preferencesReload() { - return this.initializedPromise.then(function () { - this._readFromStorage(DEFAULT_PREFERENCES).then(function(prefObj) { - if (prefObj) { - this.prefs = prefObj; - } - }.bind(this)); - }.bind(this)); - }, +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Set the value of a preference. - * @param {string} name The name of the preference that should be changed. - * @param {boolean|number|string} value The new value of the preference. - * @return {Promise} A promise that is resolved when the value has been set, - * provided that the preference exists and the types match. - */ - set: function preferencesSet(name, value) { - return this.initializedPromise.then(function () { - if (DEFAULT_PREFERENCES[name] === undefined) { - throw new Error('preferencesSet: \'' + name + '\' is undefined.'); - } else if (value === undefined) { - throw new Error('preferencesSet: no value is specified.'); - } - var valueType = typeof value; - var defaultType = typeof DEFAULT_PREFERENCES[name]; - - if (valueType !== defaultType) { - if (valueType === 'number' && defaultType === 'string') { - value = value.toString(); - } else { - throw new Error('Preferences_set: \'' + value + '\' is a \"' + - valueType + '\", expected \"' + defaultType + '\".'); - } - } else { - if (valueType === 'number' && (value | 0) !== value) { - throw new Error('Preferences_set: \'' + value + - '\' must be an \"integer\".'); - } - } - this.prefs[name] = value; - return this._writeToStorage(this.prefs); - }.bind(this)); - }, +"use strict"; - /** - * Get the value of a preference. - * @param {string} name The name of the preference whose value is requested. - * @return {Promise} A promise that is resolved with a {boolean|number|string} - * containing the value of the preference. - */ - get: function preferencesGet(name) { - return this.initializedPromise.then(function () { - var defaultValue = DEFAULT_PREFERENCES[name]; - - if (defaultValue === undefined) { - throw new Error('preferencesGet: \'' + name + '\' is undefined.'); - } else { - var prefValue = this.prefs[name]; - if (prefValue !== undefined) { - return prefValue; - } - } - return defaultValue; - }.bind(this)); - } -}; +Object.defineProperty(exports, "__esModule", { + value: true +}); +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -Preferences._writeToStorage = function (prefObj) { - return new Promise(function (resolve) { - localStorage.setItem('pdfjs.preferences', JSON.stringify(prefObj)); - resolve(); - }); -}; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -Preferences._readFromStorage = function (prefObj) { - return new Promise(function (resolve) { - var readPrefs = JSON.parse(localStorage.getItem('pdfjs.preferences')); - resolve(readPrefs); - }); +var CLEANUP_TIMEOUT = 30000; +var RenderingStates = { + INITIAL: 0, + RUNNING: 1, + PAUSED: 2, + FINISHED: 3 }; +var PDFRenderingQueue = function () { + function PDFRenderingQueue() { + _classCallCheck(this, PDFRenderingQueue); -(function mozPrintCallbackPolyfillClosure() { - if ('mozPrintCallback' in document.createElement('canvas')) { - return; + this.pdfViewer = null; + this.pdfThumbnailViewer = null; + this.onIdle = null; + this.highestPriorityPage = null; + this.idleTimeout = null; + this.printing = false; + this.isThumbnailViewEnabled = false; } - // Cause positive result on feature-detection: - HTMLCanvasElement.prototype.mozPrintCallback = undefined; - - var canvases; // During print task: non-live NodeList of <canvas> elements - var index; // Index of <canvas> element that is being processed - var print = window.print; - window.print = function print() { - if (canvases) { - console.warn('Ignored window.print() because of a pending print job.'); - return; + _createClass(PDFRenderingQueue, [{ + key: "setViewer", + value: function setViewer(pdfViewer) { + this.pdfViewer = pdfViewer; } - try { - dispatchEvent('beforeprint'); - } finally { - canvases = document.querySelectorAll('canvas'); - index = -1; - next(); + }, { + key: "setThumbnailViewer", + value: function setThumbnailViewer(pdfThumbnailViewer) { + this.pdfThumbnailViewer = pdfThumbnailViewer; } - }; - - function dispatchEvent(eventType) { - var event = document.createEvent('CustomEvent'); - event.initCustomEvent(eventType, false, false, 'custom'); - window.dispatchEvent(event); - } - - function next() { - if (!canvases) { - return; // Print task cancelled by user (state reset in abort()) + }, { + key: "isHighestPriority", + value: function isHighestPriority(view) { + return this.highestPriorityPage === view.renderingId; } - - renderProgress(); - if (++index < canvases.length) { - var canvas = canvases[index]; - if (typeof canvas.mozPrintCallback === 'function') { - canvas.mozPrintCallback({ - context: canvas.getContext('2d'), - abort: abort, - done: next - }); - } else { - next(); + }, { + key: "renderHighestPriority", + value: function renderHighestPriority(currentlyVisiblePages) { + if (this.idleTimeout) { + clearTimeout(this.idleTimeout); + this.idleTimeout = null; } - } else { - renderProgress(); - print.call(window); - setTimeout(abort, 20); // Tidy-up - } - } - - function abort() { - if (canvases) { - canvases = null; - renderProgress(); - dispatchEvent('afterprint'); - } - } - - function renderProgress() { - var progressContainer = document.getElementById('mozPrintCallback-shim'); - if (canvases && canvases.length) { - var progress = Math.round(100 * index / canvases.length); - var progressBar = progressContainer.querySelector('progress'); - var progressPerc = progressContainer.querySelector('.relative-progress'); - progressBar.value = progress; - progressPerc.textContent = progress + '%'; - progressContainer.removeAttribute('hidden'); - progressContainer.onclick = abort; - } else { - progressContainer.setAttribute('hidden', ''); - } - } - - var hasAttachEvent = !!document.attachEvent; - - window.addEventListener('keydown', function(event) { - // Intercept Cmd/Ctrl + P in all browsers. - // Also intercept Cmd/Ctrl + Shift + P in Chrome and Opera - if (event.keyCode === 80/*P*/ && (event.ctrlKey || event.metaKey) && - !event.altKey && (!event.shiftKey || window.chrome || window.opera)) { - window.print(); - if (hasAttachEvent) { - // Only attachEvent can cancel Ctrl + P dialog in IE <=10 - // attachEvent is gone in IE11, so the dialog will re-appear in IE11. + if (this.pdfViewer.forceRendering(currentlyVisiblePages)) { return; } - event.preventDefault(); - if (event.stopImmediatePropagation) { - event.stopImmediatePropagation(); - } else { - event.stopPropagation(); + if (this.pdfThumbnailViewer && this.isThumbnailViewEnabled) { + if (this.pdfThumbnailViewer.forceRendering()) { + return; + } + } + if (this.printing) { + return; + } + if (this.onIdle) { + this.idleTimeout = setTimeout(this.onIdle.bind(this), CLEANUP_TIMEOUT); } - return; - } - if (event.keyCode === 27 && canvases) { // Esc - abort(); } - }, true); - if (hasAttachEvent) { - document.attachEvent('onkeydown', function(event) { - event = event || window.event; - if (event.keyCode === 80/*P*/ && event.ctrlKey) { - event.keyCode = 0; + }, { + key: "getHighestPriority", + value: function getHighestPriority(visible, views, scrolledDown) { + var visibleViews = visible.views; + var numVisible = visibleViews.length; + if (numVisible === 0) { return false; } - }); - } - - if ('onbeforeprint' in window) { - // Do not propagate before/afterprint events when they are not triggered - // from within this polyfill. (FF/IE). - var stopPropagationIfNeeded = function(event) { - if (event.detail !== 'custom' && event.stopImmediatePropagation) { - event.stopImmediatePropagation(); + for (var i = 0; i < numVisible; ++i) { + var view = visibleViews[i].view; + if (!this.isViewFinished(view)) { + return view; + } } - }; - window.addEventListener('beforeprint', stopPropagationIfNeeded, false); - window.addEventListener('afterprint', stopPropagationIfNeeded, false); - } -})(); - - - -var DownloadManager = (function DownloadManagerClosure() { - - function download(blobUrl, filename) { - var a = document.createElement('a'); - if (a.click) { - // Use a.click() if available. Otherwise, Chrome might show - // "Unsafe JavaScript attempt to initiate a navigation change - // for frame with URL" and not open the PDF at all. - // Supported by (not mentioned = untested): - // - Firefox 6 - 19 (4- does not support a.click, 5 ignores a.click) - // - Chrome 19 - 26 (18- does not support a.click) - // - Opera 9 - 12.15 - // - Internet Explorer 6 - 10 - // - Safari 6 (5.1- does not support a.click) - a.href = blobUrl; - a.target = '_parent'; - // Use a.download if available. This increases the likelihood that - // the file is downloaded instead of opened by another PDF plugin. - if ('download' in a) { - a.download = filename; - } - // <a> must be in the document for IE and recent Firefox versions. - // (otherwise .click() is ignored) - (document.body || document.documentElement).appendChild(a); - a.click(); - a.parentNode.removeChild(a); - } else { - if (window.top === window && - blobUrl.split('#')[0] === window.location.href.split('#')[0]) { - // If _parent == self, then opening an identical URL with different - // location hash will only cause a navigation, not a download. - var padCharacter = blobUrl.indexOf('?') === -1 ? '?' : '&'; - blobUrl = blobUrl.replace(/#|$/, padCharacter + '$&'); + if (scrolledDown) { + var nextPageIndex = visible.last.id; + if (views[nextPageIndex] && !this.isViewFinished(views[nextPageIndex])) { + return views[nextPageIndex]; + } + } else { + var previousPageIndex = visible.first.id - 2; + if (views[previousPageIndex] && !this.isViewFinished(views[previousPageIndex])) { + return views[previousPageIndex]; + } } - window.open(blobUrl, '_parent'); + return null; } - } - - function DownloadManager() {} + }, { + key: "isViewFinished", + value: function isViewFinished(view) { + return view.renderingState === RenderingStates.FINISHED; + } + }, { + key: "renderView", + value: function renderView(view) { + var _this = this; - DownloadManager.prototype = { - downloadUrl: function DownloadManager_downloadUrl(url, filename) { - if (!PDFJS.isValidUrl(url, true)) { - return; // restricted/invalid URL + switch (view.renderingState) { + case RenderingStates.FINISHED: + return false; + case RenderingStates.PAUSED: + this.highestPriorityPage = view.renderingId; + view.resume(); + break; + case RenderingStates.RUNNING: + this.highestPriorityPage = view.renderingId; + break; + case RenderingStates.INITIAL: + this.highestPriorityPage = view.renderingId; + var continueRendering = function continueRendering() { + _this.renderHighestPriority(); + }; + view.draw().then(continueRendering, continueRendering); + break; } + return true; + } + }]); - download(url + '#pdfjs.action=download', filename); - }, + return PDFRenderingQueue; +}(); - downloadData: function DownloadManager_downloadData(data, filename, - contentType) { - if (navigator.msSaveBlob) { // IE10 and above - return navigator.msSaveBlob(new Blob([data], { type: contentType }), - filename); - } +exports.RenderingStates = RenderingStates; +exports.PDFRenderingQueue = PDFRenderingQueue; - var blobUrl = PDFJS.createObjectURL(data, contentType); - download(blobUrl, filename); - }, +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { - download: function DownloadManager_download(blob, url, filename) { - if (!URL) { - // URL.createObjectURL is not supported - this.downloadUrl(url, filename); - return; - } +"use strict"; - if (navigator.msSaveBlob) { - // IE10 / IE11 - if (!navigator.msSaveBlob(blob, filename)) { - this.downloadUrl(url, filename); - } - return; - } - var blobUrl = URL.createObjectURL(blob); - download(blobUrl, filename); - } - }; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFPrintServiceFactory = exports.DefaultExternalServices = exports.PDFViewerApplication = undefined; - return DownloadManager; -})(); +var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); +var _ui_utils = __webpack_require__(0); +var _pdfjsLib = __webpack_require__(1); +var _pdf_cursor_tools = __webpack_require__(6); +var _pdf_rendering_queue = __webpack_require__(3); -var DEFAULT_VIEW_HISTORY_CACHE_SIZE = 20; +var _pdf_sidebar = __webpack_require__(24); -/** - * View History - This is a utility for saving various view parameters for - * recently opened files. - * - * The way that the view parameters are stored depends on how PDF.js is built, - * for 'node make <flag>' the following cases exist: - * - FIREFOX or MOZCENTRAL - uses sessionStorage. - * - GENERIC or CHROME - uses localStorage, if it is available. - */ -var ViewHistory = (function ViewHistoryClosure() { - function ViewHistory(fingerprint, cacheSize) { - this.fingerprint = fingerprint; - this.cacheSize = cacheSize || DEFAULT_VIEW_HISTORY_CACHE_SIZE; - this.isInitializedPromiseResolved = false; - this.initializedPromise = - this._readFromStorage().then(function (databaseStr) { - this.isInitializedPromiseResolved = true; +var _pdf_viewer = __webpack_require__(27); - var database = JSON.parse(databaseStr || '{}'); - if (!('files' in database)) { - database.files = []; +var _dom_events = __webpack_require__(2); + +var _overlay_manager = __webpack_require__(15); + +var _password_prompt = __webpack_require__(16); + +var _pdf_attachment_viewer = __webpack_require__(17); + +var _pdf_document_properties = __webpack_require__(18); + +var _pdf_find_bar = __webpack_require__(19); + +var _pdf_find_controller = __webpack_require__(7); + +var _pdf_history = __webpack_require__(20); + +var _pdf_link_service = __webpack_require__(5); + +var _pdf_outline_viewer = __webpack_require__(21); + +var _pdf_presentation_mode = __webpack_require__(23); + +var _pdf_thumbnail_viewer = __webpack_require__(26); + +var _secondary_toolbar = __webpack_require__(29); + +var _toolbar = __webpack_require__(31); + +var _view_history = __webpack_require__(32); + +var DEFAULT_SCALE_DELTA = 1.1; +var DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT = 5000; +function configure(PDFJS) { + PDFJS.imageResourcesPath = './images/'; + PDFJS.workerSrc = '../build/pdf.worker.js'; + PDFJS.cMapUrl = '../web/cmaps/'; + PDFJS.cMapPacked = true; +} +var DefaultExternalServices = { + updateFindControlState: function updateFindControlState(data) {}, + initPassiveLoading: function initPassiveLoading(callbacks) {}, + fallback: function fallback(data, callback) {}, + reportTelemetry: function reportTelemetry(data) {}, + createDownloadManager: function createDownloadManager() { + throw new Error('Not implemented: createDownloadManager'); + }, + createPreferences: function createPreferences() { + throw new Error('Not implemented: createPreferences'); + }, + createL10n: function createL10n() { + throw new Error('Not implemented: createL10n'); + }, + + supportsIntegratedFind: false, + supportsDocumentFonts: true, + supportsDocumentColors: true, + supportedMouseWheelZoomModifierKeys: { + ctrlKey: true, + metaKey: true + } +}; +var PDFViewerApplication = { + initialBookmark: document.location.hash.substring(1), + initialDestination: null, + initialized: false, + fellback: false, + appConfig: null, + pdfDocument: null, + pdfLoadingTask: null, + printService: null, + pdfViewer: null, + pdfThumbnailViewer: null, + pdfRenderingQueue: null, + pdfPresentationMode: null, + pdfDocumentProperties: null, + pdfLinkService: null, + pdfHistory: null, + pdfSidebar: null, + pdfOutlineViewer: null, + pdfAttachmentViewer: null, + pdfCursorTools: null, + store: null, + downloadManager: null, + overlayManager: null, + preferences: null, + toolbar: null, + secondaryToolbar: null, + eventBus: null, + l10n: null, + isInitialViewSet: false, + downloadComplete: false, + viewerPrefs: { + sidebarViewOnLoad: _pdf_sidebar.SidebarView.NONE, + pdfBugEnabled: false, + showPreviousViewOnLoad: true, + defaultZoomValue: '', + disablePageMode: false, + disablePageLabels: false, + renderer: 'canvas', + enhanceTextSelection: false, + renderInteractiveForms: false, + enablePrintAutoRotate: false + }, + isViewerEmbedded: window.parent !== window, + url: '', + baseUrl: '', + externalServices: DefaultExternalServices, + _boundEvents: {}, + initialize: function initialize(appConfig) { + var _this = this; + + this.preferences = this.externalServices.createPreferences(); + configure(_pdfjsLib.PDFJS); + this.appConfig = appConfig; + return this._readPreferences().then(function () { + return _this._initializeL10n(); + }).then(function () { + return _this._initializeViewerComponents(); + }).then(function () { + _this.bindEvents(); + _this.bindWindowEvents(); + var appContainer = appConfig.appContainer || document.documentElement; + _this.l10n.translate(appContainer).then(function () { + _this.eventBus.dispatch('localized'); + }); + if (_this.isViewerEmbedded && !_pdfjsLib.PDFJS.isExternalLinkTargetSet()) { + _pdfjsLib.PDFJS.externalLinkTarget = _pdfjsLib.PDFJS.LinkTarget.TOP; } - if (database.files.length >= this.cacheSize) { - database.files.shift(); + _this.initialized = true; + }); + }, + _readPreferences: function _readPreferences() { + var preferences = this.preferences, + viewerPrefs = this.viewerPrefs; + + return Promise.all([preferences.get('enableWebGL').then(function resolved(value) { + _pdfjsLib.PDFJS.disableWebGL = !value; + }), preferences.get('sidebarViewOnLoad').then(function resolved(value) { + viewerPrefs['sidebarViewOnLoad'] = value; + }), preferences.get('pdfBugEnabled').then(function resolved(value) { + viewerPrefs['pdfBugEnabled'] = value; + }), preferences.get('showPreviousViewOnLoad').then(function resolved(value) { + viewerPrefs['showPreviousViewOnLoad'] = value; + }), preferences.get('defaultZoomValue').then(function resolved(value) { + viewerPrefs['defaultZoomValue'] = value; + }), preferences.get('enhanceTextSelection').then(function resolved(value) { + viewerPrefs['enhanceTextSelection'] = value; + }), preferences.get('disableTextLayer').then(function resolved(value) { + if (_pdfjsLib.PDFJS.disableTextLayer === true) { + return; } - var index; - for (var i = 0, length = database.files.length; i < length; i++) { - var branch = database.files[i]; - if (branch.fingerprint === this.fingerprint) { - index = i; - break; + _pdfjsLib.PDFJS.disableTextLayer = value; + }), preferences.get('disableRange').then(function resolved(value) { + if (_pdfjsLib.PDFJS.disableRange === true) { + return; + } + _pdfjsLib.PDFJS.disableRange = value; + }), preferences.get('disableStream').then(function resolved(value) { + if (_pdfjsLib.PDFJS.disableStream === true) { + return; + } + _pdfjsLib.PDFJS.disableStream = value; + }), preferences.get('disableAutoFetch').then(function resolved(value) { + _pdfjsLib.PDFJS.disableAutoFetch = value; + }), preferences.get('disableFontFace').then(function resolved(value) { + if (_pdfjsLib.PDFJS.disableFontFace === true) { + return; + } + _pdfjsLib.PDFJS.disableFontFace = value; + }), preferences.get('useOnlyCssZoom').then(function resolved(value) { + _pdfjsLib.PDFJS.useOnlyCssZoom = value; + }), preferences.get('externalLinkTarget').then(function resolved(value) { + if (_pdfjsLib.PDFJS.isExternalLinkTargetSet()) { + return; + } + _pdfjsLib.PDFJS.externalLinkTarget = value; + }), preferences.get('renderer').then(function resolved(value) { + viewerPrefs['renderer'] = value; + }), preferences.get('renderInteractiveForms').then(function resolved(value) { + viewerPrefs['renderInteractiveForms'] = value; + }), preferences.get('disablePageMode').then(function resolved(value) { + viewerPrefs['disablePageMode'] = value; + }), preferences.get('disablePageLabels').then(function resolved(value) { + viewerPrefs['disablePageLabels'] = value; + }), preferences.get('enablePrintAutoRotate').then(function resolved(value) { + viewerPrefs['enablePrintAutoRotate'] = value; + })]).catch(function (reason) {}); + }, + _initializeL10n: function _initializeL10n() { + if (this.viewerPrefs['pdfBugEnabled']) { + var hash = document.location.hash.substring(1); + var hashParams = (0, _ui_utils.parseQueryString)(hash); + if ('locale' in hashParams) { + _pdfjsLib.PDFJS.locale = hashParams['locale']; + } + } + this.l10n = this.externalServices.createL10n(); + return this.l10n.getDirection().then(function (dir) { + document.getElementsByTagName('html')[0].dir = dir; + }); + }, + _initializeViewerComponents: function _initializeViewerComponents() { + var _this2 = this; + + var appConfig = this.appConfig; + return new Promise(function (resolve, reject) { + _this2.overlayManager = new _overlay_manager.OverlayManager(); + var eventBus = appConfig.eventBus || (0, _dom_events.getGlobalEventBus)(); + _this2.eventBus = eventBus; + var pdfRenderingQueue = new _pdf_rendering_queue.PDFRenderingQueue(); + pdfRenderingQueue.onIdle = _this2.cleanup.bind(_this2); + _this2.pdfRenderingQueue = pdfRenderingQueue; + var pdfLinkService = new _pdf_link_service.PDFLinkService({ eventBus: eventBus }); + _this2.pdfLinkService = pdfLinkService; + var downloadManager = _this2.externalServices.createDownloadManager(); + _this2.downloadManager = downloadManager; + var container = appConfig.mainContainer; + var viewer = appConfig.viewerContainer; + _this2.pdfViewer = new _pdf_viewer.PDFViewer({ + container: container, + viewer: viewer, + eventBus: eventBus, + renderingQueue: pdfRenderingQueue, + linkService: pdfLinkService, + downloadManager: downloadManager, + renderer: _this2.viewerPrefs['renderer'], + l10n: _this2.l10n, + enhanceTextSelection: _this2.viewerPrefs['enhanceTextSelection'], + renderInteractiveForms: _this2.viewerPrefs['renderInteractiveForms'], + enablePrintAutoRotate: _this2.viewerPrefs['enablePrintAutoRotate'] + }); + pdfRenderingQueue.setViewer(_this2.pdfViewer); + pdfLinkService.setViewer(_this2.pdfViewer); + var thumbnailContainer = appConfig.sidebar.thumbnailView; + _this2.pdfThumbnailViewer = new _pdf_thumbnail_viewer.PDFThumbnailViewer({ + container: thumbnailContainer, + renderingQueue: pdfRenderingQueue, + linkService: pdfLinkService, + l10n: _this2.l10n + }); + pdfRenderingQueue.setThumbnailViewer(_this2.pdfThumbnailViewer); + _this2.pdfHistory = new _pdf_history.PDFHistory({ + linkService: pdfLinkService, + eventBus: eventBus + }); + pdfLinkService.setHistory(_this2.pdfHistory); + _this2.findController = new _pdf_find_controller.PDFFindController({ pdfViewer: _this2.pdfViewer }); + _this2.findController.onUpdateResultsCount = function (matchCount) { + if (_this2.supportsIntegratedFind) { + return; } + _this2.findBar.updateResultsCount(matchCount); + }; + _this2.findController.onUpdateState = function (state, previous, matchCount) { + if (_this2.supportsIntegratedFind) { + _this2.externalServices.updateFindControlState({ + result: state, + findPrevious: previous + }); + } else { + _this2.findBar.updateUIState(state, previous, matchCount); + } + }; + _this2.pdfViewer.setFindController(_this2.findController); + var findBarConfig = Object.create(appConfig.findBar); + findBarConfig.findController = _this2.findController; + findBarConfig.eventBus = eventBus; + _this2.findBar = new _pdf_find_bar.PDFFindBar(findBarConfig, _this2.l10n); + _this2.pdfDocumentProperties = new _pdf_document_properties.PDFDocumentProperties(appConfig.documentProperties, _this2.overlayManager, _this2.l10n); + _this2.pdfCursorTools = new _pdf_cursor_tools.PDFCursorTools({ + container: container, + eventBus: eventBus, + preferences: _this2.preferences + }); + _this2.toolbar = new _toolbar.Toolbar(appConfig.toolbar, container, eventBus, _this2.l10n); + _this2.secondaryToolbar = new _secondary_toolbar.SecondaryToolbar(appConfig.secondaryToolbar, container, eventBus); + if (_this2.supportsFullscreen) { + _this2.pdfPresentationMode = new _pdf_presentation_mode.PDFPresentationMode({ + container: container, + viewer: viewer, + pdfViewer: _this2.pdfViewer, + eventBus: eventBus, + contextMenuItems: appConfig.fullscreen + }); } - if (typeof index !== 'number') { - index = database.files.push({fingerprint: this.fingerprint}) - 1; + _this2.passwordPrompt = new _password_prompt.PasswordPrompt(appConfig.passwordOverlay, _this2.overlayManager, _this2.l10n); + _this2.pdfOutlineViewer = new _pdf_outline_viewer.PDFOutlineViewer({ + container: appConfig.sidebar.outlineView, + eventBus: eventBus, + linkService: pdfLinkService + }); + _this2.pdfAttachmentViewer = new _pdf_attachment_viewer.PDFAttachmentViewer({ + container: appConfig.sidebar.attachmentsView, + eventBus: eventBus, + downloadManager: downloadManager + }); + var sidebarConfig = Object.create(appConfig.sidebar); + sidebarConfig.pdfViewer = _this2.pdfViewer; + sidebarConfig.pdfThumbnailViewer = _this2.pdfThumbnailViewer; + sidebarConfig.pdfOutlineViewer = _this2.pdfOutlineViewer; + sidebarConfig.eventBus = eventBus; + _this2.pdfSidebar = new _pdf_sidebar.PDFSidebar(sidebarConfig, _this2.l10n); + _this2.pdfSidebar.onToggled = _this2.forceRendering.bind(_this2); + resolve(undefined); + }); + }, + run: function run(config) { + this.initialize(config).then(webViewerInitialized); + }, + zoomIn: function zoomIn(ticks) { + var newScale = this.pdfViewer.currentScale; + do { + newScale = (newScale * DEFAULT_SCALE_DELTA).toFixed(2); + newScale = Math.ceil(newScale * 10) / 10; + newScale = Math.min(_ui_utils.MAX_SCALE, newScale); + } while (--ticks > 0 && newScale < _ui_utils.MAX_SCALE); + this.pdfViewer.currentScaleValue = newScale; + }, + zoomOut: function zoomOut(ticks) { + var newScale = this.pdfViewer.currentScale; + do { + newScale = (newScale / DEFAULT_SCALE_DELTA).toFixed(2); + newScale = Math.floor(newScale * 10) / 10; + newScale = Math.max(_ui_utils.MIN_SCALE, newScale); + } while (--ticks > 0 && newScale > _ui_utils.MIN_SCALE); + this.pdfViewer.currentScaleValue = newScale; + }, + + get pagesCount() { + return this.pdfDocument ? this.pdfDocument.numPages : 0; + }, + get pageRotation() { + return this.pdfViewer.pagesRotation; + }, + set page(val) { + this.pdfViewer.currentPageNumber = val; + }, + get page() { + return this.pdfViewer.currentPageNumber; + }, + get printing() { + return !!this.printService; + }, + get supportsPrinting() { + return PDFPrintServiceFactory.instance.supportsPrinting; + }, + get supportsFullscreen() { + var support = void 0; + var doc = document.documentElement; + support = !!(doc.requestFullscreen || doc.mozRequestFullScreen || doc.webkitRequestFullScreen || doc.msRequestFullscreen); + if (document.fullscreenEnabled === false || document.mozFullScreenEnabled === false || document.webkitFullscreenEnabled === false || document.msFullscreenEnabled === false) { + support = false; + } + if (support && _pdfjsLib.PDFJS.disableFullscreen === true) { + support = false; + } + return (0, _pdfjsLib.shadow)(this, 'supportsFullscreen', support); + }, + get supportsIntegratedFind() { + return this.externalServices.supportsIntegratedFind; + }, + get supportsDocumentFonts() { + return this.externalServices.supportsDocumentFonts; + }, + get supportsDocumentColors() { + return this.externalServices.supportsDocumentColors; + }, + get loadingBar() { + var bar = new _ui_utils.ProgressBar('#loadingBar'); + return (0, _pdfjsLib.shadow)(this, 'loadingBar', bar); + }, + get supportedMouseWheelZoomModifierKeys() { + return this.externalServices.supportedMouseWheelZoomModifierKeys; + }, + initPassiveLoading: function initPassiveLoading() { + throw new Error('Not implemented: initPassiveLoading'); + }, + setTitleUsingUrl: function setTitleUsingUrl(url) { + this.url = url; + this.baseUrl = url.split('#')[0]; + var title = (0, _ui_utils.getPDFFileNameFromURL)(url, ''); + if (!title) { + try { + title = decodeURIComponent((0, _pdfjsLib.getFilenameFromUrl)(url)) || url; + } catch (ex) { + title = url; } - this.file = database.files[index]; - this.database = database; - }.bind(this)); - } + } + this.setTitle(title); + }, + setTitle: function setTitle(title) { + if (this.isViewerEmbedded) { + return; + } + document.title = title; + }, + close: function close() { + var errorWrapper = this.appConfig.errorWrapper.container; + errorWrapper.setAttribute('hidden', 'true'); + if (!this.pdfLoadingTask) { + return Promise.resolve(); + } + var promise = this.pdfLoadingTask.destroy(); + this.pdfLoadingTask = null; + if (this.pdfDocument) { + this.pdfDocument = null; + this.pdfThumbnailViewer.setDocument(null); + this.pdfViewer.setDocument(null); + this.pdfLinkService.setDocument(null, null); + this.pdfDocumentProperties.setDocument(null, null); + } + this.store = null; + this.isInitialViewSet = false; + this.downloadComplete = false; + this.pdfSidebar.reset(); + this.pdfOutlineViewer.reset(); + this.pdfAttachmentViewer.reset(); + this.findController.reset(); + this.findBar.reset(); + this.toolbar.reset(); + this.secondaryToolbar.reset(); + if (typeof PDFBug !== 'undefined') { + PDFBug.cleanup(); + } + return promise; + }, + open: function open(file, args) { + var _this3 = this; - ViewHistory.prototype = { - _writeToStorage: function ViewHistory_writeToStorage() { - return new Promise(function (resolve) { - var databaseStr = JSON.stringify(this.database); + if (arguments.length > 2 || typeof args === 'number') { + return Promise.reject(new Error('Call of open() with obsolete signature.')); + } + if (this.pdfLoadingTask) { + return this.close().then(function () { + _this3.preferences.reload(); + return _this3.open(file, args); + }); + } + var parameters = Object.create(null), + scale = void 0; + if (typeof file === 'string') { + this.setTitleUsingUrl(file); + parameters.url = file; + } else if (file && 'byteLength' in file) { + parameters.data = file; + } else if (file.url && file.originalUrl) { + this.setTitleUsingUrl(file.originalUrl); + parameters.url = file.url; + } + if (args) { + for (var prop in args) { + parameters[prop] = args[prop]; + } + if (args.scale) { + scale = args.scale; + } + if (args.length) { + this.pdfDocumentProperties.setFileSize(args.length); + } + } + var loadingTask = (0, _pdfjsLib.getDocument)(parameters); + this.pdfLoadingTask = loadingTask; + loadingTask.onPassword = function (updateCallback, reason) { + _this3.passwordPrompt.setUpdateCallback(updateCallback, reason); + _this3.passwordPrompt.open(); + }; + loadingTask.onProgress = function (_ref) { + var loaded = _ref.loaded, + total = _ref.total; + _this3.progress(loaded / total); + }; + loadingTask.onUnsupportedFeature = this.fallback.bind(this); + return loadingTask.promise.then(function (pdfDocument) { + _this3.load(pdfDocument, scale); + }, function (exception) { + var message = exception && exception.message; + var loadingErrorMessage = void 0; + if (exception instanceof _pdfjsLib.InvalidPDFException) { + loadingErrorMessage = _this3.l10n.get('invalid_file_error', null, 'Invalid or corrupted PDF file.'); + } else if (exception instanceof _pdfjsLib.MissingPDFException) { + loadingErrorMessage = _this3.l10n.get('missing_file_error', null, 'Missing PDF file.'); + } else if (exception instanceof _pdfjsLib.UnexpectedResponseException) { + loadingErrorMessage = _this3.l10n.get('unexpected_response_error', null, 'Unexpected server response.'); + } else { + loadingErrorMessage = _this3.l10n.get('loading_error', null, 'An error occurred while loading the PDF.'); + } + return loadingErrorMessage.then(function (msg) { + _this3.error(msg, { message: message }); + throw new Error(msg); + }); + }); + }, + download: function download() { + var _this4 = this; - localStorage.setItem('database', databaseStr); - resolve(); - }.bind(this)); - }, + function downloadByUrl() { + downloadManager.downloadUrl(url, filename); + } + var url = this.baseUrl; + var filename = (0, _ui_utils.getPDFFileNameFromURL)(this.url); + var downloadManager = this.downloadManager; + downloadManager.onerror = function (err) { + _this4.error('PDF failed to download: ' + err); + }; + if (!this.pdfDocument || !this.downloadComplete) { + downloadByUrl(); + return; + } + this.pdfDocument.getData().then(function (data) { + var blob = (0, _pdfjsLib.createBlob)(data, 'application/pdf'); + downloadManager.download(blob, url, filename); + }).catch(downloadByUrl); + }, + fallback: function fallback(featureId) {}, + error: function error(message, moreInfo) { + var moreInfoText = [this.l10n.get('error_version_info', { + version: _pdfjsLib.version || '?', + build: _pdfjsLib.build || '?' + }, 'PDF.js v{{version}} (build: {{build}})')]; + if (moreInfo) { + moreInfoText.push(this.l10n.get('error_message', { message: moreInfo.message }, 'Message: {{message}}')); + if (moreInfo.stack) { + moreInfoText.push(this.l10n.get('error_stack', { stack: moreInfo.stack }, 'Stack: {{stack}}')); + } else { + if (moreInfo.filename) { + moreInfoText.push(this.l10n.get('error_file', { file: moreInfo.filename }, 'File: {{file}}')); + } + if (moreInfo.lineNumber) { + moreInfoText.push(this.l10n.get('error_line', { line: moreInfo.lineNumber }, 'Line: {{line}}')); + } + } + } + var errorWrapperConfig = this.appConfig.errorWrapper; + var errorWrapper = errorWrapperConfig.container; + errorWrapper.removeAttribute('hidden'); + var errorMessage = errorWrapperConfig.errorMessage; + errorMessage.textContent = message; + var closeButton = errorWrapperConfig.closeButton; + closeButton.onclick = function () { + errorWrapper.setAttribute('hidden', 'true'); + }; + var errorMoreInfo = errorWrapperConfig.errorMoreInfo; + var moreInfoButton = errorWrapperConfig.moreInfoButton; + var lessInfoButton = errorWrapperConfig.lessInfoButton; + moreInfoButton.onclick = function () { + errorMoreInfo.removeAttribute('hidden'); + moreInfoButton.setAttribute('hidden', 'true'); + lessInfoButton.removeAttribute('hidden'); + errorMoreInfo.style.height = errorMoreInfo.scrollHeight + 'px'; + }; + lessInfoButton.onclick = function () { + errorMoreInfo.setAttribute('hidden', 'true'); + moreInfoButton.removeAttribute('hidden'); + lessInfoButton.setAttribute('hidden', 'true'); + }; + moreInfoButton.oncontextmenu = _ui_utils.noContextMenuHandler; + lessInfoButton.oncontextmenu = _ui_utils.noContextMenuHandler; + closeButton.oncontextmenu = _ui_utils.noContextMenuHandler; + moreInfoButton.removeAttribute('hidden'); + lessInfoButton.setAttribute('hidden', 'true'); + Promise.all(moreInfoText).then(function (parts) { + errorMoreInfo.value = parts.join('\n'); + }); + }, + progress: function progress(level) { + var _this5 = this; - _readFromStorage: function ViewHistory_readFromStorage() { - return new Promise(function (resolve) { + if (this.downloadComplete) { + return; + } + var percent = Math.round(level * 100); + if (percent > this.loadingBar.percent || isNaN(percent)) { + this.loadingBar.percent = percent; + if (_pdfjsLib.PDFJS.disableAutoFetch && percent) { + if (this.disableAutoFetchLoadingBarTimeout) { + clearTimeout(this.disableAutoFetchLoadingBarTimeout); + this.disableAutoFetchLoadingBarTimeout = null; + } + this.loadingBar.show(); + this.disableAutoFetchLoadingBarTimeout = setTimeout(function () { + _this5.loadingBar.hide(); + _this5.disableAutoFetchLoadingBarTimeout = null; + }, DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT); + } + } + }, + load: function load(pdfDocument, scale) { + var _this6 = this; - resolve(localStorage.getItem('database')); + scale = scale || _ui_utils.UNKNOWN_SCALE; + this.pdfDocument = pdfDocument; + pdfDocument.getDownloadInfo().then(function () { + _this6.downloadComplete = true; + _this6.loadingBar.hide(); + firstPagePromise.then(function () { + _this6.eventBus.dispatch('documentload', { source: _this6 }); }); - }, + }); + var pageModePromise = pdfDocument.getPageMode().catch(function () {}); + this.toolbar.setPagesCount(pdfDocument.numPages, false); + this.secondaryToolbar.setPagesCount(pdfDocument.numPages); + var id = this.documentFingerprint = pdfDocument.fingerprint; + var store = this.store = new _view_history.ViewHistory(id); + var baseDocumentUrl = void 0; + baseDocumentUrl = null; + this.pdfLinkService.setDocument(pdfDocument, baseDocumentUrl); + this.pdfDocumentProperties.setDocument(pdfDocument, this.url); + var pdfViewer = this.pdfViewer; + pdfViewer.setDocument(pdfDocument); + var firstPagePromise = pdfViewer.firstPagePromise; + var pagesPromise = pdfViewer.pagesPromise; + var onePageRendered = pdfViewer.onePageRendered; + var pdfThumbnailViewer = this.pdfThumbnailViewer; + pdfThumbnailViewer.setDocument(pdfDocument); + firstPagePromise.then(function (pdfPage) { + _this6.loadingBar.setWidth(_this6.appConfig.viewerContainer); + if (!_pdfjsLib.PDFJS.disableHistory && !_this6.isViewerEmbedded) { + if (!_this6.viewerPrefs['showPreviousViewOnLoad']) { + _this6.pdfHistory.clearHistoryState(); + } + _this6.pdfHistory.initialize(_this6.documentFingerprint); + if (_this6.pdfHistory.initialDestination) { + _this6.initialDestination = _this6.pdfHistory.initialDestination; + } else if (_this6.pdfHistory.initialBookmark) { + _this6.initialBookmark = _this6.pdfHistory.initialBookmark; + } + } + var initialParams = { + destination: _this6.initialDestination, + bookmark: _this6.initialBookmark, + hash: null + }; + var storePromise = store.getMultiple({ + exists: false, + page: '1', + zoom: _ui_utils.DEFAULT_SCALE_VALUE, + scrollLeft: '0', + scrollTop: '0', + sidebarView: _pdf_sidebar.SidebarView.NONE + }).catch(function () {}); + Promise.all([storePromise, pageModePromise]).then(function (_ref2) { + var _ref3 = _slicedToArray(_ref2, 2), + _ref3$ = _ref3[0], + values = _ref3$ === undefined ? {} : _ref3$, + pageMode = _ref3[1]; + + var hash = _this6.viewerPrefs['defaultZoomValue'] ? 'zoom=' + _this6.viewerPrefs['defaultZoomValue'] : null; + var sidebarView = _this6.viewerPrefs['sidebarViewOnLoad']; + if (values.exists && _this6.viewerPrefs['showPreviousViewOnLoad']) { + hash = 'page=' + values.page + '&zoom=' + (_this6.viewerPrefs['defaultZoomValue'] || values.zoom) + ',' + values.scrollLeft + ',' + values.scrollTop; + sidebarView = sidebarView || values.sidebarView | 0; + } + if (pageMode && !_this6.viewerPrefs['disablePageMode']) { + sidebarView = sidebarView || apiPageModeToSidebarView(pageMode); + } + return { + hash: hash, + sidebarView: sidebarView + }; + }).then(function (_ref4) { + var hash = _ref4.hash, + sidebarView = _ref4.sidebarView; - set: function ViewHistory_set(name, val) { - if (!this.isInitializedPromiseResolved) { + _this6.setInitialView(hash, { + sidebarView: sidebarView, + scale: scale + }); + initialParams.hash = hash; + if (!_this6.isViewerEmbedded) { + pdfViewer.focus(); + } + return pagesPromise; + }).then(function () { + if (!initialParams.destination && !initialParams.bookmark && !initialParams.hash) { + return; + } + if (pdfViewer.hasEqualPageSizes) { + return; + } + _this6.initialDestination = initialParams.destination; + _this6.initialBookmark = initialParams.bookmark; + pdfViewer.currentScaleValue = pdfViewer.currentScaleValue; + _this6.setInitialView(initialParams.hash); + }).then(function () { + pdfViewer.update(); + }); + }); + pdfDocument.getPageLabels().then(function (labels) { + if (!labels || _this6.viewerPrefs['disablePageLabels']) { return; } - this.file[name] = val; - return this._writeToStorage(); - }, - - setMultiple: function ViewHistory_setMultiple(properties) { - if (!this.isInitializedPromiseResolved) { + var i = 0, + numLabels = labels.length; + if (numLabels !== _this6.pagesCount) { + console.error('The number of Page Labels does not match ' + 'the number of pages in the document.'); return; } - for (var name in properties) { - this.file[name] = properties[name]; + while (i < numLabels && labels[i] === (i + 1).toString()) { + i++; } - return this._writeToStorage(); - }, - - get: function ViewHistory_get(name, defaultValue) { - if (!this.isInitializedPromiseResolved) { - return defaultValue; + if (i === numLabels) { + return; } - return this.file[name] || defaultValue; - } - }; + pdfViewer.setPageLabels(labels); + pdfThumbnailViewer.setPageLabels(labels); + _this6.toolbar.setPagesCount(pdfDocument.numPages, true); + _this6.toolbar.setPageNumber(pdfViewer.currentPageNumber, pdfViewer.currentPageLabel); + }); + pagesPromise.then(function () { + if (!_this6.supportsPrinting) { + return; + } + pdfDocument.getJavaScript().then(function (javaScript) { + if (javaScript.length) { + console.warn('Warning: JavaScript is not supported'); + _this6.fallback(_pdfjsLib.UNSUPPORTED_FEATURES.javaScript); + } + var regex = /\bprint\s*\(/; + for (var i = 0, ii = javaScript.length; i < ii; i++) { + var js = javaScript[i]; + if (js && regex.test(js)) { + setTimeout(function () { + window.print(); + }); + return; + } + } + }); + }); + Promise.all([onePageRendered, _ui_utils.animationStarted]).then(function () { + pdfDocument.getOutline().then(function (outline) { + _this6.pdfOutlineViewer.render({ outline: outline }); + }); + pdfDocument.getAttachments().then(function (attachments) { + _this6.pdfAttachmentViewer.render({ attachments: attachments }); + }); + }); + pdfDocument.getMetadata().then(function (_ref5) { + var info = _ref5.info, + metadata = _ref5.metadata; + + _this6.documentInfo = info; + _this6.metadata = metadata; + console.log('PDF ' + pdfDocument.fingerprint + ' [' + info.PDFFormatVersion + ' ' + (info.Producer || '-').trim() + ' / ' + (info.Creator || '-').trim() + ']' + ' (PDF.js: ' + (_pdfjsLib.version || '-') + (!_pdfjsLib.PDFJS.disableWebGL ? ' [WebGL]' : '') + ')'); + var pdfTitle = void 0; + if (metadata && metadata.has('dc:title')) { + var title = metadata.get('dc:title'); + if (title !== 'Untitled') { + pdfTitle = title; + } + } + if (!pdfTitle && info && info['Title']) { + pdfTitle = info['Title']; + } + if (pdfTitle) { + _this6.setTitle(pdfTitle + ' - ' + document.title); + } + if (info.IsAcroFormPresent) { + console.warn('Warning: AcroForm/XFA is not supported'); + _this6.fallback(_pdfjsLib.UNSUPPORTED_FEATURES.forms); + } + }); + }, + setInitialView: function setInitialView(storedHash) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var _options$scale = options.scale, + scale = _options$scale === undefined ? 0 : _options$scale, + _options$sidebarView = options.sidebarView, + sidebarView = _options$sidebarView === undefined ? _pdf_sidebar.SidebarView.NONE : _options$sidebarView; - return ViewHistory; -})(); + this.isInitialViewSet = true; + this.pdfSidebar.setInitialView(sidebarView); + if (this.initialDestination) { + this.pdfLinkService.navigateTo(this.initialDestination); + this.initialDestination = null; + } else if (this.initialBookmark) { + this.pdfLinkService.setHash(this.initialBookmark); + this.pdfHistory.push({ hash: this.initialBookmark }, true); + this.initialBookmark = null; + } else if (storedHash) { + this.pdfLinkService.setHash(storedHash); + } else if (scale) { + this.pdfViewer.currentScaleValue = scale; + this.page = 1; + } + this.toolbar.setPageNumber(this.pdfViewer.currentPageNumber, this.pdfViewer.currentPageLabel); + this.secondaryToolbar.setPageNumber(this.pdfViewer.currentPageNumber); + if (!this.pdfViewer.currentScaleValue) { + this.pdfViewer.currentScaleValue = _ui_utils.DEFAULT_SCALE_VALUE; + } + }, + cleanup: function cleanup() { + if (!this.pdfDocument) { + return; + } + this.pdfViewer.cleanup(); + this.pdfThumbnailViewer.cleanup(); + if (this.pdfViewer.renderer !== _ui_utils.RendererType.SVG) { + this.pdfDocument.cleanup(); + } + }, + forceRendering: function forceRendering() { + this.pdfRenderingQueue.printing = this.printing; + this.pdfRenderingQueue.isThumbnailViewEnabled = this.pdfSidebar.isThumbnailViewVisible; + this.pdfRenderingQueue.renderHighestPriority(); + }, + beforePrint: function beforePrint() { + var _this7 = this; + if (this.printService) { + return; + } + if (!this.supportsPrinting) { + this.l10n.get('printing_not_supported', null, 'Warning: Printing is not fully supported by ' + 'this browser.').then(function (printMessage) { + _this7.error(printMessage); + }); + return; + } + if (!this.pdfViewer.pageViewsReady) { + this.l10n.get('printing_not_ready', null, 'Warning: The PDF is not fully loaded for printing.').then(function (notReadyMessage) { + window.alert(notReadyMessage); + }); + return; + } + var pagesOverview = this.pdfViewer.getPagesOverview(); + var printContainer = this.appConfig.printContainer; + var printService = PDFPrintServiceFactory.instance.createPrintService(this.pdfDocument, pagesOverview, printContainer, this.l10n); + this.printService = printService; + this.forceRendering(); + printService.layout(); + }, -/** - * Creates a "search bar" given a set of DOM elements that act as controls - * for searching or for setting search preferences in the UI. This object - * also sets up the appropriate events for the controls. Actual searching - * is done by PDFFindController. - */ -var PDFFindBar = (function PDFFindBarClosure() { - function PDFFindBar(options) { - this.opened = false; - this.bar = options.bar || null; - this.toggleButton = options.toggleButton || null; - this.findField = options.findField || null; - this.highlightAll = options.highlightAllCheckbox || null; - this.caseSensitive = options.caseSensitiveCheckbox || null; - this.findMsg = options.findMsg || null; - this.findResultsCount = options.findResultsCount || null; - this.findStatusIcon = options.findStatusIcon || null; - this.findPreviousButton = options.findPreviousButton || null; - this.findNextButton = options.findNextButton || null; - this.findController = options.findController || null; + afterPrint: function pdfViewSetupAfterPrint() { + if (this.printService) { + this.printService.destroy(); + this.printService = null; + } + this.forceRendering(); + }, + rotatePages: function rotatePages(delta) { + if (!this.pdfDocument) { + return; + } + var pdfViewer = this.pdfViewer, + pdfThumbnailViewer = this.pdfThumbnailViewer; - if (this.findController === null) { - throw new Error('PDFFindBar cannot be used without a ' + - 'PDFFindController instance.'); + var pageNumber = pdfViewer.currentPageNumber; + var newRotation = (pdfViewer.pagesRotation + 360 + delta) % 360; + pdfViewer.pagesRotation = newRotation; + pdfThumbnailViewer.pagesRotation = newRotation; + this.forceRendering(); + pdfViewer.currentPageNumber = pageNumber; + }, + requestPresentationMode: function requestPresentationMode() { + if (!this.pdfPresentationMode) { + return; } + this.pdfPresentationMode.request(); + }, + bindEvents: function bindEvents() { + var eventBus = this.eventBus, + _boundEvents = this._boundEvents; + + _boundEvents.beforePrint = this.beforePrint.bind(this); + _boundEvents.afterPrint = this.afterPrint.bind(this); + eventBus.on('resize', webViewerResize); + eventBus.on('hashchange', webViewerHashchange); + eventBus.on('beforeprint', _boundEvents.beforePrint); + eventBus.on('afterprint', _boundEvents.afterPrint); + eventBus.on('pagerendered', webViewerPageRendered); + eventBus.on('textlayerrendered', webViewerTextLayerRendered); + eventBus.on('updateviewarea', webViewerUpdateViewarea); + eventBus.on('pagechanging', webViewerPageChanging); + eventBus.on('scalechanging', webViewerScaleChanging); + eventBus.on('sidebarviewchanged', webViewerSidebarViewChanged); + eventBus.on('pagemode', webViewerPageMode); + eventBus.on('namedaction', webViewerNamedAction); + eventBus.on('presentationmodechanged', webViewerPresentationModeChanged); + eventBus.on('presentationmode', webViewerPresentationMode); + eventBus.on('openfile', webViewerOpenFile); + eventBus.on('print', webViewerPrint); + eventBus.on('download', webViewerDownload); + eventBus.on('firstpage', webViewerFirstPage); + eventBus.on('lastpage', webViewerLastPage); + eventBus.on('nextpage', webViewerNextPage); + eventBus.on('previouspage', webViewerPreviousPage); + eventBus.on('zoomin', webViewerZoomIn); + eventBus.on('zoomout', webViewerZoomOut); + eventBus.on('pagenumberchanged', webViewerPageNumberChanged); + eventBus.on('scalechanged', webViewerScaleChanged); + eventBus.on('rotatecw', webViewerRotateCw); + eventBus.on('rotateccw', webViewerRotateCcw); + eventBus.on('documentproperties', webViewerDocumentProperties); + eventBus.on('find', webViewerFind); + eventBus.on('findfromurlhash', webViewerFindFromUrlHash); + eventBus.on('fileinputchange', webViewerFileInputChange); + }, + bindWindowEvents: function bindWindowEvents() { + var eventBus = this.eventBus, + _boundEvents = this._boundEvents; - // Add event listeners to the DOM elements. - var self = this; - this.toggleButton.addEventListener('click', function() { - self.toggle(); + _boundEvents.windowResize = function () { + eventBus.dispatch('resize'); + }; + _boundEvents.windowHashChange = function () { + eventBus.dispatch('hashchange', { hash: document.location.hash.substring(1) }); + }; + _boundEvents.windowBeforePrint = function () { + eventBus.dispatch('beforeprint'); + }; + _boundEvents.windowAfterPrint = function () { + eventBus.dispatch('afterprint'); + }; + window.addEventListener('wheel', webViewerWheel); + window.addEventListener('click', webViewerClick); + window.addEventListener('keydown', webViewerKeyDown); + window.addEventListener('resize', _boundEvents.windowResize); + window.addEventListener('hashchange', _boundEvents.windowHashChange); + window.addEventListener('beforeprint', _boundEvents.windowBeforePrint); + window.addEventListener('afterprint', _boundEvents.windowAfterPrint); + _boundEvents.windowChange = function (evt) { + var files = evt.target.files; + if (!files || files.length === 0) { + return; + } + eventBus.dispatch('fileinputchange', { fileInput: evt.target }); + }; + window.addEventListener('change', _boundEvents.windowChange); + }, + unbindEvents: function unbindEvents() { + var eventBus = this.eventBus, + _boundEvents = this._boundEvents; + + eventBus.off('resize', webViewerResize); + eventBus.off('hashchange', webViewerHashchange); + eventBus.off('beforeprint', _boundEvents.beforePrint); + eventBus.off('afterprint', _boundEvents.afterPrint); + eventBus.off('pagerendered', webViewerPageRendered); + eventBus.off('textlayerrendered', webViewerTextLayerRendered); + eventBus.off('updateviewarea', webViewerUpdateViewarea); + eventBus.off('pagechanging', webViewerPageChanging); + eventBus.off('scalechanging', webViewerScaleChanging); + eventBus.off('sidebarviewchanged', webViewerSidebarViewChanged); + eventBus.off('pagemode', webViewerPageMode); + eventBus.off('namedaction', webViewerNamedAction); + eventBus.off('presentationmodechanged', webViewerPresentationModeChanged); + eventBus.off('presentationmode', webViewerPresentationMode); + eventBus.off('openfile', webViewerOpenFile); + eventBus.off('print', webViewerPrint); + eventBus.off('download', webViewerDownload); + eventBus.off('firstpage', webViewerFirstPage); + eventBus.off('lastpage', webViewerLastPage); + eventBus.off('nextpage', webViewerNextPage); + eventBus.off('previouspage', webViewerPreviousPage); + eventBus.off('zoomin', webViewerZoomIn); + eventBus.off('zoomout', webViewerZoomOut); + eventBus.off('pagenumberchanged', webViewerPageNumberChanged); + eventBus.off('scalechanged', webViewerScaleChanged); + eventBus.off('rotatecw', webViewerRotateCw); + eventBus.off('rotateccw', webViewerRotateCcw); + eventBus.off('documentproperties', webViewerDocumentProperties); + eventBus.off('find', webViewerFind); + eventBus.off('findfromurlhash', webViewerFindFromUrlHash); + eventBus.off('fileinputchange', webViewerFileInputChange); + _boundEvents.beforePrint = null; + _boundEvents.afterPrint = null; + }, + unbindWindowEvents: function unbindWindowEvents() { + var _boundEvents = this._boundEvents; + + window.removeEventListener('wheel', webViewerWheel); + window.removeEventListener('click', webViewerClick); + window.removeEventListener('keydown', webViewerKeyDown); + window.removeEventListener('resize', _boundEvents.windowResize); + window.removeEventListener('hashchange', _boundEvents.windowHashChange); + window.removeEventListener('beforeprint', _boundEvents.windowBeforePrint); + window.removeEventListener('afterprint', _boundEvents.windowAfterPrint); + window.removeEventListener('change', _boundEvents.windowChange); + _boundEvents.windowChange = null; + _boundEvents.windowResize = null; + _boundEvents.windowHashChange = null; + _boundEvents.windowBeforePrint = null; + _boundEvents.windowAfterPrint = null; + } +}; +var validateFileURL = void 0; +{ + var HOSTED_VIEWER_ORIGINS = ['null', 'http://mozilla.github.io', 'https://mozilla.github.io']; + validateFileURL = function validateFileURL(file) { + if (file === undefined) { + return; + } + try { + var viewerOrigin = new URL(window.location.href).origin || 'null'; + if (HOSTED_VIEWER_ORIGINS.indexOf(viewerOrigin) >= 0) { + return; + } + var fileOrigin = new URL(file, window.location.href).origin; + if (fileOrigin !== viewerOrigin) { + throw new Error('file origin does not match viewer\'s'); + } + } catch (ex) { + var message = ex && ex.message; + PDFViewerApplication.l10n.get('loading_error', null, 'An error occurred while loading the PDF.').then(function (loadingErrorMessage) { + PDFViewerApplication.error(loadingErrorMessage, { message: message }); + }); + throw ex; + } + }; +} +function loadAndEnablePDFBug(enabledTabs) { + return new Promise(function (resolve, reject) { + var appConfig = PDFViewerApplication.appConfig; + var script = document.createElement('script'); + script.src = appConfig.debuggerScriptPath; + script.onload = function () { + PDFBug.enable(enabledTabs); + PDFBug.init({ + PDFJS: _pdfjsLib.PDFJS, + OPS: _pdfjsLib.OPS + }, appConfig.mainContainer); + resolve(); + }; + script.onerror = function () { + reject(new Error('Cannot load debugger at ' + script.src)); + }; + (document.getElementsByTagName('head')[0] || document.body).appendChild(script); + }); +} +function webViewerInitialized() { + var appConfig = PDFViewerApplication.appConfig; + var file = void 0; + var queryString = document.location.search.substring(1); + var params = (0, _ui_utils.parseQueryString)(queryString); + file = 'file' in params ? params.file : appConfig.defaultUrl; + validateFileURL(file); + var waitForBeforeOpening = []; + var fileInput = document.createElement('input'); + fileInput.id = appConfig.openFileInputName; + fileInput.className = 'fileInput'; + fileInput.setAttribute('type', 'file'); + fileInput.oncontextmenu = _ui_utils.noContextMenuHandler; + document.body.appendChild(fileInput); + if (!window.File || !window.FileReader || !window.FileList || !window.Blob) { + appConfig.toolbar.openFile.setAttribute('hidden', 'true'); + appConfig.secondaryToolbar.openFileButton.setAttribute('hidden', 'true'); + } else { + fileInput.value = null; + } + if (PDFViewerApplication.viewerPrefs['pdfBugEnabled']) { + var hash = document.location.hash.substring(1); + var hashParams = (0, _ui_utils.parseQueryString)(hash); + if ('disableworker' in hashParams) { + _pdfjsLib.PDFJS.disableWorker = hashParams['disableworker'] === 'true'; + } + if ('disablerange' in hashParams) { + _pdfjsLib.PDFJS.disableRange = hashParams['disablerange'] === 'true'; + } + if ('disablestream' in hashParams) { + _pdfjsLib.PDFJS.disableStream = hashParams['disablestream'] === 'true'; + } + if ('disableautofetch' in hashParams) { + _pdfjsLib.PDFJS.disableAutoFetch = hashParams['disableautofetch'] === 'true'; + } + if ('disablefontface' in hashParams) { + _pdfjsLib.PDFJS.disableFontFace = hashParams['disablefontface'] === 'true'; + } + if ('disablehistory' in hashParams) { + _pdfjsLib.PDFJS.disableHistory = hashParams['disablehistory'] === 'true'; + } + if ('webgl' in hashParams) { + _pdfjsLib.PDFJS.disableWebGL = hashParams['webgl'] !== 'true'; + } + if ('useonlycsszoom' in hashParams) { + _pdfjsLib.PDFJS.useOnlyCssZoom = hashParams['useonlycsszoom'] === 'true'; + } + if ('verbosity' in hashParams) { + _pdfjsLib.PDFJS.verbosity = hashParams['verbosity'] | 0; + } + if ('ignorecurrentpositiononzoom' in hashParams) { + _pdfjsLib.PDFJS.ignoreCurrentPositionOnZoom = hashParams['ignorecurrentpositiononzoom'] === 'true'; + } + if ('textlayer' in hashParams) { + switch (hashParams['textlayer']) { + case 'off': + _pdfjsLib.PDFJS.disableTextLayer = true; + break; + case 'visible': + case 'shadow': + case 'hover': + var viewer = appConfig.viewerContainer; + viewer.classList.add('textLayer-' + hashParams['textlayer']); + break; + } + } + if ('pdfbug' in hashParams) { + _pdfjsLib.PDFJS.pdfBug = true; + var pdfBug = hashParams['pdfbug']; + var enabled = pdfBug.split(','); + waitForBeforeOpening.push(loadAndEnablePDFBug(enabled)); + } + } + if (!PDFViewerApplication.supportsPrinting) { + appConfig.toolbar.print.classList.add('hidden'); + appConfig.secondaryToolbar.printButton.classList.add('hidden'); + } + if (!PDFViewerApplication.supportsFullscreen) { + appConfig.toolbar.presentationModeButton.classList.add('hidden'); + appConfig.secondaryToolbar.presentationModeButton.classList.add('hidden'); + } + if (PDFViewerApplication.supportsIntegratedFind) { + appConfig.toolbar.viewFind.classList.add('hidden'); + } + appConfig.sidebar.mainContainer.addEventListener('transitionend', function (evt) { + if (evt.target === this) { + PDFViewerApplication.eventBus.dispatch('resize'); + } + }, true); + appConfig.sidebar.toggleButton.addEventListener('click', function () { + PDFViewerApplication.pdfSidebar.toggle(); + }); + Promise.all(waitForBeforeOpening).then(function () { + webViewerOpenFileViaURL(file); + }).catch(function (reason) { + PDFViewerApplication.l10n.get('loading_error', null, 'An error occurred while opening.').then(function (msg) { + PDFViewerApplication.error(msg, reason); }); - - this.findField.addEventListener('input', function() { - self.dispatchEvent(''); + }); +} +var webViewerOpenFileViaURL = void 0; +{ + webViewerOpenFileViaURL = function webViewerOpenFileViaURL(file) { + if (file && file.lastIndexOf('file:', 0) === 0) { + PDFViewerApplication.setTitleUsingUrl(file); + var xhr = new XMLHttpRequest(); + xhr.onload = function () { + PDFViewerApplication.open(new Uint8Array(xhr.response)); + }; + try { + xhr.open('GET', file); + xhr.responseType = 'arraybuffer'; + xhr.send(); + } catch (ex) { + PDFViewerApplication.l10n.get('loading_error', null, 'An error occurred while loading the PDF.').then(function (msg) { + PDFViewerApplication.error(msg, ex); + }); + } + return; + } + if (file) { + PDFViewerApplication.open(file); + } + }; +} +function webViewerPageRendered(evt) { + var pageNumber = evt.pageNumber; + var pageIndex = pageNumber - 1; + var pageView = PDFViewerApplication.pdfViewer.getPageView(pageIndex); + if (pageNumber === PDFViewerApplication.page) { + PDFViewerApplication.toolbar.updateLoadingIndicatorState(false); + } + if (!pageView) { + return; + } + if (PDFViewerApplication.pdfSidebar.isThumbnailViewVisible) { + var thumbnailView = PDFViewerApplication.pdfThumbnailViewer.getThumbnail(pageIndex); + thumbnailView.setImage(pageView); + } + if (_pdfjsLib.PDFJS.pdfBug && Stats.enabled && pageView.stats) { + Stats.add(pageNumber, pageView.stats); + } + if (pageView.error) { + PDFViewerApplication.l10n.get('rendering_error', null, 'An error occurred while rendering the page.').then(function (msg) { + PDFViewerApplication.error(msg, pageView.error); }); + } +} +function webViewerTextLayerRendered(evt) {} +function webViewerPageMode(evt) { + var mode = evt.mode, + view = void 0; + switch (mode) { + case 'thumbs': + view = _pdf_sidebar.SidebarView.THUMBS; + break; + case 'bookmarks': + case 'outline': + view = _pdf_sidebar.SidebarView.OUTLINE; + break; + case 'attachments': + view = _pdf_sidebar.SidebarView.ATTACHMENTS; + break; + case 'none': + view = _pdf_sidebar.SidebarView.NONE; + break; + default: + console.error('Invalid "pagemode" hash parameter: ' + mode); + return; + } + PDFViewerApplication.pdfSidebar.switchView(view, true); +} +function webViewerNamedAction(evt) { + var action = evt.action; + switch (action) { + case 'GoToPage': + PDFViewerApplication.appConfig.toolbar.pageNumber.select(); + break; + case 'Find': + if (!PDFViewerApplication.supportsIntegratedFind) { + PDFViewerApplication.findBar.toggle(); + } + break; + } +} +function webViewerPresentationModeChanged(evt) { + var active = evt.active, + switchInProgress = evt.switchInProgress; + + PDFViewerApplication.pdfViewer.presentationModeState = switchInProgress ? _pdf_viewer.PresentationModeState.CHANGING : active ? _pdf_viewer.PresentationModeState.FULLSCREEN : _pdf_viewer.PresentationModeState.NORMAL; +} +function webViewerSidebarViewChanged(evt) { + PDFViewerApplication.pdfRenderingQueue.isThumbnailViewEnabled = PDFViewerApplication.pdfSidebar.isThumbnailViewVisible; + var store = PDFViewerApplication.store; + if (store && PDFViewerApplication.isInitialViewSet) { + store.set('sidebarView', evt.view).catch(function () {}); + } +} +function webViewerUpdateViewarea(evt) { + var location = evt.location, + store = PDFViewerApplication.store; + if (store && PDFViewerApplication.isInitialViewSet) { + store.setMultiple({ + 'exists': true, + 'page': location.pageNumber, + 'zoom': location.scale, + 'scrollLeft': location.left, + 'scrollTop': location.top + }).catch(function () {}); + } + var href = PDFViewerApplication.pdfLinkService.getAnchorUrl(location.pdfOpenParams); + PDFViewerApplication.appConfig.toolbar.viewBookmark.href = href; + PDFViewerApplication.appConfig.secondaryToolbar.viewBookmarkButton.href = href; + PDFViewerApplication.pdfHistory.updateCurrentBookmark(location.pdfOpenParams, location.pageNumber); + var currentPage = PDFViewerApplication.pdfViewer.getPageView(PDFViewerApplication.page - 1); + var loading = currentPage.renderingState !== _pdf_rendering_queue.RenderingStates.FINISHED; + PDFViewerApplication.toolbar.updateLoadingIndicatorState(loading); +} +function webViewerResize() { + var pdfDocument = PDFViewerApplication.pdfDocument, + pdfViewer = PDFViewerApplication.pdfViewer; - this.bar.addEventListener('keydown', function(evt) { - switch (evt.keyCode) { - case 13: // Enter - if (evt.target === self.findField) { - self.dispatchEvent('again', evt.shiftKey); + if (!pdfDocument) { + return; + } + var currentScaleValue = pdfViewer.currentScaleValue; + if (currentScaleValue === 'auto' || currentScaleValue === 'page-fit' || currentScaleValue === 'page-width') { + pdfViewer.currentScaleValue = currentScaleValue; + } + pdfViewer.update(); +} +function webViewerHashchange(evt) { + if (PDFViewerApplication.pdfHistory.isHashChangeUnlocked) { + var hash = evt.hash; + if (!hash) { + return; + } + if (!PDFViewerApplication.isInitialViewSet) { + PDFViewerApplication.initialBookmark = hash; + } else { + PDFViewerApplication.pdfLinkService.setHash(hash); + } + } +} +var webViewerFileInputChange = void 0; +{ + webViewerFileInputChange = function webViewerFileInputChange(evt) { + var file = evt.fileInput.files[0]; + if (!_pdfjsLib.PDFJS.disableCreateObjectURL && URL.createObjectURL) { + PDFViewerApplication.open(URL.createObjectURL(file)); + } else { + var fileReader = new FileReader(); + fileReader.onload = function webViewerChangeFileReaderOnload(evt) { + var buffer = evt.target.result; + PDFViewerApplication.open(new Uint8Array(buffer)); + }; + fileReader.readAsArrayBuffer(file); + } + PDFViewerApplication.setTitleUsingUrl(file.name); + var appConfig = PDFViewerApplication.appConfig; + appConfig.toolbar.viewBookmark.setAttribute('hidden', 'true'); + appConfig.secondaryToolbar.viewBookmarkButton.setAttribute('hidden', 'true'); + appConfig.toolbar.download.setAttribute('hidden', 'true'); + appConfig.secondaryToolbar.downloadButton.setAttribute('hidden', 'true'); + }; +} +function webViewerPresentationMode() { + PDFViewerApplication.requestPresentationMode(); +} +function webViewerOpenFile() { + var openFileInputName = PDFViewerApplication.appConfig.openFileInputName; + document.getElementById(openFileInputName).click(); +} +function webViewerPrint() { + window.print(); +} +function webViewerDownload() { + PDFViewerApplication.download(); +} +function webViewerFirstPage() { + if (PDFViewerApplication.pdfDocument) { + PDFViewerApplication.page = 1; + } +} +function webViewerLastPage() { + if (PDFViewerApplication.pdfDocument) { + PDFViewerApplication.page = PDFViewerApplication.pagesCount; + } +} +function webViewerNextPage() { + PDFViewerApplication.page++; +} +function webViewerPreviousPage() { + PDFViewerApplication.page--; +} +function webViewerZoomIn() { + PDFViewerApplication.zoomIn(); +} +function webViewerZoomOut() { + PDFViewerApplication.zoomOut(); +} +function webViewerPageNumberChanged(evt) { + var pdfViewer = PDFViewerApplication.pdfViewer; + pdfViewer.currentPageLabel = evt.value; + if (evt.value !== pdfViewer.currentPageNumber.toString() && evt.value !== pdfViewer.currentPageLabel) { + PDFViewerApplication.toolbar.setPageNumber(pdfViewer.currentPageNumber, pdfViewer.currentPageLabel); + } +} +function webViewerScaleChanged(evt) { + PDFViewerApplication.pdfViewer.currentScaleValue = evt.value; +} +function webViewerRotateCw() { + PDFViewerApplication.rotatePages(90); +} +function webViewerRotateCcw() { + PDFViewerApplication.rotatePages(-90); +} +function webViewerDocumentProperties() { + PDFViewerApplication.pdfDocumentProperties.open(); +} +function webViewerFind(evt) { + PDFViewerApplication.findController.executeCommand('find' + evt.type, { + query: evt.query, + phraseSearch: evt.phraseSearch, + caseSensitive: evt.caseSensitive, + highlightAll: evt.highlightAll, + findPrevious: evt.findPrevious + }); +} +function webViewerFindFromUrlHash(evt) { + PDFViewerApplication.findController.executeCommand('find', { + query: evt.query, + phraseSearch: evt.phraseSearch, + caseSensitive: false, + highlightAll: true, + findPrevious: false + }); +} +function webViewerScaleChanging(evt) { + PDFViewerApplication.toolbar.setPageScale(evt.presetValue, evt.scale); + PDFViewerApplication.pdfViewer.update(); +} +function webViewerPageChanging(evt) { + var page = evt.pageNumber; + PDFViewerApplication.toolbar.setPageNumber(page, evt.pageLabel || null); + PDFViewerApplication.secondaryToolbar.setPageNumber(page); + if (PDFViewerApplication.pdfSidebar.isThumbnailViewVisible) { + PDFViewerApplication.pdfThumbnailViewer.scrollThumbnailIntoView(page); + } + if (_pdfjsLib.PDFJS.pdfBug && Stats.enabled) { + var pageView = PDFViewerApplication.pdfViewer.getPageView(page - 1); + if (pageView.stats) { + Stats.add(page, pageView.stats); + } + } +} +var zoomDisabled = false, + zoomDisabledTimeout = void 0; +function webViewerWheel(evt) { + var pdfViewer = PDFViewerApplication.pdfViewer; + if (pdfViewer.isInPresentationMode) { + return; + } + if (evt.ctrlKey || evt.metaKey) { + var support = PDFViewerApplication.supportedMouseWheelZoomModifierKeys; + if (evt.ctrlKey && !support.ctrlKey || evt.metaKey && !support.metaKey) { + return; + } + evt.preventDefault(); + if (zoomDisabled) { + return; + } + var previousScale = pdfViewer.currentScale; + var delta = (0, _ui_utils.normalizeWheelEventDelta)(evt); + var MOUSE_WHEEL_DELTA_PER_PAGE_SCALE = 3.0; + var ticks = delta * MOUSE_WHEEL_DELTA_PER_PAGE_SCALE; + if (ticks < 0) { + PDFViewerApplication.zoomOut(-ticks); + } else { + PDFViewerApplication.zoomIn(ticks); + } + var currentScale = pdfViewer.currentScale; + if (previousScale !== currentScale) { + var scaleCorrectionFactor = currentScale / previousScale - 1; + var rect = pdfViewer.container.getBoundingClientRect(); + var dx = evt.clientX - rect.left; + var dy = evt.clientY - rect.top; + pdfViewer.container.scrollLeft += dx * scaleCorrectionFactor; + pdfViewer.container.scrollTop += dy * scaleCorrectionFactor; + } + } else { + zoomDisabled = true; + clearTimeout(zoomDisabledTimeout); + zoomDisabledTimeout = setTimeout(function () { + zoomDisabled = false; + }, 1000); + } +} +function webViewerClick(evt) { + if (!PDFViewerApplication.secondaryToolbar.isOpen) { + return; + } + var appConfig = PDFViewerApplication.appConfig; + if (PDFViewerApplication.pdfViewer.containsElement(evt.target) || appConfig.toolbar.container.contains(evt.target) && evt.target !== appConfig.secondaryToolbar.toggleButton) { + PDFViewerApplication.secondaryToolbar.close(); + } +} +function webViewerKeyDown(evt) { + if (PDFViewerApplication.overlayManager.active) { + return; + } + var handled = false, + ensureViewerFocused = false; + var cmd = (evt.ctrlKey ? 1 : 0) | (evt.altKey ? 2 : 0) | (evt.shiftKey ? 4 : 0) | (evt.metaKey ? 8 : 0); + var pdfViewer = PDFViewerApplication.pdfViewer; + var isViewerInPresentationMode = pdfViewer && pdfViewer.isInPresentationMode; + if (cmd === 1 || cmd === 8 || cmd === 5 || cmd === 12) { + switch (evt.keyCode) { + case 70: + if (!PDFViewerApplication.supportsIntegratedFind) { + PDFViewerApplication.findBar.open(); + handled = true; + } + break; + case 71: + if (!PDFViewerApplication.supportsIntegratedFind) { + var findState = PDFViewerApplication.findController.state; + if (findState) { + PDFViewerApplication.findController.executeCommand('findagain', { + query: findState.query, + phraseSearch: findState.phraseSearch, + caseSensitive: findState.caseSensitive, + highlightAll: findState.highlightAll, + findPrevious: cmd === 5 || cmd === 12 + }); } + handled = true; + } + break; + case 61: + case 107: + case 187: + case 171: + if (!isViewerInPresentationMode) { + PDFViewerApplication.zoomIn(); + } + handled = true; + break; + case 173: + case 109: + case 189: + if (!isViewerInPresentationMode) { + PDFViewerApplication.zoomOut(); + } + handled = true; + break; + case 48: + case 96: + if (!isViewerInPresentationMode) { + setTimeout(function () { + pdfViewer.currentScaleValue = _ui_utils.DEFAULT_SCALE_VALUE; + }); + handled = false; + } + break; + case 38: + if (isViewerInPresentationMode || PDFViewerApplication.page > 1) { + PDFViewerApplication.page = 1; + handled = true; + ensureViewerFocused = true; + } + break; + case 40: + if (isViewerInPresentationMode || PDFViewerApplication.page < PDFViewerApplication.pagesCount) { + PDFViewerApplication.page = PDFViewerApplication.pagesCount; + handled = true; + ensureViewerFocused = true; + } + break; + } + } + if (cmd === 1 || cmd === 8) { + switch (evt.keyCode) { + case 83: + PDFViewerApplication.download(); + handled = true; + break; + } + } + if (cmd === 3 || cmd === 10) { + switch (evt.keyCode) { + case 80: + PDFViewerApplication.requestPresentationMode(); + handled = true; + break; + case 71: + PDFViewerApplication.appConfig.toolbar.pageNumber.select(); + handled = true; + break; + } + } + if (handled) { + if (ensureViewerFocused && !isViewerInPresentationMode) { + pdfViewer.focus(); + } + evt.preventDefault(); + return; + } + var curElement = document.activeElement || document.querySelector(':focus'); + var curElementTagName = curElement && curElement.tagName.toUpperCase(); + if (curElementTagName === 'INPUT' || curElementTagName === 'TEXTAREA' || curElementTagName === 'SELECT') { + if (evt.keyCode !== 27) { + return; + } + } + if (cmd === 0) { + switch (evt.keyCode) { + case 38: + case 33: + case 8: + if (!isViewerInPresentationMode && pdfViewer.currentScaleValue !== 'page-fit') { break; - case 27: // Escape - self.close(); + } + case 37: + if (pdfViewer.isHorizontalScrollbarEnabled) { break; - } - }); + } + case 75: + case 80: + if (PDFViewerApplication.page > 1) { + PDFViewerApplication.page--; + } + handled = true; + break; + case 27: + if (PDFViewerApplication.secondaryToolbar.isOpen) { + PDFViewerApplication.secondaryToolbar.close(); + handled = true; + } + if (!PDFViewerApplication.supportsIntegratedFind && PDFViewerApplication.findBar.opened) { + PDFViewerApplication.findBar.close(); + handled = true; + } + break; + case 40: + case 34: + case 32: + if (!isViewerInPresentationMode && pdfViewer.currentScaleValue !== 'page-fit') { + break; + } + case 39: + if (pdfViewer.isHorizontalScrollbarEnabled) { + break; + } + case 74: + case 78: + if (PDFViewerApplication.page < PDFViewerApplication.pagesCount) { + PDFViewerApplication.page++; + } + handled = true; + break; + case 36: + if (isViewerInPresentationMode || PDFViewerApplication.page > 1) { + PDFViewerApplication.page = 1; + handled = true; + ensureViewerFocused = true; + } + break; + case 35: + if (isViewerInPresentationMode || PDFViewerApplication.page < PDFViewerApplication.pagesCount) { + PDFViewerApplication.page = PDFViewerApplication.pagesCount; + handled = true; + ensureViewerFocused = true; + } + break; + case 83: + PDFViewerApplication.pdfCursorTools.switchTool(_pdf_cursor_tools.CursorTool.SELECT); + break; + case 72: + PDFViewerApplication.pdfCursorTools.switchTool(_pdf_cursor_tools.CursorTool.HAND); + break; + case 82: + PDFViewerApplication.rotatePages(90); + break; + } + } + if (cmd === 4) { + switch (evt.keyCode) { + case 32: + if (!isViewerInPresentationMode && pdfViewer.currentScaleValue !== 'page-fit') { + break; + } + if (PDFViewerApplication.page > 1) { + PDFViewerApplication.page--; + } + handled = true; + break; + case 82: + PDFViewerApplication.rotatePages(-90); + break; + } + } + if (!handled && !isViewerInPresentationMode) { + if (evt.keyCode >= 33 && evt.keyCode <= 40 || evt.keyCode === 32 && curElementTagName !== 'BUTTON') { + ensureViewerFocused = true; + } + } + if (cmd === 2) { + switch (evt.keyCode) { + case 37: + if (isViewerInPresentationMode) { + PDFViewerApplication.pdfHistory.back(); + handled = true; + } + break; + case 39: + if (isViewerInPresentationMode) { + PDFViewerApplication.pdfHistory.forward(); + handled = true; + } + break; + } + } + if (ensureViewerFocused && !pdfViewer.containsElement(curElement)) { + pdfViewer.focus(); + } + if (handled) { + evt.preventDefault(); + } +} +function apiPageModeToSidebarView(mode) { + switch (mode) { + case 'UseNone': + return _pdf_sidebar.SidebarView.NONE; + case 'UseThumbs': + return _pdf_sidebar.SidebarView.THUMBS; + case 'UseOutlines': + return _pdf_sidebar.SidebarView.OUTLINE; + case 'UseAttachments': + return _pdf_sidebar.SidebarView.ATTACHMENTS; + case 'UseOC': + } + return _pdf_sidebar.SidebarView.NONE; +} +var PDFPrintServiceFactory = { + instance: { + supportsPrinting: false, + createPrintService: function createPrintService() { + throw new Error('Not implemented: createPrintService'); + } + } +}; +exports.PDFViewerApplication = PDFViewerApplication; +exports.DefaultExternalServices = DefaultExternalServices; +exports.PDFPrintServiceFactory = PDFPrintServiceFactory; - this.findPreviousButton.addEventListener('click', function() { - self.dispatchEvent('again', true); - }); +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { - this.findNextButton.addEventListener('click', function() { - self.dispatchEvent('again', false); - }); +"use strict"; - this.highlightAll.addEventListener('click', function() { - self.dispatchEvent('highlightallchange'); - }); - this.caseSensitive.addEventListener('click', function() { - self.dispatchEvent('casesensitivitychange'); - }); - } +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SimpleLinkService = exports.PDFLinkService = undefined; - PDFFindBar.prototype = { - dispatchEvent: function PDFFindBar_dispatchEvent(type, findPrev) { - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('find' + type, true, true, { - query: this.findField.value, - caseSensitive: this.caseSensitive.checked, - highlightAll: this.highlightAll.checked, - findPrevious: findPrev - }); - return window.dispatchEvent(event); - }, +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - updateUIState: - function PDFFindBar_updateUIState(state, previous, matchCount) { - var notFound = false; - var findMsg = ''; - var status = ''; +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - switch (state) { - case FindStates.FIND_FOUND: - break; +var _dom_events = __webpack_require__(2); - case FindStates.FIND_PENDING: - status = 'pending'; - break; +var _ui_utils = __webpack_require__(0); - case FindStates.FIND_NOTFOUND: - findMsg = mozL10n.get('find_not_found', null, 'Phrase not found'); - notFound = true; - break; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - case FindStates.FIND_WRAPPED: - if (previous) { - findMsg = mozL10n.get('find_reached_top', null, - 'Reached top of document, continued from bottom'); +var PDFLinkService = function () { + function PDFLinkService() { + var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + eventBus = _ref.eventBus; + + _classCallCheck(this, PDFLinkService); + + this.eventBus = eventBus || (0, _dom_events.getGlobalEventBus)(); + this.baseUrl = null; + this.pdfDocument = null; + this.pdfViewer = null; + this.pdfHistory = null; + this._pagesRefCache = null; + } + + _createClass(PDFLinkService, [{ + key: 'setDocument', + value: function setDocument(pdfDocument, baseUrl) { + this.baseUrl = baseUrl; + this.pdfDocument = pdfDocument; + this._pagesRefCache = Object.create(null); + } + }, { + key: 'setViewer', + value: function setViewer(pdfViewer) { + this.pdfViewer = pdfViewer; + } + }, { + key: 'setHistory', + value: function setHistory(pdfHistory) { + this.pdfHistory = pdfHistory; + } + }, { + key: 'navigateTo', + value: function navigateTo(dest) { + var _this = this; + + var goToDestination = function goToDestination(_ref2) { + var namedDest = _ref2.namedDest, + explicitDest = _ref2.explicitDest; + + var destRef = explicitDest[0], + pageNumber = void 0; + if (destRef instanceof Object) { + pageNumber = _this._cachedPageNumber(destRef); + if (pageNumber === null) { + _this.pdfDocument.getPageIndex(destRef).then(function (pageIndex) { + _this.cachePageRef(pageIndex + 1, destRef); + goToDestination({ + namedDest: namedDest, + explicitDest: explicitDest + }); + }).catch(function () { + console.error('PDFLinkService.navigateTo: "' + destRef + '" is not ' + ('a valid page reference, for dest="' + dest + '".')); + }); + return; + } + } else if ((destRef | 0) === destRef) { + pageNumber = destRef + 1; + } else { + console.error('PDFLinkService.navigateTo: "' + destRef + '" is not ' + ('a valid destination reference, for dest="' + dest + '".')); + return; + } + if (!pageNumber || pageNumber < 1 || pageNumber > _this.pagesCount) { + console.error('PDFLinkService.navigateTo: "' + pageNumber + '" is not ' + ('a valid page number, for dest="' + dest + '".')); + return; + } + _this.pdfViewer.scrollPageIntoView({ + pageNumber: pageNumber, + destArray: explicitDest + }); + if (_this.pdfHistory) { + _this.pdfHistory.push({ + dest: explicitDest, + hash: namedDest, + page: pageNumber + }); + } + }; + new Promise(function (resolve, reject) { + if (typeof dest === 'string') { + _this.pdfDocument.getDestination(dest).then(function (destArray) { + resolve({ + namedDest: dest, + explicitDest: destArray + }); + }); + return; + } + resolve({ + namedDest: '', + explicitDest: dest + }); + }).then(function (data) { + if (!(data.explicitDest instanceof Array)) { + console.error('PDFLinkService.navigateTo: "' + data.explicitDest + '" is' + (' not a valid destination array, for dest="' + dest + '".')); + return; + } + goToDestination(data); + }); + } + }, { + key: 'getDestinationHash', + value: function getDestinationHash(dest) { + if (typeof dest === 'string') { + return this.getAnchorUrl('#' + escape(dest)); + } + if (dest instanceof Array) { + var str = JSON.stringify(dest); + return this.getAnchorUrl('#' + escape(str)); + } + return this.getAnchorUrl(''); + } + }, { + key: 'getAnchorUrl', + value: function getAnchorUrl(anchor) { + return (this.baseUrl || '') + anchor; + } + }, { + key: 'setHash', + value: function setHash(hash) { + var pageNumber = void 0, + dest = void 0; + if (hash.indexOf('=') >= 0) { + var params = (0, _ui_utils.parseQueryString)(hash); + if ('search' in params) { + this.eventBus.dispatch('findfromurlhash', { + source: this, + query: params['search'].replace(/"/g, ''), + phraseSearch: params['phrase'] === 'true' + }); + } + if ('nameddest' in params) { + if (this.pdfHistory) { + this.pdfHistory.updateNextHashParam(params.nameddest); + } + this.navigateTo(params.nameddest); + return; + } + if ('page' in params) { + pageNumber = params.page | 0 || 1; + } + if ('zoom' in params) { + var zoomArgs = params.zoom.split(','); + var zoomArg = zoomArgs[0]; + var zoomArgNumber = parseFloat(zoomArg); + if (zoomArg.indexOf('Fit') === -1) { + dest = [null, { name: 'XYZ' }, zoomArgs.length > 1 ? zoomArgs[1] | 0 : null, zoomArgs.length > 2 ? zoomArgs[2] | 0 : null, zoomArgNumber ? zoomArgNumber / 100 : zoomArg]; } else { - findMsg = mozL10n.get('find_reached_bottom', null, - 'Reached end of document, continued from top'); + if (zoomArg === 'Fit' || zoomArg === 'FitB') { + dest = [null, { name: zoomArg }]; + } else if (zoomArg === 'FitH' || zoomArg === 'FitBH' || zoomArg === 'FitV' || zoomArg === 'FitBV') { + dest = [null, { name: zoomArg }, zoomArgs.length > 1 ? zoomArgs[1] | 0 : null]; + } else if (zoomArg === 'FitR') { + if (zoomArgs.length !== 5) { + console.error('PDFLinkService.setHash: Not enough parameters for "FitR".'); + } else { + dest = [null, { name: zoomArg }, zoomArgs[1] | 0, zoomArgs[2] | 0, zoomArgs[3] | 0, zoomArgs[4] | 0]; + } + } else { + console.error('PDFLinkService.setHash: "' + zoomArg + '" is not ' + 'a valid zoom value.'); + } + } + } + if (dest) { + this.pdfViewer.scrollPageIntoView({ + pageNumber: pageNumber || this.page, + destArray: dest, + allowNegativeOffset: true + }); + } else if (pageNumber) { + this.page = pageNumber; + } + if ('pagemode' in params) { + this.eventBus.dispatch('pagemode', { + source: this, + mode: params.pagemode + }); + } + } else { + if (/^\d+$/.test(hash) && hash <= this.pagesCount) { + console.warn('PDFLinkService_setHash: specifying a page number ' + 'directly after the hash symbol (#) is deprecated, ' + ('please use the "#page=' + hash + '" form instead.')); + this.page = hash | 0; + } + dest = unescape(hash); + try { + dest = JSON.parse(dest); + if (!(dest instanceof Array)) { + dest = dest.toString(); + } + } catch (ex) {} + if (typeof dest === 'string' || isValidExplicitDestination(dest)) { + if (this.pdfHistory) { + this.pdfHistory.updateNextHashParam(dest); + } + this.navigateTo(dest); + return; + } + console.error('PDFLinkService.setHash: "' + unescape(hash) + '" is not ' + 'a valid destination.'); + } + } + }, { + key: 'executeNamedAction', + value: function executeNamedAction(action) { + switch (action) { + case 'GoBack': + if (this.pdfHistory) { + this.pdfHistory.back(); + } + break; + case 'GoForward': + if (this.pdfHistory) { + this.pdfHistory.forward(); + } + break; + case 'NextPage': + if (this.page < this.pagesCount) { + this.page++; } break; + case 'PrevPage': + if (this.page > 1) { + this.page--; + } + break; + case 'LastPage': + this.page = this.pagesCount; + break; + case 'FirstPage': + this.page = 1; + break; + default: + break; } + this.eventBus.dispatch('namedaction', { + source: this, + action: action + }); + } + }, { + key: 'onFileAttachmentAnnotation', + value: function onFileAttachmentAnnotation(_ref3) { + var id = _ref3.id, + filename = _ref3.filename, + content = _ref3.content; + + this.eventBus.dispatch('fileattachmentannotation', { + source: this, + id: id, + filename: filename, + content: content + }); + } + }, { + key: 'cachePageRef', + value: function cachePageRef(pageNum, pageRef) { + var refStr = pageRef.num + ' ' + pageRef.gen + ' R'; + this._pagesRefCache[refStr] = pageNum; + } + }, { + key: '_cachedPageNumber', + value: function _cachedPageNumber(pageRef) { + var refStr = pageRef.num + ' ' + pageRef.gen + ' R'; + return this._pagesRefCache && this._pagesRefCache[refStr] || null; + } + }, { + key: 'pagesCount', + get: function get() { + return this.pdfDocument ? this.pdfDocument.numPages : 0; + } + }, { + key: 'page', + get: function get() { + return this.pdfViewer.currentPageNumber; + }, + set: function set(value) { + this.pdfViewer.currentPageNumber = value; + } + }]); - if (notFound) { - this.findField.classList.add('notFound'); - } else { - this.findField.classList.remove('notFound'); + return PDFLinkService; +}(); + +function isValidExplicitDestination(dest) { + if (!(dest instanceof Array)) { + return false; + } + var destLength = dest.length, + allowNull = true; + if (destLength < 2) { + return false; + } + var page = dest[0]; + if (!((typeof page === 'undefined' ? 'undefined' : _typeof(page)) === 'object' && typeof page.num === 'number' && (page.num | 0) === page.num && typeof page.gen === 'number' && (page.gen | 0) === page.gen) && !(typeof page === 'number' && (page | 0) === page && page >= 0)) { + return false; + } + var zoom = dest[1]; + if (!((typeof zoom === 'undefined' ? 'undefined' : _typeof(zoom)) === 'object' && typeof zoom.name === 'string')) { + return false; + } + switch (zoom.name) { + case 'XYZ': + if (destLength !== 5) { + return false; + } + break; + case 'Fit': + case 'FitB': + return destLength === 2; + case 'FitH': + case 'FitBH': + case 'FitV': + case 'FitBV': + if (destLength !== 3) { + return false; } + break; + case 'FitR': + if (destLength !== 6) { + return false; + } + allowNull = false; + break; + default: + return false; + } + for (var i = 2; i < destLength; i++) { + var param = dest[i]; + if (!(typeof param === 'number' || allowNull && param === null)) { + return false; + } + } + return true; +} - this.findField.setAttribute('data-status', status); - this.findMsg.textContent = findMsg; +var SimpleLinkService = function () { + function SimpleLinkService() { + _classCallCheck(this, SimpleLinkService); + } - this.updateResultsCount(matchCount); + _createClass(SimpleLinkService, [{ + key: 'navigateTo', + value: function navigateTo(dest) {} + }, { + key: 'getDestinationHash', + value: function getDestinationHash(dest) { + return '#'; + } + }, { + key: 'getAnchorUrl', + value: function getAnchorUrl(hash) { + return '#'; + } + }, { + key: 'setHash', + value: function setHash(hash) {} + }, { + key: 'executeNamedAction', + value: function executeNamedAction(action) {} + }, { + key: 'onFileAttachmentAnnotation', + value: function onFileAttachmentAnnotation(_ref4) { + var id = _ref4.id, + filename = _ref4.filename, + content = _ref4.content; + } + }, { + key: 'cachePageRef', + value: function cachePageRef(pageNum, pageRef) {} + }, { + key: 'page', + get: function get() { + return 0; }, + set: function set(value) {} + }]); - updateResultsCount: function(matchCount) { - if (!this.findResultsCount) { - return; // no UI control is provided - } + return SimpleLinkService; +}(); - // If there are no matches, hide the counter - if (!matchCount) { - this.findResultsCount.classList.add('hidden'); - return; - } +exports.PDFLinkService = PDFLinkService; +exports.SimpleLinkService = SimpleLinkService; - // Create the match counter - this.findResultsCount.textContent = matchCount.toLocaleString(); +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { - // Show the counter - this.findResultsCount.classList.remove('hidden'); - }, +"use strict"; - open: function PDFFindBar_open() { - if (!this.opened) { - this.opened = true; - this.toggleButton.classList.add('toggled'); - this.bar.classList.remove('hidden'); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFCursorTools = exports.CursorTool = undefined; + +var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _grab_to_pan = __webpack_require__(14); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var CursorTool = { + SELECT: 0, + HAND: 1, + ZOOM: 2 +}; + +var PDFCursorTools = function () { + function PDFCursorTools(_ref) { + var _this = this; + + var container = _ref.container, + eventBus = _ref.eventBus, + preferences = _ref.preferences; + + _classCallCheck(this, PDFCursorTools); + + this.container = container; + this.eventBus = eventBus; + this.active = CursorTool.SELECT; + this.activeBeforePresentationMode = null; + this.handTool = new _grab_to_pan.GrabToPan({ element: this.container }); + this._addEventListeners(); + Promise.all([preferences.get('cursorToolOnLoad'), preferences.get('enableHandToolOnLoad')]).then(function (_ref2) { + var _ref3 = _slicedToArray(_ref2, 2), + cursorToolPref = _ref3[0], + handToolPref = _ref3[1]; + + if (handToolPref === true) { + preferences.set('enableHandToolOnLoad', false); + if (cursorToolPref === CursorTool.SELECT) { + cursorToolPref = CursorTool.HAND; + preferences.set('cursorToolOnLoad', cursorToolPref).catch(function () {}); + } } - this.findField.select(); - this.findField.focus(); - }, + _this.switchTool(cursorToolPref); + }).catch(function () {}); + } - close: function PDFFindBar_close() { - if (!this.opened) { + _createClass(PDFCursorTools, [{ + key: 'switchTool', + value: function switchTool(tool) { + var _this2 = this; + + if (this.activeBeforePresentationMode !== null) { return; } - this.opened = false; - this.toggleButton.classList.remove('toggled'); - this.bar.classList.add('hidden'); - this.findController.active = false; - }, - - toggle: function PDFFindBar_toggle() { - if (this.opened) { - this.close(); - } else { - this.open(); + if (tool === this.active) { + return; } + var disableActiveTool = function disableActiveTool() { + switch (_this2.active) { + case CursorTool.SELECT: + break; + case CursorTool.HAND: + _this2.handTool.deactivate(); + break; + case CursorTool.ZOOM: + } + }; + switch (tool) { + case CursorTool.SELECT: + disableActiveTool(); + break; + case CursorTool.HAND: + disableActiveTool(); + this.handTool.activate(); + break; + case CursorTool.ZOOM: + default: + console.error('switchTool: "' + tool + '" is an unsupported value.'); + return; + } + this.active = tool; + this._dispatchEvent(); } - }; - return PDFFindBar; -})(); + }, { + key: '_dispatchEvent', + value: function _dispatchEvent() { + this.eventBus.dispatch('cursortoolchanged', { + source: this, + tool: this.active + }); + } + }, { + key: '_addEventListeners', + value: function _addEventListeners() { + var _this3 = this; + + this.eventBus.on('switchcursortool', function (evt) { + _this3.switchTool(evt.tool); + }); + this.eventBus.on('presentationmodechanged', function (evt) { + if (evt.switchInProgress) { + return; + } + var previouslyActive = void 0; + if (evt.active) { + previouslyActive = _this3.active; + _this3.switchTool(CursorTool.SELECT); + _this3.activeBeforePresentationMode = previouslyActive; + } else { + previouslyActive = _this3.activeBeforePresentationMode; + _this3.activeBeforePresentationMode = null; + _this3.switchTool(previouslyActive); + } + }); + } + }, { + key: 'activeTool', + get: function get() { + return this.active; + } + }]); + return PDFCursorTools; +}(); -var FindStates = { - FIND_FOUND: 0, - FIND_NOTFOUND: 1, - FIND_WRAPPED: 2, - FIND_PENDING: 3 -}; +exports.CursorTool = CursorTool; +exports.PDFCursorTools = PDFCursorTools; -var FIND_SCROLL_OFFSET_TOP = -50; -var FIND_SCROLL_OFFSET_LEFT = -400; +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Provides "search" or "find" functionality for the PDF. - * This object actually performs the search for a given string. - */ -var PDFFindController = (function PDFFindControllerClosure() { - function PDFFindController(options) { - this.startedTextExtraction = false; - this.extractTextPromises = []; - this.pendingFindMatches = {}; - this.active = false; // If active, find results will be highlighted. - this.pageContents = []; // Stores the text for each page. - this.pageMatches = []; - this.matchCount = 0; - this.selected = { // Currently selected match. - pageIdx: -1, - matchIdx: -1 - }; - this.offset = { // Where the find algorithm currently is in the document. - pageIdx: null, - matchIdx: null - }; - this.pagesToSearch = null; - this.resumePageIdx = null; - this.state = null; - this.dirtyMatch = false; - this.findTimeout = null; - this.pdfViewer = options.pdfViewer || null; - this.integratedFind = options.integratedFind || false; - this.charactersToNormalize = { - '\u2018': '\'', // Left single quotation mark - '\u2019': '\'', // Right single quotation mark - '\u201A': '\'', // Single low-9 quotation mark - '\u201B': '\'', // Single high-reversed-9 quotation mark - '\u201C': '"', // Left double quotation mark - '\u201D': '"', // Right double quotation mark - '\u201E': '"', // Double low-9 quotation mark - '\u201F': '"', // Double high-reversed-9 quotation mark - '\u00BC': '1/4', // Vulgar fraction one quarter - '\u00BD': '1/2', // Vulgar fraction one half - '\u00BE': '3/4', // Vulgar fraction three quarters - }; - this.findBar = options.findBar || null; +"use strict"; - // Compile the regular expression for text normalization once - var replace = Object.keys(this.charactersToNormalize).join(''); - this.normalizationRegex = new RegExp('[' + replace + ']', 'g'); - var events = [ - 'find', - 'findagain', - 'findhighlightallchange', - 'findcasesensitivitychange' - ]; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFFindController = exports.FindState = undefined; - this.firstPagePromise = new Promise(function (resolve) { - this.resolveFirstPage = resolve; - }.bind(this)); - this.handleEvent = this.handleEvent.bind(this); +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - for (var i = 0, len = events.length; i < len; i++) { - window.addEventListener(events[i], this.handleEvent); - } +var _pdfjsLib = __webpack_require__(1); + +var _ui_utils = __webpack_require__(0); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var FindState = { + FOUND: 0, + NOT_FOUND: 1, + WRAPPED: 2, + PENDING: 3 +}; +var FIND_SCROLL_OFFSET_TOP = -50; +var FIND_SCROLL_OFFSET_LEFT = -400; +var FIND_TIMEOUT = 250; +var CHARACTERS_TO_NORMALIZE = { + '\u2018': '\'', + '\u2019': '\'', + '\u201A': '\'', + '\u201B': '\'', + '\u201C': '"', + '\u201D': '"', + '\u201E': '"', + '\u201F': '"', + '\xBC': '1/4', + '\xBD': '1/2', + '\xBE': '3/4' +}; + +var PDFFindController = function () { + function PDFFindController(_ref) { + var pdfViewer = _ref.pdfViewer; + + _classCallCheck(this, PDFFindController); + + this.pdfViewer = pdfViewer; + this.onUpdateResultsCount = null; + this.onUpdateState = null; + this.reset(); + var replace = Object.keys(CHARACTERS_TO_NORMALIZE).join(''); + this.normalizationRegex = new RegExp('[' + replace + ']', 'g'); } - PDFFindController.prototype = { - setFindBar: function PDFFindController_setFindBar(findBar) { - this.findBar = findBar; - }, + _createClass(PDFFindController, [{ + key: 'reset', + value: function reset() { + var _this = this; - reset: function PDFFindController_reset() { this.startedTextExtraction = false; this.extractTextPromises = []; + this.pendingFindMatches = Object.create(null); this.active = false; - }, - - normalize: function PDFFindController_normalize(text) { - var self = this; + this.pageContents = []; + this.pageMatches = []; + this.pageMatchesLength = null; + this.matchCount = 0; + this.selected = { + pageIdx: -1, + matchIdx: -1 + }; + this.offset = { + pageIdx: null, + matchIdx: null + }; + this.pagesToSearch = null; + this.resumePageIdx = null; + this.state = null; + this.dirtyMatch = false; + this.findTimeout = null; + this._firstPagePromise = new Promise(function (resolve) { + _this.resolveFirstPage = resolve; + }); + } + }, { + key: 'normalize', + value: function normalize(text) { return text.replace(this.normalizationRegex, function (ch) { - return self.charactersToNormalize[ch]; + return CHARACTERS_TO_NORMALIZE[ch]; }); - }, - - calcFindMatch: function PDFFindController_calcFindMatch(pageIndex) { - var pageContent = this.normalize(this.pageContents[pageIndex]); - var query = this.normalize(this.state.query); - var caseSensitive = this.state.caseSensitive; - var queryLen = query.length; - - if (queryLen === 0) { - // Do nothing: the matches should be wiped out already. - return; + } + }, { + key: '_prepareMatches', + value: function _prepareMatches(matchesWithLength, matches, matchesLength) { + function isSubTerm(matchesWithLength, currentIndex) { + var currentElem = matchesWithLength[currentIndex]; + var nextElem = matchesWithLength[currentIndex + 1]; + if (currentIndex < matchesWithLength.length - 1 && currentElem.match === nextElem.match) { + currentElem.skipped = true; + return true; + } + for (var i = currentIndex - 1; i >= 0; i--) { + var prevElem = matchesWithLength[i]; + if (prevElem.skipped) { + continue; + } + if (prevElem.match + prevElem.matchLength < currentElem.match) { + break; + } + if (prevElem.match + prevElem.matchLength >= currentElem.match + currentElem.matchLength) { + currentElem.skipped = true; + return true; + } + } + return false; } - - if (!caseSensitive) { - pageContent = pageContent.toLowerCase(); - query = query.toLowerCase(); + matchesWithLength.sort(function (a, b) { + return a.match === b.match ? a.matchLength - b.matchLength : a.match - b.match; + }); + for (var i = 0, len = matchesWithLength.length; i < len; i++) { + if (isSubTerm(matchesWithLength, i)) { + continue; + } + matches.push(matchesWithLength[i].match); + matchesLength.push(matchesWithLength[i].matchLength); } - + } + }, { + key: 'calcFindPhraseMatch', + value: function calcFindPhraseMatch(query, pageIndex, pageContent) { var matches = []; + var queryLen = query.length; var matchIdx = -queryLen; while (true) { matchIdx = pageContent.indexOf(query, matchIdx + queryLen); @@ -1207,101 +3235,142 @@ var PDFFindController = (function PDFFindControllerClosure() { matches.push(matchIdx); } this.pageMatches[pageIndex] = matches; + } + }, { + key: 'calcFindWordMatch', + value: function calcFindWordMatch(query, pageIndex, pageContent) { + var matchesWithLength = []; + var queryArray = query.match(/\S+/g); + for (var i = 0, len = queryArray.length; i < len; i++) { + var subquery = queryArray[i]; + var subqueryLen = subquery.length; + var matchIdx = -subqueryLen; + while (true) { + matchIdx = pageContent.indexOf(subquery, matchIdx + subqueryLen); + if (matchIdx === -1) { + break; + } + matchesWithLength.push({ + match: matchIdx, + matchLength: subqueryLen, + skipped: false + }); + } + } + if (!this.pageMatchesLength) { + this.pageMatchesLength = []; + } + this.pageMatchesLength[pageIndex] = []; + this.pageMatches[pageIndex] = []; + this._prepareMatches(matchesWithLength, this.pageMatches[pageIndex], this.pageMatchesLength[pageIndex]); + } + }, { + key: 'calcFindMatch', + value: function calcFindMatch(pageIndex) { + var pageContent = this.normalize(this.pageContents[pageIndex]); + var query = this.normalize(this.state.query); + var caseSensitive = this.state.caseSensitive; + var phraseSearch = this.state.phraseSearch; + var queryLen = query.length; + if (queryLen === 0) { + return; + } + if (!caseSensitive) { + pageContent = pageContent.toLowerCase(); + query = query.toLowerCase(); + } + if (phraseSearch) { + this.calcFindPhraseMatch(query, pageIndex, pageContent); + } else { + this.calcFindWordMatch(query, pageIndex, pageContent); + } this.updatePage(pageIndex); if (this.resumePageIdx === pageIndex) { this.resumePageIdx = null; this.nextPageMatch(); } - - // Update the matches count - if (matches.length > 0) { - this.matchCount += matches.length; + if (this.pageMatches[pageIndex].length > 0) { + this.matchCount += this.pageMatches[pageIndex].length; this.updateUIResultsCount(); } - }, + } + }, { + key: 'extractText', + value: function extractText() { + var _this2 = this; - extractText: function PDFFindController_extractText() { if (this.startedTextExtraction) { return; } this.startedTextExtraction = true; - - this.pageContents = []; - var extractTextPromisesResolves = []; - var numPages = this.pdfViewer.pagesCount; - for (var i = 0; i < numPages; i++) { - this.extractTextPromises.push(new Promise(function (resolve) { - extractTextPromisesResolves.push(resolve); - })); - } - - var self = this; - function extractPageText(pageIndex) { - self.pdfViewer.getPageTextContent(pageIndex).then( - function textContentResolved(textContent) { + this.pageContents.length = 0; + var promise = Promise.resolve(); + + var _loop = function _loop(i, ii) { + var extractTextCapability = (0, _pdfjsLib.createPromiseCapability)(); + _this2.extractTextPromises[i] = extractTextCapability.promise; + promise = promise.then(function () { + return _this2.pdfViewer.getPageTextContent(i).then(function (textContent) { var textItems = textContent.items; - var str = []; - - for (var i = 0, len = textItems.length; i < len; i++) { - str.push(textItems[i].str); + var strBuf = []; + for (var j = 0, jj = textItems.length; j < jj; j++) { + strBuf.push(textItems[j].str); } + _this2.pageContents[i] = strBuf.join(''); + extractTextCapability.resolve(i); + }, function (reason) { + console.error('Unable to get page ' + (i + 1) + ' text content', reason); + _this2.pageContents[i] = ''; + extractTextCapability.resolve(i); + }); + }); + }; - // Store the pageContent as a string. - self.pageContents.push(str.join('')); - - extractTextPromisesResolves[pageIndex](pageIndex); - if ((pageIndex + 1) < self.pdfViewer.pagesCount) { - extractPageText(pageIndex + 1); - } - } - ); + for (var i = 0, ii = this.pdfViewer.pagesCount; i < ii; i++) { + _loop(i, ii); } - extractPageText(0); - }, + } + }, { + key: 'executeCommand', + value: function executeCommand(cmd, state) { + var _this3 = this; - handleEvent: function PDFFindController_handleEvent(e) { - if (this.state === null || e.type !== 'findagain') { + if (this.state === null || cmd !== 'findagain') { this.dirtyMatch = true; } - this.state = e.detail; - this.updateUIState(FindStates.FIND_PENDING); - - this.firstPagePromise.then(function() { - this.extractText(); - - clearTimeout(this.findTimeout); - if (e.type === 'find') { - // Only trigger the find action after 250ms of silence. - this.findTimeout = setTimeout(this.nextMatch.bind(this), 250); + this.state = state; + this.updateUIState(FindState.PENDING); + this._firstPagePromise.then(function () { + _this3.extractText(); + clearTimeout(_this3.findTimeout); + if (cmd === 'find') { + _this3.findTimeout = setTimeout(_this3.nextMatch.bind(_this3), FIND_TIMEOUT); } else { - this.nextMatch(); + _this3.nextMatch(); } - }.bind(this)); - }, - - updatePage: function PDFFindController_updatePage(index) { + }); + } + }, { + key: 'updatePage', + value: function updatePage(index) { if (this.selected.pageIdx === index) { - // If the page is selected, scroll the page into view, which triggers - // rendering the page, which adds the textLayer. Once the textLayer is - // build, it will scroll onto the selected match. - this.pdfViewer.scrollPageIntoView(index + 1); + this.pdfViewer.currentPageNumber = index + 1; } - var page = this.pdfViewer.getPageView(index); if (page.textLayer) { page.textLayer.updateMatches(); } - }, + } + }, { + key: 'nextMatch', + value: function nextMatch() { + var _this4 = this; - nextMatch: function PDFFindController_nextMatch() { var previous = this.state.findPrevious; var currentPageIndex = this.pdfViewer.currentPageNumber - 1; var numPages = this.pdfViewer.pagesCount; - this.active = true; - if (this.dirtyMatch) { - // Need to recalculate the matches, reset everything. this.dirtyMatch = false; this.selected.pageIdx = this.selected.matchIdx = -1; this.offset.pageIdx = currentPageIndex; @@ -1310,2039 +3379,2210 @@ var PDFFindController = (function PDFFindControllerClosure() { this.resumePageIdx = null; this.pageMatches = []; this.matchCount = 0; - var self = this; - + this.pageMatchesLength = null; for (var i = 0; i < numPages; i++) { - // Wipe out any previous highlighted matches. this.updatePage(i); - - // As soon as the text is extracted start finding the matches. if (!(i in this.pendingFindMatches)) { this.pendingFindMatches[i] = true; - this.extractTextPromises[i].then(function(pageIdx) { - delete self.pendingFindMatches[pageIdx]; - self.calcFindMatch(pageIdx); + this.extractTextPromises[i].then(function (pageIdx) { + delete _this4.pendingFindMatches[pageIdx]; + _this4.calcFindMatch(pageIdx); }); } } } - - // If there's no query there's no point in searching. if (this.state.query === '') { - this.updateUIState(FindStates.FIND_FOUND); + this.updateUIState(FindState.FOUND); return; } - - // If we're waiting on a page, we return since we can't do anything else. if (this.resumePageIdx) { return; } - var offset = this.offset; - // Keep track of how many pages we should maximally iterate through. this.pagesToSearch = numPages; - // If there's already a matchIdx that means we are iterating through a - // page's matches. if (offset.matchIdx !== null) { var numPageMatches = this.pageMatches[offset.pageIdx].length; - if ((!previous && offset.matchIdx + 1 < numPageMatches) || - (previous && offset.matchIdx > 0)) { - // The simple case; we just have advance the matchIdx to select - // the next match on the page. + if (!previous && offset.matchIdx + 1 < numPageMatches || previous && offset.matchIdx > 0) { this.hadMatch = true; - offset.matchIdx = (previous ? offset.matchIdx - 1 : - offset.matchIdx + 1); + offset.matchIdx = previous ? offset.matchIdx - 1 : offset.matchIdx + 1; this.updateMatch(true); return; } - // We went beyond the current page's matches, so we advance to - // the next page. this.advanceOffsetPage(previous); } - // Start searching through the page. this.nextPageMatch(); - }, - - matchesReady: function PDFFindController_matchesReady(matches) { + } + }, { + key: 'matchesReady', + value: function matchesReady(matches) { var offset = this.offset; var numMatches = matches.length; var previous = this.state.findPrevious; - if (numMatches) { - // There were matches for the page, so initialize the matchIdx. this.hadMatch = true; - offset.matchIdx = (previous ? numMatches - 1 : 0); + offset.matchIdx = previous ? numMatches - 1 : 0; this.updateMatch(true); return true; - } else { - // No matches, so attempt to search the next page. - this.advanceOffsetPage(previous); - if (offset.wrapped) { - offset.matchIdx = null; - if (this.pagesToSearch < 0) { - // No point in wrapping again, there were no matches. - this.updateMatch(false); - // while matches were not found, searching for a page - // with matches should nevertheless halt. - return true; - } + } + this.advanceOffsetPage(previous); + if (offset.wrapped) { + offset.matchIdx = null; + if (this.pagesToSearch < 0) { + this.updateMatch(false); + return true; } - // Matches were not found (and searching is not done). - return false; } - }, - - /** - * The method is called back from the text layer when match presentation - * is updated. - * @param {number} pageIndex - page index. - * @param {number} index - match index. - * @param {Array} elements - text layer div elements array. - * @param {number} beginIdx - start index of the div array for the match. - * @param {number} endIdx - end index of the div array for the match. - */ - updateMatchPosition: function PDFFindController_updateMatchPosition( - pageIndex, index, elements, beginIdx, endIdx) { - if (this.selected.matchIdx === index && - this.selected.pageIdx === pageIndex) { + return false; + } + }, { + key: 'updateMatchPosition', + value: function updateMatchPosition(pageIndex, matchIndex, elements, beginIdx) { + if (this.selected.matchIdx === matchIndex && this.selected.pageIdx === pageIndex) { var spot = { top: FIND_SCROLL_OFFSET_TOP, left: FIND_SCROLL_OFFSET_LEFT }; - scrollIntoView(elements[beginIdx], spot, - /* skipOverflowHiddenElements = */ true); + (0, _ui_utils.scrollIntoView)(elements[beginIdx], spot, true); } - }, - - nextPageMatch: function PDFFindController_nextPageMatch() { + } + }, { + key: 'nextPageMatch', + value: function nextPageMatch() { if (this.resumePageIdx !== null) { console.error('There can only be one pending page.'); } + var matches = null; do { var pageIdx = this.offset.pageIdx; - var matches = this.pageMatches[pageIdx]; + matches = this.pageMatches[pageIdx]; if (!matches) { - // The matches don't exist yet for processing by "matchesReady", - // so set a resume point for when they do exist. this.resumePageIdx = pageIdx; break; } } while (!this.matchesReady(matches)); - }, - - advanceOffsetPage: function PDFFindController_advanceOffsetPage(previous) { + } + }, { + key: 'advanceOffsetPage', + value: function advanceOffsetPage(previous) { var offset = this.offset; var numPages = this.extractTextPromises.length; - offset.pageIdx = (previous ? offset.pageIdx - 1 : offset.pageIdx + 1); + offset.pageIdx = previous ? offset.pageIdx - 1 : offset.pageIdx + 1; offset.matchIdx = null; - this.pagesToSearch--; - if (offset.pageIdx >= numPages || offset.pageIdx < 0) { - offset.pageIdx = (previous ? numPages - 1 : 0); + offset.pageIdx = previous ? numPages - 1 : 0; offset.wrapped = true; } - }, + } + }, { + key: 'updateMatch', + value: function updateMatch() { + var found = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - updateMatch: function PDFFindController_updateMatch(found) { - var state = FindStates.FIND_NOTFOUND; + var state = FindState.NOT_FOUND; var wrapped = this.offset.wrapped; this.offset.wrapped = false; - if (found) { var previousPage = this.selected.pageIdx; this.selected.pageIdx = this.offset.pageIdx; this.selected.matchIdx = this.offset.matchIdx; - state = (wrapped ? FindStates.FIND_WRAPPED : FindStates.FIND_FOUND); - // Update the currently selected page to wipe out any selected matches. + state = wrapped ? FindState.WRAPPED : FindState.FOUND; if (previousPage !== -1 && previousPage !== this.selected.pageIdx) { this.updatePage(previousPage); } } - this.updateUIState(state, this.state.findPrevious); if (this.selected.pageIdx !== -1) { this.updatePage(this.selected.pageIdx); } - }, - - updateUIResultsCount: - function PDFFindController_updateUIResultsCount() { - if (this.findBar === null) { - throw new Error('PDFFindController is not initialized with a ' + - 'PDFFindBar instance.'); - } - this.findBar.updateResultsCount(this.matchCount); - }, - - updateUIState: function PDFFindController_updateUIState(state, previous) { - if (this.integratedFind) { - FirefoxCom.request('updateFindControlState', - { result: state, findPrevious: previous }); - return; + } + }, { + key: 'updateUIResultsCount', + value: function updateUIResultsCount() { + if (this.onUpdateResultsCount) { + this.onUpdateResultsCount(this.matchCount); } - if (this.findBar === null) { - throw new Error('PDFFindController is not initialized with a ' + - 'PDFFindBar instance.'); + } + }, { + key: 'updateUIState', + value: function updateUIState(state, previous) { + if (this.onUpdateState) { + this.onUpdateState(state, previous, this.matchCount); } - this.findBar.updateUIState(state, previous, this.matchCount); } - }; + }]); + return PDFFindController; -})(); +}(); +exports.FindState = FindState; +exports.PDFFindController = PDFFindController; -/** - * Performs navigation functions inside PDF, such as opening specified page, - * or destination. - * @class - * @implements {IPDFLinkService} - */ -var PDFLinkService = (function () { - /** - * @constructs PDFLinkService - */ - function PDFLinkService() { - this.baseUrl = null; - this.pdfDocument = null; - this.pdfViewer = null; - this.pdfHistory = null; +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { - this._pagesRefCache = null; - } +"use strict"; - PDFLinkService.prototype = { - setDocument: function PDFLinkService_setDocument(pdfDocument, baseUrl) { - this.baseUrl = baseUrl; - this.pdfDocument = pdfDocument; - this._pagesRefCache = Object.create(null); - }, - setViewer: function PDFLinkService_setViewer(pdfViewer) { - this.pdfViewer = pdfViewer; - }, +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.GenericCom = undefined; - setHistory: function PDFLinkService_setHistory(pdfHistory) { - this.pdfHistory = pdfHistory; - }, +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - /** - * @returns {number} - */ - get pagesCount() { - return this.pdfDocument.numPages; - }, +var _app = __webpack_require__(4); - /** - * @returns {number} - */ - get page() { - return this.pdfViewer.currentPageNumber; - }, +var _preferences = __webpack_require__(28); - /** - * @param {number} value - */ - set page(value) { - this.pdfViewer.currentPageNumber = value; - }, +var _download_manager = __webpack_require__(12); - /** - * @param dest - The PDF destination object. - */ - navigateTo: function PDFLinkService_navigateTo(dest) { - var destString = ''; - var self = this; +var _genericl10n = __webpack_require__(13); - var goToDestination = function(destRef) { - // dest array looks like that: <page-ref> </XYZ|FitXXX> <args..> - var pageNumber = destRef instanceof Object ? - self._pagesRefCache[destRef.num + ' ' + destRef.gen + ' R'] : - (destRef + 1); - if (pageNumber) { - if (pageNumber > self.pagesCount) { - pageNumber = self.pagesCount; - } - self.pdfViewer.scrollPageIntoView(pageNumber, dest); - - if (self.pdfHistory) { - // Update the browsing history. - self.pdfHistory.push({ - dest: dest, - hash: destString, - page: pageNumber - }); - } - } else { - self.pdfDocument.getPageIndex(destRef).then(function (pageIndex) { - var pageNum = pageIndex + 1; - var cacheKey = destRef.num + ' ' + destRef.gen + ' R'; - self._pagesRefCache[cacheKey] = pageNum; - goToDestination(destRef); - }); - } - }; +var _pdfjsLib = __webpack_require__(1); - var destinationPromise; - if (typeof dest === 'string') { - destString = dest; - destinationPromise = this.pdfDocument.getDestination(dest); - } else { - destinationPromise = Promise.resolve(dest); - } - destinationPromise.then(function(destination) { - dest = destination; - if (!(destination instanceof Array)) { - return; // invalid destination - } - goToDestination(destination[0]); - }); - }, +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - /** - * @param dest - The PDF destination object. - * @returns {string} The hyperlink to the PDF object. - */ - getDestinationHash: function PDFLinkService_getDestinationHash(dest) { - if (typeof dest === 'string') { - return this.getAnchorUrl('#' + escape(dest)); - } - if (dest instanceof Array) { - var destRef = dest[0]; // see navigateTo method for dest format - var pageNumber = destRef instanceof Object ? - this._pagesRefCache[destRef.num + ' ' + destRef.gen + ' R'] : - (destRef + 1); - if (pageNumber) { - var pdfOpenParams = this.getAnchorUrl('#page=' + pageNumber); - var destKind = dest[1]; - if (typeof destKind === 'object' && 'name' in destKind && - destKind.name === 'XYZ') { - var scale = (dest[4] || this.pdfViewer.currentScaleValue); - var scaleNumber = parseFloat(scale); - if (scaleNumber) { - scale = scaleNumber * 100; - } - pdfOpenParams += '&zoom=' + scale; - if (dest[2] || dest[3]) { - pdfOpenParams += ',' + (dest[2] || 0) + ',' + (dest[3] || 0); - } - } - return pdfOpenParams; - } - } - return this.getAnchorUrl(''); - }, +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - /** - * Prefix the full url on anchor links to make sure that links are resolved - * relative to the current URL instead of the one defined in <base href>. - * @param {String} anchor The anchor hash, including the #. - * @returns {string} The hyperlink to the PDF object. - */ - getAnchorUrl: function PDFLinkService_getAnchorUrl(anchor) { - return (this.baseUrl || '') + anchor; - }, +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - /** - * @param {string} hash - */ - setHash: function PDFLinkService_setHash(hash) { - if (hash.indexOf('=') >= 0) { - var params = parseQueryString(hash); - // borrowing syntax from "Parameters for Opening PDF Files" - if ('nameddest' in params) { - if (this.pdfHistory) { - this.pdfHistory.updateNextHashParam(params.nameddest); - } - this.navigateTo(params.nameddest); - return; - } - var pageNumber, dest; - if ('page' in params) { - pageNumber = (params.page | 0) || 1; - } - if ('zoom' in params) { - // Build the destination array. - var zoomArgs = params.zoom.split(','); // scale,left,top - var zoomArg = zoomArgs[0]; - var zoomArgNumber = parseFloat(zoomArg); - - if (zoomArg.indexOf('Fit') === -1) { - // If the zoomArg is a number, it has to get divided by 100. If it's - // a string, it should stay as it is. - dest = [null, { name: 'XYZ' }, - zoomArgs.length > 1 ? (zoomArgs[1] | 0) : null, - zoomArgs.length > 2 ? (zoomArgs[2] | 0) : null, - (zoomArgNumber ? zoomArgNumber / 100 : zoomArg)]; - } else { - if (zoomArg === 'Fit' || zoomArg === 'FitB') { - dest = [null, { name: zoomArg }]; - } else if ((zoomArg === 'FitH' || zoomArg === 'FitBH') || - (zoomArg === 'FitV' || zoomArg === 'FitBV')) { - dest = [null, { name: zoomArg }, - zoomArgs.length > 1 ? (zoomArgs[1] | 0) : null]; - } else if (zoomArg === 'FitR') { - if (zoomArgs.length !== 5) { - console.error('PDFLinkService_setHash: ' + - 'Not enough parameters for \'FitR\'.'); - } else { - dest = [null, { name: zoomArg }, - (zoomArgs[1] | 0), (zoomArgs[2] | 0), - (zoomArgs[3] | 0), (zoomArgs[4] | 0)]; - } - } else { - console.error('PDFLinkService_setHash: \'' + zoomArg + - '\' is not a valid zoom value.'); - } - } - } - if (dest) { - this.pdfViewer.scrollPageIntoView(pageNumber || this.page, dest); - } else if (pageNumber) { - this.page = pageNumber; // simple page - } - if ('pagemode' in params) { - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('pagemode', true, true, { - mode: params.pagemode, - }); - this.pdfViewer.container.dispatchEvent(event); - } - } else if (/^\d+$/.test(hash)) { // page number - this.page = hash; - } else { // named destination - if (this.pdfHistory) { - this.pdfHistory.updateNextHashParam(unescape(hash)); - } - this.navigateTo(unescape(hash)); - } - }, - - /** - * @param {string} action - */ - executeNamedAction: function PDFLinkService_executeNamedAction(action) { - // See PDF reference, table 8.45 - Named action - switch (action) { - case 'GoBack': - if (this.pdfHistory) { - this.pdfHistory.back(); - } - break; - - case 'GoForward': - if (this.pdfHistory) { - this.pdfHistory.forward(); - } - break; - - case 'NextPage': - this.page++; - break; +; +var GenericCom = {}; - case 'PrevPage': - this.page--; - break; +var GenericPreferences = function (_BasePreferences) { + _inherits(GenericPreferences, _BasePreferences); - case 'LastPage': - this.page = this.pagesCount; - break; + function GenericPreferences() { + _classCallCheck(this, GenericPreferences); - case 'FirstPage': - this.page = 1; - break; - - default: - break; // No action according to spec - } + return _possibleConstructorReturn(this, (GenericPreferences.__proto__ || Object.getPrototypeOf(GenericPreferences)).apply(this, arguments)); + } - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('namedaction', true, true, { - action: action + _createClass(GenericPreferences, [{ + key: '_writeToStorage', + value: function _writeToStorage(prefObj) { + return new Promise(function (resolve) { + localStorage.setItem('pdfjs.preferences', JSON.stringify(prefObj)); + resolve(); }); - this.pdfViewer.container.dispatchEvent(event); - }, - - /** - * @param {number} pageNum - page number. - * @param {Object} pageRef - reference to the page. - */ - cachePageRef: function PDFLinkService_cachePageRef(pageNum, pageRef) { - var refStr = pageRef.num + ' ' + pageRef.gen + ' R'; - this._pagesRefCache[refStr] = pageNum; } - }; - - return PDFLinkService; -})(); - + }, { + key: '_readFromStorage', + value: function _readFromStorage(prefObj) { + return new Promise(function (resolve) { + var readPrefs = JSON.parse(localStorage.getItem('pdfjs.preferences')); + resolve(readPrefs); + }); + } + }]); -var PDFHistory = (function () { - function PDFHistory(options) { - this.linkService = options.linkService; + return GenericPreferences; +}(_preferences.BasePreferences); - this.initialized = false; - this.initialDestination = null; - this.initialBookmark = null; - } +var GenericExternalServices = Object.create(_app.DefaultExternalServices); +GenericExternalServices.createDownloadManager = function () { + return new _download_manager.DownloadManager(); +}; +GenericExternalServices.createPreferences = function () { + return new GenericPreferences(); +}; +GenericExternalServices.createL10n = function () { + return new _genericl10n.GenericL10n(_pdfjsLib.PDFJS.locale); +}; +_app.PDFViewerApplication.externalServices = GenericExternalServices; +exports.GenericCom = GenericCom; - PDFHistory.prototype = { - /** - * @param {string} fingerprint - * @param {IPDFLinkService} linkService - */ - initialize: function pdfHistoryInitialize(fingerprint) { - this.initialized = true; - this.reInitialized = false; - this.allowHashChange = true; - this.historyUnlocked = true; - this.isViewerInPresentationMode = false; +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { - this.previousHash = window.location.hash.substring(1); - this.currentBookmark = ''; - this.currentPage = 0; - this.updatePreviousBookmark = false; - this.previousBookmark = ''; - this.previousPage = 0; - this.nextHashParam = ''; +"use strict"; - this.fingerprint = fingerprint; - this.currentUid = this.uid = 0; - this.current = {}; - var state = window.history.state; - if (this._isStateObjectDefined(state)) { - // This corresponds to navigating back to the document - // from another page in the browser history. - if (state.target.dest) { - this.initialDestination = state.target.dest; - } else { - this.initialBookmark = state.target.hash; - } - this.currentUid = state.uid; - this.uid = state.uid + 1; - this.current = state.target; - } else { - // This corresponds to the loading of a new document. - if (state && state.fingerprint && - this.fingerprint !== state.fingerprint) { - // Reinitialize the browsing history when a new document - // is opened in the web viewer. - this.reInitialized = true; - } - this._pushOrReplaceState({fingerprint: this.fingerprint}, true); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFPrintService = undefined; + +var _ui_utils = __webpack_require__(0); + +var _app = __webpack_require__(4); + +var _pdfjsLib = __webpack_require__(1); + +var activeService = null; +var overlayManager = null; +function renderPage(activeServiceOnEntry, pdfDocument, pageNumber, size) { + var scratchCanvas = activeService.scratchCanvas; + var PRINT_RESOLUTION = 150; + var PRINT_UNITS = PRINT_RESOLUTION / 72.0; + scratchCanvas.width = Math.floor(size.width * PRINT_UNITS); + scratchCanvas.height = Math.floor(size.height * PRINT_UNITS); + var width = Math.floor(size.width * _ui_utils.CSS_UNITS) + 'px'; + var height = Math.floor(size.height * _ui_utils.CSS_UNITS) + 'px'; + var ctx = scratchCanvas.getContext('2d'); + ctx.save(); + ctx.fillStyle = 'rgb(255, 255, 255)'; + ctx.fillRect(0, 0, scratchCanvas.width, scratchCanvas.height); + ctx.restore(); + return pdfDocument.getPage(pageNumber).then(function (pdfPage) { + var renderContext = { + canvasContext: ctx, + transform: [PRINT_UNITS, 0, 0, PRINT_UNITS, 0, 0], + viewport: pdfPage.getViewport(1, size.rotation), + intent: 'print' + }; + return pdfPage.render(renderContext).promise; + }).then(function () { + return { + width: width, + height: height + }; + }); +} +function PDFPrintService(pdfDocument, pagesOverview, printContainer, l10n) { + this.pdfDocument = pdfDocument; + this.pagesOverview = pagesOverview; + this.printContainer = printContainer; + this.l10n = l10n || _ui_utils.NullL10n; + this.currentPage = -1; + this.scratchCanvas = document.createElement('canvas'); +} +PDFPrintService.prototype = { + layout: function layout() { + this.throwIfInactive(); + var body = document.querySelector('body'); + body.setAttribute('data-pdfjsprinting', true); + var hasEqualPageSizes = this.pagesOverview.every(function (size) { + return size.width === this.pagesOverview[0].width && size.height === this.pagesOverview[0].height; + }, this); + if (!hasEqualPageSizes) { + console.warn('Not all pages have the same size. The printed ' + 'result may be incorrect!'); + } + this.pageStyleSheet = document.createElement('style'); + var pageSize = this.pagesOverview[0]; + this.pageStyleSheet.textContent = '@supports ((size:A4) and (size:1pt 1pt)) {' + '@page { size: ' + pageSize.width + 'pt ' + pageSize.height + 'pt;}' + '}'; + body.appendChild(this.pageStyleSheet); + }, + destroy: function destroy() { + if (activeService !== this) { + return; + } + this.printContainer.textContent = ''; + if (this.pageStyleSheet && this.pageStyleSheet.parentNode) { + this.pageStyleSheet.parentNode.removeChild(this.pageStyleSheet); + this.pageStyleSheet = null; + } + this.scratchCanvas.width = this.scratchCanvas.height = 0; + this.scratchCanvas = null; + activeService = null; + ensureOverlay().then(function () { + if (overlayManager.active !== 'printServiceOverlay') { + return; } - - var self = this; - window.addEventListener('popstate', function pdfHistoryPopstate(evt) { - if (!self.historyUnlocked) { - return; - } - if (evt.state) { - // Move back/forward in the history. - self._goTo(evt.state); - return; - } - - // If the state is not set, then the user tried to navigate to a - // different hash by manually editing the URL and pressing Enter, or by - // clicking on an in-page link (e.g. the "current view" link). - // Save the current view state to the browser history. - - // Note: In Firefox, history.null could also be null after an in-page - // navigation to the same URL, and without dispatching the popstate - // event: https://bugzilla.mozilla.org/show_bug.cgi?id=1183881 - - if (self.uid === 0) { - // Replace the previous state if it was not explicitly set. - var previousParams = (self.previousHash && self.currentBookmark && - self.previousHash !== self.currentBookmark) ? - {hash: self.currentBookmark, page: self.currentPage} : - {page: 1}; - replacePreviousHistoryState(previousParams, function() { - updateHistoryWithCurrentHash(); - }); - } else { - updateHistoryWithCurrentHash(); - } - }, false); - - - function updateHistoryWithCurrentHash() { - self.previousHash = window.location.hash.slice(1); - self._pushToHistory({hash: self.previousHash}, false, true); - self._updatePreviousBookmark(); + overlayManager.close('printServiceOverlay'); + }); + }, + renderPages: function renderPages() { + var _this = this; + + var pageCount = this.pagesOverview.length; + var renderNextPage = function renderNextPage(resolve, reject) { + _this.throwIfInactive(); + if (++_this.currentPage >= pageCount) { + renderProgress(pageCount, pageCount, _this.l10n); + resolve(); + return; } + var index = _this.currentPage; + renderProgress(index, pageCount, _this.l10n); + renderPage(_this, _this.pdfDocument, index + 1, _this.pagesOverview[index]).then(_this.useRenderedPage.bind(_this)).then(function () { + renderNextPage(resolve, reject); + }, reject); + }; + return new Promise(renderNextPage); + }, + useRenderedPage: function useRenderedPage(printItem) { + this.throwIfInactive(); + var img = document.createElement('img'); + img.style.width = printItem.width; + img.style.height = printItem.height; + var scratchCanvas = this.scratchCanvas; + if ('toBlob' in scratchCanvas && !_pdfjsLib.PDFJS.disableCreateObjectURL) { + scratchCanvas.toBlob(function (blob) { + img.src = URL.createObjectURL(blob); + }); + } else { + img.src = scratchCanvas.toDataURL(); + } + var wrapper = document.createElement('div'); + wrapper.appendChild(img); + this.printContainer.appendChild(wrapper); + return new Promise(function (resolve, reject) { + img.onload = resolve; + img.onerror = reject; + }); + }, + performPrint: function performPrint() { + var _this2 = this; - function replacePreviousHistoryState(params, callback) { - // To modify the previous history entry, the following happens: - // 1. history.back() - // 2. _pushToHistory, which calls history.replaceState( ... ) - // 3. history.forward() - // Because a navigation via the history API does not immediately update - // the history state, the popstate event is used for synchronization. - self.historyUnlocked = false; - - // Suppress the hashchange event to avoid side effects caused by - // navigating back and forward. - self.allowHashChange = false; - window.addEventListener('popstate', rewriteHistoryAfterBack); - history.back(); - - function rewriteHistoryAfterBack() { - window.removeEventListener('popstate', rewriteHistoryAfterBack); - window.addEventListener('popstate', rewriteHistoryAfterForward); - self._pushToHistory(params, false, true); - history.forward(); - } - function rewriteHistoryAfterForward() { - window.removeEventListener('popstate', rewriteHistoryAfterForward); - self.allowHashChange = true; - self.historyUnlocked = true; - callback(); + this.throwIfInactive(); + return new Promise(function (resolve) { + setTimeout(function () { + if (!_this2.active) { + resolve(); + return; } - } + print.call(window); + setTimeout(resolve, 20); + }, 0); + }); + }, - function pdfHistoryBeforeUnload() { - var previousParams = self._getPreviousParams(null, true); - if (previousParams) { - var replacePrevious = (!self.current.dest && - self.current.hash !== self.previousHash); - self._pushToHistory(previousParams, false, replacePrevious); - self._updatePreviousBookmark(); + get active() { + return this === activeService; + }, + throwIfInactive: function throwIfInactive() { + if (!this.active) { + throw new Error('This print request was cancelled or completed.'); + } + } +}; +var print = window.print; +window.print = function print() { + if (activeService) { + console.warn('Ignored window.print() because of a pending print job.'); + return; + } + ensureOverlay().then(function () { + if (activeService) { + overlayManager.open('printServiceOverlay'); + } + }); + try { + dispatchEvent('beforeprint'); + } finally { + if (!activeService) { + console.error('Expected print service to be initialized.'); + ensureOverlay().then(function () { + if (overlayManager.active === 'printServiceOverlay') { + overlayManager.close('printServiceOverlay'); } - // Remove the event listener when navigating away from the document, - // since 'beforeunload' prevents Firefox from caching the document. - window.removeEventListener('beforeunload', pdfHistoryBeforeUnload, - false); - } - - window.addEventListener('beforeunload', pdfHistoryBeforeUnload, false); - - window.addEventListener('pageshow', function pdfHistoryPageShow(evt) { - // If the entire viewer (including the PDF file) is cached in - // the browser, we need to reattach the 'beforeunload' event listener - // since the 'DOMContentLoaded' event is not fired on 'pageshow'. - window.addEventListener('beforeunload', pdfHistoryBeforeUnload, false); - }, false); - - window.addEventListener('presentationmodechanged', function(e) { - self.isViewerInPresentationMode = !!e.detail.active; }); - }, - - clearHistoryState: function pdfHistory_clearHistoryState() { - this._pushOrReplaceState(null, true); - }, - - _isStateObjectDefined: function pdfHistory_isStateObjectDefined(state) { - return (state && state.uid >= 0 && - state.fingerprint && this.fingerprint === state.fingerprint && - state.target && state.target.hash) ? true : false; - }, - - _pushOrReplaceState: function pdfHistory_pushOrReplaceState(stateObj, - replace) { - if (replace) { - window.history.replaceState(stateObj, '', document.URL); - } else { - window.history.pushState(stateObj, '', document.URL); - } - }, - - get isHashChangeUnlocked() { - if (!this.initialized) { - return true; + return; + } + var activeServiceOnEntry = activeService; + activeService.renderPages().then(function () { + return activeServiceOnEntry.performPrint(); + }).catch(function () {}).then(function () { + if (activeServiceOnEntry.active) { + abort(); } - return this.allowHashChange; - }, + }); + } +}; +function dispatchEvent(eventType) { + var event = document.createEvent('CustomEvent'); + event.initCustomEvent(eventType, false, false, 'custom'); + window.dispatchEvent(event); +} +function abort() { + if (activeService) { + activeService.destroy(); + dispatchEvent('afterprint'); + } +} +function renderProgress(index, total, l10n) { + var progressContainer = document.getElementById('printServiceOverlay'); + var progress = Math.round(100 * index / total); + var progressBar = progressContainer.querySelector('progress'); + var progressPerc = progressContainer.querySelector('.relative-progress'); + progressBar.value = progress; + l10n.get('print_progress_percent', { progress: progress }, progress + '%').then(function (msg) { + progressPerc.textContent = msg; + }); +} +var hasAttachEvent = !!document.attachEvent; +window.addEventListener('keydown', function (event) { + if (event.keyCode === 80 && (event.ctrlKey || event.metaKey) && !event.altKey && (!event.shiftKey || window.chrome || window.opera)) { + window.print(); + if (hasAttachEvent) { + return; + } + event.preventDefault(); + if (event.stopImmediatePropagation) { + event.stopImmediatePropagation(); + } else { + event.stopPropagation(); + } + return; + } +}, true); +if (hasAttachEvent) { + document.attachEvent('onkeydown', function (event) { + event = event || window.event; + if (event.keyCode === 80 && event.ctrlKey) { + event.keyCode = 0; + return false; + } + }); +} +if ('onbeforeprint' in window) { + var stopPropagationIfNeeded = function stopPropagationIfNeeded(event) { + if (event.detail !== 'custom' && event.stopImmediatePropagation) { + event.stopImmediatePropagation(); + } + }; + window.addEventListener('beforeprint', stopPropagationIfNeeded); + window.addEventListener('afterprint', stopPropagationIfNeeded); +} +var overlayPromise; +function ensureOverlay() { + if (!overlayPromise) { + overlayManager = _app.PDFViewerApplication.overlayManager; + if (!overlayManager) { + throw new Error('The overlay manager has not yet been initialized.'); + } + overlayPromise = overlayManager.register('printServiceOverlay', document.getElementById('printServiceOverlay'), abort, true); + document.getElementById('printCancel').onclick = abort; + } + return overlayPromise; +} +_app.PDFPrintServiceFactory.instance = { + supportsPrinting: true, + createPrintService: function createPrintService(pdfDocument, pagesOverview, printContainer, l10n) { + if (activeService) { + throw new Error('The print service is created and active.'); + } + activeService = new PDFPrintService(pdfDocument, pagesOverview, printContainer, l10n); + return activeService; + } +}; +exports.PDFPrintService = PDFPrintService; - _updatePreviousBookmark: function pdfHistory_updatePreviousBookmark() { - if (this.updatePreviousBookmark && - this.currentBookmark && this.currentPage) { - this.previousBookmark = this.currentBookmark; - this.previousPage = this.currentPage; - this.updatePreviousBookmark = false; - } - }, +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { - updateCurrentBookmark: function pdfHistoryUpdateCurrentBookmark(bookmark, - pageNum) { - if (this.initialized) { - this.currentBookmark = bookmark.substring(1); - this.currentPage = pageNum | 0; - this._updatePreviousBookmark(); - } - }, +"use strict"; - updateNextHashParam: function pdfHistoryUpdateNextHashParam(param) { - if (this.initialized) { - this.nextHashParam = param; - } - }, - push: function pdfHistoryPush(params, isInitialBookmark) { - if (!(this.initialized && this.historyUnlocked)) { - return; - } - if (params.dest && !params.hash) { - params.hash = (this.current.hash && this.current.dest && - this.current.dest === params.dest) ? - this.current.hash : - this.linkService.getDestinationHash(params.dest).split('#')[1]; - } - if (params.page) { - params.page |= 0; - } - if (isInitialBookmark) { - var target = window.history.state.target; - if (!target) { - // Invoked when the user specifies an initial bookmark, - // thus setting initialBookmark, when the document is loaded. - this._pushToHistory(params, false); - this.previousHash = window.location.hash.substring(1); - } - this.updatePreviousBookmark = this.nextHashParam ? false : true; - if (target) { - // If the current document is reloaded, - // avoid creating duplicate entries in the history. - this._updatePreviousBookmark(); - } - return; +document.webL10n = function (window, document, undefined) { + var gL10nData = {}; + var gTextData = ''; + var gTextProp = 'textContent'; + var gLanguage = ''; + var gMacros = {}; + var gReadyState = 'loading'; + var gAsyncResourceLoading = true; + function getL10nResourceLinks() { + return document.querySelectorAll('link[type="application/l10n"]'); + } + function getL10nDictionary() { + var script = document.querySelector('script[type="application/l10n"]'); + return script ? JSON.parse(script.innerHTML) : null; + } + function getTranslatableChildren(element) { + return element ? element.querySelectorAll('*[data-l10n-id]') : []; + } + function getL10nAttributes(element) { + if (!element) return {}; + var l10nId = element.getAttribute('data-l10n-id'); + var l10nArgs = element.getAttribute('data-l10n-args'); + var args = {}; + if (l10nArgs) { + try { + args = JSON.parse(l10nArgs); + } catch (e) { + console.warn('could not parse arguments for #' + l10nId); } - if (this.nextHashParam) { - if (this.nextHashParam === params.hash) { - this.nextHashParam = null; - this.updatePreviousBookmark = true; - return; + } + return { + id: l10nId, + args: args + }; + } + function fireL10nReadyEvent(lang) { + var evtObject = document.createEvent('Event'); + evtObject.initEvent('localized', true, false); + evtObject.language = lang; + document.dispatchEvent(evtObject); + } + function xhrLoadText(url, onSuccess, onFailure) { + onSuccess = onSuccess || function _onSuccess(data) {}; + onFailure = onFailure || function _onFailure() {}; + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, gAsyncResourceLoading); + if (xhr.overrideMimeType) { + xhr.overrideMimeType('text/plain; charset=utf-8'); + } + xhr.onreadystatechange = function () { + if (xhr.readyState == 4) { + if (xhr.status == 200 || xhr.status === 0) { + onSuccess(xhr.responseText); } else { - this.nextHashParam = null; + onFailure(); } } - - if (params.hash) { - if (this.current.hash) { - if (this.current.hash !== params.hash) { - this._pushToHistory(params, true); - } else { - if (!this.current.page && params.page) { - this._pushToHistory(params, false, true); + }; + xhr.onerror = onFailure; + xhr.ontimeout = onFailure; + try { + xhr.send(null); + } catch (e) { + onFailure(); + } + } + function parseResource(href, lang, successCallback, failureCallback) { + var baseURL = href.replace(/[^\/]*$/, '') || './'; + function evalString(text) { + if (text.lastIndexOf('\\') < 0) return text; + return text.replace(/\\\\/g, '\\').replace(/\\n/g, '\n').replace(/\\r/g, '\r').replace(/\\t/g, '\t').replace(/\\b/g, '\b').replace(/\\f/g, '\f').replace(/\\{/g, '{').replace(/\\}/g, '}').replace(/\\"/g, '"').replace(/\\'/g, "'"); + } + function parseProperties(text, parsedPropertiesCallback) { + var dictionary = {}; + var reBlank = /^\s*|\s*$/; + var reComment = /^\s*#|^\s*$/; + var reSection = /^\s*\[(.*)\]\s*$/; + var reImport = /^\s*@import\s+url\((.*)\)\s*$/i; + var reSplit = /^([^=\s]*)\s*=\s*(.+)$/; + function parseRawLines(rawText, extendedSyntax, parsedRawLinesCallback) { + var entries = rawText.replace(reBlank, '').split(/[\r\n]+/); + var currentLang = '*'; + var genericLang = lang.split('-', 1)[0]; + var skipLang = false; + var match = ''; + function nextEntry() { + while (true) { + if (!entries.length) { + parsedRawLinesCallback(); + return; + } + var line = entries.shift(); + if (reComment.test(line)) continue; + if (extendedSyntax) { + match = reSection.exec(line); + if (match) { + currentLang = match[1].toLowerCase(); + skipLang = currentLang !== '*' && currentLang !== lang && currentLang !== genericLang; + continue; + } else if (skipLang) { + continue; + } + match = reImport.exec(line); + if (match) { + loadImport(baseURL + match[1], nextEntry); + return; + } + } + var tmp = line.match(reSplit); + if (tmp && tmp.length == 3) { + dictionary[tmp[1]] = evalString(tmp[2]); } - this.updatePreviousBookmark = true; } - } else { - this._pushToHistory(params, true); } - } else if (this.current.page && params.page && - this.current.page !== params.page) { - this._pushToHistory(params, true); + nextEntry(); } - }, - - _getPreviousParams: function pdfHistory_getPreviousParams(onlyCheckPage, - beforeUnload) { - if (!(this.currentBookmark && this.currentPage)) { - return null; - } else if (this.updatePreviousBookmark) { - this.updatePreviousBookmark = false; - } - if (this.uid > 0 && !(this.previousBookmark && this.previousPage)) { - // Prevent the history from getting stuck in the current state, - // effectively preventing the user from going back/forward in - // the history. - // - // This happens if the current position in the document didn't change - // when the history was previously updated. The reasons for this are - // either: - // 1. The current zoom value is such that the document does not need to, - // or cannot, be scrolled to display the destination. - // 2. The previous destination is broken, and doesn't actally point to a - // position within the document. - // (This is either due to a bad PDF generator, or the user making a - // mistake when entering a destination in the hash parameters.) - return null; + function loadImport(url, callback) { + xhrLoadText(url, function (content) { + parseRawLines(content, false, callback); + }, function () { + console.warn(url + ' not found.'); + callback(); + }); } - if ((!this.current.dest && !onlyCheckPage) || beforeUnload) { - if (this.previousBookmark === this.currentBookmark) { - return null; + parseRawLines(text, true, function () { + parsedPropertiesCallback(dictionary); + }); + } + xhrLoadText(href, function (response) { + gTextData += response; + parseProperties(response, function (data) { + for (var key in data) { + var id, + prop, + index = key.lastIndexOf('.'); + if (index > 0) { + id = key.substring(0, index); + prop = key.substr(index + 1); + } else { + id = key; + prop = gTextProp; + } + if (!gL10nData[id]) { + gL10nData[id] = {}; + } + gL10nData[id][prop] = data[key]; + } + if (successCallback) { + successCallback(); } - } else if (this.current.page || onlyCheckPage) { - if (this.previousPage === this.currentPage) { - return null; + }); + }, failureCallback); + } + function loadLocale(lang, callback) { + if (lang) { + lang = lang.toLowerCase(); + } + callback = callback || function _callback() {}; + clear(); + gLanguage = lang; + var langLinks = getL10nResourceLinks(); + var langCount = langLinks.length; + if (langCount === 0) { + var dict = getL10nDictionary(); + if (dict && dict.locales && dict.default_locale) { + console.log('using the embedded JSON directory, early way out'); + gL10nData = dict.locales[lang]; + if (!gL10nData) { + var defaultLocale = dict.default_locale.toLowerCase(); + for (var anyCaseLang in dict.locales) { + anyCaseLang = anyCaseLang.toLowerCase(); + if (anyCaseLang === lang) { + gL10nData = dict.locales[lang]; + break; + } else if (anyCaseLang === defaultLocale) { + gL10nData = dict.locales[defaultLocale]; + } + } } + callback(); } else { - return null; + console.log('no resource to load, early way out'); } - var params = {hash: this.currentBookmark, page: this.currentPage}; - if (this.isViewerInPresentationMode) { - params.hash = null; + fireL10nReadyEvent(lang); + gReadyState = 'complete'; + return; + } + var onResourceLoaded = null; + var gResourceCount = 0; + onResourceLoaded = function onResourceLoaded() { + gResourceCount++; + if (gResourceCount >= langCount) { + callback(); + fireL10nReadyEvent(lang); + gReadyState = 'complete'; } - return params; - }, - - _stateObj: function pdfHistory_stateObj(params) { - return {fingerprint: this.fingerprint, uid: this.uid, target: params}; - }, - - _pushToHistory: function pdfHistory_pushToHistory(params, - addPrevious, overwrite) { - if (!this.initialized) { - return; + }; + function L10nResourceLink(link) { + var href = link.href; + this.load = function (lang, callback) { + parseResource(href, lang, callback, function () { + console.warn(href + ' not found.'); + console.warn('"' + lang + '" resource not found'); + gLanguage = ''; + callback(); + }); + }; + } + for (var i = 0; i < langCount; i++) { + var resource = new L10nResourceLink(langLinks[i]); + resource.load(lang, onResourceLoaded); + } + } + function clear() { + gL10nData = {}; + gTextData = ''; + gLanguage = ''; + } + function getPluralRules(lang) { + var locales2rules = { + 'af': 3, + 'ak': 4, + 'am': 4, + 'ar': 1, + 'asa': 3, + 'az': 0, + 'be': 11, + 'bem': 3, + 'bez': 3, + 'bg': 3, + 'bh': 4, + 'bm': 0, + 'bn': 3, + 'bo': 0, + 'br': 20, + 'brx': 3, + 'bs': 11, + 'ca': 3, + 'cgg': 3, + 'chr': 3, + 'cs': 12, + 'cy': 17, + 'da': 3, + 'de': 3, + 'dv': 3, + 'dz': 0, + 'ee': 3, + 'el': 3, + 'en': 3, + 'eo': 3, + 'es': 3, + 'et': 3, + 'eu': 3, + 'fa': 0, + 'ff': 5, + 'fi': 3, + 'fil': 4, + 'fo': 3, + 'fr': 5, + 'fur': 3, + 'fy': 3, + 'ga': 8, + 'gd': 24, + 'gl': 3, + 'gsw': 3, + 'gu': 3, + 'guw': 4, + 'gv': 23, + 'ha': 3, + 'haw': 3, + 'he': 2, + 'hi': 4, + 'hr': 11, + 'hu': 0, + 'id': 0, + 'ig': 0, + 'ii': 0, + 'is': 3, + 'it': 3, + 'iu': 7, + 'ja': 0, + 'jmc': 3, + 'jv': 0, + 'ka': 0, + 'kab': 5, + 'kaj': 3, + 'kcg': 3, + 'kde': 0, + 'kea': 0, + 'kk': 3, + 'kl': 3, + 'km': 0, + 'kn': 0, + 'ko': 0, + 'ksb': 3, + 'ksh': 21, + 'ku': 3, + 'kw': 7, + 'lag': 18, + 'lb': 3, + 'lg': 3, + 'ln': 4, + 'lo': 0, + 'lt': 10, + 'lv': 6, + 'mas': 3, + 'mg': 4, + 'mk': 16, + 'ml': 3, + 'mn': 3, + 'mo': 9, + 'mr': 3, + 'ms': 0, + 'mt': 15, + 'my': 0, + 'nah': 3, + 'naq': 7, + 'nb': 3, + 'nd': 3, + 'ne': 3, + 'nl': 3, + 'nn': 3, + 'no': 3, + 'nr': 3, + 'nso': 4, + 'ny': 3, + 'nyn': 3, + 'om': 3, + 'or': 3, + 'pa': 3, + 'pap': 3, + 'pl': 13, + 'ps': 3, + 'pt': 3, + 'rm': 3, + 'ro': 9, + 'rof': 3, + 'ru': 11, + 'rwk': 3, + 'sah': 0, + 'saq': 3, + 'se': 7, + 'seh': 3, + 'ses': 0, + 'sg': 0, + 'sh': 11, + 'shi': 19, + 'sk': 12, + 'sl': 14, + 'sma': 7, + 'smi': 7, + 'smj': 7, + 'smn': 7, + 'sms': 7, + 'sn': 3, + 'so': 3, + 'sq': 3, + 'sr': 11, + 'ss': 3, + 'ssy': 3, + 'st': 3, + 'sv': 3, + 'sw': 3, + 'syr': 3, + 'ta': 3, + 'te': 3, + 'teo': 3, + 'th': 0, + 'ti': 4, + 'tig': 3, + 'tk': 3, + 'tl': 4, + 'tn': 3, + 'to': 0, + 'tr': 0, + 'ts': 3, + 'tzm': 22, + 'uk': 11, + 'ur': 3, + 've': 3, + 'vi': 0, + 'vun': 3, + 'wa': 4, + 'wae': 3, + 'wo': 0, + 'xh': 3, + 'xog': 3, + 'yo': 0, + 'zh': 0, + 'zu': 3 + }; + function isIn(n, list) { + return list.indexOf(n) !== -1; + } + function isBetween(n, start, end) { + return start <= n && n <= end; + } + var pluralRules = { + '0': function _(n) { + return 'other'; + }, + '1': function _(n) { + if (isBetween(n % 100, 3, 10)) return 'few'; + if (n === 0) return 'zero'; + if (isBetween(n % 100, 11, 99)) return 'many'; + if (n == 2) return 'two'; + if (n == 1) return 'one'; + return 'other'; + }, + '2': function _(n) { + if (n !== 0 && n % 10 === 0) return 'many'; + if (n == 2) return 'two'; + if (n == 1) return 'one'; + return 'other'; + }, + '3': function _(n) { + if (n == 1) return 'one'; + return 'other'; + }, + '4': function _(n) { + if (isBetween(n, 0, 1)) return 'one'; + return 'other'; + }, + '5': function _(n) { + if (isBetween(n, 0, 2) && n != 2) return 'one'; + return 'other'; + }, + '6': function _(n) { + if (n === 0) return 'zero'; + if (n % 10 == 1 && n % 100 != 11) return 'one'; + return 'other'; + }, + '7': function _(n) { + if (n == 2) return 'two'; + if (n == 1) return 'one'; + return 'other'; + }, + '8': function _(n) { + if (isBetween(n, 3, 6)) return 'few'; + if (isBetween(n, 7, 10)) return 'many'; + if (n == 2) return 'two'; + if (n == 1) return 'one'; + return 'other'; + }, + '9': function _(n) { + if (n === 0 || n != 1 && isBetween(n % 100, 1, 19)) return 'few'; + if (n == 1) return 'one'; + return 'other'; + }, + '10': function _(n) { + if (isBetween(n % 10, 2, 9) && !isBetween(n % 100, 11, 19)) return 'few'; + if (n % 10 == 1 && !isBetween(n % 100, 11, 19)) return 'one'; + return 'other'; + }, + '11': function _(n) { + if (isBetween(n % 10, 2, 4) && !isBetween(n % 100, 12, 14)) return 'few'; + if (n % 10 === 0 || isBetween(n % 10, 5, 9) || isBetween(n % 100, 11, 14)) return 'many'; + if (n % 10 == 1 && n % 100 != 11) return 'one'; + return 'other'; + }, + '12': function _(n) { + if (isBetween(n, 2, 4)) return 'few'; + if (n == 1) return 'one'; + return 'other'; + }, + '13': function _(n) { + if (isBetween(n % 10, 2, 4) && !isBetween(n % 100, 12, 14)) return 'few'; + if (n != 1 && isBetween(n % 10, 0, 1) || isBetween(n % 10, 5, 9) || isBetween(n % 100, 12, 14)) return 'many'; + if (n == 1) return 'one'; + return 'other'; + }, + '14': function _(n) { + if (isBetween(n % 100, 3, 4)) return 'few'; + if (n % 100 == 2) return 'two'; + if (n % 100 == 1) return 'one'; + return 'other'; + }, + '15': function _(n) { + if (n === 0 || isBetween(n % 100, 2, 10)) return 'few'; + if (isBetween(n % 100, 11, 19)) return 'many'; + if (n == 1) return 'one'; + return 'other'; + }, + '16': function _(n) { + if (n % 10 == 1 && n != 11) return 'one'; + return 'other'; + }, + '17': function _(n) { + if (n == 3) return 'few'; + if (n === 0) return 'zero'; + if (n == 6) return 'many'; + if (n == 2) return 'two'; + if (n == 1) return 'one'; + return 'other'; + }, + '18': function _(n) { + if (n === 0) return 'zero'; + if (isBetween(n, 0, 2) && n !== 0 && n != 2) return 'one'; + return 'other'; + }, + '19': function _(n) { + if (isBetween(n, 2, 10)) return 'few'; + if (isBetween(n, 0, 1)) return 'one'; + return 'other'; + }, + '20': function _(n) { + if ((isBetween(n % 10, 3, 4) || n % 10 == 9) && !(isBetween(n % 100, 10, 19) || isBetween(n % 100, 70, 79) || isBetween(n % 100, 90, 99))) return 'few'; + if (n % 1000000 === 0 && n !== 0) return 'many'; + if (n % 10 == 2 && !isIn(n % 100, [12, 72, 92])) return 'two'; + if (n % 10 == 1 && !isIn(n % 100, [11, 71, 91])) return 'one'; + return 'other'; + }, + '21': function _(n) { + if (n === 0) return 'zero'; + if (n == 1) return 'one'; + return 'other'; + }, + '22': function _(n) { + if (isBetween(n, 0, 1) || isBetween(n, 11, 99)) return 'one'; + return 'other'; + }, + '23': function _(n) { + if (isBetween(n % 10, 1, 2) || n % 20 === 0) return 'one'; + return 'other'; + }, + '24': function _(n) { + if (isBetween(n, 3, 10) || isBetween(n, 13, 19)) return 'few'; + if (isIn(n, [2, 12])) return 'two'; + if (isIn(n, [1, 11])) return 'one'; + return 'other'; } - if (!params.hash && params.page) { - params.hash = ('page=' + params.page); + }; + var index = locales2rules[lang.replace(/-.*$/, '')]; + if (!(index in pluralRules)) { + console.warn('plural form unknown for [' + lang + ']'); + return function () { + return 'other'; + }; + } + return pluralRules[index]; + } + gMacros.plural = function (str, param, key, prop) { + var n = parseFloat(param); + if (isNaN(n)) return str; + if (prop != gTextProp) return str; + if (!gMacros._pluralRules) { + gMacros._pluralRules = getPluralRules(gLanguage); + } + var index = '[' + gMacros._pluralRules(n) + ']'; + if (n === 0 && key + '[zero]' in gL10nData) { + str = gL10nData[key + '[zero]'][prop]; + } else if (n == 1 && key + '[one]' in gL10nData) { + str = gL10nData[key + '[one]'][prop]; + } else if (n == 2 && key + '[two]' in gL10nData) { + str = gL10nData[key + '[two]'][prop]; + } else if (key + index in gL10nData) { + str = gL10nData[key + index][prop]; + } else if (key + '[other]' in gL10nData) { + str = gL10nData[key + '[other]'][prop]; + } + return str; + }; + function getL10nData(key, args, fallback) { + var data = gL10nData[key]; + if (!data) { + console.warn('#' + key + ' is undefined.'); + if (!fallback) { + return null; } - if (addPrevious && !overwrite) { - var previousParams = this._getPreviousParams(); - if (previousParams) { - var replacePrevious = (!this.current.dest && - this.current.hash !== this.previousHash); - this._pushToHistory(previousParams, false, replacePrevious); - } + data = fallback; + } + var rv = {}; + for (var prop in data) { + var str = data[prop]; + str = substIndexes(str, args, key, prop); + str = substArguments(str, args, key); + rv[prop] = str; + } + return rv; + } + function substIndexes(str, args, key, prop) { + var reIndex = /\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/; + var reMatch = reIndex.exec(str); + if (!reMatch || !reMatch.length) return str; + var macroName = reMatch[1]; + var paramName = reMatch[2]; + var param; + if (args && paramName in args) { + param = args[paramName]; + } else if (paramName in gL10nData) { + param = gL10nData[paramName]; + } + if (macroName in gMacros) { + var macro = gMacros[macroName]; + str = macro(str, param, key, prop); + } + return str; + } + function substArguments(str, args, key) { + var reArgs = /\{\{\s*(.+?)\s*\}\}/g; + return str.replace(reArgs, function (matched_text, arg) { + if (args && arg in args) { + return args[arg]; } - this._pushOrReplaceState(this._stateObj(params), - (overwrite || this.uid === 0)); - this.currentUid = this.uid++; - this.current = params; - this.updatePreviousBookmark = true; - }, - - _goTo: function pdfHistory_goTo(state) { - if (!(this.initialized && this.historyUnlocked && - this._isStateObjectDefined(state))) { - return; + if (arg in gL10nData) { + return gL10nData[arg]; } - if (!this.reInitialized && state.uid < this.currentUid) { - var previousParams = this._getPreviousParams(true); - if (previousParams) { - this._pushToHistory(this.current, false); - this._pushToHistory(previousParams, false); - this.currentUid = state.uid; - window.history.back(); - return; + console.log('argument {{' + arg + '}} for #' + key + ' is undefined.'); + return matched_text; + }); + } + function translateElement(element) { + var l10n = getL10nAttributes(element); + if (!l10n.id) return; + var data = getL10nData(l10n.id, l10n.args); + if (!data) { + console.warn('#' + l10n.id + ' is undefined.'); + return; + } + if (data[gTextProp]) { + if (getChildElementCount(element) === 0) { + element[gTextProp] = data[gTextProp]; + } else { + var children = element.childNodes; + var found = false; + for (var i = 0, l = children.length; i < l; i++) { + if (children[i].nodeType === 3 && /\S/.test(children[i].nodeValue)) { + if (found) { + children[i].nodeValue = ''; + } else { + children[i].nodeValue = data[gTextProp]; + found = true; + } + } + } + if (!found) { + var textNode = document.createTextNode(data[gTextProp]); + element.insertBefore(textNode, element.firstChild); } } - this.historyUnlocked = false; - - if (state.target.dest) { - this.linkService.navigateTo(state.target.dest); - } else { - this.linkService.setHash(state.target.hash); + delete data[gTextProp]; + } + for (var k in data) { + element[k] = data[k]; + } + } + function getChildElementCount(element) { + if (element.children) { + return element.children.length; + } + if (typeof element.childElementCount !== 'undefined') { + return element.childElementCount; + } + var count = 0; + for (var i = 0; i < element.childNodes.length; i++) { + count += element.nodeType === 1 ? 1 : 0; + } + return count; + } + function translateFragment(element) { + element = element || document.documentElement; + var children = getTranslatableChildren(element); + var elementCount = children.length; + for (var i = 0; i < elementCount; i++) { + translateElement(children[i]); + } + translateElement(element); + } + return { + get: function get(key, args, fallbackString) { + var index = key.lastIndexOf('.'); + var prop = gTextProp; + if (index > 0) { + prop = key.substr(index + 1); + key = key.substring(0, index); } - this.currentUid = state.uid; - if (state.uid > this.uid) { - this.uid = state.uid; + var fallback; + if (fallbackString) { + fallback = {}; + fallback[prop] = fallbackString; } - this.current = state.target; - this.updatePreviousBookmark = true; - - var currentHash = window.location.hash.substring(1); - if (this.previousHash !== currentHash) { - this.allowHashChange = false; + var data = getL10nData(key, args, fallback); + if (data && prop in data) { + return data[prop]; } - this.previousHash = currentHash; - - this.historyUnlocked = true; + return '{{' + key + '}}'; }, - - back: function pdfHistoryBack() { - this.go(-1); + getData: function getData() { + return gL10nData; }, - - forward: function pdfHistoryForward() { - this.go(1); + getText: function getText() { + return gTextData; }, - - go: function pdfHistoryGo(direction) { - if (this.initialized && this.historyUnlocked) { - var state = window.history.state; - if (direction === -1 && state && state.uid > 0) { - window.history.back(); - } else if (direction === 1 && state && state.uid < (this.uid - 1)) { - window.history.forward(); - } + getLanguage: function getLanguage() { + return gLanguage; + }, + setLanguage: function setLanguage(lang, callback) { + loadLocale(lang, function () { + if (callback) callback(); + }); + }, + getDirection: function getDirection() { + var rtlList = ['ar', 'he', 'fa', 'ps', 'ur']; + var shortCode = gLanguage.split('-', 1)[0]; + return rtlList.indexOf(shortCode) >= 0 ? 'rtl' : 'ltr'; + }, + translate: translateFragment, + getReadyState: function getReadyState() { + return gReadyState; + }, + ready: function ready(callback) { + if (!callback) { + return; + } else if (gReadyState == 'complete' || gReadyState == 'interactive') { + window.setTimeout(function () { + callback(); + }); + } else if (document.addEventListener) { + document.addEventListener('localized', function once() { + document.removeEventListener('localized', once); + callback(); + }); } } }; +}(window, document); - return PDFHistory; -})(); +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; -var SecondaryToolbar = { - opened: false, - previousContainerHeight: null, - newContainerHeight: null, - - initialize: function secondaryToolbarInitialize(options) { - this.toolbar = options.toolbar; - this.buttonContainer = this.toolbar.firstElementChild; - // Define the toolbar buttons. - this.toggleButton = options.toggleButton; - this.presentationModeButton = options.presentationModeButton; - this.openFile = options.openFile; - this.print = options.print; - this.download = options.download; - this.viewBookmark = options.viewBookmark; - this.firstPage = options.firstPage; - this.lastPage = options.lastPage; - this.pageRotateCw = options.pageRotateCw; - this.pageRotateCcw = options.pageRotateCcw; - this.documentPropertiesButton = options.documentPropertiesButton; - - // Attach the event listeners. - var elements = [ - // Button to toggle the visibility of the secondary toolbar: - { element: this.toggleButton, handler: this.toggle }, - // All items within the secondary toolbar - // (except for toggleHandTool, hand_tool.js is responsible for it): - { element: this.presentationModeButton, - handler: this.presentationModeClick }, - { element: this.openFile, handler: this.openFileClick }, - { element: this.print, handler: this.printClick }, - { element: this.download, handler: this.downloadClick }, - { element: this.viewBookmark, handler: this.viewBookmarkClick }, - { element: this.firstPage, handler: this.firstPageClick }, - { element: this.lastPage, handler: this.lastPageClick }, - { element: this.pageRotateCw, handler: this.pageRotateCwClick }, - { element: this.pageRotateCcw, handler: this.pageRotateCcwClick }, - { element: this.documentPropertiesButton, - handler: this.documentPropertiesClick } - ]; - - for (var item in elements) { - var element = elements[item].element; - if (element) { - element.addEventListener('click', elements[item].handler.bind(this)); - } - } - }, +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.DefaultAnnotationLayerFactory = exports.AnnotationLayerBuilder = undefined; - // Event handling functions. - presentationModeClick: function secondaryToolbarPresentationModeClick(evt) { - PDFViewerApplication.requestPresentationMode(); - this.close(); - }, +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - openFileClick: function secondaryToolbarOpenFileClick(evt) { - document.getElementById('fileInput').click(); - this.close(); - }, +var _pdfjsLib = __webpack_require__(1); - printClick: function secondaryToolbarPrintClick(evt) { - window.print(); - this.close(); - }, +var _ui_utils = __webpack_require__(0); - downloadClick: function secondaryToolbarDownloadClick(evt) { - PDFViewerApplication.download(); - this.close(); - }, +var _pdf_link_service = __webpack_require__(5); - viewBookmarkClick: function secondaryToolbarViewBookmarkClick(evt) { - this.close(); - }, +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - firstPageClick: function secondaryToolbarFirstPageClick(evt) { - PDFViewerApplication.page = 1; - this.close(); - }, +var AnnotationLayerBuilder = function () { + function AnnotationLayerBuilder(_ref) { + var pageDiv = _ref.pageDiv, + pdfPage = _ref.pdfPage, + linkService = _ref.linkService, + downloadManager = _ref.downloadManager, + _ref$renderInteractiv = _ref.renderInteractiveForms, + renderInteractiveForms = _ref$renderInteractiv === undefined ? false : _ref$renderInteractiv, + _ref$l10n = _ref.l10n, + l10n = _ref$l10n === undefined ? _ui_utils.NullL10n : _ref$l10n; - lastPageClick: function secondaryToolbarLastPageClick(evt) { - if (PDFViewerApplication.pdfDocument) { - PDFViewerApplication.page = PDFViewerApplication.pagesCount; - } - this.close(); - }, + _classCallCheck(this, AnnotationLayerBuilder); - pageRotateCwClick: function secondaryToolbarPageRotateCwClick(evt) { - PDFViewerApplication.rotatePages(90); - }, + this.pageDiv = pageDiv; + this.pdfPage = pdfPage; + this.linkService = linkService; + this.downloadManager = downloadManager; + this.renderInteractiveForms = renderInteractiveForms; + this.l10n = l10n; + this.div = null; + } - pageRotateCcwClick: function secondaryToolbarPageRotateCcwClick(evt) { - PDFViewerApplication.rotatePages(-90); - }, + _createClass(AnnotationLayerBuilder, [{ + key: 'render', + value: function render(viewport) { + var _this = this; - documentPropertiesClick: function secondaryToolbarDocumentPropsClick(evt) { - PDFViewerApplication.pdfDocumentProperties.open(); - this.close(); - }, + var intent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'display'; - // Misc. functions for interacting with the toolbar. - setMaxHeight: function secondaryToolbarSetMaxHeight(container) { - if (!container || !this.buttonContainer) { - return; + this.pdfPage.getAnnotations({ intent: intent }).then(function (annotations) { + var parameters = { + viewport: viewport.clone({ dontFlip: true }), + div: _this.div, + annotations: annotations, + page: _this.pdfPage, + renderInteractiveForms: _this.renderInteractiveForms, + linkService: _this.linkService, + downloadManager: _this.downloadManager + }; + if (_this.div) { + _pdfjsLib.AnnotationLayer.update(parameters); + } else { + if (annotations.length === 0) { + return; + } + _this.div = document.createElement('div'); + _this.div.className = 'annotationLayer'; + _this.pageDiv.appendChild(_this.div); + parameters.div = _this.div; + _pdfjsLib.AnnotationLayer.render(parameters); + _this.l10n.translate(_this.div); + } + }); } - this.newContainerHeight = container.clientHeight; - if (this.previousContainerHeight === this.newContainerHeight) { - return; + }, { + key: 'hide', + value: function hide() { + if (!this.div) { + return; + } + this.div.setAttribute('hidden', 'true'); } - this.buttonContainer.setAttribute('style', - 'max-height: ' + (this.newContainerHeight - SCROLLBAR_PADDING) + 'px;'); - this.previousContainerHeight = this.newContainerHeight; - }, + }]); - open: function secondaryToolbarOpen() { - if (this.opened) { - return; - } - this.opened = true; - this.toggleButton.classList.add('toggled'); - this.toolbar.classList.remove('hidden'); - }, + return AnnotationLayerBuilder; +}(); - close: function secondaryToolbarClose(target) { - if (!this.opened) { - return; - } else if (target && !this.toolbar.contains(target)) { - return; - } - this.opened = false; - this.toolbar.classList.add('hidden'); - this.toggleButton.classList.remove('toggled'); - }, +var DefaultAnnotationLayerFactory = function () { + function DefaultAnnotationLayerFactory() { + _classCallCheck(this, DefaultAnnotationLayerFactory); + } - toggle: function secondaryToolbarToggle() { - if (this.opened) { - this.close(); - } else { - this.open(); + _createClass(DefaultAnnotationLayerFactory, [{ + key: 'createAnnotationLayerBuilder', + value: function createAnnotationLayerBuilder(pageDiv, pdfPage) { + var renderInteractiveForms = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var l10n = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _ui_utils.NullL10n; + + return new AnnotationLayerBuilder({ + pageDiv: pageDiv, + pdfPage: pdfPage, + renderInteractiveForms: renderInteractiveForms, + linkService: new _pdf_link_service.SimpleLinkService(), + l10n: l10n + }); } - } -}; + }]); + return DefaultAnnotationLayerFactory; +}(); -var DELAY_BEFORE_RESETTING_SWITCH_IN_PROGRESS = 1500; // in ms -var DELAY_BEFORE_HIDING_CONTROLS = 3000; // in ms -var ACTIVE_SELECTOR = 'pdfPresentationMode'; -var CONTROLS_SELECTOR = 'pdfPresentationModeControls'; +exports.AnnotationLayerBuilder = AnnotationLayerBuilder; +exports.DefaultAnnotationLayerFactory = DefaultAnnotationLayerFactory; -/** - * @typedef {Object} PDFPresentationModeOptions - * @property {HTMLDivElement} container - The container for the viewer element. - * @property {HTMLDivElement} viewer - (optional) The viewer element. - * @property {PDFViewer} pdfViewer - The document viewer. - * @property {PDFThumbnailViewer} pdfThumbnailViewer - (optional) The thumbnail - * viewer. - * @property {Array} contextMenuItems - (optional) The menuitems that are added - * to the context menu in Presentation Mode. - */ +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * @class - */ -var PDFPresentationMode = (function PDFPresentationModeClosure() { - /** - * @constructs PDFPresentationMode - * @param {PDFPresentationModeOptions} options - */ - function PDFPresentationMode(options) { - this.container = options.container; - this.viewer = options.viewer || options.container.firstElementChild; - this.pdfViewer = options.pdfViewer; - this.pdfThumbnailViewer = options.pdfThumbnailViewer || null; - var contextMenuItems = options.contextMenuItems || null; +"use strict"; - this.active = false; - this.args = null; - this.contextMenuOpen = false; - this.mouseScrollTimeStamp = 0; - this.mouseScrollDelta = 0; - if (contextMenuItems) { - for (var i = 0, ii = contextMenuItems.length; i < ii; i++) { - var item = contextMenuItems[i]; - item.element.addEventListener('click', function (handler) { - this.contextMenuOpen = false; - handler(); - }.bind(this, item.handler)); - } - } - } +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.DownloadManager = undefined; - PDFPresentationMode.prototype = { - /** - * Request the browser to enter fullscreen mode. - * @returns {boolean} Indicating if the request was successful. - */ - request: function PDFPresentationMode_request() { - if (this.switchInProgress || this.active || - !this.viewer.hasChildNodes()) { - return false; - } - this._addFullscreenChangeListeners(); - this._setSwitchInProgress(); - this._notifyStateChange(); +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - if (this.container.requestFullscreen) { - this.container.requestFullscreen(); - } else if (this.container.mozRequestFullScreen) { - this.container.mozRequestFullScreen(); - } else if (this.container.webkitRequestFullscreen) { - this.container.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); - } else if (this.container.msRequestFullscreen) { - this.container.msRequestFullscreen(); - } else { - return false; - } +var _pdfjsLib = __webpack_require__(1); - this.args = { - page: this.pdfViewer.currentPageNumber, - previousScale: this.pdfViewer.currentScaleValue, - }; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - return true; - }, +; +function _download(blobUrl, filename) { + var a = document.createElement('a'); + if (a.click) { + a.href = blobUrl; + a.target = '_parent'; + if ('download' in a) { + a.download = filename; + } + (document.body || document.documentElement).appendChild(a); + a.click(); + a.parentNode.removeChild(a); + } else { + if (window.top === window && blobUrl.split('#')[0] === window.location.href.split('#')[0]) { + var padCharacter = blobUrl.indexOf('?') === -1 ? '?' : '&'; + blobUrl = blobUrl.replace(/#|$/, padCharacter + '$&'); + } + window.open(blobUrl, '_parent'); + } +} - /** - * Switches page when the user scrolls (using a scroll wheel or a touchpad) - * with large enough motion, to prevent accidental page switches. - * @param {number} delta - The delta value from the mouse event. - */ - mouseScroll: function PDFPresentationMode_mouseScroll(delta) { - if (!this.active) { +var DownloadManager = function () { + function DownloadManager() { + _classCallCheck(this, DownloadManager); + } + + _createClass(DownloadManager, [{ + key: 'downloadUrl', + value: function downloadUrl(url, filename) { + if (!(0, _pdfjsLib.createValidAbsoluteUrl)(url, 'http://example.com')) { return; } - var MOUSE_SCROLL_COOLDOWN_TIME = 50; - var PAGE_SWITCH_THRESHOLD = 120; - var PageSwitchDirection = { - UP: -1, - DOWN: 1 - }; - - var currentTime = (new Date()).getTime(); - var storedTime = this.mouseScrollTimeStamp; - - // If we've already switched page, avoid accidentally switching again. - if (currentTime > storedTime && - currentTime - storedTime < MOUSE_SCROLL_COOLDOWN_TIME) { + _download(url + '#pdfjs.action=download', filename); + } + }, { + key: 'downloadData', + value: function downloadData(data, filename, contentType) { + if (navigator.msSaveBlob) { + return navigator.msSaveBlob(new Blob([data], { type: contentType }), filename); + } + var blobUrl = (0, _pdfjsLib.createObjectURL)(data, contentType, _pdfjsLib.PDFJS.disableCreateObjectURL); + _download(blobUrl, filename); + } + }, { + key: 'download', + value: function download(blob, url, filename) { + if (navigator.msSaveBlob) { + if (!navigator.msSaveBlob(blob, filename)) { + this.downloadUrl(url, filename); + } return; } - // If the scroll direction changed, reset the accumulated scroll delta. - if ((this.mouseScrollDelta > 0 && delta < 0) || - (this.mouseScrollDelta < 0 && delta > 0)) { - this._resetMouseScrollState(); + if (_pdfjsLib.PDFJS.disableCreateObjectURL) { + this.downloadUrl(url, filename); + return; } - this.mouseScrollDelta += delta; + var blobUrl = URL.createObjectURL(blob); + _download(blobUrl, filename); + } + }]); - if (Math.abs(this.mouseScrollDelta) >= PAGE_SWITCH_THRESHOLD) { - var pageSwitchDirection = (this.mouseScrollDelta > 0) ? - PageSwitchDirection.UP : PageSwitchDirection.DOWN; - var page = this.pdfViewer.currentPageNumber; - this._resetMouseScrollState(); + return DownloadManager; +}(); - // If we're at the first/last page, we don't need to do anything. - if ((page === 1 && pageSwitchDirection === PageSwitchDirection.UP) || - (page === this.pdfViewer.pagesCount && - pageSwitchDirection === PageSwitchDirection.DOWN)) { - return; - } - this.pdfViewer.currentPageNumber = (page + pageSwitchDirection); - this.mouseScrollTimeStamp = currentTime; - } - }, +exports.DownloadManager = DownloadManager; - get isFullscreen() { - return !!(document.fullscreenElement || - document.mozFullScreen || - document.webkitIsFullScreen || - document.msFullscreenElement); - }, +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * @private - */ - _notifyStateChange: function PDFPresentationMode_notifyStateChange() { - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('presentationmodechanged', true, true, { - active: this.active, - switchInProgress: !!this.switchInProgress - }); - window.dispatchEvent(event); - }, +"use strict"; - /** - * Used to initialize a timeout when requesting Presentation Mode, - * i.e. when the browser is requested to enter fullscreen mode. - * This timeout is used to prevent the current page from being scrolled - * partially, or completely, out of view when entering Presentation Mode. - * NOTE: This issue seems limited to certain zoom levels (e.g. page-width). - * @private - */ - _setSwitchInProgress: function PDFPresentationMode_setSwitchInProgress() { - if (this.switchInProgress) { - clearTimeout(this.switchInProgress); - } - this.switchInProgress = setTimeout(function switchInProgressTimeout() { - this._removeFullscreenChangeListeners(); - delete this.switchInProgress; - this._notifyStateChange(); - }.bind(this), DELAY_BEFORE_RESETTING_SWITCH_IN_PROGRESS); - }, - /** - * @private - */ - _resetSwitchInProgress: - function PDFPresentationMode_resetSwitchInProgress() { - if (this.switchInProgress) { - clearTimeout(this.switchInProgress); - delete this.switchInProgress; - } - }, +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.GenericL10n = undefined; - /** - * @private - */ - _enter: function PDFPresentationMode_enter() { - this.active = true; - this._resetSwitchInProgress(); - this._notifyStateChange(); - this.container.classList.add(ACTIVE_SELECTOR); +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - // Ensure that the correct page is scrolled into view when entering - // Presentation Mode, by waiting until fullscreen mode in enabled. - setTimeout(function enterPresentationModeTimeout() { - this.pdfViewer.currentPageNumber = this.args.page; - this.pdfViewer.currentScaleValue = 'page-fit'; - }.bind(this), 0); +__webpack_require__(10); - this._addWindowListeners(); - this._showControls(); - this.contextMenuOpen = false; - this.container.setAttribute('contextmenu', 'viewerContextMenu'); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - // Text selection is disabled in Presentation Mode, thus it's not possible - // for the user to deselect text that is selected (e.g. with "Select all") - // when entering Presentation Mode, hence we remove any active selection. - window.getSelection().removeAllRanges(); - }, +var webL10n = document.webL10n; - /** - * @private - */ - _exit: function PDFPresentationMode_exit() { - var page = this.pdfViewer.currentPageNumber; - this.container.classList.remove(ACTIVE_SELECTOR); +var GenericL10n = function () { + function GenericL10n(lang) { + _classCallCheck(this, GenericL10n); - // Ensure that the correct page is scrolled into view when exiting - // Presentation Mode, by waiting until fullscreen mode is disabled. - setTimeout(function exitPresentationModeTimeout() { - this.active = false; - this._removeFullscreenChangeListeners(); - this._notifyStateChange(); + this._lang = lang; + this._ready = new Promise(function (resolve, reject) { + webL10n.setLanguage(lang, function () { + resolve(webL10n); + }); + }); + } - this.pdfViewer.currentScaleValue = this.args.previousScale; - this.pdfViewer.currentPageNumber = page; - this.args = null; - }.bind(this), 0); + _createClass(GenericL10n, [{ + key: 'getDirection', + value: function getDirection() { + return this._ready.then(function (l10n) { + return l10n.getDirection(); + }); + } + }, { + key: 'get', + value: function get(property, args, fallback) { + return this._ready.then(function (l10n) { + return l10n.get(property, args, fallback); + }); + } + }, { + key: 'translate', + value: function translate(element) { + return this._ready.then(function (l10n) { + return l10n.translate(element); + }); + } + }]); - this._removeWindowListeners(); - this._hideControls(); - this._resetMouseScrollState(); - this.container.removeAttribute('contextmenu'); - this.contextMenuOpen = false; + return GenericL10n; +}(); - if (this.pdfThumbnailViewer) { - this.pdfThumbnailViewer.ensureThumbnailVisible(page); - } - }, +exports.GenericL10n = GenericL10n; - /** - * @private - */ - _mouseDown: function PDFPresentationMode_mouseDown(evt) { - if (this.contextMenuOpen) { - this.contextMenuOpen = false; - evt.preventDefault(); - return; - } - if (evt.button === 0) { - // Enable clicking of links in presentation mode. Please note: - // Only links pointing to destinations in the current PDF document work. - var isInternalLink = (evt.target.href && - evt.target.classList.contains('internalLink')); - if (!isInternalLink) { - // Unless an internal link was clicked, advance one page. - evt.preventDefault(); - this.pdfViewer.currentPageNumber += (evt.shiftKey ? -1 : 1); - } - } - }, +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * @private - */ - _contextMenu: function PDFPresentationMode_contextMenu() { - this.contextMenuOpen = true; - }, +"use strict"; - /** - * @private - */ - _showControls: function PDFPresentationMode_showControls() { - if (this.controlsTimeout) { - clearTimeout(this.controlsTimeout); - } else { - this.container.classList.add(CONTROLS_SELECTOR); - } - this.controlsTimeout = setTimeout(function showControlsTimeout() { - this.container.classList.remove(CONTROLS_SELECTOR); - delete this.controlsTimeout; - }.bind(this), DELAY_BEFORE_HIDING_CONTROLS); - }, - /** - * @private - */ - _hideControls: function PDFPresentationMode_hideControls() { - if (!this.controlsTimeout) { +Object.defineProperty(exports, "__esModule", { + value: true +}); +function GrabToPan(options) { + this.element = options.element; + this.document = options.element.ownerDocument; + if (typeof options.ignoreTarget === 'function') { + this.ignoreTarget = options.ignoreTarget; + } + this.onActiveChanged = options.onActiveChanged; + this.activate = this.activate.bind(this); + this.deactivate = this.deactivate.bind(this); + this.toggle = this.toggle.bind(this); + this._onmousedown = this._onmousedown.bind(this); + this._onmousemove = this._onmousemove.bind(this); + this._endPan = this._endPan.bind(this); + var overlay = this.overlay = document.createElement('div'); + overlay.className = 'grab-to-pan-grabbing'; +} +GrabToPan.prototype = { + CSS_CLASS_GRAB: 'grab-to-pan-grab', + activate: function GrabToPan_activate() { + if (!this.active) { + this.active = true; + this.element.addEventListener('mousedown', this._onmousedown, true); + this.element.classList.add(this.CSS_CLASS_GRAB); + if (this.onActiveChanged) { + this.onActiveChanged(true); + } + } + }, + deactivate: function GrabToPan_deactivate() { + if (this.active) { + this.active = false; + this.element.removeEventListener('mousedown', this._onmousedown, true); + this._endPan(); + this.element.classList.remove(this.CSS_CLASS_GRAB); + if (this.onActiveChanged) { + this.onActiveChanged(false); + } + } + }, + toggle: function GrabToPan_toggle() { + if (this.active) { + this.deactivate(); + } else { + this.activate(); + } + }, + ignoreTarget: function GrabToPan_ignoreTarget(node) { + return node[matchesSelector]('a[href], a[href] *, input, textarea, button, button *, select, option'); + }, + _onmousedown: function GrabToPan__onmousedown(event) { + if (event.button !== 0 || this.ignoreTarget(event.target)) { + return; + } + if (event.originalTarget) { + try { + event.originalTarget.tagName; + } catch (e) { return; } - clearTimeout(this.controlsTimeout); - this.container.classList.remove(CONTROLS_SELECTOR); - delete this.controlsTimeout; - }, + } + this.scrollLeftStart = this.element.scrollLeft; + this.scrollTopStart = this.element.scrollTop; + this.clientXStart = event.clientX; + this.clientYStart = event.clientY; + this.document.addEventListener('mousemove', this._onmousemove, true); + this.document.addEventListener('mouseup', this._endPan, true); + this.element.addEventListener('scroll', this._endPan, true); + event.preventDefault(); + event.stopPropagation(); + var focusedElement = document.activeElement; + if (focusedElement && !focusedElement.contains(event.target)) { + focusedElement.blur(); + } + }, + _onmousemove: function GrabToPan__onmousemove(event) { + this.element.removeEventListener('scroll', this._endPan, true); + if (isLeftMouseReleased(event)) { + this._endPan(); + return; + } + var xDiff = event.clientX - this.clientXStart; + var yDiff = event.clientY - this.clientYStart; + var scrollTop = this.scrollTopStart - yDiff; + var scrollLeft = this.scrollLeftStart - xDiff; + if (this.element.scrollTo) { + this.element.scrollTo({ + top: scrollTop, + left: scrollLeft, + behavior: 'instant' + }); + } else { + this.element.scrollTop = scrollTop; + this.element.scrollLeft = scrollLeft; + } + if (!this.overlay.parentNode) { + document.body.appendChild(this.overlay); + } + }, + _endPan: function GrabToPan__endPan() { + this.element.removeEventListener('scroll', this._endPan, true); + this.document.removeEventListener('mousemove', this._onmousemove, true); + this.document.removeEventListener('mouseup', this._endPan, true); + this.overlay.remove(); + } +}; +var matchesSelector; +['webkitM', 'mozM', 'msM', 'oM', 'm'].some(function (prefix) { + var name = prefix + 'atches'; + if (name in document.documentElement) { + matchesSelector = name; + } + name += 'Selector'; + if (name in document.documentElement) { + matchesSelector = name; + } + return matchesSelector; +}); +var isNotIEorIsIE10plus = !document.documentMode || document.documentMode > 9; +var chrome = window.chrome; +var isChrome15OrOpera15plus = chrome && (chrome.webstore || chrome.app); +var isSafari6plus = /Apple/.test(navigator.vendor) && /Version\/([6-9]\d*|[1-5]\d+)/.test(navigator.userAgent); +function isLeftMouseReleased(event) { + if ('buttons' in event && isNotIEorIsIE10plus) { + return !(event.buttons & 1); + } + if (isChrome15OrOpera15plus || isSafari6plus) { + return event.which === 0; + } +} +exports.GrabToPan = GrabToPan; - /** - * Resets the properties used for tracking mouse scrolling events. - * @private - */ - _resetMouseScrollState: - function PDFPresentationMode_resetMouseScrollState() { - this.mouseScrollTimeStamp = 0; - this.mouseScrollDelta = 0; - }, +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * @private - */ - _addWindowListeners: function PDFPresentationMode_addWindowListeners() { - this.showControlsBind = this._showControls.bind(this); - this.mouseDownBind = this._mouseDown.bind(this); - this.resetMouseScrollStateBind = this._resetMouseScrollState.bind(this); - this.contextMenuBind = this._contextMenu.bind(this); +"use strict"; - window.addEventListener('mousemove', this.showControlsBind); - window.addEventListener('mousedown', this.mouseDownBind); - window.addEventListener('keydown', this.resetMouseScrollStateBind); - window.addEventListener('contextmenu', this.contextMenuBind); - }, - /** - * @private - */ - _removeWindowListeners: - function PDFPresentationMode_removeWindowListeners() { - window.removeEventListener('mousemove', this.showControlsBind); - window.removeEventListener('mousedown', this.mouseDownBind); - window.removeEventListener('keydown', this.resetMouseScrollStateBind); - window.removeEventListener('contextmenu', this.contextMenuBind); +Object.defineProperty(exports, "__esModule", { + value: true +}); - delete this.showControlsBind; - delete this.mouseDownBind; - delete this.resetMouseScrollStateBind; - delete this.contextMenuBind; - }, +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - /** - * @private - */ - _fullscreenChange: function PDFPresentationMode_fullscreenChange() { - if (this.isFullscreen) { - this._enter(); - } else { - this._exit(); - } - }, +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - /** - * @private - */ - _addFullscreenChangeListeners: - function PDFPresentationMode_addFullscreenChangeListeners() { - this.fullscreenChangeBind = this._fullscreenChange.bind(this); +var OverlayManager = function () { + function OverlayManager() { + _classCallCheck(this, OverlayManager); - window.addEventListener('fullscreenchange', this.fullscreenChangeBind); - window.addEventListener('mozfullscreenchange', this.fullscreenChangeBind); - window.addEventListener('webkitfullscreenchange', - this.fullscreenChangeBind); - window.addEventListener('MSFullscreenChange', this.fullscreenChangeBind); - }, + this._overlays = {}; + this._active = null; + this._keyDownBound = this._keyDown.bind(this); + } - /** - * @private - */ - _removeFullscreenChangeListeners: - function PDFPresentationMode_removeFullscreenChangeListeners() { - window.removeEventListener('fullscreenchange', this.fullscreenChangeBind); - window.removeEventListener('mozfullscreenchange', - this.fullscreenChangeBind); - window.removeEventListener('webkitfullscreenchange', - this.fullscreenChangeBind); - window.removeEventListener('MSFullscreenChange', - this.fullscreenChangeBind); + _createClass(OverlayManager, [{ + key: 'register', + value: function register(name, element) { + var _this = this; - delete this.fullscreenChangeBind; + var callerCloseMethod = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + var canForceClose = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + return new Promise(function (resolve) { + var container = void 0; + if (!name || !element || !(container = element.parentNode)) { + throw new Error('Not enough parameters.'); + } else if (_this._overlays[name]) { + throw new Error('The overlay is already registered.'); + } + _this._overlays[name] = { + element: element, + container: container, + callerCloseMethod: callerCloseMethod, + canForceClose: canForceClose + }; + resolve(); + }); } - }; + }, { + key: 'unregister', + value: function unregister(name) { + var _this2 = this; - return PDFPresentationMode; -})(); - - - -var GrabToPan = (function GrabToPanClosure() { - /** - * Construct a GrabToPan instance for a given HTML element. - * @param options.element {Element} - * @param options.ignoreTarget {function} optional. See `ignoreTarget(node)` - * @param options.onActiveChanged {function(boolean)} optional. Called - * when grab-to-pan is (de)activated. The first argument is a boolean that - * shows whether grab-to-pan is activated. - */ - function GrabToPan(options) { - this.element = options.element; - this.document = options.element.ownerDocument; - if (typeof options.ignoreTarget === 'function') { - this.ignoreTarget = options.ignoreTarget; - } - this.onActiveChanged = options.onActiveChanged; - - // Bind the contexts to ensure that `this` always points to - // the GrabToPan instance. - this.activate = this.activate.bind(this); - this.deactivate = this.deactivate.bind(this); - this.toggle = this.toggle.bind(this); - this._onmousedown = this._onmousedown.bind(this); - this._onmousemove = this._onmousemove.bind(this); - this._endPan = this._endPan.bind(this); - - // This overlay will be inserted in the document when the mouse moves during - // a grab operation, to ensure that the cursor has the desired appearance. - var overlay = this.overlay = document.createElement('div'); - overlay.className = 'grab-to-pan-grabbing'; - } - GrabToPan.prototype = { - /** - * Class name of element which can be grabbed - */ - CSS_CLASS_GRAB: 'grab-to-pan-grab', - - /** - * Bind a mousedown event to the element to enable grab-detection. - */ - activate: function GrabToPan_activate() { - if (!this.active) { - this.active = true; - this.element.addEventListener('mousedown', this._onmousedown, true); - this.element.classList.add(this.CSS_CLASS_GRAB); - if (this.onActiveChanged) { - this.onActiveChanged(true); + return new Promise(function (resolve) { + if (!_this2._overlays[name]) { + throw new Error('The overlay does not exist.'); + } else if (_this2._active === name) { + throw new Error('The overlay cannot be removed while it is active.'); } - } - }, + delete _this2._overlays[name]; + resolve(); + }); + } + }, { + key: 'open', + value: function open(name) { + var _this3 = this; - /** - * Removes all events. Any pending pan session is immediately stopped. - */ - deactivate: function GrabToPan_deactivate() { - if (this.active) { - this.active = false; - this.element.removeEventListener('mousedown', this._onmousedown, true); - this._endPan(); - this.element.classList.remove(this.CSS_CLASS_GRAB); - if (this.onActiveChanged) { - this.onActiveChanged(false); + return new Promise(function (resolve) { + if (!_this3._overlays[name]) { + throw new Error('The overlay does not exist.'); + } else if (_this3._active) { + if (_this3._overlays[name].canForceClose) { + _this3._closeThroughCaller(); + } else if (_this3._active === name) { + throw new Error('The overlay is already active.'); + } else { + throw new Error('Another overlay is currently active.'); + } } - } - }, + _this3._active = name; + _this3._overlays[_this3._active].element.classList.remove('hidden'); + _this3._overlays[_this3._active].container.classList.remove('hidden'); + window.addEventListener('keydown', _this3._keyDownBound); + resolve(); + }); + } + }, { + key: 'close', + value: function close(name) { + var _this4 = this; - toggle: function GrabToPan_toggle() { - if (this.active) { - this.deactivate(); - } else { - this.activate(); + return new Promise(function (resolve) { + if (!_this4._overlays[name]) { + throw new Error('The overlay does not exist.'); + } else if (!_this4._active) { + throw new Error('The overlay is currently not active.'); + } else if (_this4._active !== name) { + throw new Error('Another overlay is currently active.'); + } + _this4._overlays[_this4._active].container.classList.add('hidden'); + _this4._overlays[_this4._active].element.classList.add('hidden'); + _this4._active = null; + window.removeEventListener('keydown', _this4._keyDownBound); + resolve(); + }); + } + }, { + key: '_keyDown', + value: function _keyDown(evt) { + if (this._active && evt.keyCode === 27) { + this._closeThroughCaller(); + evt.preventDefault(); } - }, - - /** - * Whether to not pan if the target element is clicked. - * Override this method to change the default behaviour. - * - * @param node {Element} The target of the event - * @return {boolean} Whether to not react to the click event. - */ - ignoreTarget: function GrabToPan_ignoreTarget(node) { - // Use matchesSelector to check whether the clicked element - // is (a child of) an input element / link - return node[matchesSelector]( - 'a[href], a[href] *, input, textarea, button, button *, select, option' - ); - }, - - /** - * @private - */ - _onmousedown: function GrabToPan__onmousedown(event) { - if (event.button !== 0 || this.ignoreTarget(event.target)) { - return; + } + }, { + key: '_closeThroughCaller', + value: function _closeThroughCaller() { + if (this._overlays[this._active].callerCloseMethod) { + this._overlays[this._active].callerCloseMethod(); } - if (event.originalTarget) { - try { - /* jshint expr:true */ - event.originalTarget.tagName; - } catch (e) { - // Mozilla-specific: element is a scrollbar (XUL element) - return; - } + if (this._active) { + this.close(this._active); } + } + }, { + key: 'active', + get: function get() { + return this._active; + } + }]); - this.scrollLeftStart = this.element.scrollLeft; - this.scrollTopStart = this.element.scrollTop; - this.clientXStart = event.clientX; - this.clientYStart = event.clientY; - this.document.addEventListener('mousemove', this._onmousemove, true); - this.document.addEventListener('mouseup', this._endPan, true); - // When a scroll event occurs before a mousemove, assume that the user - // dragged a scrollbar (necessary for Opera Presto, Safari and IE) - // (not needed for Chrome/Firefox) - this.element.addEventListener('scroll', this._endPan, true); - event.preventDefault(); - event.stopPropagation(); - this.document.documentElement.classList.add(this.CSS_CLASS_GRABBING); + return OverlayManager; +}(); - var focusedElement = document.activeElement; - if (focusedElement && !focusedElement.contains(event.target)) { - focusedElement.blur(); - } - }, +exports.OverlayManager = OverlayManager; - /** - * @private - */ - _onmousemove: function GrabToPan__onmousemove(event) { - this.element.removeEventListener('scroll', this._endPan, true); - if (isLeftMouseReleased(event)) { - this._endPan(); - return; - } - var xDiff = event.clientX - this.clientXStart; - var yDiff = event.clientY - this.clientYStart; - this.element.scrollTop = this.scrollTopStart - yDiff; - this.element.scrollLeft = this.scrollLeftStart - xDiff; - if (!this.overlay.parentNode) { - document.body.appendChild(this.overlay); - } - }, +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * @private - */ - _endPan: function GrabToPan__endPan() { - this.element.removeEventListener('scroll', this._endPan, true); - this.document.removeEventListener('mousemove', this._onmousemove, true); - this.document.removeEventListener('mouseup', this._endPan, true); - if (this.overlay.parentNode) { - this.overlay.parentNode.removeChild(this.overlay); - } - } - }; +"use strict"; - // Get the correct (vendor-prefixed) name of the matches method. - var matchesSelector; - ['webkitM', 'mozM', 'msM', 'oM', 'm'].some(function(prefix) { - var name = prefix + 'atches'; - if (name in document.documentElement) { - matchesSelector = name; - } - name += 'Selector'; - if (name in document.documentElement) { - matchesSelector = name; - } - return matchesSelector; // If found, then truthy, and [].some() ends. - }); - // Browser sniffing because it's impossible to feature-detect - // whether event.which for onmousemove is reliable - var isNotIEorIsIE10plus = !document.documentMode || document.documentMode > 9; - var chrome = window.chrome; - var isChrome15OrOpera15plus = chrome && (chrome.webstore || chrome.app); - // ^ Chrome 15+ ^ Opera 15+ - var isSafari6plus = /Apple/.test(navigator.vendor) && - /Version\/([6-9]\d*|[1-5]\d+)/.test(navigator.userAgent); - - /** - * Whether the left mouse is not pressed. - * @param event {MouseEvent} - * @return {boolean} True if the left mouse button is not pressed. - * False if unsure or if the left mouse button is pressed. - */ - function isLeftMouseReleased(event) { - if ('buttons' in event && isNotIEorIsIE10plus) { - // http://www.w3.org/TR/DOM-Level-3-Events/#events-MouseEvent-buttons - // Firefox 15+ - // Internet Explorer 10+ - return !(event.buttons | 1); - } - if (isChrome15OrOpera15plus || isSafari6plus) { - // Chrome 14+ - // Opera 15+ - // Safari 6.0+ - return event.which === 0; - } - } - - return GrabToPan; -})(); - -var HandTool = { - initialize: function handToolInitialize(options) { - var toggleHandTool = options.toggleHandTool; - this.handTool = new GrabToPan({ - element: options.container, - onActiveChanged: function(isActive) { - if (!toggleHandTool) { - return; - } - if (isActive) { - toggleHandTool.title = - mozL10n.get('hand_tool_disable.title', null, 'Disable hand tool'); - toggleHandTool.firstElementChild.textContent = - mozL10n.get('hand_tool_disable_label', null, 'Disable hand tool'); - } else { - toggleHandTool.title = - mozL10n.get('hand_tool_enable.title', null, 'Enable hand tool'); - toggleHandTool.firstElementChild.textContent = - mozL10n.get('hand_tool_enable_label', null, 'Enable hand tool'); - } - } - }); - if (toggleHandTool) { - toggleHandTool.addEventListener('click', this.toggle.bind(this), false); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PasswordPrompt = undefined; - window.addEventListener('localized', function (evt) { - Preferences.get('enableHandToolOnLoad').then(function resolved(value) { - if (value) { - this.handTool.activate(); - } - }.bind(this), function rejected(reason) {}); - }.bind(this)); +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - window.addEventListener('presentationmodechanged', function (evt) { - if (evt.detail.switchInProgress) { - return; - } - if (evt.detail.active) { - this.enterPresentationMode(); - } else { - this.exitPresentationMode(); - } - }.bind(this)); - } - }, +var _ui_utils = __webpack_require__(0); - toggle: function handToolToggle() { - this.handTool.toggle(); - SecondaryToolbar.close(); - }, +var _pdfjsLib = __webpack_require__(1); - enterPresentationMode: function handToolEnterPresentationMode() { - if (this.handTool.active) { - this.wasActive = true; - this.handTool.deactivate(); - } - }, +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - exitPresentationMode: function handToolExitPresentationMode() { - if (this.wasActive) { - this.wasActive = null; - this.handTool.activate(); - } - } -}; +var PasswordPrompt = function () { + function PasswordPrompt(options, overlayManager) { + var _this = this; + var l10n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _ui_utils.NullL10n; -var OverlayManager = { - overlays: {}, - active: null, - - /** - * @param {string} name The name of the overlay that is registered. This must - * be equal to the ID of the overlay's DOM element. - * @param {function} callerCloseMethod (optional) The method that, if present, - * will call OverlayManager.close from the Object - * registering the overlay. Access to this method is - * necessary in order to run cleanup code when e.g. - * the overlay is force closed. The default is null. - * @param {boolean} canForceClose (optional) Indicates if opening the overlay - * will close an active overlay. The default is false. - * @returns {Promise} A promise that is resolved when the overlay has been - * registered. - */ - register: function overlayManagerRegister(name, - callerCloseMethod, canForceClose) { - return new Promise(function (resolve) { - var element, container; - if (!name || !(element = document.getElementById(name)) || - !(container = element.parentNode)) { - throw new Error('Not enough parameters.'); - } else if (this.overlays[name]) { - throw new Error('The overlay is already registered.'); - } - this.overlays[name] = { element: element, - container: container, - callerCloseMethod: (callerCloseMethod || null), - canForceClose: (canForceClose || false) }; - resolve(); - }.bind(this)); - }, + _classCallCheck(this, PasswordPrompt); - /** - * @param {string} name The name of the overlay that is unregistered. - * @returns {Promise} A promise that is resolved when the overlay has been - * unregistered. - */ - unregister: function overlayManagerUnregister(name) { - return new Promise(function (resolve) { - if (!this.overlays[name]) { - throw new Error('The overlay does not exist.'); - } else if (this.active === name) { - throw new Error('The overlay cannot be removed while it is active.'); + this.overlayName = options.overlayName; + this.container = options.container; + this.label = options.label; + this.input = options.input; + this.submitButton = options.submitButton; + this.cancelButton = options.cancelButton; + this.overlayManager = overlayManager; + this.l10n = l10n; + this.updateCallback = null; + this.reason = null; + this.submitButton.addEventListener('click', this.verify.bind(this)); + this.cancelButton.addEventListener('click', this.close.bind(this)); + this.input.addEventListener('keydown', function (e) { + if (e.keyCode === 13) { + _this.verify(); } - delete this.overlays[name]; + }); + this.overlayManager.register(this.overlayName, this.container, this.close.bind(this), true); + } - resolve(); - }.bind(this)); - }, + _createClass(PasswordPrompt, [{ + key: 'open', + value: function open() { + var _this2 = this; - /** - * @param {string} name The name of the overlay that should be opened. - * @returns {Promise} A promise that is resolved when the overlay has been - * opened. - */ - open: function overlayManagerOpen(name) { - return new Promise(function (resolve) { - if (!this.overlays[name]) { - throw new Error('The overlay does not exist.'); - } else if (this.active) { - if (this.overlays[name].canForceClose) { - this._closeThroughCaller(); - } else if (this.active === name) { - throw new Error('The overlay is already active.'); + this.overlayManager.open(this.overlayName).then(function () { + _this2.input.focus(); + var promptString = void 0; + if (_this2.reason === _pdfjsLib.PasswordResponses.INCORRECT_PASSWORD) { + promptString = _this2.l10n.get('password_invalid', null, 'Invalid password. Please try again.'); } else { - throw new Error('Another overlay is currently active.'); + promptString = _this2.l10n.get('password_label', null, 'Enter the password to open this PDF file.'); } + promptString.then(function (msg) { + _this2.label.textContent = msg; + }); + }); + } + }, { + key: 'close', + value: function close() { + var _this3 = this; + + this.overlayManager.close(this.overlayName).then(function () { + _this3.input.value = ''; + }); + } + }, { + key: 'verify', + value: function verify() { + var password = this.input.value; + if (password && password.length > 0) { + this.close(); + return this.updateCallback(password); } - this.active = name; - this.overlays[this.active].element.classList.remove('hidden'); - this.overlays[this.active].container.classList.remove('hidden'); + } + }, { + key: 'setUpdateCallback', + value: function setUpdateCallback(updateCallback, reason) { + this.updateCallback = updateCallback; + this.reason = reason; + } + }]); - window.addEventListener('keydown', this._keyDown); - resolve(); - }.bind(this)); - }, + return PasswordPrompt; +}(); - /** - * @param {string} name The name of the overlay that should be closed. - * @returns {Promise} A promise that is resolved when the overlay has been - * closed. - */ - close: function overlayManagerClose(name) { - return new Promise(function (resolve) { - if (!this.overlays[name]) { - throw new Error('The overlay does not exist.'); - } else if (!this.active) { - throw new Error('The overlay is currently not active.'); - } else if (this.active !== name) { - throw new Error('Another overlay is currently active.'); - } - this.overlays[this.active].container.classList.add('hidden'); - this.overlays[this.active].element.classList.add('hidden'); - this.active = null; - - window.removeEventListener('keydown', this._keyDown); - resolve(); - }.bind(this)); - }, +exports.PasswordPrompt = PasswordPrompt; - /** - * @private - */ - _keyDown: function overlayManager_keyDown(evt) { - var self = OverlayManager; - if (self.active && evt.keyCode === 27) { // Esc key. - self._closeThroughCaller(); - evt.preventDefault(); - } - }, +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * @private - */ - _closeThroughCaller: function overlayManager_closeThroughCaller() { - if (this.overlays[this.active].callerCloseMethod) { - this.overlays[this.active].callerCloseMethod(); - } - if (this.active) { - this.close(this.active); - } - } -}; +"use strict"; -var PasswordPrompt = { - overlayName: null, - updatePassword: null, - reason: null, - passwordField: null, - passwordText: null, - passwordSubmit: null, - passwordCancel: null, +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFAttachmentViewer = undefined; - initialize: function secondaryToolbarInitialize(options) { - this.overlayName = options.overlayName; - this.passwordField = options.passwordField; - this.passwordText = options.passwordText; - this.passwordSubmit = options.passwordSubmit; - this.passwordCancel = options.passwordCancel; +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - // Attach the event listeners. - this.passwordSubmit.addEventListener('click', - this.verifyPassword.bind(this)); +var _pdfjsLib = __webpack_require__(1); - this.passwordCancel.addEventListener('click', this.close.bind(this)); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - this.passwordField.addEventListener('keydown', function (e) { - if (e.keyCode === 13) { // Enter key - this.verifyPassword(); - } - }.bind(this)); +var PDFAttachmentViewer = function () { + function PDFAttachmentViewer(_ref) { + var container = _ref.container, + eventBus = _ref.eventBus, + downloadManager = _ref.downloadManager; - OverlayManager.register(this.overlayName, this.close.bind(this), true); - }, + _classCallCheck(this, PDFAttachmentViewer); - open: function passwordPromptOpen() { - OverlayManager.open(this.overlayName).then(function () { - this.passwordField.type = 'password'; - this.passwordField.focus(); + this.attachments = null; + this.container = container; + this.eventBus = eventBus; + this.downloadManager = downloadManager; + this._renderedCapability = (0, _pdfjsLib.createPromiseCapability)(); + this.eventBus.on('fileattachmentannotation', this._appendAttachment.bind(this)); + } - var promptString = mozL10n.get('password_label', null, - 'Enter the password to open this PDF file.'); + _createClass(PDFAttachmentViewer, [{ + key: 'reset', + value: function reset() { + var keepRenderedCapability = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - if (this.reason === PDFJS.PasswordResponses.INCORRECT_PASSWORD) { - promptString = mozL10n.get('password_invalid', null, - 'Invalid password. Please try again.'); + this.attachments = null; + this.container.textContent = ''; + if (!keepRenderedCapability) { + this._renderedCapability = (0, _pdfjsLib.createPromiseCapability)(); } + } + }, { + key: '_dispatchEvent', + value: function _dispatchEvent(attachmentsCount) { + this.eventBus.dispatch('attachmentsloaded', { + source: this, + attachmentsCount: attachmentsCount + }); + this._renderedCapability.resolve(); + } + }, { + key: '_bindPdfLink', + value: function _bindPdfLink(button, content, filename) { + if (_pdfjsLib.PDFJS.disableCreateObjectURL) { + throw new Error('bindPdfLink: ' + 'Unsupported "PDFJS.disableCreateObjectURL" value.'); + } + var blobUrl = void 0; + button.onclick = function () { + if (!blobUrl) { + blobUrl = (0, _pdfjsLib.createObjectURL)(content, 'application/pdf'); + } + var viewerUrl = void 0; + viewerUrl = '?file=' + encodeURIComponent(blobUrl + '#' + filename); + window.open(viewerUrl); + return false; + }; + } + }, { + key: '_bindLink', + value: function _bindLink(button, content, filename) { + var _this = this; - this.passwordText.textContent = promptString; - }.bind(this)); - }, + button.onclick = function () { + _this.downloadManager.downloadData(content, filename, ''); + return false; + }; + } + }, { + key: 'render', + value: function render(_ref2) { + var attachments = _ref2.attachments, + _ref2$keepRenderedCap = _ref2.keepRenderedCapability, + keepRenderedCapability = _ref2$keepRenderedCap === undefined ? false : _ref2$keepRenderedCap; - close: function passwordPromptClose() { - OverlayManager.close(this.overlayName).then(function () { - this.passwordField.value = ''; - this.passwordField.type = ''; - }.bind(this)); - }, + var attachmentsCount = 0; + if (this.attachments) { + this.reset(keepRenderedCapability === true); + } + this.attachments = attachments || null; + if (!attachments) { + this._dispatchEvent(attachmentsCount); + return; + } + var names = Object.keys(attachments).sort(function (a, b) { + return a.toLowerCase().localeCompare(b.toLowerCase()); + }); + attachmentsCount = names.length; + for (var i = 0; i < attachmentsCount; i++) { + var item = attachments[names[i]]; + var filename = (0, _pdfjsLib.removeNullCharacters)((0, _pdfjsLib.getFilenameFromUrl)(item.filename)); + var div = document.createElement('div'); + div.className = 'attachmentsItem'; + var button = document.createElement('button'); + button.textContent = filename; + if (/\.pdf$/i.test(filename) && !_pdfjsLib.PDFJS.disableCreateObjectURL) { + this._bindPdfLink(button, item.content, filename); + } else { + this._bindLink(button, item.content, filename); + } + div.appendChild(button); + this.container.appendChild(div); + } + this._dispatchEvent(attachmentsCount); + } + }, { + key: '_appendAttachment', + value: function _appendAttachment(_ref3) { + var _this2 = this; + + var id = _ref3.id, + filename = _ref3.filename, + content = _ref3.content; - verifyPassword: function passwordPromptVerifyPassword() { - var password = this.passwordField.value; - if (password && password.length > 0) { - this.close(); - return this.updatePassword(password); + this._renderedCapability.promise.then(function () { + var attachments = _this2.attachments; + if (!attachments) { + attachments = Object.create(null); + } else { + for (var name in attachments) { + if (id === name) { + return; + } + } + } + attachments[id] = { + filename: filename, + content: content + }; + _this2.render({ + attachments: attachments, + keepRenderedCapability: true + }); + }); } - } -}; + }]); + return PDFAttachmentViewer; +}(); -/** - * @typedef {Object} PDFDocumentPropertiesOptions - * @property {string} overlayName - Name/identifier for the overlay. - * @property {Object} fields - Names and elements of the overlay's fields. - * @property {HTMLButtonElement} closeButton - Button for closing the overlay. - */ +exports.PDFAttachmentViewer = PDFAttachmentViewer; -/** - * @class - */ -var PDFDocumentProperties = (function PDFDocumentPropertiesClosure() { - /** - * @constructs PDFDocumentProperties - * @param {PDFDocumentPropertiesOptions} options - */ - function PDFDocumentProperties(options) { - this.fields = options.fields; - this.overlayName = options.overlayName; +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { - this.rawFileSize = 0; - this.url = null; - this.pdfDocument = null; +"use strict"; - // Bind the event listener for the Close button. - if (options.closeButton) { - options.closeButton.addEventListener('click', this.close.bind(this)); - } - this.dataAvailablePromise = new Promise(function (resolve) { - this.resolveDataAvailable = resolve; - }.bind(this)); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFDocumentProperties = undefined; - OverlayManager.register(this.overlayName, this.close.bind(this)); - } +var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - PDFDocumentProperties.prototype = { - /** - * Open the document properties overlay. - */ - open: function PDFDocumentProperties_open() { - Promise.all([OverlayManager.open(this.overlayName), - this.dataAvailablePromise]).then(function () { - this._getProperties(); - }.bind(this)); - }, +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - /** - * Close the document properties overlay. - */ - close: function PDFDocumentProperties_close() { - OverlayManager.close(this.overlayName); - }, +var _ui_utils = __webpack_require__(0); - /** - * Set the file size of the PDF document. This method is used to - * update the file size in the document properties overlay once it - * is known so we do not have to wait until the entire file is loaded. - * - * @param {number} fileSize - The file size of the PDF document. - */ - setFileSize: function PDFDocumentProperties_setFileSize(fileSize) { - if (fileSize > 0) { - this.rawFileSize = fileSize; - } - }, +var _pdfjsLib = __webpack_require__(1); - /** - * Set a reference to the PDF document and the URL in order - * to populate the overlay fields with the document properties. - * Note that the overlay will contain no information if this method - * is not called. - * - * @param {Object} pdfDocument - A reference to the PDF document. - * @param {string} url - The URL of the document. - */ - setDocumentAndUrl: - function PDFDocumentProperties_setDocumentAndUrl(pdfDocument, url) { - this.pdfDocument = pdfDocument; - this.url = url; - this.resolveDataAvailable(); - }, +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - /** - * @private - */ - _getProperties: function PDFDocumentProperties_getProperties() { - if (!OverlayManager.active) { - // If the dialog was closed before dataAvailablePromise was resolved, - // don't bother updating the properties. - return; - } - // Get the file size (if it hasn't already been set). - this.pdfDocument.getDownloadInfo().then(function(data) { - if (data.length === this.rawFileSize) { +var DEFAULT_FIELD_CONTENT = '-'; + +var PDFDocumentProperties = function () { + function PDFDocumentProperties(_ref, overlayManager) { + var overlayName = _ref.overlayName, + fields = _ref.fields, + container = _ref.container, + closeButton = _ref.closeButton; + var l10n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _ui_utils.NullL10n; + + _classCallCheck(this, PDFDocumentProperties); + + this.overlayName = overlayName; + this.fields = fields; + this.container = container; + this.overlayManager = overlayManager; + this.l10n = l10n; + this._reset(); + if (closeButton) { + closeButton.addEventListener('click', this.close.bind(this)); + } + this.overlayManager.register(this.overlayName, this.container, this.close.bind(this)); + } + + _createClass(PDFDocumentProperties, [{ + key: 'open', + value: function open() { + var _this = this; + + var freezeFieldData = function freezeFieldData(data) { + Object.defineProperty(_this, 'fieldData', { + value: Object.freeze(data), + writable: false, + enumerable: true, + configurable: true + }); + }; + Promise.all([this.overlayManager.open(this.overlayName), this._dataAvailableCapability.promise]).then(function () { + if (_this.fieldData) { + _this._updateUI(); return; } - this.setFileSize(data.length); - this._updateUI(this.fields['fileSize'], this._parseFileSize()); - }.bind(this)); - - // Get the document properties. - this.pdfDocument.getMetadata().then(function(data) { - var content = { - 'fileName': getPDFFileNameFromURL(this.url), - 'fileSize': this._parseFileSize(), - 'title': data.info.Title, - 'author': data.info.Author, - 'subject': data.info.Subject, - 'keywords': data.info.Keywords, - 'creationDate': this._parseDate(data.info.CreationDate), - 'modificationDate': this._parseDate(data.info.ModDate), - 'creator': data.info.Creator, - 'producer': data.info.Producer, - 'version': data.info.PDFFormatVersion, - 'pageCount': this.pdfDocument.numPages - }; + _this.pdfDocument.getMetadata().then(function (_ref2) { + var info = _ref2.info, + metadata = _ref2.metadata; + + return Promise.all([info, metadata, _this._parseFileSize(_this.maybeFileSize), _this._parseDate(info.CreationDate), _this._parseDate(info.ModDate)]); + }).then(function (_ref3) { + var _ref4 = _slicedToArray(_ref3, 5), + info = _ref4[0], + metadata = _ref4[1], + fileSize = _ref4[2], + creationDate = _ref4[3], + modificationDate = _ref4[4]; + + freezeFieldData({ + 'fileName': (0, _ui_utils.getPDFFileNameFromURL)(_this.url), + 'fileSize': fileSize, + 'title': info.Title, + 'author': info.Author, + 'subject': info.Subject, + 'keywords': info.Keywords, + 'creationDate': creationDate, + 'modificationDate': modificationDate, + 'creator': info.Creator, + 'producer': info.Producer, + 'version': info.PDFFormatVersion, + 'pageCount': _this.pdfDocument.numPages + }); + _this._updateUI(); + return _this.pdfDocument.getDownloadInfo(); + }).then(function (_ref5) { + var length = _ref5.length; + + return _this._parseFileSize(length); + }).then(function (fileSize) { + var data = (0, _ui_utils.cloneObj)(_this.fieldData); + data['fileSize'] = fileSize; + freezeFieldData(data); + _this._updateUI(); + }); + }); + } + }, { + key: 'close', + value: function close() { + this.overlayManager.close(this.overlayName); + } + }, { + key: 'setDocument', + value: function setDocument(pdfDocument, url) { + if (this.pdfDocument) { + this._reset(); + this._updateUI(true); + } + if (!pdfDocument) { + return; + } + this.pdfDocument = pdfDocument; + this.url = url; + this._dataAvailableCapability.resolve(); + } + }, { + key: 'setFileSize', + value: function setFileSize(fileSize) { + if (typeof fileSize === 'number' && fileSize > 0) { + this.maybeFileSize = fileSize; + } + } + }, { + key: '_reset', + value: function _reset() { + this.pdfDocument = null; + this.url = null; + this.maybeFileSize = 0; + delete this.fieldData; + this._dataAvailableCapability = (0, _pdfjsLib.createPromiseCapability)(); + } + }, { + key: '_updateUI', + value: function _updateUI() { + var reset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - // Show the properties in the dialog. - for (var identifier in content) { - this._updateUI(this.fields[identifier], content[identifier]); + if (reset || !this.fieldData) { + for (var id in this.fields) { + this.fields[id].textContent = DEFAULT_FIELD_CONTENT; } - }.bind(this)); - }, - - /** - * @private - */ - _updateUI: function PDFDocumentProperties_updateUI(field, content) { - if (field && content !== undefined && content !== '') { - field.textContent = content; + return; } - }, + if (this.overlayManager.active !== this.overlayName) { + return; + } + for (var _id in this.fields) { + var content = this.fieldData[_id]; + this.fields[_id].textContent = content || content === 0 ? content : DEFAULT_FIELD_CONTENT; + } + } + }, { + key: '_parseFileSize', + value: function _parseFileSize() { + var fileSize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; - /** - * @private - */ - _parseFileSize: function PDFDocumentProperties_parseFileSize() { - var fileSize = this.rawFileSize, kb = fileSize / 1024; + var kb = fileSize / 1024; if (!kb) { - return; + return Promise.resolve(undefined); } else if (kb < 1024) { - return mozL10n.get('document_properties_kb', { + return this.l10n.get('document_properties_kb', { size_kb: (+kb.toPrecision(3)).toLocaleString(), size_b: fileSize.toLocaleString() }, '{{size_kb}} KB ({{size_b}} bytes)'); - } else { - return mozL10n.get('document_properties_mb', { - size_mb: (+(kb / 1024).toPrecision(3)).toLocaleString(), - size_b: fileSize.toLocaleString() - }, '{{size_mb}} MB ({{size_b}} bytes)'); } - }, - - /** - * @private - */ - _parseDate: function PDFDocumentProperties_parseDate(inputDate) { - // This is implemented according to the PDF specification, but note that - // Adobe Reader doesn't handle changing the date to universal time - // and doesn't use the user's time zone (they're effectively ignoring - // the HH' and mm' parts of the date string). - var dateToParse = inputDate; - if (dateToParse === undefined) { - return ''; + return this.l10n.get('document_properties_mb', { + size_mb: (+(kb / 1024).toPrecision(3)).toLocaleString(), + size_b: fileSize.toLocaleString() + }, '{{size_mb}} MB ({{size_b}} bytes)'); + } + }, { + key: '_parseDate', + value: function _parseDate(inputDate) { + if (!inputDate) { + return; } - - // Remove the D: prefix if it is available. - if (dateToParse.substring(0,2) === 'D:') { + var dateToParse = inputDate; + if (dateToParse.substring(0, 2) === 'D:') { dateToParse = dateToParse.substring(2); } - - // Get all elements from the PDF date string. - // JavaScript's Date object expects the month to be between - // 0 and 11 instead of 1 and 12, so we're correcting for this. - var year = parseInt(dateToParse.substring(0,4), 10); - var month = parseInt(dateToParse.substring(4,6), 10) - 1; - var day = parseInt(dateToParse.substring(6,8), 10); - var hours = parseInt(dateToParse.substring(8,10), 10); - var minutes = parseInt(dateToParse.substring(10,12), 10); - var seconds = parseInt(dateToParse.substring(12,14), 10); - var utRel = dateToParse.substring(14,15); - var offsetHours = parseInt(dateToParse.substring(15,17), 10); - var offsetMinutes = parseInt(dateToParse.substring(18,20), 10); - - // As per spec, utRel = 'Z' means equal to universal time. - // The other cases ('-' and '+') have to be handled here. + var year = parseInt(dateToParse.substring(0, 4), 10); + var month = parseInt(dateToParse.substring(4, 6), 10) - 1; + var day = parseInt(dateToParse.substring(6, 8), 10); + var hours = parseInt(dateToParse.substring(8, 10), 10); + var minutes = parseInt(dateToParse.substring(10, 12), 10); + var seconds = parseInt(dateToParse.substring(12, 14), 10); + var utRel = dateToParse.substring(14, 15); + var offsetHours = parseInt(dateToParse.substring(15, 17), 10); + var offsetMinutes = parseInt(dateToParse.substring(18, 20), 10); if (utRel === '-') { hours += offsetHours; minutes += offsetMinutes; @@ -3350,295 +5590,823 @@ var PDFDocumentProperties = (function PDFDocumentPropertiesClosure() { hours -= offsetHours; minutes -= offsetMinutes; } - - // Return the new date format from the user's locale. var date = new Date(Date.UTC(year, month, day, hours, minutes, seconds)); var dateString = date.toLocaleDateString(); var timeString = date.toLocaleTimeString(); - return mozL10n.get('document_properties_date_string', - {date: dateString, time: timeString}, - '{{date}}, {{time}}'); + return this.l10n.get('document_properties_date_string', { + date: dateString, + time: timeString + }, '{{date}}, {{time}}'); } - }; + }]); return PDFDocumentProperties; -})(); +}(); +exports.PDFDocumentProperties = PDFDocumentProperties; -var PresentationModeState = { - UNKNOWN: 0, - NORMAL: 1, - CHANGING: 2, - FULLSCREEN: 3, -}; +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { -var IGNORE_CURRENT_POSITION_ON_ZOOM = false; -var DEFAULT_CACHE_SIZE = 10; +"use strict"; -var CLEANUP_TIMEOUT = 30000; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFFindBar = undefined; -var RenderingStates = { - INITIAL: 0, - RUNNING: 1, - PAUSED: 2, - FINISHED: 3 -}; +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -/** - * Controls rendering of the views for pages and thumbnails. - * @class - */ -var PDFRenderingQueue = (function PDFRenderingQueueClosure() { - /** - * @constructs - */ - function PDFRenderingQueue() { - this.pdfViewer = null; - this.pdfThumbnailViewer = null; - this.onIdle = null; +var _pdf_find_controller = __webpack_require__(7); - this.highestPriorityPage = null; - this.idleTimeout = null; - this.printing = false; - this.isThumbnailViewEnabled = false; - } +var _ui_utils = __webpack_require__(0); - PDFRenderingQueue.prototype = /** @lends PDFRenderingQueue.prototype */ { - /** - * @param {PDFViewer} pdfViewer - */ - setViewer: function PDFRenderingQueue_setViewer(pdfViewer) { - this.pdfViewer = pdfViewer; - }, +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - /** - * @param {PDFThumbnailViewer} pdfThumbnailViewer - */ - setThumbnailViewer: - function PDFRenderingQueue_setThumbnailViewer(pdfThumbnailViewer) { - this.pdfThumbnailViewer = pdfThumbnailViewer; - }, +var PDFFindBar = function () { + function PDFFindBar(options) { + var _this = this; - /** - * @param {IRenderableView} view - * @returns {boolean} - */ - isHighestPriority: function PDFRenderingQueue_isHighestPriority(view) { - return this.highestPriorityPage === view.renderingId; - }, + var l10n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _ui_utils.NullL10n; - renderHighestPriority: function - PDFRenderingQueue_renderHighestPriority(currentlyVisiblePages) { - if (this.idleTimeout) { - clearTimeout(this.idleTimeout); - this.idleTimeout = null; + _classCallCheck(this, PDFFindBar); + + this.opened = false; + this.bar = options.bar || null; + this.toggleButton = options.toggleButton || null; + this.findField = options.findField || null; + this.highlightAll = options.highlightAllCheckbox || null; + this.caseSensitive = options.caseSensitiveCheckbox || null; + this.findMsg = options.findMsg || null; + this.findResultsCount = options.findResultsCount || null; + this.findStatusIcon = options.findStatusIcon || null; + this.findPreviousButton = options.findPreviousButton || null; + this.findNextButton = options.findNextButton || null; + this.findController = options.findController || null; + this.eventBus = options.eventBus; + this.l10n = l10n; + if (this.findController === null) { + throw new Error('PDFFindBar cannot be used without a ' + 'PDFFindController instance.'); + } + this.toggleButton.addEventListener('click', function () { + _this.toggle(); + }); + this.findField.addEventListener('input', function () { + _this.dispatchEvent(''); + }); + this.bar.addEventListener('keydown', function (e) { + switch (e.keyCode) { + case 13: + if (e.target === _this.findField) { + _this.dispatchEvent('again', e.shiftKey); + } + break; + case 27: + _this.close(); + break; } + }); + this.findPreviousButton.addEventListener('click', function () { + _this.dispatchEvent('again', true); + }); + this.findNextButton.addEventListener('click', function () { + _this.dispatchEvent('again', false); + }); + this.highlightAll.addEventListener('click', function () { + _this.dispatchEvent('highlightallchange'); + }); + this.caseSensitive.addEventListener('click', function () { + _this.dispatchEvent('casesensitivitychange'); + }); + this.eventBus.on('resize', this._adjustWidth.bind(this)); + } - // Pages have a higher priority than thumbnails, so check them first. - if (this.pdfViewer.forceRendering(currentlyVisiblePages)) { + _createClass(PDFFindBar, [{ + key: 'reset', + value: function reset() { + this.updateUIState(); + } + }, { + key: 'dispatchEvent', + value: function dispatchEvent(type, findPrev) { + this.eventBus.dispatch('find', { + source: this, + type: type, + query: this.findField.value, + caseSensitive: this.caseSensitive.checked, + phraseSearch: true, + highlightAll: this.highlightAll.checked, + findPrevious: findPrev + }); + } + }, { + key: 'updateUIState', + value: function updateUIState(state, previous, matchCount) { + var _this2 = this; + + var notFound = false; + var findMsg = ''; + var status = ''; + switch (state) { + case _pdf_find_controller.FindState.FOUND: + break; + case _pdf_find_controller.FindState.PENDING: + status = 'pending'; + break; + case _pdf_find_controller.FindState.NOT_FOUND: + findMsg = this.l10n.get('find_not_found', null, 'Phrase not found'); + notFound = true; + break; + case _pdf_find_controller.FindState.WRAPPED: + if (previous) { + findMsg = this.l10n.get('find_reached_top', null, 'Reached top of document, continued from bottom'); + } else { + findMsg = this.l10n.get('find_reached_bottom', null, 'Reached end of document, continued from top'); + } + break; + } + if (notFound) { + this.findField.classList.add('notFound'); + } else { + this.findField.classList.remove('notFound'); + } + this.findField.setAttribute('data-status', status); + Promise.resolve(findMsg).then(function (msg) { + _this2.findMsg.textContent = msg; + _this2._adjustWidth(); + }); + this.updateResultsCount(matchCount); + } + }, { + key: 'updateResultsCount', + value: function updateResultsCount(matchCount) { + if (!this.findResultsCount) { return; } - // No pages needed rendering so check thumbnails. - if (this.pdfThumbnailViewer && this.isThumbnailViewEnabled) { - if (this.pdfThumbnailViewer.forceRendering()) { - return; - } + if (!matchCount) { + this.findResultsCount.classList.add('hidden'); + this.findResultsCount.textContent = ''; + } else { + this.findResultsCount.textContent = matchCount.toLocaleString(); + this.findResultsCount.classList.remove('hidden'); } - - if (this.printing) { - // If printing is currently ongoing do not reschedule cleanup. + this._adjustWidth(); + } + }, { + key: 'open', + value: function open() { + if (!this.opened) { + this.opened = true; + this.toggleButton.classList.add('toggled'); + this.bar.classList.remove('hidden'); + } + this.findField.select(); + this.findField.focus(); + this._adjustWidth(); + } + }, { + key: 'close', + value: function close() { + if (!this.opened) { + return; + } + this.opened = false; + this.toggleButton.classList.remove('toggled'); + this.bar.classList.add('hidden'); + this.findController.active = false; + } + }, { + key: 'toggle', + value: function toggle() { + if (this.opened) { + this.close(); + } else { + this.open(); + } + } + }, { + key: '_adjustWidth', + value: function _adjustWidth() { + if (!this.opened) { return; } + this.bar.classList.remove('wrapContainers'); + var findbarHeight = this.bar.clientHeight; + var inputContainerHeight = this.bar.firstElementChild.clientHeight; + if (findbarHeight > inputContainerHeight) { + this.bar.classList.add('wrapContainers'); + } + } + }]); - if (this.onIdle) { - this.idleTimeout = setTimeout(this.onIdle.bind(this), CLEANUP_TIMEOUT); + return PDFFindBar; +}(); + +exports.PDFFindBar = PDFFindBar; + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFHistory = undefined; + +var _dom_events = __webpack_require__(2); + +function PDFHistory(options) { + this.linkService = options.linkService; + this.eventBus = options.eventBus || (0, _dom_events.getGlobalEventBus)(); + this.initialized = false; + this.initialDestination = null; + this.initialBookmark = null; +} +PDFHistory.prototype = { + initialize: function pdfHistoryInitialize(fingerprint) { + this.initialized = true; + this.reInitialized = false; + this.allowHashChange = true; + this.historyUnlocked = true; + this.isViewerInPresentationMode = false; + this.previousHash = window.location.hash.substring(1); + this.currentBookmark = ''; + this.currentPage = 0; + this.updatePreviousBookmark = false; + this.previousBookmark = ''; + this.previousPage = 0; + this.nextHashParam = ''; + this.fingerprint = fingerprint; + this.currentUid = this.uid = 0; + this.current = {}; + var state = window.history.state; + if (this._isStateObjectDefined(state)) { + if (state.target.dest) { + this.initialDestination = state.target.dest; + } else { + this.initialBookmark = state.target.hash; } - }, + this.currentUid = state.uid; + this.uid = state.uid + 1; + this.current = state.target; + } else { + if (state && state.fingerprint && this.fingerprint !== state.fingerprint) { + this.reInitialized = true; + } + this._pushOrReplaceState({ fingerprint: this.fingerprint }, true); + } + var self = this; + window.addEventListener('popstate', function pdfHistoryPopstate(evt) { + if (!self.historyUnlocked) { + return; + } + if (evt.state) { + self._goTo(evt.state); + return; + } + if (self.uid === 0) { + var previousParams = self.previousHash && self.currentBookmark && self.previousHash !== self.currentBookmark ? { + hash: self.currentBookmark, + page: self.currentPage + } : { page: 1 }; + replacePreviousHistoryState(previousParams, function () { + updateHistoryWithCurrentHash(); + }); + } else { + updateHistoryWithCurrentHash(); + } + }); + function updateHistoryWithCurrentHash() { + self.previousHash = window.location.hash.slice(1); + self._pushToHistory({ hash: self.previousHash }, false, true); + self._updatePreviousBookmark(); + } + function replacePreviousHistoryState(params, callback) { + self.historyUnlocked = false; + self.allowHashChange = false; + window.addEventListener('popstate', rewriteHistoryAfterBack); + history.back(); + function rewriteHistoryAfterBack() { + window.removeEventListener('popstate', rewriteHistoryAfterBack); + window.addEventListener('popstate', rewriteHistoryAfterForward); + self._pushToHistory(params, false, true); + history.forward(); + } + function rewriteHistoryAfterForward() { + window.removeEventListener('popstate', rewriteHistoryAfterForward); + self.allowHashChange = true; + self.historyUnlocked = true; + callback(); + } + } + function pdfHistoryBeforeUnload() { + var previousParams = self._getPreviousParams(null, true); + if (previousParams) { + var replacePrevious = !self.current.dest && self.current.hash !== self.previousHash; + self._pushToHistory(previousParams, false, replacePrevious); + self._updatePreviousBookmark(); + } + window.removeEventListener('beforeunload', pdfHistoryBeforeUnload); + } + window.addEventListener('beforeunload', pdfHistoryBeforeUnload); + window.addEventListener('pageshow', function pdfHistoryPageShow(evt) { + window.addEventListener('beforeunload', pdfHistoryBeforeUnload); + }); + self.eventBus.on('presentationmodechanged', function (e) { + self.isViewerInPresentationMode = e.active; + }); + }, + clearHistoryState: function pdfHistory_clearHistoryState() { + this._pushOrReplaceState(null, true); + }, + _isStateObjectDefined: function pdfHistory_isStateObjectDefined(state) { + return state && state.uid >= 0 && state.fingerprint && this.fingerprint === state.fingerprint && state.target && state.target.hash ? true : false; + }, + _pushOrReplaceState: function pdfHistory_pushOrReplaceState(stateObj, replace) { + if (replace) { + window.history.replaceState(stateObj, '', document.URL); + } else { + window.history.pushState(stateObj, '', document.URL); + } + }, + get isHashChangeUnlocked() { + if (!this.initialized) { + return true; + } + return this.allowHashChange; + }, + _updatePreviousBookmark: function pdfHistory_updatePreviousBookmark() { + if (this.updatePreviousBookmark && this.currentBookmark && this.currentPage) { + this.previousBookmark = this.currentBookmark; + this.previousPage = this.currentPage; + this.updatePreviousBookmark = false; + } + }, + updateCurrentBookmark: function pdfHistoryUpdateCurrentBookmark(bookmark, pageNum) { + if (this.initialized) { + this.currentBookmark = bookmark.substring(1); + this.currentPage = pageNum | 0; + this._updatePreviousBookmark(); + } + }, + updateNextHashParam: function pdfHistoryUpdateNextHashParam(param) { + if (this.initialized) { + this.nextHashParam = param; + } + }, + push: function pdfHistoryPush(params, isInitialBookmark) { + if (!(this.initialized && this.historyUnlocked)) { + return; + } + if (params.dest && !params.hash) { + params.hash = this.current.hash && this.current.dest && this.current.dest === params.dest ? this.current.hash : this.linkService.getDestinationHash(params.dest).split('#')[1]; + } + if (params.page) { + params.page |= 0; + } + if (isInitialBookmark) { + var target = window.history.state.target; + if (!target) { + this._pushToHistory(params, false); + this.previousHash = window.location.hash.substring(1); + } + this.updatePreviousBookmark = this.nextHashParam ? false : true; + if (target) { + this._updatePreviousBookmark(); + } + return; + } + if (this.nextHashParam) { + if (this.nextHashParam === params.hash) { + this.nextHashParam = null; + this.updatePreviousBookmark = true; + return; + } + this.nextHashParam = null; + } + if (params.hash) { + if (this.current.hash) { + if (this.current.hash !== params.hash) { + this._pushToHistory(params, true); + } else { + if (!this.current.page && params.page) { + this._pushToHistory(params, false, true); + } + this.updatePreviousBookmark = true; + } + } else { + this._pushToHistory(params, true); + } + } else if (this.current.page && params.page && this.current.page !== params.page) { + this._pushToHistory(params, true); + } + }, + _getPreviousParams: function pdfHistory_getPreviousParams(onlyCheckPage, beforeUnload) { + if (!(this.currentBookmark && this.currentPage)) { + return null; + } else if (this.updatePreviousBookmark) { + this.updatePreviousBookmark = false; + } + if (this.uid > 0 && !(this.previousBookmark && this.previousPage)) { + return null; + } + if (!this.current.dest && !onlyCheckPage || beforeUnload) { + if (this.previousBookmark === this.currentBookmark) { + return null; + } + } else if (this.current.page || onlyCheckPage) { + if (this.previousPage === this.currentPage) { + return null; + } + } else { + return null; + } + var params = { + hash: this.currentBookmark, + page: this.currentPage + }; + if (this.isViewerInPresentationMode) { + params.hash = null; + } + return params; + }, + _stateObj: function pdfHistory_stateObj(params) { + return { + fingerprint: this.fingerprint, + uid: this.uid, + target: params + }; + }, + _pushToHistory: function pdfHistory_pushToHistory(params, addPrevious, overwrite) { + if (!this.initialized) { + return; + } + if (!params.hash && params.page) { + params.hash = 'page=' + params.page; + } + if (addPrevious && !overwrite) { + var previousParams = this._getPreviousParams(); + if (previousParams) { + var replacePrevious = !this.current.dest && this.current.hash !== this.previousHash; + this._pushToHistory(previousParams, false, replacePrevious); + } + } + this._pushOrReplaceState(this._stateObj(params), overwrite || this.uid === 0); + this.currentUid = this.uid++; + this.current = params; + this.updatePreviousBookmark = true; + }, + _goTo: function pdfHistory_goTo(state) { + if (!(this.initialized && this.historyUnlocked && this._isStateObjectDefined(state))) { + return; + } + if (!this.reInitialized && state.uid < this.currentUid) { + var previousParams = this._getPreviousParams(true); + if (previousParams) { + this._pushToHistory(this.current, false); + this._pushToHistory(previousParams, false); + this.currentUid = state.uid; + window.history.back(); + return; + } + } + this.historyUnlocked = false; + if (state.target.dest) { + this.linkService.navigateTo(state.target.dest); + } else { + this.linkService.setHash(state.target.hash); + } + this.currentUid = state.uid; + if (state.uid > this.uid) { + this.uid = state.uid; + } + this.current = state.target; + this.updatePreviousBookmark = true; + var currentHash = window.location.hash.substring(1); + if (this.previousHash !== currentHash) { + this.allowHashChange = false; + } + this.previousHash = currentHash; + this.historyUnlocked = true; + }, + back: function pdfHistoryBack() { + this.go(-1); + }, + forward: function pdfHistoryForward() { + this.go(1); + }, + go: function pdfHistoryGo(direction) { + if (this.initialized && this.historyUnlocked) { + var state = window.history.state; + if (direction === -1 && state && state.uid > 0) { + window.history.back(); + } else if (direction === 1 && state && state.uid < this.uid - 1) { + window.history.forward(); + } + } + } +}; +exports.PDFHistory = PDFHistory; - getHighestPriority: function - PDFRenderingQueue_getHighestPriority(visible, views, scrolledDown) { - // The state has changed figure out which page has the highest priority to - // render next (if any). - // Priority: - // 1 visible pages - // 2 if last scrolled down page after the visible pages - // 2 if last scrolled up page before the visible pages - var visibleViews = visible.views; +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { - var numVisible = visibleViews.length; - if (numVisible === 0) { - return false; +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFOutlineViewer = undefined; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _pdfjsLib = __webpack_require__(1); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var DEFAULT_TITLE = '\u2013'; + +var PDFOutlineViewer = function () { + function PDFOutlineViewer(_ref) { + var container = _ref.container, + linkService = _ref.linkService, + eventBus = _ref.eventBus; + + _classCallCheck(this, PDFOutlineViewer); + + this.outline = null; + this.lastToggleIsShow = true; + this.container = container; + this.linkService = linkService; + this.eventBus = eventBus; + } + + _createClass(PDFOutlineViewer, [{ + key: 'reset', + value: function reset() { + this.outline = null; + this.lastToggleIsShow = true; + this.container.textContent = ''; + this.container.classList.remove('outlineWithDeepNesting'); + } + }, { + key: '_dispatchEvent', + value: function _dispatchEvent(outlineCount) { + this.eventBus.dispatch('outlineloaded', { + source: this, + outlineCount: outlineCount + }); + } + }, { + key: '_bindLink', + value: function _bindLink(element, item) { + var _this = this; + + if (item.url) { + (0, _pdfjsLib.addLinkAttributes)(element, { + url: item.url, + target: item.newWindow ? _pdfjsLib.PDFJS.LinkTarget.BLANK : undefined + }); + return; } - for (var i = 0; i < numVisible; ++i) { - var view = visibleViews[i].view; - if (!this.isViewFinished(view)) { - return view; + var destination = item.dest; + element.href = this.linkService.getDestinationHash(destination); + element.onclick = function () { + if (destination) { + _this.linkService.navigateTo(destination); } + return false; + }; + } + }, { + key: '_setStyles', + value: function _setStyles(element, item) { + var styleStr = ''; + if (item.bold) { + styleStr += 'font-weight: bold;'; + } + if (item.italic) { + styleStr += 'font-style: italic;'; + } + if (styleStr) { + element.setAttribute('style', styleStr); } + } + }, { + key: '_addToggleButton', + value: function _addToggleButton(div) { + var _this2 = this; - // All the visible views have rendered, try to render next/previous pages. - if (scrolledDown) { - var nextPageIndex = visible.last.id; - // ID's start at 1 so no need to add 1. - if (views[nextPageIndex] && - !this.isViewFinished(views[nextPageIndex])) { - return views[nextPageIndex]; + var toggler = document.createElement('div'); + toggler.className = 'outlineItemToggler'; + toggler.onclick = function (evt) { + evt.stopPropagation(); + toggler.classList.toggle('outlineItemsHidden'); + if (evt.shiftKey) { + var shouldShowAll = !toggler.classList.contains('outlineItemsHidden'); + _this2._toggleOutlineItem(div, shouldShowAll); } - } else { - var previousPageIndex = visible.first.id - 2; - if (views[previousPageIndex] && - !this.isViewFinished(views[previousPageIndex])) { - return views[previousPageIndex]; + }; + div.insertBefore(toggler, div.firstChild); + } + }, { + key: '_toggleOutlineItem', + value: function _toggleOutlineItem(root, show) { + this.lastToggleIsShow = show; + var togglers = root.querySelectorAll('.outlineItemToggler'); + for (var i = 0, ii = togglers.length; i < ii; ++i) { + togglers[i].classList[show ? 'remove' : 'add']('outlineItemsHidden'); + } + } + }, { + key: 'toggleOutlineTree', + value: function toggleOutlineTree() { + if (!this.outline) { + return; + } + this._toggleOutlineItem(this.container, !this.lastToggleIsShow); + } + }, { + key: 'render', + value: function render(_ref2) { + var outline = _ref2.outline; + + var outlineCount = 0; + if (this.outline) { + this.reset(); + } + this.outline = outline || null; + if (!outline) { + this._dispatchEvent(outlineCount); + return; + } + var fragment = document.createDocumentFragment(); + var queue = [{ + parent: fragment, + items: this.outline + }]; + var hasAnyNesting = false; + while (queue.length > 0) { + var levelData = queue.shift(); + for (var i = 0, len = levelData.items.length; i < len; i++) { + var item = levelData.items[i]; + var div = document.createElement('div'); + div.className = 'outlineItem'; + var element = document.createElement('a'); + this._bindLink(element, item); + this._setStyles(element, item); + element.textContent = (0, _pdfjsLib.removeNullCharacters)(item.title) || DEFAULT_TITLE; + div.appendChild(element); + if (item.items.length > 0) { + hasAnyNesting = true; + this._addToggleButton(div); + var itemsDiv = document.createElement('div'); + itemsDiv.className = 'outlineItems'; + div.appendChild(itemsDiv); + queue.push({ + parent: itemsDiv, + items: item.items + }); + } + levelData.parent.appendChild(div); + outlineCount++; } } - // Everything that needs to be rendered has been. - return null; - }, + if (hasAnyNesting) { + this.container.classList.add('outlineWithDeepNesting'); + } + this.container.appendChild(fragment); + this._dispatchEvent(outlineCount); + } + }]); - /** - * @param {IRenderableView} view - * @returns {boolean} - */ - isViewFinished: function PDFRenderingQueue_isViewFinished(view) { - return view.renderingState === RenderingStates.FINISHED; - }, + return PDFOutlineViewer; +}(); - /** - * Render a page or thumbnail view. This calls the appropriate function - * based on the views state. If the view is already rendered it will return - * false. - * @param {IRenderableView} view - */ - renderView: function PDFRenderingQueue_renderView(view) { - var state = view.renderingState; - switch (state) { - case RenderingStates.FINISHED: - return false; - case RenderingStates.PAUSED: - this.highestPriorityPage = view.renderingId; - view.resume(); - break; - case RenderingStates.RUNNING: - this.highestPriorityPage = view.renderingId; - break; - case RenderingStates.INITIAL: - this.highestPriorityPage = view.renderingId; - var continueRendering = function () { - this.renderHighestPriority(); - }.bind(this); - view.draw().then(continueRendering, continueRendering); - break; - } - return true; - }, - }; +exports.PDFOutlineViewer = PDFOutlineViewer; - return PDFRenderingQueue; -})(); +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; -var TEXT_LAYER_RENDER_DELAY = 200; // ms -/** - * @typedef {Object} PDFPageViewOptions - * @property {HTMLDivElement} container - The viewer element. - * @property {number} id - The page unique ID (normally its number). - * @property {number} scale - The page scale display. - * @property {PageViewport} defaultViewport - The page viewport. - * @property {PDFRenderingQueue} renderingQueue - The rendering queue object. - * @property {IPDFTextLayerFactory} textLayerFactory - * @property {IPDFAnnotationLayerFactory} annotationLayerFactory - */ +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFPageView = undefined; -/** - * @class - * @implements {IRenderableView} - */ -var PDFPageView = (function PDFPageViewClosure() { - /** - * @constructs PDFPageView - * @param {PDFPageViewOptions} options - */ +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _ui_utils = __webpack_require__(0); + +var _pdfjsLib = __webpack_require__(1); + +var _dom_events = __webpack_require__(2); + +var _pdf_rendering_queue = __webpack_require__(3); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var PDFPageView = function () { function PDFPageView(options) { + _classCallCheck(this, PDFPageView); + var container = options.container; - var id = options.id; - var scale = options.scale; var defaultViewport = options.defaultViewport; - var renderingQueue = options.renderingQueue; - var textLayerFactory = options.textLayerFactory; - var annotationLayerFactory = options.annotationLayerFactory; - - this.id = id; - this.renderingId = 'page' + id; - + this.id = options.id; + this.renderingId = 'page' + this.id; + this.pdfPage = null; + this.pageLabel = null; this.rotation = 0; - this.scale = scale || DEFAULT_SCALE; + this.scale = options.scale || _ui_utils.DEFAULT_SCALE; this.viewport = defaultViewport; this.pdfPageRotate = defaultViewport.rotation; this.hasRestrictedScaling = false; - - this.renderingQueue = renderingQueue; - this.textLayerFactory = textLayerFactory; - this.annotationLayerFactory = annotationLayerFactory; - - this.renderingState = RenderingStates.INITIAL; + this.enhanceTextSelection = options.enhanceTextSelection || false; + this.renderInteractiveForms = options.renderInteractiveForms || false; + this.eventBus = options.eventBus || (0, _dom_events.getGlobalEventBus)(); + this.renderingQueue = options.renderingQueue; + this.textLayerFactory = options.textLayerFactory; + this.annotationLayerFactory = options.annotationLayerFactory; + this.renderer = options.renderer || _ui_utils.RendererType.CANVAS; + this.l10n = options.l10n || _ui_utils.NullL10n; + this.paintTask = null; + this.paintedViewportMap = new WeakMap(); + this.renderingState = _pdf_rendering_queue.RenderingStates.INITIAL; this.resume = null; - + this.error = null; this.onBeforeDraw = null; this.onAfterDraw = null; - + this.annotationLayer = null; this.textLayer = null; - this.zoomLayer = null; - - this.annotationLayer = null; - var div = document.createElement('div'); - div.id = 'pageContainer' + this.id; div.className = 'page'; div.style.width = Math.floor(this.viewport.width) + 'px'; div.style.height = Math.floor(this.viewport.height) + 'px'; div.setAttribute('data-page-number', this.id); this.div = div; - container.appendChild(div); } - PDFPageView.prototype = { - setPdfPage: function PDFPageView_setPdfPage(pdfPage) { + _createClass(PDFPageView, [{ + key: 'setPdfPage', + value: function setPdfPage(pdfPage) { this.pdfPage = pdfPage; this.pdfPageRotate = pdfPage.rotate; var totalRotation = (this.rotation + this.pdfPageRotate) % 360; - this.viewport = pdfPage.getViewport(this.scale * CSS_UNITS, - totalRotation); + this.viewport = pdfPage.getViewport(this.scale * _ui_utils.CSS_UNITS, totalRotation); this.stats = pdfPage.stats; this.reset(); - }, - - destroy: function PDFPageView_destroy() { - this.zoomLayer = null; + } + }, { + key: 'destroy', + value: function destroy() { this.reset(); if (this.pdfPage) { this.pdfPage.cleanup(); + this.pdfPage = null; } - }, + } + }, { + key: '_resetZoomLayer', + value: function _resetZoomLayer() { + var removeFromDOM = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - reset: function PDFPageView_reset(keepZoomLayer, keepAnnotations) { - if (this.renderTask) { - this.renderTask.cancel(); + if (!this.zoomLayer) { + return; } - this.resume = null; - this.renderingState = RenderingStates.INITIAL; + var zoomLayerCanvas = this.zoomLayer.firstChild; + this.paintedViewportMap.delete(zoomLayerCanvas); + zoomLayerCanvas.width = 0; + zoomLayerCanvas.height = 0; + if (removeFromDOM) { + this.zoomLayer.remove(); + } + this.zoomLayer = null; + } + }, { + key: 'reset', + value: function reset() { + var keepZoomLayer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var keepAnnotations = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + this.cancelRendering(); var div = this.div; div.style.width = Math.floor(this.viewport.width) + 'px'; div.style.height = Math.floor(this.viewport.height) + 'px'; - var childNodes = div.childNodes; - var currentZoomLayerNode = (keepZoomLayer && this.zoomLayer) || null; - var currentAnnotationNode = (keepAnnotations && this.annotationLayer && - this.annotationLayer.div) || null; + var currentZoomLayerNode = keepZoomLayer && this.zoomLayer || null; + var currentAnnotationNode = keepAnnotations && this.annotationLayer && this.annotationLayer.div || null; for (var i = childNodes.length - 1; i >= 0; i--) { var node = childNodes[i]; if (currentZoomLayerNode === node || currentAnnotationNode === node) { @@ -3647,68 +6415,67 @@ var PDFPageView = (function PDFPageViewClosure() { div.removeChild(node); } div.removeAttribute('data-loaded'); - if (currentAnnotationNode) { - // Hide annotationLayer until all elements are resized - // so they are not displayed on the already-resized page this.annotationLayer.hide(); } else { this.annotationLayer = null; } - - if (this.canvas && !currentZoomLayerNode) { - // Zeroing the width and height causes Firefox to release graphics - // resources immediately, which can greatly reduce memory consumption. - this.canvas.width = 0; - this.canvas.height = 0; - delete this.canvas; + if (!currentZoomLayerNode) { + if (this.canvas) { + this.paintedViewportMap.delete(this.canvas); + this.canvas.width = 0; + this.canvas.height = 0; + delete this.canvas; + } + this._resetZoomLayer(); + } + if (this.svg) { + this.paintedViewportMap.delete(this.svg); + delete this.svg; } - this.loadingIconDiv = document.createElement('div'); this.loadingIconDiv.className = 'loadingIcon'; div.appendChild(this.loadingIconDiv); - }, - - update: function PDFPageView_update(scale, rotation) { + } + }, { + key: 'update', + value: function update(scale, rotation) { this.scale = scale || this.scale; - if (typeof rotation !== 'undefined') { this.rotation = rotation; } - var totalRotation = (this.rotation + this.pdfPageRotate) % 360; this.viewport = this.viewport.clone({ - scale: this.scale * CSS_UNITS, + scale: this.scale * _ui_utils.CSS_UNITS, rotation: totalRotation }); - + if (this.svg) { + this.cssTransform(this.svg, true); + this.eventBus.dispatch('pagerendered', { + source: this, + pageNumber: this.id, + cssTransform: true + }); + return; + } var isScalingRestricted = false; - if (this.canvas && PDFJS.maxCanvasPixels > 0) { + if (this.canvas && _pdfjsLib.PDFJS.maxCanvasPixels > 0) { var outputScale = this.outputScale; - var pixelsInViewport = this.viewport.width * this.viewport.height; - var maxScale = Math.sqrt(PDFJS.maxCanvasPixels / pixelsInViewport); - if (((Math.floor(this.viewport.width) * outputScale.sx) | 0) * - ((Math.floor(this.viewport.height) * outputScale.sy) | 0) > - PDFJS.maxCanvasPixels) { + if ((Math.floor(this.viewport.width) * outputScale.sx | 0) * (Math.floor(this.viewport.height) * outputScale.sy | 0) > _pdfjsLib.PDFJS.maxCanvasPixels) { isScalingRestricted = true; } } - if (this.canvas) { - if (PDFJS.useOnlyCssZoom || - (this.hasRestrictedScaling && isScalingRestricted)) { + if (_pdfjsLib.PDFJS.useOnlyCssZoom || this.hasRestrictedScaling && isScalingRestricted) { this.cssTransform(this.canvas, true); - - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('pagerendered', true, true, { + this.eventBus.dispatch('pagerendered', { + source: this, pageNumber: this.id, - cssTransform: true, + cssTransform: true }); - this.div.dispatchEvent(event); - return; } - if (!this.zoomLayer) { + if (!this.zoomLayer && !this.canvas.hasAttribute('hidden')) { this.zoomLayer = this.canvas.parentNode; this.zoomLayer.style.position = 'absolute'; } @@ -3716,57 +6483,53 @@ var PDFPageView = (function PDFPageViewClosure() { if (this.zoomLayer) { this.cssTransform(this.zoomLayer.firstChild); } - this.reset(/* keepZoomLayer = */ true, /* keepAnnotations = */ true); - }, - - /** - * Called when moved in the parent's container. - */ - updatePosition: function PDFPageView_updatePosition() { + this.reset(true, true); + } + }, { + key: 'cancelRendering', + value: function cancelRendering() { + if (this.paintTask) { + this.paintTask.cancel(); + this.paintTask = null; + } + this.renderingState = _pdf_rendering_queue.RenderingStates.INITIAL; + this.resume = null; if (this.textLayer) { - this.textLayer.render(TEXT_LAYER_RENDER_DELAY); + this.textLayer.cancel(); + this.textLayer = null; } - }, - - cssTransform: function PDFPageView_transform(canvas, redrawAnnotations) { - var CustomStyle = PDFJS.CustomStyle; + } + }, { + key: 'cssTransform', + value: function cssTransform(target) { + var redrawAnnotations = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - // Scale canvas, canvas wrapper, and page container. var width = this.viewport.width; var height = this.viewport.height; var div = this.div; - canvas.style.width = canvas.parentNode.style.width = div.style.width = - Math.floor(width) + 'px'; - canvas.style.height = canvas.parentNode.style.height = div.style.height = - Math.floor(height) + 'px'; - // The canvas may have been originally rotated, rotate relative to that. - var relativeRotation = this.viewport.rotation - canvas._viewport.rotation; + target.style.width = target.parentNode.style.width = div.style.width = Math.floor(width) + 'px'; + target.style.height = target.parentNode.style.height = div.style.height = Math.floor(height) + 'px'; + var relativeRotation = this.viewport.rotation - this.paintedViewportMap.get(target).rotation; var absRotation = Math.abs(relativeRotation); - var scaleX = 1, scaleY = 1; + var scaleX = 1, + scaleY = 1; if (absRotation === 90 || absRotation === 270) { - // Scale x and y because of the rotation. scaleX = height / width; scaleY = width / height; } - var cssTransform = 'rotate(' + relativeRotation + 'deg) ' + - 'scale(' + scaleX + ',' + scaleY + ')'; - CustomStyle.setProp('transform', canvas, cssTransform); - + var cssTransform = 'rotate(' + relativeRotation + 'deg) ' + 'scale(' + scaleX + ',' + scaleY + ')'; + _pdfjsLib.CustomStyle.setProp('transform', target, cssTransform); if (this.textLayer) { - // Rotating the text layer is more complicated since the divs inside the - // the text layer are rotated. - // TODO: This could probably be simplified by drawing the text layer in - // one orientation then rotating overall. var textLayerViewport = this.textLayer.viewport; - var textRelativeRotation = this.viewport.rotation - - textLayerViewport.rotation; + var textRelativeRotation = this.viewport.rotation - textLayerViewport.rotation; var textAbsRotation = Math.abs(textRelativeRotation); var scale = width / textLayerViewport.width; if (textAbsRotation === 90 || textAbsRotation === 270) { scale = width / textLayerViewport.height; } var textLayerDiv = this.textLayer.textLayerDiv; - var transX, transY; + var transX = void 0, + transY = void 0; switch (textAbsRotation) { case 0: transX = transY = 0; @@ -3787,80 +6550,165 @@ var PDFPageView = (function PDFPageViewClosure() { console.error('Bad rotation value.'); break; } - CustomStyle.setProp('transform', textLayerDiv, - 'rotate(' + textAbsRotation + 'deg) ' + - 'scale(' + scale + ', ' + scale + ') ' + - 'translate(' + transX + ', ' + transY + ')'); - CustomStyle.setProp('transformOrigin', textLayerDiv, '0% 0%'); + _pdfjsLib.CustomStyle.setProp('transform', textLayerDiv, 'rotate(' + textAbsRotation + 'deg) ' + 'scale(' + scale + ', ' + scale + ') ' + 'translate(' + transX + ', ' + transY + ')'); + _pdfjsLib.CustomStyle.setProp('transformOrigin', textLayerDiv, '0% 0%'); } - if (redrawAnnotations && this.annotationLayer) { this.annotationLayer.render(this.viewport, 'display'); } - }, - - get width() { - return this.viewport.width; - }, - - get height() { - return this.viewport.height; - }, - - getPagePoint: function PDFPageView_getPagePoint(x, y) { + } + }, { + key: 'getPagePoint', + value: function getPagePoint(x, y) { return this.viewport.convertToPdfPoint(x, y); - }, + } + }, { + key: 'draw', + value: function draw() { + var _this = this; - draw: function PDFPageView_draw() { - if (this.renderingState !== RenderingStates.INITIAL) { + if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) { console.error('Must be in new state before drawing'); + this.reset(); } - - this.renderingState = RenderingStates.RUNNING; - + if (!this.pdfPage) { + this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; + return Promise.reject(new Error('Page is not loaded')); + } + this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING; var pdfPage = this.pdfPage; - var viewport = this.viewport; var div = this.div; - // Wrap the canvas so if it has a css transform for highdpi the overflow - // will be hidden in FF. var canvasWrapper = document.createElement('div'); canvasWrapper.style.width = div.style.width; canvasWrapper.style.height = div.style.height; canvasWrapper.classList.add('canvasWrapper'); - - var canvas = document.createElement('canvas'); - canvas.id = 'page' + this.id; - // Keep the canvas hidden until the first draw callback, or until drawing - // is complete when `!this.renderingQueue`, to prevent black flickering. - canvas.setAttribute('hidden', 'hidden'); - var isCanvasHidden = true; - - canvasWrapper.appendChild(canvas); if (this.annotationLayer && this.annotationLayer.div) { - // annotationLayer needs to stay on top div.insertBefore(canvasWrapper, this.annotationLayer.div); } else { div.appendChild(canvasWrapper); } + var textLayer = null; + if (this.textLayerFactory) { + var textLayerDiv = document.createElement('div'); + textLayerDiv.className = 'textLayer'; + textLayerDiv.style.width = canvasWrapper.style.width; + textLayerDiv.style.height = canvasWrapper.style.height; + if (this.annotationLayer && this.annotationLayer.div) { + div.insertBefore(textLayerDiv, this.annotationLayer.div); + } else { + div.appendChild(textLayerDiv); + } + textLayer = this.textLayerFactory.createTextLayerBuilder(textLayerDiv, this.id - 1, this.viewport, this.enhanceTextSelection); + } + this.textLayer = textLayer; + var renderContinueCallback = null; + if (this.renderingQueue) { + renderContinueCallback = function renderContinueCallback(cont) { + if (!_this.renderingQueue.isHighestPriority(_this)) { + _this.renderingState = _pdf_rendering_queue.RenderingStates.PAUSED; + _this.resume = function () { + _this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING; + cont(); + }; + return; + } + cont(); + }; + } + var finishPaintTask = function finishPaintTask(error) { + if (paintTask === _this.paintTask) { + _this.paintTask = null; + } + if (error === 'cancelled' || error instanceof _pdfjsLib.RenderingCancelledException) { + _this.error = null; + return Promise.resolve(undefined); + } + _this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; + if (_this.loadingIconDiv) { + div.removeChild(_this.loadingIconDiv); + delete _this.loadingIconDiv; + } + _this._resetZoomLayer(true); + _this.error = error; + _this.stats = pdfPage.stats; + if (_this.onAfterDraw) { + _this.onAfterDraw(); + } + _this.eventBus.dispatch('pagerendered', { + source: _this, + pageNumber: _this.id, + cssTransform: false + }); + if (error) { + return Promise.reject(error); + } + return Promise.resolve(undefined); + }; + var paintTask = this.renderer === _ui_utils.RendererType.SVG ? this.paintOnSvg(canvasWrapper) : this.paintOnCanvas(canvasWrapper); + paintTask.onRenderContinue = renderContinueCallback; + this.paintTask = paintTask; + var resultPromise = paintTask.promise.then(function () { + return finishPaintTask(null).then(function () { + if (textLayer) { + var readableStream = pdfPage.streamTextContent({ normalizeWhitespace: true }); + textLayer.setTextContentStream(readableStream); + textLayer.render(); + } + }); + }, function (reason) { + return finishPaintTask(reason); + }); + if (this.annotationLayerFactory) { + if (!this.annotationLayer) { + this.annotationLayer = this.annotationLayerFactory.createAnnotationLayerBuilder(div, pdfPage, this.renderInteractiveForms, this.l10n); + } + this.annotationLayer.render(this.viewport, 'display'); + } + div.setAttribute('data-loaded', true); + if (this.onBeforeDraw) { + this.onBeforeDraw(); + } + return resultPromise; + } + }, { + key: 'paintOnCanvas', + value: function paintOnCanvas(canvasWrapper) { + var renderCapability = (0, _pdfjsLib.createPromiseCapability)(); + var result = { + promise: renderCapability.promise, + onRenderContinue: function onRenderContinue(cont) { + cont(); + }, + cancel: function cancel() { + renderTask.cancel(); + } + }; + var viewport = this.viewport; + var canvas = document.createElement('canvas'); + canvas.id = this.renderingId; + canvas.setAttribute('hidden', 'hidden'); + var isCanvasHidden = true; + var showCanvas = function showCanvas() { + if (isCanvasHidden) { + canvas.removeAttribute('hidden'); + isCanvasHidden = false; + } + }; + canvasWrapper.appendChild(canvas); this.canvas = canvas; - canvas.mozOpaque = true; - var ctx = canvas.getContext('2d', {alpha: false}); - var outputScale = getOutputScale(ctx); + var ctx = canvas.getContext('2d', { alpha: false }); + var outputScale = (0, _ui_utils.getOutputScale)(ctx); this.outputScale = outputScale; - - if (PDFJS.useOnlyCssZoom) { - var actualSizeViewport = viewport.clone({scale: CSS_UNITS}); - // Use a scale that will make the canvas be the original intended size - // of the page. + if (_pdfjsLib.PDFJS.useOnlyCssZoom) { + var actualSizeViewport = viewport.clone({ scale: _ui_utils.CSS_UNITS }); outputScale.sx *= actualSizeViewport.width / viewport.width; outputScale.sy *= actualSizeViewport.height / viewport.height; outputScale.scaled = true; } - - if (PDFJS.maxCanvasPixels > 0) { + if (_pdfjsLib.PDFJS.maxCanvasPixels > 0) { var pixelsInViewport = viewport.width * viewport.height; - var maxScale = Math.sqrt(PDFJS.maxCanvasPixels / pixelsInViewport); + var maxScale = Math.sqrt(_pdfjsLib.PDFJS.maxCanvasPixels / pixelsInViewport); if (outputScale.sx > maxScale || outputScale.sy > maxScale) { outputScale.sx = maxScale; outputScale.sy = maxScale; @@ -3870,1046 +6718,1757 @@ var PDFPageView = (function PDFPageViewClosure() { this.hasRestrictedScaling = false; } } - - var sfx = approximateFraction(outputScale.sx); - var sfy = approximateFraction(outputScale.sy); - canvas.width = roundToDivide(viewport.width * outputScale.sx, sfx[0]); - canvas.height = roundToDivide(viewport.height * outputScale.sy, sfy[0]); - canvas.style.width = roundToDivide(viewport.width, sfx[1]) + 'px'; - canvas.style.height = roundToDivide(viewport.height, sfy[1]) + 'px'; - // Add the viewport so it's known what it was originally drawn with. - canvas._viewport = viewport; - - var textLayerDiv = null; - var textLayer = null; - if (this.textLayerFactory) { - textLayerDiv = document.createElement('div'); - textLayerDiv.className = 'textLayer'; - textLayerDiv.style.width = canvasWrapper.style.width; - textLayerDiv.style.height = canvasWrapper.style.height; - if (this.annotationLayer && this.annotationLayer.div) { - // annotationLayer needs to stay on top - div.insertBefore(textLayerDiv, this.annotationLayer.div); + var sfx = (0, _ui_utils.approximateFraction)(outputScale.sx); + var sfy = (0, _ui_utils.approximateFraction)(outputScale.sy); + canvas.width = (0, _ui_utils.roundToDivide)(viewport.width * outputScale.sx, sfx[0]); + canvas.height = (0, _ui_utils.roundToDivide)(viewport.height * outputScale.sy, sfy[0]); + canvas.style.width = (0, _ui_utils.roundToDivide)(viewport.width, sfx[1]) + 'px'; + canvas.style.height = (0, _ui_utils.roundToDivide)(viewport.height, sfy[1]) + 'px'; + this.paintedViewportMap.set(canvas, viewport); + var transform = !outputScale.scaled ? null : [outputScale.sx, 0, 0, outputScale.sy, 0, 0]; + var renderContext = { + canvasContext: ctx, + transform: transform, + viewport: this.viewport, + renderInteractiveForms: this.renderInteractiveForms + }; + var renderTask = this.pdfPage.render(renderContext); + renderTask.onContinue = function (cont) { + showCanvas(); + if (result.onRenderContinue) { + result.onRenderContinue(cont); } else { - div.appendChild(textLayerDiv); + cont(); } - - textLayer = this.textLayerFactory.createTextLayerBuilder(textLayerDiv, - this.id - 1, - this.viewport); + }; + renderTask.promise.then(function () { + showCanvas(); + renderCapability.resolve(undefined); + }, function (error) { + showCanvas(); + renderCapability.reject(error); + }); + return result; + } + }, { + key: 'paintOnSvg', + value: function paintOnSvg(wrapper) { + var _this2 = this; + + var cancelled = false; + var ensureNotCancelled = function ensureNotCancelled() { + if (cancelled) { + if (_pdfjsLib.PDFJS.pdfjsNext) { + throw new _pdfjsLib.RenderingCancelledException('Rendering cancelled, page ' + _this2.id, 'svg'); + } else { + throw 'cancelled'; + } + } + }; + var pdfPage = this.pdfPage; + var actualSizeViewport = this.viewport.clone({ scale: _ui_utils.CSS_UNITS }); + var promise = pdfPage.getOperatorList().then(function (opList) { + ensureNotCancelled(); + var svgGfx = new _pdfjsLib.SVGGraphics(pdfPage.commonObjs, pdfPage.objs); + return svgGfx.getSVG(opList, actualSizeViewport).then(function (svg) { + ensureNotCancelled(); + _this2.svg = svg; + _this2.paintedViewportMap.set(svg, actualSizeViewport); + svg.style.width = wrapper.style.width; + svg.style.height = wrapper.style.height; + _this2.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; + wrapper.appendChild(svg); + }); + }); + return { + promise: promise, + onRenderContinue: function onRenderContinue(cont) { + cont(); + }, + cancel: function cancel() { + cancelled = true; + } + }; + } + }, { + key: 'setPageLabel', + value: function setPageLabel(label) { + this.pageLabel = typeof label === 'string' ? label : null; + if (this.pageLabel !== null) { + this.div.setAttribute('data-page-label', this.pageLabel); + } else { + this.div.removeAttribute('data-page-label'); } - this.textLayer = textLayer; + } + }, { + key: 'width', + get: function get() { + return this.viewport.width; + } + }, { + key: 'height', + get: function get() { + return this.viewport.height; + } + }]); - var resolveRenderPromise, rejectRenderPromise; - var promise = new Promise(function (resolve, reject) { - resolveRenderPromise = resolve; - rejectRenderPromise = reject; - }); + return PDFPageView; +}(); - // Rendering area +exports.PDFPageView = PDFPageView; - var self = this; - function pageViewDrawCallback(error) { - // The renderTask may have been replaced by a new one, so only remove - // the reference to the renderTask if it matches the one that is - // triggering this callback. - if (renderTask === self.renderTask) { - self.renderTask = null; - } +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { - if (error === 'cancelled') { - rejectRenderPromise(error); - return; - } +"use strict"; - self.renderingState = RenderingStates.FINISHED; - if (isCanvasHidden) { - self.canvas.removeAttribute('hidden'); - isCanvasHidden = false; - } +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFPresentationMode = undefined; - if (self.loadingIconDiv) { - div.removeChild(self.loadingIconDiv); - delete self.loadingIconDiv; - } +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - if (self.zoomLayer) { - // Zeroing the width and height causes Firefox to release graphics - // resources immediately, which can greatly reduce memory consumption. - var zoomLayerCanvas = self.zoomLayer.firstChild; - zoomLayerCanvas.width = 0; - zoomLayerCanvas.height = 0; +var _ui_utils = __webpack_require__(0); - div.removeChild(self.zoomLayer); - self.zoomLayer = null; - } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - self.error = error; - self.stats = pdfPage.stats; - if (self.onAfterDraw) { - self.onAfterDraw(); - } - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('pagerendered', true, true, { - pageNumber: self.id, - cssTransform: false, - }); - div.dispatchEvent(event); - // This custom event is deprecated, and will be removed in the future, - // please use the |pagerendered| event instead. - var deprecatedEvent = document.createEvent('CustomEvent'); - deprecatedEvent.initCustomEvent('pagerender', true, true, { - pageNumber: pdfPage.pageNumber - }); - div.dispatchEvent(deprecatedEvent); +var DELAY_BEFORE_RESETTING_SWITCH_IN_PROGRESS = 1500; +var DELAY_BEFORE_HIDING_CONTROLS = 3000; +var ACTIVE_SELECTOR = 'pdfPresentationMode'; +var CONTROLS_SELECTOR = 'pdfPresentationModeControls'; +var MOUSE_SCROLL_COOLDOWN_TIME = 50; +var PAGE_SWITCH_THRESHOLD = 0.1; +var SWIPE_MIN_DISTANCE_THRESHOLD = 50; +var SWIPE_ANGLE_THRESHOLD = Math.PI / 6; + +var PDFPresentationMode = function () { + function PDFPresentationMode(_ref) { + var _this = this; + + var container = _ref.container, + _ref$viewer = _ref.viewer, + viewer = _ref$viewer === undefined ? null : _ref$viewer, + pdfViewer = _ref.pdfViewer, + eventBus = _ref.eventBus, + _ref$contextMenuItems = _ref.contextMenuItems, + contextMenuItems = _ref$contextMenuItems === undefined ? null : _ref$contextMenuItems; + + _classCallCheck(this, PDFPresentationMode); + + this.container = container; + this.viewer = viewer || container.firstElementChild; + this.pdfViewer = pdfViewer; + this.eventBus = eventBus; + this.active = false; + this.args = null; + this.contextMenuOpen = false; + this.mouseScrollTimeStamp = 0; + this.mouseScrollDelta = 0; + this.touchSwipeState = null; + if (contextMenuItems) { + contextMenuItems.contextFirstPage.addEventListener('click', function () { + _this.contextMenuOpen = false; + _this.eventBus.dispatch('firstpage'); + }); + contextMenuItems.contextLastPage.addEventListener('click', function () { + _this.contextMenuOpen = false; + _this.eventBus.dispatch('lastpage'); + }); + contextMenuItems.contextPageRotateCw.addEventListener('click', function () { + _this.contextMenuOpen = false; + _this.eventBus.dispatch('rotatecw'); + }); + contextMenuItems.contextPageRotateCcw.addEventListener('click', function () { + _this.contextMenuOpen = false; + _this.eventBus.dispatch('rotateccw'); + }); + } + } - if (!error) { - resolveRenderPromise(undefined); - } else { - rejectRenderPromise(error); + _createClass(PDFPresentationMode, [{ + key: 'request', + value: function request() { + if (this.switchInProgress || this.active || !this.viewer.hasChildNodes()) { + return false; + } + this._addFullscreenChangeListeners(); + this._setSwitchInProgress(); + this._notifyStateChange(); + if (this.container.requestFullscreen) { + this.container.requestFullscreen(); + } else if (this.container.mozRequestFullScreen) { + this.container.mozRequestFullScreen(); + } else if (this.container.webkitRequestFullscreen) { + this.container.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); + } else if (this.container.msRequestFullscreen) { + this.container.msRequestFullscreen(); + } else { + return false; + } + this.args = { + page: this.pdfViewer.currentPageNumber, + previousScale: this.pdfViewer.currentScaleValue + }; + return true; + } + }, { + key: '_mouseWheel', + value: function _mouseWheel(evt) { + if (!this.active) { + return; + } + evt.preventDefault(); + var delta = (0, _ui_utils.normalizeWheelEventDelta)(evt); + var currentTime = new Date().getTime(); + var storedTime = this.mouseScrollTimeStamp; + if (currentTime > storedTime && currentTime - storedTime < MOUSE_SCROLL_COOLDOWN_TIME) { + return; + } + if (this.mouseScrollDelta > 0 && delta < 0 || this.mouseScrollDelta < 0 && delta > 0) { + this._resetMouseScrollState(); + } + this.mouseScrollDelta += delta; + if (Math.abs(this.mouseScrollDelta) >= PAGE_SWITCH_THRESHOLD) { + var totalDelta = this.mouseScrollDelta; + this._resetMouseScrollState(); + var success = totalDelta > 0 ? this._goToPreviousPage() : this._goToNextPage(); + if (success) { + this.mouseScrollTimeStamp = currentTime; } } + } + }, { + key: '_goToPreviousPage', + value: function _goToPreviousPage() { + var page = this.pdfViewer.currentPageNumber; + if (page <= 1) { + return false; + } + this.pdfViewer.currentPageNumber = page - 1; + return true; + } + }, { + key: '_goToNextPage', + value: function _goToNextPage() { + var page = this.pdfViewer.currentPageNumber; + if (page >= this.pdfViewer.pagesCount) { + return false; + } + this.pdfViewer.currentPageNumber = page + 1; + return true; + } + }, { + key: '_notifyStateChange', + value: function _notifyStateChange() { + this.eventBus.dispatch('presentationmodechanged', { + source: this, + active: this.active, + switchInProgress: !!this.switchInProgress + }); + } + }, { + key: '_setSwitchInProgress', + value: function _setSwitchInProgress() { + var _this2 = this; - var renderContinueCallback = null; - if (this.renderingQueue) { - renderContinueCallback = function renderContinueCallback(cont) { - if (!self.renderingQueue.isHighestPriority(self)) { - self.renderingState = RenderingStates.PAUSED; - self.resume = function resumeCallback() { - self.renderingState = RenderingStates.RUNNING; - cont(); - }; - return; - } - if (isCanvasHidden) { - self.canvas.removeAttribute('hidden'); - isCanvasHidden = false; - } - cont(); - }; + if (this.switchInProgress) { + clearTimeout(this.switchInProgress); } + this.switchInProgress = setTimeout(function () { + _this2._removeFullscreenChangeListeners(); + delete _this2.switchInProgress; + _this2._notifyStateChange(); + }, DELAY_BEFORE_RESETTING_SWITCH_IN_PROGRESS); + } + }, { + key: '_resetSwitchInProgress', + value: function _resetSwitchInProgress() { + if (this.switchInProgress) { + clearTimeout(this.switchInProgress); + delete this.switchInProgress; + } + } + }, { + key: '_enter', + value: function _enter() { + var _this3 = this; - var transform = !outputScale.scaled ? null : - [outputScale.sx, 0, 0, outputScale.sy, 0, 0]; - var renderContext = { - canvasContext: ctx, - transform: transform, - viewport: this.viewport, - // intent: 'default', // === 'display' - }; - var renderTask = this.renderTask = this.pdfPage.render(renderContext); - renderTask.onContinue = renderContinueCallback; + this.active = true; + this._resetSwitchInProgress(); + this._notifyStateChange(); + this.container.classList.add(ACTIVE_SELECTOR); + setTimeout(function () { + _this3.pdfViewer.currentPageNumber = _this3.args.page; + _this3.pdfViewer.currentScaleValue = 'page-fit'; + }, 0); + this._addWindowListeners(); + this._showControls(); + this.contextMenuOpen = false; + this.container.setAttribute('contextmenu', 'viewerContextMenu'); + window.getSelection().removeAllRanges(); + } + }, { + key: '_exit', + value: function _exit() { + var _this4 = this; - this.renderTask.promise.then( - function pdfPageRenderCallback() { - pageViewDrawCallback(null); - if (textLayer) { - self.pdfPage.getTextContent({ normalizeWhitespace: true }).then( - function textContentResolved(textContent) { - textLayer.setTextContent(textContent); - textLayer.render(TEXT_LAYER_RENDER_DELAY); - } - ); + var page = this.pdfViewer.currentPageNumber; + this.container.classList.remove(ACTIVE_SELECTOR); + setTimeout(function () { + _this4.active = false; + _this4._removeFullscreenChangeListeners(); + _this4._notifyStateChange(); + _this4.pdfViewer.currentScaleValue = _this4.args.previousScale; + _this4.pdfViewer.currentPageNumber = page; + _this4.args = null; + }, 0); + this._removeWindowListeners(); + this._hideControls(); + this._resetMouseScrollState(); + this.container.removeAttribute('contextmenu'); + this.contextMenuOpen = false; + } + }, { + key: '_mouseDown', + value: function _mouseDown(evt) { + if (this.contextMenuOpen) { + this.contextMenuOpen = false; + evt.preventDefault(); + return; + } + if (evt.button === 0) { + var isInternalLink = evt.target.href && evt.target.classList.contains('internalLink'); + if (!isInternalLink) { + evt.preventDefault(); + if (evt.shiftKey) { + this._goToPreviousPage(); + } else { + this._goToNextPage(); } - }, - function pdfPageRenderError(error) { - pageViewDrawCallback(error); } - ); - - if (this.annotationLayerFactory) { - if (!this.annotationLayer) { - this.annotationLayer = this.annotationLayerFactory. - createAnnotationLayerBuilder(div, this.pdfPage); - } - this.annotationLayer.render(this.viewport, 'display'); } - div.setAttribute('data-loaded', true); + } + }, { + key: '_contextMenu', + value: function _contextMenu() { + this.contextMenuOpen = true; + } + }, { + key: '_showControls', + value: function _showControls() { + var _this5 = this; - if (self.onBeforeDraw) { - self.onBeforeDraw(); + if (this.controlsTimeout) { + clearTimeout(this.controlsTimeout); + } else { + this.container.classList.add(CONTROLS_SELECTOR); } - return promise; - }, + this.controlsTimeout = setTimeout(function () { + _this5.container.classList.remove(CONTROLS_SELECTOR); + delete _this5.controlsTimeout; + }, DELAY_BEFORE_HIDING_CONTROLS); + } + }, { + key: '_hideControls', + value: function _hideControls() { + if (!this.controlsTimeout) { + return; + } + clearTimeout(this.controlsTimeout); + this.container.classList.remove(CONTROLS_SELECTOR); + delete this.controlsTimeout; + } + }, { + key: '_resetMouseScrollState', + value: function _resetMouseScrollState() { + this.mouseScrollTimeStamp = 0; + this.mouseScrollDelta = 0; + } + }, { + key: '_touchSwipe', + value: function _touchSwipe(evt) { + if (!this.active) { + return; + } + if (evt.touches.length > 1) { + this.touchSwipeState = null; + return; + } + switch (evt.type) { + case 'touchstart': + this.touchSwipeState = { + startX: evt.touches[0].pageX, + startY: evt.touches[0].pageY, + endX: evt.touches[0].pageX, + endY: evt.touches[0].pageY + }; + break; + case 'touchmove': + if (this.touchSwipeState === null) { + return; + } + this.touchSwipeState.endX = evt.touches[0].pageX; + this.touchSwipeState.endY = evt.touches[0].pageY; + evt.preventDefault(); + break; + case 'touchend': + if (this.touchSwipeState === null) { + return; + } + var delta = 0; + var dx = this.touchSwipeState.endX - this.touchSwipeState.startX; + var dy = this.touchSwipeState.endY - this.touchSwipeState.startY; + var absAngle = Math.abs(Math.atan2(dy, dx)); + if (Math.abs(dx) > SWIPE_MIN_DISTANCE_THRESHOLD && (absAngle <= SWIPE_ANGLE_THRESHOLD || absAngle >= Math.PI - SWIPE_ANGLE_THRESHOLD)) { + delta = dx; + } else if (Math.abs(dy) > SWIPE_MIN_DISTANCE_THRESHOLD && Math.abs(absAngle - Math.PI / 2) <= SWIPE_ANGLE_THRESHOLD) { + delta = dy; + } + if (delta > 0) { + this._goToPreviousPage(); + } else if (delta < 0) { + this._goToNextPage(); + } + break; + } + } + }, { + key: '_addWindowListeners', + value: function _addWindowListeners() { + this.showControlsBind = this._showControls.bind(this); + this.mouseDownBind = this._mouseDown.bind(this); + this.mouseWheelBind = this._mouseWheel.bind(this); + this.resetMouseScrollStateBind = this._resetMouseScrollState.bind(this); + this.contextMenuBind = this._contextMenu.bind(this); + this.touchSwipeBind = this._touchSwipe.bind(this); + window.addEventListener('mousemove', this.showControlsBind); + window.addEventListener('mousedown', this.mouseDownBind); + window.addEventListener('wheel', this.mouseWheelBind); + window.addEventListener('keydown', this.resetMouseScrollStateBind); + window.addEventListener('contextmenu', this.contextMenuBind); + window.addEventListener('touchstart', this.touchSwipeBind); + window.addEventListener('touchmove', this.touchSwipeBind); + window.addEventListener('touchend', this.touchSwipeBind); + } + }, { + key: '_removeWindowListeners', + value: function _removeWindowListeners() { + window.removeEventListener('mousemove', this.showControlsBind); + window.removeEventListener('mousedown', this.mouseDownBind); + window.removeEventListener('wheel', this.mouseWheelBind); + window.removeEventListener('keydown', this.resetMouseScrollStateBind); + window.removeEventListener('contextmenu', this.contextMenuBind); + window.removeEventListener('touchstart', this.touchSwipeBind); + window.removeEventListener('touchmove', this.touchSwipeBind); + window.removeEventListener('touchend', this.touchSwipeBind); + delete this.showControlsBind; + delete this.mouseDownBind; + delete this.mouseWheelBind; + delete this.resetMouseScrollStateBind; + delete this.contextMenuBind; + delete this.touchSwipeBind; + } + }, { + key: '_fullscreenChange', + value: function _fullscreenChange() { + if (this.isFullscreen) { + this._enter(); + } else { + this._exit(); + } + } + }, { + key: '_addFullscreenChangeListeners', + value: function _addFullscreenChangeListeners() { + this.fullscreenChangeBind = this._fullscreenChange.bind(this); + window.addEventListener('fullscreenchange', this.fullscreenChangeBind); + window.addEventListener('mozfullscreenchange', this.fullscreenChangeBind); + window.addEventListener('webkitfullscreenchange', this.fullscreenChangeBind); + window.addEventListener('MSFullscreenChange', this.fullscreenChangeBind); + } + }, { + key: '_removeFullscreenChangeListeners', + value: function _removeFullscreenChangeListeners() { + window.removeEventListener('fullscreenchange', this.fullscreenChangeBind); + window.removeEventListener('mozfullscreenchange', this.fullscreenChangeBind); + window.removeEventListener('webkitfullscreenchange', this.fullscreenChangeBind); + window.removeEventListener('MSFullscreenChange', this.fullscreenChangeBind); + delete this.fullscreenChangeBind; + } + }, { + key: 'isFullscreen', + get: function get() { + return !!(document.fullscreenElement || document.mozFullScreen || document.webkitIsFullScreen || document.msFullscreenElement); + } + }]); - beforePrint: function PDFPageView_beforePrint() { - var CustomStyle = PDFJS.CustomStyle; - var pdfPage = this.pdfPage; + return PDFPresentationMode; +}(); - var viewport = pdfPage.getViewport(1); - // Use the same hack we use for high dpi displays for printing to get - // better output until bug 811002 is fixed in FF. - var PRINT_OUTPUT_SCALE = 2; - var canvas = document.createElement('canvas'); +exports.PDFPresentationMode = PDFPresentationMode; - // The logical size of the canvas. - canvas.width = Math.floor(viewport.width) * PRINT_OUTPUT_SCALE; - canvas.height = Math.floor(viewport.height) * PRINT_OUTPUT_SCALE; +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { - // The rendered size of the canvas, relative to the size of canvasWrapper. - canvas.style.width = (PRINT_OUTPUT_SCALE * 100) + '%'; - canvas.style.height = (PRINT_OUTPUT_SCALE * 100) + '%'; +"use strict"; - var cssScale = 'scale(' + (1 / PRINT_OUTPUT_SCALE) + ', ' + - (1 / PRINT_OUTPUT_SCALE) + ')'; - CustomStyle.setProp('transform' , canvas, cssScale); - CustomStyle.setProp('transformOrigin' , canvas, '0% 0%'); - var printContainer = document.getElementById('printContainer'); - var canvasWrapper = document.createElement('div'); - canvasWrapper.style.width = viewport.width + 'pt'; - canvasWrapper.style.height = viewport.height + 'pt'; - canvasWrapper.appendChild(canvas); - printContainer.appendChild(canvasWrapper); - - canvas.mozPrintCallback = function(obj) { - var ctx = obj.context; - - ctx.save(); - ctx.fillStyle = 'rgb(255, 255, 255)'; - ctx.fillRect(0, 0, canvas.width, canvas.height); - ctx.restore(); - // Used by the mozCurrentTransform polyfill in src/display/canvas.js. - ctx._transformMatrix = - [PRINT_OUTPUT_SCALE, 0, 0, PRINT_OUTPUT_SCALE, 0, 0]; - ctx.scale(PRINT_OUTPUT_SCALE, PRINT_OUTPUT_SCALE); - - var renderContext = { - canvasContext: ctx, - viewport: viewport, - intent: 'print' - }; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFSidebar = exports.SidebarView = undefined; - pdfPage.render(renderContext).promise.then(function() { - // Tell the printEngine that rendering this canvas/page has finished. - obj.done(); - }, function(error) { - console.error(error); - // Tell the printEngine that rendering this canvas/page has failed. - // This will make the print proces stop. - if ('abort' in obj) { - obj.abort(); - } else { - obj.done(); - } - }); - }; - }, - }; +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - return PDFPageView; -})(); +var _ui_utils = __webpack_require__(0); +var _pdf_rendering_queue = __webpack_require__(3); -/** - * @typedef {Object} TextLayerBuilderOptions - * @property {HTMLDivElement} textLayerDiv - The text layer container. - * @property {number} pageIndex - The page index. - * @property {PageViewport} viewport - The viewport of the text layer. - * @property {PDFFindController} findController - */ +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -/** - * TextLayerBuilder provides text-selection functionality for the PDF. - * It does this by creating overlay divs over the PDF 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. - * @class - */ -var TextLayerBuilder = (function TextLayerBuilderClosure() { - function TextLayerBuilder(options) { - this.textLayerDiv = options.textLayerDiv; - this.renderingDone = false; - this.divContentDone = false; - this.pageIdx = options.pageIndex; - this.pageNumber = this.pageIdx + 1; - this.matches = []; - this.viewport = options.viewport; - this.textDivs = []; - this.findController = options.findController || null; - this.textLayerRenderTask = null; - this._bindMouse(); - } +var UI_NOTIFICATION_CLASS = 'pdfSidebarNotification'; +var SidebarView = { + NONE: 0, + THUMBS: 1, + OUTLINE: 2, + ATTACHMENTS: 3 +}; - TextLayerBuilder.prototype = { - _finishRendering: function TextLayerBuilder_finishRendering() { - this.renderingDone = true; +var PDFSidebar = function () { + function PDFSidebar(options) { + var l10n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _ui_utils.NullL10n; - var endOfContent = document.createElement('div'); - endOfContent.className = 'endOfContent'; - this.textLayerDiv.appendChild(endOfContent); + _classCallCheck(this, PDFSidebar); + + this.isOpen = false; + this.active = SidebarView.THUMBS; + this.isInitialViewSet = false; + this.onToggled = null; + this.pdfViewer = options.pdfViewer; + this.pdfThumbnailViewer = options.pdfThumbnailViewer; + this.pdfOutlineViewer = options.pdfOutlineViewer; + this.mainContainer = options.mainContainer; + this.outerContainer = options.outerContainer; + this.eventBus = options.eventBus; + this.toggleButton = options.toggleButton; + this.thumbnailButton = options.thumbnailButton; + this.outlineButton = options.outlineButton; + this.attachmentsButton = options.attachmentsButton; + this.thumbnailView = options.thumbnailView; + this.outlineView = options.outlineView; + this.attachmentsView = options.attachmentsView; + this.disableNotification = options.disableNotification || false; + this.l10n = l10n; + this._addEventListeners(); + } + + _createClass(PDFSidebar, [{ + key: 'reset', + value: function reset() { + this.isInitialViewSet = false; + this._hideUINotification(null); + this.switchView(SidebarView.THUMBS); + this.outlineButton.disabled = false; + this.attachmentsButton.disabled = false; + } + }, { + key: 'setInitialView', + value: function setInitialView(view) { + if (this.isInitialViewSet) { + return; + } + this.isInitialViewSet = true; + if (this.isOpen && view === SidebarView.NONE) { + this._dispatchEvent(); + return; + } + var isViewPreserved = view === this.visibleView; + this.switchView(view, true); + if (isViewPreserved) { + this._dispatchEvent(); + } + } + }, { + key: 'switchView', + value: function switchView(view) { + var forceOpen = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('textlayerrendered', true, true, { - pageNumber: this.pageNumber + if (view === SidebarView.NONE) { + this.close(); + return; + } + var isViewChanged = view !== this.active; + var shouldForceRendering = false; + switch (view) { + case SidebarView.THUMBS: + this.thumbnailButton.classList.add('toggled'); + this.outlineButton.classList.remove('toggled'); + this.attachmentsButton.classList.remove('toggled'); + this.thumbnailView.classList.remove('hidden'); + this.outlineView.classList.add('hidden'); + this.attachmentsView.classList.add('hidden'); + if (this.isOpen && isViewChanged) { + this._updateThumbnailViewer(); + shouldForceRendering = true; + } + break; + case SidebarView.OUTLINE: + if (this.outlineButton.disabled) { + return; + } + this.thumbnailButton.classList.remove('toggled'); + this.outlineButton.classList.add('toggled'); + this.attachmentsButton.classList.remove('toggled'); + this.thumbnailView.classList.add('hidden'); + this.outlineView.classList.remove('hidden'); + this.attachmentsView.classList.add('hidden'); + break; + case SidebarView.ATTACHMENTS: + if (this.attachmentsButton.disabled) { + return; + } + this.thumbnailButton.classList.remove('toggled'); + this.outlineButton.classList.remove('toggled'); + this.attachmentsButton.classList.add('toggled'); + this.thumbnailView.classList.add('hidden'); + this.outlineView.classList.add('hidden'); + this.attachmentsView.classList.remove('hidden'); + break; + default: + console.error('PDFSidebar_switchView: "' + view + '" is an unsupported value.'); + return; + } + this.active = view | 0; + if (forceOpen && !this.isOpen) { + this.open(); + return; + } + if (shouldForceRendering) { + this._forceRendering(); + } + if (isViewChanged) { + this._dispatchEvent(); + } + this._hideUINotification(this.active); + } + }, { + key: 'open', + value: function open() { + if (this.isOpen) { + return; + } + this.isOpen = true; + this.toggleButton.classList.add('toggled'); + this.outerContainer.classList.add('sidebarMoving'); + this.outerContainer.classList.add('sidebarOpen'); + if (this.active === SidebarView.THUMBS) { + this._updateThumbnailViewer(); + } + this._forceRendering(); + this._dispatchEvent(); + this._hideUINotification(this.active); + } + }, { + key: 'close', + value: function close() { + if (!this.isOpen) { + return; + } + this.isOpen = false; + this.toggleButton.classList.remove('toggled'); + this.outerContainer.classList.add('sidebarMoving'); + this.outerContainer.classList.remove('sidebarOpen'); + this._forceRendering(); + this._dispatchEvent(); + } + }, { + key: 'toggle', + value: function toggle() { + if (this.isOpen) { + this.close(); + } else { + this.open(); + } + } + }, { + key: '_dispatchEvent', + value: function _dispatchEvent() { + this.eventBus.dispatch('sidebarviewchanged', { + source: this, + view: this.visibleView }); - this.textLayerDiv.dispatchEvent(event); - }, + } + }, { + key: '_forceRendering', + value: function _forceRendering() { + if (this.onToggled) { + this.onToggled(); + } else { + this.pdfViewer.forceRendering(); + this.pdfThumbnailViewer.forceRendering(); + } + } + }, { + key: '_updateThumbnailViewer', + value: function _updateThumbnailViewer() { + var pdfViewer = this.pdfViewer, + pdfThumbnailViewer = this.pdfThumbnailViewer; + + var pagesCount = pdfViewer.pagesCount; + for (var pageIndex = 0; pageIndex < pagesCount; pageIndex++) { + var pageView = pdfViewer.getPageView(pageIndex); + if (pageView && pageView.renderingState === _pdf_rendering_queue.RenderingStates.FINISHED) { + var thumbnailView = pdfThumbnailViewer.getThumbnail(pageIndex); + thumbnailView.setImage(pageView); + } + } + pdfThumbnailViewer.scrollThumbnailIntoView(pdfViewer.currentPageNumber); + } + }, { + key: '_showUINotification', + value: function _showUINotification(view) { + var _this = this; - /** - * Renders the text layer. - * @param {number} timeout (optional) if specified, the rendering waits - * for specified amount of ms. - */ - render: function TextLayerBuilder_render(timeout) { - if (!this.divContentDone || this.renderingDone) { + if (this.disableNotification) { + return; + } + this.l10n.get('toggle_sidebar_notification.title', null, 'Toggle Sidebar (document contains outline/attachments)').then(function (msg) { + _this.toggleButton.title = msg; + }); + if (!this.isOpen) { + this.toggleButton.classList.add(UI_NOTIFICATION_CLASS); + } else if (view === this.active) { return; } + switch (view) { + case SidebarView.OUTLINE: + this.outlineButton.classList.add(UI_NOTIFICATION_CLASS); + break; + case SidebarView.ATTACHMENTS: + this.attachmentsButton.classList.add(UI_NOTIFICATION_CLASS); + break; + } + } + }, { + key: '_hideUINotification', + value: function _hideUINotification(view) { + var _this2 = this; - if (this.textLayerRenderTask) { - this.textLayerRenderTask.cancel(); - this.textLayerRenderTask = null; + if (this.disableNotification) { + return; } + var removeNotification = function removeNotification(view) { + switch (view) { + case SidebarView.OUTLINE: + _this2.outlineButton.classList.remove(UI_NOTIFICATION_CLASS); + break; + case SidebarView.ATTACHMENTS: + _this2.attachmentsButton.classList.remove(UI_NOTIFICATION_CLASS); + break; + } + }; + if (!this.isOpen && view !== null) { + return; + } + this.toggleButton.classList.remove(UI_NOTIFICATION_CLASS); + if (view !== null) { + removeNotification(view); + return; + } + for (view in SidebarView) { + removeNotification(SidebarView[view]); + } + this.l10n.get('toggle_sidebar.title', null, 'Toggle Sidebar').then(function (msg) { + _this2.toggleButton.title = msg; + }); + } + }, { + key: '_addEventListeners', + value: function _addEventListeners() { + var _this3 = this; - this.textDivs = []; - var textLayerFrag = document.createDocumentFragment(); - this.textLayerRenderTask = PDFJS.renderTextLayer({ - textContent: this.textContent, - container: textLayerFrag, - viewport: this.viewport, - textDivs: this.textDivs, - timeout: timeout + this.mainContainer.addEventListener('transitionend', function (evt) { + if (evt.target === _this3.mainContainer) { + _this3.outerContainer.classList.remove('sidebarMoving'); + } }); - this.textLayerRenderTask.promise.then(function () { - this.textLayerDiv.appendChild(textLayerFrag); - this._finishRendering(); - this.updateMatches(); - }.bind(this), function (reason) { - // canceled or failed to render text layer -- skipping errors + this.thumbnailButton.addEventListener('click', function () { + _this3.switchView(SidebarView.THUMBS); }); - }, + this.outlineButton.addEventListener('click', function () { + _this3.switchView(SidebarView.OUTLINE); + }); + this.outlineButton.addEventListener('dblclick', function () { + _this3.pdfOutlineViewer.toggleOutlineTree(); + }); + this.attachmentsButton.addEventListener('click', function () { + _this3.switchView(SidebarView.ATTACHMENTS); + }); + this.eventBus.on('outlineloaded', function (evt) { + var outlineCount = evt.outlineCount; + _this3.outlineButton.disabled = !outlineCount; + if (outlineCount) { + _this3._showUINotification(SidebarView.OUTLINE); + } else if (_this3.active === SidebarView.OUTLINE) { + _this3.switchView(SidebarView.THUMBS); + } + }); + this.eventBus.on('attachmentsloaded', function (evt) { + var attachmentsCount = evt.attachmentsCount; + _this3.attachmentsButton.disabled = !attachmentsCount; + if (attachmentsCount) { + _this3._showUINotification(SidebarView.ATTACHMENTS); + } else if (_this3.active === SidebarView.ATTACHMENTS) { + _this3.switchView(SidebarView.THUMBS); + } + }); + this.eventBus.on('presentationmodechanged', function (evt) { + if (!evt.active && !evt.switchInProgress && _this3.isThumbnailViewVisible) { + _this3._updateThumbnailViewer(); + } + }); + } + }, { + key: 'visibleView', + get: function get() { + return this.isOpen ? this.active : SidebarView.NONE; + } + }, { + key: 'isThumbnailViewVisible', + get: function get() { + return this.isOpen && this.active === SidebarView.THUMBS; + } + }, { + key: 'isOutlineViewVisible', + get: function get() { + return this.isOpen && this.active === SidebarView.OUTLINE; + } + }, { + key: 'isAttachmentsViewVisible', + get: function get() { + return this.isOpen && this.active === SidebarView.ATTACHMENTS; + } + }]); - setTextContent: function TextLayerBuilder_setTextContent(textContent) { - if (this.textLayerRenderTask) { - this.textLayerRenderTask.cancel(); - this.textLayerRenderTask = null; - } - this.textContent = textContent; - this.divContentDone = true; - }, + return PDFSidebar; +}(); - convertMatches: function TextLayerBuilder_convertMatches(matches) { - var i = 0; - var iIndex = 0; - var bidiTexts = this.textContent.items; - var end = bidiTexts.length - 1; - var queryLen = (this.findController === null ? - 0 : this.findController.state.query.length); - var ret = []; +exports.SidebarView = SidebarView; +exports.PDFSidebar = PDFSidebar; - for (var m = 0, len = matches.length; m < len; m++) { - // Calculate the start position. - var matchIdx = matches[m]; +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { - // Loop over the divIdxs. - while (i !== end && matchIdx >= (iIndex + bidiTexts[i].str.length)) { - iIndex += bidiTexts[i].str.length; - i++; - } +"use strict"; - if (i === bidiTexts.length) { - console.error('Could not find a matching mapping'); - } - var match = { - begin: { - divIdx: i, - offset: matchIdx - iIndex - } - }; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFThumbnailView = undefined; - // Calculate the end position. - matchIdx += queryLen; +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - // Somewhat the same array as above, but use > instead of >= to get - // the end position right. - while (i !== end && matchIdx > (iIndex + bidiTexts[i].str.length)) { - iIndex += bidiTexts[i].str.length; - i++; - } +var _pdfjsLib = __webpack_require__(1); - match.end = { - divIdx: i, - offset: matchIdx - iIndex - }; - ret.push(match); - } +var _ui_utils = __webpack_require__(0); - return ret; - }, +var _pdf_rendering_queue = __webpack_require__(3); - renderMatches: function TextLayerBuilder_renderMatches(matches) { - // Early exit if there is nothing to render. - if (matches.length === 0) { - return; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var MAX_NUM_SCALING_STEPS = 3; +var THUMBNAIL_CANVAS_BORDER_WIDTH = 1; +var THUMBNAIL_WIDTH = 98; +var TempImageFactory = function TempImageFactoryClosure() { + var tempCanvasCache = null; + return { + getCanvas: function getCanvas(width, height) { + var tempCanvas = tempCanvasCache; + if (!tempCanvas) { + tempCanvas = document.createElement('canvas'); + tempCanvasCache = tempCanvas; + } + tempCanvas.width = width; + tempCanvas.height = height; + tempCanvas.mozOpaque = true; + var ctx = tempCanvas.getContext('2d', { alpha: false }); + ctx.save(); + ctx.fillStyle = 'rgb(255, 255, 255)'; + ctx.fillRect(0, 0, width, height); + ctx.restore(); + return tempCanvas; + }, + destroyCanvas: function destroyCanvas() { + var tempCanvas = tempCanvasCache; + if (tempCanvas) { + tempCanvas.width = 0; + tempCanvas.height = 0; } + tempCanvasCache = null; + } + }; +}(); + +var PDFThumbnailView = function () { + function PDFThumbnailView(_ref) { + var container = _ref.container, + id = _ref.id, + defaultViewport = _ref.defaultViewport, + linkService = _ref.linkService, + renderingQueue = _ref.renderingQueue, + _ref$disableCanvasToI = _ref.disableCanvasToImageConversion, + disableCanvasToImageConversion = _ref$disableCanvasToI === undefined ? false : _ref$disableCanvasToI, + _ref$l10n = _ref.l10n, + l10n = _ref$l10n === undefined ? _ui_utils.NullL10n : _ref$l10n; + + _classCallCheck(this, PDFThumbnailView); - var bidiTexts = this.textContent.items; - var textDivs = this.textDivs; - var prevEnd = null; - var pageIdx = this.pageIdx; - var isSelectedPage = (this.findController === null ? - false : (pageIdx === this.findController.selected.pageIdx)); - var selectedMatchIdx = (this.findController === null ? - -1 : this.findController.selected.matchIdx); - var highlightAll = (this.findController === null ? - false : this.findController.state.highlightAll); - var infinity = { - divIdx: -1, - offset: undefined - }; + this.id = id; + this.renderingId = 'thumbnail' + id; + this.pageLabel = null; + this.pdfPage = null; + this.rotation = 0; + this.viewport = defaultViewport; + this.pdfPageRotate = defaultViewport.rotation; + this.linkService = linkService; + this.renderingQueue = renderingQueue; + this.renderTask = null; + this.renderingState = _pdf_rendering_queue.RenderingStates.INITIAL; + this.resume = null; + this.disableCanvasToImageConversion = disableCanvasToImageConversion; + this.pageWidth = this.viewport.width; + this.pageHeight = this.viewport.height; + this.pageRatio = this.pageWidth / this.pageHeight; + this.canvasWidth = THUMBNAIL_WIDTH; + this.canvasHeight = this.canvasWidth / this.pageRatio | 0; + this.scale = this.canvasWidth / this.pageWidth; + this.l10n = l10n; + var anchor = document.createElement('a'); + anchor.href = linkService.getAnchorUrl('#page=' + id); + this.l10n.get('thumb_page_title', { page: id }, 'Page {{page}}').then(function (msg) { + anchor.title = msg; + }); + anchor.onclick = function () { + linkService.page = id; + return false; + }; + this.anchor = anchor; + var div = document.createElement('div'); + div.className = 'thumbnail'; + div.setAttribute('data-page-number', this.id); + this.div = div; + if (id === 1) { + div.classList.add('selected'); + } + var ring = document.createElement('div'); + ring.className = 'thumbnailSelectionRing'; + var borderAdjustment = 2 * THUMBNAIL_CANVAS_BORDER_WIDTH; + ring.style.width = this.canvasWidth + borderAdjustment + 'px'; + ring.style.height = this.canvasHeight + borderAdjustment + 'px'; + this.ring = ring; + div.appendChild(ring); + anchor.appendChild(div); + container.appendChild(anchor); + } - function beginText(begin, className) { - var divIdx = begin.divIdx; - textDivs[divIdx].textContent = ''; - appendTextToDiv(divIdx, 0, begin.offset, className); + _createClass(PDFThumbnailView, [{ + key: 'setPdfPage', + value: function setPdfPage(pdfPage) { + this.pdfPage = pdfPage; + this.pdfPageRotate = pdfPage.rotate; + var totalRotation = (this.rotation + this.pdfPageRotate) % 360; + this.viewport = pdfPage.getViewport(1, totalRotation); + this.reset(); + } + }, { + key: 'reset', + value: function reset() { + this.cancelRendering(); + this.pageWidth = this.viewport.width; + this.pageHeight = this.viewport.height; + this.pageRatio = this.pageWidth / this.pageHeight; + this.canvasHeight = this.canvasWidth / this.pageRatio | 0; + this.scale = this.canvasWidth / this.pageWidth; + this.div.removeAttribute('data-loaded'); + var ring = this.ring; + var childNodes = ring.childNodes; + for (var i = childNodes.length - 1; i >= 0; i--) { + ring.removeChild(childNodes[i]); + } + var borderAdjustment = 2 * THUMBNAIL_CANVAS_BORDER_WIDTH; + ring.style.width = this.canvasWidth + borderAdjustment + 'px'; + ring.style.height = this.canvasHeight + borderAdjustment + 'px'; + if (this.canvas) { + this.canvas.width = 0; + this.canvas.height = 0; + delete this.canvas; + } + if (this.image) { + this.image.removeAttribute('src'); + delete this.image; + } + } + }, { + key: 'update', + value: function update(rotation) { + if (typeof rotation !== 'undefined') { + this.rotation = rotation; + } + var totalRotation = (this.rotation + this.pdfPageRotate) % 360; + this.viewport = this.viewport.clone({ + scale: 1, + rotation: totalRotation + }); + this.reset(); + } + }, { + key: 'cancelRendering', + value: function cancelRendering() { + if (this.renderTask) { + this.renderTask.cancel(); + this.renderTask = null; } + this.renderingState = _pdf_rendering_queue.RenderingStates.INITIAL; + this.resume = null; + } + }, { + key: '_getPageDrawContext', + value: function _getPageDrawContext() { + var noCtxScale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - function appendTextToDiv(divIdx, fromOffset, toOffset, className) { - var div = textDivs[divIdx]; - var content = bidiTexts[divIdx].str.substring(fromOffset, toOffset); - var node = document.createTextNode(content); - if (className) { - var span = document.createElement('span'); - span.className = className; - span.appendChild(node); - div.appendChild(span); - return; - } - div.appendChild(node); + var canvas = document.createElement('canvas'); + this.canvas = canvas; + canvas.mozOpaque = true; + var ctx = canvas.getContext('2d', { alpha: false }); + var outputScale = (0, _ui_utils.getOutputScale)(ctx); + canvas.width = this.canvasWidth * outputScale.sx | 0; + canvas.height = this.canvasHeight * outputScale.sy | 0; + canvas.style.width = this.canvasWidth + 'px'; + canvas.style.height = this.canvasHeight + 'px'; + if (!noCtxScale && outputScale.scaled) { + ctx.scale(outputScale.sx, outputScale.sy); } + return ctx; + } + }, { + key: '_convertCanvasToImage', + value: function _convertCanvasToImage() { + var _this = this; - var i0 = selectedMatchIdx, i1 = i0 + 1; - if (highlightAll) { - i0 = 0; - i1 = matches.length; - } else if (!isSelectedPage) { - // Not highlighting all and this isn't the selected page, so do nothing. + if (!this.canvas) { return; } + if (this.renderingState !== _pdf_rendering_queue.RenderingStates.FINISHED) { + return; + } + var id = this.renderingId; + var className = 'thumbnailImage'; + if (this.disableCanvasToImageConversion) { + this.canvas.id = id; + this.canvas.className = className; + this.l10n.get('thumb_page_canvas', { page: this.pageId }, 'Thumbnail of Page {{page}}').then(function (msg) { + _this.canvas.setAttribute('aria-label', msg); + }); + this.div.setAttribute('data-loaded', true); + this.ring.appendChild(this.canvas); + return; + } + var image = document.createElement('img'); + image.id = id; + image.className = className; + this.l10n.get('thumb_page_canvas', { page: this.pageId }, 'Thumbnail of Page {{page}}').then(function (msg) { + image.setAttribute('aria-label', msg); + }); + image.style.width = this.canvasWidth + 'px'; + image.style.height = this.canvasHeight + 'px'; + image.src = this.canvas.toDataURL(); + this.image = image; + this.div.setAttribute('data-loaded', true); + this.ring.appendChild(image); + this.canvas.width = 0; + this.canvas.height = 0; + delete this.canvas; + } + }, { + key: 'draw', + value: function draw() { + var _this2 = this; - for (var i = i0; i < i1; i++) { - var match = matches[i]; - var begin = match.begin; - var end = match.end; - var isSelected = (isSelectedPage && i === selectedMatchIdx); - var highlightSuffix = (isSelected ? ' selected' : ''); - - if (this.findController) { - this.findController.updateMatchPosition(pageIdx, i, textDivs, - begin.divIdx, end.divIdx); + if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) { + console.error('Must be in new state before drawing'); + return Promise.resolve(undefined); + } + this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING; + var renderCapability = (0, _pdfjsLib.createPromiseCapability)(); + var finishRenderTask = function finishRenderTask(error) { + if (renderTask === _this2.renderTask) { + _this2.renderTask = null; } - - // Match inside new div. - if (!prevEnd || begin.divIdx !== prevEnd.divIdx) { - // If there was a previous div, then add the text at the end. - if (prevEnd !== null) { - appendTextToDiv(prevEnd.divIdx, prevEnd.offset, infinity.offset); - } - // Clear the divs and set the content until the starting point. - beginText(begin); - } else { - appendTextToDiv(prevEnd.divIdx, prevEnd.offset, begin.offset); + if (error === 'cancelled' || error instanceof _pdfjsLib.RenderingCancelledException) { + renderCapability.resolve(undefined); + return; } - - if (begin.divIdx === end.divIdx) { - appendTextToDiv(begin.divIdx, begin.offset, end.offset, - 'highlight' + highlightSuffix); + _this2.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; + _this2._convertCanvasToImage(); + if (!error) { + renderCapability.resolve(undefined); } else { - appendTextToDiv(begin.divIdx, begin.offset, infinity.offset, - 'highlight begin' + highlightSuffix); - for (var n0 = begin.divIdx + 1, n1 = end.divIdx; n0 < n1; n0++) { - textDivs[n0].className = 'highlight middle' + highlightSuffix; - } - beginText(end, 'highlight end' + highlightSuffix); + renderCapability.reject(error); } - prevEnd = end; + }; + var ctx = this._getPageDrawContext(); + var drawViewport = this.viewport.clone({ scale: this.scale }); + var renderContinueCallback = function renderContinueCallback(cont) { + if (!_this2.renderingQueue.isHighestPriority(_this2)) { + _this2.renderingState = _pdf_rendering_queue.RenderingStates.PAUSED; + _this2.resume = function () { + _this2.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING; + cont(); + }; + return; + } + cont(); + }; + var renderContext = { + canvasContext: ctx, + viewport: drawViewport + }; + var renderTask = this.renderTask = this.pdfPage.render(renderContext); + renderTask.onContinue = renderContinueCallback; + renderTask.promise.then(function () { + finishRenderTask(null); + }, function (error) { + finishRenderTask(error); + }); + return renderCapability.promise; + } + }, { + key: 'setImage', + value: function setImage(pageView) { + if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) { + return; } - - if (prevEnd) { - appendTextToDiv(prevEnd.divIdx, prevEnd.offset, infinity.offset); + var img = pageView.canvas; + if (!img) { + return; } - }, + if (!this.pdfPage) { + this.setPdfPage(pageView.pdfPage); + } + this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; + var ctx = this._getPageDrawContext(true); + var canvas = ctx.canvas; + if (img.width <= 2 * canvas.width) { + ctx.drawImage(img, 0, 0, img.width, img.height, 0, 0, canvas.width, canvas.height); + this._convertCanvasToImage(); + return; + } + var reducedWidth = canvas.width << MAX_NUM_SCALING_STEPS; + var reducedHeight = canvas.height << MAX_NUM_SCALING_STEPS; + var reducedImage = TempImageFactory.getCanvas(reducedWidth, reducedHeight); + var reducedImageCtx = reducedImage.getContext('2d'); + while (reducedWidth > img.width || reducedHeight > img.height) { + reducedWidth >>= 1; + reducedHeight >>= 1; + } + reducedImageCtx.drawImage(img, 0, 0, img.width, img.height, 0, 0, reducedWidth, reducedHeight); + while (reducedWidth > 2 * canvas.width) { + reducedImageCtx.drawImage(reducedImage, 0, 0, reducedWidth, reducedHeight, 0, 0, reducedWidth >> 1, reducedHeight >> 1); + reducedWidth >>= 1; + reducedHeight >>= 1; + } + ctx.drawImage(reducedImage, 0, 0, reducedWidth, reducedHeight, 0, 0, canvas.width, canvas.height); + this._convertCanvasToImage(); + } + }, { + key: 'setPageLabel', + value: function setPageLabel(label) { + var _this3 = this; - updateMatches: function TextLayerBuilder_updateMatches() { - // Only show matches when all rendering is done. - if (!this.renderingDone) { + this.pageLabel = typeof label === 'string' ? label : null; + this.l10n.get('thumb_page_title', { page: this.pageId }, 'Page {{page}}').then(function (msg) { + _this3.anchor.title = msg; + }); + if (this.renderingState !== _pdf_rendering_queue.RenderingStates.FINISHED) { return; } + this.l10n.get('thumb_page_canvas', { page: this.pageId }, 'Thumbnail of Page {{page}}').then(function (ariaLabel) { + if (_this3.image) { + _this3.image.setAttribute('aria-label', ariaLabel); + } else if (_this3.disableCanvasToImageConversion && _this3.canvas) { + _this3.canvas.setAttribute('aria-label', ariaLabel); + } + }); + } + }, { + key: 'pageId', + get: function get() { + return this.pageLabel !== null ? this.pageLabel : this.id; + } + }], [{ + key: 'cleanup', + value: function cleanup() { + TempImageFactory.destroyCanvas(); + } + }]); - // Clear all matches. - var matches = this.matches; - var textDivs = this.textDivs; - var bidiTexts = this.textContent.items; - var clearedUntilDivIdx = -1; + return PDFThumbnailView; +}(); - // Clear all current matches. - for (var i = 0, len = matches.length; i < len; i++) { - var match = matches[i]; - var begin = Math.max(clearedUntilDivIdx, match.begin.divIdx); - for (var n = begin, end = match.end.divIdx; n <= end; n++) { - var div = textDivs[n]; - div.textContent = bidiTexts[n].str; - div.className = ''; +exports.PDFThumbnailView = PDFThumbnailView; + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFThumbnailViewer = undefined; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _ui_utils = __webpack_require__(0); + +var _pdf_thumbnail_view = __webpack_require__(25); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var THUMBNAIL_SCROLL_MARGIN = -19; + +var PDFThumbnailViewer = function () { + function PDFThumbnailViewer(_ref) { + var container = _ref.container, + linkService = _ref.linkService, + renderingQueue = _ref.renderingQueue, + _ref$l10n = _ref.l10n, + l10n = _ref$l10n === undefined ? _ui_utils.NullL10n : _ref$l10n; + + _classCallCheck(this, PDFThumbnailViewer); + + this.container = container; + this.linkService = linkService; + this.renderingQueue = renderingQueue; + this.l10n = l10n; + this.scroll = (0, _ui_utils.watchScroll)(this.container, this._scrollUpdated.bind(this)); + this._resetView(); + } + + _createClass(PDFThumbnailViewer, [{ + key: '_scrollUpdated', + value: function _scrollUpdated() { + this.renderingQueue.renderHighestPriority(); + } + }, { + key: 'getThumbnail', + value: function getThumbnail(index) { + return this._thumbnails[index]; + } + }, { + key: '_getVisibleThumbs', + value: function _getVisibleThumbs() { + return (0, _ui_utils.getVisibleElements)(this.container, this._thumbnails); + } + }, { + key: 'scrollThumbnailIntoView', + value: function scrollThumbnailIntoView(page) { + var selected = document.querySelector('.thumbnail.selected'); + if (selected) { + selected.classList.remove('selected'); + } + var thumbnail = document.querySelector('div.thumbnail[data-page-number="' + page + '"]'); + if (thumbnail) { + thumbnail.classList.add('selected'); + } + var visibleThumbs = this._getVisibleThumbs(); + var numVisibleThumbs = visibleThumbs.views.length; + if (numVisibleThumbs > 0) { + var first = visibleThumbs.first.id; + var last = numVisibleThumbs > 1 ? visibleThumbs.last.id : first; + if (page <= first || page >= last) { + (0, _ui_utils.scrollIntoView)(thumbnail, { top: THUMBNAIL_SCROLL_MARGIN }); } - clearedUntilDivIdx = match.end.divIdx + 1; } + } + }, { + key: 'cleanup', + value: function cleanup() { + _pdf_thumbnail_view.PDFThumbnailView.cleanup(); + } + }, { + key: '_resetView', + value: function _resetView() { + this._thumbnails = []; + this._pageLabels = null; + this._pagesRotation = 0; + this._pagesRequests = []; + this.container.textContent = ''; + } + }, { + key: 'setDocument', + value: function setDocument(pdfDocument) { + var _this = this; - if (this.findController === null || !this.findController.active) { + if (this.pdfDocument) { + this._cancelRendering(); + this._resetView(); + } + this.pdfDocument = pdfDocument; + if (!pdfDocument) { return; } - - // Convert the matches on the page controller into the match format - // used for the textLayer. - this.matches = this.convertMatches(this.findController === null ? - [] : (this.findController.pageMatches[this.pageIdx] || [])); - this.renderMatches(this.matches); - }, - - /** - * Fixes text selection: adds additional div where mouse was clicked. - * This reduces flickering of the content if mouse slowly dragged down/up. - * @private - */ - _bindMouse: function TextLayerBuilder_bindMouse() { - var div = this.textLayerDiv; - div.addEventListener('mousedown', function (e) { - var end = div.querySelector('.endOfContent'); - if (!end) { - return; - } - // On non-Firefox browsers, the selection will feel better if the height - // of the endOfContent div will be adjusted to start at mouse click - // location -- this will avoid flickering when selections moves up. - // However it does not work when selection started on empty space. - var adjustTop = e.target !== div; - adjustTop = adjustTop && window.getComputedStyle(end). - getPropertyValue('-moz-user-select') !== 'none'; - if (adjustTop) { - var divBounds = div.getBoundingClientRect(); - var r = Math.max(0, (e.pageY - divBounds.top) / divBounds.height); - end.style.top = (r * 100).toFixed(2) + '%'; + pdfDocument.getPage(1).then(function (firstPage) { + var pagesCount = pdfDocument.numPages; + var viewport = firstPage.getViewport(1.0); + for (var pageNum = 1; pageNum <= pagesCount; ++pageNum) { + var thumbnail = new _pdf_thumbnail_view.PDFThumbnailView({ + container: _this.container, + id: pageNum, + defaultViewport: viewport.clone(), + linkService: _this.linkService, + renderingQueue: _this.renderingQueue, + disableCanvasToImageConversion: false, + l10n: _this.l10n + }); + _this._thumbnails.push(thumbnail); } - end.classList.add('active'); + }).catch(function (reason) { + console.error('Unable to initialize thumbnail viewer', reason); }); - div.addEventListener('mouseup', function (e) { - var end = div.querySelector('.endOfContent'); - if (!end) { - return; + } + }, { + key: '_cancelRendering', + value: function _cancelRendering() { + for (var i = 0, ii = this._thumbnails.length; i < ii; i++) { + if (this._thumbnails[i]) { + this._thumbnails[i].cancelRendering(); } - end.style.top = ''; - end.classList.remove('active'); + } + } + }, { + key: 'setPageLabels', + value: function setPageLabels(labels) { + if (!this.pdfDocument) { + return; + } + if (!labels) { + this._pageLabels = null; + } else if (!(labels instanceof Array && this.pdfDocument.numPages === labels.length)) { + this._pageLabels = null; + console.error('PDFThumbnailViewer_setPageLabels: Invalid page labels.'); + } else { + this._pageLabels = labels; + } + for (var i = 0, ii = this._thumbnails.length; i < ii; i++) { + var label = this._pageLabels && this._pageLabels[i]; + this._thumbnails[i].setPageLabel(label); + } + } + }, { + key: '_ensurePdfPageLoaded', + value: function _ensurePdfPageLoaded(thumbView) { + var _this2 = this; + + if (thumbView.pdfPage) { + return Promise.resolve(thumbView.pdfPage); + } + var pageNumber = thumbView.id; + if (this._pagesRequests[pageNumber]) { + return this._pagesRequests[pageNumber]; + } + var promise = this.pdfDocument.getPage(pageNumber).then(function (pdfPage) { + thumbView.setPdfPage(pdfPage); + _this2._pagesRequests[pageNumber] = null; + return pdfPage; + }).catch(function (reason) { + console.error('Unable to get page for thumb view', reason); + _this2._pagesRequests[pageNumber] = null; }); - }, - }; - return TextLayerBuilder; -})(); + this._pagesRequests[pageNumber] = promise; + return promise; + } + }, { + key: 'forceRendering', + value: function forceRendering() { + var _this3 = this; -/** - * @constructor - * @implements IPDFTextLayerFactory - */ -function DefaultTextLayerFactory() {} -DefaultTextLayerFactory.prototype = { - /** - * @param {HTMLDivElement} textLayerDiv - * @param {number} pageIndex - * @param {PageViewport} viewport - * @returns {TextLayerBuilder} - */ - createTextLayerBuilder: function (textLayerDiv, pageIndex, viewport) { - return new TextLayerBuilder({ - textLayerDiv: textLayerDiv, - pageIndex: pageIndex, - viewport: viewport - }); - } -}; + var visibleThumbs = this._getVisibleThumbs(); + var thumbView = this.renderingQueue.getHighestPriority(visibleThumbs, this._thumbnails, this.scroll.down); + if (thumbView) { + this._ensurePdfPageLoaded(thumbView).then(function () { + _this3.renderingQueue.renderView(thumbView); + }); + return true; + } + return false; + } + }, { + key: 'pagesRotation', + get: function get() { + return this._pagesRotation; + }, + set: function set(rotation) { + if (!(typeof rotation === 'number' && rotation % 90 === 0)) { + throw new Error('Invalid thumbnails rotation angle.'); + } + if (!this.pdfDocument) { + return; + } + this._pagesRotation = rotation; + for (var i = 0, ii = this._thumbnails.length; i < ii; i++) { + this._thumbnails[i].update(rotation); + } + } + }]); + return PDFThumbnailViewer; +}(); -/** - * @typedef {Object} AnnotationLayerBuilderOptions - * @property {HTMLDivElement} pageDiv - * @property {PDFPage} pdfPage - * @property {IPDFLinkService} linkService - */ +exports.PDFThumbnailViewer = PDFThumbnailViewer; -/** - * @class - */ -var AnnotationLayerBuilder = (function AnnotationLayerBuilderClosure() { - /** - * @param {AnnotationLayerBuilderOptions} options - * @constructs AnnotationLayerBuilder - */ - function AnnotationLayerBuilder(options) { - this.pageDiv = options.pageDiv; - this.pdfPage = options.pdfPage; - this.linkService = options.linkService; +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { - this.div = null; - } +"use strict"; - AnnotationLayerBuilder.prototype = - /** @lends AnnotationLayerBuilder.prototype */ { - /** - * @param {PageViewport} viewport - * @param {string} intent (default value is 'display') - */ - render: function AnnotationLayerBuilder_render(viewport, intent) { - var self = this; - var parameters = { - intent: (intent === undefined ? 'display' : intent), - }; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFViewer = exports.PresentationModeState = undefined; - this.pdfPage.getAnnotations(parameters).then(function (annotations) { - viewport = viewport.clone({ dontFlip: true }); - parameters = { - viewport: viewport, - div: self.div, - annotations: annotations, - page: self.pdfPage, - linkService: self.linkService - }; +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - if (self.div) { - // If an annotationLayer already exists, refresh its children's - // transformation matrices. - PDFJS.AnnotationLayer.update(parameters); - } else { - // Create an annotation layer div and render the annotations - // if there is at least one annotation. - if (annotations.length === 0) { - return; - } +var _pdfjsLib = __webpack_require__(1); - self.div = document.createElement('div'); - self.div.className = 'annotationLayer'; - self.pageDiv.appendChild(self.div); - parameters.div = self.div; +var _ui_utils = __webpack_require__(0); - PDFJS.AnnotationLayer.render(parameters); - if (typeof mozL10n !== 'undefined') { - mozL10n.translate(self.div); - } - } - }); - }, +var _pdf_rendering_queue = __webpack_require__(3); - hide: function AnnotationLayerBuilder_hide() { - if (!this.div) { - return; - } - this.div.setAttribute('hidden', 'true'); - } - }; +var _annotation_layer_builder = __webpack_require__(11); - return AnnotationLayerBuilder; -})(); +var _dom_events = __webpack_require__(2); -/** - * @constructor - * @implements IPDFAnnotationLayerFactory - */ -function DefaultAnnotationLayerFactory() {} -DefaultAnnotationLayerFactory.prototype = { - /** - * @param {HTMLDivElement} pageDiv - * @param {PDFPage} pdfPage - * @returns {AnnotationLayerBuilder} - */ - createAnnotationLayerBuilder: function (pageDiv, pdfPage) { - return new AnnotationLayerBuilder({ - pageDiv: pageDiv, - pdfPage: pdfPage, - linkService: new SimpleLinkService(), - }); - } -}; +var _pdf_page_view = __webpack_require__(22); +var _pdf_link_service = __webpack_require__(5); -/** - * @typedef {Object} PDFViewerOptions - * @property {HTMLDivElement} container - The container for the viewer element. - * @property {HTMLDivElement} viewer - (optional) The viewer element. - * @property {IPDFLinkService} linkService - The navigation/linking service. - * @property {PDFRenderingQueue} renderingQueue - (optional) The rendering - * queue object. - * @property {boolean} removePageBorders - (optional) Removes the border shadow - * around the pages. The default is false. - */ +var _text_layer_builder = __webpack_require__(30); -/** - * Simple viewer control to display PDF content/pages. - * @class - * @implements {IRenderableView} - */ -var PDFViewer = (function pdfViewer() { - function PDFPageViewBuffer(size) { - var data = []; - this.push = function cachePush(view) { - var i = data.indexOf(view); - if (i >= 0) { - data.splice(i, 1); - } - data.push(view); - if (data.length > size) { - data.shift().destroy(); - } - }; - this.resize = function (newSize) { - size = newSize; - while (data.length > size) { - data.shift().destroy(); - } - }; - } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - function isSameScale(oldScale, newScale) { - if (newScale === oldScale) { - return true; +var PresentationModeState = { + UNKNOWN: 0, + NORMAL: 1, + CHANGING: 2, + FULLSCREEN: 3 +}; +var DEFAULT_CACHE_SIZE = 10; +function PDFPageViewBuffer(size) { + var data = []; + this.push = function cachePush(view) { + var i = data.indexOf(view); + if (i >= 0) { + data.splice(i, 1); } - if (Math.abs(newScale - oldScale) < 1e-15) { - // Prevent unnecessary re-rendering of all pages when the scale - // changes only because of limited numerical precision. - return true; + data.push(view); + if (data.length > size) { + data.shift().destroy(); } - return false; + }; + this.resize = function (newSize) { + size = newSize; + while (data.length > size) { + data.shift().destroy(); + } + }; +} +function isSameScale(oldScale, newScale) { + if (newScale === oldScale) { + return true; } + if (Math.abs(newScale - oldScale) < 1e-15) { + return true; + } + return false; +} +function isPortraitOrientation(size) { + return size.width <= size.height; +} - /** - * @constructs PDFViewer - * @param {PDFViewerOptions} options - */ +var PDFViewer = function () { function PDFViewer(options) { + _classCallCheck(this, PDFViewer); + this.container = options.container; this.viewer = options.viewer || options.container.firstElementChild; - this.linkService = options.linkService || new SimpleLinkService(); + this.eventBus = options.eventBus || (0, _dom_events.getGlobalEventBus)(); + this.linkService = options.linkService || new _pdf_link_service.SimpleLinkService(); + this.downloadManager = options.downloadManager || null; this.removePageBorders = options.removePageBorders || false; - + this.enhanceTextSelection = options.enhanceTextSelection || false; + this.renderInteractiveForms = options.renderInteractiveForms || false; + this.enablePrintAutoRotate = options.enablePrintAutoRotate || false; + this.renderer = options.renderer || _ui_utils.RendererType.CANVAS; + this.l10n = options.l10n || _ui_utils.NullL10n; this.defaultRenderingQueue = !options.renderingQueue; if (this.defaultRenderingQueue) { - // Custom rendering queue is not specified, using default one - this.renderingQueue = new PDFRenderingQueue(); + this.renderingQueue = new _pdf_rendering_queue.PDFRenderingQueue(); this.renderingQueue.setViewer(this); } else { this.renderingQueue = options.renderingQueue; } - - this.scroll = watchScroll(this.container, this._scrollUpdate.bind(this)); - this.updateInProgress = false; + this.scroll = (0, _ui_utils.watchScroll)(this.container, this._scrollUpdate.bind(this)); this.presentationModeState = PresentationModeState.UNKNOWN; this._resetView(); - if (this.removePageBorders) { this.viewer.classList.add('removePageBorders'); } } - PDFViewer.prototype = /** @lends PDFViewer.prototype */{ - get pagesCount() { - return this._pages.length; - }, - - getPageView: function (index) { + _createClass(PDFViewer, [{ + key: 'getPageView', + value: function getPageView(index) { return this._pages[index]; - }, - - get currentPageNumber() { - return this._currentPageNumber; - }, + } + }, { + key: '_setCurrentPageNumber', + value: function _setCurrentPageNumber(val) { + var resetCurrentPageView = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - set currentPageNumber(val) { - if (!this.pdfDocument) { - this._currentPageNumber = val; + if (this._currentPageNumber === val) { + if (resetCurrentPageView) { + this._resetCurrentPageView(); + } return; } - - var event = document.createEvent('UIEvents'); - event.initUIEvent('pagechange', true, true, window, 0); - event.updateInProgress = this.updateInProgress; - if (!(0 < val && val <= this.pagesCount)) { - event.pageNumber = this._currentPageNumber; - event.previousPageNumber = val; - this.container.dispatchEvent(event); + console.error('PDFViewer._setCurrentPageNumber: "' + val + '" is out of bounds.'); return; } - - event.previousPageNumber = this._currentPageNumber; + var arg = { + source: this, + pageNumber: val, + pageLabel: this._pageLabels && this._pageLabels[val - 1] + }; this._currentPageNumber = val; - event.pageNumber = val; - this.container.dispatchEvent(event); - - // Check if the caller is `PDFViewer_update`, to avoid breaking scrolling. - if (this.updateInProgress) { - return; - } - this.scrollPageIntoView(val); - }, - - /** - * @returns {number} - */ - get currentScale() { - return this._currentScale !== UNKNOWN_SCALE ? this._currentScale : - DEFAULT_SCALE; - }, - - /** - * @param {number} val - Scale of the pages in percents. - */ - set currentScale(val) { - if (isNaN(val)) { - throw new Error('Invalid numeric scale'); - } - if (!this.pdfDocument) { - this._currentScale = val; - this._currentScaleValue = val !== UNKNOWN_SCALE ? val.toString() : null; - return; - } - this._setScale(val, false); - }, - - /** - * @returns {string} - */ - get currentScaleValue() { - return this._currentScaleValue; - }, - - /** - * @param val - The scale of the pages (in percent or predefined value). - */ - set currentScaleValue(val) { - if (!this.pdfDocument) { - this._currentScale = isNaN(val) ? UNKNOWN_SCALE : val; - this._currentScaleValue = val; - return; + this.eventBus.dispatch('pagechanging', arg); + this.eventBus.dispatch('pagechange', arg); + if (resetCurrentPageView) { + this._resetCurrentPageView(); } - this._setScale(val, false); - }, - - /** - * @returns {number} - */ - get pagesRotation() { - return this._pagesRotation; - }, - - /** - * @param {number} rotation - The rotation of the pages (0, 90, 180, 270). - */ - set pagesRotation(rotation) { - this._pagesRotation = rotation; - - for (var i = 0, l = this._pages.length; i < l; i++) { - var pageView = this._pages[i]; - pageView.update(pageView.scale, rotation); - } - - this._setScale(this._currentScaleValue, true); - - if (this.defaultRenderingQueue) { - this.update(); - } - }, + } + }, { + key: 'setDocument', + value: function setDocument(pdfDocument) { + var _this = this; - /** - * @param pdfDocument {PDFDocument} - */ - setDocument: function (pdfDocument) { if (this.pdfDocument) { + this._cancelRendering(); this._resetView(); } - this.pdfDocument = pdfDocument; if (!pdfDocument) { return; } - var pagesCount = pdfDocument.numPages; - var self = this; - - var resolvePagesPromise; - var pagesPromise = new Promise(function (resolve) { - resolvePagesPromise = resolve; - }); - this.pagesPromise = pagesPromise; - pagesPromise.then(function () { - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('pagesloaded', true, true, { + var pagesCapability = (0, _pdfjsLib.createPromiseCapability)(); + this.pagesPromise = pagesCapability.promise; + pagesCapability.promise.then(function () { + _this._pageViewsReady = true; + _this.eventBus.dispatch('pagesloaded', { + source: _this, pagesCount: pagesCount }); - self.container.dispatchEvent(event); }); - var isOnePageRenderedResolved = false; - var resolveOnePageRendered = null; - var onePageRendered = new Promise(function (resolve) { - resolveOnePageRendered = resolve; - }); - this.onePageRendered = onePageRendered; - - var bindOnAfterAndBeforeDraw = function (pageView) { - pageView.onBeforeDraw = function pdfViewLoadOnBeforeDraw() { - // Add the page to the buffer at the start of drawing. That way it can - // be evicted from the buffer and destroyed even if we pause its - // rendering. - self._buffer.push(this); + var onePageRenderedCapability = (0, _pdfjsLib.createPromiseCapability)(); + this.onePageRendered = onePageRenderedCapability.promise; + var bindOnAfterAndBeforeDraw = function bindOnAfterAndBeforeDraw(pageView) { + pageView.onBeforeDraw = function () { + _this._buffer.push(pageView); }; - // when page is painted, using the image as thumbnail base - pageView.onAfterDraw = function pdfViewLoadOnAfterDraw() { + pageView.onAfterDraw = function () { if (!isOnePageRenderedResolved) { isOnePageRenderedResolved = true; - resolveOnePageRendered(); + onePageRenderedCapability.resolve(); } }; }; - var firstPagePromise = pdfDocument.getPage(1); this.firstPagePromise = firstPagePromise; - - // Fetch a single page so we can get a viewport that will be the default - // viewport for all pages - return firstPagePromise.then(function(pdfPage) { - var scale = this.currentScale; - var viewport = pdfPage.getViewport(scale * CSS_UNITS); + firstPagePromise.then(function (pdfPage) { + var scale = _this.currentScale; + var viewport = pdfPage.getViewport(scale * _ui_utils.CSS_UNITS); for (var pageNum = 1; pageNum <= pagesCount; ++pageNum) { var textLayerFactory = null; - if (!PDFJS.disableTextLayer) { - textLayerFactory = this; + if (!_pdfjsLib.PDFJS.disableTextLayer) { + textLayerFactory = _this; } - var pageView = new PDFPageView({ - container: this.viewer, + var pageView = new _pdf_page_view.PDFPageView({ + container: _this.viewer, + eventBus: _this.eventBus, id: pageNum, scale: scale, defaultViewport: viewport.clone(), - renderingQueue: this.renderingQueue, + renderingQueue: _this.renderingQueue, textLayerFactory: textLayerFactory, - annotationLayerFactory: this + annotationLayerFactory: _this, + enhanceTextSelection: _this.enhanceTextSelection, + renderInteractiveForms: _this.renderInteractiveForms, + renderer: _this.renderer, + l10n: _this.l10n }); bindOnAfterAndBeforeDraw(pageView); - this._pages.push(pageView); - } - - var linkService = this.linkService; - - // Fetch all the pages since the viewport is needed before printing - // starts to create the correct size canvas. Wait until one page is - // rendered so we don't tie up too many resources early on. - onePageRendered.then(function () { - if (!PDFJS.disableAutoFetch) { - var getPagesLeft = pagesCount; - for (var pageNum = 1; pageNum <= pagesCount; ++pageNum) { - pdfDocument.getPage(pageNum).then(function (pageNum, pdfPage) { - var pageView = self._pages[pageNum - 1]; - if (!pageView.pdfPage) { - pageView.setPdfPage(pdfPage); - } - linkService.cachePageRef(pageNum, pdfPage.ref); - getPagesLeft--; - if (!getPagesLeft) { - resolvePagesPromise(); - } - }.bind(null, pageNum)); - } - } else { - // XXX: Printing is semi-broken with auto fetch disabled. - resolvePagesPromise(); + _this._pages.push(pageView); + } + onePageRenderedCapability.promise.then(function () { + if (_pdfjsLib.PDFJS.disableAutoFetch) { + pagesCapability.resolve(); + return; } - }); + var getPagesLeft = pagesCount; - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('pagesinit', true, true, null); - self.container.dispatchEvent(event); + var _loop = function _loop(_pageNum) { + pdfDocument.getPage(_pageNum).then(function (pdfPage) { + var pageView = _this._pages[_pageNum - 1]; + if (!pageView.pdfPage) { + pageView.setPdfPage(pdfPage); + } + _this.linkService.cachePageRef(_pageNum, pdfPage.ref); + if (--getPagesLeft === 0) { + pagesCapability.resolve(); + } + }, function (reason) { + console.error('Unable to get page ' + _pageNum + ' to initialize viewer', reason); + if (--getPagesLeft === 0) { + pagesCapability.resolve(); + } + }); + }; - if (this.defaultRenderingQueue) { - this.update(); + for (var _pageNum = 1; _pageNum <= pagesCount; ++_pageNum) { + _loop(_pageNum); + } + }); + _this.eventBus.dispatch('pagesinit', { source: _this }); + if (_this.defaultRenderingQueue) { + _this.update(); } - - if (this.findController) { - this.findController.resolveFirstPage(); + if (_this.findController) { + _this.findController.resolveFirstPage(); } - }.bind(this)); - }, - - _resetView: function () { + }).catch(function (reason) { + console.error('Unable to initialize viewer', reason); + }); + } + }, { + key: 'setPageLabels', + value: function setPageLabels(labels) { + if (!this.pdfDocument) { + return; + } + if (!labels) { + this._pageLabels = null; + } else if (!(labels instanceof Array && this.pdfDocument.numPages === labels.length)) { + this._pageLabels = null; + console.error('PDFViewer.setPageLabels: Invalid page labels.'); + } else { + this._pageLabels = labels; + } + for (var i = 0, ii = this._pages.length; i < ii; i++) { + var pageView = this._pages[i]; + var label = this._pageLabels && this._pageLabels[i]; + pageView.setPageLabel(label); + } + } + }, { + key: '_resetView', + value: function _resetView() { this._pages = []; this._currentPageNumber = 1; - this._currentScale = UNKNOWN_SCALE; + this._currentScale = _ui_utils.UNKNOWN_SCALE; this._currentScaleValue = null; + this._pageLabels = null; this._buffer = new PDFPageViewBuffer(DEFAULT_CACHE_SIZE); this._location = null; this._pagesRotation = 0; this._pagesRequests = []; - - var container = this.viewer; - while (container.hasChildNodes()) { - container.removeChild(container.lastChild); - } - }, - - _scrollUpdate: function PDFViewer_scrollUpdate() { + this._pageViewsReady = false; + this.viewer.textContent = ''; + } + }, { + key: '_scrollUpdate', + value: function _scrollUpdate() { if (this.pagesCount === 0) { return; } this.update(); - for (var i = 0, ii = this._pages.length; i < ii; i++) { - this._pages[i].updatePosition(); - } - }, - - _setScaleDispatchEvent: function pdfViewer_setScaleDispatchEvent( - newScale, newValue, preset) { - var event = document.createEvent('UIEvents'); - event.initUIEvent('scalechange', true, true, window, 0); - event.scale = newScale; - if (preset) { - event.presetValue = newValue; - } - this.container.dispatchEvent(event); - }, + } + }, { + key: '_setScaleDispatchEvent', + value: function _setScaleDispatchEvent(newScale, newValue) { + var preset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - _setScaleUpdatePages: function pdfViewer_setScaleUpdatePages( - newScale, newValue, noScroll, preset) { - this._currentScaleValue = newValue; + var arg = { + source: this, + scale: newScale, + presetValue: preset ? newValue : undefined + }; + this.eventBus.dispatch('scalechanging', arg); + this.eventBus.dispatch('scalechange', arg); + } + }, { + key: '_setScaleUpdatePages', + value: function _setScaleUpdatePages(newScale, newValue) { + var noScroll = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var preset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + this._currentScaleValue = newValue.toString(); if (isSameScale(this._currentScale, newScale)) { if (preset) { this._setScaleDispatchEvent(newScale, newValue, true); } return; } - for (var i = 0, ii = this._pages.length; i < ii; i++) { this._pages[i].update(newScale); } this._currentScale = newScale; - if (!noScroll) { - var page = this._currentPageNumber, dest; - if (this._location && !IGNORE_CURRENT_POSITION_ON_ZOOM && - !(this.isInPresentationMode || this.isChangingPresentationMode)) { + var page = this._currentPageNumber, + dest = void 0; + if (this._location && !_pdfjsLib.PDFJS.ignoreCurrentPositionOnZoom && !(this.isInPresentationMode || this.isChangingPresentationMode)) { page = this._location.pageNumber; - dest = [null, { name: 'XYZ' }, this._location.left, - this._location.top, null]; + dest = [null, { name: 'XYZ' }, this._location.left, this._location.top, null]; } - this.scrollPageIntoView(page, dest); + this.scrollPageIntoView({ + pageNumber: page, + destArray: dest, + allowNegativeOffset: true + }); } - this._setScaleDispatchEvent(newScale, newValue, preset); - if (this.defaultRenderingQueue) { this.update(); } - }, + } + }, { + key: '_setScale', + value: function _setScale(value) { + var noScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - _setScale: function pdfViewer_setScale(value, noScroll) { var scale = parseFloat(value); - if (scale > 0) { this._setScaleUpdatePages(scale, value, noScroll, false); } else { @@ -4917,14 +8476,10 @@ var PDFViewer = (function pdfViewer() { if (!currentPage) { return; } - var hPadding = (this.isInPresentationMode || this.removePageBorders) ? - 0 : SCROLLBAR_PADDING; - var vPadding = (this.isInPresentationMode || this.removePageBorders) ? - 0 : VERTICAL_PADDING; - var pageWidthScale = (this.container.clientWidth - hPadding) / - currentPage.width * currentPage.scale; - var pageHeightScale = (this.container.clientHeight - vPadding) / - currentPage.height * currentPage.scale; + var hPadding = this.isInPresentationMode || this.removePageBorders ? 0 : _ui_utils.SCROLLBAR_PADDING; + var vPadding = this.isInPresentationMode || this.removePageBorders ? 0 : _ui_utils.VERTICAL_PADDING; + var pageWidthScale = (this.container.clientWidth - hPadding) / currentPage.width * currentPage.scale; + var pageHeightScale = (this.container.clientHeight - vPadding) / currentPage.height * currentPage.scale; switch (value) { case 'page-actual': scale = 1; @@ -4939,68 +8494,70 @@ var PDFViewer = (function pdfViewer() { scale = Math.min(pageWidthScale, pageHeightScale); break; case 'auto': - var isLandscape = (currentPage.width > currentPage.height); - // For pages in landscape mode, fit the page height to the viewer - // *unless* the page would thus become too wide to fit horizontally. - var horizontalScale = isLandscape ? - Math.min(pageHeightScale, pageWidthScale) : pageWidthScale; - scale = Math.min(MAX_AUTO_SCALE, horizontalScale); + var isLandscape = currentPage.width > currentPage.height; + var horizontalScale = isLandscape ? Math.min(pageHeightScale, pageWidthScale) : pageWidthScale; + scale = Math.min(_ui_utils.MAX_AUTO_SCALE, horizontalScale); break; default: - console.error('pdfViewSetScale: \'' + value + - '\' is an unknown zoom value.'); + console.error('PDFViewer._setScale: "' + value + '" is an unknown zoom value.'); return; } this._setScaleUpdatePages(scale, value, noScroll, true); } - }, - - /** - * Scrolls page into view. - * @param {number} pageNumber - * @param {Array} dest - (optional) original PDF destination array: - * <page-ref> </XYZ|FitXXX> <args..> - */ - scrollPageIntoView: function PDFViewer_scrollPageIntoView(pageNumber, - dest) { + } + }, { + key: '_resetCurrentPageView', + value: function _resetCurrentPageView() { + if (this.isInPresentationMode) { + this._setScale(this._currentScaleValue, true); + } + var pageView = this._pages[this._currentPageNumber - 1]; + (0, _ui_utils.scrollIntoView)(pageView.div); + } + }, { + key: 'scrollPageIntoView', + value: function scrollPageIntoView(params) { if (!this.pdfDocument) { return; } - - var pageView = this._pages[pageNumber - 1]; - - if (this.isInPresentationMode) { - if (this._currentPageNumber !== pageView.id) { - // Avoid breaking getVisiblePages in presentation mode. - this.currentPageNumber = pageView.id; - return; + if (arguments.length > 1 || typeof params === 'number') { + console.warn('Call of scrollPageIntoView() with obsolete signature.'); + var paramObj = {}; + if (typeof params === 'number') { + paramObj.pageNumber = params; } - dest = null; - // Fixes the case when PDF has different page sizes. - this._setScale(this._currentScaleValue, true); + if (arguments[1] instanceof Array) { + paramObj.destArray = arguments[1]; + } + params = paramObj; } - if (!dest) { - scrollIntoView(pageView.div); + var pageNumber = params.pageNumber || 0; + var dest = params.destArray || null; + var allowNegativeOffset = params.allowNegativeOffset || false; + if (this.isInPresentationMode || !dest) { + this._setCurrentPageNumber(pageNumber, true); return; } - - var x = 0, y = 0; - var width = 0, height = 0, widthScale, heightScale; - var changeOrientation = (pageView.rotation % 180 === 0 ? false : true); - var pageWidth = (changeOrientation ? pageView.height : pageView.width) / - pageView.scale / CSS_UNITS; - var pageHeight = (changeOrientation ? pageView.width : pageView.height) / - pageView.scale / CSS_UNITS; + var pageView = this._pages[pageNumber - 1]; + if (!pageView) { + console.error('PDFViewer.scrollPageIntoView: Invalid "pageNumber" parameter.'); + return; + } + var x = 0, + y = 0; + var width = 0, + height = 0, + widthScale = void 0, + heightScale = void 0; + var changeOrientation = pageView.rotation % 180 === 0 ? false : true; + var pageWidth = (changeOrientation ? pageView.height : pageView.width) / pageView.scale / _ui_utils.CSS_UNITS; + var pageHeight = (changeOrientation ? pageView.width : pageView.height) / pageView.scale / _ui_utils.CSS_UNITS; var scale = 0; switch (dest[1].name) { case 'XYZ': x = dest[2]; y = dest[3]; scale = dest[4]; - // If x and/or y coordinates are not supplied, default to - // _top_ left of the page (not the obvious bottom left, - // since aligning the bottom of the intended page with the - // top of the window is rarely helpful). x = x !== null ? x : 0; y = y !== null ? y : pageHeight; break; @@ -5012,8 +8569,6 @@ var PDFViewer = (function pdfViewer() { case 'FitBH': y = dest[2]; scale = 'page-width'; - // According to the PDF spec, section 12.3.2.2, a `null` value in the - // parameter should maintain the position relative to the new page. if (y === null && this._location) { x = this._location.left; y = this._location.top; @@ -5031,59 +8586,52 @@ var PDFViewer = (function pdfViewer() { y = dest[3]; width = dest[4] - x; height = dest[5] - y; - var hPadding = this.removePageBorders ? 0 : SCROLLBAR_PADDING; - var vPadding = this.removePageBorders ? 0 : VERTICAL_PADDING; - - widthScale = (this.container.clientWidth - hPadding) / - width / CSS_UNITS; - heightScale = (this.container.clientHeight - vPadding) / - height / CSS_UNITS; + var hPadding = this.removePageBorders ? 0 : _ui_utils.SCROLLBAR_PADDING; + var 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; scale = Math.min(Math.abs(widthScale), Math.abs(heightScale)); break; default: + console.error('PDFViewer.scrollPageIntoView: "' + dest[1].name + '" ' + 'is not a valid destination type.'); return; } - if (scale && scale !== this._currentScale) { this.currentScaleValue = scale; - } else if (this._currentScale === UNKNOWN_SCALE) { - this.currentScaleValue = DEFAULT_SCALE_VALUE; + } else if (this._currentScale === _ui_utils.UNKNOWN_SCALE) { + this.currentScaleValue = _ui_utils.DEFAULT_SCALE_VALUE; } - if (scale === 'page-fit' && !dest[4]) { - scrollIntoView(pageView.div); + (0, _ui_utils.scrollIntoView)(pageView.div); return; } - - var boundingRect = [ - pageView.viewport.convertToViewportPoint(x, y), - pageView.viewport.convertToViewportPoint(x + width, y + height) - ]; + var boundingRect = [pageView.viewport.convertToViewportPoint(x, y), pageView.viewport.convertToViewportPoint(x + width, y + height)]; var left = Math.min(boundingRect[0][0], boundingRect[1][0]); var top = Math.min(boundingRect[0][1], boundingRect[1][1]); - - scrollIntoView(pageView.div, { left: left, top: top }); - }, - - _updateLocation: function (firstPage) { + if (!allowNegativeOffset) { + left = Math.max(left, 0); + top = Math.max(top, 0); + } + (0, _ui_utils.scrollIntoView)(pageView.div, { + left: left, + top: top + }); + } + }, { + key: '_updateLocation', + value: function _updateLocation(firstPage) { var currentScale = this._currentScale; var currentScaleValue = this._currentScaleValue; - var normalizedScaleValue = - parseFloat(currentScaleValue) === currentScale ? - Math.round(currentScale * 10000) / 100 : currentScaleValue; - + var normalizedScaleValue = parseFloat(currentScaleValue) === currentScale ? Math.round(currentScale * 10000) / 100 : currentScaleValue; var pageNumber = firstPage.id; var pdfOpenParams = '#page=' + pageNumber; pdfOpenParams += '&zoom=' + normalizedScaleValue; var currentPageView = this._pages[pageNumber - 1]; var container = this.container; - var topLeft = currentPageView.getPagePoint( - (container.scrollLeft - firstPage.x), - (container.scrollTop - firstPage.y)); + var topLeft = currentPageView.getPagePoint(container.scrollLeft - firstPage.x, container.scrollTop - firstPage.y); var intLeft = Math.round(topLeft[0]); var intTop = Math.round(topLeft[1]); pdfOpenParams += ',' + intLeft + ',' + intTop; - this._location = { pageNumber: pageNumber, scale: normalizedScaleValue, @@ -5091,30 +8639,23 @@ var PDFViewer = (function pdfViewer() { left: intLeft, pdfOpenParams: pdfOpenParams }; - }, - - update: function PDFViewer_update() { + } + }, { + key: 'update', + value: function update() { var visible = this._getVisiblePages(); var visiblePages = visible.views; if (visiblePages.length === 0) { return; } - - this.updateInProgress = true; - - var suggestedCacheSize = Math.max(DEFAULT_CACHE_SIZE, - 2 * visiblePages.length + 1); + var suggestedCacheSize = Math.max(DEFAULT_CACHE_SIZE, 2 * visiblePages.length + 1); this._buffer.resize(suggestedCacheSize); - this.renderingQueue.renderHighestPriority(visible); - var currentId = this._currentPageNumber; var firstPage = visible.first; - - for (var i = 0, ii = visiblePages.length, stillFullyVisible = false; - i < ii; ++i) { + var stillFullyVisible = false; + for (var i = 0, ii = visiblePages.length; i < ii; ++i) { var page = visiblePages[i]; - if (page.percent < 100) { break; } @@ -5123,74 +8664,69 @@ var PDFViewer = (function pdfViewer() { break; } } - if (!stillFullyVisible) { currentId = visiblePages[0].id; } - if (!this.isInPresentationMode) { - this.currentPageNumber = currentId; + this._setCurrentPageNumber(currentId); } - this._updateLocation(firstPage); - - this.updateInProgress = false; - - var event = document.createEvent('UIEvents'); - event.initUIEvent('updateviewarea', true, true, window, 0); - event.location = this._location; - this.container.dispatchEvent(event); - }, - - containsElement: function (element) { + this.eventBus.dispatch('updateviewarea', { + source: this, + location: this._location + }); + } + }, { + key: 'containsElement', + value: function containsElement(element) { return this.container.contains(element); - }, - - focus: function () { + } + }, { + key: 'focus', + value: function focus() { this.container.focus(); - }, - - get isInPresentationMode() { - return this.presentationModeState === PresentationModeState.FULLSCREEN; - }, - - get isChangingPresentationMode() { - return this.presentationModeState === PresentationModeState.CHANGING; - }, - - get isHorizontalScrollbarEnabled() { - return (this.isInPresentationMode ? - false : (this.container.scrollWidth > this.container.clientWidth)); - }, - - _getVisiblePages: function () { + } + }, { + key: '_getVisiblePages', + value: function _getVisiblePages() { if (!this.isInPresentationMode) { - return getVisibleElements(this.container, this._pages, true); - } else { - // The algorithm in getVisibleElements doesn't work in all browsers and - // configurations when presentation mode is active. - var visible = []; - var currentPage = this._pages[this._currentPageNumber - 1]; - visible.push({ id: currentPage.id, view: currentPage }); - return { first: currentPage, last: currentPage, views: visible }; + return (0, _ui_utils.getVisibleElements)(this.container, this._pages, true); } - }, - - cleanup: function () { + var visible = []; + var currentPage = this._pages[this._currentPageNumber - 1]; + visible.push({ + id: currentPage.id, + view: currentPage + }); + return { + first: currentPage, + last: currentPage, + views: visible + }; + } + }, { + key: 'cleanup', + value: function cleanup() { for (var i = 0, ii = this._pages.length; i < ii; i++) { - if (this._pages[i] && - this._pages[i].renderingState !== RenderingStates.FINISHED) { + if (this._pages[i] && this._pages[i].renderingState !== _pdf_rendering_queue.RenderingStates.FINISHED) { this._pages[i].reset(); } } - }, + } + }, { + key: '_cancelRendering', + value: function _cancelRendering() { + for (var i = 0, ii = this._pages.length; i < ii; i++) { + if (this._pages[i]) { + this._pages[i].cancelRendering(); + } + } + } + }, { + key: '_ensurePdfPageLoaded', + value: function _ensurePdfPageLoaded(pageView) { + var _this2 = this; - /** - * @param {PDFPageView} pageView - * @returns {PDFPage} - * @private - */ - _ensurePdfPageLoaded: function (pageView) { if (pageView.pdfPage) { return Promise.resolve(pageView.pdfPage); } @@ -5198,2802 +8734,1459 @@ var PDFViewer = (function pdfViewer() { if (this._pagesRequests[pageNumber]) { return this._pagesRequests[pageNumber]; } - var promise = this.pdfDocument.getPage(pageNumber).then( - function (pdfPage) { - pageView.setPdfPage(pdfPage); - this._pagesRequests[pageNumber] = null; + var promise = this.pdfDocument.getPage(pageNumber).then(function (pdfPage) { + if (!pageView.pdfPage) { + pageView.setPdfPage(pdfPage); + } + _this2._pagesRequests[pageNumber] = null; return pdfPage; - }.bind(this)); + }).catch(function (reason) { + console.error('Unable to get page for page view', reason); + _this2._pagesRequests[pageNumber] = null; + }); this._pagesRequests[pageNumber] = promise; return promise; - }, + } + }, { + key: 'forceRendering', + value: function forceRendering(currentlyVisiblePages) { + var _this3 = this; - forceRendering: function (currentlyVisiblePages) { var visiblePages = currentlyVisiblePages || this._getVisiblePages(); - var pageView = this.renderingQueue.getHighestPriority(visiblePages, - this._pages, - this.scroll.down); + var pageView = this.renderingQueue.getHighestPriority(visiblePages, this._pages, this.scroll.down); if (pageView) { this._ensurePdfPageLoaded(pageView).then(function () { - this.renderingQueue.renderView(pageView); - }.bind(this)); + _this3.renderingQueue.renderView(pageView); + }); return true; } return false; - }, - - getPageTextContent: function (pageIndex) { + } + }, { + key: 'getPageTextContent', + value: function getPageTextContent(pageIndex) { return this.pdfDocument.getPage(pageIndex + 1).then(function (page) { return page.getTextContent({ normalizeWhitespace: true }); }); - }, + } + }, { + key: 'createTextLayerBuilder', + value: function createTextLayerBuilder(textLayerDiv, pageIndex, viewport) { + var enhanceTextSelection = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; - /** - * @param {HTMLDivElement} textLayerDiv - * @param {number} pageIndex - * @param {PageViewport} viewport - * @returns {TextLayerBuilder} - */ - createTextLayerBuilder: function (textLayerDiv, pageIndex, viewport) { - return new TextLayerBuilder({ + return new _text_layer_builder.TextLayerBuilder({ textLayerDiv: textLayerDiv, + eventBus: this.eventBus, pageIndex: pageIndex, viewport: viewport, - findController: this.isInPresentationMode ? null : this.findController + findController: this.isInPresentationMode ? null : this.findController, + enhanceTextSelection: this.isInPresentationMode ? false : enhanceTextSelection }); - }, + } + }, { + key: 'createAnnotationLayerBuilder', + value: function createAnnotationLayerBuilder(pageDiv, pdfPage) { + var renderInteractiveForms = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var l10n = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _ui_utils.NullL10n; - /** - * @param {HTMLDivElement} pageDiv - * @param {PDFPage} pdfPage - * @returns {AnnotationLayerBuilder} - */ - createAnnotationLayerBuilder: function (pageDiv, pdfPage) { - return new AnnotationLayerBuilder({ + return new _annotation_layer_builder.AnnotationLayerBuilder({ pageDiv: pageDiv, pdfPage: pdfPage, - linkService: this.linkService + renderInteractiveForms: renderInteractiveForms, + linkService: this.linkService, + downloadManager: this.downloadManager, + l10n: l10n }); - }, - - setFindController: function (findController) { + } + }, { + key: 'setFindController', + value: function setFindController(findController) { this.findController = findController; - }, - }; - - return PDFViewer; -})(); - -var SimpleLinkService = (function SimpleLinkServiceClosure() { - function SimpleLinkService() {} - - SimpleLinkService.prototype = { - /** - * @returns {number} - */ - get page() { - return 0; - }, - /** - * @param {number} value - */ - set page(value) {}, - /** - * @param dest - The PDF destination object. - */ - navigateTo: function (dest) {}, - /** - * @param dest - The PDF destination object. - * @returns {string} The hyperlink to the PDF object. - */ - getDestinationHash: function (dest) { - return '#'; - }, - /** - * @param hash - The PDF parameters/hash. - * @returns {string} The hyperlink to the PDF object. - */ - getAnchorUrl: function (hash) { - return '#'; - }, - /** - * @param {string} hash - */ - setHash: function (hash) {}, - /** - * @param {string} action - */ - executeNamedAction: function (action) {}, - /** - * @param {number} pageNum - page number. - * @param {Object} pageRef - reference to the page. - */ - cachePageRef: function (pageNum, pageRef) {} - }; - return SimpleLinkService; -})(); - - -var THUMBNAIL_SCROLL_MARGIN = -19; - - -var THUMBNAIL_WIDTH = 98; // px -var THUMBNAIL_CANVAS_BORDER_WIDTH = 1; // px - -/** - * @typedef {Object} PDFThumbnailViewOptions - * @property {HTMLDivElement} container - The viewer element. - * @property {number} id - The thumbnail's unique ID (normally its number). - * @property {PageViewport} defaultViewport - The page viewport. - * @property {IPDFLinkService} linkService - The navigation/linking service. - * @property {PDFRenderingQueue} renderingQueue - The rendering queue object. - */ - -/** - * @class - * @implements {IRenderableView} - */ -var PDFThumbnailView = (function PDFThumbnailViewClosure() { - function getTempCanvas(width, height) { - var tempCanvas = PDFThumbnailView.tempImageCache; - if (!tempCanvas) { - tempCanvas = document.createElement('canvas'); - PDFThumbnailView.tempImageCache = tempCanvas; - } - tempCanvas.width = width; - tempCanvas.height = height; - - // Since this is a temporary canvas, we need to fill the canvas with a white - // background ourselves. |_getPageDrawContext| uses CSS rules for this. - tempCanvas.mozOpaque = true; - var ctx = tempCanvas.getContext('2d', {alpha: false}); - ctx.save(); - ctx.fillStyle = 'rgb(255, 255, 255)'; - ctx.fillRect(0, 0, width, height); - ctx.restore(); - return tempCanvas; - } - - /** - * @constructs PDFThumbnailView - * @param {PDFThumbnailViewOptions} options - */ - function PDFThumbnailView(options) { - var container = options.container; - var id = options.id; - var defaultViewport = options.defaultViewport; - var linkService = options.linkService; - var renderingQueue = options.renderingQueue; - - this.id = id; - this.renderingId = 'thumbnail' + id; - - this.pdfPage = null; - this.rotation = 0; - this.viewport = defaultViewport; - this.pdfPageRotate = defaultViewport.rotation; - - this.linkService = linkService; - this.renderingQueue = renderingQueue; - - this.hasImage = false; - this.resume = null; - this.renderingState = RenderingStates.INITIAL; - - this.pageWidth = this.viewport.width; - this.pageHeight = this.viewport.height; - this.pageRatio = this.pageWidth / this.pageHeight; - - this.canvasWidth = THUMBNAIL_WIDTH; - this.canvasHeight = (this.canvasWidth / this.pageRatio) | 0; - this.scale = this.canvasWidth / this.pageWidth; - - var anchor = document.createElement('a'); - anchor.href = linkService.getAnchorUrl('#page=' + id); - anchor.title = mozL10n.get('thumb_page_title', {page: id}, 'Page {{page}}'); - anchor.onclick = function stopNavigation() { - linkService.page = id; - return false; - }; - - var div = document.createElement('div'); - div.id = 'thumbnailContainer' + id; - div.className = 'thumbnail'; - this.div = div; - - if (id === 1) { - // Highlight the thumbnail of the first page when no page number is - // specified (or exists in cache) when the document is loaded. - div.classList.add('selected'); } - - var ring = document.createElement('div'); - ring.className = 'thumbnailSelectionRing'; - var borderAdjustment = 2 * THUMBNAIL_CANVAS_BORDER_WIDTH; - ring.style.width = this.canvasWidth + borderAdjustment + 'px'; - ring.style.height = this.canvasHeight + borderAdjustment + 'px'; - this.ring = ring; - - div.appendChild(ring); - anchor.appendChild(div); - container.appendChild(anchor); - } - - PDFThumbnailView.prototype = { - setPdfPage: function PDFThumbnailView_setPdfPage(pdfPage) { - this.pdfPage = pdfPage; - this.pdfPageRotate = pdfPage.rotate; - var totalRotation = (this.rotation + this.pdfPageRotate) % 360; - this.viewport = pdfPage.getViewport(1, totalRotation); - this.reset(); - }, - - reset: function PDFThumbnailView_reset() { - if (this.renderTask) { - this.renderTask.cancel(); - } - this.hasImage = false; - this.resume = null; - this.renderingState = RenderingStates.INITIAL; - - this.pageWidth = this.viewport.width; - this.pageHeight = this.viewport.height; - this.pageRatio = this.pageWidth / this.pageHeight; - - this.canvasHeight = (this.canvasWidth / this.pageRatio) | 0; - this.scale = (this.canvasWidth / this.pageWidth); - - this.div.removeAttribute('data-loaded'); - var ring = this.ring; - var childNodes = ring.childNodes; - for (var i = childNodes.length - 1; i >= 0; i--) { - ring.removeChild(childNodes[i]); - } - var borderAdjustment = 2 * THUMBNAIL_CANVAS_BORDER_WIDTH; - ring.style.width = this.canvasWidth + borderAdjustment + 'px'; - ring.style.height = this.canvasHeight + borderAdjustment + 'px'; - - if (this.canvas) { - // Zeroing the width and height causes Firefox to release graphics - // resources immediately, which can greatly reduce memory consumption. - this.canvas.width = 0; - this.canvas.height = 0; - delete this.canvas; - } - if (this.image) { - this.image.removeAttribute('src'); - delete this.image; - } - }, - - update: function PDFThumbnailView_update(rotation) { - if (typeof rotation !== 'undefined') { - this.rotation = rotation; - } - var totalRotation = (this.rotation + this.pdfPageRotate) % 360; - this.viewport = this.viewport.clone({ - scale: 1, - rotation: totalRotation + }, { + key: 'getPagesOverview', + value: function getPagesOverview() { + var pagesOverview = this._pages.map(function (pageView) { + var viewport = pageView.pdfPage.getViewport(1); + return { + width: viewport.width, + height: viewport.height, + rotation: viewport.rotation + }; }); - this.reset(); - }, - - /** - * @private - */ - _getPageDrawContext: - function PDFThumbnailView_getPageDrawContext(noCtxScale) { - var canvas = document.createElement('canvas'); - this.canvas = canvas; - - canvas.mozOpaque = true; - var ctx = canvas.getContext('2d', {alpha: false}); - var outputScale = getOutputScale(ctx); - - canvas.width = (this.canvasWidth * outputScale.sx) | 0; - canvas.height = (this.canvasHeight * outputScale.sy) | 0; - canvas.style.width = this.canvasWidth + 'px'; - canvas.style.height = this.canvasHeight + 'px'; - - if (!noCtxScale && outputScale.scaled) { - ctx.scale(outputScale.sx, outputScale.sy); - } - - var image = document.createElement('img'); - this.image = image; - - image.id = this.renderingId; - image.className = 'thumbnailImage'; - image.setAttribute('aria-label', mozL10n.get('thumb_page_canvas', - { page: this.id }, 'Thumbnail of Page {{page}}')); - - image.style.width = canvas.style.width; - image.style.height = canvas.style.height; - - return ctx; - }, - - /** - * @private - */ - _convertCanvasToImage: function PDFThumbnailView_convertCanvasToImage() { - if (!this.canvas) { - return; - } - this.image.src = this.canvas.toDataURL(); - - this.div.setAttribute('data-loaded', true); - this.ring.appendChild(this.image); - - // Zeroing the width and height causes Firefox to release graphics - // resources immediately, which can greatly reduce memory consumption. - this.canvas.width = 0; - this.canvas.height = 0; - delete this.canvas; - }, - - draw: function PDFThumbnailView_draw() { - if (this.renderingState !== RenderingStates.INITIAL) { - console.error('Must be in new state before drawing'); - } - if (this.hasImage) { - return Promise.resolve(undefined); - } - this.hasImage = true; - this.renderingState = RenderingStates.RUNNING; - - var resolveRenderPromise, rejectRenderPromise; - var promise = new Promise(function (resolve, reject) { - resolveRenderPromise = resolve; - rejectRenderPromise = reject; + if (!this.enablePrintAutoRotate) { + return pagesOverview; + } + var isFirstPagePortrait = isPortraitOrientation(pagesOverview[0]); + return pagesOverview.map(function (size) { + if (isFirstPagePortrait === isPortraitOrientation(size)) { + return size; + } + return { + width: size.height, + height: size.width, + rotation: (size.rotation + 90) % 360 + }; }); - - var self = this; - function thumbnailDrawCallback(error) { - // The renderTask may have been replaced by a new one, so only remove - // the reference to the renderTask if it matches the one that is - // triggering this callback. - if (renderTask === self.renderTask) { - self.renderTask = null; - } - if (error === 'cancelled') { - rejectRenderPromise(error); - return; - } - self.renderingState = RenderingStates.FINISHED; - self._convertCanvasToImage(); - - if (!error) { - resolveRenderPromise(undefined); - } else { - rejectRenderPromise(error); - } - } - - var ctx = this._getPageDrawContext(); - var drawViewport = this.viewport.clone({ scale: this.scale }); - var renderContinueCallback = function renderContinueCallback(cont) { - if (!self.renderingQueue.isHighestPriority(self)) { - self.renderingState = RenderingStates.PAUSED; - self.resume = function resumeCallback() { - self.renderingState = RenderingStates.RUNNING; - cont(); - }; - return; - } - cont(); - }; - - var renderContext = { - canvasContext: ctx, - viewport: drawViewport - }; - var renderTask = this.renderTask = this.pdfPage.render(renderContext); - renderTask.onContinue = renderContinueCallback; - - renderTask.promise.then( - function pdfPageRenderCallback() { - thumbnailDrawCallback(null); - }, - function pdfPageRenderError(error) { - thumbnailDrawCallback(error); - } - ); - return promise; + } + }, { + key: 'pagesCount', + get: function get() { + return this._pages.length; + } + }, { + key: 'pageViewsReady', + get: function get() { + return this._pageViewsReady; + } + }, { + key: 'currentPageNumber', + get: function get() { + return this._currentPageNumber; }, - - setImage: function PDFThumbnailView_setImage(pageView) { - var img = pageView.canvas; - if (this.hasImage || !img) { - return; - } - if (!this.pdfPage) { - this.setPdfPage(pageView.pdfPage); + set: function set(val) { + if ((val | 0) !== val) { + throw new Error('Invalid page number.'); } - this.hasImage = true; - this.renderingState = RenderingStates.FINISHED; - - var ctx = this._getPageDrawContext(true); - var canvas = ctx.canvas; - - if (img.width <= 2 * canvas.width) { - ctx.drawImage(img, 0, 0, img.width, img.height, - 0, 0, canvas.width, canvas.height); - this._convertCanvasToImage(); + if (!this.pdfDocument) { return; } - // drawImage does an awful job of rescaling the image, doing it gradually. - var MAX_NUM_SCALING_STEPS = 3; - var reducedWidth = canvas.width << MAX_NUM_SCALING_STEPS; - var reducedHeight = canvas.height << MAX_NUM_SCALING_STEPS; - var reducedImage = getTempCanvas(reducedWidth, reducedHeight); - var reducedImageCtx = reducedImage.getContext('2d'); - - while (reducedWidth > img.width || reducedHeight > img.height) { - reducedWidth >>= 1; - reducedHeight >>= 1; - } - reducedImageCtx.drawImage(img, 0, 0, img.width, img.height, - 0, 0, reducedWidth, reducedHeight); - while (reducedWidth > 2 * canvas.width) { - reducedImageCtx.drawImage(reducedImage, - 0, 0, reducedWidth, reducedHeight, - 0, 0, reducedWidth >> 1, reducedHeight >> 1); - reducedWidth >>= 1; - reducedHeight >>= 1; - } - ctx.drawImage(reducedImage, 0, 0, reducedWidth, reducedHeight, - 0, 0, canvas.width, canvas.height); - this._convertCanvasToImage(); + this._setCurrentPageNumber(val, true); } - }; - - return PDFThumbnailView; -})(); - -PDFThumbnailView.tempImageCache = null; - - -/** - * @typedef {Object} PDFThumbnailViewerOptions - * @property {HTMLDivElement} container - The container for the thumbnail - * elements. - * @property {IPDFLinkService} linkService - The navigation/linking service. - * @property {PDFRenderingQueue} renderingQueue - The rendering queue object. - */ - -/** - * Simple viewer control to display thumbnails for pages. - * @class - * @implements {IRenderableView} - */ -var PDFThumbnailViewer = (function PDFThumbnailViewerClosure() { - /** - * @constructs PDFThumbnailViewer - * @param {PDFThumbnailViewerOptions} options - */ - function PDFThumbnailViewer(options) { - this.container = options.container; - this.renderingQueue = options.renderingQueue; - this.linkService = options.linkService; - - this.scroll = watchScroll(this.container, this._scrollUpdated.bind(this)); - this._resetView(); - } - - PDFThumbnailViewer.prototype = { - /** - * @private - */ - _scrollUpdated: function PDFThumbnailViewer_scrollUpdated() { - this.renderingQueue.renderHighestPriority(); + }, { + key: 'currentPageLabel', + get: function get() { + return this._pageLabels && this._pageLabels[this._currentPageNumber - 1]; }, - - getThumbnail: function PDFThumbnailViewer_getThumbnail(index) { - return this.thumbnails[index]; - }, - - /** - * @private - */ - _getVisibleThumbs: function PDFThumbnailViewer_getVisibleThumbs() { - return getVisibleElements(this.container, this.thumbnails); - }, - - scrollThumbnailIntoView: - function PDFThumbnailViewer_scrollThumbnailIntoView(page) { - var selected = document.querySelector('.thumbnail.selected'); - if (selected) { - selected.classList.remove('selected'); - } - var thumbnail = document.getElementById('thumbnailContainer' + page); - if (thumbnail) { - thumbnail.classList.add('selected'); - } - var visibleThumbs = this._getVisibleThumbs(); - var numVisibleThumbs = visibleThumbs.views.length; - - // If the thumbnail isn't currently visible, scroll it into view. - if (numVisibleThumbs > 0) { - var first = visibleThumbs.first.id; - // Account for only one thumbnail being visible. - var last = (numVisibleThumbs > 1 ? visibleThumbs.last.id : first); - if (page <= first || page >= last) { - scrollIntoView(thumbnail, { top: THUMBNAIL_SCROLL_MARGIN }); + set: function set(val) { + var pageNumber = val | 0; + if (this._pageLabels) { + var i = this._pageLabels.indexOf(val); + if (i >= 0) { + pageNumber = i + 1; } } + this.currentPageNumber = pageNumber; + } + }, { + key: 'currentScale', + get: function get() { + return this._currentScale !== _ui_utils.UNKNOWN_SCALE ? this._currentScale : _ui_utils.DEFAULT_SCALE; }, - - get pagesRotation() { - return this._pagesRotation; - }, - - set pagesRotation(rotation) { - this._pagesRotation = rotation; - for (var i = 0, l = this.thumbnails.length; i < l; i++) { - var thumb = this.thumbnails[i]; - thumb.update(rotation); - } - }, - - cleanup: function PDFThumbnailViewer_cleanup() { - var tempCanvas = PDFThumbnailView.tempImageCache; - if (tempCanvas) { - // Zeroing the width and height causes Firefox to release graphics - // resources immediately, which can greatly reduce memory consumption. - tempCanvas.width = 0; - tempCanvas.height = 0; - } - PDFThumbnailView.tempImageCache = null; - }, - - /** - * @private - */ - _resetView: function PDFThumbnailViewer_resetView() { - this.thumbnails = []; - this._pagesRotation = 0; - this._pagesRequests = []; - }, - - setDocument: function PDFThumbnailViewer_setDocument(pdfDocument) { - if (this.pdfDocument) { - // cleanup of the elements and views - var thumbsView = this.container; - while (thumbsView.hasChildNodes()) { - thumbsView.removeChild(thumbsView.lastChild); - } - this._resetView(); - } - - this.pdfDocument = pdfDocument; - if (!pdfDocument) { - return Promise.resolve(); - } - - return pdfDocument.getPage(1).then(function (firstPage) { - var pagesCount = pdfDocument.numPages; - var viewport = firstPage.getViewport(1.0); - for (var pageNum = 1; pageNum <= pagesCount; ++pageNum) { - var thumbnail = new PDFThumbnailView({ - container: this.container, - id: pageNum, - defaultViewport: viewport.clone(), - linkService: this.linkService, - renderingQueue: this.renderingQueue - }); - this.thumbnails.push(thumbnail); - } - }.bind(this)); - }, - - /** - * @param {PDFPageView} pageView - * @returns {PDFPage} - * @private - */ - _ensurePdfPageLoaded: - function PDFThumbnailViewer_ensurePdfPageLoaded(thumbView) { - if (thumbView.pdfPage) { - return Promise.resolve(thumbView.pdfPage); - } - var pageNumber = thumbView.id; - if (this._pagesRequests[pageNumber]) { - return this._pagesRequests[pageNumber]; + set: function set(val) { + if (isNaN(val)) { + throw new Error('Invalid numeric scale'); } - var promise = this.pdfDocument.getPage(pageNumber).then( - function (pdfPage) { - thumbView.setPdfPage(pdfPage); - this._pagesRequests[pageNumber] = null; - return pdfPage; - }.bind(this)); - this._pagesRequests[pageNumber] = promise; - return promise; - }, - - ensureThumbnailVisible: - function PDFThumbnailViewer_ensureThumbnailVisible(page) { - // Ensure that the thumbnail of the current page is visible - // when switching from another view. - scrollIntoView(document.getElementById('thumbnailContainer' + page)); - }, - - forceRendering: function () { - var visibleThumbs = this._getVisibleThumbs(); - var thumbView = this.renderingQueue.getHighestPriority(visibleThumbs, - this.thumbnails, - this.scroll.down); - if (thumbView) { - this._ensurePdfPageLoaded(thumbView).then(function () { - this.renderingQueue.renderView(thumbView); - }.bind(this)); - return true; + if (!this.pdfDocument) { + return; } - return false; + this._setScale(val, false); } - }; - - return PDFThumbnailViewer; -})(); - - -/** - * @typedef {Object} PDFOutlineViewOptions - * @property {HTMLDivElement} container - The viewer element. - * @property {Array} outline - An array of outline objects. - * @property {IPDFLinkService} linkService - The navigation/linking service. - */ - -/** - * @class - */ -var PDFOutlineView = (function PDFOutlineViewClosure() { - /** - * @constructs PDFOutlineView - * @param {PDFOutlineViewOptions} options - */ - function PDFOutlineView(options) { - this.container = options.container; - this.outline = options.outline; - this.linkService = options.linkService; - this.lastToggleIsShow = true; - } - - PDFOutlineView.prototype = { - reset: function PDFOutlineView_reset() { - var container = this.container; - while (container.firstChild) { - container.removeChild(container.firstChild); - } - this.lastToggleIsShow = true; - }, - - /** - * @private - */ - _dispatchEvent: function PDFOutlineView_dispatchEvent(outlineCount) { - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('outlineloaded', true, true, { - outlineCount: outlineCount - }); - this.container.dispatchEvent(event); + }, { + key: 'currentScaleValue', + get: function get() { + return this._currentScaleValue; }, - - /** - * @private - */ - _bindLink: function PDFOutlineView_bindLink(element, item) { - if (item.url) { - PDFJS.addLinkAttributes(element, { url: item.url }); + set: function set(val) { + if (!this.pdfDocument) { return; } - var linkService = this.linkService; - element.href = linkService.getDestinationHash(item.dest); - element.onclick = function goToDestination(e) { - linkService.navigateTo(item.dest); - return false; - }; - }, - - /** - * Prepend a button before an outline item which allows the user to toggle - * the visibility of all outline items at that level. - * - * @private - */ - _addToggleButton: function PDFOutlineView_addToggleButton(div) { - var toggler = document.createElement('div'); - toggler.className = 'outlineItemToggler'; - toggler.onclick = function(event) { - event.stopPropagation(); - toggler.classList.toggle('outlineItemsHidden'); - - if (event.shiftKey) { - var shouldShowAll = !toggler.classList.contains('outlineItemsHidden'); - this._toggleOutlineItem(div, shouldShowAll); - } - }.bind(this); - div.insertBefore(toggler, div.firstChild); + this._setScale(val, false); + } + }, { + key: 'pagesRotation', + get: function get() { + return this._pagesRotation; }, - - /** - * Toggle the visibility of the subtree of an outline item. - * - * @param {Element} root - the root of the outline (sub)tree. - * @param {boolean} state - whether to show the outline (sub)tree. If false, - * the outline subtree rooted at |root| will be collapsed. - * - * @private - */ - _toggleOutlineItem: function PDFOutlineView_toggleOutlineItem(root, show) { - this.lastToggleIsShow = show; - var togglers = root.querySelectorAll('.outlineItemToggler'); - for (var i = 0, ii = togglers.length; i < ii; ++i) { - togglers[i].classList[show ? 'remove' : 'add']('outlineItemsHidden'); + set: function set(rotation) { + if (!(typeof rotation === 'number' && rotation % 90 === 0)) { + throw new Error('Invalid pages rotation angle.'); } - }, - - /** - * Collapse or expand all subtrees of the outline. - */ - toggleOutlineTree: function PDFOutlineView_toggleOutlineTree() { - this._toggleOutlineItem(this.container, !this.lastToggleIsShow); - }, - - render: function PDFOutlineView_render() { - var outline = this.outline; - var outlineCount = 0; - - this.reset(); - - if (!outline) { - this._dispatchEvent(outlineCount); + if (!this.pdfDocument) { return; } - - var fragment = document.createDocumentFragment(); - var queue = [{ parent: fragment, items: this.outline }]; - var hasAnyNesting = false; - while (queue.length > 0) { - var levelData = queue.shift(); - for (var i = 0, len = levelData.items.length; i < len; i++) { - var item = levelData.items[i]; - var div = document.createElement('div'); - div.className = 'outlineItem'; - var element = document.createElement('a'); - this._bindLink(element, item); - element.textContent = PDFJS.removeNullCharacters(item.title); - div.appendChild(element); - - if (item.items.length > 0) { - hasAnyNesting = true; - this._addToggleButton(div); - - var itemsDiv = document.createElement('div'); - itemsDiv.className = 'outlineItems'; - div.appendChild(itemsDiv); - queue.push({ parent: itemsDiv, items: item.items }); - } - - levelData.parent.appendChild(div); - outlineCount++; - } + this._pagesRotation = rotation; + for (var i = 0, ii = this._pages.length; i < ii; i++) { + var pageView = this._pages[i]; + pageView.update(pageView.scale, rotation); } - if (hasAnyNesting) { - this.container.classList.add('outlineWithDeepNesting'); + this._setScale(this._currentScaleValue, true); + if (this.defaultRenderingQueue) { + this.update(); } - - this.container.appendChild(fragment); - - this._dispatchEvent(outlineCount); } - }; - - return PDFOutlineView; -})(); - - -/** - * @typedef {Object} PDFAttachmentViewOptions - * @property {HTMLDivElement} container - The viewer element. - * @property {Array} attachments - An array of attachment objects. - * @property {DownloadManager} downloadManager - The download manager. - */ - -/** - * @class - */ -var PDFAttachmentView = (function PDFAttachmentViewClosure() { - /** - * @constructs PDFAttachmentView - * @param {PDFAttachmentViewOptions} options - */ - function PDFAttachmentView(options) { - this.container = options.container; - this.attachments = options.attachments; - this.downloadManager = options.downloadManager; - } - - PDFAttachmentView.prototype = { - reset: function PDFAttachmentView_reset() { - var container = this.container; - while (container.firstChild) { - container.removeChild(container.firstChild); - } - }, - - /** - * @private - */ - _dispatchEvent: function PDFAttachmentView_dispatchEvent(attachmentsCount) { - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('attachmentsloaded', true, true, { - attachmentsCount: attachmentsCount - }); - this.container.dispatchEvent(event); - }, - - /** - * @private - */ - _bindLink: function PDFAttachmentView_bindLink(button, content, filename) { - button.onclick = function downloadFile(e) { - this.downloadManager.downloadData(content, filename, ''); - return false; - }.bind(this); - }, - - render: function PDFAttachmentView_render() { - var attachments = this.attachments; - var attachmentsCount = 0; - - this.reset(); - - if (!attachments) { - this._dispatchEvent(attachmentsCount); - return; - } - - var names = Object.keys(attachments).sort(function(a, b) { - return a.toLowerCase().localeCompare(b.toLowerCase()); - }); - attachmentsCount = names.length; - - for (var i = 0; i < attachmentsCount; i++) { - var item = attachments[names[i]]; - var filename = getFileName(item.filename); - var div = document.createElement('div'); - div.className = 'attachmentsItem'; - var button = document.createElement('button'); - this._bindLink(button, item.content, filename); - button.textContent = PDFJS.removeNullCharacters(filename); - div.appendChild(button); - this.container.appendChild(div); + }, { + key: 'isInPresentationMode', + get: function get() { + return this.presentationModeState === PresentationModeState.FULLSCREEN; + } + }, { + key: 'isChangingPresentationMode', + get: function get() { + return this.presentationModeState === PresentationModeState.CHANGING; + } + }, { + key: 'isHorizontalScrollbarEnabled', + get: function get() { + return this.isInPresentationMode ? false : this.container.scrollWidth > this.container.clientWidth; + } + }, { + key: 'hasEqualPageSizes', + get: function get() { + var firstPageView = this._pages[0]; + for (var i = 1, ii = this._pages.length; i < ii; ++i) { + var pageView = this._pages[i]; + if (pageView.width !== firstPageView.width || pageView.height !== firstPageView.height) { + return false; + } } - - this._dispatchEvent(attachmentsCount); + return true; } - }; - - return PDFAttachmentView; -})(); - + }]); -var PDFViewerApplication = { - initialBookmark: document.location.hash.substring(1), - initialDestination: null, - initialized: false, - fellback: false, - pdfDocument: null, - pdfLoadingTask: null, - sidebarOpen: false, - printing: false, - /** @type {PDFViewer} */ - pdfViewer: null, - /** @type {PDFThumbnailViewer} */ - pdfThumbnailViewer: null, - /** @type {PDFRenderingQueue} */ - pdfRenderingQueue: null, - /** @type {PDFPresentationMode} */ - pdfPresentationMode: null, - /** @type {PDFDocumentProperties} */ - pdfDocumentProperties: null, - /** @type {PDFLinkService} */ - pdfLinkService: null, - /** @type {PDFHistory} */ - pdfHistory: null, - pageRotation: 0, - isInitialViewSet: false, - animationStartedPromise: null, - preferenceSidebarViewOnLoad: SidebarView.NONE, - preferencePdfBugEnabled: false, - preferenceShowPreviousViewOnLoad: true, - preferenceDefaultZoomValue: '', - isViewerEmbedded: (window.parent !== window), - url: '', + return PDFViewer; +}(); - // called once when the document is loaded - initialize: function pdfViewInitialize() { - var pdfRenderingQueue = new PDFRenderingQueue(); - pdfRenderingQueue.onIdle = this.cleanup.bind(this); - this.pdfRenderingQueue = pdfRenderingQueue; - - var pdfLinkService = new PDFLinkService(); - this.pdfLinkService = pdfLinkService; - - var container = document.getElementById('viewerContainer'); - var viewer = document.getElementById('viewer'); - this.pdfViewer = new PDFViewer({ - container: container, - viewer: viewer, - renderingQueue: pdfRenderingQueue, - linkService: pdfLinkService - }); - pdfRenderingQueue.setViewer(this.pdfViewer); - pdfLinkService.setViewer(this.pdfViewer); - - var thumbnailContainer = document.getElementById('thumbnailView'); - this.pdfThumbnailViewer = new PDFThumbnailViewer({ - container: thumbnailContainer, - renderingQueue: pdfRenderingQueue, - linkService: pdfLinkService - }); - pdfRenderingQueue.setThumbnailViewer(this.pdfThumbnailViewer); +exports.PresentationModeState = PresentationModeState; +exports.PDFViewer = PDFViewer; - Preferences.initialize(); +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { - this.pdfHistory = new PDFHistory({ - linkService: pdfLinkService - }); - pdfLinkService.setHistory(this.pdfHistory); +"use strict"; - this.findController = new PDFFindController({ - pdfViewer: this.pdfViewer, - integratedFind: this.supportsIntegratedFind - }); - this.pdfViewer.setFindController(this.findController); - this.findBar = new PDFFindBar({ - bar: document.getElementById('findbar'), - toggleButton: document.getElementById('viewFind'), - findField: document.getElementById('findInput'), - highlightAllCheckbox: document.getElementById('findHighlightAll'), - caseSensitiveCheckbox: document.getElementById('findMatchCase'), - findMsg: document.getElementById('findMsg'), - findResultsCount: document.getElementById('findResultsCount'), - findStatusIcon: document.getElementById('findStatusIcon'), - findPreviousButton: document.getElementById('findPrevious'), - findNextButton: document.getElementById('findNext'), - findController: this.findController +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.BasePreferences = undefined; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _ui_utils = __webpack_require__(0); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var defaultPreferences = null; +function getDefaultPreferences() { + if (!defaultPreferences) { + defaultPreferences = Promise.resolve({ + "showPreviousViewOnLoad": true, + "defaultZoomValue": "", + "sidebarViewOnLoad": 0, + "enableHandToolOnLoad": false, + "cursorToolOnLoad": 0, + "enableWebGL": false, + "pdfBugEnabled": false, + "disableRange": false, + "disableStream": false, + "disableAutoFetch": false, + "disableFontFace": false, + "disableTextLayer": false, + "useOnlyCssZoom": false, + "externalLinkTarget": 0, + "enhanceTextSelection": false, + "renderer": "canvas", + "renderInteractiveForms": false, + "enablePrintAutoRotate": false, + "disablePageMode": false, + "disablePageLabels": false }); + } + return defaultPreferences; +} - this.findController.setFindBar(this.findBar); +var BasePreferences = function () { + function BasePreferences() { + var _this = this; - HandTool.initialize({ - container: container, - toggleHandTool: document.getElementById('toggleHandTool') - }); + _classCallCheck(this, BasePreferences); - this.pdfDocumentProperties = new PDFDocumentProperties({ - overlayName: 'documentPropertiesOverlay', - closeButton: document.getElementById('documentPropertiesClose'), - fields: { - 'fileName': document.getElementById('fileNameField'), - 'fileSize': document.getElementById('fileSizeField'), - 'title': document.getElementById('titleField'), - 'author': document.getElementById('authorField'), - 'subject': document.getElementById('subjectField'), - 'keywords': document.getElementById('keywordsField'), - 'creationDate': document.getElementById('creationDateField'), - 'modificationDate': document.getElementById('modificationDateField'), - 'creator': document.getElementById('creatorField'), - 'producer': document.getElementById('producerField'), - 'version': document.getElementById('versionField'), - 'pageCount': document.getElementById('pageCountField') + if (this.constructor === BasePreferences) { + throw new Error('Cannot initialize BasePreferences.'); + } + this.prefs = null; + this._initializedPromise = getDefaultPreferences().then(function (defaults) { + Object.defineProperty(_this, 'defaults', { + value: Object.freeze(defaults), + writable: false, + enumerable: true, + configurable: false + }); + _this.prefs = (0, _ui_utils.cloneObj)(defaults); + return _this._readFromStorage(defaults); + }).then(function (prefObj) { + if (prefObj) { + _this.prefs = prefObj; } }); + } - SecondaryToolbar.initialize({ - toolbar: document.getElementById('secondaryToolbar'), - toggleButton: document.getElementById('secondaryToolbarToggle'), - presentationModeButton: - document.getElementById('secondaryPresentationMode'), - openFile: document.getElementById('secondaryOpenFile'), - print: document.getElementById('secondaryPrint'), - download: document.getElementById('secondaryDownload'), - viewBookmark: document.getElementById('secondaryViewBookmark'), - firstPage: document.getElementById('firstPage'), - lastPage: document.getElementById('lastPage'), - pageRotateCw: document.getElementById('pageRotateCw'), - pageRotateCcw: document.getElementById('pageRotateCcw'), - documentPropertiesButton: document.getElementById('documentProperties') - }); + _createClass(BasePreferences, [{ + key: "_writeToStorage", + value: function _writeToStorage(prefObj) { + return Promise.reject(new Error('Not implemented: _writeToStorage')); + } + }, { + key: "_readFromStorage", + value: function _readFromStorage(prefObj) { + return Promise.reject(new Error('Not implemented: _readFromStorage')); + } + }, { + key: "reset", + value: function reset() { + var _this2 = this; - if (this.supportsFullscreen) { - var toolbar = SecondaryToolbar; - this.pdfPresentationMode = new PDFPresentationMode({ - container: container, - viewer: viewer, - pdfViewer: this.pdfViewer, - pdfThumbnailViewer: this.pdfThumbnailViewer, - contextMenuItems: [ - { element: document.getElementById('contextFirstPage'), - handler: toolbar.firstPageClick.bind(toolbar) }, - { element: document.getElementById('contextLastPage'), - handler: toolbar.lastPageClick.bind(toolbar) }, - { element: document.getElementById('contextPageRotateCw'), - handler: toolbar.pageRotateCwClick.bind(toolbar) }, - { element: document.getElementById('contextPageRotateCcw'), - handler: toolbar.pageRotateCcwClick.bind(toolbar) } - ] + return this._initializedPromise.then(function () { + _this2.prefs = (0, _ui_utils.cloneObj)(_this2.defaults); + return _this2._writeToStorage(_this2.defaults); }); } + }, { + key: "reload", + value: function reload() { + var _this3 = this; - PasswordPrompt.initialize({ - overlayName: 'passwordOverlay', - passwordField: document.getElementById('password'), - passwordText: document.getElementById('passwordText'), - passwordSubmit: document.getElementById('passwordSubmit'), - passwordCancel: document.getElementById('passwordCancel') - }); - - var self = this; - var initializedPromise = Promise.all([ - Preferences.get('enableWebGL').then(function resolved(value) { - PDFJS.disableWebGL = !value; - }), - Preferences.get('sidebarViewOnLoad').then(function resolved(value) { - self.preferenceSidebarViewOnLoad = value; - }), - Preferences.get('pdfBugEnabled').then(function resolved(value) { - self.preferencePdfBugEnabled = value; - }), - Preferences.get('showPreviousViewOnLoad').then(function resolved(value) { - self.preferenceShowPreviousViewOnLoad = value; - }), - Preferences.get('defaultZoomValue').then(function resolved(value) { - self.preferenceDefaultZoomValue = value; - }), - Preferences.get('disableTextLayer').then(function resolved(value) { - if (PDFJS.disableTextLayer === true) { - return; - } - PDFJS.disableTextLayer = value; - }), - Preferences.get('disableRange').then(function resolved(value) { - if (PDFJS.disableRange === true) { - return; - } - PDFJS.disableRange = value; - }), - Preferences.get('disableStream').then(function resolved(value) { - if (PDFJS.disableStream === true) { - return; - } - PDFJS.disableStream = value; - }), - Preferences.get('disableAutoFetch').then(function resolved(value) { - PDFJS.disableAutoFetch = value; - }), - Preferences.get('disableFontFace').then(function resolved(value) { - if (PDFJS.disableFontFace === true) { - return; - } - PDFJS.disableFontFace = value; - }), - Preferences.get('useOnlyCssZoom').then(function resolved(value) { - PDFJS.useOnlyCssZoom = value; - }), - Preferences.get('externalLinkTarget').then(function resolved(value) { - if (PDFJS.isExternalLinkTargetSet()) { - return; + return this._initializedPromise.then(function () { + return _this3._readFromStorage(_this3.defaults); + }).then(function (prefObj) { + if (prefObj) { + _this3.prefs = prefObj; } - PDFJS.externalLinkTarget = value; - }), - // TODO move more preferences and other async stuff here - ]).catch(function (reason) { }); - - return initializedPromise.then(function () { - if (self.isViewerEmbedded && !PDFJS.isExternalLinkTargetSet()) { - // Prevent external links from "replacing" the viewer, - // when it's embedded in e.g. an iframe or an object. - PDFJS.externalLinkTarget = PDFJS.LinkTarget.TOP; - } - - self.initialized = true; - }); - }, - - zoomIn: function pdfViewZoomIn(ticks) { - var newScale = this.pdfViewer.currentScale; - do { - newScale = (newScale * DEFAULT_SCALE_DELTA).toFixed(2); - newScale = Math.ceil(newScale * 10) / 10; - newScale = Math.min(MAX_SCALE, newScale); - } while (--ticks > 0 && newScale < MAX_SCALE); - this.pdfViewer.currentScaleValue = newScale; - }, - - zoomOut: function pdfViewZoomOut(ticks) { - var newScale = this.pdfViewer.currentScale; - do { - newScale = (newScale / DEFAULT_SCALE_DELTA).toFixed(2); - newScale = Math.floor(newScale * 10) / 10; - newScale = Math.max(MIN_SCALE, newScale); - } while (--ticks > 0 && newScale > MIN_SCALE); - this.pdfViewer.currentScaleValue = newScale; - }, - - get pagesCount() { - return this.pdfDocument.numPages; - }, - - set page(val) { - this.pdfLinkService.page = val; - }, - - get page() { // TODO remove - return this.pdfLinkService.page; - }, - - get supportsPrinting() { - var canvas = document.createElement('canvas'); - var value = 'mozPrintCallback' in canvas; - - return PDFJS.shadow(this, 'supportsPrinting', value); - }, - - get supportsFullscreen() { - var doc = document.documentElement; - var support = !!(doc.requestFullscreen || doc.mozRequestFullScreen || - doc.webkitRequestFullScreen || doc.msRequestFullscreen); - - if (document.fullscreenEnabled === false || - document.mozFullScreenEnabled === false || - document.webkitFullscreenEnabled === false || - document.msFullscreenEnabled === false) { - support = false; - } - if (support && PDFJS.disableFullscreen === true) { - support = false; + }); } - - return PDFJS.shadow(this, 'supportsFullscreen', support); - }, - - get supportsIntegratedFind() { - var support = false; - - return PDFJS.shadow(this, 'supportsIntegratedFind', support); - }, - - get supportsDocumentFonts() { - var support = true; - - return PDFJS.shadow(this, 'supportsDocumentFonts', support); - }, - - get supportsDocumentColors() { - var support = true; - - return PDFJS.shadow(this, 'supportsDocumentColors', support); - }, - - get loadingBar() { - var bar = new ProgressBar('#loadingBar', {}); - - return PDFJS.shadow(this, 'loadingBar', bar); - }, - - get supportedMouseWheelZoomModifierKeys() { - var support = { - ctrlKey: true, - metaKey: true, - }; - - return PDFJS.shadow(this, 'supportedMouseWheelZoomModifierKeys', support); - }, - - - setTitleUsingUrl: function pdfViewSetTitleUsingUrl(url) { - this.url = url; - try { - this.setTitle(decodeURIComponent(getFileName(url)) || url); - } catch (e) { - // decodeURIComponent may throw URIError, - // fall back to using the unprocessed url in that case - this.setTitle(url); + }, { + key: "set", + value: function set(name, value) { + var _this4 = this; + + return this._initializedPromise.then(function () { + if (_this4.defaults[name] === undefined) { + throw new Error("Set preference: \"" + name + "\" is undefined."); + } else if (value === undefined) { + throw new Error('Set preference: no value is specified.'); + } + var valueType = typeof value === "undefined" ? "undefined" : _typeof(value); + var defaultType = _typeof(_this4.defaults[name]); + if (valueType !== defaultType) { + if (valueType === 'number' && defaultType === 'string') { + value = value.toString(); + } else { + throw new Error("Set preference: \"" + value + "\" is a " + valueType + ", " + ("expected a " + defaultType + ".")); + } + } else { + if (valueType === 'number' && (value | 0) !== value) { + throw new Error("Set preference: \"" + value + "\" must be an integer."); + } + } + _this4.prefs[name] = value; + return _this4._writeToStorage(_this4.prefs); + }); } - }, + }, { + key: "get", + value: function get(name) { + var _this5 = this; - setTitle: function pdfViewSetTitle(title) { - if (this.isViewerEmbedded) { - // Embedded PDF viewers should not be changing their parent page's title. - return; + return this._initializedPromise.then(function () { + var defaultValue = _this5.defaults[name]; + if (defaultValue === undefined) { + throw new Error("Get preference: \"" + name + "\" is undefined."); + } else { + var prefValue = _this5.prefs[name]; + if (prefValue !== undefined) { + return prefValue; + } + } + return defaultValue; + }); } - document.title = title; - }, + }]); - /** - * Closes opened PDF document. - * @returns {Promise} - Returns the promise, which is resolved when all - * destruction is completed. - */ - close: function pdfViewClose() { - var errorWrapper = document.getElementById('errorWrapper'); - errorWrapper.setAttribute('hidden', 'true'); - - if (!this.pdfLoadingTask) { - return Promise.resolve(); - } + return BasePreferences; +}(); - var promise = this.pdfLoadingTask.destroy(); - this.pdfLoadingTask = null; +exports.BasePreferences = BasePreferences; - if (this.pdfDocument) { - this.pdfDocument = null; +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { - this.pdfThumbnailViewer.setDocument(null); - this.pdfViewer.setDocument(null); - this.pdfLinkService.setDocument(null, null); - } +"use strict"; - if (typeof PDFBug !== 'undefined') { - PDFBug.cleanup(); - } - return promise; - }, - /** - * Opens PDF document specified by URL or array with additional arguments. - * @param {string|TypedArray|ArrayBuffer} file - PDF location or binary data. - * @param {Object} args - (optional) Additional arguments for the getDocument - * call, e.g. HTTP headers ('httpHeaders') or - * alternative data transport ('range'). - * @returns {Promise} - Returns the promise, which is resolved when document - * is opened. - */ - open: function pdfViewOpen(file, args) { - var scale = 0; - if (arguments.length > 2 || typeof args === 'number') { - console.warn('Call of open() with obsolete signature.'); - if (typeof args === 'number') { - scale = args; // scale argument was found - } - args = arguments[4] || null; - if (arguments[3] && typeof arguments[3] === 'object') { - // The pdfDataRangeTransport argument is present. - args = Object.create(args); - args.range = arguments[3]; - } - if (typeof arguments[2] === 'string') { - // The password argument is present. - args = Object.create(args); - args.password = arguments[2]; - } - } +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SecondaryToolbar = undefined; - if (this.pdfLoadingTask) { - // We need to destroy already opened document. - return this.close().then(function () { - // Reload the preferences if a document was previously opened. - Preferences.reload(); - // ... and repeat the open() call. - return this.open(file, args); - }.bind(this)); - } +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var parameters = Object.create(null); - if (typeof file === 'string') { // URL - this.setTitleUsingUrl(file); - parameters.url = file; - } else if (file && 'byteLength' in file) { // ArrayBuffer - parameters.data = file; - } else if (file.url && file.originalUrl) { - this.setTitleUsingUrl(file.originalUrl); - parameters.url = file.url; - } - if (args) { - for (var prop in args) { - parameters[prop] = args[prop]; - } - } +var _pdf_cursor_tools = __webpack_require__(6); - var self = this; - self.downloadComplete = false; +var _ui_utils = __webpack_require__(0); - var loadingTask = PDFJS.getDocument(parameters); - this.pdfLoadingTask = loadingTask; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - loadingTask.onPassword = function passwordNeeded(updatePassword, reason) { - PasswordPrompt.updatePassword = updatePassword; - PasswordPrompt.reason = reason; - PasswordPrompt.open(); - }; +var SecondaryToolbar = function () { + function SecondaryToolbar(options, mainContainer, eventBus) { + _classCallCheck(this, SecondaryToolbar); - loadingTask.onProgress = function getDocumentProgress(progressData) { - self.progress(progressData.loaded / progressData.total); + this.toolbar = options.toolbar; + this.toggleButton = options.toggleButton; + this.toolbarButtonContainer = options.toolbarButtonContainer; + this.buttons = [{ + element: options.presentationModeButton, + eventName: 'presentationmode', + close: true + }, { + element: options.openFileButton, + eventName: 'openfile', + close: true + }, { + element: options.printButton, + eventName: 'print', + close: true + }, { + element: options.downloadButton, + eventName: 'download', + close: true + }, { + element: options.viewBookmarkButton, + eventName: null, + close: true + }, { + element: options.firstPageButton, + eventName: 'firstpage', + close: true + }, { + element: options.lastPageButton, + eventName: 'lastpage', + close: true + }, { + element: options.pageRotateCwButton, + eventName: 'rotatecw', + close: false + }, { + element: options.pageRotateCcwButton, + eventName: 'rotateccw', + close: false + }, { + element: options.cursorSelectToolButton, + eventName: 'switchcursortool', + eventDetails: { tool: _pdf_cursor_tools.CursorTool.SELECT }, + close: true + }, { + element: options.cursorHandToolButton, + eventName: 'switchcursortool', + eventDetails: { tool: _pdf_cursor_tools.CursorTool.HAND }, + close: true + }, { + element: options.documentPropertiesButton, + eventName: 'documentproperties', + close: true + }]; + this.items = { + firstPage: options.firstPageButton, + lastPage: options.lastPageButton, + pageRotateCw: options.pageRotateCwButton, + pageRotateCcw: options.pageRotateCcwButton }; + this.mainContainer = mainContainer; + this.eventBus = eventBus; + this.opened = false; + this.containerHeight = null; + this.previousContainerHeight = null; + this.reset(); + this._bindClickListeners(); + this._bindCursorToolsListener(options); + this.eventBus.on('resize', this._setMaxHeight.bind(this)); + } - // Listen for unsupported features to trigger the fallback UI. - loadingTask.onUnsupportedFeature = this.fallback.bind(this); - - var result = loadingTask.promise.then( - function getDocumentCallback(pdfDocument) { - self.load(pdfDocument, scale); - }, - function getDocumentError(exception) { - var message = exception && exception.message; - var loadingErrorMessage = mozL10n.get('loading_error', null, - 'An error occurred while loading the PDF.'); - - if (exception instanceof PDFJS.InvalidPDFException) { - // change error message also for other builds - loadingErrorMessage = mozL10n.get('invalid_file_error', null, - 'Invalid or corrupted PDF file.'); - } else if (exception instanceof PDFJS.MissingPDFException) { - // special message for missing PDF's - loadingErrorMessage = mozL10n.get('missing_file_error', null, - 'Missing PDF file.'); - } else if (exception instanceof PDFJS.UnexpectedResponseException) { - loadingErrorMessage = mozL10n.get('unexpected_response_error', null, - 'Unexpected server response.'); - } - - var moreInfo = { - message: message - }; - self.error(loadingErrorMessage, moreInfo); + _createClass(SecondaryToolbar, [{ + key: 'setPageNumber', + value: function setPageNumber(pageNumber) { + this.pageNumber = pageNumber; + this._updateUIState(); + } + }, { + key: 'setPagesCount', + value: function setPagesCount(pagesCount) { + this.pagesCount = pagesCount; + this._updateUIState(); + } + }, { + key: 'reset', + value: function reset() { + this.pageNumber = 0; + this.pagesCount = 0; + this._updateUIState(); + } + }, { + key: '_updateUIState', + value: function _updateUIState() { + this.items.firstPage.disabled = this.pageNumber <= 1; + this.items.lastPage.disabled = this.pageNumber >= this.pagesCount; + this.items.pageRotateCw.disabled = this.pagesCount === 0; + this.items.pageRotateCcw.disabled = this.pagesCount === 0; + } + }, { + key: '_bindClickListeners', + value: function _bindClickListeners() { + var _this = this; + + this.toggleButton.addEventListener('click', this.toggle.bind(this)); + + var _loop = function _loop(button) { + var _buttons$button = _this.buttons[button], + element = _buttons$button.element, + eventName = _buttons$button.eventName, + close = _buttons$button.close, + eventDetails = _buttons$button.eventDetails; + + element.addEventListener('click', function (evt) { + if (eventName !== null) { + var details = { source: _this }; + for (var property in eventDetails) { + details[property] = eventDetails[property]; + } + _this.eventBus.dispatch(eventName, details); + } + if (close) { + _this.close(); + } + }); + }; - throw new Error(loadingErrorMessage); + for (var button in this.buttons) { + _loop(button); } - ); - - if (args && args.length) { - PDFViewerApplication.pdfDocumentProperties.setFileSize(args.length); } - return result; - }, - - download: function pdfViewDownload() { - function downloadByUrl() { - downloadManager.downloadUrl(url, filename); + }, { + key: '_bindCursorToolsListener', + value: function _bindCursorToolsListener(buttons) { + this.eventBus.on('cursortoolchanged', function (evt) { + buttons.cursorSelectToolButton.classList.remove('toggled'); + buttons.cursorHandToolButton.classList.remove('toggled'); + switch (evt.tool) { + case _pdf_cursor_tools.CursorTool.SELECT: + buttons.cursorSelectToolButton.classList.add('toggled'); + break; + case _pdf_cursor_tools.CursorTool.HAND: + buttons.cursorHandToolButton.classList.add('toggled'); + break; + } + }); } - - var url = this.url.split('#')[0]; - var filename = getPDFFileNameFromURL(url); - var downloadManager = new DownloadManager(); - downloadManager.onerror = function (err) { - // This error won't really be helpful because it's likely the - // fallback won't work either (or is already open). - PDFViewerApplication.error('PDF failed to download.'); - }; - - if (!this.pdfDocument) { // the PDF is not ready yet - downloadByUrl(); - return; + }, { + key: 'open', + value: function open() { + if (this.opened) { + return; + } + this.opened = true; + this._setMaxHeight(); + this.toggleButton.classList.add('toggled'); + this.toolbar.classList.remove('hidden'); } - - if (!this.downloadComplete) { // the PDF is still downloading - downloadByUrl(); - return; + }, { + key: 'close', + value: function close() { + if (!this.opened) { + return; + } + this.opened = false; + this.toolbar.classList.add('hidden'); + this.toggleButton.classList.remove('toggled'); } - - this.pdfDocument.getData().then( - function getDataSuccess(data) { - var blob = PDFJS.createBlob(data, 'application/pdf'); - downloadManager.download(blob, url, filename); - }, - downloadByUrl // Error occurred try downloading with just the url. - ).then(null, downloadByUrl); - }, - - fallback: function pdfViewFallback(featureId) { - }, - - /** - * Show the error box. - * @param {String} message A message that is human readable. - * @param {Object} moreInfo (optional) Further information about the error - * that is more technical. Should have a 'message' - * and optionally a 'stack' property. - */ - error: function pdfViewError(message, moreInfo) { - var moreInfoText = mozL10n.get('error_version_info', - {version: PDFJS.version || '?', build: PDFJS.build || '?'}, - 'PDF.js v{{version}} (build: {{build}})') + '\n'; - if (moreInfo) { - moreInfoText += - mozL10n.get('error_message', {message: moreInfo.message}, - 'Message: {{message}}'); - if (moreInfo.stack) { - moreInfoText += '\n' + - mozL10n.get('error_stack', {stack: moreInfo.stack}, - 'Stack: {{stack}}'); + }, { + key: 'toggle', + value: function toggle() { + if (this.opened) { + this.close(); } else { - if (moreInfo.filename) { - moreInfoText += '\n' + - mozL10n.get('error_file', {file: moreInfo.filename}, - 'File: {{file}}'); - } - if (moreInfo.lineNumber) { - moreInfoText += '\n' + - mozL10n.get('error_line', {line: moreInfo.lineNumber}, - 'Line: {{line}}'); - } + this.open(); } } - - var errorWrapper = document.getElementById('errorWrapper'); - errorWrapper.removeAttribute('hidden'); - - var errorMessage = document.getElementById('errorMessage'); - errorMessage.textContent = message; - - var closeButton = document.getElementById('errorClose'); - closeButton.onclick = function() { - errorWrapper.setAttribute('hidden', 'true'); - }; - - var errorMoreInfo = document.getElementById('errorMoreInfo'); - var moreInfoButton = document.getElementById('errorShowMore'); - var lessInfoButton = document.getElementById('errorShowLess'); - moreInfoButton.onclick = function() { - errorMoreInfo.removeAttribute('hidden'); - moreInfoButton.setAttribute('hidden', 'true'); - lessInfoButton.removeAttribute('hidden'); - errorMoreInfo.style.height = errorMoreInfo.scrollHeight + 'px'; - }; - lessInfoButton.onclick = function() { - errorMoreInfo.setAttribute('hidden', 'true'); - moreInfoButton.removeAttribute('hidden'); - lessInfoButton.setAttribute('hidden', 'true'); - }; - moreInfoButton.oncontextmenu = noContextMenuHandler; - lessInfoButton.oncontextmenu = noContextMenuHandler; - closeButton.oncontextmenu = noContextMenuHandler; - moreInfoButton.removeAttribute('hidden'); - lessInfoButton.setAttribute('hidden', 'true'); - errorMoreInfo.value = moreInfoText; - }, - - progress: function pdfViewProgress(level) { - var percent = Math.round(level * 100); - // When we transition from full request to range requests, it's possible - // that we discard some of the loaded data. This can cause the loading - // bar to move backwards. So prevent this by only updating the bar if it - // increases. - if (percent > this.loadingBar.percent || isNaN(percent)) { - this.loadingBar.percent = percent; - - // When disableAutoFetch is enabled, it's not uncommon for the entire file - // to never be fetched (depends on e.g. the file structure). In this case - // the loading bar will not be completely filled, nor will it be hidden. - // To prevent displaying a partially filled loading bar permanently, we - // hide it when no data has been loaded during a certain amount of time. - if (PDFJS.disableAutoFetch && percent) { - if (this.disableAutoFetchLoadingBarTimeout) { - clearTimeout(this.disableAutoFetchLoadingBarTimeout); - this.disableAutoFetchLoadingBarTimeout = null; - } - this.loadingBar.show(); - - this.disableAutoFetchLoadingBarTimeout = setTimeout(function () { - this.loadingBar.hide(); - this.disableAutoFetchLoadingBarTimeout = null; - }.bind(this), DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT); + }, { + key: '_setMaxHeight', + value: function _setMaxHeight() { + if (!this.opened) { + return; } + this.containerHeight = this.mainContainer.clientHeight; + if (this.containerHeight === this.previousContainerHeight) { + return; + } + this.toolbarButtonContainer.setAttribute('style', 'max-height: ' + (this.containerHeight - _ui_utils.SCROLLBAR_PADDING) + 'px;'); + this.previousContainerHeight = this.containerHeight; } - }, - - load: function pdfViewLoad(pdfDocument, scale) { - var self = this; - scale = scale || UNKNOWN_SCALE; + }, { + key: 'isOpen', + get: function get() { + return this.opened; + } + }]); - this.findController.reset(); + return SecondaryToolbar; +}(); - this.pdfDocument = pdfDocument; +exports.SecondaryToolbar = SecondaryToolbar; - this.pdfDocumentProperties.setDocumentAndUrl(pdfDocument, this.url); +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { - var downloadedPromise = pdfDocument.getDownloadInfo().then(function() { - self.downloadComplete = true; - self.loadingBar.hide(); - }); +"use strict"; - var pagesCount = pdfDocument.numPages; - document.getElementById('numPages').textContent = - mozL10n.get('page_of', {pageCount: pagesCount}, 'of {{pageCount}}'); - document.getElementById('pageNumber').max = pagesCount; - var id = this.documentFingerprint = pdfDocument.fingerprint; - var store = this.store = new ViewHistory(id); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.DefaultTextLayerFactory = exports.TextLayerBuilder = undefined; - var baseDocumentUrl = null; - this.pdfLinkService.setDocument(pdfDocument, baseDocumentUrl); +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var pdfViewer = this.pdfViewer; - pdfViewer.currentScale = scale; - pdfViewer.setDocument(pdfDocument); - var firstPagePromise = pdfViewer.firstPagePromise; - var pagesPromise = pdfViewer.pagesPromise; - var onePageRendered = pdfViewer.onePageRendered; +var _dom_events = __webpack_require__(2); - this.pageRotation = 0; - this.isInitialViewSet = false; +var _pdfjsLib = __webpack_require__(1); - this.pdfThumbnailViewer.setDocument(pdfDocument); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - firstPagePromise.then(function(pdfPage) { - downloadedPromise.then(function () { - var event = document.createEvent('CustomEvent'); - event.initCustomEvent('documentload', true, true, {}); - window.dispatchEvent(event); - }); +var EXPAND_DIVS_TIMEOUT = 300; - self.loadingBar.setWidth(document.getElementById('viewer')); - - if (!PDFJS.disableHistory && !self.isViewerEmbedded) { - // The browsing history is only enabled when the viewer is standalone, - // i.e. not when it is embedded in a web page. - if (!self.preferenceShowPreviousViewOnLoad) { - self.pdfHistory.clearHistoryState(); - } - self.pdfHistory.initialize(self.documentFingerprint); +var TextLayerBuilder = function () { + function TextLayerBuilder(_ref) { + var textLayerDiv = _ref.textLayerDiv, + eventBus = _ref.eventBus, + pageIndex = _ref.pageIndex, + viewport = _ref.viewport, + _ref$findController = _ref.findController, + findController = _ref$findController === undefined ? null : _ref$findController, + _ref$enhanceTextSelec = _ref.enhanceTextSelection, + enhanceTextSelection = _ref$enhanceTextSelec === undefined ? false : _ref$enhanceTextSelec; - if (self.pdfHistory.initialDestination) { - self.initialDestination = self.pdfHistory.initialDestination; - } else if (self.pdfHistory.initialBookmark) { - self.initialBookmark = self.pdfHistory.initialBookmark; - } - } + _classCallCheck(this, TextLayerBuilder); - var initialParams = { - destination: self.initialDestination, - bookmark: self.initialBookmark, - hash: null, - }; + this.textLayerDiv = textLayerDiv; + this.eventBus = eventBus || (0, _dom_events.getGlobalEventBus)(); + this.textContent = null; + this.textContentItemsStr = []; + this.textContentStream = null; + this.renderingDone = false; + this.pageIdx = pageIndex; + this.pageNumber = this.pageIdx + 1; + this.matches = []; + this.viewport = viewport; + this.textDivs = []; + this.findController = findController; + this.textLayerRenderTask = null; + this.enhanceTextSelection = enhanceTextSelection; + this._bindMouse(); + } - store.initializedPromise.then(function resolved() { - var storedHash = null; - if (self.preferenceShowPreviousViewOnLoad && - store.get('exists', false)) { - var pageNum = store.get('page', '1'); - var zoom = self.preferenceDefaultZoomValue || - store.get('zoom', DEFAULT_SCALE_VALUE); - var left = store.get('scrollLeft', '0'); - var top = store.get('scrollTop', '0'); - - storedHash = 'page=' + pageNum + '&zoom=' + zoom + ',' + - left + ',' + top; - } else if (self.preferenceDefaultZoomValue) { - storedHash = 'page=1&zoom=' + self.preferenceDefaultZoomValue; - } - self.setInitialView(storedHash, scale); - - initialParams.hash = storedHash; - - // Make all navigation keys work on document load, - // unless the viewer is embedded in a web page. - if (!self.isViewerEmbedded) { - self.pdfViewer.focus(); - } - }, function rejected(reason) { - console.error(reason); - self.setInitialView(null, scale); + _createClass(TextLayerBuilder, [{ + key: '_finishRendering', + value: function _finishRendering() { + this.renderingDone = true; + if (!this.enhanceTextSelection) { + var endOfContent = document.createElement('div'); + endOfContent.className = 'endOfContent'; + this.textLayerDiv.appendChild(endOfContent); + } + this.eventBus.dispatch('textlayerrendered', { + source: this, + pageNumber: this.pageNumber, + numTextDivs: this.textDivs.length }); + } + }, { + key: 'render', + value: function render() { + var _this = this; - // For documents with different page sizes, - // ensure that the correct location becomes visible on load. - pagesPromise.then(function resolved() { - if (!initialParams.destination && !initialParams.bookmark && - !initialParams.hash) { - return; - } - if (self.hasEqualPageSizes) { - return; - } - self.initialDestination = initialParams.destination; - self.initialBookmark = initialParams.bookmark; + var timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; - self.pdfViewer.currentScaleValue = self.pdfViewer.currentScaleValue; - self.setInitialView(initialParams.hash, scale); + if (!(this.textContent || this.textContentStream) || this.renderingDone) { + return; + } + this.cancel(); + this.textDivs = []; + var textLayerFrag = document.createDocumentFragment(); + this.textLayerRenderTask = (0, _pdfjsLib.renderTextLayer)({ + textContent: this.textContent, + textContentStream: this.textContentStream, + container: textLayerFrag, + viewport: this.viewport, + textDivs: this.textDivs, + textContentItemsStr: this.textContentItemsStr, + timeout: timeout, + enhanceTextSelection: this.enhanceTextSelection }); - }); - - pagesPromise.then(function() { - if (self.supportsPrinting) { - pdfDocument.getJavaScript().then(function(javaScript) { - if (javaScript.length) { - console.warn('Warning: JavaScript is not supported'); - self.fallback(PDFJS.UNSUPPORTED_FEATURES.javaScript); - } - // Hack to support auto printing. - var regex = /\bprint\s*\(/; - for (var i = 0, ii = javaScript.length; i < ii; i++) { - var js = javaScript[i]; - if (js && regex.test(js)) { - setTimeout(function() { - window.print(); - }); - return; - } - } - }); + this.textLayerRenderTask.promise.then(function () { + _this.textLayerDiv.appendChild(textLayerFrag); + _this._finishRendering(); + _this.updateMatches(); + }, function (reason) {}); + } + }, { + key: 'cancel', + value: function cancel() { + if (this.textLayerRenderTask) { + this.textLayerRenderTask.cancel(); + this.textLayerRenderTask = null; } - }); - - // outline depends on pagesRefMap - var promises = [pagesPromise, this.animationStartedPromise]; - Promise.all(promises).then(function() { - pdfDocument.getOutline().then(function(outline) { - var container = document.getElementById('outlineView'); - self.outline = new PDFOutlineView({ - container: container, - outline: outline, - linkService: self.pdfLinkService - }); - self.outline.render(); - document.getElementById('viewOutline').disabled = !outline; - - if (!outline && !container.classList.contains('hidden')) { - self.switchSidebarView('thumbs'); + } + }, { + key: 'setTextContentStream', + value: function setTextContentStream(readableStream) { + this.cancel(); + this.textContentStream = readableStream; + } + }, { + key: 'setTextContent', + value: function setTextContent(textContent) { + this.cancel(); + this.textContent = textContent; + } + }, { + key: 'convertMatches', + value: function convertMatches(matches, matchesLength) { + var i = 0; + var iIndex = 0; + var textContentItemsStr = this.textContentItemsStr; + var end = textContentItemsStr.length - 1; + var queryLen = this.findController === null ? 0 : this.findController.state.query.length; + var ret = []; + if (!matches) { + return ret; + } + for (var m = 0, len = matches.length; m < len; m++) { + var matchIdx = matches[m]; + while (i !== end && matchIdx >= iIndex + textContentItemsStr[i].length) { + iIndex += textContentItemsStr[i].length; + i++; } - if (outline && - self.preferenceSidebarViewOnLoad === SidebarView.OUTLINE) { - self.switchSidebarView('outline', true); + if (i === textContentItemsStr.length) { + console.error('Could not find a matching mapping'); } - }); - pdfDocument.getAttachments().then(function(attachments) { - var container = document.getElementById('attachmentsView'); - self.attachments = new PDFAttachmentView({ - container: container, - attachments: attachments, - downloadManager: new DownloadManager() - }); - self.attachments.render(); - document.getElementById('viewAttachments').disabled = !attachments; - - if (!attachments && !container.classList.contains('hidden')) { - self.switchSidebarView('thumbs'); + var match = { + begin: { + divIdx: i, + offset: matchIdx - iIndex + } + }; + if (matchesLength) { + matchIdx += matchesLength[m]; + } else { + matchIdx += queryLen; } - if (attachments && - self.preferenceSidebarViewOnLoad === SidebarView.ATTACHMENTS) { - self.switchSidebarView('attachments', true); + while (i !== end && matchIdx > iIndex + textContentItemsStr[i].length) { + iIndex += textContentItemsStr[i].length; + i++; } - }); - }); - - if (self.preferenceSidebarViewOnLoad === SidebarView.THUMBS) { - Promise.all([firstPagePromise, onePageRendered]).then(function () { - self.switchSidebarView('thumbs', true); - }); + match.end = { + divIdx: i, + offset: matchIdx - iIndex + }; + ret.push(match); + } + return ret; } - - pdfDocument.getMetadata().then(function(data) { - var info = data.info, metadata = data.metadata; - self.documentInfo = info; - self.metadata = metadata; - - // Provides some basic debug information - console.log('PDF ' + pdfDocument.fingerprint + ' [' + - info.PDFFormatVersion + ' ' + (info.Producer || '-').trim() + - ' / ' + (info.Creator || '-').trim() + ']' + - ' (PDF.js: ' + (PDFJS.version || '-') + - (!PDFJS.disableWebGL ? ' [WebGL]' : '') + ')'); - - var pdfTitle; - if (metadata && metadata.has('dc:title')) { - var title = metadata.get('dc:title'); - // Ghostscript sometimes return 'Untitled', sets the title to 'Untitled' - if (title !== 'Untitled') { - pdfTitle = title; + }, { + key: 'renderMatches', + value: function renderMatches(matches) { + if (matches.length === 0) { + return; + } + var textContentItemsStr = this.textContentItemsStr; + var textDivs = this.textDivs; + var prevEnd = null; + var pageIdx = this.pageIdx; + var isSelectedPage = this.findController === null ? false : pageIdx === this.findController.selected.pageIdx; + var selectedMatchIdx = this.findController === null ? -1 : this.findController.selected.matchIdx; + var highlightAll = this.findController === null ? false : this.findController.state.highlightAll; + var infinity = { + divIdx: -1, + offset: undefined + }; + function beginText(begin, className) { + var divIdx = begin.divIdx; + textDivs[divIdx].textContent = ''; + appendTextToDiv(divIdx, 0, begin.offset, className); + } + function appendTextToDiv(divIdx, fromOffset, toOffset, className) { + var div = textDivs[divIdx]; + var content = textContentItemsStr[divIdx].substring(fromOffset, toOffset); + var node = document.createTextNode(content); + if (className) { + var span = document.createElement('span'); + span.className = className; + span.appendChild(node); + div.appendChild(span); + return; } + div.appendChild(node); } - - if (!pdfTitle && info && info['Title']) { - pdfTitle = info['Title']; + var i0 = selectedMatchIdx, + i1 = i0 + 1; + if (highlightAll) { + i0 = 0; + i1 = matches.length; + } else if (!isSelectedPage) { + return; } - - if (pdfTitle) { - self.setTitle(pdfTitle + ' - ' + document.title); + for (var i = i0; i < i1; i++) { + var match = matches[i]; + var begin = match.begin; + var end = match.end; + var isSelected = isSelectedPage && i === selectedMatchIdx; + var highlightSuffix = isSelected ? ' selected' : ''; + if (this.findController) { + this.findController.updateMatchPosition(pageIdx, i, textDivs, begin.divIdx); + } + 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) { + appendTextToDiv(begin.divIdx, begin.offset, end.offset, 'highlight' + highlightSuffix); + } else { + appendTextToDiv(begin.divIdx, begin.offset, infinity.offset, 'highlight begin' + highlightSuffix); + for (var n0 = begin.divIdx + 1, n1 = end.divIdx; n0 < n1; n0++) { + textDivs[n0].className = 'highlight middle' + highlightSuffix; + } + beginText(end, 'highlight end' + highlightSuffix); + } + prevEnd = end; } - - if (info.IsAcroFormPresent) { - console.warn('Warning: AcroForm/XFA is not supported'); - self.fallback(PDFJS.UNSUPPORTED_FEATURES.forms); + if (prevEnd) { + appendTextToDiv(prevEnd.divIdx, prevEnd.offset, infinity.offset); } - - }); - }, - - setInitialView: function pdfViewSetInitialView(storedHash, scale) { - this.isInitialViewSet = true; - - // When opening a new file, when one is already loaded in the viewer, - // ensure that the 'pageNumber' element displays the correct value. - document.getElementById('pageNumber').value = - this.pdfViewer.currentPageNumber; - - if (this.initialDestination) { - this.pdfLinkService.navigateTo(this.initialDestination); - this.initialDestination = null; - } else if (this.initialBookmark) { - this.pdfLinkService.setHash(this.initialBookmark); - this.pdfHistory.push({ hash: this.initialBookmark }, true); - this.initialBookmark = null; - } else if (storedHash) { - this.pdfLinkService.setHash(storedHash); - } else if (scale) { - this.pdfViewer.currentScaleValue = scale; - this.page = 1; - } - - if (!this.pdfViewer.currentScaleValue) { - // Scale was not initialized: invalid bookmark or scale was not specified. - // Setting the default one. - this.pdfViewer.currentScaleValue = DEFAULT_SCALE_VALUE; - } - }, - - cleanup: function pdfViewCleanup() { - if (!this.pdfDocument) { - return; // run cleanup when document is loaded } - this.pdfViewer.cleanup(); - this.pdfThumbnailViewer.cleanup(); - this.pdfDocument.cleanup(); - }, - - forceRendering: function pdfViewForceRendering() { - this.pdfRenderingQueue.printing = this.printing; - this.pdfRenderingQueue.isThumbnailViewEnabled = this.sidebarOpen; - this.pdfRenderingQueue.renderHighestPriority(); - }, - - refreshThumbnailViewer: function pdfViewRefreshThumbnailViewer() { - var pdfViewer = this.pdfViewer; - var thumbnailViewer = this.pdfThumbnailViewer; - - // set thumbnail images of rendered pages - var pagesCount = pdfViewer.pagesCount; - for (var pageIndex = 0; pageIndex < pagesCount; pageIndex++) { - var pageView = pdfViewer.getPageView(pageIndex); - if (pageView && pageView.renderingState === RenderingStates.FINISHED) { - var thumbnailView = thumbnailViewer.getThumbnail(pageIndex); - thumbnailView.setImage(pageView); + }, { + key: 'updateMatches', + value: function updateMatches() { + if (!this.renderingDone) { + return; } + var matches = this.matches; + var textDivs = this.textDivs; + var textContentItemsStr = this.textContentItemsStr; + var clearedUntilDivIdx = -1; + for (var i = 0, len = matches.length; i < len; i++) { + var match = matches[i]; + var begin = Math.max(clearedUntilDivIdx, match.begin.divIdx); + for (var n = begin, end = match.end.divIdx; n <= end; n++) { + var div = textDivs[n]; + div.textContent = textContentItemsStr[n]; + div.className = ''; + } + clearedUntilDivIdx = match.end.divIdx + 1; + } + if (this.findController === null || !this.findController.active) { + return; + } + var pageMatches = void 0, + pageMatchesLength = void 0; + if (this.findController !== null) { + pageMatches = this.findController.pageMatches[this.pageIdx] || null; + pageMatchesLength = this.findController.pageMatchesLength ? this.findController.pageMatchesLength[this.pageIdx] || null : null; + } + this.matches = this.convertMatches(pageMatches, pageMatchesLength); + this.renderMatches(this.matches); } + }, { + key: '_bindMouse', + value: function _bindMouse() { + var _this2 = this; - thumbnailViewer.scrollThumbnailIntoView(this.page); - }, - - switchSidebarView: function pdfViewSwitchSidebarView(view, openSidebar) { - if (openSidebar && !this.sidebarOpen) { - document.getElementById('sidebarToggle').click(); - } - var thumbsView = document.getElementById('thumbnailView'); - var outlineView = document.getElementById('outlineView'); - var attachmentsView = document.getElementById('attachmentsView'); - - var thumbsButton = document.getElementById('viewThumbnail'); - var outlineButton = document.getElementById('viewOutline'); - var attachmentsButton = document.getElementById('viewAttachments'); - - switch (view) { - case 'thumbs': - var wasAnotherViewVisible = thumbsView.classList.contains('hidden'); - - thumbsButton.classList.add('toggled'); - outlineButton.classList.remove('toggled'); - attachmentsButton.classList.remove('toggled'); - thumbsView.classList.remove('hidden'); - outlineView.classList.add('hidden'); - attachmentsView.classList.add('hidden'); - - this.forceRendering(); - - if (wasAnotherViewVisible) { - this.pdfThumbnailViewer.ensureThumbnailVisible(this.page); + var div = this.textLayerDiv; + var expandDivsTimer = null; + div.addEventListener('mousedown', function (evt) { + if (_this2.enhanceTextSelection && _this2.textLayerRenderTask) { + _this2.textLayerRenderTask.expandTextDivs(true); + if (expandDivsTimer) { + clearTimeout(expandDivsTimer); + expandDivsTimer = null; + } + return; } - break; - - case 'outline': - if (outlineButton.disabled) { + var end = div.querySelector('.endOfContent'); + if (!end) { return; } - thumbsButton.classList.remove('toggled'); - outlineButton.classList.add('toggled'); - attachmentsButton.classList.remove('toggled'); - thumbsView.classList.add('hidden'); - outlineView.classList.remove('hidden'); - attachmentsView.classList.add('hidden'); - break; - - case 'attachments': - if (attachmentsButton.disabled) { + var adjustTop = evt.target !== div; + adjustTop = adjustTop && window.getComputedStyle(end).getPropertyValue('-moz-user-select') !== 'none'; + if (adjustTop) { + var divBounds = div.getBoundingClientRect(); + var r = Math.max(0, (evt.pageY - divBounds.top) / divBounds.height); + end.style.top = (r * 100).toFixed(2) + '%'; + } + end.classList.add('active'); + }); + div.addEventListener('mouseup', function () { + if (_this2.enhanceTextSelection && _this2.textLayerRenderTask) { + expandDivsTimer = setTimeout(function () { + if (_this2.textLayerRenderTask) { + _this2.textLayerRenderTask.expandTextDivs(false); + } + expandDivsTimer = null; + }, EXPAND_DIVS_TIMEOUT); return; } - thumbsButton.classList.remove('toggled'); - outlineButton.classList.remove('toggled'); - attachmentsButton.classList.add('toggled'); - thumbsView.classList.add('hidden'); - outlineView.classList.add('hidden'); - attachmentsView.classList.remove('hidden'); - break; - } - }, - - beforePrint: function pdfViewSetupBeforePrint() { - if (!this.supportsPrinting) { - var printMessage = mozL10n.get('printing_not_supported', null, - 'Warning: Printing is not fully supported by this browser.'); - this.error(printMessage); - return; - } - - var alertNotReady = false; - var i, ii; - if (!this.pdfDocument || !this.pagesCount) { - alertNotReady = true; - } else { - for (i = 0, ii = this.pagesCount; i < ii; ++i) { - if (!this.pdfViewer.getPageView(i).pdfPage) { - alertNotReady = true; - break; + var end = div.querySelector('.endOfContent'); + if (!end) { + return; } - } - } - if (alertNotReady) { - var notReadyMessage = mozL10n.get('printing_not_ready', null, - 'Warning: The PDF is not fully loaded for printing.'); - window.alert(notReadyMessage); - return; - } - - this.printing = true; - this.forceRendering(); - - var body = document.querySelector('body'); - body.setAttribute('data-mozPrintCallback', true); - - if (!this.hasEqualPageSizes) { - console.warn('Not all pages have the same size. The printed result ' + - 'may be incorrect!'); - } - - // Insert a @page + size rule to make sure that the page size is correctly - // set. Note that we assume that all pages have the same size, because - // variable-size pages are not supported yet (at least in Chrome & Firefox). - // TODO(robwu): Use named pages when size calculation bugs get resolved - // (e.g. https://crbug.com/355116) AND when support for named pages is - // added (http://www.w3.org/TR/css3-page/#using-named-pages). - // In browsers where @page + size is not supported (such as Firefox, - // https://bugzil.la/851441), the next stylesheet will be ignored and the - // user has to select the correct paper size in the UI if wanted. - this.pageStyleSheet = document.createElement('style'); - var pageSize = this.pdfViewer.getPageView(0).pdfPage.getViewport(1); - this.pageStyleSheet.textContent = - // "size:<width> <height>" is what we need. But also add "A4" because - // Firefox incorrectly reports support for the other value. - '@supports ((size:A4) and (size:1pt 1pt)) {' + - '@page { size: ' + pageSize.width + 'pt ' + pageSize.height + 'pt;}' + - // The canvas and each ancestor node must have a height of 100% to make - // sure that each canvas is printed on exactly one page. - '#printContainer {height:100%}' + - '#printContainer > div {width:100% !important;height:100% !important;}' + - '}'; - body.appendChild(this.pageStyleSheet); - - for (i = 0, ii = this.pagesCount; i < ii; ++i) { - this.pdfViewer.getPageView(i).beforePrint(); + end.style.top = ''; + end.classList.remove('active'); + }); } + }]); - }, + return TextLayerBuilder; +}(); - // Whether all pages of the PDF have the same width and height. - get hasEqualPageSizes() { - var firstPage = this.pdfViewer.getPageView(0); - for (var i = 1, ii = this.pagesCount; i < ii; ++i) { - var pageView = this.pdfViewer.getPageView(i); - if (pageView.width !== firstPage.width || - pageView.height !== firstPage.height) { - return false; - } - } - return true; - }, +var DefaultTextLayerFactory = function () { + function DefaultTextLayerFactory() { + _classCallCheck(this, DefaultTextLayerFactory); + } - afterPrint: function pdfViewSetupAfterPrint() { - var div = document.getElementById('printContainer'); - while (div.hasChildNodes()) { - div.removeChild(div.lastChild); - } + _createClass(DefaultTextLayerFactory, [{ + key: 'createTextLayerBuilder', + value: function createTextLayerBuilder(textLayerDiv, pageIndex, viewport) { + var enhanceTextSelection = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; - if (this.pageStyleSheet && this.pageStyleSheet.parentNode) { - this.pageStyleSheet.parentNode.removeChild(this.pageStyleSheet); - this.pageStyleSheet = null; + return new TextLayerBuilder({ + textLayerDiv: textLayerDiv, + pageIndex: pageIndex, + viewport: viewport, + enhanceTextSelection: enhanceTextSelection + }); } + }]); - this.printing = false; - this.forceRendering(); - }, + return DefaultTextLayerFactory; +}(); - rotatePages: function pdfViewRotatePages(delta) { - var pageNumber = this.page; - this.pageRotation = (this.pageRotation + 360 + delta) % 360; - this.pdfViewer.pagesRotation = this.pageRotation; - this.pdfThumbnailViewer.pagesRotation = this.pageRotation; +exports.TextLayerBuilder = TextLayerBuilder; +exports.DefaultTextLayerFactory = DefaultTextLayerFactory; - this.forceRendering(); +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { - this.pdfViewer.scrollPageIntoView(pageNumber); - }, +"use strict"; - requestPresentationMode: function pdfViewRequestPresentationMode() { - if (!this.pdfPresentationMode) { - return; - } - this.pdfPresentationMode.request(); - }, - /** - * @param {number} delta - The delta value from the mouse event. - */ - scrollPresentationMode: function pdfViewScrollPresentationMode(delta) { - if (!this.pdfPresentationMode) { - return; - } - this.pdfPresentationMode.mouseScroll(delta); - } -}; -window.PDFView = PDFViewerApplication; // obsolete name, using it as an alias +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Toolbar = undefined; +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -var HOSTED_VIEWER_ORIGINS = ['null', - 'http://mozilla.github.io', 'https://mozilla.github.io']; -function validateFileURL(file) { - try { - var viewerOrigin = new URL(window.location.href).origin || 'null'; - if (HOSTED_VIEWER_ORIGINS.indexOf(viewerOrigin) >= 0) { - // Hosted or local viewer, allow for any file locations - return; - } - var fileOrigin = new URL(file, window.location.href).origin; - // Removing of the following line will not guarantee that the viewer will - // start accepting URLs from foreign origin -- CORS headers on the remote - // server must be properly configured. - if (fileOrigin !== viewerOrigin) { - throw new Error('file origin does not match viewer\'s'); - } - } catch (e) { - var message = e && e.message; - var loadingErrorMessage = mozL10n.get('loading_error', null, - 'An error occurred while loading the PDF.'); +var _ui_utils = __webpack_require__(0); - var moreInfo = { - message: message - }; - PDFViewerApplication.error(loadingErrorMessage, moreInfo); - throw e; - } -} +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function webViewerLoad(evt) { - configure(PDFJS); - PDFViewerApplication.initialize().then(webViewerInitialized); -} +var PAGE_NUMBER_LOADING_INDICATOR = 'visiblePageIsLoading'; +var SCALE_SELECT_CONTAINER_PADDING = 8; +var SCALE_SELECT_PADDING = 22; -function webViewerInitialized() { - var queryString = document.location.search.substring(1); - var params = parseQueryString(queryString); - var file = 'file' in params ? params.file : DEFAULT_URL; - validateFileURL(file); +var Toolbar = function () { + function Toolbar(options, mainContainer, eventBus) { + var l10n = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _ui_utils.NullL10n; - var fileInput = document.createElement('input'); - fileInput.id = 'fileInput'; - fileInput.className = 'fileInput'; - fileInput.setAttribute('type', 'file'); - fileInput.oncontextmenu = noContextMenuHandler; - document.body.appendChild(fileInput); + _classCallCheck(this, Toolbar); - if (!window.File || !window.FileReader || !window.FileList || !window.Blob) { - document.getElementById('openFile').setAttribute('hidden', 'true'); - document.getElementById('secondaryOpenFile').setAttribute('hidden', 'true'); - } else { - document.getElementById('fileInput').value = null; + this.toolbar = options.container; + this.mainContainer = mainContainer; + this.eventBus = eventBus; + this.l10n = l10n; + this.items = options; + this._wasLocalized = false; + this.reset(); + this._bindListeners(); } - var locale = PDFJS.locale || navigator.language; + _createClass(Toolbar, [{ + key: 'setPageNumber', + value: function setPageNumber(pageNumber, pageLabel) { + this.pageNumber = pageNumber; + this.pageLabel = pageLabel; + this._updateUIState(false); + } + }, { + key: 'setPagesCount', + value: function setPagesCount(pagesCount, hasPageLabels) { + this.pagesCount = pagesCount; + this.hasPageLabels = hasPageLabels; + this._updateUIState(true); + } + }, { + key: 'setPageScale', + value: function setPageScale(pageScaleValue, pageScale) { + this.pageScaleValue = pageScaleValue; + this.pageScale = pageScale; + this._updateUIState(false); + } + }, { + key: 'reset', + value: function reset() { + this.pageNumber = 0; + this.pageLabel = null; + this.hasPageLabels = false; + this.pagesCount = 0; + this.pageScaleValue = _ui_utils.DEFAULT_SCALE_VALUE; + this.pageScale = _ui_utils.DEFAULT_SCALE; + this._updateUIState(true); + } + }, { + key: '_bindListeners', + value: function _bindListeners() { + var _this = this; + + var eventBus = this.eventBus, + items = this.items; - if (PDFViewerApplication.preferencePdfBugEnabled) { - // Special debugging flags in the hash section of the URL. - var hash = document.location.hash.substring(1); - var hashParams = parseQueryString(hash); - - if ('disableworker' in hashParams) { - PDFJS.disableWorker = (hashParams['disableworker'] === 'true'); - } - if ('disablerange' in hashParams) { - PDFJS.disableRange = (hashParams['disablerange'] === 'true'); - } - if ('disablestream' in hashParams) { - PDFJS.disableStream = (hashParams['disablestream'] === 'true'); - } - if ('disableautofetch' in hashParams) { - PDFJS.disableAutoFetch = (hashParams['disableautofetch'] === 'true'); - } - if ('disablefontface' in hashParams) { - PDFJS.disableFontFace = (hashParams['disablefontface'] === 'true'); - } - if ('disablehistory' in hashParams) { - PDFJS.disableHistory = (hashParams['disablehistory'] === 'true'); - } - if ('webgl' in hashParams) { - PDFJS.disableWebGL = (hashParams['webgl'] !== 'true'); - } - if ('useonlycsszoom' in hashParams) { - PDFJS.useOnlyCssZoom = (hashParams['useonlycsszoom'] === 'true'); - } - if ('verbosity' in hashParams) { - PDFJS.verbosity = hashParams['verbosity'] | 0; - } - if ('ignorecurrentpositiononzoom' in hashParams) { - IGNORE_CURRENT_POSITION_ON_ZOOM = - (hashParams['ignorecurrentpositiononzoom'] === 'true'); - } - if ('locale' in hashParams) { - locale = hashParams['locale']; - } - if ('textlayer' in hashParams) { - switch (hashParams['textlayer']) { - case 'off': - PDFJS.disableTextLayer = true; - break; - case 'visible': - case 'shadow': - case 'hover': - var viewer = document.getElementById('viewer'); - viewer.classList.add('textLayer-' + hashParams['textlayer']); - break; - } + var self = this; + items.previous.addEventListener('click', function () { + eventBus.dispatch('previouspage'); + }); + items.next.addEventListener('click', function () { + eventBus.dispatch('nextpage'); + }); + items.zoomIn.addEventListener('click', function () { + eventBus.dispatch('zoomin'); + }); + items.zoomOut.addEventListener('click', function () { + eventBus.dispatch('zoomout'); + }); + items.pageNumber.addEventListener('click', function () { + this.select(); + }); + items.pageNumber.addEventListener('change', function () { + eventBus.dispatch('pagenumberchanged', { + source: self, + value: this.value + }); + }); + items.scaleSelect.addEventListener('change', function () { + if (this.value === 'custom') { + return; + } + eventBus.dispatch('scalechanged', { + source: self, + value: this.value + }); + }); + items.presentationModeButton.addEventListener('click', function () { + eventBus.dispatch('presentationmode'); + }); + items.openFile.addEventListener('click', function () { + eventBus.dispatch('openfile'); + }); + items.print.addEventListener('click', function () { + eventBus.dispatch('print'); + }); + items.download.addEventListener('click', function () { + eventBus.dispatch('download'); + }); + items.scaleSelect.oncontextmenu = _ui_utils.noContextMenuHandler; + eventBus.on('localized', function () { + _this._localized(); + }); } - if ('pdfbug' in hashParams) { - PDFJS.pdfBug = true; - var pdfBug = hashParams['pdfbug']; - var enabled = pdfBug.split(','); - PDFBug.enable(enabled); - PDFBug.init(); + }, { + key: '_localized', + value: function _localized() { + this._wasLocalized = true; + this._adjustScaleWidth(); + this._updateUIState(true); } - } - - mozL10n.setLanguage(locale); + }, { + key: '_updateUIState', + value: function _updateUIState() { + var resetNumPages = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - if (!PDFViewerApplication.supportsPrinting) { - document.getElementById('print').classList.add('hidden'); - document.getElementById('secondaryPrint').classList.add('hidden'); - } - - if (!PDFViewerApplication.supportsFullscreen) { - document.getElementById('presentationMode').classList.add('hidden'); - document.getElementById('secondaryPresentationMode'). - classList.add('hidden'); - } - - if (PDFViewerApplication.supportsIntegratedFind) { - document.getElementById('viewFind').classList.add('hidden'); - } - - // Suppress context menus for some controls - document.getElementById('scaleSelect').oncontextmenu = noContextMenuHandler; + if (!this._wasLocalized) { + return; + } + var pageNumber = this.pageNumber, + pagesCount = this.pagesCount, + items = this.items; - var mainContainer = document.getElementById('mainContainer'); - var outerContainer = document.getElementById('outerContainer'); - mainContainer.addEventListener('transitionend', function(e) { - if (e.target === mainContainer) { - var event = document.createEvent('UIEvents'); - event.initUIEvent('resize', false, false, window, 0); - window.dispatchEvent(event); - outerContainer.classList.remove('sidebarMoving'); + var scaleValue = (this.pageScaleValue || this.pageScale).toString(); + var scale = this.pageScale; + if (resetNumPages) { + if (this.hasPageLabels) { + items.pageNumber.type = 'text'; + } else { + items.pageNumber.type = 'number'; + this.l10n.get('of_pages', { pagesCount: pagesCount }, 'of {{pagesCount}}').then(function (msg) { + items.numPages.textContent = msg; + }); + } + items.pageNumber.max = pagesCount; + } + if (this.hasPageLabels) { + items.pageNumber.value = this.pageLabel; + this.l10n.get('page_of_pages', { + pageNumber: pageNumber, + pagesCount: pagesCount + }, '({{pageNumber}} of {{pagesCount}})').then(function (msg) { + items.numPages.textContent = msg; + }); + } else { + items.pageNumber.value = pageNumber; + } + items.previous.disabled = pageNumber <= 1; + items.next.disabled = pageNumber >= pagesCount; + items.zoomOut.disabled = scale <= _ui_utils.MIN_SCALE; + items.zoomIn.disabled = scale >= _ui_utils.MAX_SCALE; + var customScale = Math.round(scale * 10000) / 100; + this.l10n.get('page_scale_percent', { scale: customScale }, '{{scale}}%').then(function (msg) { + var options = items.scaleSelect.options; + var predefinedValueFound = false; + for (var i = 0, ii = options.length; i < ii; i++) { + var option = options[i]; + if (option.value !== scaleValue) { + option.selected = false; + continue; + } + option.selected = true; + predefinedValueFound = true; + } + if (!predefinedValueFound) { + items.customScaleOption.textContent = msg; + items.customScaleOption.selected = true; + } + }); } - }, true); - - document.getElementById('sidebarToggle').addEventListener('click', - function() { - this.classList.toggle('toggled'); - outerContainer.classList.add('sidebarMoving'); - outerContainer.classList.toggle('sidebarOpen'); - PDFViewerApplication.sidebarOpen = - outerContainer.classList.contains('sidebarOpen'); - if (PDFViewerApplication.sidebarOpen) { - PDFViewerApplication.refreshThumbnailViewer(); - } - PDFViewerApplication.forceRendering(); - }); - - document.getElementById('viewThumbnail').addEventListener('click', - function() { - PDFViewerApplication.switchSidebarView('thumbs'); - }); - - document.getElementById('viewOutline').addEventListener('click', - function() { - PDFViewerApplication.switchSidebarView('outline'); - }); - - document.getElementById('viewOutline').addEventListener('dblclick', - function() { - PDFViewerApplication.outline.toggleOutlineTree(); - }); - - document.getElementById('viewAttachments').addEventListener('click', - function() { - PDFViewerApplication.switchSidebarView('attachments'); - }); - - document.getElementById('previous').addEventListener('click', - function() { - PDFViewerApplication.page--; - }); - - document.getElementById('next').addEventListener('click', - function() { - PDFViewerApplication.page++; - }); - - document.getElementById('zoomIn').addEventListener('click', - function() { - PDFViewerApplication.zoomIn(); - }); - - document.getElementById('zoomOut').addEventListener('click', - function() { - PDFViewerApplication.zoomOut(); - }); - - document.getElementById('pageNumber').addEventListener('click', function() { - this.select(); - }); - - document.getElementById('pageNumber').addEventListener('change', function() { - // Handle the user inputting a floating point number. - PDFViewerApplication.page = (this.value | 0); + }, { + key: 'updateLoadingIndicatorState', + value: function updateLoadingIndicatorState() { + var loading = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - if (this.value !== (this.value | 0).toString()) { - this.value = PDFViewerApplication.page; + var pageNumberInput = this.items.pageNumber; + if (loading) { + pageNumberInput.classList.add(PAGE_NUMBER_LOADING_INDICATOR); + } else { + pageNumberInput.classList.remove(PAGE_NUMBER_LOADING_INDICATOR); + } } - }); - - document.getElementById('scaleSelect').addEventListener('change', function() { - if (this.value === 'custom') { - return; + }, { + key: '_adjustScaleWidth', + value: function _adjustScaleWidth() { + var container = this.items.scaleSelectContainer; + var select = this.items.scaleSelect; + _ui_utils.animationStarted.then(function () { + if (container.clientWidth === 0) { + container.setAttribute('style', 'display: inherit;'); + } + if (container.clientWidth > 0) { + select.setAttribute('style', 'min-width: inherit;'); + var width = select.clientWidth + SCALE_SELECT_CONTAINER_PADDING; + select.setAttribute('style', 'min-width: ' + (width + SCALE_SELECT_PADDING) + 'px;'); + container.setAttribute('style', 'min-width: ' + width + 'px; ' + 'max-width: ' + width + 'px;'); + } + }); } - PDFViewerApplication.pdfViewer.currentScaleValue = this.value; - }); + }]); - document.getElementById('presentationMode').addEventListener('click', - SecondaryToolbar.presentationModeClick.bind(SecondaryToolbar)); + return Toolbar; +}(); - document.getElementById('openFile').addEventListener('click', - SecondaryToolbar.openFileClick.bind(SecondaryToolbar)); - - document.getElementById('print').addEventListener('click', - SecondaryToolbar.printClick.bind(SecondaryToolbar)); - - document.getElementById('download').addEventListener('click', - SecondaryToolbar.downloadClick.bind(SecondaryToolbar)); - - - if (file && file.lastIndexOf('file:', 0) === 0) { - // file:-scheme. Load the contents in the main thread because QtWebKit - // cannot load file:-URLs in a Web Worker. file:-URLs are usually loaded - // very quickly, so there is no need to set up progress event listeners. - PDFViewerApplication.setTitleUsingUrl(file); - var xhr = new XMLHttpRequest(); - xhr.onload = function() { - PDFViewerApplication.open(new Uint8Array(xhr.response)); - }; - try { - xhr.open('GET', file); - xhr.responseType = 'arraybuffer'; - xhr.send(); - } catch (e) { - PDFViewerApplication.error(mozL10n.get('loading_error', null, - 'An error occurred while loading the PDF.'), e); - } - return; - } +exports.Toolbar = Toolbar; - if (file) { - PDFViewerApplication.open(file); - } -} +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { -document.addEventListener('DOMContentLoaded', webViewerLoad, true); +"use strict"; -document.addEventListener('pagerendered', function (e) { - var pageNumber = e.detail.pageNumber; - var pageIndex = pageNumber - 1; - var pageView = PDFViewerApplication.pdfViewer.getPageView(pageIndex); - if (PDFViewerApplication.sidebarOpen) { - var thumbnailView = PDFViewerApplication.pdfThumbnailViewer. - getThumbnail(pageIndex); - thumbnailView.setImage(pageView); - } +Object.defineProperty(exports, "__esModule", { + value: true +}); - if (PDFJS.pdfBug && Stats.enabled && pageView.stats) { - Stats.add(pageNumber, pageView.stats); - } +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - if (pageView.error) { - PDFViewerApplication.error(mozL10n.get('rendering_error', null, - 'An error occurred while rendering the page.'), pageView.error); - } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - // If the page is still visible when it has finished rendering, - // ensure that the page number input loading indicator is hidden. - if (pageNumber === PDFViewerApplication.page) { - var pageNumberInput = document.getElementById('pageNumber'); - pageNumberInput.classList.remove(PAGE_NUMBER_LOADING_INDICATOR); - } +var DEFAULT_VIEW_HISTORY_CACHE_SIZE = 20; -}, true); +var ViewHistory = function () { + function ViewHistory(fingerprint) { + var _this = this; -document.addEventListener('textlayerrendered', function (e) { - var pageIndex = e.detail.pageNumber - 1; - var pageView = PDFViewerApplication.pdfViewer.getPageView(pageIndex); + var cacheSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_VIEW_HISTORY_CACHE_SIZE; -}, true); + _classCallCheck(this, ViewHistory); -document.addEventListener('pagemode', function (evt) { - if (!PDFViewerApplication.initialized) { - return; - } - // Handle the 'pagemode' hash parameter, see also `PDFLinkService_setHash`. - var mode = evt.detail.mode; - switch (mode) { - case 'bookmarks': - // Note: Our code calls this property 'outline', even though the - // Open Parameter specification calls it 'bookmarks'. - mode = 'outline'; - /* falls through */ - case 'thumbs': - case 'attachments': - PDFViewerApplication.switchSidebarView(mode, true); - break; - case 'none': - if (PDFViewerApplication.sidebarOpen) { - document.getElementById('sidebarToggle').click(); + this.fingerprint = fingerprint; + this.cacheSize = cacheSize; + this._initializedPromise = this._readFromStorage().then(function (databaseStr) { + var database = JSON.parse(databaseStr || '{}'); + if (!('files' in database)) { + database.files = []; } - break; - } -}, true); - -document.addEventListener('namedaction', function (e) { - if (!PDFViewerApplication.initialized) { - return; - } - // Processing couple of named actions that might be useful. - // See also PDFLinkService.executeNamedAction - var action = e.detail.action; - switch (action) { - case 'GoToPage': - document.getElementById('pageNumber').focus(); - break; - - case 'Find': - if (!PDFViewerApplication.supportsIntegratedFind) { - PDFViewerApplication.findBar.toggle(); + if (database.files.length >= _this.cacheSize) { + database.files.shift(); } - break; - } -}, true); - -window.addEventListener('presentationmodechanged', function (e) { - var active = e.detail.active; - var switchInProgress = e.detail.switchInProgress; - PDFViewerApplication.pdfViewer.presentationModeState = - switchInProgress ? PresentationModeState.CHANGING : - active ? PresentationModeState.FULLSCREEN : PresentationModeState.NORMAL; -}); - -window.addEventListener('updateviewarea', function (evt) { - if (!PDFViewerApplication.initialized) { - return; - } - var location = evt.location; - - PDFViewerApplication.store.initializedPromise.then(function() { - PDFViewerApplication.store.setMultiple({ - 'exists': true, - 'page': location.pageNumber, - 'zoom': location.scale, - 'scrollLeft': location.left, - 'scrollTop': location.top - }).catch(function() { - // unable to write to storage + var index = void 0; + for (var i = 0, length = database.files.length; i < length; i++) { + var branch = database.files[i]; + if (branch.fingerprint === _this.fingerprint) { + index = i; + break; + } + } + if (typeof index !== 'number') { + index = database.files.push({ fingerprint: _this.fingerprint }) - 1; + } + _this.file = database.files[index]; + _this.database = database; }); - }); - var href = - PDFViewerApplication.pdfLinkService.getAnchorUrl(location.pdfOpenParams); - document.getElementById('viewBookmark').href = href; - document.getElementById('secondaryViewBookmark').href = href; - - // Update the current bookmark in the browsing history. - PDFViewerApplication.pdfHistory.updateCurrentBookmark(location.pdfOpenParams, - location.pageNumber); - - // Show/hide the loading indicator in the page number input element. - var pageNumberInput = document.getElementById('pageNumber'); - var currentPage = - PDFViewerApplication.pdfViewer.getPageView(PDFViewerApplication.page - 1); - - if (currentPage.renderingState === RenderingStates.FINISHED) { - pageNumberInput.classList.remove(PAGE_NUMBER_LOADING_INDICATOR); - } else { - pageNumberInput.classList.add(PAGE_NUMBER_LOADING_INDICATOR); - } -}, true); - -window.addEventListener('resize', function webViewerResize(evt) { - if (PDFViewerApplication.initialized) { - var currentScaleValue = PDFViewerApplication.pdfViewer.currentScaleValue; - if (currentScaleValue === 'auto' || - currentScaleValue === 'page-fit' || - currentScaleValue === 'page-width') { - // Note: the scale is constant for 'page-actual'. - PDFViewerApplication.pdfViewer.currentScaleValue = currentScaleValue; - } else if (!currentScaleValue) { - // Normally this shouldn't happen, but if the scale wasn't initialized - // we set it to the default value in order to prevent any issues. - // (E.g. the document being rendered with the wrong scale on load.) - PDFViewerApplication.pdfViewer.currentScaleValue = DEFAULT_SCALE_VALUE; - } - PDFViewerApplication.pdfViewer.update(); - } - - // Set the 'max-height' CSS property of the secondary toolbar. - SecondaryToolbar.setMaxHeight(document.getElementById('viewerContainer')); -}); - -window.addEventListener('hashchange', function webViewerHashchange(evt) { - if (PDFViewerApplication.pdfHistory.isHashChangeUnlocked) { - var hash = document.location.hash.substring(1); - if (!hash) { - return; - } - if (!PDFViewerApplication.isInitialViewSet) { - PDFViewerApplication.initialBookmark = hash; - } else { - PDFViewerApplication.pdfLinkService.setHash(hash); - } - } -}); - -window.addEventListener('change', function webViewerChange(evt) { - var files = evt.target.files; - if (!files || files.length === 0) { - return; - } - var file = files[0]; - - if (!PDFJS.disableCreateObjectURL && - typeof URL !== 'undefined' && URL.createObjectURL) { - PDFViewerApplication.open(URL.createObjectURL(file)); - } else { - // Read the local file into a Uint8Array. - var fileReader = new FileReader(); - fileReader.onload = function webViewerChangeFileReaderOnload(evt) { - var buffer = evt.target.result; - var uint8Array = new Uint8Array(buffer); - PDFViewerApplication.open(uint8Array); - }; - fileReader.readAsArrayBuffer(file); - } - - PDFViewerApplication.setTitleUsingUrl(file.name); - - // URL does not reflect proper document location - hiding some icons. - document.getElementById('viewBookmark').setAttribute('hidden', 'true'); - document.getElementById('secondaryViewBookmark'). - setAttribute('hidden', 'true'); - document.getElementById('download').setAttribute('hidden', 'true'); - document.getElementById('secondaryDownload').setAttribute('hidden', 'true'); -}, true); - -function selectScaleOption(value) { - var options = document.getElementById('scaleSelect').options; - var predefinedValueFound = false; - for (var i = 0, ii = options.length; i < ii; i++) { - var option = options[i]; - if (option.value !== value) { - option.selected = false; - continue; - } - option.selected = true; - predefinedValueFound = true; - } - return predefinedValueFound; -} - -window.addEventListener('localized', function localized(evt) { - document.getElementsByTagName('html')[0].dir = mozL10n.getDirection(); - - PDFViewerApplication.animationStartedPromise.then(function() { - // Adjust the width of the zoom box to fit the content. - // Note: If the window is narrow enough that the zoom box is not visible, - // we temporarily show it to be able to adjust its width. - var container = document.getElementById('scaleSelectContainer'); - if (container.clientWidth === 0) { - container.setAttribute('style', 'display: inherit;'); - } - if (container.clientWidth > 0) { - var select = document.getElementById('scaleSelect'); - select.setAttribute('style', 'min-width: inherit;'); - var width = select.clientWidth + SCALE_SELECT_CONTAINER_PADDING; - select.setAttribute('style', 'min-width: ' + - (width + SCALE_SELECT_PADDING) + 'px;'); - container.setAttribute('style', 'min-width: ' + width + 'px; ' + - 'max-width: ' + width + 'px;'); - } - - // Set the 'max-height' CSS property of the secondary toolbar. - SecondaryToolbar.setMaxHeight(document.getElementById('viewerContainer')); - }); -}, true); - -window.addEventListener('scalechange', function scalechange(evt) { - document.getElementById('zoomOut').disabled = (evt.scale === MIN_SCALE); - document.getElementById('zoomIn').disabled = (evt.scale === MAX_SCALE); - - // Update the 'scaleSelect' DOM element. - var predefinedValueFound = selectScaleOption(evt.presetValue || - '' + evt.scale); - if (!predefinedValueFound) { - var customScaleOption = document.getElementById('customScaleOption'); - var customScale = Math.round(evt.scale * 10000) / 100; - customScaleOption.textContent = - mozL10n.get('page_scale_percent', { scale: customScale }, '{{scale}}%'); - customScaleOption.selected = true; - } - if (!PDFViewerApplication.initialized) { - return; } - PDFViewerApplication.pdfViewer.update(); -}, true); - -window.addEventListener('pagechange', function pagechange(evt) { - var page = evt.pageNumber; - if (evt.previousPageNumber !== page) { - document.getElementById('pageNumber').value = page; - if (PDFViewerApplication.sidebarOpen) { - PDFViewerApplication.pdfThumbnailViewer.scrollThumbnailIntoView(page); - } - } - var numPages = PDFViewerApplication.pagesCount; - - document.getElementById('previous').disabled = (page <= 1); - document.getElementById('next').disabled = (page >= numPages); - - document.getElementById('firstPage').disabled = (page <= 1); - document.getElementById('lastPage').disabled = (page >= numPages); - - // we need to update stats - if (PDFJS.pdfBug && Stats.enabled) { - var pageView = PDFViewerApplication.pdfViewer.getPageView(page - 1); - if (pageView.stats) { - Stats.add(page, pageView.stats); - } - } -}, true); - -function handleMouseWheel(evt) { - var MOUSE_WHEEL_DELTA_FACTOR = 40; - var ticks = (evt.type === 'DOMMouseScroll') ? -evt.detail : - evt.wheelDelta / MOUSE_WHEEL_DELTA_FACTOR; - var direction = (ticks < 0) ? 'zoomOut' : 'zoomIn'; - - var pdfViewer = PDFViewerApplication.pdfViewer; - if (pdfViewer.isInPresentationMode) { - evt.preventDefault(); - PDFViewerApplication.scrollPresentationMode(ticks * - MOUSE_WHEEL_DELTA_FACTOR); - } else if (evt.ctrlKey || evt.metaKey) { - var support = PDFViewerApplication.supportedMouseWheelZoomModifierKeys; - if ((evt.ctrlKey && !support.ctrlKey) || - (evt.metaKey && !support.metaKey)) { - return; - } - // Only zoom the pages, not the entire viewer. - evt.preventDefault(); - var previousScale = pdfViewer.currentScale; - - PDFViewerApplication[direction](Math.abs(ticks)); + _createClass(ViewHistory, [{ + key: '_writeToStorage', + value: function _writeToStorage() { + var _this2 = this; - var currentScale = pdfViewer.currentScale; - if (previousScale !== currentScale) { - // After scaling the page via zoomIn/zoomOut, the position of the upper- - // left corner is restored. When the mouse wheel is used, the position - // under the cursor should be restored instead. - var scaleCorrectionFactor = currentScale / previousScale - 1; - var rect = pdfViewer.container.getBoundingClientRect(); - var dx = evt.clientX - rect.left; - var dy = evt.clientY - rect.top; - pdfViewer.container.scrollLeft += dx * scaleCorrectionFactor; - pdfViewer.container.scrollTop += dy * scaleCorrectionFactor; + return new Promise(function (resolve) { + var databaseStr = JSON.stringify(_this2.database); + localStorage.setItem('pdfjs.history', databaseStr); + resolve(); + }); } - } -} - -window.addEventListener('DOMMouseScroll', handleMouseWheel); -window.addEventListener('mousewheel', handleMouseWheel); - -window.addEventListener('click', function click(evt) { - if (SecondaryToolbar.opened && - PDFViewerApplication.pdfViewer.containsElement(evt.target)) { - SecondaryToolbar.close(); - } -}, false); - -window.addEventListener('keydown', function keydown(evt) { - if (OverlayManager.active) { - return; - } - - var handled = false; - var cmd = (evt.ctrlKey ? 1 : 0) | - (evt.altKey ? 2 : 0) | - (evt.shiftKey ? 4 : 0) | - (evt.metaKey ? 8 : 0); - - var pdfViewer = PDFViewerApplication.pdfViewer; - var isViewerInPresentationMode = pdfViewer && pdfViewer.isInPresentationMode; - - // First, handle the key bindings that are independent whether an input - // control is selected or not. - if (cmd === 1 || cmd === 8 || cmd === 5 || cmd === 12) { - // either CTRL or META key with optional SHIFT. - switch (evt.keyCode) { - case 70: // f - if (!PDFViewerApplication.supportsIntegratedFind) { - PDFViewerApplication.findBar.open(); - handled = true; - } - break; - case 71: // g - if (!PDFViewerApplication.supportsIntegratedFind) { - PDFViewerApplication.findBar.dispatchEvent('again', - cmd === 5 || cmd === 12); - handled = true; - } - break; - case 61: // FF/Mac '=' - case 107: // FF '+' and '=' - case 187: // Chrome '+' - case 171: // FF with German keyboard - if (!isViewerInPresentationMode) { - PDFViewerApplication.zoomIn(); - } - handled = true; - break; - case 173: // FF/Mac '-' - case 109: // FF '-' - case 189: // Chrome '-' - if (!isViewerInPresentationMode) { - PDFViewerApplication.zoomOut(); - } - handled = true; - break; - case 48: // '0' - case 96: // '0' on Numpad of Swedish keyboard - if (!isViewerInPresentationMode) { - // keeping it unhandled (to restore page zoom to 100%) - setTimeout(function () { - // ... and resetting the scale after browser adjusts its scale - pdfViewer.currentScaleValue = DEFAULT_SCALE_VALUE; - }); - handled = false; + }, { + key: '_readFromStorage', + value: function _readFromStorage() { + return new Promise(function (resolve) { + var value = localStorage.getItem('pdfjs.history'); + if (!value) { + var databaseStr = localStorage.getItem('database'); + if (databaseStr) { + try { + var database = JSON.parse(databaseStr); + if (typeof database.files[0].fingerprint === 'string') { + localStorage.setItem('pdfjs.history', databaseStr); + localStorage.removeItem('database'); + value = databaseStr; + } + } catch (ex) {} + } } - break; - } - } - - // CTRL or META without shift - if (cmd === 1 || cmd === 8) { - switch (evt.keyCode) { - case 83: // s - PDFViewerApplication.download(); - handled = true; - break; - } - } - - // CTRL+ALT or Option+Command - if (cmd === 3 || cmd === 10) { - switch (evt.keyCode) { - case 80: // p - PDFViewerApplication.requestPresentationMode(); - handled = true; - break; - case 71: // g - // focuses input#pageNumber field - document.getElementById('pageNumber').select(); - handled = true; - break; - } - } - - if (handled) { - evt.preventDefault(); - return; - } - - // Some shortcuts should not get handled if a control/input element - // is selected. - var curElement = document.activeElement || document.querySelector(':focus'); - var curElementTagName = curElement && curElement.tagName.toUpperCase(); - if (curElementTagName === 'INPUT' || - curElementTagName === 'TEXTAREA' || - curElementTagName === 'SELECT') { - // Make sure that the secondary toolbar is closed when Escape is pressed. - if (evt.keyCode !== 27) { // 'Esc' - return; + resolve(value); + }); } - } - var ensureViewerFocused = false; - - if (cmd === 0) { // no control key pressed at all. - switch (evt.keyCode) { - case 38: // up arrow - case 33: // pg up - case 8: // backspace - if (!isViewerInPresentationMode && - pdfViewer.currentScaleValue !== 'page-fit') { - break; - } - /* in presentation mode */ - /* falls through */ - case 37: // left arrow - // horizontal scrolling using arrow keys - if (pdfViewer.isHorizontalScrollbarEnabled) { - break; - } - /* falls through */ - case 75: // 'k' - case 80: // 'p' - PDFViewerApplication.page--; - handled = true; - break; - case 27: // esc key - if (SecondaryToolbar.opened) { - SecondaryToolbar.close(); - handled = true; - } - if (!PDFViewerApplication.supportsIntegratedFind && - PDFViewerApplication.findBar.opened) { - PDFViewerApplication.findBar.close(); - handled = true; - } - break; - case 40: // down arrow - case 34: // pg down - case 32: // spacebar - if (!isViewerInPresentationMode && - pdfViewer.currentScaleValue !== 'page-fit') { - break; - } - /* falls through */ - case 39: // right arrow - // horizontal scrolling using arrow keys - if (pdfViewer.isHorizontalScrollbarEnabled) { - break; - } - /* falls through */ - case 74: // 'j' - case 78: // 'n' - PDFViewerApplication.page++; - handled = true; - break; + }, { + key: 'set', + value: function set(name, val) { + var _this3 = this; - case 36: // home - if (isViewerInPresentationMode || PDFViewerApplication.page > 1) { - PDFViewerApplication.page = 1; - handled = true; - ensureViewerFocused = true; - } - break; - case 35: // end - if (isViewerInPresentationMode || (PDFViewerApplication.pdfDocument && - PDFViewerApplication.page < PDFViewerApplication.pagesCount)) { - PDFViewerApplication.page = PDFViewerApplication.pagesCount; - handled = true; - ensureViewerFocused = true; - } - break; - - case 72: // 'h' - if (!isViewerInPresentationMode) { - HandTool.toggle(); - } - break; - case 82: // 'r' - PDFViewerApplication.rotatePages(90); - break; + return this._initializedPromise.then(function () { + _this3.file[name] = val; + return _this3._writeToStorage(); + }); } - } + }, { + key: 'setMultiple', + value: function setMultiple(properties) { + var _this4 = this; - if (cmd === 4) { // shift-key - switch (evt.keyCode) { - case 32: // spacebar - if (!isViewerInPresentationMode && - pdfViewer.currentScaleValue !== 'page-fit') { - break; + return this._initializedPromise.then(function () { + for (var name in properties) { + _this4.file[name] = properties[name]; } - PDFViewerApplication.page--; - handled = true; - break; - - case 82: // 'r' - PDFViewerApplication.rotatePages(-90); - break; + return _this4._writeToStorage(); + }); } - } + }, { + key: 'get', + value: function get(name, defaultValue) { + var _this5 = this; - if (!handled && !isViewerInPresentationMode) { - // 33=Page Up 34=Page Down 35=End 36=Home - // 37=Left 38=Up 39=Right 40=Down - // 32=Spacebar - if ((evt.keyCode >= 33 && evt.keyCode <= 40) || - (evt.keyCode === 32 && curElementTagName !== 'BUTTON')) { - ensureViewerFocused = true; + return this._initializedPromise.then(function () { + var val = _this5.file[name]; + return val !== undefined ? val : defaultValue; + }); } - } + }, { + key: 'getMultiple', + value: function getMultiple(properties) { + var _this6 = this; - if (cmd === 2) { // alt-key - switch (evt.keyCode) { - case 37: // left arrow - if (isViewerInPresentationMode) { - PDFViewerApplication.pdfHistory.back(); - handled = true; + return this._initializedPromise.then(function () { + var values = Object.create(null); + for (var name in properties) { + var val = _this6.file[name]; + values[name] = val !== undefined ? val : properties[name]; } - break; - case 39: // right arrow - if (isViewerInPresentationMode) { - PDFViewerApplication.pdfHistory.forward(); - handled = true; - } - break; + return values; + }); } - } + }]); - if (ensureViewerFocused && !pdfViewer.containsElement(curElement)) { - // The page container is not focused, but a page navigation key has been - // pressed. Change the focus to the viewer container to make sure that - // navigation by keyboard works as expected. - pdfViewer.focus(); - } + return ViewHistory; +}(); - if (handled) { - evt.preventDefault(); - } -}); +exports.ViewHistory = ViewHistory; -window.addEventListener('beforeprint', function beforePrint(evt) { - PDFViewerApplication.beforePrint(); -}); +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { -window.addEventListener('afterprint', function afterPrint(evt) { - PDFViewerApplication.afterPrint(); -}); +"use strict"; -(function animationStartedClosure() { - // The offsetParent is not set until the pdf.js iframe or object is visible. - // Waiting for first animation. - PDFViewerApplication.animationStartedPromise = new Promise( - function (resolve) { - window.requestAnimationFrame(resolve); - }); -})(); +var DEFAULT_URL = 'compressed.tracemonkey-pldi-09.pdf'; +; +var pdfjsWebApp = void 0; +{ + pdfjsWebApp = __webpack_require__(4); +} +; +{ + __webpack_require__(8); +} +; +{ + __webpack_require__(9); +} +function getViewerConfiguration() { + return { + appContainer: document.body, + mainContainer: document.getElementById('viewerContainer'), + viewerContainer: document.getElementById('viewer'), + eventBus: null, + toolbar: { + container: document.getElementById('toolbarViewer'), + numPages: document.getElementById('numPages'), + pageNumber: document.getElementById('pageNumber'), + scaleSelectContainer: document.getElementById('scaleSelectContainer'), + scaleSelect: document.getElementById('scaleSelect'), + customScaleOption: document.getElementById('customScaleOption'), + previous: document.getElementById('previous'), + next: document.getElementById('next'), + zoomIn: document.getElementById('zoomIn'), + zoomOut: document.getElementById('zoomOut'), + viewFind: document.getElementById('viewFind'), + openFile: document.getElementById('openFile'), + print: document.getElementById('print'), + presentationModeButton: document.getElementById('presentationMode'), + download: document.getElementById('download'), + viewBookmark: document.getElementById('viewBookmark') + }, + secondaryToolbar: { + toolbar: document.getElementById('secondaryToolbar'), + toggleButton: document.getElementById('secondaryToolbarToggle'), + toolbarButtonContainer: document.getElementById('secondaryToolbarButtonContainer'), + presentationModeButton: document.getElementById('secondaryPresentationMode'), + openFileButton: document.getElementById('secondaryOpenFile'), + printButton: document.getElementById('secondaryPrint'), + downloadButton: document.getElementById('secondaryDownload'), + viewBookmarkButton: document.getElementById('secondaryViewBookmark'), + firstPageButton: document.getElementById('firstPage'), + lastPageButton: document.getElementById('lastPage'), + pageRotateCwButton: document.getElementById('pageRotateCw'), + pageRotateCcwButton: document.getElementById('pageRotateCcw'), + cursorSelectToolButton: document.getElementById('cursorSelectTool'), + cursorHandToolButton: document.getElementById('cursorHandTool'), + documentPropertiesButton: document.getElementById('documentProperties') + }, + fullscreen: { + contextFirstPage: document.getElementById('contextFirstPage'), + contextLastPage: document.getElementById('contextLastPage'), + contextPageRotateCw: document.getElementById('contextPageRotateCw'), + contextPageRotateCcw: document.getElementById('contextPageRotateCcw') + }, + sidebar: { + mainContainer: document.getElementById('mainContainer'), + outerContainer: document.getElementById('outerContainer'), + toggleButton: document.getElementById('sidebarToggle'), + thumbnailButton: document.getElementById('viewThumbnail'), + outlineButton: document.getElementById('viewOutline'), + attachmentsButton: document.getElementById('viewAttachments'), + thumbnailView: document.getElementById('thumbnailView'), + outlineView: document.getElementById('outlineView'), + attachmentsView: document.getElementById('attachmentsView') + }, + findBar: { + bar: document.getElementById('findbar'), + toggleButton: document.getElementById('viewFind'), + findField: document.getElementById('findInput'), + highlightAllCheckbox: document.getElementById('findHighlightAll'), + caseSensitiveCheckbox: document.getElementById('findMatchCase'), + findMsg: document.getElementById('findMsg'), + findResultsCount: document.getElementById('findResultsCount'), + findStatusIcon: document.getElementById('findStatusIcon'), + findPreviousButton: document.getElementById('findPrevious'), + findNextButton: document.getElementById('findNext') + }, + passwordOverlay: { + overlayName: 'passwordOverlay', + container: document.getElementById('passwordOverlay'), + label: document.getElementById('passwordText'), + input: document.getElementById('password'), + submitButton: document.getElementById('passwordSubmit'), + cancelButton: document.getElementById('passwordCancel') + }, + documentProperties: { + overlayName: 'documentPropertiesOverlay', + container: document.getElementById('documentPropertiesOverlay'), + closeButton: document.getElementById('documentPropertiesClose'), + fields: { + 'fileName': document.getElementById('fileNameField'), + 'fileSize': document.getElementById('fileSizeField'), + 'title': document.getElementById('titleField'), + 'author': document.getElementById('authorField'), + 'subject': document.getElementById('subjectField'), + 'keywords': document.getElementById('keywordsField'), + 'creationDate': document.getElementById('creationDateField'), + 'modificationDate': document.getElementById('modificationDateField'), + 'creator': document.getElementById('creatorField'), + 'producer': document.getElementById('producerField'), + 'version': document.getElementById('versionField'), + 'pageCount': document.getElementById('pageCountField') + } + }, + errorWrapper: { + container: document.getElementById('errorWrapper'), + errorMessage: document.getElementById('errorMessage'), + closeButton: document.getElementById('errorClose'), + errorMoreInfo: document.getElementById('errorMoreInfo'), + moreInfoButton: document.getElementById('errorShowMore'), + lessInfoButton: document.getElementById('errorShowLess') + }, + printContainer: document.getElementById('printContainer'), + openFileInputName: 'fileInput', + debuggerScriptPath: './debugger.js', + defaultUrl: DEFAULT_URL + }; +} +function webViewerLoad() { + var config = getViewerConfiguration(); + window.PDFViewerApplication = pdfjsWebApp.PDFViewerApplication; + pdfjsWebApp.PDFViewerApplication.run(config); +} +if (document.readyState === 'interactive' || document.readyState === 'complete') { + webViewerLoad(); +} else { + document.addEventListener('DOMContentLoaded', webViewerLoad, true); +} + +/***/ }) +/******/ ]); +//# sourceMappingURL=viewer.js.map
\ No newline at end of file diff --git a/vendor/pdfjs/web/viewer.js.map b/vendor/pdfjs/web/viewer.js.map new file mode 100644 index 0000000..018b089 --- /dev/null +++ b/vendor/pdfjs/web/viewer.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/bootstrap 67a151ebb5e544e5a40d","webpack:///web/ui_utils.js","webpack:///web/pdfjs.js","webpack:///web/dom_events.js","webpack:///web/pdf_rendering_queue.js","webpack:///web/app.js","webpack:///web/pdf_link_service.js","webpack:///web/pdf_cursor_tools.js","webpack:///web/pdf_find_controller.js","webpack:///web/genericcom.js","webpack:///web/pdf_print_service.js","webpack:///external/webL10n/l10n.js","webpack:///web/annotation_layer_builder.js","webpack:///web/download_manager.js","webpack:///web/genericl10n.js","webpack:///web/grab_to_pan.js","webpack:///web/overlay_manager.js","webpack:///web/password_prompt.js","webpack:///web/pdf_attachment_viewer.js","webpack:///web/pdf_document_properties.js","webpack:///web/pdf_find_bar.js","webpack:///web/pdf_history.js","webpack:///web/pdf_outline_viewer.js","webpack:///web/pdf_page_view.js","webpack:///web/pdf_presentation_mode.js","webpack:///web/pdf_sidebar.js","webpack:///web/pdf_thumbnail_view.js","webpack:///web/pdf_thumbnail_viewer.js","webpack:///web/pdf_viewer.js","webpack:///web/preferences.js","webpack:///web/secondary_toolbar.js","webpack:///web/text_layer_builder.js","webpack:///web/toolbar.js","webpack:///web/view_history.js","webpack:///web/viewer.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;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,aAAO;AACP,YAAM;AACN,YAAM;AACN,aAAO;AACP,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,aAAO;AACP,YAAM;AACN,YAAM;AACN,aAAO;AACP,aAAO;AACP,aAAO;AACP,aAAO;AACP,aAAO;AACP,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,aAAO;AACP,aAAO;AACP,YAAM;AACN,YAAM;AACN,aAAO;AACP,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,aAAO;AACP,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,aAAO;AACP,aAAO;AACP,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,aAAO;AACP,YAAM;AACN,aAAO;AACP,YAAM;AACN,YAAM;AACN,YAAM;AACN,aAAO;AACP,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,aAAO;AACP,YAAM;AACN,aAAO;AACP,aAAO;AACP,aAAO;AACP,YAAM;AACN,aAAO;AACP,aAAO;AACP,YAAM;AACN,YAAM;AACN,aAAO;AACP,YAAM;AACN,YAAM;AACN,aAAO;AACP,aAAO;AACP,aAAO;AACP,aAAO;AACP,aAAO;AACP,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,aAAO;AACP,YAAM;AACN,YAAM;AACN,YAAM;AACN,aAAO;AACP,YAAM;AACN,YAAM;AACN,aAAO;AACP,YAAM;AACN,YAAM;AACN,aAAO;AACP,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,YAAM;AACN,aAAO;AACP,YAAM;AACN,YAAM;AACN,YAAM;A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;AANvB;AAQjB;AACE,mBAAa;AACb,iBAAW,SAAS,eAAe;AACnC,mBAAa,SAAS,eAAe;AACrC;AACE,oBAAY,SAAS,eAAe;AACpC,oBAAY,SAAS,eAAe;AACpC,iBAAS,SAAS,eAAe;AACjC,kBAAU,SAAS,eAAe;AAClC,mBAAW,SAAS,eAAe;AACnC,oBAAY,SAAS,eAAe;AACpC,wBAAgB,SAAS,eAAe;AACxC,4BAAoB,SAAS,eAAe;AAC5C,mBAAW,SAAS,eAAe;AACnC,oBAAY,SAAS,eAAe;AACpC,mBAAW,SAAS,eAAe;AACnC,qBAAa,SAAS,eAAe;AAZ/B;AAJU;AAmBpB;AACE,iBAAW,SAAS,eAAe;AACnC,oBAAc,SAAS,eAAe;AACtC,mBAAa,SAAS,eAAe;AACrC,qBAAe,SAAS,eAAe;AACvC,sBAAgB,SAAS,eAAe;AACxC,sBAAgB,SAAS,eAAe;AAN5B;AAQd,oBAAgB,SAAS,eAAe;AACxC,uBAAmB;AACnB,wBAAoB;AACpB,gBAAY;AAhHP;AAzDT;AA6KA,SAAS,gBAAgB;AACvB,MAAI,SAAS;AAWX,SAAO,uBAAuB,YAAY;AAC1C,cAAY,qBAAqB,IAAI;AA1LzC;AA8LA,IAAI,SAAS,eAAe,iBACxB,SAAS,eAAe,YAAY;AACtC;AAFF,OAGO;AACL,WAAS,iBAAiB,oBAAoB,eAAe","file":"viewer.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 33);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 67a151ebb5e544e5a40d","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { PDFJS } from 'pdfjs-lib';\n\nconst CSS_UNITS = 96.0 / 72.0;\nconst DEFAULT_SCALE_VALUE = 'auto';\nconst DEFAULT_SCALE = 1.0;\nconst MIN_SCALE = 0.25;\nconst MAX_SCALE = 10.0;\nconst UNKNOWN_SCALE = 0;\nconst MAX_AUTO_SCALE = 1.25;\nconst SCROLLBAR_PADDING = 40;\nconst VERTICAL_PADDING = 5;\n\nconst RendererType = {\n CANVAS: 'canvas',\n SVG: 'svg',\n};\n\n// Replaces {{arguments}} with their values.\nfunction formatL10nValue(text, args) {\n if (!args) {\n return text;\n }\n return text.replace(/\\{\\{\\s*(\\w+)\\s*\\}\\}/g, (all, name) => {\n return (name in args ? args[name] : '{{' + name + '}}');\n });\n}\n\n/**\n * No-op implemetation of the localization service.\n * @implements {IL10n}\n */\nlet NullL10n = {\n get(property, args, fallback) {\n return Promise.resolve(formatL10nValue(fallback, args));\n },\n\n translate(element) {\n return Promise.resolve();\n },\n};\n\n/**\n * Disables fullscreen support, and by extension Presentation Mode,\n * in browsers which support the fullscreen API.\n * @var {boolean}\n */\nPDFJS.disableFullscreen = (PDFJS.disableFullscreen === undefined ?\n false : PDFJS.disableFullscreen);\n\n/**\n * Enables CSS only zooming.\n * @var {boolean}\n */\nPDFJS.useOnlyCssZoom = (PDFJS.useOnlyCssZoom === undefined ?\n false : PDFJS.useOnlyCssZoom);\n\n/**\n * The maximum supported canvas size in total pixels e.g. width * height.\n * The default value is 4096 * 4096. Use -1 for no limit.\n * @var {number}\n */\nPDFJS.maxCanvasPixels = (PDFJS.maxCanvasPixels === undefined ?\n 16777216 : PDFJS.maxCanvasPixels);\n\n/**\n * Disables saving of the last position of the viewed PDF.\n * @var {boolean}\n */\nPDFJS.disableHistory = (PDFJS.disableHistory === undefined ?\n false : PDFJS.disableHistory);\n\n/**\n * Disables creation of the text layer that used for text selection and search.\n * @var {boolean}\n */\nPDFJS.disableTextLayer = (PDFJS.disableTextLayer === undefined ?\n false : PDFJS.disableTextLayer);\n\n/**\n * Disables maintaining the current position in the document when zooming.\n */\nPDFJS.ignoreCurrentPositionOnZoom = (PDFJS.ignoreCurrentPositionOnZoom ===\n undefined ? false : PDFJS.ignoreCurrentPositionOnZoom);\n\nif (typeof PDFJSDev === 'undefined' ||\n !PDFJSDev.test('FIREFOX || MOZCENTRAL')) {\n /**\n * Interface locale settings.\n * @var {string}\n */\n PDFJS.locale =\n (PDFJS.locale === undefined && typeof navigator !== 'undefined' ?\n navigator.language : PDFJS.locale);\n}\n\n/**\n * Returns scale factor for the canvas. It makes sense for the HiDPI displays.\n * @return {Object} The object with horizontal (sx) and vertical (sy)\n scales. The scaled property is set to false if scaling is\n not required, true otherwise.\n */\nfunction getOutputScale(ctx) {\n let devicePixelRatio = window.devicePixelRatio || 1;\n let backingStoreRatio = ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio || 1;\n let pixelRatio = devicePixelRatio / backingStoreRatio;\n return {\n sx: pixelRatio,\n sy: pixelRatio,\n scaled: pixelRatio !== 1,\n };\n}\n\n/**\n * Scrolls specified element into view of its parent.\n * @param {Object} element - The element to be visible.\n * @param {Object} spot - An object with optional top and left properties,\n * specifying the offset from the top left edge.\n * @param {boolean} skipOverflowHiddenElements - Ignore elements that have\n * the CSS rule `overflow: hidden;` set. The default is false.\n */\nfunction scrollIntoView(element, spot, skipOverflowHiddenElements = false) {\n // Assuming offsetParent is available (it's not available when viewer is in\n // hidden iframe or object). We have to scroll: if the offsetParent is not set\n // producing the error. See also animationStarted.\n let parent = element.offsetParent;\n if (!parent) {\n console.error('offsetParent is not set -- cannot scroll');\n return;\n }\n let offsetY = element.offsetTop + element.clientTop;\n let offsetX = element.offsetLeft + element.clientLeft;\n while (parent.clientHeight === parent.scrollHeight ||\n (skipOverflowHiddenElements &&\n getComputedStyle(parent).overflow === 'hidden')) {\n if (parent.dataset._scaleY) {\n offsetY /= parent.dataset._scaleY;\n offsetX /= parent.dataset._scaleX;\n }\n offsetY += parent.offsetTop;\n offsetX += parent.offsetLeft;\n parent = parent.offsetParent;\n if (!parent) {\n return; // no need to scroll\n }\n }\n if (spot) {\n if (spot.top !== undefined) {\n offsetY += spot.top;\n }\n if (spot.left !== undefined) {\n offsetX += spot.left;\n parent.scrollLeft = offsetX;\n }\n }\n parent.scrollTop = offsetY;\n}\n\n/**\n * Helper function to start monitoring the scroll event and converting them into\n * PDF.js friendly one: with scroll debounce and scroll direction.\n */\nfunction watchScroll(viewAreaElement, callback) {\n let debounceScroll = function(evt) {\n if (rAF) {\n return;\n }\n // schedule an invocation of scroll for next animation frame.\n rAF = window.requestAnimationFrame(function viewAreaElementScrolled() {\n rAF = null;\n\n let currentY = viewAreaElement.scrollTop;\n let lastY = state.lastY;\n if (currentY !== lastY) {\n state.down = currentY > lastY;\n }\n state.lastY = currentY;\n callback(state);\n });\n };\n\n let state = {\n down: true,\n lastY: viewAreaElement.scrollTop,\n _eventHandler: debounceScroll,\n };\n\n let rAF = null;\n viewAreaElement.addEventListener('scroll', debounceScroll, true);\n return state;\n}\n\n/**\n * Helper function to parse query string (e.g. ?param1=value&parm2=...).\n */\nfunction parseQueryString(query) {\n let parts = query.split('&');\n let params = Object.create(null);\n for (let i = 0, ii = parts.length; i < ii; ++i) {\n let param = parts[i].split('=');\n let key = param[0].toLowerCase();\n let value = param.length > 1 ? param[1] : null;\n params[decodeURIComponent(key)] = decodeURIComponent(value);\n }\n return params;\n}\n\n/**\n * Use binary search to find the index of the first item in a given array which\n * passes a given condition. The items are expected to be sorted in the sense\n * that if the condition is true for one item in the array, then it is also true\n * for all following items.\n *\n * @returns {Number} Index of the first array element to pass the test,\n * or |items.length| if no such element exists.\n */\nfunction binarySearchFirstItem(items, condition) {\n let minIndex = 0;\n let maxIndex = items.length - 1;\n\n if (items.length === 0 || !condition(items[maxIndex])) {\n return items.length;\n }\n if (condition(items[minIndex])) {\n return minIndex;\n }\n\n while (minIndex < maxIndex) {\n let currentIndex = (minIndex + maxIndex) >> 1;\n let currentItem = items[currentIndex];\n if (condition(currentItem)) {\n maxIndex = currentIndex;\n } else {\n minIndex = currentIndex + 1;\n }\n }\n return minIndex; /* === maxIndex */\n}\n\n/**\n * Approximates float number as a fraction using Farey sequence (max order\n * of 8).\n * @param {number} x - Positive float number.\n * @returns {Array} Estimated fraction: the first array item is a numerator,\n * the second one is a denominator.\n */\nfunction approximateFraction(x) {\n // Fast paths for int numbers or their inversions.\n if (Math.floor(x) === x) {\n return [x, 1];\n }\n let xinv = 1 / x;\n let limit = 8;\n if (xinv > limit) {\n return [1, limit];\n } else if (Math.floor(xinv) === xinv) {\n return [1, xinv];\n }\n\n let x_ = x > 1 ? xinv : x;\n // a/b and c/d are neighbours in Farey sequence.\n let a = 0, b = 1, c = 1, d = 1;\n // Limiting search to order 8.\n while (true) {\n // Generating next term in sequence (order of q).\n let p = a + c, q = b + d;\n if (q > limit) {\n break;\n }\n if (x_ <= p / q) {\n c = p; d = q;\n } else {\n a = p; b = q;\n }\n }\n let result;\n // Select closest of the neighbours to x.\n if (x_ - a / b < c / d - x_) {\n result = x_ === x ? [a, b] : [b, a];\n } else {\n result = x_ === x ? [c, d] : [d, c];\n }\n return result;\n}\n\nfunction roundToDivide(x, div) {\n let r = x % div;\n return r === 0 ? x : Math.round(x - r + div);\n}\n\n/**\n * Generic helper to find out what elements are visible within a scroll pane.\n */\nfunction getVisibleElements(scrollEl, views, sortByVisibility = false) {\n let top = scrollEl.scrollTop, bottom = top + scrollEl.clientHeight;\n let left = scrollEl.scrollLeft, right = left + scrollEl.clientWidth;\n\n function isElementBottomBelowViewTop(view) {\n let element = view.div;\n let elementBottom =\n element.offsetTop + element.clientTop + element.clientHeight;\n return elementBottom > top;\n }\n\n let visible = [], view, element;\n let currentHeight, viewHeight, hiddenHeight, percentHeight;\n let currentWidth, viewWidth;\n let firstVisibleElementInd = views.length === 0 ? 0 :\n binarySearchFirstItem(views, isElementBottomBelowViewTop);\n\n for (let i = firstVisibleElementInd, ii = views.length; i < ii; i++) {\n view = views[i];\n element = view.div;\n currentHeight = element.offsetTop + element.clientTop;\n viewHeight = element.clientHeight;\n\n if (currentHeight > bottom) {\n break;\n }\n\n currentWidth = element.offsetLeft + element.clientLeft;\n viewWidth = element.clientWidth;\n if (currentWidth + viewWidth < left || currentWidth > right) {\n continue;\n }\n hiddenHeight = Math.max(0, top - currentHeight) +\n Math.max(0, currentHeight + viewHeight - bottom);\n percentHeight = ((viewHeight - hiddenHeight) * 100 / viewHeight) | 0;\n\n visible.push({\n id: view.id,\n x: currentWidth,\n y: currentHeight,\n view,\n percent: percentHeight,\n });\n }\n\n let first = visible[0];\n let last = visible[visible.length - 1];\n\n if (sortByVisibility) {\n visible.sort(function(a, b) {\n let pc = a.percent - b.percent;\n if (Math.abs(pc) > 0.001) {\n return -pc;\n }\n return a.id - b.id; // ensure stability\n });\n }\n return { first, last, views: visible, };\n}\n\n/**\n * Event handler to suppress context menu.\n */\nfunction noContextMenuHandler(evt) {\n evt.preventDefault();\n}\n\nfunction isDataSchema(url) {\n let i = 0, ii = url.length;\n while (i < ii && url[i].trim() === '') {\n i++;\n }\n return url.substr(i, 5).toLowerCase() === 'data:';\n}\n\n/**\n * Returns the filename or guessed filename from the url (see issue 3455).\n * @param {string} url - The original PDF location.\n * @param {string} defaultFilename - The value returned if the filename is\n * unknown, or the protocol is unsupported.\n * @returns {string} Guessed PDF filename.\n */\nfunction getPDFFileNameFromURL(url, defaultFilename = 'document.pdf') {\n if (isDataSchema(url)) {\n console.warn('getPDFFileNameFromURL: ' +\n 'ignoring \"data:\" URL for performance reasons.');\n return defaultFilename;\n }\n const reURI = /^(?:(?:[^:]+:)?\\/\\/[^\\/]+)?([^?#]*)(\\?[^#]*)?(#.*)?$/;\n // SCHEME HOST 1.PATH 2.QUERY 3.REF\n // Pattern to get last matching NAME.pdf\n const reFilename = /[^\\/?#=]+\\.pdf\\b(?!.*\\.pdf\\b)/i;\n let splitURI = reURI.exec(url);\n let suggestedFilename = reFilename.exec(splitURI[1]) ||\n reFilename.exec(splitURI[2]) ||\n reFilename.exec(splitURI[3]);\n if (suggestedFilename) {\n suggestedFilename = suggestedFilename[0];\n if (suggestedFilename.indexOf('%') !== -1) {\n // URL-encoded %2Fpath%2Fto%2Ffile.pdf should be file.pdf\n try {\n suggestedFilename =\n reFilename.exec(decodeURIComponent(suggestedFilename))[0];\n } catch (ex) { // Possible (extremely rare) errors:\n // URIError \"Malformed URI\", e.g. for \"%AA.pdf\"\n // TypeError \"null has no properties\", e.g. for \"%2F.pdf\"\n }\n }\n }\n return suggestedFilename || defaultFilename;\n}\n\nfunction normalizeWheelEventDelta(evt) {\n let delta = Math.sqrt(evt.deltaX * evt.deltaX + evt.deltaY * evt.deltaY);\n let angle = Math.atan2(evt.deltaY, evt.deltaX);\n if (-0.25 * Math.PI < angle && angle < 0.75 * Math.PI) {\n // All that is left-up oriented has to change the sign.\n delta = -delta;\n }\n\n const MOUSE_DOM_DELTA_PIXEL_MODE = 0;\n const MOUSE_DOM_DELTA_LINE_MODE = 1;\n const MOUSE_PIXELS_PER_LINE = 30;\n const MOUSE_LINES_PER_PAGE = 30;\n\n // Converts delta to per-page units\n if (evt.deltaMode === MOUSE_DOM_DELTA_PIXEL_MODE) {\n delta /= MOUSE_PIXELS_PER_LINE * MOUSE_LINES_PER_PAGE;\n } else if (evt.deltaMode === MOUSE_DOM_DELTA_LINE_MODE) {\n delta /= MOUSE_LINES_PER_PAGE;\n }\n return delta;\n}\n\nfunction cloneObj(obj) {\n let result = Object.create(null);\n for (let i in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, i)) {\n result[i] = obj[i];\n }\n }\n return result;\n}\n\n/**\n * Promise that is resolved when DOM window becomes visible.\n */\nlet animationStarted = new Promise(function (resolve) {\n window.requestAnimationFrame(resolve);\n});\n\n/**\n * (deprecated) External localization service.\n */\nlet mozL10n;\n\n/**\n * (deprecated) Promise that is resolved when UI localization is finished.\n */\nlet localized = Promise.resolve();\n\n/**\n * Simple event bus for an application. Listeners are attached using the\n * `on` and `off` methods. To raise an event, the `dispatch` method shall be\n * used.\n */\nclass EventBus {\n constructor() {\n this._listeners = Object.create(null);\n }\n\n on(eventName, listener) {\n let eventListeners = this._listeners[eventName];\n if (!eventListeners) {\n eventListeners = [];\n this._listeners[eventName] = eventListeners;\n }\n eventListeners.push(listener);\n }\n\n off(eventName, listener) {\n let eventListeners = this._listeners[eventName];\n let i;\n if (!eventListeners || ((i = eventListeners.indexOf(listener)) < 0)) {\n return;\n }\n eventListeners.splice(i, 1);\n }\n\n dispatch(eventName) {\n let eventListeners = this._listeners[eventName];\n if (!eventListeners || eventListeners.length === 0) {\n return;\n }\n // Passing all arguments after the eventName to the listeners.\n let args = Array.prototype.slice.call(arguments, 1);\n // Making copy of the listeners array in case if it will be modified\n // during dispatch.\n eventListeners.slice(0).forEach(function (listener) {\n listener.apply(null, args);\n });\n }\n}\n\nfunction clamp(v, min, max) {\n return Math.min(Math.max(v, min), max);\n}\n\nclass ProgressBar {\n constructor(id, { height, width, units, } = {}) {\n this.visible = true;\n\n // Fetch the sub-elements for later.\n this.div = document.querySelector(id + ' .progress');\n // Get the loading bar element, so it can be resized to fit the viewer.\n this.bar = this.div.parentNode;\n\n // Get options, with sensible defaults.\n this.height = height || 100;\n this.width = width || 100;\n this.units = units || '%';\n\n // Initialize heights.\n this.div.style.height = this.height + this.units;\n this.percent = 0;\n }\n\n _updateBar() {\n if (this._indeterminate) {\n this.div.classList.add('indeterminate');\n this.div.style.width = this.width + this.units;\n return;\n }\n\n this.div.classList.remove('indeterminate');\n let progressSize = this.width * this._percent / 100;\n this.div.style.width = progressSize + this.units;\n }\n\n get percent() {\n return this._percent;\n }\n\n set percent(val) {\n this._indeterminate = isNaN(val);\n this._percent = clamp(val, 0, 100);\n this._updateBar();\n }\n\n setWidth(viewer) {\n if (!viewer) {\n return;\n }\n let container = viewer.parentNode;\n let scrollbarWidth = container.offsetWidth - viewer.offsetWidth;\n if (scrollbarWidth > 0) {\n this.bar.setAttribute('style', 'width: calc(100% - ' +\n scrollbarWidth + 'px);');\n }\n }\n\n hide() {\n if (!this.visible) {\n return;\n }\n this.visible = false;\n this.bar.classList.add('hidden');\n document.body.classList.remove('loadingInProgress');\n }\n\n show() {\n if (this.visible) {\n return;\n }\n this.visible = true;\n document.body.classList.add('loadingInProgress');\n this.bar.classList.remove('hidden');\n }\n}\n\nexport {\n CSS_UNITS,\n DEFAULT_SCALE_VALUE,\n DEFAULT_SCALE,\n MIN_SCALE,\n MAX_SCALE,\n UNKNOWN_SCALE,\n MAX_AUTO_SCALE,\n SCROLLBAR_PADDING,\n VERTICAL_PADDING,\n cloneObj,\n RendererType,\n mozL10n,\n NullL10n,\n EventBus,\n ProgressBar,\n getPDFFileNameFromURL,\n noContextMenuHandler,\n parseQueryString,\n getVisibleElements,\n roundToDivide,\n approximateFraction,\n getOutputScale,\n scrollIntoView,\n watchScroll,\n binarySearchFirstItem,\n normalizeWheelEventDelta,\n animationStarted,\n localized,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/ui_utils.js","/* Copyright 2016 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* globals module, __non_webpack_require__ */\n\n'use strict';\n\nvar pdfjsLib;\nif (typeof window !== 'undefined' && window['pdfjs-dist/build/pdf']) {\n pdfjsLib = window['pdfjs-dist/build/pdf'];\n} else {\n pdfjsLib = __non_webpack_require__('../build/pdf.js');\n}\nmodule.exports = pdfjsLib;\n\n\n\n// WEBPACK FOOTER //\n// web/pdfjs.js","/* Copyright 2016 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { EventBus } from './ui_utils';\n\n// Attaching to the application event bus to dispatch events to the DOM for\n// backwards viewer API compatibility.\nfunction attachDOMEventsToEventBus(eventBus) {\n eventBus.on('documentload', function() {\n let event = document.createEvent('CustomEvent');\n event.initCustomEvent('documentload', true, true, {});\n window.dispatchEvent(event);\n });\n eventBus.on('pagerendered', function(evt) {\n let event = document.createEvent('CustomEvent');\n event.initCustomEvent('pagerendered', true, true, {\n pageNumber: evt.pageNumber,\n cssTransform: evt.cssTransform,\n });\n evt.source.div.dispatchEvent(event);\n });\n eventBus.on('textlayerrendered', function(evt) {\n let event = document.createEvent('CustomEvent');\n event.initCustomEvent('textlayerrendered', true, true, {\n pageNumber: evt.pageNumber,\n });\n evt.source.textLayerDiv.dispatchEvent(event);\n });\n eventBus.on('pagechange', function(evt) {\n let event = document.createEvent('UIEvents');\n event.initUIEvent('pagechange', true, true, window, 0);\n event.pageNumber = evt.pageNumber;\n evt.source.container.dispatchEvent(event);\n });\n eventBus.on('pagesinit', function(evt) {\n let event = document.createEvent('CustomEvent');\n event.initCustomEvent('pagesinit', true, true, null);\n evt.source.container.dispatchEvent(event);\n });\n eventBus.on('pagesloaded', function(evt) {\n let event = document.createEvent('CustomEvent');\n event.initCustomEvent('pagesloaded', true, true, {\n pagesCount: evt.pagesCount,\n });\n evt.source.container.dispatchEvent(event);\n });\n eventBus.on('scalechange', function(evt) {\n let event = document.createEvent('UIEvents');\n event.initUIEvent('scalechange', true, true, window, 0);\n event.scale = evt.scale;\n event.presetValue = evt.presetValue;\n evt.source.container.dispatchEvent(event);\n });\n eventBus.on('updateviewarea', function(evt) {\n let event = document.createEvent('UIEvents');\n event.initUIEvent('updateviewarea', true, true, window, 0);\n event.location = evt.location;\n evt.source.container.dispatchEvent(event);\n });\n eventBus.on('find', function(evt) {\n if (evt.source === window) {\n return; // event comes from FirefoxCom, no need to replicate\n }\n let event = document.createEvent('CustomEvent');\n event.initCustomEvent('find' + evt.type, true, true, {\n query: evt.query,\n phraseSearch: evt.phraseSearch,\n caseSensitive: evt.caseSensitive,\n highlightAll: evt.highlightAll,\n findPrevious: evt.findPrevious,\n });\n window.dispatchEvent(event);\n });\n eventBus.on('attachmentsloaded', function(evt) {\n let event = document.createEvent('CustomEvent');\n event.initCustomEvent('attachmentsloaded', true, true, {\n attachmentsCount: evt.attachmentsCount,\n });\n evt.source.container.dispatchEvent(event);\n });\n eventBus.on('sidebarviewchanged', function(evt) {\n let event = document.createEvent('CustomEvent');\n event.initCustomEvent('sidebarviewchanged', true, true, {\n view: evt.view,\n });\n evt.source.outerContainer.dispatchEvent(event);\n });\n eventBus.on('pagemode', function(evt) {\n let event = document.createEvent('CustomEvent');\n event.initCustomEvent('pagemode', true, true, {\n mode: evt.mode,\n });\n evt.source.pdfViewer.container.dispatchEvent(event);\n });\n eventBus.on('namedaction', function(evt) {\n let event = document.createEvent('CustomEvent');\n event.initCustomEvent('namedaction', true, true, {\n action: evt.action,\n });\n evt.source.pdfViewer.container.dispatchEvent(event);\n });\n eventBus.on('presentationmodechanged', function(evt) {\n let event = document.createEvent('CustomEvent');\n event.initCustomEvent('presentationmodechanged', true, true, {\n active: evt.active,\n switchInProgress: evt.switchInProgress,\n });\n window.dispatchEvent(event);\n });\n eventBus.on('outlineloaded', function(evt) {\n let event = document.createEvent('CustomEvent');\n event.initCustomEvent('outlineloaded', true, true, {\n outlineCount: evt.outlineCount,\n });\n evt.source.container.dispatchEvent(event);\n });\n}\n\nlet globalEventBus = null;\nfunction getGlobalEventBus() {\n if (globalEventBus) {\n return globalEventBus;\n }\n globalEventBus = new EventBus();\n attachDOMEventsToEventBus(globalEventBus);\n return globalEventBus;\n}\n\nexport {\n attachDOMEventsToEventBus,\n getGlobalEventBus,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/dom_events.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst CLEANUP_TIMEOUT = 30000;\n\nconst RenderingStates = {\n INITIAL: 0,\n RUNNING: 1,\n PAUSED: 2,\n FINISHED: 3,\n};\n\n/**\n * Controls rendering of the views for pages and thumbnails.\n */\nclass PDFRenderingQueue {\n constructor() {\n this.pdfViewer = null;\n this.pdfThumbnailViewer = null;\n this.onIdle = null;\n this.highestPriorityPage = null;\n this.idleTimeout = null;\n this.printing = false;\n this.isThumbnailViewEnabled = false;\n }\n\n /**\n * @param {PDFViewer} pdfViewer\n */\n setViewer(pdfViewer) {\n this.pdfViewer = pdfViewer;\n }\n\n /**\n * @param {PDFThumbnailViewer} pdfThumbnailViewer\n */\n setThumbnailViewer(pdfThumbnailViewer) {\n this.pdfThumbnailViewer = pdfThumbnailViewer;\n }\n\n /**\n * @param {IRenderableView} view\n * @returns {boolean}\n */\n isHighestPriority(view) {\n return this.highestPriorityPage === view.renderingId;\n }\n\n /**\n * @param {Object} currentlyVisiblePages\n */\n renderHighestPriority(currentlyVisiblePages) {\n if (this.idleTimeout) {\n clearTimeout(this.idleTimeout);\n this.idleTimeout = null;\n }\n\n // Pages have a higher priority than thumbnails, so check them first.\n if (this.pdfViewer.forceRendering(currentlyVisiblePages)) {\n return;\n }\n // No pages needed rendering, so check thumbnails.\n if (this.pdfThumbnailViewer && this.isThumbnailViewEnabled) {\n if (this.pdfThumbnailViewer.forceRendering()) {\n return;\n }\n }\n\n if (this.printing) {\n // If printing is currently ongoing do not reschedule cleanup.\n return;\n }\n\n if (this.onIdle) {\n this.idleTimeout = setTimeout(this.onIdle.bind(this), CLEANUP_TIMEOUT);\n }\n }\n\n /**\n * @param {Object} visible\n * @param {Array} views\n * @param {boolean} scrolledDown\n */\n getHighestPriority(visible, views, scrolledDown) {\n /**\n * The state has changed. Figure out which page has the highest priority to\n * render next (if any).\n *\n * Priority:\n * 1. visible pages\n * 2. if last scrolled down, the page after the visible pages, or\n * if last scrolled up, the page before the visible pages\n */\n var visibleViews = visible.views;\n\n var numVisible = visibleViews.length;\n if (numVisible === 0) {\n return false;\n }\n for (var i = 0; i < numVisible; ++i) {\n var view = visibleViews[i].view;\n if (!this.isViewFinished(view)) {\n return view;\n }\n }\n\n // All the visible views have rendered; try to render next/previous pages.\n if (scrolledDown) {\n var nextPageIndex = visible.last.id;\n // IDs start at 1, so no need to add 1.\n if (views[nextPageIndex] && !this.isViewFinished(views[nextPageIndex])) {\n return views[nextPageIndex];\n }\n } else {\n var previousPageIndex = visible.first.id - 2;\n if (views[previousPageIndex] &&\n !this.isViewFinished(views[previousPageIndex])) {\n return views[previousPageIndex];\n }\n }\n // Everything that needs to be rendered has been.\n return null;\n }\n\n /**\n * @param {IRenderableView} view\n * @returns {boolean}\n */\n isViewFinished(view) {\n return view.renderingState === RenderingStates.FINISHED;\n }\n\n /**\n * Render a page or thumbnail view. This calls the appropriate function\n * based on the views state. If the view is already rendered it will return\n * `false`.\n *\n * @param {IRenderableView} view\n */\n renderView(view) {\n switch (view.renderingState) {\n case RenderingStates.FINISHED:\n return false;\n case RenderingStates.PAUSED:\n this.highestPriorityPage = view.renderingId;\n view.resume();\n break;\n case RenderingStates.RUNNING:\n this.highestPriorityPage = view.renderingId;\n break;\n case RenderingStates.INITIAL:\n this.highestPriorityPage = view.renderingId;\n var continueRendering = () => {\n this.renderHighestPriority();\n };\n view.draw().then(continueRendering, continueRendering);\n break;\n }\n return true;\n }\n}\n\nexport {\n RenderingStates,\n PDFRenderingQueue,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/pdf_rendering_queue.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* globals PDFBug, Stats */\n\nimport {\n animationStarted, DEFAULT_SCALE_VALUE, getPDFFileNameFromURL, MAX_SCALE,\n MIN_SCALE, noContextMenuHandler, normalizeWheelEventDelta,\n parseQueryString, ProgressBar, RendererType, UNKNOWN_SCALE\n} from './ui_utils';\nimport {\n build, createBlob, getDocument, getFilenameFromUrl, InvalidPDFException,\n MissingPDFException, OPS, PDFJS, shadow, UnexpectedResponseException,\n UNSUPPORTED_FEATURES, version\n} from 'pdfjs-lib';\nimport { CursorTool, PDFCursorTools } from './pdf_cursor_tools';\nimport { PDFRenderingQueue, RenderingStates } from './pdf_rendering_queue';\nimport { PDFSidebar, SidebarView } from './pdf_sidebar';\nimport { PDFViewer, PresentationModeState } from './pdf_viewer';\nimport { getGlobalEventBus } from './dom_events';\nimport { OverlayManager } from './overlay_manager';\nimport { PasswordPrompt } from './password_prompt';\nimport { PDFAttachmentViewer } from './pdf_attachment_viewer';\nimport { PDFDocumentProperties } from './pdf_document_properties';\nimport { PDFFindBar } from './pdf_find_bar';\nimport { PDFFindController } from './pdf_find_controller';\nimport { PDFHistory } from './pdf_history';\nimport { PDFLinkService } from './pdf_link_service';\nimport { PDFOutlineViewer } from './pdf_outline_viewer';\nimport { PDFPresentationMode } from './pdf_presentation_mode';\nimport { PDFThumbnailViewer } from './pdf_thumbnail_viewer';\nimport { SecondaryToolbar } from './secondary_toolbar';\nimport { Toolbar } from './toolbar';\nimport { ViewHistory } from './view_history';\n\nconst DEFAULT_SCALE_DELTA = 1.1;\nconst DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT = 5000;\n\nfunction configure(PDFJS) {\n PDFJS.imageResourcesPath = './images/';\n if (typeof PDFJSDev !== 'undefined' &&\n PDFJSDev.test('FIREFOX || MOZCENTRAL || GENERIC || CHROME')) {\n PDFJS.workerSrc = '../build/pdf.worker.js';\n }\n if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('PRODUCTION')) {\n PDFJS.cMapUrl = '../external/bcmaps/';\n PDFJS.cMapPacked = true;\n PDFJS.workerSrc = '../src/worker_loader.js';\n PDFJS.pdfjsNext = true;\n } else {\n PDFJS.cMapUrl = '../web/cmaps/';\n PDFJS.cMapPacked = true;\n }\n}\n\nconst DefaultExternalServices = {\n updateFindControlState(data) {},\n initPassiveLoading(callbacks) {},\n fallback(data, callback) {},\n reportTelemetry(data) {},\n createDownloadManager() {\n throw new Error('Not implemented: createDownloadManager');\n },\n createPreferences() {\n throw new Error('Not implemented: createPreferences');\n },\n createL10n() {\n throw new Error('Not implemented: createL10n');\n },\n supportsIntegratedFind: false,\n supportsDocumentFonts: true,\n supportsDocumentColors: true,\n supportedMouseWheelZoomModifierKeys: {\n ctrlKey: true,\n metaKey: true,\n },\n};\n\nlet PDFViewerApplication = {\n initialBookmark: document.location.hash.substring(1),\n initialDestination: null,\n initialized: false,\n fellback: false,\n appConfig: null,\n pdfDocument: null,\n pdfLoadingTask: null,\n printService: null,\n /** @type {PDFViewer} */\n pdfViewer: null,\n /** @type {PDFThumbnailViewer} */\n pdfThumbnailViewer: null,\n /** @type {PDFRenderingQueue} */\n pdfRenderingQueue: null,\n /** @type {PDFPresentationMode} */\n pdfPresentationMode: null,\n /** @type {PDFDocumentProperties} */\n pdfDocumentProperties: null,\n /** @type {PDFLinkService} */\n pdfLinkService: null,\n /** @type {PDFHistory} */\n pdfHistory: null,\n /** @type {PDFSidebar} */\n pdfSidebar: null,\n /** @type {PDFOutlineViewer} */\n pdfOutlineViewer: null,\n /** @type {PDFAttachmentViewer} */\n pdfAttachmentViewer: null,\n /** @type {PDFCursorTools} */\n pdfCursorTools: null,\n /** @type {ViewHistory} */\n store: null,\n /** @type {DownloadManager} */\n downloadManager: null,\n /** @type {OverlayManager} */\n overlayManager: null,\n /** @type {Preferences} */\n preferences: null,\n /** @type {Toolbar} */\n toolbar: null,\n /** @type {SecondaryToolbar} */\n secondaryToolbar: null,\n /** @type {EventBus} */\n eventBus: null,\n /** @type {IL10n} */\n l10n: null,\n isInitialViewSet: false,\n downloadComplete: false,\n viewerPrefs: {\n sidebarViewOnLoad: SidebarView.NONE,\n pdfBugEnabled: false,\n showPreviousViewOnLoad: true,\n defaultZoomValue: '',\n disablePageMode: false,\n disablePageLabels: false,\n renderer: 'canvas',\n enhanceTextSelection: false,\n renderInteractiveForms: false,\n enablePrintAutoRotate: false,\n },\n isViewerEmbedded: (window.parent !== window),\n url: '',\n baseUrl: '',\n externalServices: DefaultExternalServices,\n _boundEvents: {},\n\n // Called once when the document is loaded.\n initialize(appConfig) {\n this.preferences = this.externalServices.createPreferences();\n\n configure(PDFJS);\n this.appConfig = appConfig;\n\n return this._readPreferences().then(() => {\n return this._initializeL10n();\n }).then(() => {\n return this._initializeViewerComponents();\n }).then(() => {\n // Bind the various event handlers *after* the viewer has been\n // initialized, to prevent errors if an event arrives too soon.\n this.bindEvents();\n this.bindWindowEvents();\n\n // We can start UI localization now.\n let appContainer = appConfig.appContainer || document.documentElement;\n this.l10n.translate(appContainer).then(() => {\n // Dispatch the 'localized' event on the `eventBus` once the viewer\n // has been fully initialized and translated.\n this.eventBus.dispatch('localized');\n });\n\n if (this.isViewerEmbedded && !PDFJS.isExternalLinkTargetSet()) {\n // Prevent external links from \"replacing\" the viewer,\n // when it's embedded in e.g. an iframe or an object.\n PDFJS.externalLinkTarget = PDFJS.LinkTarget.TOP;\n }\n\n this.initialized = true;\n });\n },\n\n /**\n * @private\n */\n _readPreferences() {\n let { preferences, viewerPrefs, } = this;\n\n return Promise.all([\n preferences.get('enableWebGL').then(function resolved(value) {\n PDFJS.disableWebGL = !value;\n }),\n preferences.get('sidebarViewOnLoad').then(function resolved(value) {\n viewerPrefs['sidebarViewOnLoad'] = value;\n }),\n preferences.get('pdfBugEnabled').then(function resolved(value) {\n viewerPrefs['pdfBugEnabled'] = value;\n }),\n preferences.get('showPreviousViewOnLoad').then(function resolved(value) {\n viewerPrefs['showPreviousViewOnLoad'] = value;\n }),\n preferences.get('defaultZoomValue').then(function resolved(value) {\n viewerPrefs['defaultZoomValue'] = value;\n }),\n preferences.get('enhanceTextSelection').then(function resolved(value) {\n viewerPrefs['enhanceTextSelection'] = value;\n }),\n preferences.get('disableTextLayer').then(function resolved(value) {\n if (PDFJS.disableTextLayer === true) {\n return;\n }\n PDFJS.disableTextLayer = value;\n }),\n preferences.get('disableRange').then(function resolved(value) {\n if (PDFJS.disableRange === true) {\n return;\n }\n PDFJS.disableRange = value;\n }),\n preferences.get('disableStream').then(function resolved(value) {\n if (PDFJS.disableStream === true) {\n return;\n }\n PDFJS.disableStream = value;\n }),\n preferences.get('disableAutoFetch').then(function resolved(value) {\n PDFJS.disableAutoFetch = value;\n }),\n preferences.get('disableFontFace').then(function resolved(value) {\n if (PDFJS.disableFontFace === true) {\n return;\n }\n PDFJS.disableFontFace = value;\n }),\n preferences.get('useOnlyCssZoom').then(function resolved(value) {\n PDFJS.useOnlyCssZoom = value;\n }),\n preferences.get('externalLinkTarget').then(function resolved(value) {\n if (PDFJS.isExternalLinkTargetSet()) {\n return;\n }\n PDFJS.externalLinkTarget = value;\n }),\n preferences.get('renderer').then(function resolved(value) {\n viewerPrefs['renderer'] = value;\n }),\n preferences.get('renderInteractiveForms').then(function resolved(value) {\n viewerPrefs['renderInteractiveForms'] = value;\n }),\n preferences.get('disablePageMode').then(function resolved(value) {\n viewerPrefs['disablePageMode'] = value;\n }),\n preferences.get('disablePageLabels').then(function resolved(value) {\n viewerPrefs['disablePageLabels'] = value;\n }),\n preferences.get('enablePrintAutoRotate').then(function resolved(value) {\n viewerPrefs['enablePrintAutoRotate'] = value;\n }),\n ]).catch(function(reason) { });\n },\n\n _initializeL10n() {\n // Locale can be changed only when special debugging flags is present in\n // the hash section of the URL, or development version of viewer is used.\n // It is not possible to change locale for Firefox extension builds.\n if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('PRODUCTION') ||\n (!PDFJSDev.test('FIREFOX || MOZCENTRAL') &&\n this.viewerPrefs['pdfBugEnabled'])) {\n let hash = document.location.hash.substring(1);\n let hashParams = parseQueryString(hash);\n if ('locale' in hashParams) {\n PDFJS.locale = hashParams['locale'];\n }\n }\n this.l10n = this.externalServices.createL10n();\n return this.l10n.getDirection().then((dir) => {\n document.getElementsByTagName('html')[0].dir = dir;\n });\n },\n\n /**\n * @private\n */\n _initializeViewerComponents() {\n let appConfig = this.appConfig;\n\n return new Promise((resolve, reject) => {\n this.overlayManager = new OverlayManager();\n\n let eventBus = appConfig.eventBus || getGlobalEventBus();\n this.eventBus = eventBus;\n\n let pdfRenderingQueue = new PDFRenderingQueue();\n pdfRenderingQueue.onIdle = this.cleanup.bind(this);\n this.pdfRenderingQueue = pdfRenderingQueue;\n\n let pdfLinkService = new PDFLinkService({\n eventBus,\n });\n this.pdfLinkService = pdfLinkService;\n\n let downloadManager = this.externalServices.createDownloadManager();\n this.downloadManager = downloadManager;\n\n let container = appConfig.mainContainer;\n let viewer = appConfig.viewerContainer;\n this.pdfViewer = new PDFViewer({\n container,\n viewer,\n eventBus,\n renderingQueue: pdfRenderingQueue,\n linkService: pdfLinkService,\n downloadManager,\n renderer: this.viewerPrefs['renderer'],\n l10n: this.l10n,\n enhanceTextSelection: this.viewerPrefs['enhanceTextSelection'],\n renderInteractiveForms: this.viewerPrefs['renderInteractiveForms'],\n enablePrintAutoRotate: this.viewerPrefs['enablePrintAutoRotate'],\n });\n pdfRenderingQueue.setViewer(this.pdfViewer);\n pdfLinkService.setViewer(this.pdfViewer);\n\n let thumbnailContainer = appConfig.sidebar.thumbnailView;\n this.pdfThumbnailViewer = new PDFThumbnailViewer({\n container: thumbnailContainer,\n renderingQueue: pdfRenderingQueue,\n linkService: pdfLinkService,\n l10n: this.l10n,\n });\n pdfRenderingQueue.setThumbnailViewer(this.pdfThumbnailViewer);\n\n this.pdfHistory = new PDFHistory({\n linkService: pdfLinkService,\n eventBus,\n });\n pdfLinkService.setHistory(this.pdfHistory);\n\n this.findController = new PDFFindController({\n pdfViewer: this.pdfViewer,\n });\n this.findController.onUpdateResultsCount = (matchCount) => {\n if (this.supportsIntegratedFind) {\n return;\n }\n this.findBar.updateResultsCount(matchCount);\n };\n this.findController.onUpdateState = (state, previous, matchCount) => {\n if (this.supportsIntegratedFind) {\n this.externalServices.updateFindControlState({\n result: state,\n findPrevious: previous,\n });\n } else {\n this.findBar.updateUIState(state, previous, matchCount);\n }\n };\n\n this.pdfViewer.setFindController(this.findController);\n\n // TODO: improve `PDFFindBar` constructor parameter passing\n let findBarConfig = Object.create(appConfig.findBar);\n findBarConfig.findController = this.findController;\n findBarConfig.eventBus = eventBus;\n this.findBar = new PDFFindBar(findBarConfig, this.l10n);\n\n this.pdfDocumentProperties =\n new PDFDocumentProperties(appConfig.documentProperties,\n this.overlayManager, this.l10n);\n\n this.pdfCursorTools = new PDFCursorTools({\n container,\n eventBus,\n preferences: this.preferences,\n });\n\n this.toolbar = new Toolbar(appConfig.toolbar, container, eventBus,\n this.l10n);\n\n this.secondaryToolbar =\n new SecondaryToolbar(appConfig.secondaryToolbar, container, eventBus);\n\n if (this.supportsFullscreen) {\n this.pdfPresentationMode = new PDFPresentationMode({\n container,\n viewer,\n pdfViewer: this.pdfViewer,\n eventBus,\n contextMenuItems: appConfig.fullscreen,\n });\n }\n\n this.passwordPrompt = new PasswordPrompt(appConfig.passwordOverlay,\n this.overlayManager, this.l10n);\n\n this.pdfOutlineViewer = new PDFOutlineViewer({\n container: appConfig.sidebar.outlineView,\n eventBus,\n linkService: pdfLinkService,\n });\n\n this.pdfAttachmentViewer = new PDFAttachmentViewer({\n container: appConfig.sidebar.attachmentsView,\n eventBus,\n downloadManager,\n });\n\n // TODO: improve `PDFSidebar` constructor parameter passing\n let sidebarConfig = Object.create(appConfig.sidebar);\n sidebarConfig.pdfViewer = this.pdfViewer;\n sidebarConfig.pdfThumbnailViewer = this.pdfThumbnailViewer;\n sidebarConfig.pdfOutlineViewer = this.pdfOutlineViewer;\n sidebarConfig.eventBus = eventBus;\n this.pdfSidebar = new PDFSidebar(sidebarConfig, this.l10n);\n this.pdfSidebar.onToggled = this.forceRendering.bind(this);\n\n resolve(undefined);\n });\n },\n\n run(config) {\n this.initialize(config).then(webViewerInitialized);\n },\n\n zoomIn(ticks) {\n let newScale = this.pdfViewer.currentScale;\n do {\n newScale = (newScale * DEFAULT_SCALE_DELTA).toFixed(2);\n newScale = Math.ceil(newScale * 10) / 10;\n newScale = Math.min(MAX_SCALE, newScale);\n } while (--ticks > 0 && newScale < MAX_SCALE);\n this.pdfViewer.currentScaleValue = newScale;\n },\n\n zoomOut(ticks) {\n let newScale = this.pdfViewer.currentScale;\n do {\n newScale = (newScale / DEFAULT_SCALE_DELTA).toFixed(2);\n newScale = Math.floor(newScale * 10) / 10;\n newScale = Math.max(MIN_SCALE, newScale);\n } while (--ticks > 0 && newScale > MIN_SCALE);\n this.pdfViewer.currentScaleValue = newScale;\n },\n\n get pagesCount() {\n return this.pdfDocument ? this.pdfDocument.numPages : 0;\n },\n\n get pageRotation() {\n return this.pdfViewer.pagesRotation;\n },\n\n set page(val) {\n this.pdfViewer.currentPageNumber = val;\n },\n\n get page() {\n return this.pdfViewer.currentPageNumber;\n },\n\n get printing() {\n return !!this.printService;\n },\n\n get supportsPrinting() {\n return PDFPrintServiceFactory.instance.supportsPrinting;\n },\n\n get supportsFullscreen() {\n let support;\n if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('MOZCENTRAL')) {\n support = document.fullscreenEnabled === true ||\n document.mozFullScreenEnabled === true;\n } else {\n let doc = document.documentElement;\n support = !!(doc.requestFullscreen || doc.mozRequestFullScreen ||\n doc.webkitRequestFullScreen || doc.msRequestFullscreen);\n\n if (document.fullscreenEnabled === false ||\n document.mozFullScreenEnabled === false ||\n document.webkitFullscreenEnabled === false ||\n document.msFullscreenEnabled === false) {\n support = false;\n }\n }\n if (support && PDFJS.disableFullscreen === true) {\n support = false;\n }\n\n return shadow(this, 'supportsFullscreen', support);\n },\n\n get supportsIntegratedFind() {\n return this.externalServices.supportsIntegratedFind;\n },\n\n get supportsDocumentFonts() {\n return this.externalServices.supportsDocumentFonts;\n },\n\n get supportsDocumentColors() {\n return this.externalServices.supportsDocumentColors;\n },\n\n get loadingBar() {\n let bar = new ProgressBar('#loadingBar');\n return shadow(this, 'loadingBar', bar);\n },\n\n get supportedMouseWheelZoomModifierKeys() {\n return this.externalServices.supportedMouseWheelZoomModifierKeys;\n },\n\n initPassiveLoading() {\n if (typeof PDFJSDev === 'undefined' ||\n !PDFJSDev.test('FIREFOX || MOZCENTRAL || CHROME')) {\n throw new Error('Not implemented: initPassiveLoading');\n }\n this.externalServices.initPassiveLoading({\n onOpenWithTransport(url, length, transport) {\n PDFViewerApplication.open(url, { range: transport, });\n\n if (length) {\n PDFViewerApplication.pdfDocumentProperties.setFileSize(length);\n }\n },\n onOpenWithData(data) {\n PDFViewerApplication.open(data);\n },\n onOpenWithURL(url, length, originalURL) {\n let file = url, args = null;\n if (length !== undefined) {\n args = { length, };\n }\n if (originalURL !== undefined) {\n file = { file: url, originalURL, };\n }\n PDFViewerApplication.open(file, args);\n },\n onError(err) {\n PDFViewerApplication.l10n.get('loading_error', null,\n 'An error occurred while loading the PDF.').then((msg) => {\n PDFViewerApplication.error(msg, err);\n });\n },\n onProgress(loaded, total) {\n PDFViewerApplication.progress(loaded / total);\n },\n });\n },\n\n setTitleUsingUrl(url) {\n this.url = url;\n this.baseUrl = url.split('#')[0];\n let title = getPDFFileNameFromURL(url, '');\n if (!title) {\n try {\n title = decodeURIComponent(getFilenameFromUrl(url)) || url;\n } catch (ex) {\n // decodeURIComponent may throw URIError,\n // fall back to using the unprocessed url in that case\n title = url;\n }\n }\n this.setTitle(title);\n },\n\n setTitle(title) {\n if (this.isViewerEmbedded) {\n // Embedded PDF viewers should not be changing their parent page's title.\n return;\n }\n document.title = title;\n },\n\n /**\n * Closes opened PDF document.\n * @returns {Promise} - Returns the promise, which is resolved when all\n * destruction is completed.\n */\n close() {\n let errorWrapper = this.appConfig.errorWrapper.container;\n errorWrapper.setAttribute('hidden', 'true');\n\n if (!this.pdfLoadingTask) {\n return Promise.resolve();\n }\n\n let promise = this.pdfLoadingTask.destroy();\n this.pdfLoadingTask = null;\n\n if (this.pdfDocument) {\n this.pdfDocument = null;\n\n this.pdfThumbnailViewer.setDocument(null);\n this.pdfViewer.setDocument(null);\n this.pdfLinkService.setDocument(null, null);\n this.pdfDocumentProperties.setDocument(null, null);\n }\n this.store = null;\n this.isInitialViewSet = false;\n this.downloadComplete = false;\n\n this.pdfSidebar.reset();\n this.pdfOutlineViewer.reset();\n this.pdfAttachmentViewer.reset();\n\n this.findController.reset();\n this.findBar.reset();\n this.toolbar.reset();\n this.secondaryToolbar.reset();\n\n if (typeof PDFBug !== 'undefined') {\n PDFBug.cleanup();\n }\n return promise;\n },\n\n /**\n * Opens PDF document specified by URL or array with additional arguments.\n * @param {string|TypedArray|ArrayBuffer} file - PDF location or binary data.\n * @param {Object} args - (optional) Additional arguments for the getDocument\n * call, e.g. HTTP headers ('httpHeaders') or\n * alternative data transport ('range').\n * @returns {Promise} - Returns the promise, which is resolved when document\n * is opened.\n */\n open(file, args) {\n if ((typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) &&\n (arguments.length > 2 || typeof args === 'number')) {\n return Promise.reject(\n new Error('Call of open() with obsolete signature.'));\n }\n if (this.pdfLoadingTask) {\n // We need to destroy already opened document.\n return this.close().then(() => {\n // Reload the preferences if a document was previously opened.\n this.preferences.reload();\n // ... and repeat the open() call.\n return this.open(file, args);\n });\n }\n\n let parameters = Object.create(null), scale;\n if (typeof file === 'string') { // URL\n this.setTitleUsingUrl(file);\n parameters.url = file;\n } else if (file && 'byteLength' in file) { // ArrayBuffer\n parameters.data = file;\n } else if (file.url && file.originalUrl) {\n this.setTitleUsingUrl(file.originalUrl);\n parameters.url = file.url;\n }\n if (typeof PDFJSDev !== 'undefined' &&\n PDFJSDev.test('FIREFOX || MOZCENTRAL || CHROME')) {\n parameters.docBaseUrl = this.baseUrl;\n }\n\n if (args) {\n for (let prop in args) {\n parameters[prop] = args[prop];\n }\n\n if (args.scale) {\n scale = args.scale;\n }\n if (args.length) {\n this.pdfDocumentProperties.setFileSize(args.length);\n }\n }\n\n let loadingTask = getDocument(parameters);\n this.pdfLoadingTask = loadingTask;\n\n loadingTask.onPassword = (updateCallback, reason) => {\n this.passwordPrompt.setUpdateCallback(updateCallback, reason);\n this.passwordPrompt.open();\n };\n\n loadingTask.onProgress = ({ loaded, total, }) => {\n this.progress(loaded / total);\n };\n\n // Listen for unsupported features to trigger the fallback UI.\n loadingTask.onUnsupportedFeature = this.fallback.bind(this);\n\n return loadingTask.promise.then((pdfDocument) => {\n this.load(pdfDocument, scale);\n }, (exception) => {\n let message = exception && exception.message;\n let loadingErrorMessage;\n if (exception instanceof InvalidPDFException) {\n // change error message also for other builds\n loadingErrorMessage = this.l10n.get('invalid_file_error', null,\n 'Invalid or corrupted PDF file.');\n } else if (exception instanceof MissingPDFException) {\n // special message for missing PDF's\n loadingErrorMessage = this.l10n.get('missing_file_error', null,\n 'Missing PDF file.');\n } else if (exception instanceof UnexpectedResponseException) {\n loadingErrorMessage = this.l10n.get('unexpected_response_error', null,\n 'Unexpected server response.');\n } else {\n loadingErrorMessage = this.l10n.get('loading_error', null,\n 'An error occurred while loading the PDF.');\n }\n\n return loadingErrorMessage.then((msg) => {\n this.error(msg, { message, });\n throw new Error(msg);\n });\n });\n },\n\n download() {\n function downloadByUrl() {\n downloadManager.downloadUrl(url, filename);\n }\n\n let url = this.baseUrl;\n // Use this.url instead of this.baseUrl to perform filename detection based\n // on the reference fragment as ultimate fallback if needed.\n let filename = getPDFFileNameFromURL(this.url);\n let downloadManager = this.downloadManager;\n downloadManager.onerror = (err) => {\n // This error won't really be helpful because it's likely the\n // fallback won't work either (or is already open).\n this.error(`PDF failed to download: ${err}`);\n };\n\n // When the PDF document isn't ready, or the PDF file is still downloading,\n // simply download using the URL.\n if (!this.pdfDocument || !this.downloadComplete) {\n downloadByUrl();\n return;\n }\n\n this.pdfDocument.getData().then(function(data) {\n let blob = createBlob(data, 'application/pdf');\n downloadManager.download(blob, url, filename);\n }).catch(downloadByUrl); // Error occurred, try downloading with the URL.\n },\n\n fallback(featureId) {\n if (typeof PDFJSDev !== 'undefined' &&\n PDFJSDev.test('FIREFOX || MOZCENTRAL')) {\n // Only trigger the fallback once so we don't spam the user with messages\n // for one PDF.\n if (this.fellback) {\n return;\n }\n this.fellback = true;\n this.externalServices.fallback({\n featureId,\n url: this.baseUrl,\n }, function response(download) {\n if (!download) {\n return;\n }\n PDFViewerApplication.download();\n });\n }\n },\n\n /**\n * Show the error box.\n * @param {String} message A message that is human readable.\n * @param {Object} moreInfo (optional) Further information about the error\n * that is more technical. Should have a 'message'\n * and optionally a 'stack' property.\n */\n error(message, moreInfo) {\n let moreInfoText = [this.l10n.get('error_version_info',\n { version: version || '?', build: build || '?', },\n 'PDF.js v{{version}} (build: {{build}})')];\n if (moreInfo) {\n moreInfoText.push(\n this.l10n.get('error_message', { message: moreInfo.message, },\n 'Message: {{message}}'));\n if (moreInfo.stack) {\n moreInfoText.push(\n this.l10n.get('error_stack', { stack: moreInfo.stack, },\n 'Stack: {{stack}}'));\n } else {\n if (moreInfo.filename) {\n moreInfoText.push(\n this.l10n.get('error_file', { file: moreInfo.filename, },\n 'File: {{file}}'));\n }\n if (moreInfo.lineNumber) {\n moreInfoText.push(\n this.l10n.get('error_line', { line: moreInfo.lineNumber, },\n 'Line: {{line}}'));\n }\n }\n }\n\n if (typeof PDFJSDev === 'undefined' ||\n !PDFJSDev.test('FIREFOX || MOZCENTRAL')) {\n let errorWrapperConfig = this.appConfig.errorWrapper;\n let errorWrapper = errorWrapperConfig.container;\n errorWrapper.removeAttribute('hidden');\n\n let errorMessage = errorWrapperConfig.errorMessage;\n errorMessage.textContent = message;\n\n let closeButton = errorWrapperConfig.closeButton;\n closeButton.onclick = function() {\n errorWrapper.setAttribute('hidden', 'true');\n };\n\n let errorMoreInfo = errorWrapperConfig.errorMoreInfo;\n let moreInfoButton = errorWrapperConfig.moreInfoButton;\n let lessInfoButton = errorWrapperConfig.lessInfoButton;\n moreInfoButton.onclick = function() {\n errorMoreInfo.removeAttribute('hidden');\n moreInfoButton.setAttribute('hidden', 'true');\n lessInfoButton.removeAttribute('hidden');\n errorMoreInfo.style.height = errorMoreInfo.scrollHeight + 'px';\n };\n lessInfoButton.onclick = function() {\n errorMoreInfo.setAttribute('hidden', 'true');\n moreInfoButton.removeAttribute('hidden');\n lessInfoButton.setAttribute('hidden', 'true');\n };\n moreInfoButton.oncontextmenu = noContextMenuHandler;\n lessInfoButton.oncontextmenu = noContextMenuHandler;\n closeButton.oncontextmenu = noContextMenuHandler;\n moreInfoButton.removeAttribute('hidden');\n lessInfoButton.setAttribute('hidden', 'true');\n Promise.all(moreInfoText).then((parts) => {\n errorMoreInfo.value = parts.join('\\n');\n });\n } else {\n console.error(message + '\\n' + moreInfoText);\n this.fallback();\n }\n },\n\n progress(level) {\n if (this.downloadComplete) {\n // Don't accidentally show the loading bar again when the entire file has\n // already been fetched (only an issue when disableAutoFetch is enabled).\n return;\n }\n let percent = Math.round(level * 100);\n // When we transition from full request to range requests, it's possible\n // that we discard some of the loaded data. This can cause the loading\n // bar to move backwards. So prevent this by only updating the bar if it\n // increases.\n if (percent > this.loadingBar.percent || isNaN(percent)) {\n this.loadingBar.percent = percent;\n\n // When disableAutoFetch is enabled, it's not uncommon for the entire file\n // to never be fetched (depends on e.g. the file structure). In this case\n // the loading bar will not be completely filled, nor will it be hidden.\n // To prevent displaying a partially filled loading bar permanently, we\n // hide it when no data has been loaded during a certain amount of time.\n if (PDFJS.disableAutoFetch && percent) {\n if (this.disableAutoFetchLoadingBarTimeout) {\n clearTimeout(this.disableAutoFetchLoadingBarTimeout);\n this.disableAutoFetchLoadingBarTimeout = null;\n }\n this.loadingBar.show();\n\n this.disableAutoFetchLoadingBarTimeout = setTimeout(() => {\n this.loadingBar.hide();\n this.disableAutoFetchLoadingBarTimeout = null;\n }, DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT);\n }\n }\n },\n\n load(pdfDocument, scale) {\n scale = scale || UNKNOWN_SCALE;\n this.pdfDocument = pdfDocument;\n\n pdfDocument.getDownloadInfo().then(() => {\n this.downloadComplete = true;\n this.loadingBar.hide();\n\n firstPagePromise.then(() => {\n this.eventBus.dispatch('documentload', { source: this, });\n });\n });\n\n // Since the `setInitialView` call below depends on this being resolved,\n // fetch it early to avoid delaying initial rendering of the PDF document.\n let pageModePromise = pdfDocument.getPageMode().catch(\n function() { /* Avoid breaking initial rendering; ignoring errors. */ });\n\n this.toolbar.setPagesCount(pdfDocument.numPages, false);\n this.secondaryToolbar.setPagesCount(pdfDocument.numPages);\n\n let id = this.documentFingerprint = pdfDocument.fingerprint;\n let store = this.store = new ViewHistory(id);\n\n let baseDocumentUrl;\n if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) {\n baseDocumentUrl = null;\n } else if (PDFJSDev.test('FIREFOX || MOZCENTRAL')) {\n baseDocumentUrl = this.baseUrl;\n } else if (PDFJSDev.test('CHROME')) {\n baseDocumentUrl = location.href.split('#')[0];\n }\n this.pdfLinkService.setDocument(pdfDocument, baseDocumentUrl);\n this.pdfDocumentProperties.setDocument(pdfDocument, this.url);\n\n let pdfViewer = this.pdfViewer;\n pdfViewer.setDocument(pdfDocument);\n let firstPagePromise = pdfViewer.firstPagePromise;\n let pagesPromise = pdfViewer.pagesPromise;\n let onePageRendered = pdfViewer.onePageRendered;\n\n let pdfThumbnailViewer = this.pdfThumbnailViewer;\n pdfThumbnailViewer.setDocument(pdfDocument);\n\n firstPagePromise.then((pdfPage) => {\n this.loadingBar.setWidth(this.appConfig.viewerContainer);\n\n if (!PDFJS.disableHistory && !this.isViewerEmbedded) {\n // The browsing history is only enabled when the viewer is standalone,\n // i.e. not when it is embedded in a web page.\n if (!this.viewerPrefs['showPreviousViewOnLoad']) {\n this.pdfHistory.clearHistoryState();\n }\n this.pdfHistory.initialize(this.documentFingerprint);\n\n if (this.pdfHistory.initialDestination) {\n this.initialDestination = this.pdfHistory.initialDestination;\n } else if (this.pdfHistory.initialBookmark) {\n this.initialBookmark = this.pdfHistory.initialBookmark;\n }\n }\n\n let initialParams = {\n destination: this.initialDestination,\n bookmark: this.initialBookmark,\n hash: null,\n };\n let storePromise = store.getMultiple({\n exists: false,\n page: '1',\n zoom: DEFAULT_SCALE_VALUE,\n scrollLeft: '0',\n scrollTop: '0',\n sidebarView: SidebarView.NONE,\n }).catch(() => { /* Unable to read from storage; ignoring errors. */ });\n\n Promise.all([storePromise, pageModePromise]).then(\n ([values = {}, pageMode]) => {\n // Initialize the default values, from user preferences.\n let hash = this.viewerPrefs['defaultZoomValue'] ?\n ('zoom=' + this.viewerPrefs['defaultZoomValue']) : null;\n let sidebarView = this.viewerPrefs['sidebarViewOnLoad'];\n\n if (values.exists && this.viewerPrefs['showPreviousViewOnLoad']) {\n hash = 'page=' + values.page +\n '&zoom=' + (this.viewerPrefs['defaultZoomValue'] || values.zoom) +\n ',' + values.scrollLeft + ',' + values.scrollTop;\n sidebarView = sidebarView || (values.sidebarView | 0);\n }\n if (pageMode && !this.viewerPrefs['disablePageMode']) {\n // Always let the user preference/history take precedence.\n sidebarView = sidebarView || apiPageModeToSidebarView(pageMode);\n }\n return {\n hash,\n sidebarView,\n };\n }).then(({ hash, sidebarView, }) => {\n this.setInitialView(hash, { sidebarView, scale, });\n initialParams.hash = hash;\n\n // Make all navigation keys work on document load,\n // unless the viewer is embedded in a web page.\n if (!this.isViewerEmbedded) {\n pdfViewer.focus();\n }\n return pagesPromise;\n }).then(() => {\n // For documents with different page sizes, once all pages are resolved,\n // ensure that the correct location becomes visible on load.\n if (!initialParams.destination && !initialParams.bookmark &&\n !initialParams.hash) {\n return;\n }\n if (pdfViewer.hasEqualPageSizes) {\n return;\n }\n this.initialDestination = initialParams.destination;\n this.initialBookmark = initialParams.bookmark;\n\n pdfViewer.currentScaleValue = pdfViewer.currentScaleValue;\n this.setInitialView(initialParams.hash);\n }).then(function() {\n // At this point, rendering of the initial page(s) should always have\n // started (and may even have completed).\n // To prevent any future issues, e.g. the document being completely\n // blank on load, always trigger rendering here.\n pdfViewer.update();\n });\n });\n\n pdfDocument.getPageLabels().then((labels) => {\n if (!labels || this.viewerPrefs['disablePageLabels']) {\n return;\n }\n let i = 0, numLabels = labels.length;\n if (numLabels !== this.pagesCount) {\n console.error('The number of Page Labels does not match ' +\n 'the number of pages in the document.');\n return;\n }\n // Ignore page labels that correspond to standard page numbering.\n while (i < numLabels && labels[i] === (i + 1).toString()) {\n i++;\n }\n if (i === numLabels) {\n return;\n }\n\n pdfViewer.setPageLabels(labels);\n pdfThumbnailViewer.setPageLabels(labels);\n\n // Changing toolbar page display to use labels and we need to set\n // the label of the current page.\n this.toolbar.setPagesCount(pdfDocument.numPages, true);\n this.toolbar.setPageNumber(pdfViewer.currentPageNumber,\n pdfViewer.currentPageLabel);\n });\n\n pagesPromise.then(() => {\n if (!this.supportsPrinting) {\n return;\n }\n pdfDocument.getJavaScript().then((javaScript) => {\n if (javaScript.length) {\n console.warn('Warning: JavaScript is not supported');\n this.fallback(UNSUPPORTED_FEATURES.javaScript);\n }\n // Hack to support auto printing.\n let regex = /\\bprint\\s*\\(/;\n for (let i = 0, ii = javaScript.length; i < ii; i++) {\n let js = javaScript[i];\n if (js && regex.test(js)) {\n setTimeout(function() {\n window.print();\n });\n return;\n }\n }\n });\n });\n\n Promise.all([onePageRendered, animationStarted]).then(() => {\n pdfDocument.getOutline().then((outline) => {\n this.pdfOutlineViewer.render({ outline, });\n });\n pdfDocument.getAttachments().then((attachments) => {\n this.pdfAttachmentViewer.render({ attachments, });\n });\n });\n\n pdfDocument.getMetadata().then(({ info, metadata, }) => {\n this.documentInfo = info;\n this.metadata = metadata;\n\n // Provides some basic debug information\n console.log('PDF ' + pdfDocument.fingerprint + ' [' +\n info.PDFFormatVersion + ' ' + (info.Producer || '-').trim() +\n ' / ' + (info.Creator || '-').trim() + ']' +\n ' (PDF.js: ' + (version || '-') +\n (!PDFJS.disableWebGL ? ' [WebGL]' : '') + ')');\n\n let pdfTitle;\n if (metadata && metadata.has('dc:title')) {\n let title = metadata.get('dc:title');\n // Ghostscript sometimes return 'Untitled', sets the title to 'Untitled'\n if (title !== 'Untitled') {\n pdfTitle = title;\n }\n }\n\n if (!pdfTitle && info && info['Title']) {\n pdfTitle = info['Title'];\n }\n\n if (pdfTitle) {\n this.setTitle(pdfTitle + ' - ' + document.title);\n }\n\n if (info.IsAcroFormPresent) {\n console.warn('Warning: AcroForm/XFA is not supported');\n this.fallback(UNSUPPORTED_FEATURES.forms);\n }\n\n if (typeof PDFJSDev !== 'undefined' &&\n PDFJSDev.test('FIREFOX || MOZCENTRAL')) {\n let versionId = String(info.PDFFormatVersion).slice(-1) | 0;\n let generatorId = 0;\n const KNOWN_GENERATORS = [\n 'acrobat distiller', 'acrobat pdfwriter', 'adobe livecycle',\n 'adobe pdf library', 'adobe photoshop', 'ghostscript', 'tcpdf',\n 'cairo', 'dvipdfm', 'dvips', 'pdftex', 'pdfkit', 'itext', 'prince',\n 'quarkxpress', 'mac os x', 'microsoft', 'openoffice', 'oracle',\n 'luradocument', 'pdf-xchange', 'antenna house', 'aspose.cells', 'fpdf'\n ];\n if (info.Producer) {\n KNOWN_GENERATORS.some(function (generator, s, i) {\n if (generator.indexOf(s) < 0) {\n return false;\n }\n generatorId = i + 1;\n return true;\n }.bind(null, info.Producer.toLowerCase()));\n }\n let formType = !info.IsAcroFormPresent ? null : info.IsXFAPresent ?\n 'xfa' : 'acroform';\n this.externalServices.reportTelemetry({\n type: 'documentInfo',\n version: versionId,\n generator: generatorId,\n formType,\n });\n }\n });\n },\n\n setInitialView(storedHash, options = {}) {\n let { scale = 0, sidebarView = SidebarView.NONE, } = options;\n\n this.isInitialViewSet = true;\n this.pdfSidebar.setInitialView(sidebarView);\n\n if (this.initialDestination) {\n this.pdfLinkService.navigateTo(this.initialDestination);\n this.initialDestination = null;\n } else if (this.initialBookmark) {\n this.pdfLinkService.setHash(this.initialBookmark);\n this.pdfHistory.push({ hash: this.initialBookmark, }, true);\n this.initialBookmark = null;\n } else if (storedHash) {\n this.pdfLinkService.setHash(storedHash);\n } else if (scale) {\n this.pdfViewer.currentScaleValue = scale;\n this.page = 1;\n }\n\n // Ensure that the correct page number is displayed in the UI,\n // even if the active page didn't change during document load.\n this.toolbar.setPageNumber(this.pdfViewer.currentPageNumber,\n this.pdfViewer.currentPageLabel);\n this.secondaryToolbar.setPageNumber(this.pdfViewer.currentPageNumber);\n\n if (!this.pdfViewer.currentScaleValue) {\n // Scale was not initialized: invalid bookmark or scale was not specified.\n // Setting the default one.\n this.pdfViewer.currentScaleValue = DEFAULT_SCALE_VALUE;\n }\n },\n\n cleanup() {\n if (!this.pdfDocument) {\n return; // run cleanup when document is loaded\n }\n this.pdfViewer.cleanup();\n this.pdfThumbnailViewer.cleanup();\n\n // We don't want to remove fonts used by active page SVGs.\n if (this.pdfViewer.renderer !== RendererType.SVG) {\n this.pdfDocument.cleanup();\n }\n },\n\n forceRendering() {\n this.pdfRenderingQueue.printing = this.printing;\n this.pdfRenderingQueue.isThumbnailViewEnabled =\n this.pdfSidebar.isThumbnailViewVisible;\n this.pdfRenderingQueue.renderHighestPriority();\n },\n\n beforePrint() {\n if (this.printService) {\n // There is no way to suppress beforePrint/afterPrint events,\n // but PDFPrintService may generate double events -- this will ignore\n // the second event that will be coming from native window.print().\n return;\n }\n\n if (!this.supportsPrinting) {\n this.l10n.get('printing_not_supported', null,\n 'Warning: Printing is not fully supported by ' +\n 'this browser.').then((printMessage) => {\n this.error(printMessage);\n });\n return;\n }\n\n // The beforePrint is a sync method and we need to know layout before\n // returning from this method. Ensure that we can get sizes of the pages.\n if (!this.pdfViewer.pageViewsReady) {\n this.l10n.get('printing_not_ready', null,\n 'Warning: The PDF is not fully loaded for printing.').\n then((notReadyMessage) => {\n window.alert(notReadyMessage);\n });\n return;\n }\n\n let pagesOverview = this.pdfViewer.getPagesOverview();\n let printContainer = this.appConfig.printContainer;\n let printService = PDFPrintServiceFactory.instance.createPrintService(\n this.pdfDocument, pagesOverview, printContainer, this.l10n);\n this.printService = printService;\n this.forceRendering();\n\n printService.layout();\n\n if (typeof PDFJSDev !== 'undefined' &&\n PDFJSDev.test('FIREFOX || MOZCENTRAL')) {\n this.externalServices.reportTelemetry({\n type: 'print',\n });\n }\n },\n\n afterPrint: function pdfViewSetupAfterPrint() {\n if (this.printService) {\n this.printService.destroy();\n this.printService = null;\n }\n this.forceRendering();\n },\n\n rotatePages(delta) {\n if (!this.pdfDocument) {\n return;\n }\n let { pdfViewer, pdfThumbnailViewer, } = this;\n let pageNumber = pdfViewer.currentPageNumber;\n let newRotation = (pdfViewer.pagesRotation + 360 + delta) % 360;\n\n pdfViewer.pagesRotation = newRotation;\n pdfThumbnailViewer.pagesRotation = newRotation;\n\n this.forceRendering();\n // Ensure that the active page doesn't change during rotation.\n pdfViewer.currentPageNumber = pageNumber;\n },\n\n requestPresentationMode() {\n if (!this.pdfPresentationMode) {\n return;\n }\n this.pdfPresentationMode.request();\n },\n\n bindEvents() {\n let { eventBus, _boundEvents, } = this;\n\n _boundEvents.beforePrint = this.beforePrint.bind(this);\n _boundEvents.afterPrint = this.afterPrint.bind(this);\n\n eventBus.on('resize', webViewerResize);\n eventBus.on('hashchange', webViewerHashchange);\n eventBus.on('beforeprint', _boundEvents.beforePrint);\n eventBus.on('afterprint', _boundEvents.afterPrint);\n eventBus.on('pagerendered', webViewerPageRendered);\n eventBus.on('textlayerrendered', webViewerTextLayerRendered);\n eventBus.on('updateviewarea', webViewerUpdateViewarea);\n eventBus.on('pagechanging', webViewerPageChanging);\n eventBus.on('scalechanging', webViewerScaleChanging);\n eventBus.on('sidebarviewchanged', webViewerSidebarViewChanged);\n eventBus.on('pagemode', webViewerPageMode);\n eventBus.on('namedaction', webViewerNamedAction);\n eventBus.on('presentationmodechanged', webViewerPresentationModeChanged);\n eventBus.on('presentationmode', webViewerPresentationMode);\n eventBus.on('openfile', webViewerOpenFile);\n eventBus.on('print', webViewerPrint);\n eventBus.on('download', webViewerDownload);\n eventBus.on('firstpage', webViewerFirstPage);\n eventBus.on('lastpage', webViewerLastPage);\n eventBus.on('nextpage', webViewerNextPage);\n eventBus.on('previouspage', webViewerPreviousPage);\n eventBus.on('zoomin', webViewerZoomIn);\n eventBus.on('zoomout', webViewerZoomOut);\n eventBus.on('pagenumberchanged', webViewerPageNumberChanged);\n eventBus.on('scalechanged', webViewerScaleChanged);\n eventBus.on('rotatecw', webViewerRotateCw);\n eventBus.on('rotateccw', webViewerRotateCcw);\n eventBus.on('documentproperties', webViewerDocumentProperties);\n eventBus.on('find', webViewerFind);\n eventBus.on('findfromurlhash', webViewerFindFromUrlHash);\n if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) {\n eventBus.on('fileinputchange', webViewerFileInputChange);\n }\n },\n\n bindWindowEvents() {\n let { eventBus, _boundEvents, } = this;\n\n _boundEvents.windowResize = () => {\n eventBus.dispatch('resize');\n };\n _boundEvents.windowHashChange = () => {\n eventBus.dispatch('hashchange', {\n hash: document.location.hash.substring(1),\n });\n };\n _boundEvents.windowBeforePrint = () => {\n eventBus.dispatch('beforeprint');\n };\n _boundEvents.windowAfterPrint = () => {\n eventBus.dispatch('afterprint');\n };\n\n window.addEventListener('wheel', webViewerWheel);\n window.addEventListener('click', webViewerClick);\n window.addEventListener('keydown', webViewerKeyDown);\n window.addEventListener('resize', _boundEvents.windowResize);\n window.addEventListener('hashchange', _boundEvents.windowHashChange);\n window.addEventListener('beforeprint', _boundEvents.windowBeforePrint);\n window.addEventListener('afterprint', _boundEvents.windowAfterPrint);\n if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) {\n _boundEvents.windowChange = (evt) => {\n let files = evt.target.files;\n if (!files || files.length === 0) {\n return;\n }\n eventBus.dispatch('fileinputchange', {\n fileInput: evt.target,\n });\n };\n window.addEventListener('change', _boundEvents.windowChange);\n }\n },\n\n unbindEvents() {\n let { eventBus, _boundEvents, } = this;\n\n eventBus.off('resize', webViewerResize);\n eventBus.off('hashchange', webViewerHashchange);\n eventBus.off('beforeprint', _boundEvents.beforePrint);\n eventBus.off('afterprint', _boundEvents.afterPrint);\n eventBus.off('pagerendered', webViewerPageRendered);\n eventBus.off('textlayerrendered', webViewerTextLayerRendered);\n eventBus.off('updateviewarea', webViewerUpdateViewarea);\n eventBus.off('pagechanging', webViewerPageChanging);\n eventBus.off('scalechanging', webViewerScaleChanging);\n eventBus.off('sidebarviewchanged', webViewerSidebarViewChanged);\n eventBus.off('pagemode', webViewerPageMode);\n eventBus.off('namedaction', webViewerNamedAction);\n eventBus.off('presentationmodechanged', webViewerPresentationModeChanged);\n eventBus.off('presentationmode', webViewerPresentationMode);\n eventBus.off('openfile', webViewerOpenFile);\n eventBus.off('print', webViewerPrint);\n eventBus.off('download', webViewerDownload);\n eventBus.off('firstpage', webViewerFirstPage);\n eventBus.off('lastpage', webViewerLastPage);\n eventBus.off('nextpage', webViewerNextPage);\n eventBus.off('previouspage', webViewerPreviousPage);\n eventBus.off('zoomin', webViewerZoomIn);\n eventBus.off('zoomout', webViewerZoomOut);\n eventBus.off('pagenumberchanged', webViewerPageNumberChanged);\n eventBus.off('scalechanged', webViewerScaleChanged);\n eventBus.off('rotatecw', webViewerRotateCw);\n eventBus.off('rotateccw', webViewerRotateCcw);\n eventBus.off('documentproperties', webViewerDocumentProperties);\n eventBus.off('find', webViewerFind);\n eventBus.off('findfromurlhash', webViewerFindFromUrlHash);\n if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) {\n eventBus.off('fileinputchange', webViewerFileInputChange);\n }\n\n _boundEvents.beforePrint = null;\n _boundEvents.afterPrint = null;\n },\n\n unbindWindowEvents() {\n let { _boundEvents, } = this;\n\n window.removeEventListener('wheel', webViewerWheel);\n window.removeEventListener('click', webViewerClick);\n window.removeEventListener('keydown', webViewerKeyDown);\n window.removeEventListener('resize', _boundEvents.windowResize);\n window.removeEventListener('hashchange', _boundEvents.windowHashChange);\n window.removeEventListener('beforeprint', _boundEvents.windowBeforePrint);\n window.removeEventListener('afterprint', _boundEvents.windowAfterPrint);\n if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) {\n window.removeEventListener('change', _boundEvents.windowChange);\n _boundEvents.windowChange = null;\n }\n\n _boundEvents.windowResize = null;\n _boundEvents.windowHashChange = null;\n _boundEvents.windowBeforePrint = null;\n _boundEvents.windowAfterPrint = null;\n },\n};\n\nlet validateFileURL;\nif (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) {\n const HOSTED_VIEWER_ORIGINS = ['null',\n 'http://mozilla.github.io', 'https://mozilla.github.io'];\n validateFileURL = function validateFileURL(file) {\n if (file === undefined) {\n return;\n }\n try {\n let viewerOrigin = new URL(window.location.href).origin || 'null';\n if (HOSTED_VIEWER_ORIGINS.indexOf(viewerOrigin) >= 0) {\n // Hosted or local viewer, allow for any file locations\n return;\n }\n let fileOrigin = new URL(file, window.location.href).origin;\n // Removing of the following line will not guarantee that the viewer will\n // start accepting URLs from foreign origin -- CORS headers on the remote\n // server must be properly configured.\n if (fileOrigin !== viewerOrigin) {\n throw new Error('file origin does not match viewer\\'s');\n }\n } catch (ex) {\n let message = ex && ex.message;\n PDFViewerApplication.l10n.get('loading_error', null,\n 'An error occurred while loading the PDF.').\n then((loadingErrorMessage) => {\n PDFViewerApplication.error(loadingErrorMessage, { message, });\n });\n throw ex;\n }\n };\n}\n\nfunction loadAndEnablePDFBug(enabledTabs) {\n return new Promise(function (resolve, reject) {\n let appConfig = PDFViewerApplication.appConfig;\n let script = document.createElement('script');\n script.src = appConfig.debuggerScriptPath;\n script.onload = function () {\n PDFBug.enable(enabledTabs);\n PDFBug.init({\n PDFJS,\n OPS,\n }, appConfig.mainContainer);\n resolve();\n };\n script.onerror = function () {\n reject(new Error('Cannot load debugger at ' + script.src));\n };\n (document.getElementsByTagName('head')[0] || document.body).\n appendChild(script);\n });\n}\n\nfunction webViewerInitialized() {\n let appConfig = PDFViewerApplication.appConfig;\n let file;\n if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) {\n let queryString = document.location.search.substring(1);\n let params = parseQueryString(queryString);\n file = 'file' in params ? params.file : appConfig.defaultUrl;\n validateFileURL(file);\n } else if (PDFJSDev.test('FIREFOX || MOZCENTRAL')) {\n file = window.location.href.split('#')[0];\n } else if (PDFJSDev.test('CHROME')) {\n file = appConfig.defaultUrl;\n }\n\n let waitForBeforeOpening = [];\n if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) {\n let fileInput = document.createElement('input');\n fileInput.id = appConfig.openFileInputName;\n fileInput.className = 'fileInput';\n fileInput.setAttribute('type', 'file');\n fileInput.oncontextmenu = noContextMenuHandler;\n document.body.appendChild(fileInput);\n\n if (!window.File || !window.FileReader ||\n !window.FileList || !window.Blob) {\n appConfig.toolbar.openFile.setAttribute('hidden', 'true');\n appConfig.secondaryToolbar.openFileButton.setAttribute('hidden', 'true');\n } else {\n fileInput.value = null;\n }\n } else {\n appConfig.toolbar.openFile.setAttribute('hidden', 'true');\n appConfig.secondaryToolbar.openFileButton.setAttribute('hidden', 'true');\n }\n\n if ((typeof PDFJSDev === 'undefined' || !PDFJSDev.test('PRODUCTION')) ||\n PDFViewerApplication.viewerPrefs['pdfBugEnabled']) {\n // Special debugging flags in the hash section of the URL.\n let hash = document.location.hash.substring(1);\n let hashParams = parseQueryString(hash);\n\n if ('disableworker' in hashParams) {\n PDFJS.disableWorker = (hashParams['disableworker'] === 'true');\n }\n if ('disablerange' in hashParams) {\n PDFJS.disableRange = (hashParams['disablerange'] === 'true');\n }\n if ('disablestream' in hashParams) {\n PDFJS.disableStream = (hashParams['disablestream'] === 'true');\n }\n if ('disableautofetch' in hashParams) {\n PDFJS.disableAutoFetch = (hashParams['disableautofetch'] === 'true');\n }\n if ('disablefontface' in hashParams) {\n PDFJS.disableFontFace = (hashParams['disablefontface'] === 'true');\n }\n if ('disablehistory' in hashParams) {\n PDFJS.disableHistory = (hashParams['disablehistory'] === 'true');\n }\n if ('webgl' in hashParams) {\n PDFJS.disableWebGL = (hashParams['webgl'] !== 'true');\n }\n if ('useonlycsszoom' in hashParams) {\n PDFJS.useOnlyCssZoom = (hashParams['useonlycsszoom'] === 'true');\n }\n if ('verbosity' in hashParams) {\n PDFJS.verbosity = hashParams['verbosity'] | 0;\n }\n if ('ignorecurrentpositiononzoom' in hashParams) {\n PDFJS.ignoreCurrentPositionOnZoom =\n (hashParams['ignorecurrentpositiononzoom'] === 'true');\n }\n if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('PRODUCTION')) {\n if ('disablebcmaps' in hashParams && hashParams['disablebcmaps']) {\n PDFJS.cMapUrl = '../external/cmaps/';\n PDFJS.cMapPacked = false;\n }\n }\n if ('textlayer' in hashParams) {\n switch (hashParams['textlayer']) {\n case 'off':\n PDFJS.disableTextLayer = true;\n break;\n case 'visible':\n case 'shadow':\n case 'hover':\n let viewer = appConfig.viewerContainer;\n viewer.classList.add('textLayer-' + hashParams['textlayer']);\n break;\n }\n }\n if ('pdfbug' in hashParams) {\n PDFJS.pdfBug = true;\n let pdfBug = hashParams['pdfbug'];\n let enabled = pdfBug.split(',');\n waitForBeforeOpening.push(loadAndEnablePDFBug(enabled));\n }\n }\n\n if (typeof PDFJSDev !== 'undefined' &&\n PDFJSDev.test('FIREFOX || MOZCENTRAL') &&\n !PDFViewerApplication.supportsDocumentFonts) {\n PDFJS.disableFontFace = true;\n PDFViewerApplication.l10n.get('web_fonts_disabled', null,\n 'Web fonts are disabled: unable to use embedded PDF fonts.').\n then((msg) => {\n console.warn(msg);\n });\n }\n\n if (!PDFViewerApplication.supportsPrinting) {\n appConfig.toolbar.print.classList.add('hidden');\n appConfig.secondaryToolbar.printButton.classList.add('hidden');\n }\n\n if (!PDFViewerApplication.supportsFullscreen) {\n appConfig.toolbar.presentationModeButton.classList.add('hidden');\n appConfig.secondaryToolbar.presentationModeButton.classList.add('hidden');\n }\n\n if (PDFViewerApplication.supportsIntegratedFind) {\n appConfig.toolbar.viewFind.classList.add('hidden');\n }\n\n appConfig.sidebar.mainContainer.addEventListener('transitionend',\n function(evt) {\n if (evt.target === /* mainContainer */ this) {\n PDFViewerApplication.eventBus.dispatch('resize');\n }\n }, true);\n\n appConfig.sidebar.toggleButton.addEventListener('click', function() {\n PDFViewerApplication.pdfSidebar.toggle();\n });\n\n Promise.all(waitForBeforeOpening).then(function () {\n webViewerOpenFileViaURL(file);\n }).catch(function (reason) {\n PDFViewerApplication.l10n.get('loading_error', null,\n 'An error occurred while opening.').then((msg) => {\n PDFViewerApplication.error(msg, reason);\n });\n });\n}\n\nlet webViewerOpenFileViaURL;\nif (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) {\n webViewerOpenFileViaURL = function webViewerOpenFileViaURL(file) {\n if (file && file.lastIndexOf('file:', 0) === 0) {\n // file:-scheme. Load the contents in the main thread because QtWebKit\n // cannot load file:-URLs in a Web Worker. file:-URLs are usually loaded\n // very quickly, so there is no need to set up progress event listeners.\n PDFViewerApplication.setTitleUsingUrl(file);\n let xhr = new XMLHttpRequest();\n xhr.onload = function() {\n PDFViewerApplication.open(new Uint8Array(xhr.response));\n };\n try {\n xhr.open('GET', file);\n xhr.responseType = 'arraybuffer';\n xhr.send();\n } catch (ex) {\n PDFViewerApplication.l10n.get('loading_error', null,\n 'An error occurred while loading the PDF.').then((msg) => {\n PDFViewerApplication.error(msg, ex);\n });\n }\n return;\n }\n\n if (file) {\n PDFViewerApplication.open(file);\n }\n };\n} else if (PDFJSDev.test('FIREFOX || MOZCENTRAL || CHROME')) {\n webViewerOpenFileViaURL = function webViewerOpenFileViaURL(file) {\n PDFViewerApplication.setTitleUsingUrl(file);\n PDFViewerApplication.initPassiveLoading();\n };\n} else {\n webViewerOpenFileViaURL = function webViewerOpenFileURL(file) {\n if (file) {\n throw new Error('Not implemented: webViewerOpenFileURL');\n }\n };\n}\n\nfunction webViewerPageRendered(evt) {\n let pageNumber = evt.pageNumber;\n let pageIndex = pageNumber - 1;\n let pageView = PDFViewerApplication.pdfViewer.getPageView(pageIndex);\n\n // If the page is still visible when it has finished rendering,\n // ensure that the page number input loading indicator is hidden.\n if (pageNumber === PDFViewerApplication.page) {\n PDFViewerApplication.toolbar.updateLoadingIndicatorState(false);\n }\n\n // Prevent errors in the edge-case where the PDF document is removed *before*\n // the 'pagerendered' event handler is invoked.\n if (!pageView) {\n return;\n }\n\n // Use the rendered page to set the corresponding thumbnail image.\n if (PDFViewerApplication.pdfSidebar.isThumbnailViewVisible) {\n let thumbnailView = PDFViewerApplication.pdfThumbnailViewer.\n getThumbnail(pageIndex);\n thumbnailView.setImage(pageView);\n }\n\n if (PDFJS.pdfBug && Stats.enabled && pageView.stats) {\n Stats.add(pageNumber, pageView.stats);\n }\n\n if (pageView.error) {\n PDFViewerApplication.l10n.get('rendering_error', null,\n 'An error occurred while rendering the page.').then((msg) => {\n PDFViewerApplication.error(msg, pageView.error);\n });\n }\n\n if (typeof PDFJSDev !== 'undefined' &&\n PDFJSDev.test('FIREFOX || MOZCENTRAL')) {\n PDFViewerApplication.externalServices.reportTelemetry({\n type: 'pageInfo',\n });\n // It is a good time to report stream and font types.\n PDFViewerApplication.pdfDocument.getStats().then(function (stats) {\n PDFViewerApplication.externalServices.reportTelemetry({\n type: 'documentStats',\n stats,\n });\n });\n }\n}\n\nfunction webViewerTextLayerRendered(evt) {\n if (typeof PDFJSDev !== 'undefined' &&\n PDFJSDev.test('FIREFOX || MOZCENTRAL') &&\n evt.numTextDivs > 0 && !PDFViewerApplication.supportsDocumentColors) {\n PDFViewerApplication.l10n.get('document_colors_not_allowed', null,\n 'PDF documents are not allowed to use their own colors: ' +\n '\\'Allow pages to choose their own colors\\' ' +\n 'is deactivated in the browser.').\n then((msg) => {\n console.error(msg);\n });\n PDFViewerApplication.fallback();\n }\n}\n\nfunction webViewerPageMode(evt) {\n // Handle the 'pagemode' hash parameter, see also `PDFLinkService_setHash`.\n let mode = evt.mode, view;\n switch (mode) {\n case 'thumbs':\n view = SidebarView.THUMBS;\n break;\n case 'bookmarks':\n case 'outline':\n view = SidebarView.OUTLINE;\n break;\n case 'attachments':\n view = SidebarView.ATTACHMENTS;\n break;\n case 'none':\n view = SidebarView.NONE;\n break;\n default:\n console.error('Invalid \"pagemode\" hash parameter: ' + mode);\n return;\n }\n PDFViewerApplication.pdfSidebar.switchView(view, /* forceOpen = */ true);\n}\n\nfunction webViewerNamedAction(evt) {\n // Processing couple of named actions that might be useful.\n // See also PDFLinkService.executeNamedAction\n let action = evt.action;\n switch (action) {\n case 'GoToPage':\n PDFViewerApplication.appConfig.toolbar.pageNumber.select();\n break;\n\n case 'Find':\n if (!PDFViewerApplication.supportsIntegratedFind) {\n PDFViewerApplication.findBar.toggle();\n }\n break;\n }\n}\n\nfunction webViewerPresentationModeChanged(evt) {\n let { active, switchInProgress, } = evt;\n PDFViewerApplication.pdfViewer.presentationModeState =\n switchInProgress ? PresentationModeState.CHANGING :\n active ? PresentationModeState.FULLSCREEN : PresentationModeState.NORMAL;\n}\n\nfunction webViewerSidebarViewChanged(evt) {\n PDFViewerApplication.pdfRenderingQueue.isThumbnailViewEnabled =\n PDFViewerApplication.pdfSidebar.isThumbnailViewVisible;\n\n let store = PDFViewerApplication.store;\n if (store && PDFViewerApplication.isInitialViewSet) {\n // Only update the storage when the document has been loaded *and* rendered.\n store.set('sidebarView', evt.view).catch(function() { });\n }\n}\n\nfunction webViewerUpdateViewarea(evt) {\n let location = evt.location, store = PDFViewerApplication.store;\n\n if (store && PDFViewerApplication.isInitialViewSet) {\n store.setMultiple({\n 'exists': true,\n 'page': location.pageNumber,\n 'zoom': location.scale,\n 'scrollLeft': location.left,\n 'scrollTop': location.top,\n }).catch(function() { /* unable to write to storage */ });\n }\n let href =\n PDFViewerApplication.pdfLinkService.getAnchorUrl(location.pdfOpenParams);\n PDFViewerApplication.appConfig.toolbar.viewBookmark.href = href;\n PDFViewerApplication.appConfig.secondaryToolbar.viewBookmarkButton.href =\n href;\n\n // Update the current bookmark in the browsing history.\n PDFViewerApplication.pdfHistory.updateCurrentBookmark(location.pdfOpenParams,\n location.pageNumber);\n\n // Show/hide the loading indicator in the page number input element.\n let currentPage =\n PDFViewerApplication.pdfViewer.getPageView(PDFViewerApplication.page - 1);\n let loading = currentPage.renderingState !== RenderingStates.FINISHED;\n PDFViewerApplication.toolbar.updateLoadingIndicatorState(loading);\n}\n\nfunction webViewerResize() {\n let { pdfDocument, pdfViewer, } = PDFViewerApplication;\n if (!pdfDocument) {\n return;\n }\n let currentScaleValue = pdfViewer.currentScaleValue;\n if (currentScaleValue === 'auto' ||\n currentScaleValue === 'page-fit' ||\n currentScaleValue === 'page-width') {\n // Note: the scale is constant for 'page-actual'.\n pdfViewer.currentScaleValue = currentScaleValue;\n }\n pdfViewer.update();\n}\n\nfunction webViewerHashchange(evt) {\n if (PDFViewerApplication.pdfHistory.isHashChangeUnlocked) {\n let hash = evt.hash;\n if (!hash) {\n return;\n }\n if (!PDFViewerApplication.isInitialViewSet) {\n PDFViewerApplication.initialBookmark = hash;\n } else {\n PDFViewerApplication.pdfLinkService.setHash(hash);\n }\n }\n}\n\nlet webViewerFileInputChange;\nif (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) {\n webViewerFileInputChange = function webViewerFileInputChange(evt) {\n let file = evt.fileInput.files[0];\n\n if (!PDFJS.disableCreateObjectURL && URL.createObjectURL) {\n PDFViewerApplication.open(URL.createObjectURL(file));\n } else {\n // Read the local file into a Uint8Array.\n let fileReader = new FileReader();\n fileReader.onload = function webViewerChangeFileReaderOnload(evt) {\n let buffer = evt.target.result;\n PDFViewerApplication.open(new Uint8Array(buffer));\n };\n fileReader.readAsArrayBuffer(file);\n }\n\n PDFViewerApplication.setTitleUsingUrl(file.name);\n\n // URL does not reflect proper document location - hiding some icons.\n let appConfig = PDFViewerApplication.appConfig;\n appConfig.toolbar.viewBookmark.setAttribute('hidden', 'true');\n appConfig.secondaryToolbar.viewBookmarkButton.setAttribute('hidden',\n 'true');\n appConfig.toolbar.download.setAttribute('hidden', 'true');\n appConfig.secondaryToolbar.downloadButton.setAttribute('hidden', 'true');\n };\n}\n\nfunction webViewerPresentationMode() {\n PDFViewerApplication.requestPresentationMode();\n}\nfunction webViewerOpenFile() {\n let openFileInputName = PDFViewerApplication.appConfig.openFileInputName;\n document.getElementById(openFileInputName).click();\n}\nfunction webViewerPrint() {\n window.print();\n}\nfunction webViewerDownload() {\n PDFViewerApplication.download();\n}\nfunction webViewerFirstPage() {\n if (PDFViewerApplication.pdfDocument) {\n PDFViewerApplication.page = 1;\n }\n}\nfunction webViewerLastPage() {\n if (PDFViewerApplication.pdfDocument) {\n PDFViewerApplication.page = PDFViewerApplication.pagesCount;\n }\n}\nfunction webViewerNextPage() {\n PDFViewerApplication.page++;\n}\nfunction webViewerPreviousPage() {\n PDFViewerApplication.page--;\n}\nfunction webViewerZoomIn() {\n PDFViewerApplication.zoomIn();\n}\nfunction webViewerZoomOut() {\n PDFViewerApplication.zoomOut();\n}\nfunction webViewerPageNumberChanged(evt) {\n let pdfViewer = PDFViewerApplication.pdfViewer;\n pdfViewer.currentPageLabel = evt.value;\n\n // Ensure that the page number input displays the correct value, even if the\n // value entered by the user was invalid (e.g. a floating point number).\n if (evt.value !== pdfViewer.currentPageNumber.toString() &&\n evt.value !== pdfViewer.currentPageLabel) {\n PDFViewerApplication.toolbar.setPageNumber(\n pdfViewer.currentPageNumber, pdfViewer.currentPageLabel);\n }\n}\nfunction webViewerScaleChanged(evt) {\n PDFViewerApplication.pdfViewer.currentScaleValue = evt.value;\n}\nfunction webViewerRotateCw() {\n PDFViewerApplication.rotatePages(90);\n}\nfunction webViewerRotateCcw() {\n PDFViewerApplication.rotatePages(-90);\n}\nfunction webViewerDocumentProperties() {\n PDFViewerApplication.pdfDocumentProperties.open();\n}\n\nfunction webViewerFind(evt) {\n PDFViewerApplication.findController.executeCommand('find' + evt.type, {\n query: evt.query,\n phraseSearch: evt.phraseSearch,\n caseSensitive: evt.caseSensitive,\n highlightAll: evt.highlightAll,\n findPrevious: evt.findPrevious,\n });\n}\n\nfunction webViewerFindFromUrlHash(evt) {\n PDFViewerApplication.findController.executeCommand('find', {\n query: evt.query,\n phraseSearch: evt.phraseSearch,\n caseSensitive: false,\n highlightAll: true,\n findPrevious: false,\n });\n}\n\nfunction webViewerScaleChanging(evt) {\n PDFViewerApplication.toolbar.setPageScale(evt.presetValue, evt.scale);\n\n PDFViewerApplication.pdfViewer.update();\n}\n\nfunction webViewerPageChanging(evt) {\n let page = evt.pageNumber;\n\n PDFViewerApplication.toolbar.setPageNumber(page, evt.pageLabel || null);\n PDFViewerApplication.secondaryToolbar.setPageNumber(page);\n\n if (PDFViewerApplication.pdfSidebar.isThumbnailViewVisible) {\n PDFViewerApplication.pdfThumbnailViewer.scrollThumbnailIntoView(page);\n }\n\n // we need to update stats\n if (PDFJS.pdfBug && Stats.enabled) {\n let pageView = PDFViewerApplication.pdfViewer.getPageView(page - 1);\n if (pageView.stats) {\n Stats.add(page, pageView.stats);\n }\n }\n}\n\nlet zoomDisabled = false, zoomDisabledTimeout;\nfunction webViewerWheel(evt) {\n let pdfViewer = PDFViewerApplication.pdfViewer;\n if (pdfViewer.isInPresentationMode) {\n return;\n }\n\n if (evt.ctrlKey || evt.metaKey) {\n let support = PDFViewerApplication.supportedMouseWheelZoomModifierKeys;\n if ((evt.ctrlKey && !support.ctrlKey) ||\n (evt.metaKey && !support.metaKey)) {\n return;\n }\n // Only zoom the pages, not the entire viewer.\n evt.preventDefault();\n // NOTE: this check must be placed *after* preventDefault.\n if (zoomDisabled) {\n return;\n }\n\n let previousScale = pdfViewer.currentScale;\n\n let delta = normalizeWheelEventDelta(evt);\n\n const MOUSE_WHEEL_DELTA_PER_PAGE_SCALE = 3.0;\n let ticks = delta * MOUSE_WHEEL_DELTA_PER_PAGE_SCALE;\n if (ticks < 0) {\n PDFViewerApplication.zoomOut(-ticks);\n } else {\n PDFViewerApplication.zoomIn(ticks);\n }\n\n let currentScale = pdfViewer.currentScale;\n if (previousScale !== currentScale) {\n // After scaling the page via zoomIn/zoomOut, the position of the upper-\n // left corner is restored. When the mouse wheel is used, the position\n // under the cursor should be restored instead.\n let scaleCorrectionFactor = currentScale / previousScale - 1;\n let rect = pdfViewer.container.getBoundingClientRect();\n let dx = evt.clientX - rect.left;\n let dy = evt.clientY - rect.top;\n pdfViewer.container.scrollLeft += dx * scaleCorrectionFactor;\n pdfViewer.container.scrollTop += dy * scaleCorrectionFactor;\n }\n } else {\n zoomDisabled = true;\n clearTimeout(zoomDisabledTimeout);\n zoomDisabledTimeout = setTimeout(function () {\n zoomDisabled = false;\n }, 1000);\n }\n}\n\nfunction webViewerClick(evt) {\n if (!PDFViewerApplication.secondaryToolbar.isOpen) {\n return;\n }\n let appConfig = PDFViewerApplication.appConfig;\n if (PDFViewerApplication.pdfViewer.containsElement(evt.target) ||\n (appConfig.toolbar.container.contains(evt.target) &&\n evt.target !== appConfig.secondaryToolbar.toggleButton)) {\n PDFViewerApplication.secondaryToolbar.close();\n }\n}\n\nfunction webViewerKeyDown(evt) {\n if (PDFViewerApplication.overlayManager.active) {\n return;\n }\n\n let handled = false, ensureViewerFocused = false;\n let cmd = (evt.ctrlKey ? 1 : 0) |\n (evt.altKey ? 2 : 0) |\n (evt.shiftKey ? 4 : 0) |\n (evt.metaKey ? 8 : 0);\n\n let pdfViewer = PDFViewerApplication.pdfViewer;\n let isViewerInPresentationMode = pdfViewer && pdfViewer.isInPresentationMode;\n\n // First, handle the key bindings that are independent whether an input\n // control is selected or not.\n if (cmd === 1 || cmd === 8 || cmd === 5 || cmd === 12) {\n // either CTRL or META key with optional SHIFT.\n switch (evt.keyCode) {\n case 70: // f\n if (!PDFViewerApplication.supportsIntegratedFind) {\n PDFViewerApplication.findBar.open();\n handled = true;\n }\n break;\n case 71: // g\n if (!PDFViewerApplication.supportsIntegratedFind) {\n let findState = PDFViewerApplication.findController.state;\n if (findState) {\n PDFViewerApplication.findController.executeCommand('findagain', {\n query: findState.query,\n phraseSearch: findState.phraseSearch,\n caseSensitive: findState.caseSensitive,\n highlightAll: findState.highlightAll,\n findPrevious: cmd === 5 || cmd === 12,\n });\n }\n handled = true;\n }\n break;\n case 61: // FF/Mac '='\n case 107: // FF '+' and '='\n case 187: // Chrome '+'\n case 171: // FF with German keyboard\n if (!isViewerInPresentationMode) {\n PDFViewerApplication.zoomIn();\n }\n handled = true;\n break;\n case 173: // FF/Mac '-'\n case 109: // FF '-'\n case 189: // Chrome '-'\n if (!isViewerInPresentationMode) {\n PDFViewerApplication.zoomOut();\n }\n handled = true;\n break;\n case 48: // '0'\n case 96: // '0' on Numpad of Swedish keyboard\n if (!isViewerInPresentationMode) {\n // keeping it unhandled (to restore page zoom to 100%)\n setTimeout(function () {\n // ... and resetting the scale after browser adjusts its scale\n pdfViewer.currentScaleValue = DEFAULT_SCALE_VALUE;\n });\n handled = false;\n }\n break;\n\n case 38: // up arrow\n if (isViewerInPresentationMode || PDFViewerApplication.page > 1) {\n PDFViewerApplication.page = 1;\n handled = true;\n ensureViewerFocused = true;\n }\n break;\n case 40: // down arrow\n if (isViewerInPresentationMode ||\n PDFViewerApplication.page < PDFViewerApplication.pagesCount) {\n PDFViewerApplication.page = PDFViewerApplication.pagesCount;\n handled = true;\n ensureViewerFocused = true;\n }\n break;\n }\n }\n\n if (typeof PDFJSDev === 'undefined' ||\n !PDFJSDev.test('FIREFOX || MOZCENTRAL')) {\n // CTRL or META without shift\n if (cmd === 1 || cmd === 8) {\n switch (evt.keyCode) {\n case 83: // s\n PDFViewerApplication.download();\n handled = true;\n break;\n }\n }\n }\n\n // CTRL+ALT or Option+Command\n if (cmd === 3 || cmd === 10) {\n switch (evt.keyCode) {\n case 80: // p\n PDFViewerApplication.requestPresentationMode();\n handled = true;\n break;\n case 71: // g\n // focuses input#pageNumber field\n PDFViewerApplication.appConfig.toolbar.pageNumber.select();\n handled = true;\n break;\n }\n }\n\n if (handled) {\n if (ensureViewerFocused && !isViewerInPresentationMode) {\n pdfViewer.focus();\n }\n evt.preventDefault();\n return;\n }\n\n // Some shortcuts should not get handled if a control/input element\n // is selected.\n let curElement = document.activeElement || document.querySelector(':focus');\n let curElementTagName = curElement && curElement.tagName.toUpperCase();\n if (curElementTagName === 'INPUT' ||\n curElementTagName === 'TEXTAREA' ||\n curElementTagName === 'SELECT') {\n // Make sure that the secondary toolbar is closed when Escape is pressed.\n if (evt.keyCode !== 27) { // 'Esc'\n return;\n }\n }\n\n if (cmd === 0) { // no control key pressed at all.\n switch (evt.keyCode) {\n case 38: // up arrow\n case 33: // pg up\n case 8: // backspace\n if (!isViewerInPresentationMode &&\n pdfViewer.currentScaleValue !== 'page-fit') {\n break;\n }\n /* in presentation mode */\n /* falls through */\n case 37: // left arrow\n // horizontal scrolling using arrow keys\n if (pdfViewer.isHorizontalScrollbarEnabled) {\n break;\n }\n /* falls through */\n case 75: // 'k'\n case 80: // 'p'\n if (PDFViewerApplication.page > 1) {\n PDFViewerApplication.page--;\n }\n handled = true;\n break;\n case 27: // esc key\n if (PDFViewerApplication.secondaryToolbar.isOpen) {\n PDFViewerApplication.secondaryToolbar.close();\n handled = true;\n }\n if (!PDFViewerApplication.supportsIntegratedFind &&\n PDFViewerApplication.findBar.opened) {\n PDFViewerApplication.findBar.close();\n handled = true;\n }\n break;\n case 40: // down arrow\n case 34: // pg down\n case 32: // spacebar\n if (!isViewerInPresentationMode &&\n pdfViewer.currentScaleValue !== 'page-fit') {\n break;\n }\n /* falls through */\n case 39: // right arrow\n // horizontal scrolling using arrow keys\n if (pdfViewer.isHorizontalScrollbarEnabled) {\n break;\n }\n /* falls through */\n case 74: // 'j'\n case 78: // 'n'\n if (PDFViewerApplication.page < PDFViewerApplication.pagesCount) {\n PDFViewerApplication.page++;\n }\n handled = true;\n break;\n\n case 36: // home\n if (isViewerInPresentationMode || PDFViewerApplication.page > 1) {\n PDFViewerApplication.page = 1;\n handled = true;\n ensureViewerFocused = true;\n }\n break;\n case 35: // end\n if (isViewerInPresentationMode ||\n PDFViewerApplication.page < PDFViewerApplication.pagesCount) {\n PDFViewerApplication.page = PDFViewerApplication.pagesCount;\n handled = true;\n ensureViewerFocused = true;\n }\n break;\n\n case 83: // 's'\n PDFViewerApplication.pdfCursorTools.switchTool(CursorTool.SELECT);\n break;\n case 72: // 'h'\n PDFViewerApplication.pdfCursorTools.switchTool(CursorTool.HAND);\n break;\n\n case 82: // 'r'\n PDFViewerApplication.rotatePages(90);\n break;\n }\n }\n\n if (cmd === 4) { // shift-key\n switch (evt.keyCode) {\n case 32: // spacebar\n if (!isViewerInPresentationMode &&\n pdfViewer.currentScaleValue !== 'page-fit') {\n break;\n }\n if (PDFViewerApplication.page > 1) {\n PDFViewerApplication.page--;\n }\n handled = true;\n break;\n\n case 82: // 'r'\n PDFViewerApplication.rotatePages(-90);\n break;\n }\n }\n\n if (!handled && !isViewerInPresentationMode) {\n // 33=Page Up 34=Page Down 35=End 36=Home\n // 37=Left 38=Up 39=Right 40=Down\n // 32=Spacebar\n if ((evt.keyCode >= 33 && evt.keyCode <= 40) ||\n (evt.keyCode === 32 && curElementTagName !== 'BUTTON')) {\n ensureViewerFocused = true;\n }\n }\n\n if (cmd === 2) { // alt-key\n switch (evt.keyCode) {\n case 37: // left arrow\n if (isViewerInPresentationMode) {\n PDFViewerApplication.pdfHistory.back();\n handled = true;\n }\n break;\n case 39: // right arrow\n if (isViewerInPresentationMode) {\n PDFViewerApplication.pdfHistory.forward();\n handled = true;\n }\n break;\n }\n }\n\n if (ensureViewerFocused && !pdfViewer.containsElement(curElement)) {\n // The page container is not focused, but a page navigation key has been\n // pressed. Change the focus to the viewer container to make sure that\n // navigation by keyboard works as expected.\n pdfViewer.focus();\n }\n\n if (handled) {\n evt.preventDefault();\n }\n}\n\n/**\n * Converts API PageMode values to the format used by `PDFSidebar`.\n * NOTE: There's also a \"FullScreen\" parameter which is not possible to support,\n * since the Fullscreen API used in browsers requires that entering\n * fullscreen mode only occurs as a result of a user-initiated event.\n * @param {string} mode - The API PageMode value.\n * @returns {number} A value from {SidebarView}.\n */\nfunction apiPageModeToSidebarView(mode) {\n switch (mode) {\n case 'UseNone':\n return SidebarView.NONE;\n case 'UseThumbs':\n return SidebarView.THUMBS;\n case 'UseOutlines':\n return SidebarView.OUTLINE;\n case 'UseAttachments':\n return SidebarView.ATTACHMENTS;\n case 'UseOC':\n // Not implemented, since we don't support Optional Content Groups yet.\n }\n return SidebarView.NONE; // Default value.\n}\n\n/* Abstract factory for the print service. */\nlet PDFPrintServiceFactory = {\n instance: {\n supportsPrinting: false,\n createPrintService() {\n throw new Error('Not implemented: createPrintService');\n },\n },\n};\n\nexport {\n PDFViewerApplication,\n DefaultExternalServices,\n PDFPrintServiceFactory,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/app.js","/* Copyright 2015 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getGlobalEventBus } from './dom_events';\nimport { parseQueryString } from './ui_utils';\n\n/**\n * @typedef {Object} PDFLinkServiceOptions\n * @property {EventBus} eventBus - The application event bus.\n */\n\n/**\n * Performs navigation functions inside PDF, such as opening specified page,\n * or destination.\n * @implements {IPDFLinkService}\n */\nclass PDFLinkService {\n /**\n * @param {PDFLinkServiceOptions} options\n */\n constructor({ eventBus, } = {}) {\n this.eventBus = eventBus || getGlobalEventBus();\n this.baseUrl = null;\n this.pdfDocument = null;\n this.pdfViewer = null;\n this.pdfHistory = null;\n\n this._pagesRefCache = null;\n }\n\n setDocument(pdfDocument, baseUrl) {\n this.baseUrl = baseUrl;\n this.pdfDocument = pdfDocument;\n this._pagesRefCache = Object.create(null);\n }\n\n setViewer(pdfViewer) {\n this.pdfViewer = pdfViewer;\n }\n\n setHistory(pdfHistory) {\n this.pdfHistory = pdfHistory;\n }\n\n /**\n * @returns {number}\n */\n get pagesCount() {\n return this.pdfDocument ? this.pdfDocument.numPages : 0;\n }\n\n /**\n * @returns {number}\n */\n get page() {\n return this.pdfViewer.currentPageNumber;\n }\n\n /**\n * @param {number} value\n */\n set page(value) {\n this.pdfViewer.currentPageNumber = value;\n }\n\n /**\n * @param {string|Array} dest - The named, or explicit, PDF destination.\n */\n navigateTo(dest) {\n let goToDestination = ({ namedDest, explicitDest, }) => {\n // Dest array looks like that: <page-ref> </XYZ|/FitXXX> <args..>\n let destRef = explicitDest[0], pageNumber;\n\n if (destRef instanceof Object) {\n pageNumber = this._cachedPageNumber(destRef);\n\n if (pageNumber === null) {\n // Fetch the page reference if it's not yet available. This could\n // only occur during loading, before all pages have been resolved.\n this.pdfDocument.getPageIndex(destRef).then((pageIndex) => {\n this.cachePageRef(pageIndex + 1, destRef);\n goToDestination({ namedDest, explicitDest, });\n }).catch(() => {\n console.error(`PDFLinkService.navigateTo: \"${destRef}\" is not ` +\n `a valid page reference, for dest=\"${dest}\".`);\n });\n return;\n }\n } else if ((destRef | 0) === destRef) { // Integer\n pageNumber = destRef + 1;\n } else {\n console.error(`PDFLinkService.navigateTo: \"${destRef}\" is not ` +\n `a valid destination reference, for dest=\"${dest}\".`);\n return;\n }\n if (!pageNumber || pageNumber < 1 || pageNumber > this.pagesCount) {\n console.error(`PDFLinkService.navigateTo: \"${pageNumber}\" is not ` +\n `a valid page number, for dest=\"${dest}\".`);\n return;\n }\n\n this.pdfViewer.scrollPageIntoView({\n pageNumber,\n destArray: explicitDest,\n });\n\n if (this.pdfHistory) { // Update the browsing history, if enabled.\n this.pdfHistory.push({\n dest: explicitDest,\n hash: namedDest,\n page: pageNumber,\n });\n }\n };\n\n new Promise((resolve, reject) => {\n if (typeof dest === 'string') {\n this.pdfDocument.getDestination(dest).then((destArray) => {\n resolve({\n namedDest: dest,\n explicitDest: destArray,\n });\n });\n return;\n }\n resolve({\n namedDest: '',\n explicitDest: dest,\n });\n }).then((data) => {\n if (!(data.explicitDest instanceof Array)) {\n console.error(`PDFLinkService.navigateTo: \"${data.explicitDest}\" is` +\n ` not a valid destination array, for dest=\"${dest}\".`);\n return;\n }\n goToDestination(data);\n });\n }\n\n /**\n * @param {string|Array} dest - The PDF destination object.\n * @returns {string} The hyperlink to the PDF object.\n */\n getDestinationHash(dest) {\n if (typeof dest === 'string') {\n return this.getAnchorUrl('#' + escape(dest));\n }\n if (dest instanceof Array) {\n let str = JSON.stringify(dest);\n return this.getAnchorUrl('#' + escape(str));\n }\n return this.getAnchorUrl('');\n }\n\n /**\n * Prefix the full url on anchor links to make sure that links are resolved\n * relative to the current URL instead of the one defined in <base href>.\n * @param {String} anchor The anchor hash, including the #.\n * @returns {string} The hyperlink to the PDF object.\n */\n getAnchorUrl(anchor) {\n return (this.baseUrl || '') + anchor;\n }\n\n /**\n * @param {string} hash\n */\n setHash(hash) {\n let pageNumber, dest;\n if (hash.indexOf('=') >= 0) {\n let params = parseQueryString(hash);\n if ('search' in params) {\n this.eventBus.dispatch('findfromurlhash', {\n source: this,\n query: params['search'].replace(/\"/g, ''),\n phraseSearch: (params['phrase'] === 'true'),\n });\n }\n // borrowing syntax from \"Parameters for Opening PDF Files\"\n if ('nameddest' in params) {\n if (this.pdfHistory) {\n this.pdfHistory.updateNextHashParam(params.nameddest);\n }\n this.navigateTo(params.nameddest);\n return;\n }\n if ('page' in params) {\n pageNumber = (params.page | 0) || 1;\n }\n if ('zoom' in params) {\n // Build the destination array.\n let zoomArgs = params.zoom.split(','); // scale,left,top\n let zoomArg = zoomArgs[0];\n let zoomArgNumber = parseFloat(zoomArg);\n\n if (zoomArg.indexOf('Fit') === -1) {\n // If the zoomArg is a number, it has to get divided by 100. If it's\n // a string, it should stay as it is.\n dest = [null, { name: 'XYZ', },\n zoomArgs.length > 1 ? (zoomArgs[1] | 0) : null,\n zoomArgs.length > 2 ? (zoomArgs[2] | 0) : null,\n (zoomArgNumber ? zoomArgNumber / 100 : zoomArg)];\n } else {\n if (zoomArg === 'Fit' || zoomArg === 'FitB') {\n dest = [null, { name: zoomArg, }];\n } else if ((zoomArg === 'FitH' || zoomArg === 'FitBH') ||\n (zoomArg === 'FitV' || zoomArg === 'FitBV')) {\n dest = [null, { name: zoomArg, },\n zoomArgs.length > 1 ? (zoomArgs[1] | 0) : null];\n } else if (zoomArg === 'FitR') {\n if (zoomArgs.length !== 5) {\n console.error(\n 'PDFLinkService.setHash: Not enough parameters for \"FitR\".');\n } else {\n dest = [null, { name: zoomArg, },\n (zoomArgs[1] | 0), (zoomArgs[2] | 0),\n (zoomArgs[3] | 0), (zoomArgs[4] | 0)];\n }\n } else {\n console.error(`PDFLinkService.setHash: \"${zoomArg}\" is not ` +\n 'a valid zoom value.');\n }\n }\n }\n if (dest) {\n this.pdfViewer.scrollPageIntoView({\n pageNumber: pageNumber || this.page,\n destArray: dest,\n allowNegativeOffset: true,\n });\n } else if (pageNumber) {\n this.page = pageNumber; // simple page\n }\n if ('pagemode' in params) {\n this.eventBus.dispatch('pagemode', {\n source: this,\n mode: params.pagemode,\n });\n }\n } else { // Named (or explicit) destination.\n if ((typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) &&\n /^\\d+$/.test(hash) && hash <= this.pagesCount) {\n console.warn('PDFLinkService_setHash: specifying a page number ' +\n 'directly after the hash symbol (#) is deprecated, ' +\n `please use the \"#page=${hash}\" form instead.`);\n this.page = hash | 0;\n }\n\n dest = unescape(hash);\n try {\n dest = JSON.parse(dest);\n\n if (!(dest instanceof Array)) {\n // Avoid incorrectly rejecting a valid named destination, such as\n // e.g. \"4.3\" or \"true\", because `JSON.parse` converted its type.\n dest = dest.toString();\n }\n } catch (ex) {}\n\n if (typeof dest === 'string' || isValidExplicitDestination(dest)) {\n if (this.pdfHistory) {\n this.pdfHistory.updateNextHashParam(dest);\n }\n this.navigateTo(dest);\n return;\n }\n console.error(`PDFLinkService.setHash: \"${unescape(hash)}\" is not ` +\n 'a valid destination.');\n }\n }\n\n /**\n * @param {string} action\n */\n executeNamedAction(action) {\n // See PDF reference, table 8.45 - Named action\n switch (action) {\n case 'GoBack':\n if (this.pdfHistory) {\n this.pdfHistory.back();\n }\n break;\n\n case 'GoForward':\n if (this.pdfHistory) {\n this.pdfHistory.forward();\n }\n break;\n\n case 'NextPage':\n if (this.page < this.pagesCount) {\n this.page++;\n }\n break;\n\n case 'PrevPage':\n if (this.page > 1) {\n this.page--;\n }\n break;\n\n case 'LastPage':\n this.page = this.pagesCount;\n break;\n\n case 'FirstPage':\n this.page = 1;\n break;\n\n default:\n break; // No action according to spec\n }\n\n this.eventBus.dispatch('namedaction', {\n source: this,\n action,\n });\n }\n\n /**\n * @param {Object} params\n */\n onFileAttachmentAnnotation({ id, filename, content, }) {\n this.eventBus.dispatch('fileattachmentannotation', {\n source: this,\n id,\n filename,\n content,\n });\n }\n\n /**\n * @param {number} pageNum - page number.\n * @param {Object} pageRef - reference to the page.\n */\n cachePageRef(pageNum, pageRef) {\n let refStr = pageRef.num + ' ' + pageRef.gen + ' R';\n this._pagesRefCache[refStr] = pageNum;\n }\n\n _cachedPageNumber(pageRef) {\n let refStr = pageRef.num + ' ' + pageRef.gen + ' R';\n return (this._pagesRefCache && this._pagesRefCache[refStr]) || null;\n }\n}\n\nfunction isValidExplicitDestination(dest) {\n if (!(dest instanceof Array)) {\n return false;\n }\n let destLength = dest.length, allowNull = true;\n if (destLength < 2) {\n return false;\n }\n let page = dest[0];\n if (!(typeof page === 'object' &&\n typeof page.num === 'number' && (page.num | 0) === page.num &&\n typeof page.gen === 'number' && (page.gen | 0) === page.gen) &&\n !(typeof page === 'number' && (page | 0) === page && page >= 0)) {\n return false;\n }\n let zoom = dest[1];\n if (!(typeof zoom === 'object' && typeof zoom.name === 'string')) {\n return false;\n }\n switch (zoom.name) {\n case 'XYZ':\n if (destLength !== 5) {\n return false;\n }\n break;\n case 'Fit':\n case 'FitB':\n return destLength === 2;\n case 'FitH':\n case 'FitBH':\n case 'FitV':\n case 'FitBV':\n if (destLength !== 3) {\n return false;\n }\n break;\n case 'FitR':\n if (destLength !== 6) {\n return false;\n }\n allowNull = false;\n break;\n default:\n return false;\n }\n for (let i = 2; i < destLength; i++) {\n let param = dest[i];\n if (!(typeof param === 'number' || (allowNull && param === null))) {\n return false;\n }\n }\n return true;\n}\n\nclass SimpleLinkService {\n /**\n * @returns {number}\n */\n get page() {\n return 0;\n }\n /**\n * @param {number} value\n */\n set page(value) {}\n /**\n * @param dest - The PDF destination object.\n */\n navigateTo(dest) {}\n /**\n * @param dest - The PDF destination object.\n * @returns {string} The hyperlink to the PDF object.\n */\n getDestinationHash(dest) {\n return '#';\n }\n /**\n * @param hash - The PDF parameters/hash.\n * @returns {string} The hyperlink to the PDF object.\n */\n getAnchorUrl(hash) {\n return '#';\n }\n /**\n * @param {string} hash\n */\n setHash(hash) {}\n /**\n * @param {string} action\n */\n executeNamedAction(action) {}\n /**\n * @param {Object} params\n */\n onFileAttachmentAnnotation({ id, filename, content, }) {}\n /**\n * @param {number} pageNum - page number.\n * @param {Object} pageRef - reference to the page.\n */\n cachePageRef(pageNum, pageRef) {}\n}\n\nexport {\n PDFLinkService,\n SimpleLinkService,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/pdf_link_service.js","/* Copyright 2017 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { GrabToPan } from './grab_to_pan';\n\nconst CursorTool = {\n SELECT: 0, // The default value.\n HAND: 1,\n ZOOM: 2,\n};\n\n/**\n * @typedef {Object} PDFCursorToolsOptions\n * @property {HTMLDivElement} container - The document container.\n * @property {EventBus} eventBus - The application event bus.\n * @property {BasePreferences} preferences - Object for reading/writing\n * persistent settings.\n */\n\nclass PDFCursorTools {\n /**\n * @param {PDFCursorToolsOptions} options\n */\n constructor({ container, eventBus, preferences, }) {\n this.container = container;\n this.eventBus = eventBus;\n\n this.active = CursorTool.SELECT;\n this.activeBeforePresentationMode = null;\n\n this.handTool = new GrabToPan({\n element: this.container,\n });\n\n this._addEventListeners();\n\n Promise.all([\n preferences.get('cursorToolOnLoad'),\n preferences.get('enableHandToolOnLoad')\n ]).then(([cursorToolPref, handToolPref]) => {\n // If the 'cursorToolOnLoad' preference has not been set to a non-default\n // value, attempt to convert the old 'enableHandToolOnLoad' preference.\n // TODO: Remove this conversion after a suitable number of releases.\n if (handToolPref === true) {\n preferences.set('enableHandToolOnLoad', false);\n\n if (cursorToolPref === CursorTool.SELECT) {\n cursorToolPref = CursorTool.HAND;\n preferences.set('cursorToolOnLoad', cursorToolPref).catch(() => { });\n }\n }\n this.switchTool(cursorToolPref);\n }).catch(() => { });\n }\n\n /**\n * @returns {number} One of the values in {CursorTool}.\n */\n get activeTool() {\n return this.active;\n }\n\n /**\n * NOTE: This method is ignored while Presentation Mode is active.\n * @param {number} tool - The cursor mode that should be switched to,\n * must be one of the values in {CursorTool}.\n */\n switchTool(tool) {\n if (this.activeBeforePresentationMode !== null) {\n return; // Cursor tools cannot be used in Presentation Mode.\n }\n if (tool === this.active) {\n return; // The requested tool is already active.\n }\n\n let disableActiveTool = () => {\n switch (this.active) {\n case CursorTool.SELECT:\n break;\n case CursorTool.HAND:\n this.handTool.deactivate();\n break;\n case CursorTool.ZOOM:\n /* falls through */\n }\n };\n\n switch (tool) { // Enable the new cursor tool.\n case CursorTool.SELECT:\n disableActiveTool();\n break;\n case CursorTool.HAND:\n disableActiveTool();\n this.handTool.activate();\n break;\n case CursorTool.ZOOM:\n /* falls through */\n default:\n console.error(`switchTool: \"${tool}\" is an unsupported value.`);\n return;\n }\n // Update the active tool *after* it has been validated above,\n // in order to prevent setting it to an invalid state.\n this.active = tool;\n\n this._dispatchEvent();\n }\n\n /**\n * @private\n */\n _dispatchEvent() {\n this.eventBus.dispatch('cursortoolchanged', {\n source: this,\n tool: this.active,\n });\n }\n\n /**\n * @private\n */\n _addEventListeners() {\n this.eventBus.on('switchcursortool', (evt) => {\n this.switchTool(evt.tool);\n });\n\n this.eventBus.on('presentationmodechanged', (evt) => {\n if (evt.switchInProgress) {\n return;\n }\n let previouslyActive;\n\n if (evt.active) {\n previouslyActive = this.active;\n\n this.switchTool(CursorTool.SELECT);\n this.activeBeforePresentationMode = previouslyActive;\n } else {\n previouslyActive = this.activeBeforePresentationMode;\n\n this.activeBeforePresentationMode = null;\n this.switchTool(previouslyActive);\n }\n });\n }\n}\n\nexport {\n CursorTool,\n PDFCursorTools,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/pdf_cursor_tools.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createPromiseCapability } from 'pdfjs-lib';\nimport { scrollIntoView } from './ui_utils';\n\nconst FindState = {\n FOUND: 0,\n NOT_FOUND: 1,\n WRAPPED: 2,\n PENDING: 3,\n};\n\nconst FIND_SCROLL_OFFSET_TOP = -50;\nconst FIND_SCROLL_OFFSET_LEFT = -400;\nconst FIND_TIMEOUT = 250; // ms\n\nconst CHARACTERS_TO_NORMALIZE = {\n '\\u2018': '\\'', // Left single quotation mark\n '\\u2019': '\\'', // Right single quotation mark\n '\\u201A': '\\'', // Single low-9 quotation mark\n '\\u201B': '\\'', // Single high-reversed-9 quotation mark\n '\\u201C': '\"', // Left double quotation mark\n '\\u201D': '\"', // Right double quotation mark\n '\\u201E': '\"', // Double low-9 quotation mark\n '\\u201F': '\"', // Double high-reversed-9 quotation mark\n '\\u00BC': '1/4', // Vulgar fraction one quarter\n '\\u00BD': '1/2', // Vulgar fraction one half\n '\\u00BE': '3/4', // Vulgar fraction three quarters\n};\n\n/**\n * Provides search functionality to find a given string in a PDF document.\n */\nclass PDFFindController {\n constructor({ pdfViewer, }) {\n this.pdfViewer = pdfViewer;\n\n this.onUpdateResultsCount = null;\n this.onUpdateState = null;\n\n this.reset();\n\n // Compile the regular expression for text normalization once.\n let replace = Object.keys(CHARACTERS_TO_NORMALIZE).join('');\n this.normalizationRegex = new RegExp('[' + replace + ']', 'g');\n }\n\n reset() {\n this.startedTextExtraction = false;\n this.extractTextPromises = [];\n this.pendingFindMatches = Object.create(null);\n this.active = false; // If active, find results will be highlighted.\n this.pageContents = []; // Stores the text for each page.\n this.pageMatches = [];\n this.pageMatchesLength = null;\n this.matchCount = 0;\n this.selected = { // Currently selected match.\n pageIdx: -1,\n matchIdx: -1,\n };\n this.offset = { // Where the find algorithm currently is in the document.\n pageIdx: null,\n matchIdx: null,\n };\n this.pagesToSearch = null;\n this.resumePageIdx = null;\n this.state = null;\n this.dirtyMatch = false;\n this.findTimeout = null;\n\n this._firstPagePromise = new Promise((resolve) => {\n this.resolveFirstPage = resolve;\n });\n }\n\n normalize(text) {\n return text.replace(this.normalizationRegex, function (ch) {\n return CHARACTERS_TO_NORMALIZE[ch];\n });\n }\n\n /**\n * Helper for multi-term search that fills the `matchesWithLength` array\n * and handles cases where one search term includes another search term (for\n * example, \"tamed tame\" or \"this is\"). It looks for intersecting terms in\n * the `matches` and keeps elements with a longer match length.\n */\n _prepareMatches(matchesWithLength, matches, matchesLength) {\n function isSubTerm(matchesWithLength, currentIndex) {\n let currentElem = matchesWithLength[currentIndex];\n let nextElem = matchesWithLength[currentIndex + 1];\n\n // Check for cases like \"TAMEd TAME\".\n if (currentIndex < matchesWithLength.length - 1 &&\n currentElem.match === nextElem.match) {\n currentElem.skipped = true;\n return true;\n }\n\n // Check for cases like \"thIS IS\".\n for (let i = currentIndex - 1; i >= 0; i--) {\n let prevElem = matchesWithLength[i];\n if (prevElem.skipped) {\n continue;\n }\n if (prevElem.match + prevElem.matchLength < currentElem.match) {\n break;\n }\n if (prevElem.match + prevElem.matchLength >=\n currentElem.match + currentElem.matchLength) {\n currentElem.skipped = true;\n return true;\n }\n }\n return false;\n }\n\n // Sort the array of `{ match: <match>, matchLength: <matchLength> }`\n // objects on increasing index first and on the length otherwise.\n matchesWithLength.sort(function(a, b) {\n return a.match === b.match ? a.matchLength - b.matchLength :\n a.match - b.match;\n });\n for (let i = 0, len = matchesWithLength.length; i < len; i++) {\n if (isSubTerm(matchesWithLength, i)) {\n continue;\n }\n matches.push(matchesWithLength[i].match);\n matchesLength.push(matchesWithLength[i].matchLength);\n }\n }\n\n calcFindPhraseMatch(query, pageIndex, pageContent) {\n let matches = [];\n let queryLen = query.length;\n let matchIdx = -queryLen;\n while (true) {\n matchIdx = pageContent.indexOf(query, matchIdx + queryLen);\n if (matchIdx === -1) {\n break;\n }\n matches.push(matchIdx);\n }\n this.pageMatches[pageIndex] = matches;\n }\n\n calcFindWordMatch(query, pageIndex, pageContent) {\n let matchesWithLength = [];\n // Divide the query into pieces and search for text in each piece.\n let queryArray = query.match(/\\S+/g);\n for (let i = 0, len = queryArray.length; i < len; i++) {\n let subquery = queryArray[i];\n let subqueryLen = subquery.length;\n let matchIdx = -subqueryLen;\n while (true) {\n matchIdx = pageContent.indexOf(subquery, matchIdx + subqueryLen);\n if (matchIdx === -1) {\n break;\n }\n // Other searches do not, so we store the length.\n matchesWithLength.push({\n match: matchIdx,\n matchLength: subqueryLen,\n skipped: false,\n });\n }\n }\n\n // Prepare arrays for storing the matches.\n if (!this.pageMatchesLength) {\n this.pageMatchesLength = [];\n }\n this.pageMatchesLength[pageIndex] = [];\n this.pageMatches[pageIndex] = [];\n\n // Sort `matchesWithLength`, remove intersecting terms and put the result\n // into the two arrays.\n this._prepareMatches(matchesWithLength, this.pageMatches[pageIndex],\n this.pageMatchesLength[pageIndex]);\n }\n\n calcFindMatch(pageIndex) {\n let pageContent = this.normalize(this.pageContents[pageIndex]);\n let query = this.normalize(this.state.query);\n let caseSensitive = this.state.caseSensitive;\n let phraseSearch = this.state.phraseSearch;\n let queryLen = query.length;\n\n if (queryLen === 0) {\n // Do nothing: the matches should be wiped out already.\n return;\n }\n\n if (!caseSensitive) {\n pageContent = pageContent.toLowerCase();\n query = query.toLowerCase();\n }\n\n if (phraseSearch) {\n this.calcFindPhraseMatch(query, pageIndex, pageContent);\n } else {\n this.calcFindWordMatch(query, pageIndex, pageContent);\n }\n\n this.updatePage(pageIndex);\n if (this.resumePageIdx === pageIndex) {\n this.resumePageIdx = null;\n this.nextPageMatch();\n }\n\n // Update the match count.\n if (this.pageMatches[pageIndex].length > 0) {\n this.matchCount += this.pageMatches[pageIndex].length;\n this.updateUIResultsCount();\n }\n }\n\n extractText() {\n if (this.startedTextExtraction) {\n return;\n }\n this.startedTextExtraction = true;\n this.pageContents.length = 0;\n\n let promise = Promise.resolve();\n for (let i = 0, ii = this.pdfViewer.pagesCount; i < ii; i++) {\n let extractTextCapability = createPromiseCapability();\n this.extractTextPromises[i] = extractTextCapability.promise;\n\n promise = promise.then(() => {\n return this.pdfViewer.getPageTextContent(i).then((textContent) => {\n let textItems = textContent.items;\n let strBuf = [];\n\n for (let j = 0, jj = textItems.length; j < jj; j++) {\n strBuf.push(textItems[j].str);\n }\n // Store the pageContent as a string.\n this.pageContents[i] = strBuf.join('');\n extractTextCapability.resolve(i);\n }, (reason) => {\n console.error(`Unable to get page ${i + 1} text content`, reason);\n // Page error -- assuming no text content.\n this.pageContents[i] = '';\n extractTextCapability.resolve(i);\n });\n });\n }\n }\n\n executeCommand(cmd, state) {\n if (this.state === null || cmd !== 'findagain') {\n this.dirtyMatch = true;\n }\n this.state = state;\n this.updateUIState(FindState.PENDING);\n\n this._firstPagePromise.then(() => {\n this.extractText();\n\n clearTimeout(this.findTimeout);\n if (cmd === 'find') {\n // Trigger the find action with a small delay to avoid starting the\n // search when the user is still typing (saving resources).\n this.findTimeout = setTimeout(this.nextMatch.bind(this), FIND_TIMEOUT);\n } else {\n this.nextMatch();\n }\n });\n }\n\n updatePage(index) {\n if (this.selected.pageIdx === index) {\n // If the page is selected, scroll the page into view, which triggers\n // rendering the page, which adds the textLayer. Once the textLayer is\n // build, it will scroll onto the selected match.\n this.pdfViewer.currentPageNumber = index + 1;\n }\n\n let page = this.pdfViewer.getPageView(index);\n if (page.textLayer) {\n page.textLayer.updateMatches();\n }\n }\n\n nextMatch() {\n let previous = this.state.findPrevious;\n let currentPageIndex = this.pdfViewer.currentPageNumber - 1;\n let numPages = this.pdfViewer.pagesCount;\n\n this.active = true;\n\n if (this.dirtyMatch) {\n // Need to recalculate the matches, reset everything.\n this.dirtyMatch = false;\n this.selected.pageIdx = this.selected.matchIdx = -1;\n this.offset.pageIdx = currentPageIndex;\n this.offset.matchIdx = null;\n this.hadMatch = false;\n this.resumePageIdx = null;\n this.pageMatches = [];\n this.matchCount = 0;\n this.pageMatchesLength = null;\n\n for (let i = 0; i < numPages; i++) {\n // Wipe out any previously highlighted matches.\n this.updatePage(i);\n\n // Start finding the matches as soon as the text is extracted.\n if (!(i in this.pendingFindMatches)) {\n this.pendingFindMatches[i] = true;\n this.extractTextPromises[i].then((pageIdx) => {\n delete this.pendingFindMatches[pageIdx];\n this.calcFindMatch(pageIdx);\n });\n }\n }\n }\n\n // If there's no query there's no point in searching.\n if (this.state.query === '') {\n this.updateUIState(FindState.FOUND);\n return;\n }\n\n // If we're waiting on a page, we return since we can't do anything else.\n if (this.resumePageIdx) {\n return;\n }\n\n let offset = this.offset;\n // Keep track of how many pages we should maximally iterate through.\n this.pagesToSearch = numPages;\n // If there's already a `matchIdx` that means we are iterating through a\n // page's matches.\n if (offset.matchIdx !== null) {\n let numPageMatches = this.pageMatches[offset.pageIdx].length;\n if ((!previous && offset.matchIdx + 1 < numPageMatches) ||\n (previous && offset.matchIdx > 0)) {\n // The simple case; we just have advance the matchIdx to select\n // the next match on the page.\n this.hadMatch = true;\n offset.matchIdx = (previous ? offset.matchIdx - 1 :\n offset.matchIdx + 1);\n this.updateMatch(true);\n return;\n }\n // We went beyond the current page's matches, so we advance to\n // the next page.\n this.advanceOffsetPage(previous);\n }\n // Start searching through the page.\n this.nextPageMatch();\n }\n\n matchesReady(matches) {\n let offset = this.offset;\n let numMatches = matches.length;\n let previous = this.state.findPrevious;\n\n if (numMatches) {\n // There were matches for the page, so initialize `matchIdx`.\n this.hadMatch = true;\n offset.matchIdx = (previous ? numMatches - 1 : 0);\n this.updateMatch(true);\n return true;\n }\n // No matches, so attempt to search the next page.\n this.advanceOffsetPage(previous);\n if (offset.wrapped) {\n offset.matchIdx = null;\n if (this.pagesToSearch < 0) {\n // No point in wrapping again, there were no matches.\n this.updateMatch(false);\n // While matches were not found, searching for a page\n // with matches should nevertheless halt.\n return true;\n }\n }\n // Matches were not found (and searching is not done).\n return false;\n }\n\n /**\n * Called from the text layer when match presentation is updated.\n *\n * @param {number} pageIndex - The index of the page.\n * @param {number} matchIndex - The index of the match.\n * @param {Array} elements - Text layer `div` elements.\n * @param {number} beginIdx - Start index of the `div` array for the match.\n */\n updateMatchPosition(pageIndex, matchIndex, elements, beginIdx) {\n if (this.selected.matchIdx === matchIndex &&\n this.selected.pageIdx === pageIndex) {\n let spot = {\n top: FIND_SCROLL_OFFSET_TOP,\n left: FIND_SCROLL_OFFSET_LEFT,\n };\n scrollIntoView(elements[beginIdx], spot,\n /* skipOverflowHiddenElements = */ true);\n }\n }\n\n nextPageMatch() {\n if (this.resumePageIdx !== null) {\n console.error('There can only be one pending page.');\n }\n\n let matches = null;\n do {\n let pageIdx = this.offset.pageIdx;\n matches = this.pageMatches[pageIdx];\n if (!matches) {\n // The matches don't exist yet for processing by `matchesReady`,\n // so set a resume point for when they do exist.\n this.resumePageIdx = pageIdx;\n break;\n }\n } while (!this.matchesReady(matches));\n }\n\n advanceOffsetPage(previous) {\n let offset = this.offset;\n let numPages = this.extractTextPromises.length;\n offset.pageIdx = (previous ? offset.pageIdx - 1 : offset.pageIdx + 1);\n offset.matchIdx = null;\n\n this.pagesToSearch--;\n\n if (offset.pageIdx >= numPages || offset.pageIdx < 0) {\n offset.pageIdx = (previous ? numPages - 1 : 0);\n offset.wrapped = true;\n }\n }\n\n updateMatch(found = false) {\n let state = FindState.NOT_FOUND;\n let wrapped = this.offset.wrapped;\n this.offset.wrapped = false;\n\n if (found) {\n let previousPage = this.selected.pageIdx;\n this.selected.pageIdx = this.offset.pageIdx;\n this.selected.matchIdx = this.offset.matchIdx;\n state = (wrapped ? FindState.WRAPPED : FindState.FOUND);\n\n // Update the currently selected page to wipe out any selected matches.\n if (previousPage !== -1 && previousPage !== this.selected.pageIdx) {\n this.updatePage(previousPage);\n }\n }\n\n this.updateUIState(state, this.state.findPrevious);\n if (this.selected.pageIdx !== -1) {\n this.updatePage(this.selected.pageIdx);\n }\n }\n\n updateUIResultsCount() {\n if (this.onUpdateResultsCount) {\n this.onUpdateResultsCount(this.matchCount);\n }\n }\n\n updateUIState(state, previous) {\n if (this.onUpdateState) {\n this.onUpdateState(state, previous, this.matchCount);\n }\n }\n}\n\nexport {\n FindState,\n PDFFindController,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/pdf_find_controller.js","/* Copyright 2017 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DefaultExternalServices, PDFViewerApplication } from './app';\nimport { BasePreferences } from './preferences';\nimport { DownloadManager } from './download_manager';\nimport { GenericL10n } from './genericl10n';\nimport { PDFJS } from 'pdfjs-lib';\n\nif (typeof PDFJSDev !== 'undefined' && !PDFJSDev.test('GENERIC')) {\n throw new Error('Module \"pdfjs-web/genericcom\" shall not be used outside ' +\n 'GENERIC build.');\n}\n\nvar GenericCom = {};\n\nclass GenericPreferences extends BasePreferences {\n _writeToStorage(prefObj) {\n return new Promise(function(resolve) {\n localStorage.setItem('pdfjs.preferences', JSON.stringify(prefObj));\n resolve();\n });\n }\n\n _readFromStorage(prefObj) {\n return new Promise(function(resolve) {\n var readPrefs = JSON.parse(localStorage.getItem('pdfjs.preferences'));\n resolve(readPrefs);\n });\n }\n}\n\nvar GenericExternalServices = Object.create(DefaultExternalServices);\nGenericExternalServices.createDownloadManager = function() {\n return new DownloadManager();\n};\nGenericExternalServices.createPreferences = function() {\n return new GenericPreferences();\n};\nGenericExternalServices.createL10n = function () {\n return new GenericL10n(PDFJS.locale);\n};\nPDFViewerApplication.externalServices = GenericExternalServices;\n\nexport {\n GenericCom,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/genericcom.js","/* Copyright 2016 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { CSS_UNITS, NullL10n } from './ui_utils';\nimport { PDFPrintServiceFactory, PDFViewerApplication } from './app';\nimport { PDFJS } from 'pdfjs-lib';\n\nlet activeService = null;\nlet overlayManager = null;\n\n// Renders the page to the canvas of the given print service, and returns\n// the suggested dimensions of the output page.\nfunction renderPage(activeServiceOnEntry, pdfDocument, pageNumber, size) {\n var scratchCanvas = activeService.scratchCanvas;\n\n // The size of the canvas in pixels for printing.\n var PRINT_RESOLUTION = 150;\n var PRINT_UNITS = PRINT_RESOLUTION / 72.0;\n scratchCanvas.width = Math.floor(size.width * PRINT_UNITS);\n scratchCanvas.height = Math.floor(size.height * PRINT_UNITS);\n\n // The physical size of the img as specified by the PDF document.\n var width = Math.floor(size.width * CSS_UNITS) + 'px';\n var height = Math.floor(size.height * CSS_UNITS) + 'px';\n\n var ctx = scratchCanvas.getContext('2d');\n ctx.save();\n ctx.fillStyle = 'rgb(255, 255, 255)';\n ctx.fillRect(0, 0, scratchCanvas.width, scratchCanvas.height);\n ctx.restore();\n\n return pdfDocument.getPage(pageNumber).then(function (pdfPage) {\n var renderContext = {\n canvasContext: ctx,\n transform: [PRINT_UNITS, 0, 0, PRINT_UNITS, 0, 0],\n viewport: pdfPage.getViewport(1, size.rotation),\n intent: 'print',\n };\n return pdfPage.render(renderContext).promise;\n }).then(function () {\n return {\n width,\n height,\n };\n });\n}\n\nfunction PDFPrintService(pdfDocument, pagesOverview, printContainer, l10n) {\n this.pdfDocument = pdfDocument;\n this.pagesOverview = pagesOverview;\n this.printContainer = printContainer;\n this.l10n = l10n || NullL10n;\n this.currentPage = -1;\n // The temporary canvas where renderPage paints one page at a time.\n this.scratchCanvas = document.createElement('canvas');\n}\n\nPDFPrintService.prototype = {\n layout() {\n this.throwIfInactive();\n\n var body = document.querySelector('body');\n body.setAttribute('data-pdfjsprinting', true);\n\n var hasEqualPageSizes = this.pagesOverview.every(function (size) {\n return size.width === this.pagesOverview[0].width &&\n size.height === this.pagesOverview[0].height;\n }, this);\n if (!hasEqualPageSizes) {\n console.warn('Not all pages have the same size. The printed ' +\n 'result may be incorrect!');\n }\n\n // Insert a @page + size rule to make sure that the page size is correctly\n // set. Note that we assume that all pages have the same size, because\n // variable-size pages are not supported yet (e.g. in Chrome & Firefox).\n // TODO(robwu): Use named pages when size calculation bugs get resolved\n // (e.g. https://crbug.com/355116) AND when support for named pages is\n // added (http://www.w3.org/TR/css3-page/#using-named-pages).\n // In browsers where @page + size is not supported (such as Firefox,\n // https://bugzil.la/851441), the next stylesheet will be ignored and the\n // user has to select the correct paper size in the UI if wanted.\n this.pageStyleSheet = document.createElement('style');\n var pageSize = this.pagesOverview[0];\n this.pageStyleSheet.textContent =\n // \"size:<width> <height>\" is what we need. But also add \"A4\" because\n // Firefox incorrectly reports support for the other value.\n '@supports ((size:A4) and (size:1pt 1pt)) {' +\n '@page { size: ' + pageSize.width + 'pt ' + pageSize.height + 'pt;}' +\n '}';\n body.appendChild(this.pageStyleSheet);\n },\n\n destroy() {\n if (activeService !== this) {\n // |activeService| cannot be replaced without calling destroy() first,\n // so if it differs then an external consumer has a stale reference to\n // us.\n return;\n }\n this.printContainer.textContent = '';\n if (this.pageStyleSheet && this.pageStyleSheet.parentNode) {\n this.pageStyleSheet.parentNode.removeChild(this.pageStyleSheet);\n this.pageStyleSheet = null;\n }\n this.scratchCanvas.width = this.scratchCanvas.height = 0;\n this.scratchCanvas = null;\n activeService = null;\n ensureOverlay().then(function () {\n if (overlayManager.active !== 'printServiceOverlay') {\n return; // overlay was already closed\n }\n overlayManager.close('printServiceOverlay');\n });\n },\n\n renderPages() {\n var pageCount = this.pagesOverview.length;\n var renderNextPage = (resolve, reject) => {\n this.throwIfInactive();\n if (++this.currentPage >= pageCount) {\n renderProgress(pageCount, pageCount, this.l10n);\n resolve();\n return;\n }\n var index = this.currentPage;\n renderProgress(index, pageCount, this.l10n);\n renderPage(this, this.pdfDocument, index + 1, this.pagesOverview[index])\n .then(this.useRenderedPage.bind(this))\n .then(function () {\n renderNextPage(resolve, reject);\n }, reject);\n };\n return new Promise(renderNextPage);\n },\n\n useRenderedPage(printItem) {\n this.throwIfInactive();\n var img = document.createElement('img');\n img.style.width = printItem.width;\n img.style.height = printItem.height;\n\n var scratchCanvas = this.scratchCanvas;\n if (('toBlob' in scratchCanvas) && !PDFJS.disableCreateObjectURL) {\n scratchCanvas.toBlob(function (blob) {\n img.src = URL.createObjectURL(blob);\n });\n } else {\n img.src = scratchCanvas.toDataURL();\n }\n\n var wrapper = document.createElement('div');\n wrapper.appendChild(img);\n this.printContainer.appendChild(wrapper);\n\n return new Promise(function (resolve, reject) {\n img.onload = resolve;\n img.onerror = reject;\n });\n },\n\n performPrint() {\n this.throwIfInactive();\n return new Promise((resolve) => {\n // Push window.print in the macrotask queue to avoid being affected by\n // the deprecation of running print() code in a microtask, see\n // https://github.com/mozilla/pdf.js/issues/7547.\n setTimeout(() => {\n if (!this.active) {\n resolve();\n return;\n }\n print.call(window);\n // Delay promise resolution in case print() was not synchronous.\n setTimeout(resolve, 20); // Tidy-up.\n }, 0);\n });\n },\n\n get active() {\n return this === activeService;\n },\n\n throwIfInactive() {\n if (!this.active) {\n throw new Error('This print request was cancelled or completed.');\n }\n },\n};\n\n\nvar print = window.print;\nwindow.print = function print() {\n if (activeService) {\n console.warn('Ignored window.print() because of a pending print job.');\n return;\n }\n ensureOverlay().then(function () {\n if (activeService) {\n overlayManager.open('printServiceOverlay');\n }\n });\n\n try {\n dispatchEvent('beforeprint');\n } finally {\n if (!activeService) {\n console.error('Expected print service to be initialized.');\n ensureOverlay().then(function () {\n if (overlayManager.active === 'printServiceOverlay') {\n overlayManager.close('printServiceOverlay');\n }\n });\n return; // eslint-disable-line no-unsafe-finally\n }\n var activeServiceOnEntry = activeService;\n activeService.renderPages().then(function () {\n return activeServiceOnEntry.performPrint();\n }).catch(function () {\n // Ignore any error messages.\n }).then(function () {\n // aborts acts on the \"active\" print request, so we need to check\n // whether the print request (activeServiceOnEntry) is still active.\n // Without the check, an unrelated print request (created after aborting\n // this print request while the pages were being generated) would be\n // aborted.\n if (activeServiceOnEntry.active) {\n abort();\n }\n });\n }\n};\n\nfunction dispatchEvent(eventType) {\n var event = document.createEvent('CustomEvent');\n event.initCustomEvent(eventType, false, false, 'custom');\n window.dispatchEvent(event);\n}\n\nfunction abort() {\n if (activeService) {\n activeService.destroy();\n dispatchEvent('afterprint');\n }\n}\n\nfunction renderProgress(index, total, l10n) {\n var progressContainer = document.getElementById('printServiceOverlay');\n var progress = Math.round(100 * index / total);\n var progressBar = progressContainer.querySelector('progress');\n var progressPerc = progressContainer.querySelector('.relative-progress');\n progressBar.value = progress;\n l10n.get('print_progress_percent', { progress, }, progress + '%').\n then((msg) => {\n progressPerc.textContent = msg;\n });\n}\n\nvar hasAttachEvent = !!document.attachEvent;\n\nwindow.addEventListener('keydown', function(event) {\n // Intercept Cmd/Ctrl + P in all browsers.\n // Also intercept Cmd/Ctrl + Shift + P in Chrome and Opera\n if (event.keyCode === /* P= */ 80 && (event.ctrlKey || event.metaKey) &&\n !event.altKey && (!event.shiftKey || window.chrome || window.opera)) {\n window.print();\n if (hasAttachEvent) {\n // Only attachEvent can cancel Ctrl + P dialog in IE <=10\n // attachEvent is gone in IE11, so the dialog will re-appear in IE11.\n return;\n }\n event.preventDefault();\n if (event.stopImmediatePropagation) {\n event.stopImmediatePropagation();\n } else {\n event.stopPropagation();\n }\n return;\n }\n}, true);\nif (hasAttachEvent) {\n document.attachEvent('onkeydown', function(event) {\n event = event || window.event;\n if (event.keyCode === /* P= */ 80 && event.ctrlKey) {\n event.keyCode = 0;\n return false;\n }\n });\n}\n\nif ('onbeforeprint' in window) {\n // Do not propagate before/afterprint events when they are not triggered\n // from within this polyfill. (FF/IE).\n var stopPropagationIfNeeded = function(event) {\n if (event.detail !== 'custom' && event.stopImmediatePropagation) {\n event.stopImmediatePropagation();\n }\n };\n window.addEventListener('beforeprint', stopPropagationIfNeeded);\n window.addEventListener('afterprint', stopPropagationIfNeeded);\n}\n\nvar overlayPromise;\nfunction ensureOverlay() {\n if (!overlayPromise) {\n overlayManager = PDFViewerApplication.overlayManager;\n if (!overlayManager) {\n throw new Error('The overlay manager has not yet been initialized.');\n }\n\n overlayPromise = overlayManager.register('printServiceOverlay',\n document.getElementById('printServiceOverlay'), abort, true);\n document.getElementById('printCancel').onclick = abort;\n }\n return overlayPromise;\n}\n\nPDFPrintServiceFactory.instance = {\n supportsPrinting: true,\n\n createPrintService(pdfDocument, pagesOverview, printContainer, l10n) {\n if (activeService) {\n throw new Error('The print service is created and active.');\n }\n activeService = new PDFPrintService(pdfDocument, pagesOverview,\n printContainer, l10n);\n return activeService;\n },\n};\n\nexport {\n PDFPrintService,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/pdf_print_service.js","/**\n * Copyright (c) 2011-2013 Fabien Cazenave, Mozilla.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n/*\n Additional modifications for PDF.js project:\n - Disables language initialization on page loading.\n - Disables document translation on page loading.\n - Removes consoleWarn and consoleLog and use console.log/warn directly.\n - Removes window._ assignment.\n - Remove compatibility code for OldIE.\n*/\n\n/*jshint browser: true, devel: true, es5: true, globalstrict: true */\n'use strict';\n\ndocument.webL10n = (function(window, document, undefined) {\n var gL10nData = {};\n var gTextData = '';\n var gTextProp = 'textContent';\n var gLanguage = '';\n var gMacros = {};\n var gReadyState = 'loading';\n\n\n /**\n * Synchronously loading l10n resources significantly minimizes flickering\n * from displaying the app with non-localized strings and then updating the\n * strings. Although this will block all script execution on this page, we\n * expect that the l10n resources are available locally on flash-storage.\n *\n * As synchronous XHR is generally considered as a bad idea, we're still\n * loading l10n resources asynchronously -- but we keep this in a setting,\n * just in case... and applications using this library should hide their\n * content until the `localized' event happens.\n */\n\n var gAsyncResourceLoading = true; // read-only\n\n\n /**\n * DOM helpers for the so-called \"HTML API\".\n *\n * These functions are written for modern browsers. For old versions of IE,\n * they're overridden in the 'startup' section at the end of this file.\n */\n\n function getL10nResourceLinks() {\n return document.querySelectorAll('link[type=\"application/l10n\"]');\n }\n\n function getL10nDictionary() {\n var script = document.querySelector('script[type=\"application/l10n\"]');\n // TODO: support multiple and external JSON dictionaries\n return script ? JSON.parse(script.innerHTML) : null;\n }\n\n function getTranslatableChildren(element) {\n return element ? element.querySelectorAll('*[data-l10n-id]') : [];\n }\n\n function getL10nAttributes(element) {\n if (!element)\n return {};\n\n var l10nId = element.getAttribute('data-l10n-id');\n var l10nArgs = element.getAttribute('data-l10n-args');\n var args = {};\n if (l10nArgs) {\n try {\n args = JSON.parse(l10nArgs);\n } catch (e) {\n console.warn('could not parse arguments for #' + l10nId);\n }\n }\n return { id: l10nId, args: args };\n }\n\n function fireL10nReadyEvent(lang) {\n var evtObject = document.createEvent('Event');\n evtObject.initEvent('localized', true, false);\n evtObject.language = lang;\n document.dispatchEvent(evtObject);\n }\n\n function xhrLoadText(url, onSuccess, onFailure) {\n onSuccess = onSuccess || function _onSuccess(data) {};\n onFailure = onFailure || function _onFailure() {};\n\n var xhr = new XMLHttpRequest();\n xhr.open('GET', url, gAsyncResourceLoading);\n if (xhr.overrideMimeType) {\n xhr.overrideMimeType('text/plain; charset=utf-8');\n }\n xhr.onreadystatechange = function() {\n if (xhr.readyState == 4) {\n if (xhr.status == 200 || xhr.status === 0) {\n onSuccess(xhr.responseText);\n } else {\n onFailure();\n }\n }\n };\n xhr.onerror = onFailure;\n xhr.ontimeout = onFailure;\n\n // in Firefox OS with the app:// protocol, trying to XHR a non-existing\n // URL will raise an exception here -- hence this ugly try...catch.\n try {\n xhr.send(null);\n } catch (e) {\n onFailure();\n }\n }\n\n\n /**\n * l10n resource parser:\n * - reads (async XHR) the l10n resource matching `lang';\n * - imports linked resources (synchronously) when specified;\n * - parses the text data (fills `gL10nData' and `gTextData');\n * - triggers success/failure callbacks when done.\n *\n * @param {string} href\n * URL of the l10n resource to parse.\n *\n * @param {string} lang\n * locale (language) to parse. Must be a lowercase string.\n *\n * @param {Function} successCallback\n * triggered when the l10n resource has been successully parsed.\n *\n * @param {Function} failureCallback\n * triggered when the an error has occured.\n *\n * @return {void}\n * uses the following global variables: gL10nData, gTextData, gTextProp.\n */\n\n function parseResource(href, lang, successCallback, failureCallback) {\n var baseURL = href.replace(/[^\\/]*$/, '') || './';\n\n // handle escaped characters (backslashes) in a string\n function evalString(text) {\n if (text.lastIndexOf('\\\\') < 0)\n return text;\n return text.replace(/\\\\\\\\/g, '\\\\')\n .replace(/\\\\n/g, '\\n')\n .replace(/\\\\r/g, '\\r')\n .replace(/\\\\t/g, '\\t')\n .replace(/\\\\b/g, '\\b')\n .replace(/\\\\f/g, '\\f')\n .replace(/\\\\{/g, '{')\n .replace(/\\\\}/g, '}')\n .replace(/\\\\\"/g, '\"')\n .replace(/\\\\'/g, \"'\");\n }\n\n // parse *.properties text data into an l10n dictionary\n // If gAsyncResourceLoading is false, then the callback will be called\n // synchronously. Otherwise it is called asynchronously.\n function parseProperties(text, parsedPropertiesCallback) {\n var dictionary = {};\n\n // token expressions\n var reBlank = /^\\s*|\\s*$/;\n var reComment = /^\\s*#|^\\s*$/;\n var reSection = /^\\s*\\[(.*)\\]\\s*$/;\n var reImport = /^\\s*@import\\s+url\\((.*)\\)\\s*$/i;\n var reSplit = /^([^=\\s]*)\\s*=\\s*(.+)$/; // TODO: escape EOLs with '\\'\n\n // parse the *.properties file into an associative array\n function parseRawLines(rawText, extendedSyntax, parsedRawLinesCallback) {\n var entries = rawText.replace(reBlank, '').split(/[\\r\\n]+/);\n var currentLang = '*';\n var genericLang = lang.split('-', 1)[0];\n var skipLang = false;\n var match = '';\n\n function nextEntry() {\n // Use infinite loop instead of recursion to avoid reaching the\n // maximum recursion limit for content with many lines.\n while (true) {\n if (!entries.length) {\n parsedRawLinesCallback();\n return;\n }\n var line = entries.shift();\n\n // comment or blank line?\n if (reComment.test(line))\n continue;\n\n // the extended syntax supports [lang] sections and @import rules\n if (extendedSyntax) {\n match = reSection.exec(line);\n if (match) { // section start?\n // RFC 4646, section 4.4, \"All comparisons MUST be performed\n // in a case-insensitive manner.\"\n\n currentLang = match[1].toLowerCase();\n skipLang = (currentLang !== '*') &&\n (currentLang !== lang) && (currentLang !== genericLang);\n continue;\n } else if (skipLang) {\n continue;\n }\n match = reImport.exec(line);\n if (match) { // @import rule?\n loadImport(baseURL + match[1], nextEntry);\n return;\n }\n }\n\n // key-value pair\n var tmp = line.match(reSplit);\n if (tmp && tmp.length == 3) {\n dictionary[tmp[1]] = evalString(tmp[2]);\n }\n }\n }\n nextEntry();\n }\n\n // import another *.properties file\n function loadImport(url, callback) {\n xhrLoadText(url, function(content) {\n parseRawLines(content, false, callback); // don't allow recursive imports\n }, function () {\n console.warn(url + ' not found.');\n callback();\n });\n }\n\n // fill the dictionary\n parseRawLines(text, true, function() {\n parsedPropertiesCallback(dictionary);\n });\n }\n\n // load and parse l10n data (warning: global variables are used here)\n xhrLoadText(href, function(response) {\n gTextData += response; // mostly for debug\n\n // parse *.properties text data into an l10n dictionary\n parseProperties(response, function(data) {\n\n // find attribute descriptions, if any\n for (var key in data) {\n var id, prop, index = key.lastIndexOf('.');\n if (index > 0) { // an attribute has been specified\n id = key.substring(0, index);\n prop = key.substr(index + 1);\n } else { // no attribute: assuming text content by default\n id = key;\n prop = gTextProp;\n }\n if (!gL10nData[id]) {\n gL10nData[id] = {};\n }\n gL10nData[id][prop] = data[key];\n }\n\n // trigger callback\n if (successCallback) {\n successCallback();\n }\n });\n }, failureCallback);\n }\n\n // load and parse all resources for the specified locale\n function loadLocale(lang, callback) {\n // RFC 4646, section 2.1 states that language tags have to be treated as\n // case-insensitive. Convert to lowercase for case-insensitive comparisons.\n if (lang) {\n lang = lang.toLowerCase();\n }\n\n callback = callback || function _callback() {};\n\n clear();\n gLanguage = lang;\n\n // check all <link type=\"application/l10n\" href=\"...\" /> nodes\n // and load the resource files\n var langLinks = getL10nResourceLinks();\n var langCount = langLinks.length;\n if (langCount === 0) {\n // we might have a pre-compiled dictionary instead\n var dict = getL10nDictionary();\n if (dict && dict.locales && dict.default_locale) {\n console.log('using the embedded JSON directory, early way out');\n gL10nData = dict.locales[lang];\n if (!gL10nData) {\n var defaultLocale = dict.default_locale.toLowerCase();\n for (var anyCaseLang in dict.locales) {\n anyCaseLang = anyCaseLang.toLowerCase();\n if (anyCaseLang === lang) {\n gL10nData = dict.locales[lang];\n break;\n } else if (anyCaseLang === defaultLocale) {\n gL10nData = dict.locales[defaultLocale];\n }\n }\n }\n callback();\n } else {\n console.log('no resource to load, early way out');\n }\n // early way out\n fireL10nReadyEvent(lang);\n gReadyState = 'complete';\n return;\n }\n\n // start the callback when all resources are loaded\n var onResourceLoaded = null;\n var gResourceCount = 0;\n onResourceLoaded = function() {\n gResourceCount++;\n if (gResourceCount >= langCount) {\n callback();\n fireL10nReadyEvent(lang);\n gReadyState = 'complete';\n }\n };\n\n // load all resource files\n function L10nResourceLink(link) {\n var href = link.href;\n // Note: If |gAsyncResourceLoading| is false, then the following callbacks\n // are synchronously called.\n this.load = function(lang, callback) {\n parseResource(href, lang, callback, function() {\n console.warn(href + ' not found.');\n // lang not found, used default resource instead\n console.warn('\"' + lang + '\" resource not found');\n gLanguage = '';\n // Resource not loaded, but we still need to call the callback.\n callback();\n });\n };\n }\n\n for (var i = 0; i < langCount; i++) {\n var resource = new L10nResourceLink(langLinks[i]);\n resource.load(lang, onResourceLoaded);\n }\n }\n\n // clear all l10n data\n function clear() {\n gL10nData = {};\n gTextData = '';\n gLanguage = '';\n // TODO: clear all non predefined macros.\n // There's no such macro /yet/ but we're planning to have some...\n }\n\n\n /**\n * Get rules for plural forms (shared with JetPack), see:\n * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html\n * https://github.com/mozilla/addon-sdk/blob/master/python-lib/plural-rules-generator.p\n *\n * @param {string} lang\n * locale (language) used.\n *\n * @return {Function}\n * returns a function that gives the plural form name for a given integer:\n * var fun = getPluralRules('en');\n * fun(1) -> 'one'\n * fun(0) -> 'other'\n * fun(1000) -> 'other'.\n */\n\n function getPluralRules(lang) {\n var locales2rules = {\n 'af': 3,\n 'ak': 4,\n 'am': 4,\n 'ar': 1,\n 'asa': 3,\n 'az': 0,\n 'be': 11,\n 'bem': 3,\n 'bez': 3,\n 'bg': 3,\n 'bh': 4,\n 'bm': 0,\n 'bn': 3,\n 'bo': 0,\n 'br': 20,\n 'brx': 3,\n 'bs': 11,\n 'ca': 3,\n 'cgg': 3,\n 'chr': 3,\n 'cs': 12,\n 'cy': 17,\n 'da': 3,\n 'de': 3,\n 'dv': 3,\n 'dz': 0,\n 'ee': 3,\n 'el': 3,\n 'en': 3,\n 'eo': 3,\n 'es': 3,\n 'et': 3,\n 'eu': 3,\n 'fa': 0,\n 'ff': 5,\n 'fi': 3,\n 'fil': 4,\n 'fo': 3,\n 'fr': 5,\n 'fur': 3,\n 'fy': 3,\n 'ga': 8,\n 'gd': 24,\n 'gl': 3,\n 'gsw': 3,\n 'gu': 3,\n 'guw': 4,\n 'gv': 23,\n 'ha': 3,\n 'haw': 3,\n 'he': 2,\n 'hi': 4,\n 'hr': 11,\n 'hu': 0,\n 'id': 0,\n 'ig': 0,\n 'ii': 0,\n 'is': 3,\n 'it': 3,\n 'iu': 7,\n 'ja': 0,\n 'jmc': 3,\n 'jv': 0,\n 'ka': 0,\n 'kab': 5,\n 'kaj': 3,\n 'kcg': 3,\n 'kde': 0,\n 'kea': 0,\n 'kk': 3,\n 'kl': 3,\n 'km': 0,\n 'kn': 0,\n 'ko': 0,\n 'ksb': 3,\n 'ksh': 21,\n 'ku': 3,\n 'kw': 7,\n 'lag': 18,\n 'lb': 3,\n 'lg': 3,\n 'ln': 4,\n 'lo': 0,\n 'lt': 10,\n 'lv': 6,\n 'mas': 3,\n 'mg': 4,\n 'mk': 16,\n 'ml': 3,\n 'mn': 3,\n 'mo': 9,\n 'mr': 3,\n 'ms': 0,\n 'mt': 15,\n 'my': 0,\n 'nah': 3,\n 'naq': 7,\n 'nb': 3,\n 'nd': 3,\n 'ne': 3,\n 'nl': 3,\n 'nn': 3,\n 'no': 3,\n 'nr': 3,\n 'nso': 4,\n 'ny': 3,\n 'nyn': 3,\n 'om': 3,\n 'or': 3,\n 'pa': 3,\n 'pap': 3,\n 'pl': 13,\n 'ps': 3,\n 'pt': 3,\n 'rm': 3,\n 'ro': 9,\n 'rof': 3,\n 'ru': 11,\n 'rwk': 3,\n 'sah': 0,\n 'saq': 3,\n 'se': 7,\n 'seh': 3,\n 'ses': 0,\n 'sg': 0,\n 'sh': 11,\n 'shi': 19,\n 'sk': 12,\n 'sl': 14,\n 'sma': 7,\n 'smi': 7,\n 'smj': 7,\n 'smn': 7,\n 'sms': 7,\n 'sn': 3,\n 'so': 3,\n 'sq': 3,\n 'sr': 11,\n 'ss': 3,\n 'ssy': 3,\n 'st': 3,\n 'sv': 3,\n 'sw': 3,\n 'syr': 3,\n 'ta': 3,\n 'te': 3,\n 'teo': 3,\n 'th': 0,\n 'ti': 4,\n 'tig': 3,\n 'tk': 3,\n 'tl': 4,\n 'tn': 3,\n 'to': 0,\n 'tr': 0,\n 'ts': 3,\n 'tzm': 22,\n 'uk': 11,\n 'ur': 3,\n 've': 3,\n 'vi': 0,\n 'vun': 3,\n 'wa': 4,\n 'wae': 3,\n 'wo': 0,\n 'xh': 3,\n 'xog': 3,\n 'yo': 0,\n 'zh': 0,\n 'zu': 3\n };\n\n // utility functions for plural rules methods\n function isIn(n, list) {\n return list.indexOf(n) !== -1;\n }\n function isBetween(n, start, end) {\n return start <= n && n <= end;\n }\n\n // list of all plural rules methods:\n // map an integer to the plural form name to use\n var pluralRules = {\n '0': function(n) {\n return 'other';\n },\n '1': function(n) {\n if ((isBetween((n % 100), 3, 10)))\n return 'few';\n if (n === 0)\n return 'zero';\n if ((isBetween((n % 100), 11, 99)))\n return 'many';\n if (n == 2)\n return 'two';\n if (n == 1)\n return 'one';\n return 'other';\n },\n '2': function(n) {\n if (n !== 0 && (n % 10) === 0)\n return 'many';\n if (n == 2)\n return 'two';\n if (n == 1)\n return 'one';\n return 'other';\n },\n '3': function(n) {\n if (n == 1)\n return 'one';\n return 'other';\n },\n '4': function(n) {\n if ((isBetween(n, 0, 1)))\n return 'one';\n return 'other';\n },\n '5': function(n) {\n if ((isBetween(n, 0, 2)) && n != 2)\n return 'one';\n return 'other';\n },\n '6': function(n) {\n if (n === 0)\n return 'zero';\n if ((n % 10) == 1 && (n % 100) != 11)\n return 'one';\n return 'other';\n },\n '7': function(n) {\n if (n == 2)\n return 'two';\n if (n == 1)\n return 'one';\n return 'other';\n },\n '8': function(n) {\n if ((isBetween(n, 3, 6)))\n return 'few';\n if ((isBetween(n, 7, 10)))\n return 'many';\n if (n == 2)\n return 'two';\n if (n == 1)\n return 'one';\n return 'other';\n },\n '9': function(n) {\n if (n === 0 || n != 1 && (isBetween((n % 100), 1, 19)))\n return 'few';\n if (n == 1)\n return 'one';\n return 'other';\n },\n '10': function(n) {\n if ((isBetween((n % 10), 2, 9)) && !(isBetween((n % 100), 11, 19)))\n return 'few';\n if ((n % 10) == 1 && !(isBetween((n % 100), 11, 19)))\n return 'one';\n return 'other';\n },\n '11': function(n) {\n if ((isBetween((n % 10), 2, 4)) && !(isBetween((n % 100), 12, 14)))\n return 'few';\n if ((n % 10) === 0 ||\n (isBetween((n % 10), 5, 9)) ||\n (isBetween((n % 100), 11, 14)))\n return 'many';\n if ((n % 10) == 1 && (n % 100) != 11)\n return 'one';\n return 'other';\n },\n '12': function(n) {\n if ((isBetween(n, 2, 4)))\n return 'few';\n if (n == 1)\n return 'one';\n return 'other';\n },\n '13': function(n) {\n if ((isBetween((n % 10), 2, 4)) && !(isBetween((n % 100), 12, 14)))\n return 'few';\n if (n != 1 && (isBetween((n % 10), 0, 1)) ||\n (isBetween((n % 10), 5, 9)) ||\n (isBetween((n % 100), 12, 14)))\n return 'many';\n if (n == 1)\n return 'one';\n return 'other';\n },\n '14': function(n) {\n if ((isBetween((n % 100), 3, 4)))\n return 'few';\n if ((n % 100) == 2)\n return 'two';\n if ((n % 100) == 1)\n return 'one';\n return 'other';\n },\n '15': function(n) {\n if (n === 0 || (isBetween((n % 100), 2, 10)))\n return 'few';\n if ((isBetween((n % 100), 11, 19)))\n return 'many';\n if (n == 1)\n return 'one';\n return 'other';\n },\n '16': function(n) {\n if ((n % 10) == 1 && n != 11)\n return 'one';\n return 'other';\n },\n '17': function(n) {\n if (n == 3)\n return 'few';\n if (n === 0)\n return 'zero';\n if (n == 6)\n return 'many';\n if (n == 2)\n return 'two';\n if (n == 1)\n return 'one';\n return 'other';\n },\n '18': function(n) {\n if (n === 0)\n return 'zero';\n if ((isBetween(n, 0, 2)) && n !== 0 && n != 2)\n return 'one';\n return 'other';\n },\n '19': function(n) {\n if ((isBetween(n, 2, 10)))\n return 'few';\n if ((isBetween(n, 0, 1)))\n return 'one';\n return 'other';\n },\n '20': function(n) {\n if ((isBetween((n % 10), 3, 4) || ((n % 10) == 9)) && !(\n isBetween((n % 100), 10, 19) ||\n isBetween((n % 100), 70, 79) ||\n isBetween((n % 100), 90, 99)\n ))\n return 'few';\n if ((n % 1000000) === 0 && n !== 0)\n return 'many';\n if ((n % 10) == 2 && !isIn((n % 100), [12, 72, 92]))\n return 'two';\n if ((n % 10) == 1 && !isIn((n % 100), [11, 71, 91]))\n return 'one';\n return 'other';\n },\n '21': function(n) {\n if (n === 0)\n return 'zero';\n if (n == 1)\n return 'one';\n return 'other';\n },\n '22': function(n) {\n if ((isBetween(n, 0, 1)) || (isBetween(n, 11, 99)))\n return 'one';\n return 'other';\n },\n '23': function(n) {\n if ((isBetween((n % 10), 1, 2)) || (n % 20) === 0)\n return 'one';\n return 'other';\n },\n '24': function(n) {\n if ((isBetween(n, 3, 10) || isBetween(n, 13, 19)))\n return 'few';\n if (isIn(n, [2, 12]))\n return 'two';\n if (isIn(n, [1, 11]))\n return 'one';\n return 'other';\n }\n };\n\n // return a function that gives the plural form name for a given integer\n var index = locales2rules[lang.replace(/-.*$/, '')];\n if (!(index in pluralRules)) {\n console.warn('plural form unknown for [' + lang + ']');\n return function() { return 'other'; };\n }\n return pluralRules[index];\n }\n\n // pre-defined 'plural' macro\n gMacros.plural = function(str, param, key, prop) {\n var n = parseFloat(param);\n if (isNaN(n))\n return str;\n\n // TODO: support other properties (l20n still doesn't...)\n if (prop != gTextProp)\n return str;\n\n // initialize _pluralRules\n if (!gMacros._pluralRules) {\n gMacros._pluralRules = getPluralRules(gLanguage);\n }\n var index = '[' + gMacros._pluralRules(n) + ']';\n\n // try to find a [zero|one|two] key if it's defined\n if (n === 0 && (key + '[zero]') in gL10nData) {\n str = gL10nData[key + '[zero]'][prop];\n } else if (n == 1 && (key + '[one]') in gL10nData) {\n str = gL10nData[key + '[one]'][prop];\n } else if (n == 2 && (key + '[two]') in gL10nData) {\n str = gL10nData[key + '[two]'][prop];\n } else if ((key + index) in gL10nData) {\n str = gL10nData[key + index][prop];\n } else if ((key + '[other]') in gL10nData) {\n str = gL10nData[key + '[other]'][prop];\n }\n\n return str;\n };\n\n\n /**\n * l10n dictionary functions\n */\n\n // fetch an l10n object, warn if not found, apply `args' if possible\n function getL10nData(key, args, fallback) {\n var data = gL10nData[key];\n if (!data) {\n console.warn('#' + key + ' is undefined.');\n if (!fallback) {\n return null;\n }\n data = fallback;\n }\n\n /** This is where l10n expressions should be processed.\n * The plan is to support C-style expressions from the l20n project;\n * until then, only two kinds of simple expressions are supported:\n * {[ index ]} and {{ arguments }}.\n */\n var rv = {};\n for (var prop in data) {\n var str = data[prop];\n str = substIndexes(str, args, key, prop);\n str = substArguments(str, args, key);\n rv[prop] = str;\n }\n return rv;\n }\n\n // replace {[macros]} with their values\n function substIndexes(str, args, key, prop) {\n var reIndex = /\\{\\[\\s*([a-zA-Z]+)\\(([a-zA-Z]+)\\)\\s*\\]\\}/;\n var reMatch = reIndex.exec(str);\n if (!reMatch || !reMatch.length)\n return str;\n\n // an index/macro has been found\n // Note: at the moment, only one parameter is supported\n var macroName = reMatch[1];\n var paramName = reMatch[2];\n var param;\n if (args && paramName in args) {\n param = args[paramName];\n } else if (paramName in gL10nData) {\n param = gL10nData[paramName];\n }\n\n // there's no macro parser yet: it has to be defined in gMacros\n if (macroName in gMacros) {\n var macro = gMacros[macroName];\n str = macro(str, param, key, prop);\n }\n return str;\n }\n\n // replace {{arguments}} with their values\n function substArguments(str, args, key) {\n var reArgs = /\\{\\{\\s*(.+?)\\s*\\}\\}/g;\n return str.replace(reArgs, function(matched_text, arg) {\n if (args && arg in args) {\n return args[arg];\n }\n if (arg in gL10nData) {\n return gL10nData[arg];\n }\n console.log('argument {{' + arg + '}} for #' + key + ' is undefined.');\n return matched_text;\n });\n }\n\n // translate an HTML element\n function translateElement(element) {\n var l10n = getL10nAttributes(element);\n if (!l10n.id)\n return;\n\n // get the related l10n object\n var data = getL10nData(l10n.id, l10n.args);\n if (!data) {\n console.warn('#' + l10n.id + ' is undefined.');\n return;\n }\n\n // translate element (TODO: security checks?)\n if (data[gTextProp]) { // XXX\n if (getChildElementCount(element) === 0) {\n element[gTextProp] = data[gTextProp];\n } else {\n // this element has element children: replace the content of the first\n // (non-empty) child textNode and clear other child textNodes\n var children = element.childNodes;\n var found = false;\n for (var i = 0, l = children.length; i < l; i++) {\n if (children[i].nodeType === 3 && /\\S/.test(children[i].nodeValue)) {\n if (found) {\n children[i].nodeValue = '';\n } else {\n children[i].nodeValue = data[gTextProp];\n found = true;\n }\n }\n }\n // if no (non-empty) textNode is found, insert a textNode before the\n // first element child.\n if (!found) {\n var textNode = document.createTextNode(data[gTextProp]);\n element.insertBefore(textNode, element.firstChild);\n }\n }\n delete data[gTextProp];\n }\n\n for (var k in data) {\n element[k] = data[k];\n }\n }\n\n // webkit browsers don't currently support 'children' on SVG elements...\n function getChildElementCount(element) {\n if (element.children) {\n return element.children.length;\n }\n if (typeof element.childElementCount !== 'undefined') {\n return element.childElementCount;\n }\n var count = 0;\n for (var i = 0; i < element.childNodes.length; i++) {\n count += element.nodeType === 1 ? 1 : 0;\n }\n return count;\n }\n\n // translate an HTML subtree\n function translateFragment(element) {\n element = element || document.documentElement;\n\n // check all translatable children (= w/ a `data-l10n-id' attribute)\n var children = getTranslatableChildren(element);\n var elementCount = children.length;\n for (var i = 0; i < elementCount; i++) {\n translateElement(children[i]);\n }\n\n // translate element itself if necessary\n translateElement(element);\n }\n\n return {\n // get a localized string\n get: function(key, args, fallbackString) {\n var index = key.lastIndexOf('.');\n var prop = gTextProp;\n if (index > 0) { // An attribute has been specified\n prop = key.substr(index + 1);\n key = key.substring(0, index);\n }\n var fallback;\n if (fallbackString) {\n fallback = {};\n fallback[prop] = fallbackString;\n }\n var data = getL10nData(key, args, fallback);\n if (data && prop in data) {\n return data[prop];\n }\n return '{{' + key + '}}';\n },\n\n // debug\n getData: function() { return gL10nData; },\n getText: function() { return gTextData; },\n\n // get|set the document language\n getLanguage: function() { return gLanguage; },\n setLanguage: function(lang, callback) {\n loadLocale(lang, function() {\n if (callback)\n callback();\n });\n },\n\n // get the direction (ltr|rtl) of the current language\n getDirection: function() {\n // http://www.w3.org/International/questions/qa-scripts\n // Arabic, Hebrew, Farsi, Pashto, Urdu\n var rtlList = ['ar', 'he', 'fa', 'ps', 'ur'];\n var shortCode = gLanguage.split('-', 1)[0];\n return (rtlList.indexOf(shortCode) >= 0) ? 'rtl' : 'ltr';\n },\n\n // translate an element or document fragment\n translate: translateFragment,\n\n // this can be used to prevent race conditions\n getReadyState: function() { return gReadyState; },\n ready: function(callback) {\n if (!callback) {\n return;\n } else if (gReadyState == 'complete' || gReadyState == 'interactive') {\n window.setTimeout(function() {\n callback();\n });\n } else if (document.addEventListener) {\n document.addEventListener('localized', function once() {\n document.removeEventListener('localized', once);\n callback();\n });\n }\n }\n };\n}) (window, document);\n\n\n\n// WEBPACK FOOTER //\n// external/webL10n/l10n.js","/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AnnotationLayer } from 'pdfjs-lib';\nimport { NullL10n } from './ui_utils';\nimport { SimpleLinkService } from './pdf_link_service';\n\n/**\n * @typedef {Object} AnnotationLayerBuilderOptions\n * @property {HTMLDivElement} pageDiv\n * @property {PDFPage} pdfPage\n * @property {boolean} renderInteractiveForms\n * @property {IPDFLinkService} linkService\n * @property {DownloadManager} downloadManager\n * @property {IL10n} l10n - Localization service.\n */\n\nclass AnnotationLayerBuilder {\n /**\n * @param {AnnotationLayerBuilderOptions} options\n */\n constructor({ pageDiv, pdfPage, linkService, downloadManager,\n renderInteractiveForms = false, l10n = NullL10n, }) {\n this.pageDiv = pageDiv;\n this.pdfPage = pdfPage;\n this.linkService = linkService;\n this.downloadManager = downloadManager;\n this.renderInteractiveForms = renderInteractiveForms;\n this.l10n = l10n;\n\n this.div = null;\n }\n\n /**\n * @param {PageViewport} viewport\n * @param {string} intent (default value is 'display')\n */\n render(viewport, intent = 'display') {\n this.pdfPage.getAnnotations({ intent, }).then((annotations) => {\n let parameters = {\n viewport: viewport.clone({ dontFlip: true, }),\n div: this.div,\n annotations,\n page: this.pdfPage,\n renderInteractiveForms: this.renderInteractiveForms,\n linkService: this.linkService,\n downloadManager: this.downloadManager,\n };\n\n if (this.div) {\n // If an annotationLayer already exists, refresh its children's\n // transformation matrices.\n AnnotationLayer.update(parameters);\n } else {\n // Create an annotation layer div and render the annotations\n // if there is at least one annotation.\n if (annotations.length === 0) {\n return;\n }\n this.div = document.createElement('div');\n this.div.className = 'annotationLayer';\n this.pageDiv.appendChild(this.div);\n parameters.div = this.div;\n\n AnnotationLayer.render(parameters);\n this.l10n.translate(this.div);\n }\n });\n }\n\n hide() {\n if (!this.div) {\n return;\n }\n this.div.setAttribute('hidden', 'true');\n }\n}\n\n/**\n * @implements IPDFAnnotationLayerFactory\n */\nclass DefaultAnnotationLayerFactory {\n /**\n * @param {HTMLDivElement} pageDiv\n * @param {PDFPage} pdfPage\n * @param {boolean} renderInteractiveForms\n * @param {IL10n} l10n\n * @returns {AnnotationLayerBuilder}\n */\n createAnnotationLayerBuilder(pageDiv, pdfPage, renderInteractiveForms = false,\n l10n = NullL10n) {\n return new AnnotationLayerBuilder({\n pageDiv,\n pdfPage,\n renderInteractiveForms,\n linkService: new SimpleLinkService(),\n l10n,\n });\n }\n}\n\nexport {\n AnnotationLayerBuilder,\n DefaultAnnotationLayerFactory,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/annotation_layer_builder.js","/* Copyright 2013 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createObjectURL, createValidAbsoluteUrl, PDFJS } from 'pdfjs-lib';\n\nif (typeof PDFJSDev !== 'undefined' && !PDFJSDev.test('CHROME || GENERIC')) {\n throw new Error('Module \"pdfjs-web/download_manager\" shall not be used ' +\n 'outside CHROME and GENERIC builds.');\n}\n\nfunction download(blobUrl, filename) {\n let a = document.createElement('a');\n if (a.click) {\n // Use a.click() if available. Otherwise, Chrome might show\n // \"Unsafe JavaScript attempt to initiate a navigation change\n // for frame with URL\" and not open the PDF at all.\n // Supported by (not mentioned = untested):\n // - Firefox 6 - 19 (4- does not support a.click, 5 ignores a.click)\n // - Chrome 19 - 26 (18- does not support a.click)\n // - Opera 9 - 12.15\n // - Internet Explorer 6 - 10\n // - Safari 6 (5.1- does not support a.click)\n a.href = blobUrl;\n a.target = '_parent';\n // Use a.download if available. This increases the likelihood that\n // the file is downloaded instead of opened by another PDF plugin.\n if ('download' in a) {\n a.download = filename;\n }\n // <a> must be in the document for IE and recent Firefox versions.\n // (otherwise .click() is ignored)\n (document.body || document.documentElement).appendChild(a);\n a.click();\n a.parentNode.removeChild(a);\n } else {\n if (window.top === window &&\n blobUrl.split('#')[0] === window.location.href.split('#')[0]) {\n // If _parent == self, then opening an identical URL with different\n // location hash will only cause a navigation, not a download.\n let padCharacter = blobUrl.indexOf('?') === -1 ? '?' : '&';\n blobUrl = blobUrl.replace(/#|$/, padCharacter + '$&');\n }\n window.open(blobUrl, '_parent');\n }\n}\n\nclass DownloadManager {\n downloadUrl(url, filename) {\n if (!createValidAbsoluteUrl(url, 'http://example.com')) {\n return; // restricted/invalid URL\n }\n download(url + '#pdfjs.action=download', filename);\n }\n\n downloadData(data, filename, contentType) {\n if (navigator.msSaveBlob) { // IE10 and above\n return navigator.msSaveBlob(new Blob([data], { type: contentType, }),\n filename);\n }\n let blobUrl = createObjectURL(data, contentType,\n PDFJS.disableCreateObjectURL);\n download(blobUrl, filename);\n }\n\n download(blob, url, filename) {\n if (navigator.msSaveBlob) {\n // IE10 / IE11\n if (!navigator.msSaveBlob(blob, filename)) {\n this.downloadUrl(url, filename);\n }\n return;\n }\n\n if (PDFJS.disableCreateObjectURL) {\n // URL.createObjectURL is not supported\n this.downloadUrl(url, filename);\n return;\n }\n\n let blobUrl = URL.createObjectURL(blob);\n download(blobUrl, filename);\n }\n}\n\nexport {\n DownloadManager,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/download_manager.js","/* Copyright 2017 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport '../external/webL10n/l10n';\n\nvar webL10n = document.webL10n;\n\nclass GenericL10n {\n constructor(lang) {\n this._lang = lang;\n this._ready = new Promise((resolve, reject) => {\n webL10n.setLanguage(lang, () => {\n resolve(webL10n);\n });\n });\n }\n\n getDirection() {\n return this._ready.then((l10n) => {\n return l10n.getDirection();\n });\n }\n\n get(property, args, fallback) {\n return this._ready.then((l10n) => {\n return l10n.get(property, args, fallback);\n });\n }\n\n translate(element) {\n return this._ready.then((l10n) => {\n return l10n.translate(element);\n });\n }\n}\n\nexport {\n GenericL10n,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/genericl10n.js","/* Copyright 2013 Rob Wu <rob@robwu.nl>\n * https://github.com/Rob--W/grab-to-pan.js\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Construct a GrabToPan instance for a given HTML element.\n * @param options.element {Element}\n * @param options.ignoreTarget {function} optional. See `ignoreTarget(node)`\n * @param options.onActiveChanged {function(boolean)} optional. Called\n * when grab-to-pan is (de)activated. The first argument is a boolean that\n * shows whether grab-to-pan is activated.\n */\nfunction GrabToPan(options) {\n this.element = options.element;\n this.document = options.element.ownerDocument;\n if (typeof options.ignoreTarget === 'function') {\n this.ignoreTarget = options.ignoreTarget;\n }\n this.onActiveChanged = options.onActiveChanged;\n\n // Bind the contexts to ensure that `this` always points to\n // the GrabToPan instance.\n this.activate = this.activate.bind(this);\n this.deactivate = this.deactivate.bind(this);\n this.toggle = this.toggle.bind(this);\n this._onmousedown = this._onmousedown.bind(this);\n this._onmousemove = this._onmousemove.bind(this);\n this._endPan = this._endPan.bind(this);\n\n // This overlay will be inserted in the document when the mouse moves during\n // a grab operation, to ensure that the cursor has the desired appearance.\n var overlay = this.overlay = document.createElement('div');\n overlay.className = 'grab-to-pan-grabbing';\n}\nGrabToPan.prototype = {\n /**\n * Class name of element which can be grabbed\n */\n CSS_CLASS_GRAB: 'grab-to-pan-grab',\n\n /**\n * Bind a mousedown event to the element to enable grab-detection.\n */\n activate: function GrabToPan_activate() {\n if (!this.active) {\n this.active = true;\n this.element.addEventListener('mousedown', this._onmousedown, true);\n this.element.classList.add(this.CSS_CLASS_GRAB);\n if (this.onActiveChanged) {\n this.onActiveChanged(true);\n }\n }\n },\n\n /**\n * Removes all events. Any pending pan session is immediately stopped.\n */\n deactivate: function GrabToPan_deactivate() {\n if (this.active) {\n this.active = false;\n this.element.removeEventListener('mousedown', this._onmousedown, true);\n this._endPan();\n this.element.classList.remove(this.CSS_CLASS_GRAB);\n if (this.onActiveChanged) {\n this.onActiveChanged(false);\n }\n }\n },\n\n toggle: function GrabToPan_toggle() {\n if (this.active) {\n this.deactivate();\n } else {\n this.activate();\n }\n },\n\n /**\n * Whether to not pan if the target element is clicked.\n * Override this method to change the default behaviour.\n *\n * @param node {Element} The target of the event\n * @return {boolean} Whether to not react to the click event.\n */\n ignoreTarget: function GrabToPan_ignoreTarget(node) {\n // Use matchesSelector to check whether the clicked element\n // is (a child of) an input element / link\n return node[matchesSelector](\n 'a[href], a[href] *, input, textarea, button, button *, select, option'\n );\n },\n\n /**\n * @private\n */\n _onmousedown: function GrabToPan__onmousedown(event) {\n if (event.button !== 0 || this.ignoreTarget(event.target)) {\n return;\n }\n if (event.originalTarget) {\n try {\n // eslint-disable-next-line no-unused-expressions\n event.originalTarget.tagName;\n } catch (e) {\n // Mozilla-specific: element is a scrollbar (XUL element)\n return;\n }\n }\n\n this.scrollLeftStart = this.element.scrollLeft;\n this.scrollTopStart = this.element.scrollTop;\n this.clientXStart = event.clientX;\n this.clientYStart = event.clientY;\n this.document.addEventListener('mousemove', this._onmousemove, true);\n this.document.addEventListener('mouseup', this._endPan, true);\n // When a scroll event occurs before a mousemove, assume that the user\n // dragged a scrollbar (necessary for Opera Presto, Safari and IE)\n // (not needed for Chrome/Firefox)\n this.element.addEventListener('scroll', this._endPan, true);\n event.preventDefault();\n event.stopPropagation();\n\n var focusedElement = document.activeElement;\n if (focusedElement && !focusedElement.contains(event.target)) {\n focusedElement.blur();\n }\n },\n\n /**\n * @private\n */\n _onmousemove: function GrabToPan__onmousemove(event) {\n this.element.removeEventListener('scroll', this._endPan, true);\n if (isLeftMouseReleased(event)) {\n this._endPan();\n return;\n }\n var xDiff = event.clientX - this.clientXStart;\n var yDiff = event.clientY - this.clientYStart;\n var scrollTop = this.scrollTopStart - yDiff;\n var scrollLeft = this.scrollLeftStart - xDiff;\n if (this.element.scrollTo) {\n this.element.scrollTo({\n top: scrollTop,\n left: scrollLeft,\n behavior: 'instant',\n });\n } else {\n this.element.scrollTop = scrollTop;\n this.element.scrollLeft = scrollLeft;\n }\n if (!this.overlay.parentNode) {\n document.body.appendChild(this.overlay);\n }\n },\n\n /**\n * @private\n */\n _endPan: function GrabToPan__endPan() {\n this.element.removeEventListener('scroll', this._endPan, true);\n this.document.removeEventListener('mousemove', this._onmousemove, true);\n this.document.removeEventListener('mouseup', this._endPan, true);\n // Note: ChildNode.remove doesn't throw if the parentNode is undefined.\n this.overlay.remove();\n },\n};\n\n// Get the correct (vendor-prefixed) name of the matches method.\nvar matchesSelector;\n['webkitM', 'mozM', 'msM', 'oM', 'm'].some(function(prefix) {\n var name = prefix + 'atches';\n if (name in document.documentElement) {\n matchesSelector = name;\n }\n name += 'Selector';\n if (name in document.documentElement) {\n matchesSelector = name;\n }\n return matchesSelector; // If found, then truthy, and [].some() ends.\n});\n\n// Browser sniffing because it's impossible to feature-detect\n// whether event.which for onmousemove is reliable\nvar isNotIEorIsIE10plus = !document.documentMode || document.documentMode > 9;\nvar chrome = window.chrome;\nvar isChrome15OrOpera15plus = chrome && (chrome.webstore || chrome.app);\n// ^ Chrome 15+ ^ Opera 15+\nvar isSafari6plus = /Apple/.test(navigator.vendor) &&\n /Version\\/([6-9]\\d*|[1-5]\\d+)/.test(navigator.userAgent);\n\n/**\n * Whether the left mouse is not pressed.\n * @param event {MouseEvent}\n * @return {boolean} True if the left mouse button is not pressed.\n * False if unsure or if the left mouse button is pressed.\n */\nfunction isLeftMouseReleased(event) {\n if ('buttons' in event && isNotIEorIsIE10plus) {\n // http://www.w3.org/TR/DOM-Level-3-Events/#events-MouseEvent-buttons\n // Firefox 15+\n // Internet Explorer 10+\n return !(event.buttons & 1);\n }\n if (isChrome15OrOpera15plus || isSafari6plus) {\n // Chrome 14+\n // Opera 15+\n // Safari 6.0+\n return event.which === 0;\n }\n}\n\nexport {\n GrabToPan,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/grab_to_pan.js","/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nclass OverlayManager {\n constructor() {\n this._overlays = {};\n this._active = null;\n this._keyDownBound = this._keyDown.bind(this);\n }\n\n get active() {\n return this._active;\n }\n\n /**\n * @param {string} name - The name of the overlay that is registered.\n * @param {HTMLDivElement} element - The overlay's DOM element.\n * @param {function} callerCloseMethod - (optional) The method that, if\n * present, calls `OverlayManager.close` from the object\n * registering the overlay. Access to this method is\n * necessary in order to run cleanup code when e.g.\n * the overlay is force closed. The default is `null`.\n * @param {boolean} canForceClose - (optional) Indicates if opening the\n * overlay closes an active overlay. The default is `false`.\n * @returns {Promise} A promise that is resolved when the overlay has been\n * registered.\n */\n register(name, element, callerCloseMethod = null, canForceClose = false) {\n return new Promise((resolve) => {\n let container;\n if (!name || !element || !(container = element.parentNode)) {\n throw new Error('Not enough parameters.');\n } else if (this._overlays[name]) {\n throw new Error('The overlay is already registered.');\n }\n this._overlays[name] = {\n element,\n container,\n callerCloseMethod,\n canForceClose,\n };\n resolve();\n });\n }\n\n /**\n * @param {string} name - The name of the overlay that is unregistered.\n * @returns {Promise} A promise that is resolved when the overlay has been\n * unregistered.\n */\n unregister(name) {\n return new Promise((resolve) => {\n if (!this._overlays[name]) {\n throw new Error('The overlay does not exist.');\n } else if (this._active === name) {\n throw new Error('The overlay cannot be removed while it is active.');\n }\n delete this._overlays[name];\n resolve();\n });\n }\n\n /**\n * @param {string} name - The name of the overlay that should be opened.\n * @returns {Promise} A promise that is resolved when the overlay has been\n * opened.\n */\n open(name) {\n return new Promise((resolve) => {\n if (!this._overlays[name]) {\n throw new Error('The overlay does not exist.');\n } else if (this._active) {\n if (this._overlays[name].canForceClose) {\n this._closeThroughCaller();\n } else if (this._active === name) {\n throw new Error('The overlay is already active.');\n } else {\n throw new Error('Another overlay is currently active.');\n }\n }\n this._active = name;\n this._overlays[this._active].element.classList.remove('hidden');\n this._overlays[this._active].container.classList.remove('hidden');\n\n window.addEventListener('keydown', this._keyDownBound);\n resolve();\n });\n }\n\n /**\n * @param {string} name - The name of the overlay that should be closed.\n * @returns {Promise} A promise that is resolved when the overlay has been\n * closed.\n */\n close(name) {\n return new Promise((resolve) => {\n if (!this._overlays[name]) {\n throw new Error('The overlay does not exist.');\n } else if (!this._active) {\n throw new Error('The overlay is currently not active.');\n } else if (this._active !== name) {\n throw new Error('Another overlay is currently active.');\n }\n this._overlays[this._active].container.classList.add('hidden');\n this._overlays[this._active].element.classList.add('hidden');\n this._active = null;\n\n window.removeEventListener('keydown', this._keyDownBound);\n resolve();\n });\n }\n\n /**\n * @private\n */\n _keyDown(evt) {\n if (this._active && evt.keyCode === 27) { // Esc key.\n this._closeThroughCaller();\n evt.preventDefault();\n }\n }\n\n /**\n * @private\n */\n _closeThroughCaller() {\n if (this._overlays[this._active].callerCloseMethod) {\n this._overlays[this._active].callerCloseMethod();\n }\n if (this._active) {\n this.close(this._active);\n }\n }\n}\n\nexport {\n OverlayManager,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/overlay_manager.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { NullL10n } from './ui_utils';\nimport { PasswordResponses } from 'pdfjs-lib';\n\n/**\n * @typedef {Object} PasswordPromptOptions\n * @property {string} overlayName - Name of the overlay for the overlay manager.\n * @property {HTMLDivElement} container - Div container for the overlay.\n * @property {HTMLParagraphElement} label - Label containing instructions for\n * entering the password.\n * @property {HTMLInputElement} input - Input field for entering the password.\n * @property {HTMLButtonElement} submitButton - Button for submitting the\n * password.\n * @property {HTMLButtonElement} cancelButton - Button for cancelling password\n * entry.\n */\n\nclass PasswordPrompt {\n /**\n * @param {PasswordPromptOptions} options\n * @param {OverlayManager} overlayManager - Manager for the viewer overlays.\n * @param {IL10n} l10n - Localization service.\n */\n constructor(options, overlayManager, l10n = NullL10n) {\n this.overlayName = options.overlayName;\n this.container = options.container;\n this.label = options.label;\n this.input = options.input;\n this.submitButton = options.submitButton;\n this.cancelButton = options.cancelButton;\n this.overlayManager = overlayManager;\n this.l10n = l10n;\n\n this.updateCallback = null;\n this.reason = null;\n\n // Attach the event listeners.\n this.submitButton.addEventListener('click', this.verify.bind(this));\n this.cancelButton.addEventListener('click', this.close.bind(this));\n this.input.addEventListener('keydown', (e) => {\n if (e.keyCode === 13) { // Enter key\n this.verify();\n }\n });\n\n this.overlayManager.register(this.overlayName, this.container,\n this.close.bind(this), true);\n }\n\n open() {\n this.overlayManager.open(this.overlayName).then(() => {\n this.input.focus();\n\n let promptString;\n if (this.reason === PasswordResponses.INCORRECT_PASSWORD) {\n promptString = this.l10n.get('password_invalid', null,\n 'Invalid password. Please try again.');\n } else {\n promptString = this.l10n.get('password_label', null,\n 'Enter the password to open this PDF file.');\n }\n\n promptString.then((msg) => {\n this.label.textContent = msg;\n });\n });\n }\n\n close() {\n this.overlayManager.close(this.overlayName).then(() => {\n this.input.value = '';\n });\n }\n\n verify() {\n let password = this.input.value;\n if (password && password.length > 0) {\n this.close();\n return this.updateCallback(password);\n }\n }\n\n setUpdateCallback(updateCallback, reason) {\n this.updateCallback = updateCallback;\n this.reason = reason;\n }\n}\n\nexport {\n PasswordPrompt,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/password_prompt.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createObjectURL, createPromiseCapability, getFilenameFromUrl, PDFJS,\n removeNullCharacters\n} from 'pdfjs-lib';\n\n/**\n * @typedef {Object} PDFAttachmentViewerOptions\n * @property {HTMLDivElement} container - The viewer element.\n * @property {EventBus} eventBus - The application event bus.\n * @property {DownloadManager} downloadManager - The download manager.\n */\n\n/**\n * @typedef {Object} PDFAttachmentViewerRenderParameters\n * @property {Object|null} attachments - A lookup table of attachment objects.\n */\n\nclass PDFAttachmentViewer {\n /**\n * @param {PDFAttachmentViewerOptions} options\n */\n constructor({ container, eventBus, downloadManager, }) {\n this.attachments = null;\n\n this.container = container;\n this.eventBus = eventBus;\n this.downloadManager = downloadManager;\n\n this._renderedCapability = createPromiseCapability();\n this.eventBus.on('fileattachmentannotation',\n this._appendAttachment.bind(this));\n }\n\n reset(keepRenderedCapability = false) {\n this.attachments = null;\n\n // Remove the attachments from the DOM.\n this.container.textContent = '';\n\n if (!keepRenderedCapability) {\n // NOTE: The *only* situation in which the `_renderedCapability` should\n // not be replaced is when appending file attachment annotations.\n this._renderedCapability = createPromiseCapability();\n }\n }\n\n /**\n * @private\n */\n _dispatchEvent(attachmentsCount) {\n this.eventBus.dispatch('attachmentsloaded', {\n source: this,\n attachmentsCount,\n });\n\n this._renderedCapability.resolve();\n }\n\n /**\n * @private\n */\n _bindPdfLink(button, content, filename) {\n if (PDFJS.disableCreateObjectURL) {\n throw new Error('bindPdfLink: ' +\n 'Unsupported \"PDFJS.disableCreateObjectURL\" value.');\n }\n let blobUrl;\n button.onclick = function() {\n if (!blobUrl) {\n blobUrl = createObjectURL(content, 'application/pdf');\n }\n let viewerUrl;\n if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) {\n // The current URL is the viewer, let's use it and append the file.\n viewerUrl = '?file=' + encodeURIComponent(blobUrl + '#' + filename);\n } else if (PDFJSDev.test('CHROME')) {\n // In the Chrome extension, the URL is rewritten using the history API\n // in viewer.js, so an absolute URL must be generated.\n // eslint-disable-next-line no-undef\n viewerUrl = chrome.runtime.getURL('/content/web/viewer.html') +\n '?file=' + encodeURIComponent(blobUrl + '#' + filename);\n } else if (PDFJSDev.test('FIREFOX || MOZCENTRAL')) {\n // Let Firefox's content handler catch the URL and display the PDF.\n viewerUrl = blobUrl + '?' + encodeURIComponent(filename);\n }\n window.open(viewerUrl);\n return false;\n };\n }\n\n /**\n * @private\n */\n _bindLink(button, content, filename) {\n button.onclick = () => {\n this.downloadManager.downloadData(content, filename, '');\n return false;\n };\n }\n\n /**\n * @param {PDFAttachmentViewerRenderParameters} params\n */\n render({ attachments, keepRenderedCapability = false, }) {\n let attachmentsCount = 0;\n\n if (this.attachments) {\n this.reset(keepRenderedCapability === true);\n }\n this.attachments = attachments || null;\n\n if (!attachments) {\n this._dispatchEvent(attachmentsCount);\n return;\n }\n\n let names = Object.keys(attachments).sort(function(a, b) {\n return a.toLowerCase().localeCompare(b.toLowerCase());\n });\n attachmentsCount = names.length;\n\n for (let i = 0; i < attachmentsCount; i++) {\n let item = attachments[names[i]];\n let filename = removeNullCharacters(getFilenameFromUrl(item.filename));\n\n let div = document.createElement('div');\n div.className = 'attachmentsItem';\n let button = document.createElement('button');\n button.textContent = filename;\n if (/\\.pdf$/i.test(filename) && !PDFJS.disableCreateObjectURL) {\n this._bindPdfLink(button, item.content, filename);\n } else {\n this._bindLink(button, item.content, filename);\n }\n\n div.appendChild(button);\n this.container.appendChild(div);\n }\n\n this._dispatchEvent(attachmentsCount);\n }\n\n /**\n * Used to append FileAttachment annotations to the sidebar.\n * @private\n */\n _appendAttachment({ id, filename, content, }) {\n this._renderedCapability.promise.then(() => {\n let attachments = this.attachments;\n\n if (!attachments) {\n attachments = Object.create(null);\n } else {\n for (let name in attachments) {\n if (id === name) {\n return; // Ignore the new attachment if it already exists.\n }\n }\n }\n attachments[id] = {\n filename,\n content,\n };\n this.render({\n attachments,\n keepRenderedCapability: true,\n });\n });\n }\n}\n\nexport {\n PDFAttachmentViewer,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/pdf_attachment_viewer.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { cloneObj, getPDFFileNameFromURL, NullL10n } from './ui_utils';\nimport { createPromiseCapability } from 'pdfjs-lib';\n\nconst DEFAULT_FIELD_CONTENT = '-';\n\n/**\n * @typedef {Object} PDFDocumentPropertiesOptions\n * @property {string} overlayName - Name/identifier for the overlay.\n * @property {Object} fields - Names and elements of the overlay's fields.\n * @property {HTMLDivElement} container - Div container for the overlay.\n * @property {HTMLButtonElement} closeButton - Button for closing the overlay.\n */\n\nclass PDFDocumentProperties {\n /**\n * @param {PDFDocumentPropertiesOptions} options\n * @param {OverlayManager} overlayManager - Manager for the viewer overlays.\n * @param {IL10n} l10n - Localization service.\n */\n constructor({ overlayName, fields, container, closeButton, },\n overlayManager, l10n = NullL10n) {\n this.overlayName = overlayName;\n this.fields = fields;\n this.container = container;\n this.overlayManager = overlayManager;\n this.l10n = l10n;\n\n this._reset();\n\n if (closeButton) { // Bind the event listener for the Close button.\n closeButton.addEventListener('click', this.close.bind(this));\n }\n this.overlayManager.register(this.overlayName, this.container,\n this.close.bind(this));\n }\n\n /**\n * Open the document properties overlay.\n */\n open() {\n let freezeFieldData = (data) => {\n Object.defineProperty(this, 'fieldData', {\n value: Object.freeze(data),\n writable: false,\n enumerable: true,\n configurable: true,\n });\n };\n\n Promise.all([this.overlayManager.open(this.overlayName),\n this._dataAvailableCapability.promise]).then(() => {\n // If the document properties were previously fetched (for this PDF file),\n // just update the dialog immediately to avoid redundant lookups.\n if (this.fieldData) {\n this._updateUI();\n return;\n }\n // Get the document properties.\n this.pdfDocument.getMetadata().then(({ info, metadata, }) => {\n return Promise.all([\n info,\n metadata,\n this._parseFileSize(this.maybeFileSize),\n this._parseDate(info.CreationDate),\n this._parseDate(info.ModDate)\n ]);\n }).then(([info, metadata, fileSize, creationDate, modificationDate]) => {\n freezeFieldData({\n 'fileName': getPDFFileNameFromURL(this.url),\n 'fileSize': fileSize,\n 'title': info.Title,\n 'author': info.Author,\n 'subject': info.Subject,\n 'keywords': info.Keywords,\n 'creationDate': creationDate,\n 'modificationDate': modificationDate,\n 'creator': info.Creator,\n 'producer': info.Producer,\n 'version': info.PDFFormatVersion,\n 'pageCount': this.pdfDocument.numPages,\n });\n this._updateUI();\n\n // Get the correct fileSize, since it may not have been set (if\n // `this.setFileSize` wasn't called) or may be incorrectly set.\n return this.pdfDocument.getDownloadInfo();\n }).then(({ length, }) => {\n return this._parseFileSize(length);\n }).then((fileSize) => {\n let data = cloneObj(this.fieldData);\n data['fileSize'] = fileSize;\n\n freezeFieldData(data);\n this._updateUI();\n });\n });\n }\n\n /**\n * Close the document properties overlay.\n */\n close() {\n this.overlayManager.close(this.overlayName);\n }\n\n /**\n * Set a reference to the PDF document and the URL in order\n * to populate the overlay fields with the document properties.\n * Note that the overlay will contain no information if this method\n * is not called.\n *\n * @param {Object} pdfDocument - A reference to the PDF document.\n * @param {string} url - The URL of the document.\n */\n setDocument(pdfDocument, url) {\n if (this.pdfDocument) {\n this._reset();\n this._updateUI(true);\n }\n if (!pdfDocument) {\n return;\n }\n this.pdfDocument = pdfDocument;\n this.url = url;\n\n this._dataAvailableCapability.resolve();\n }\n\n /**\n * Set the file size of the PDF document. This method is used to\n * update the file size in the document properties overlay once it\n * is known so we do not have to wait until the entire file is loaded.\n *\n * @param {number} fileSize - The file size of the PDF document.\n */\n setFileSize(fileSize) {\n if (typeof fileSize === 'number' && fileSize > 0) {\n this.maybeFileSize = fileSize;\n }\n }\n\n /**\n * @private\n */\n _reset() {\n this.pdfDocument = null;\n this.url = null;\n\n this.maybeFileSize = 0;\n delete this.fieldData;\n this._dataAvailableCapability = createPromiseCapability();\n }\n\n /**\n * Always updates all of the dialog fields, to prevent inconsistent UI state.\n * NOTE: If the contents of a particular field is neither a non-empty string,\n * nor a number, it will fall back to `DEFAULT_FIELD_CONTENT`.\n * @private\n */\n _updateUI(reset = false) {\n if (reset || !this.fieldData) {\n for (let id in this.fields) {\n this.fields[id].textContent = DEFAULT_FIELD_CONTENT;\n }\n return;\n }\n if (this.overlayManager.active !== this.overlayName) {\n // Don't bother updating the dialog if has already been closed,\n // since it will be updated the next time `this.open` is called.\n return;\n }\n for (let id in this.fields) {\n let content = this.fieldData[id];\n this.fields[id].textContent = (content || content === 0) ?\n content : DEFAULT_FIELD_CONTENT;\n }\n }\n\n /**\n * @private\n */\n _parseFileSize(fileSize = 0) {\n let kb = fileSize / 1024;\n if (!kb) {\n return Promise.resolve(undefined);\n } else if (kb < 1024) {\n return this.l10n.get('document_properties_kb', {\n size_kb: (+kb.toPrecision(3)).toLocaleString(),\n size_b: fileSize.toLocaleString(),\n }, '{{size_kb}} KB ({{size_b}} bytes)');\n }\n return this.l10n.get('document_properties_mb', {\n size_mb: (+(kb / 1024).toPrecision(3)).toLocaleString(),\n size_b: fileSize.toLocaleString(),\n }, '{{size_mb}} MB ({{size_b}} bytes)');\n }\n\n /**\n * @private\n */\n _parseDate(inputDate) {\n if (!inputDate) {\n return;\n }\n // This is implemented according to the PDF specification, but note that\n // Adobe Reader doesn't handle changing the date to universal time\n // and doesn't use the user's time zone (they're effectively ignoring\n // the HH' and mm' parts of the date string).\n let dateToParse = inputDate;\n\n // Remove the D: prefix if it is available.\n if (dateToParse.substring(0, 2) === 'D:') {\n dateToParse = dateToParse.substring(2);\n }\n\n // Get all elements from the PDF date string.\n // JavaScript's `Date` object expects the month to be between\n // 0 and 11 instead of 1 and 12, so we're correcting for this.\n let year = parseInt(dateToParse.substring(0, 4), 10);\n let month = parseInt(dateToParse.substring(4, 6), 10) - 1;\n let day = parseInt(dateToParse.substring(6, 8), 10);\n let hours = parseInt(dateToParse.substring(8, 10), 10);\n let minutes = parseInt(dateToParse.substring(10, 12), 10);\n let seconds = parseInt(dateToParse.substring(12, 14), 10);\n let utRel = dateToParse.substring(14, 15);\n let offsetHours = parseInt(dateToParse.substring(15, 17), 10);\n let offsetMinutes = parseInt(dateToParse.substring(18, 20), 10);\n\n // As per spec, utRel = 'Z' means equal to universal time.\n // The other cases ('-' and '+') have to be handled here.\n if (utRel === '-') {\n hours += offsetHours;\n minutes += offsetMinutes;\n } else if (utRel === '+') {\n hours -= offsetHours;\n minutes -= offsetMinutes;\n }\n\n // Return the new date format from the user's locale.\n let date = new Date(Date.UTC(year, month, day, hours, minutes, seconds));\n let dateString = date.toLocaleDateString();\n let timeString = date.toLocaleTimeString();\n return this.l10n.get('document_properties_date_string',\n { date: dateString, time: timeString, },\n '{{date}}, {{time}}');\n }\n}\n\nexport {\n PDFDocumentProperties,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/pdf_document_properties.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FindState } from './pdf_find_controller';\nimport { NullL10n } from './ui_utils';\n\n/**\n * Creates a \"search bar\" given a set of DOM elements that act as controls\n * for searching or for setting search preferences in the UI. This object\n * also sets up the appropriate events for the controls. Actual searching\n * is done by PDFFindController.\n */\nclass PDFFindBar {\n constructor(options, l10n = NullL10n) {\n this.opened = false;\n\n this.bar = options.bar || null;\n this.toggleButton = options.toggleButton || null;\n this.findField = options.findField || null;\n this.highlightAll = options.highlightAllCheckbox || null;\n this.caseSensitive = options.caseSensitiveCheckbox || null;\n this.findMsg = options.findMsg || null;\n this.findResultsCount = options.findResultsCount || null;\n this.findStatusIcon = options.findStatusIcon || null;\n this.findPreviousButton = options.findPreviousButton || null;\n this.findNextButton = options.findNextButton || null;\n this.findController = options.findController || null;\n this.eventBus = options.eventBus;\n this.l10n = l10n;\n\n if (this.findController === null) {\n throw new Error('PDFFindBar cannot be used without a ' +\n 'PDFFindController instance.');\n }\n\n // Add event listeners to the DOM elements.\n this.toggleButton.addEventListener('click', () => {\n this.toggle();\n });\n\n this.findField.addEventListener('input', () => {\n this.dispatchEvent('');\n });\n\n this.bar.addEventListener('keydown', (e) => {\n switch (e.keyCode) {\n case 13: // Enter\n if (e.target === this.findField) {\n this.dispatchEvent('again', e.shiftKey);\n }\n break;\n case 27: // Escape\n this.close();\n break;\n }\n });\n\n this.findPreviousButton.addEventListener('click', () => {\n this.dispatchEvent('again', true);\n });\n\n this.findNextButton.addEventListener('click', () => {\n this.dispatchEvent('again', false);\n });\n\n this.highlightAll.addEventListener('click', () => {\n this.dispatchEvent('highlightallchange');\n });\n\n this.caseSensitive.addEventListener('click', () => {\n this.dispatchEvent('casesensitivitychange');\n });\n\n this.eventBus.on('resize', this._adjustWidth.bind(this));\n }\n\n reset() {\n this.updateUIState();\n }\n\n dispatchEvent(type, findPrev) {\n this.eventBus.dispatch('find', {\n source: this,\n type,\n query: this.findField.value,\n caseSensitive: this.caseSensitive.checked,\n phraseSearch: true,\n highlightAll: this.highlightAll.checked,\n findPrevious: findPrev,\n });\n }\n\n updateUIState(state, previous, matchCount) {\n let notFound = false;\n let findMsg = '';\n let status = '';\n\n switch (state) {\n case FindState.FOUND:\n break;\n\n case FindState.PENDING:\n status = 'pending';\n break;\n\n case FindState.NOT_FOUND:\n findMsg = this.l10n.get('find_not_found', null, 'Phrase not found');\n notFound = true;\n break;\n\n case FindState.WRAPPED:\n if (previous) {\n findMsg = this.l10n.get('find_reached_top', null,\n 'Reached top of document, continued from bottom');\n } else {\n findMsg = this.l10n.get('find_reached_bottom', null,\n 'Reached end of document, continued from top');\n }\n break;\n }\n\n if (notFound) {\n this.findField.classList.add('notFound');\n } else {\n this.findField.classList.remove('notFound');\n }\n\n this.findField.setAttribute('data-status', status);\n Promise.resolve(findMsg).then((msg) => {\n this.findMsg.textContent = msg;\n this._adjustWidth();\n });\n\n this.updateResultsCount(matchCount);\n }\n\n updateResultsCount(matchCount) {\n if (!this.findResultsCount) {\n return; // No UI control is provided.\n }\n\n if (!matchCount) {\n // If there are no matches, hide and reset the counter.\n this.findResultsCount.classList.add('hidden');\n this.findResultsCount.textContent = '';\n } else {\n // Update and show the match counter.\n this.findResultsCount.textContent = matchCount.toLocaleString();\n this.findResultsCount.classList.remove('hidden');\n }\n // Since `updateResultsCount` may be called from `PDFFindController`,\n // ensure that the width of the findbar is always updated correctly.\n this._adjustWidth();\n }\n\n open() {\n if (!this.opened) {\n this.opened = true;\n this.toggleButton.classList.add('toggled');\n this.bar.classList.remove('hidden');\n }\n this.findField.select();\n this.findField.focus();\n\n this._adjustWidth();\n }\n\n close() {\n if (!this.opened) {\n return;\n }\n this.opened = false;\n this.toggleButton.classList.remove('toggled');\n this.bar.classList.add('hidden');\n this.findController.active = false;\n }\n\n toggle() {\n if (this.opened) {\n this.close();\n } else {\n this.open();\n }\n }\n\n /**\n * @private\n */\n _adjustWidth() {\n if (!this.opened) {\n return;\n }\n\n // The find bar has an absolute position and thus the browser extends\n // its width to the maximum possible width once the find bar does not fit\n // entirely within the window anymore (and its elements are automatically\n // wrapped). Here we detect and fix that.\n this.bar.classList.remove('wrapContainers');\n\n let findbarHeight = this.bar.clientHeight;\n let inputContainerHeight = this.bar.firstElementChild.clientHeight;\n\n if (findbarHeight > inputContainerHeight) {\n // The findbar is taller than the input container, which means that\n // the browser wrapped some of the elements. For a consistent look,\n // wrap all of them to adjust the width of the find bar.\n this.bar.classList.add('wrapContainers');\n }\n }\n}\n\nexport {\n PDFFindBar,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/pdf_find_bar.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* globals chrome */\n\nimport { getGlobalEventBus } from './dom_events';\n\nfunction PDFHistory(options) {\n this.linkService = options.linkService;\n this.eventBus = options.eventBus || getGlobalEventBus();\n\n this.initialized = false;\n this.initialDestination = null;\n this.initialBookmark = null;\n}\n\nPDFHistory.prototype = {\n /**\n * @param {string} fingerprint\n */\n initialize: function pdfHistoryInitialize(fingerprint) {\n this.initialized = true;\n this.reInitialized = false;\n this.allowHashChange = true;\n this.historyUnlocked = true;\n this.isViewerInPresentationMode = false;\n\n this.previousHash = window.location.hash.substring(1);\n this.currentBookmark = '';\n this.currentPage = 0;\n this.updatePreviousBookmark = false;\n this.previousBookmark = '';\n this.previousPage = 0;\n this.nextHashParam = '';\n\n this.fingerprint = fingerprint;\n this.currentUid = this.uid = 0;\n this.current = {};\n\n var state = window.history.state;\n if (this._isStateObjectDefined(state)) {\n // This corresponds to navigating back to the document\n // from another page in the browser history.\n if (state.target.dest) {\n this.initialDestination = state.target.dest;\n } else {\n this.initialBookmark = state.target.hash;\n }\n this.currentUid = state.uid;\n this.uid = state.uid + 1;\n this.current = state.target;\n } else {\n // This corresponds to the loading of a new document.\n if (state && state.fingerprint &&\n this.fingerprint !== state.fingerprint) {\n // Reinitialize the browsing history when a new document\n // is opened in the web viewer.\n this.reInitialized = true;\n }\n this._pushOrReplaceState({ fingerprint: this.fingerprint, }, true);\n }\n\n var self = this;\n window.addEventListener('popstate', function pdfHistoryPopstate(evt) {\n if (!self.historyUnlocked) {\n return;\n }\n if (evt.state) {\n // Move back/forward in the history.\n self._goTo(evt.state);\n return;\n }\n\n // If the state is not set, then the user tried to navigate to a\n // different hash by manually editing the URL and pressing Enter, or by\n // clicking on an in-page link (e.g. the \"current view\" link).\n // Save the current view state to the browser history.\n\n // Note: In Firefox, history.null could also be null after an in-page\n // navigation to the same URL, and without dispatching the popstate\n // event: https://bugzilla.mozilla.org/show_bug.cgi?id=1183881\n\n if (self.uid === 0) {\n // Replace the previous state if it was not explicitly set.\n var previousParams = (self.previousHash && self.currentBookmark &&\n self.previousHash !== self.currentBookmark) ?\n { hash: self.currentBookmark, page: self.currentPage, } :\n { page: 1, };\n replacePreviousHistoryState(previousParams, function() {\n updateHistoryWithCurrentHash();\n });\n } else {\n updateHistoryWithCurrentHash();\n }\n });\n\n\n function updateHistoryWithCurrentHash() {\n self.previousHash = window.location.hash.slice(1);\n self._pushToHistory({ hash: self.previousHash, }, false, true);\n self._updatePreviousBookmark();\n }\n\n function replacePreviousHistoryState(params, callback) {\n // To modify the previous history entry, the following happens:\n // 1. history.back()\n // 2. _pushToHistory, which calls history.replaceState( ... )\n // 3. history.forward()\n // Because a navigation via the history API does not immediately update\n // the history state, the popstate event is used for synchronization.\n self.historyUnlocked = false;\n\n // Suppress the hashchange event to avoid side effects caused by\n // navigating back and forward.\n self.allowHashChange = false;\n window.addEventListener('popstate', rewriteHistoryAfterBack);\n history.back();\n\n function rewriteHistoryAfterBack() {\n window.removeEventListener('popstate', rewriteHistoryAfterBack);\n window.addEventListener('popstate', rewriteHistoryAfterForward);\n self._pushToHistory(params, false, true);\n history.forward();\n }\n function rewriteHistoryAfterForward() {\n window.removeEventListener('popstate', rewriteHistoryAfterForward);\n self.allowHashChange = true;\n self.historyUnlocked = true;\n callback();\n }\n }\n\n function pdfHistoryBeforeUnload() {\n var previousParams = self._getPreviousParams(null, true);\n if (previousParams) {\n var replacePrevious = (!self.current.dest &&\n self.current.hash !== self.previousHash);\n self._pushToHistory(previousParams, false, replacePrevious);\n self._updatePreviousBookmark();\n }\n // Remove the event listener when navigating away from the document,\n // since 'beforeunload' prevents Firefox from caching the document.\n window.removeEventListener('beforeunload', pdfHistoryBeforeUnload);\n }\n\n window.addEventListener('beforeunload', pdfHistoryBeforeUnload);\n\n window.addEventListener('pageshow', function pdfHistoryPageShow(evt) {\n // If the entire viewer (including the PDF file) is cached in\n // the browser, we need to reattach the 'beforeunload' event listener\n // since the 'DOMContentLoaded' event is not fired on 'pageshow'.\n window.addEventListener('beforeunload', pdfHistoryBeforeUnload);\n });\n\n self.eventBus.on('presentationmodechanged', function(e) {\n self.isViewerInPresentationMode = e.active;\n });\n },\n\n clearHistoryState: function pdfHistory_clearHistoryState() {\n this._pushOrReplaceState(null, true);\n },\n\n _isStateObjectDefined: function pdfHistory_isStateObjectDefined(state) {\n return (state && state.uid >= 0 &&\n state.fingerprint && this.fingerprint === state.fingerprint &&\n state.target && state.target.hash) ? true : false;\n },\n\n _pushOrReplaceState: function pdfHistory_pushOrReplaceState(stateObj,\n replace) {\n // history.state.chromecomState is managed by chromecom.js.\n if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME') &&\n window.history.state && 'chromecomState' in window.history.state) {\n stateObj = stateObj || {};\n stateObj.chromecomState = window.history.state.chromecomState;\n }\n if (replace) {\n if (typeof PDFJSDev === 'undefined' ||\n PDFJSDev.test('GENERIC || CHROME')) {\n window.history.replaceState(stateObj, '', document.URL);\n } else {\n window.history.replaceState(stateObj, '');\n }\n } else {\n if (typeof PDFJSDev === 'undefined' ||\n PDFJSDev.test('GENERIC || CHROME')) {\n window.history.pushState(stateObj, '', document.URL);\n } else {\n window.history.pushState(stateObj, '');\n }\n if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME') &&\n top === window) {\n chrome.runtime.sendMessage('showPageAction');\n }\n }\n },\n\n get isHashChangeUnlocked() {\n if (!this.initialized) {\n return true;\n }\n return this.allowHashChange;\n },\n\n _updatePreviousBookmark: function pdfHistory_updatePreviousBookmark() {\n if (this.updatePreviousBookmark &&\n this.currentBookmark && this.currentPage) {\n this.previousBookmark = this.currentBookmark;\n this.previousPage = this.currentPage;\n this.updatePreviousBookmark = false;\n }\n },\n\n updateCurrentBookmark: function pdfHistoryUpdateCurrentBookmark(bookmark,\n pageNum) {\n if (this.initialized) {\n this.currentBookmark = bookmark.substring(1);\n this.currentPage = pageNum | 0;\n this._updatePreviousBookmark();\n }\n },\n\n updateNextHashParam: function pdfHistoryUpdateNextHashParam(param) {\n if (this.initialized) {\n this.nextHashParam = param;\n }\n },\n\n push: function pdfHistoryPush(params, isInitialBookmark) {\n if (!(this.initialized && this.historyUnlocked)) {\n return;\n }\n if (params.dest && !params.hash) {\n params.hash = (this.current.hash && this.current.dest &&\n this.current.dest === params.dest) ?\n this.current.hash :\n this.linkService.getDestinationHash(params.dest).split('#')[1];\n }\n if (params.page) {\n params.page |= 0;\n }\n if (isInitialBookmark) {\n var target = window.history.state.target;\n if (!target) {\n // Invoked when the user specifies an initial bookmark,\n // thus setting initialBookmark, when the document is loaded.\n this._pushToHistory(params, false);\n this.previousHash = window.location.hash.substring(1);\n }\n this.updatePreviousBookmark = this.nextHashParam ? false : true;\n if (target) {\n // If the current document is reloaded,\n // avoid creating duplicate entries in the history.\n this._updatePreviousBookmark();\n }\n return;\n }\n if (this.nextHashParam) {\n if (this.nextHashParam === params.hash) {\n this.nextHashParam = null;\n this.updatePreviousBookmark = true;\n return;\n }\n this.nextHashParam = null;\n }\n\n if (params.hash) {\n if (this.current.hash) {\n if (this.current.hash !== params.hash) {\n this._pushToHistory(params, true);\n } else {\n if (!this.current.page && params.page) {\n this._pushToHistory(params, false, true);\n }\n this.updatePreviousBookmark = true;\n }\n } else {\n this._pushToHistory(params, true);\n }\n } else if (this.current.page && params.page &&\n this.current.page !== params.page) {\n this._pushToHistory(params, true);\n }\n },\n\n _getPreviousParams: function pdfHistory_getPreviousParams(onlyCheckPage,\n beforeUnload) {\n if (!(this.currentBookmark && this.currentPage)) {\n return null;\n } else if (this.updatePreviousBookmark) {\n this.updatePreviousBookmark = false;\n }\n if (this.uid > 0 && !(this.previousBookmark && this.previousPage)) {\n // Prevent the history from getting stuck in the current state,\n // effectively preventing the user from going back/forward in\n // the history.\n //\n // This happens if the current position in the document didn't change\n // when the history was previously updated. The reasons for this are\n // either:\n // 1. The current zoom value is such that the document does not need to,\n // or cannot, be scrolled to display the destination.\n // 2. The previous destination is broken, and doesn't actally point to a\n // position within the document.\n // (This is either due to a bad PDF generator, or the user making a\n // mistake when entering a destination in the hash parameters.)\n return null;\n }\n if ((!this.current.dest && !onlyCheckPage) || beforeUnload) {\n if (this.previousBookmark === this.currentBookmark) {\n return null;\n }\n } else if (this.current.page || onlyCheckPage) {\n if (this.previousPage === this.currentPage) {\n return null;\n }\n } else {\n return null;\n }\n var params = { hash: this.currentBookmark, page: this.currentPage, };\n if (this.isViewerInPresentationMode) {\n params.hash = null;\n }\n return params;\n },\n\n _stateObj: function pdfHistory_stateObj(params) {\n return { fingerprint: this.fingerprint, uid: this.uid, target: params, };\n },\n\n _pushToHistory: function pdfHistory_pushToHistory(params,\n addPrevious, overwrite) {\n if (!this.initialized) {\n return;\n }\n if (!params.hash && params.page) {\n params.hash = ('page=' + params.page);\n }\n if (addPrevious && !overwrite) {\n var previousParams = this._getPreviousParams();\n if (previousParams) {\n var replacePrevious = (!this.current.dest &&\n this.current.hash !== this.previousHash);\n this._pushToHistory(previousParams, false, replacePrevious);\n }\n }\n this._pushOrReplaceState(this._stateObj(params),\n (overwrite || this.uid === 0));\n this.currentUid = this.uid++;\n this.current = params;\n this.updatePreviousBookmark = true;\n },\n\n _goTo: function pdfHistory_goTo(state) {\n if (!(this.initialized && this.historyUnlocked &&\n this._isStateObjectDefined(state))) {\n return;\n }\n if (!this.reInitialized && state.uid < this.currentUid) {\n var previousParams = this._getPreviousParams(true);\n if (previousParams) {\n this._pushToHistory(this.current, false);\n this._pushToHistory(previousParams, false);\n this.currentUid = state.uid;\n window.history.back();\n return;\n }\n }\n this.historyUnlocked = false;\n\n if (state.target.dest) {\n this.linkService.navigateTo(state.target.dest);\n } else {\n this.linkService.setHash(state.target.hash);\n }\n this.currentUid = state.uid;\n if (state.uid > this.uid) {\n this.uid = state.uid;\n }\n this.current = state.target;\n this.updatePreviousBookmark = true;\n\n var currentHash = window.location.hash.substring(1);\n if (this.previousHash !== currentHash) {\n this.allowHashChange = false;\n }\n this.previousHash = currentHash;\n\n this.historyUnlocked = true;\n },\n\n back: function pdfHistoryBack() {\n this.go(-1);\n },\n\n forward: function pdfHistoryForward() {\n this.go(1);\n },\n\n go: function pdfHistoryGo(direction) {\n if (this.initialized && this.historyUnlocked) {\n var state = window.history.state;\n if (direction === -1 && state && state.uid > 0) {\n window.history.back();\n } else if (direction === 1 && state && state.uid < (this.uid - 1)) {\n window.history.forward();\n }\n }\n },\n};\n\nexport {\n PDFHistory,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/pdf_history.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n addLinkAttributes, PDFJS, removeNullCharacters\n} from 'pdfjs-lib';\n\nconst DEFAULT_TITLE = '\\u2013';\n\n/**\n * @typedef {Object} PDFOutlineViewerOptions\n * @property {HTMLDivElement} container - The viewer element.\n * @property {IPDFLinkService} linkService - The navigation/linking service.\n * @property {EventBus} eventBus - The application event bus.\n */\n\n/**\n * @typedef {Object} PDFOutlineViewerRenderParameters\n * @property {Array|null} outline - An array of outline objects.\n */\n\nclass PDFOutlineViewer {\n /**\n * @param {PDFOutlineViewerOptions} options\n */\n constructor({ container, linkService, eventBus, }) {\n this.outline = null;\n this.lastToggleIsShow = true;\n\n this.container = container;\n this.linkService = linkService;\n this.eventBus = eventBus;\n }\n\n reset() {\n this.outline = null;\n this.lastToggleIsShow = true;\n\n // Remove the outline from the DOM.\n this.container.textContent = '';\n\n // Ensure that the left (right in RTL locales) margin is always reset,\n // to prevent incorrect outline alignment if a new document is opened.\n this.container.classList.remove('outlineWithDeepNesting');\n }\n\n /**\n * @private\n */\n _dispatchEvent(outlineCount) {\n this.eventBus.dispatch('outlineloaded', {\n source: this,\n outlineCount,\n });\n }\n\n /**\n * @private\n */\n _bindLink(element, item) {\n if (item.url) {\n addLinkAttributes(element, {\n url: item.url,\n target: (item.newWindow ? PDFJS.LinkTarget.BLANK : undefined),\n });\n return;\n }\n let destination = item.dest;\n\n element.href = this.linkService.getDestinationHash(destination);\n element.onclick = () => {\n if (destination) {\n this.linkService.navigateTo(destination);\n }\n return false;\n };\n }\n\n /**\n * @private\n */\n _setStyles(element, item) {\n let styleStr = '';\n if (item.bold) {\n styleStr += 'font-weight: bold;';\n }\n if (item.italic) {\n styleStr += 'font-style: italic;';\n }\n\n if (styleStr) {\n element.setAttribute('style', styleStr);\n }\n }\n\n /**\n * Prepend a button before an outline item which allows the user to toggle\n * the visibility of all outline items at that level.\n *\n * @private\n */\n _addToggleButton(div) {\n let toggler = document.createElement('div');\n toggler.className = 'outlineItemToggler';\n toggler.onclick = (evt) => {\n evt.stopPropagation();\n toggler.classList.toggle('outlineItemsHidden');\n\n if (evt.shiftKey) {\n let shouldShowAll = !toggler.classList.contains('outlineItemsHidden');\n this._toggleOutlineItem(div, shouldShowAll);\n }\n };\n div.insertBefore(toggler, div.firstChild);\n }\n\n /**\n * Toggle the visibility of the subtree of an outline item.\n *\n * @param {Element} root - the root of the outline (sub)tree.\n * @param {boolean} show - whether to show the outline (sub)tree. If false,\n * the outline subtree rooted at |root| will be collapsed.\n *\n * @private\n */\n _toggleOutlineItem(root, show) {\n this.lastToggleIsShow = show;\n let togglers = root.querySelectorAll('.outlineItemToggler');\n for (let i = 0, ii = togglers.length; i < ii; ++i) {\n togglers[i].classList[show ? 'remove' : 'add']('outlineItemsHidden');\n }\n }\n\n /**\n * Collapse or expand all subtrees of the outline.\n */\n toggleOutlineTree() {\n if (!this.outline) {\n return;\n }\n this._toggleOutlineItem(this.container, !this.lastToggleIsShow);\n }\n\n /**\n * @param {PDFOutlineViewerRenderParameters} params\n */\n render({ outline, }) {\n let outlineCount = 0;\n\n if (this.outline) {\n this.reset();\n }\n this.outline = outline || null;\n\n if (!outline) {\n this._dispatchEvent(outlineCount);\n return;\n }\n\n let fragment = document.createDocumentFragment();\n let queue = [{ parent: fragment, items: this.outline, }];\n let hasAnyNesting = false;\n while (queue.length > 0) {\n let levelData = queue.shift();\n for (let i = 0, len = levelData.items.length; i < len; i++) {\n let item = levelData.items[i];\n\n let div = document.createElement('div');\n div.className = 'outlineItem';\n\n let element = document.createElement('a');\n this._bindLink(element, item);\n this._setStyles(element, item);\n element.textContent =\n removeNullCharacters(item.title) || DEFAULT_TITLE;\n\n div.appendChild(element);\n\n if (item.items.length > 0) {\n hasAnyNesting = true;\n this._addToggleButton(div);\n\n let itemsDiv = document.createElement('div');\n itemsDiv.className = 'outlineItems';\n div.appendChild(itemsDiv);\n queue.push({ parent: itemsDiv, items: item.items, });\n }\n\n levelData.parent.appendChild(div);\n outlineCount++;\n }\n }\n if (hasAnyNesting) {\n this.container.classList.add('outlineWithDeepNesting');\n }\n\n this.container.appendChild(fragment);\n\n this._dispatchEvent(outlineCount);\n }\n}\n\nexport {\n PDFOutlineViewer,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/pdf_outline_viewer.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n approximateFraction, CSS_UNITS, DEFAULT_SCALE, getOutputScale, NullL10n,\n RendererType, roundToDivide\n} from './ui_utils';\nimport {\n createPromiseCapability, CustomStyle, PDFJS, RenderingCancelledException,\n SVGGraphics\n} from 'pdfjs-lib';\nimport { getGlobalEventBus } from './dom_events';\nimport { RenderingStates } from './pdf_rendering_queue';\n\n/**\n * @typedef {Object} PDFPageViewOptions\n * @property {HTMLDivElement} container - The viewer element.\n * @property {EventBus} eventBus - The application event bus.\n * @property {number} id - The page unique ID (normally its number).\n * @property {number} scale - The page scale display.\n * @property {PageViewport} defaultViewport - The page viewport.\n * @property {PDFRenderingQueue} renderingQueue - The rendering queue object.\n * @property {IPDFTextLayerFactory} textLayerFactory\n * @property {IPDFAnnotationLayerFactory} annotationLayerFactory\n * @property {boolean} enhanceTextSelection - Turns on the text selection\n * enhancement. The default is `false`.\n * @property {boolean} renderInteractiveForms - Turns on rendering of\n * interactive form elements. The default is `false`.\n * @property {string} renderer - 'canvas' or 'svg'. The default is 'canvas'.\n * @property {IL10n} l10n - Localization service.\n */\n\n/**\n * @implements {IRenderableView}\n */\nclass PDFPageView {\n /**\n * @param {PDFPageViewOptions} options\n */\n constructor(options) {\n let container = options.container;\n let defaultViewport = options.defaultViewport;\n\n this.id = options.id;\n this.renderingId = 'page' + this.id;\n\n this.pdfPage = null;\n this.pageLabel = null;\n this.rotation = 0;\n this.scale = options.scale || DEFAULT_SCALE;\n this.viewport = defaultViewport;\n this.pdfPageRotate = defaultViewport.rotation;\n this.hasRestrictedScaling = false;\n this.enhanceTextSelection = options.enhanceTextSelection || false;\n this.renderInteractiveForms = options.renderInteractiveForms || false;\n\n this.eventBus = options.eventBus || getGlobalEventBus();\n this.renderingQueue = options.renderingQueue;\n this.textLayerFactory = options.textLayerFactory;\n this.annotationLayerFactory = options.annotationLayerFactory;\n this.renderer = options.renderer || RendererType.CANVAS;\n this.l10n = options.l10n || NullL10n;\n\n this.paintTask = null;\n this.paintedViewportMap = new WeakMap();\n this.renderingState = RenderingStates.INITIAL;\n this.resume = null;\n this.error = null;\n\n this.onBeforeDraw = null;\n this.onAfterDraw = null;\n\n this.annotationLayer = null;\n this.textLayer = null;\n this.zoomLayer = null;\n\n let div = document.createElement('div');\n div.className = 'page';\n div.style.width = Math.floor(this.viewport.width) + 'px';\n div.style.height = Math.floor(this.viewport.height) + 'px';\n div.setAttribute('data-page-number', this.id);\n this.div = div;\n\n container.appendChild(div);\n }\n\n setPdfPage(pdfPage) {\n this.pdfPage = pdfPage;\n this.pdfPageRotate = pdfPage.rotate;\n\n let totalRotation = (this.rotation + this.pdfPageRotate) % 360;\n this.viewport = pdfPage.getViewport(this.scale * CSS_UNITS,\n totalRotation);\n this.stats = pdfPage.stats;\n this.reset();\n }\n\n destroy() {\n this.reset();\n if (this.pdfPage) {\n this.pdfPage.cleanup();\n this.pdfPage = null;\n }\n }\n\n /**\n * @private\n */\n _resetZoomLayer(removeFromDOM = false) {\n if (!this.zoomLayer) {\n return;\n }\n let zoomLayerCanvas = this.zoomLayer.firstChild;\n this.paintedViewportMap.delete(zoomLayerCanvas);\n // Zeroing the width and height causes Firefox to release graphics\n // resources immediately, which can greatly reduce memory consumption.\n zoomLayerCanvas.width = 0;\n zoomLayerCanvas.height = 0;\n\n if (removeFromDOM) {\n // Note: `ChildNode.remove` doesn't throw if the parent node is undefined.\n this.zoomLayer.remove();\n }\n this.zoomLayer = null;\n }\n\n reset(keepZoomLayer = false, keepAnnotations = false) {\n this.cancelRendering();\n\n let div = this.div;\n div.style.width = Math.floor(this.viewport.width) + 'px';\n div.style.height = Math.floor(this.viewport.height) + 'px';\n\n let childNodes = div.childNodes;\n let currentZoomLayerNode = (keepZoomLayer && this.zoomLayer) || null;\n let currentAnnotationNode = (keepAnnotations && this.annotationLayer &&\n this.annotationLayer.div) || null;\n for (let i = childNodes.length - 1; i >= 0; i--) {\n let node = childNodes[i];\n if (currentZoomLayerNode === node || currentAnnotationNode === node) {\n continue;\n }\n div.removeChild(node);\n }\n div.removeAttribute('data-loaded');\n\n if (currentAnnotationNode) {\n // Hide the annotation layer until all elements are resized\n // so they are not displayed on the already resized page.\n this.annotationLayer.hide();\n } else {\n this.annotationLayer = null;\n }\n\n if (!currentZoomLayerNode) {\n if (this.canvas) {\n this.paintedViewportMap.delete(this.canvas);\n // Zeroing the width and height causes Firefox to release graphics\n // resources immediately, which can greatly reduce memory consumption.\n this.canvas.width = 0;\n this.canvas.height = 0;\n delete this.canvas;\n }\n this._resetZoomLayer();\n }\n if (this.svg) {\n this.paintedViewportMap.delete(this.svg);\n delete this.svg;\n }\n\n this.loadingIconDiv = document.createElement('div');\n this.loadingIconDiv.className = 'loadingIcon';\n div.appendChild(this.loadingIconDiv);\n }\n\n update(scale, rotation) {\n this.scale = scale || this.scale;\n if (typeof rotation !== 'undefined') { // The rotation may be zero.\n this.rotation = rotation;\n }\n\n let totalRotation = (this.rotation + this.pdfPageRotate) % 360;\n this.viewport = this.viewport.clone({\n scale: this.scale * CSS_UNITS,\n rotation: totalRotation,\n });\n\n if (this.svg) {\n this.cssTransform(this.svg, true);\n\n this.eventBus.dispatch('pagerendered', {\n source: this,\n pageNumber: this.id,\n cssTransform: true,\n });\n return;\n }\n\n let isScalingRestricted = false;\n if (this.canvas && PDFJS.maxCanvasPixels > 0) {\n let outputScale = this.outputScale;\n if (((Math.floor(this.viewport.width) * outputScale.sx) | 0) *\n ((Math.floor(this.viewport.height) * outputScale.sy) | 0) >\n PDFJS.maxCanvasPixels) {\n isScalingRestricted = true;\n }\n }\n\n if (this.canvas) {\n if (PDFJS.useOnlyCssZoom ||\n (this.hasRestrictedScaling && isScalingRestricted)) {\n this.cssTransform(this.canvas, true);\n\n this.eventBus.dispatch('pagerendered', {\n source: this,\n pageNumber: this.id,\n cssTransform: true,\n });\n return;\n }\n if (!this.zoomLayer && !this.canvas.hasAttribute('hidden')) {\n this.zoomLayer = this.canvas.parentNode;\n this.zoomLayer.style.position = 'absolute';\n }\n }\n if (this.zoomLayer) {\n this.cssTransform(this.zoomLayer.firstChild);\n }\n this.reset(/* keepZoomLayer = */ true, /* keepAnnotations = */ true);\n }\n\n cancelRendering() {\n if (this.paintTask) {\n this.paintTask.cancel();\n this.paintTask = null;\n }\n this.renderingState = RenderingStates.INITIAL;\n this.resume = null;\n\n if (this.textLayer) {\n this.textLayer.cancel();\n this.textLayer = null;\n }\n }\n\n cssTransform(target, redrawAnnotations = false) {\n // Scale target (canvas or svg), its wrapper and page container.\n let width = this.viewport.width;\n let height = this.viewport.height;\n let div = this.div;\n target.style.width = target.parentNode.style.width = div.style.width =\n Math.floor(width) + 'px';\n target.style.height = target.parentNode.style.height = div.style.height =\n Math.floor(height) + 'px';\n // The canvas may have been originally rotated; rotate relative to that.\n let relativeRotation = this.viewport.rotation -\n this.paintedViewportMap.get(target).rotation;\n let absRotation = Math.abs(relativeRotation);\n let scaleX = 1, scaleY = 1;\n if (absRotation === 90 || absRotation === 270) {\n // Scale x and y because of the rotation.\n scaleX = height / width;\n scaleY = width / height;\n }\n let cssTransform = 'rotate(' + relativeRotation + 'deg) ' +\n 'scale(' + scaleX + ',' + scaleY + ')';\n CustomStyle.setProp('transform', target, cssTransform);\n\n if (this.textLayer) {\n // Rotating the text layer is more complicated since the divs inside the\n // the text layer are rotated.\n // TODO: This could probably be simplified by drawing the text layer in\n // one orientation and then rotating overall.\n let textLayerViewport = this.textLayer.viewport;\n let textRelativeRotation = this.viewport.rotation -\n textLayerViewport.rotation;\n let textAbsRotation = Math.abs(textRelativeRotation);\n let scale = width / textLayerViewport.width;\n if (textAbsRotation === 90 || textAbsRotation === 270) {\n scale = width / textLayerViewport.height;\n }\n let textLayerDiv = this.textLayer.textLayerDiv;\n let transX, transY;\n switch (textAbsRotation) {\n case 0:\n transX = transY = 0;\n break;\n case 90:\n transX = 0;\n transY = '-' + textLayerDiv.style.height;\n break;\n case 180:\n transX = '-' + textLayerDiv.style.width;\n transY = '-' + textLayerDiv.style.height;\n break;\n case 270:\n transX = '-' + textLayerDiv.style.width;\n transY = 0;\n break;\n default:\n console.error('Bad rotation value.');\n break;\n }\n CustomStyle.setProp('transform', textLayerDiv,\n 'rotate(' + textAbsRotation + 'deg) ' +\n 'scale(' + scale + ', ' + scale + ') ' +\n 'translate(' + transX + ', ' + transY + ')');\n CustomStyle.setProp('transformOrigin', textLayerDiv, '0% 0%');\n }\n\n if (redrawAnnotations && this.annotationLayer) {\n this.annotationLayer.render(this.viewport, 'display');\n }\n }\n\n get width() {\n return this.viewport.width;\n }\n\n get height() {\n return this.viewport.height;\n }\n\n getPagePoint(x, y) {\n return this.viewport.convertToPdfPoint(x, y);\n }\n\n draw() {\n if (this.renderingState !== RenderingStates.INITIAL) {\n console.error('Must be in new state before drawing');\n this.reset(); // Ensure that we reset all state to prevent issues.\n }\n\n if (!this.pdfPage) {\n this.renderingState = RenderingStates.FINISHED;\n return Promise.reject(new Error('Page is not loaded'));\n }\n\n this.renderingState = RenderingStates.RUNNING;\n\n let pdfPage = this.pdfPage;\n let div = this.div;\n // Wrap the canvas so that if it has a CSS transform for high DPI the\n // overflow will be hidden in Firefox.\n let canvasWrapper = document.createElement('div');\n canvasWrapper.style.width = div.style.width;\n canvasWrapper.style.height = div.style.height;\n canvasWrapper.classList.add('canvasWrapper');\n\n if (this.annotationLayer && this.annotationLayer.div) {\n // The annotation layer needs to stay on top.\n div.insertBefore(canvasWrapper, this.annotationLayer.div);\n } else {\n div.appendChild(canvasWrapper);\n }\n\n let textLayer = null;\n if (this.textLayerFactory) {\n let textLayerDiv = document.createElement('div');\n textLayerDiv.className = 'textLayer';\n textLayerDiv.style.width = canvasWrapper.style.width;\n textLayerDiv.style.height = canvasWrapper.style.height;\n if (this.annotationLayer && this.annotationLayer.div) {\n // The annotation layer needs to stay on top.\n div.insertBefore(textLayerDiv, this.annotationLayer.div);\n } else {\n div.appendChild(textLayerDiv);\n }\n\n textLayer = this.textLayerFactory.\n createTextLayerBuilder(textLayerDiv, this.id - 1, this.viewport,\n this.enhanceTextSelection);\n }\n this.textLayer = textLayer;\n\n let renderContinueCallback = null;\n if (this.renderingQueue) {\n renderContinueCallback = (cont) => {\n if (!this.renderingQueue.isHighestPriority(this)) {\n this.renderingState = RenderingStates.PAUSED;\n this.resume = () => {\n this.renderingState = RenderingStates.RUNNING;\n cont();\n };\n return;\n }\n cont();\n };\n }\n\n let finishPaintTask = (error) => {\n // The paintTask may have been replaced by a new one, so only remove\n // the reference to the paintTask if it matches the one that is\n // triggering this callback.\n if (paintTask === this.paintTask) {\n this.paintTask = null;\n }\n\n if (((typeof PDFJSDev === 'undefined' ||\n !PDFJSDev.test('PDFJS_NEXT')) && error === 'cancelled') ||\n error instanceof RenderingCancelledException) {\n this.error = null;\n return Promise.resolve(undefined);\n }\n\n this.renderingState = RenderingStates.FINISHED;\n\n if (this.loadingIconDiv) {\n div.removeChild(this.loadingIconDiv);\n delete this.loadingIconDiv;\n }\n this._resetZoomLayer(/* removeFromDOM = */ true);\n\n this.error = error;\n this.stats = pdfPage.stats;\n if (this.onAfterDraw) {\n this.onAfterDraw();\n }\n this.eventBus.dispatch('pagerendered', {\n source: this,\n pageNumber: this.id,\n cssTransform: false,\n });\n\n if (error) {\n return Promise.reject(error);\n }\n return Promise.resolve(undefined);\n };\n\n let paintTask = this.renderer === RendererType.SVG ?\n this.paintOnSvg(canvasWrapper) :\n this.paintOnCanvas(canvasWrapper);\n paintTask.onRenderContinue = renderContinueCallback;\n this.paintTask = paintTask;\n\n let resultPromise = paintTask.promise.then(function() {\n return finishPaintTask(null).then(function () {\n if (textLayer) {\n let readableStream = pdfPage.streamTextContent({\n normalizeWhitespace: true,\n });\n textLayer.setTextContentStream(readableStream);\n textLayer.render();\n }\n });\n }, function(reason) {\n return finishPaintTask(reason);\n });\n\n if (this.annotationLayerFactory) {\n if (!this.annotationLayer) {\n this.annotationLayer = this.annotationLayerFactory.\n createAnnotationLayerBuilder(div, pdfPage,\n this.renderInteractiveForms, this.l10n);\n }\n this.annotationLayer.render(this.viewport, 'display');\n }\n div.setAttribute('data-loaded', true);\n\n if (this.onBeforeDraw) {\n this.onBeforeDraw();\n }\n return resultPromise;\n }\n\n paintOnCanvas(canvasWrapper) {\n let renderCapability = createPromiseCapability();\n let result = {\n promise: renderCapability.promise,\n onRenderContinue(cont) {\n cont();\n },\n cancel() {\n renderTask.cancel();\n },\n };\n\n let viewport = this.viewport;\n let canvas = document.createElement('canvas');\n canvas.id = this.renderingId;\n\n // Keep the canvas hidden until the first draw callback, or until drawing\n // is complete when `!this.renderingQueue`, to prevent black flickering.\n canvas.setAttribute('hidden', 'hidden');\n let isCanvasHidden = true;\n let showCanvas = function () {\n if (isCanvasHidden) {\n canvas.removeAttribute('hidden');\n isCanvasHidden = false;\n }\n };\n\n canvasWrapper.appendChild(canvas);\n this.canvas = canvas;\n\n if (typeof PDFJSDev === 'undefined' ||\n PDFJSDev.test('MOZCENTRAL || FIREFOX || GENERIC')) {\n canvas.mozOpaque = true;\n }\n\n let ctx = canvas.getContext('2d', { alpha: false, });\n let outputScale = getOutputScale(ctx);\n this.outputScale = outputScale;\n\n if (PDFJS.useOnlyCssZoom) {\n let actualSizeViewport = viewport.clone({ scale: CSS_UNITS, });\n // Use a scale that makes the canvas have the originally intended size\n // of the page.\n outputScale.sx *= actualSizeViewport.width / viewport.width;\n outputScale.sy *= actualSizeViewport.height / viewport.height;\n outputScale.scaled = true;\n }\n\n if (PDFJS.maxCanvasPixels > 0) {\n let pixelsInViewport = viewport.width * viewport.height;\n let maxScale = Math.sqrt(PDFJS.maxCanvasPixels / pixelsInViewport);\n if (outputScale.sx > maxScale || outputScale.sy > maxScale) {\n outputScale.sx = maxScale;\n outputScale.sy = maxScale;\n outputScale.scaled = true;\n this.hasRestrictedScaling = true;\n } else {\n this.hasRestrictedScaling = false;\n }\n }\n\n let sfx = approximateFraction(outputScale.sx);\n let sfy = approximateFraction(outputScale.sy);\n canvas.width = roundToDivide(viewport.width * outputScale.sx, sfx[0]);\n canvas.height = roundToDivide(viewport.height * outputScale.sy, sfy[0]);\n canvas.style.width = roundToDivide(viewport.width, sfx[1]) + 'px';\n canvas.style.height = roundToDivide(viewport.height, sfy[1]) + 'px';\n // Add the viewport so it's known what it was originally drawn with.\n this.paintedViewportMap.set(canvas, viewport);\n\n // Rendering area\n let transform = !outputScale.scaled ? null :\n [outputScale.sx, 0, 0, outputScale.sy, 0, 0];\n let renderContext = {\n canvasContext: ctx,\n transform,\n viewport: this.viewport,\n renderInteractiveForms: this.renderInteractiveForms,\n };\n let renderTask = this.pdfPage.render(renderContext);\n renderTask.onContinue = function (cont) {\n showCanvas();\n if (result.onRenderContinue) {\n result.onRenderContinue(cont);\n } else {\n cont();\n }\n };\n\n renderTask.promise.then(function() {\n showCanvas();\n renderCapability.resolve(undefined);\n }, function(error) {\n showCanvas();\n renderCapability.reject(error);\n });\n return result;\n }\n\n paintOnSvg(wrapper) {\n if (typeof PDFJSDev !== 'undefined' &&\n PDFJSDev.test('FIREFOX || MOZCENTRAL || CHROME')) {\n // Return a mock object, to prevent errors such as e.g.\n // \"TypeError: paintTask.promise is undefined\".\n return {\n promise: Promise.reject(new Error('SVG rendering is not supported.')),\n onRenderContinue(cont) { },\n cancel() { },\n };\n }\n\n let cancelled = false;\n let ensureNotCancelled = () => {\n if (cancelled) {\n if ((typeof PDFJSDev !== 'undefined' &&\n PDFJSDev.test('PDFJS_NEXT')) || PDFJS.pdfjsNext) {\n throw new RenderingCancelledException(\n 'Rendering cancelled, page ' + this.id, 'svg');\n } else {\n throw 'cancelled'; // eslint-disable-line no-throw-literal\n }\n }\n };\n\n let pdfPage = this.pdfPage;\n let actualSizeViewport = this.viewport.clone({ scale: CSS_UNITS, });\n let promise = pdfPage.getOperatorList().then((opList) => {\n ensureNotCancelled();\n let svgGfx = new SVGGraphics(pdfPage.commonObjs, pdfPage.objs);\n return svgGfx.getSVG(opList, actualSizeViewport).then((svg) => {\n ensureNotCancelled();\n this.svg = svg;\n this.paintedViewportMap.set(svg, actualSizeViewport);\n\n svg.style.width = wrapper.style.width;\n svg.style.height = wrapper.style.height;\n this.renderingState = RenderingStates.FINISHED;\n wrapper.appendChild(svg);\n });\n });\n\n return {\n promise,\n onRenderContinue(cont) {\n cont();\n },\n cancel() {\n cancelled = true;\n },\n };\n }\n\n /**\n * @param {string|null} label\n */\n setPageLabel(label) {\n this.pageLabel = (typeof label === 'string' ? label : null);\n\n if (this.pageLabel !== null) {\n this.div.setAttribute('data-page-label', this.pageLabel);\n } else {\n this.div.removeAttribute('data-page-label');\n }\n }\n}\n\nexport {\n PDFPageView,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/pdf_page_view.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { normalizeWheelEventDelta } from './ui_utils';\n\nconst DELAY_BEFORE_RESETTING_SWITCH_IN_PROGRESS = 1500; // in ms\nconst DELAY_BEFORE_HIDING_CONTROLS = 3000; // in ms\nconst ACTIVE_SELECTOR = 'pdfPresentationMode';\nconst CONTROLS_SELECTOR = 'pdfPresentationModeControls';\nconst MOUSE_SCROLL_COOLDOWN_TIME = 50; // in ms\nconst PAGE_SWITCH_THRESHOLD = 0.1;\n\n// Number of CSS pixels for a movement to count as a swipe.\nconst SWIPE_MIN_DISTANCE_THRESHOLD = 50;\n\n// Swipe angle deviation from the x or y axis before it is not\n// considered a swipe in that direction any more.\nconst SWIPE_ANGLE_THRESHOLD = Math.PI / 6;\n\n/**\n * @typedef {Object} PDFPresentationModeOptions\n * @property {HTMLDivElement} container - The container for the viewer element.\n * @property {HTMLDivElement} viewer - (optional) The viewer element.\n * @property {PDFViewer} pdfViewer - The document viewer.\n * @property {EventBus} eventBus - The application event bus.\n * @property {Array} contextMenuItems - (optional) The menuitems that are added\n * to the context menu in Presentation Mode.\n */\n\nclass PDFPresentationMode {\n /**\n * @param {PDFPresentationModeOptions} options\n */\n constructor({ container, viewer = null, pdfViewer, eventBus,\n contextMenuItems = null, }) {\n this.container = container;\n this.viewer = viewer || container.firstElementChild;\n this.pdfViewer = pdfViewer;\n this.eventBus = eventBus;\n\n this.active = false;\n this.args = null;\n this.contextMenuOpen = false;\n this.mouseScrollTimeStamp = 0;\n this.mouseScrollDelta = 0;\n this.touchSwipeState = null;\n\n if (contextMenuItems) {\n contextMenuItems.contextFirstPage.addEventListener('click', () => {\n this.contextMenuOpen = false;\n this.eventBus.dispatch('firstpage');\n });\n contextMenuItems.contextLastPage.addEventListener('click', () => {\n this.contextMenuOpen = false;\n this.eventBus.dispatch('lastpage');\n });\n contextMenuItems.contextPageRotateCw.addEventListener('click', () => {\n this.contextMenuOpen = false;\n this.eventBus.dispatch('rotatecw');\n });\n contextMenuItems.contextPageRotateCcw.addEventListener('click', () => {\n this.contextMenuOpen = false;\n this.eventBus.dispatch('rotateccw');\n });\n }\n }\n\n /**\n * Request the browser to enter fullscreen mode.\n * @returns {boolean} Indicating if the request was successful.\n */\n request() {\n if (this.switchInProgress || this.active || !this.viewer.hasChildNodes()) {\n return false;\n }\n this._addFullscreenChangeListeners();\n this._setSwitchInProgress();\n this._notifyStateChange();\n\n if (this.container.requestFullscreen) {\n this.container.requestFullscreen();\n } else if (this.container.mozRequestFullScreen) {\n this.container.mozRequestFullScreen();\n } else if (this.container.webkitRequestFullscreen) {\n this.container.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);\n } else if (this.container.msRequestFullscreen) {\n this.container.msRequestFullscreen();\n } else {\n return false;\n }\n\n this.args = {\n page: this.pdfViewer.currentPageNumber,\n previousScale: this.pdfViewer.currentScaleValue,\n };\n\n return true;\n }\n\n /**\n * @private\n */\n _mouseWheel(evt) {\n if (!this.active) {\n return;\n }\n\n evt.preventDefault();\n\n let delta = normalizeWheelEventDelta(evt);\n let currentTime = (new Date()).getTime();\n let storedTime = this.mouseScrollTimeStamp;\n\n // If we've already switched page, avoid accidentally switching again.\n if (currentTime > storedTime &&\n currentTime - storedTime < MOUSE_SCROLL_COOLDOWN_TIME) {\n return;\n }\n // If the scroll direction changed, reset the accumulated scroll delta.\n if ((this.mouseScrollDelta > 0 && delta < 0) ||\n (this.mouseScrollDelta < 0 && delta > 0)) {\n this._resetMouseScrollState();\n }\n this.mouseScrollDelta += delta;\n\n if (Math.abs(this.mouseScrollDelta) >= PAGE_SWITCH_THRESHOLD) {\n let totalDelta = this.mouseScrollDelta;\n this._resetMouseScrollState();\n let success = totalDelta > 0 ? this._goToPreviousPage()\n : this._goToNextPage();\n if (success) {\n this.mouseScrollTimeStamp = currentTime;\n }\n }\n }\n\n get isFullscreen() {\n return !!(document.fullscreenElement || document.mozFullScreen ||\n document.webkitIsFullScreen || document.msFullscreenElement);\n }\n\n /**\n * @private\n */\n _goToPreviousPage() {\n let page = this.pdfViewer.currentPageNumber;\n // If we're at the first page, we don't need to do anything.\n if (page <= 1) {\n return false;\n }\n this.pdfViewer.currentPageNumber = (page - 1);\n return true;\n }\n\n /**\n * @private\n */\n _goToNextPage() {\n let page = this.pdfViewer.currentPageNumber;\n // If we're at the last page, we don't need to do anything.\n if (page >= this.pdfViewer.pagesCount) {\n return false;\n }\n this.pdfViewer.currentPageNumber = (page + 1);\n return true;\n }\n\n /**\n * @private\n */\n _notifyStateChange() {\n this.eventBus.dispatch('presentationmodechanged', {\n source: this,\n active: this.active,\n switchInProgress: !!this.switchInProgress,\n });\n }\n\n /**\n * Used to initialize a timeout when requesting Presentation Mode,\n * i.e. when the browser is requested to enter fullscreen mode.\n * This timeout is used to prevent the current page from being scrolled\n * partially, or completely, out of view when entering Presentation Mode.\n * NOTE: This issue seems limited to certain zoom levels (e.g. page-width).\n *\n * @private\n */\n _setSwitchInProgress() {\n if (this.switchInProgress) {\n clearTimeout(this.switchInProgress);\n }\n this.switchInProgress = setTimeout(() => {\n this._removeFullscreenChangeListeners();\n delete this.switchInProgress;\n this._notifyStateChange();\n }, DELAY_BEFORE_RESETTING_SWITCH_IN_PROGRESS);\n }\n\n /**\n * @private\n */\n _resetSwitchInProgress() {\n if (this.switchInProgress) {\n clearTimeout(this.switchInProgress);\n delete this.switchInProgress;\n }\n }\n\n /**\n * @private\n */\n _enter() {\n this.active = true;\n this._resetSwitchInProgress();\n this._notifyStateChange();\n this.container.classList.add(ACTIVE_SELECTOR);\n\n // Ensure that the correct page is scrolled into view when entering\n // Presentation Mode, by waiting until fullscreen mode in enabled.\n setTimeout(() => {\n this.pdfViewer.currentPageNumber = this.args.page;\n this.pdfViewer.currentScaleValue = 'page-fit';\n }, 0);\n\n this._addWindowListeners();\n this._showControls();\n this.contextMenuOpen = false;\n this.container.setAttribute('contextmenu', 'viewerContextMenu');\n\n // Text selection is disabled in Presentation Mode, thus it's not possible\n // for the user to deselect text that is selected (e.g. with \"Select all\")\n // when entering Presentation Mode, hence we remove any active selection.\n window.getSelection().removeAllRanges();\n }\n\n /**\n * @private\n */\n _exit() {\n let page = this.pdfViewer.currentPageNumber;\n this.container.classList.remove(ACTIVE_SELECTOR);\n\n // Ensure that the correct page is scrolled into view when exiting\n // Presentation Mode, by waiting until fullscreen mode is disabled.\n setTimeout(() => {\n this.active = false;\n this._removeFullscreenChangeListeners();\n this._notifyStateChange();\n\n this.pdfViewer.currentScaleValue = this.args.previousScale;\n this.pdfViewer.currentPageNumber = page;\n this.args = null;\n }, 0);\n\n this._removeWindowListeners();\n this._hideControls();\n this._resetMouseScrollState();\n this.container.removeAttribute('contextmenu');\n this.contextMenuOpen = false;\n }\n\n /**\n * @private\n */\n _mouseDown(evt) {\n if (this.contextMenuOpen) {\n this.contextMenuOpen = false;\n evt.preventDefault();\n return;\n }\n if (evt.button === 0) {\n // Enable clicking of links in presentation mode. Note: only links\n // pointing to destinations in the current PDF document work.\n let isInternalLink = (evt.target.href &&\n evt.target.classList.contains('internalLink'));\n if (!isInternalLink) {\n // Unless an internal link was clicked, advance one page.\n evt.preventDefault();\n\n if (evt.shiftKey) {\n this._goToPreviousPage();\n } else {\n this._goToNextPage();\n }\n }\n }\n }\n\n /**\n * @private\n */\n _contextMenu() {\n this.contextMenuOpen = true;\n }\n\n /**\n * @private\n */\n _showControls() {\n if (this.controlsTimeout) {\n clearTimeout(this.controlsTimeout);\n } else {\n this.container.classList.add(CONTROLS_SELECTOR);\n }\n this.controlsTimeout = setTimeout(() => {\n this.container.classList.remove(CONTROLS_SELECTOR);\n delete this.controlsTimeout;\n }, DELAY_BEFORE_HIDING_CONTROLS);\n }\n\n /**\n * @private\n */\n _hideControls() {\n if (!this.controlsTimeout) {\n return;\n }\n clearTimeout(this.controlsTimeout);\n this.container.classList.remove(CONTROLS_SELECTOR);\n delete this.controlsTimeout;\n }\n\n /**\n * Resets the properties used for tracking mouse scrolling events.\n *\n * @private\n */\n _resetMouseScrollState() {\n this.mouseScrollTimeStamp = 0;\n this.mouseScrollDelta = 0;\n }\n\n /**\n * @private\n */\n _touchSwipe(evt) {\n if (!this.active) {\n return;\n }\n if (evt.touches.length > 1) {\n // Multiple touch points detected; cancel the swipe.\n this.touchSwipeState = null;\n return;\n }\n\n switch (evt.type) {\n case 'touchstart':\n this.touchSwipeState = {\n startX: evt.touches[0].pageX,\n startY: evt.touches[0].pageY,\n endX: evt.touches[0].pageX,\n endY: evt.touches[0].pageY,\n };\n break;\n case 'touchmove':\n if (this.touchSwipeState === null) {\n return;\n }\n this.touchSwipeState.endX = evt.touches[0].pageX;\n this.touchSwipeState.endY = evt.touches[0].pageY;\n // Avoid the swipe from triggering browser gestures (Chrome in\n // particular has some sort of swipe gesture in fullscreen mode).\n evt.preventDefault();\n break;\n case 'touchend':\n if (this.touchSwipeState === null) {\n return;\n }\n let delta = 0;\n let dx = this.touchSwipeState.endX - this.touchSwipeState.startX;\n let dy = this.touchSwipeState.endY - this.touchSwipeState.startY;\n let absAngle = Math.abs(Math.atan2(dy, dx));\n if (Math.abs(dx) > SWIPE_MIN_DISTANCE_THRESHOLD &&\n (absAngle <= SWIPE_ANGLE_THRESHOLD ||\n absAngle >= (Math.PI - SWIPE_ANGLE_THRESHOLD))) {\n // Horizontal swipe.\n delta = dx;\n } else if (Math.abs(dy) > SWIPE_MIN_DISTANCE_THRESHOLD &&\n Math.abs(absAngle - (Math.PI / 2)) <= SWIPE_ANGLE_THRESHOLD) {\n // Vertical swipe.\n delta = dy;\n }\n if (delta > 0) {\n this._goToPreviousPage();\n } else if (delta < 0) {\n this._goToNextPage();\n }\n break;\n }\n }\n\n /**\n * @private\n */\n _addWindowListeners() {\n this.showControlsBind = this._showControls.bind(this);\n this.mouseDownBind = this._mouseDown.bind(this);\n this.mouseWheelBind = this._mouseWheel.bind(this);\n this.resetMouseScrollStateBind = this._resetMouseScrollState.bind(this);\n this.contextMenuBind = this._contextMenu.bind(this);\n this.touchSwipeBind = this._touchSwipe.bind(this);\n\n window.addEventListener('mousemove', this.showControlsBind);\n window.addEventListener('mousedown', this.mouseDownBind);\n window.addEventListener('wheel', this.mouseWheelBind);\n window.addEventListener('keydown', this.resetMouseScrollStateBind);\n window.addEventListener('contextmenu', this.contextMenuBind);\n window.addEventListener('touchstart', this.touchSwipeBind);\n window.addEventListener('touchmove', this.touchSwipeBind);\n window.addEventListener('touchend', this.touchSwipeBind);\n }\n\n /**\n * @private\n */\n _removeWindowListeners() {\n window.removeEventListener('mousemove', this.showControlsBind);\n window.removeEventListener('mousedown', this.mouseDownBind);\n window.removeEventListener('wheel', this.mouseWheelBind);\n window.removeEventListener('keydown', this.resetMouseScrollStateBind);\n window.removeEventListener('contextmenu', this.contextMenuBind);\n window.removeEventListener('touchstart', this.touchSwipeBind);\n window.removeEventListener('touchmove', this.touchSwipeBind);\n window.removeEventListener('touchend', this.touchSwipeBind);\n\n delete this.showControlsBind;\n delete this.mouseDownBind;\n delete this.mouseWheelBind;\n delete this.resetMouseScrollStateBind;\n delete this.contextMenuBind;\n delete this.touchSwipeBind;\n }\n\n /**\n * @private\n */\n _fullscreenChange() {\n if (this.isFullscreen) {\n this._enter();\n } else {\n this._exit();\n }\n }\n\n /**\n * @private\n */\n _addFullscreenChangeListeners() {\n this.fullscreenChangeBind = this._fullscreenChange.bind(this);\n\n window.addEventListener('fullscreenchange', this.fullscreenChangeBind);\n window.addEventListener('mozfullscreenchange', this.fullscreenChangeBind);\n if (typeof PDFJSDev === 'undefined' ||\n !PDFJSDev.test('FIREFOX || MOZCENTRAL')) {\n window.addEventListener('webkitfullscreenchange',\n this.fullscreenChangeBind);\n window.addEventListener('MSFullscreenChange',\n this.fullscreenChangeBind);\n }\n }\n\n /**\n * @private\n */\n _removeFullscreenChangeListeners() {\n window.removeEventListener('fullscreenchange', this.fullscreenChangeBind);\n window.removeEventListener('mozfullscreenchange',\n this.fullscreenChangeBind);\n if (typeof PDFJSDev === 'undefined' ||\n !PDFJSDev.test('FIREFOX || MOZCENTRAL')) {\n window.removeEventListener('webkitfullscreenchange',\n this.fullscreenChangeBind);\n window.removeEventListener('MSFullscreenChange',\n this.fullscreenChangeBind);\n }\n\n delete this.fullscreenChangeBind;\n }\n}\n\nexport {\n PDFPresentationMode,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/pdf_presentation_mode.js","/* Copyright 2016 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { NullL10n } from './ui_utils';\nimport { RenderingStates } from './pdf_rendering_queue';\n\nconst UI_NOTIFICATION_CLASS = 'pdfSidebarNotification';\n\nconst SidebarView = {\n NONE: 0,\n THUMBS: 1,\n OUTLINE: 2,\n ATTACHMENTS: 3,\n};\n\n/**\n * @typedef {Object} PDFSidebarOptions\n * @property {PDFViewer} pdfViewer - The document viewer.\n * @property {PDFThumbnailViewer} pdfThumbnailViewer - The thumbnail viewer.\n * @property {PDFOutlineViewer} pdfOutlineViewer - The outline viewer.\n * @property {HTMLDivElement} mainContainer - The main container\n * (in which the viewer element is placed).\n * @property {HTMLDivElement} outerContainer - The outer container\n * (encasing both the viewer and sidebar elements).\n * @property {EventBus} eventBus - The application event bus.\n * @property {HTMLButtonElement} toggleButton - The button used for\n * opening/closing the sidebar.\n * @property {HTMLButtonElement} thumbnailButton - The button used to show\n * the thumbnail view.\n * @property {HTMLButtonElement} outlineButton - The button used to show\n * the outline view.\n * @property {HTMLButtonElement} attachmentsButton - The button used to show\n * the attachments view.\n * @property {HTMLDivElement} thumbnailView - The container in which\n * the thumbnails are placed.\n * @property {HTMLDivElement} outlineView - The container in which\n * the outline is placed.\n * @property {HTMLDivElement} attachmentsView - The container in which\n * the attachments are placed.\n * @property {boolean} disableNotification - (optional) Disable the notification\n * for documents containing outline/attachments. The default value is `false`.\n */\n\nclass PDFSidebar {\n /**\n * @param {PDFSidebarOptions} options\n * @param {IL10n} l10n - Localization service.\n */\n constructor(options, l10n = NullL10n) {\n this.isOpen = false;\n this.active = SidebarView.THUMBS;\n this.isInitialViewSet = false;\n\n /**\n * Callback used when the sidebar has been opened/closed, to ensure that\n * the viewers (PDFViewer/PDFThumbnailViewer) are updated correctly.\n */\n this.onToggled = null;\n\n this.pdfViewer = options.pdfViewer;\n this.pdfThumbnailViewer = options.pdfThumbnailViewer;\n this.pdfOutlineViewer = options.pdfOutlineViewer;\n\n this.mainContainer = options.mainContainer;\n this.outerContainer = options.outerContainer;\n this.eventBus = options.eventBus;\n this.toggleButton = options.toggleButton;\n\n this.thumbnailButton = options.thumbnailButton;\n this.outlineButton = options.outlineButton;\n this.attachmentsButton = options.attachmentsButton;\n\n this.thumbnailView = options.thumbnailView;\n this.outlineView = options.outlineView;\n this.attachmentsView = options.attachmentsView;\n\n this.disableNotification = options.disableNotification || false;\n\n this.l10n = l10n;\n\n this._addEventListeners();\n }\n\n reset() {\n this.isInitialViewSet = false;\n\n this._hideUINotification(null);\n this.switchView(SidebarView.THUMBS);\n\n this.outlineButton.disabled = false;\n this.attachmentsButton.disabled = false;\n }\n\n /**\n * @returns {number} One of the values in {SidebarView}.\n */\n get visibleView() {\n return (this.isOpen ? this.active : SidebarView.NONE);\n }\n\n get isThumbnailViewVisible() {\n return (this.isOpen && this.active === SidebarView.THUMBS);\n }\n\n get isOutlineViewVisible() {\n return (this.isOpen && this.active === SidebarView.OUTLINE);\n }\n\n get isAttachmentsViewVisible() {\n return (this.isOpen && this.active === SidebarView.ATTACHMENTS);\n }\n\n /**\n * @param {number} view - The sidebar view that should become visible,\n * must be one of the values in {SidebarView}.\n */\n setInitialView(view) {\n if (this.isInitialViewSet) {\n return;\n }\n this.isInitialViewSet = true;\n\n if (this.isOpen && view === SidebarView.NONE) {\n this._dispatchEvent();\n // If the user has already manually opened the sidebar,\n // immediately closing it would be bad UX.\n return;\n }\n let isViewPreserved = (view === this.visibleView);\n this.switchView(view, /* forceOpen */ true);\n\n if (isViewPreserved) {\n // Prevent dispatching two back-to-back `sidebarviewchanged` events,\n // since `this.switchView` dispatched the event if the view changed.\n this._dispatchEvent();\n }\n }\n\n /**\n * @param {number} view - The sidebar view that should be switched to,\n * must be one of the values in {SidebarView}.\n * @param {boolean} forceOpen - (optional) Ensure that the sidebar is open.\n * The default value is `false`.\n */\n switchView(view, forceOpen = false) {\n if (view === SidebarView.NONE) {\n this.close();\n return;\n }\n let isViewChanged = (view !== this.active);\n let shouldForceRendering = false;\n\n switch (view) {\n case SidebarView.THUMBS:\n this.thumbnailButton.classList.add('toggled');\n this.outlineButton.classList.remove('toggled');\n this.attachmentsButton.classList.remove('toggled');\n\n this.thumbnailView.classList.remove('hidden');\n this.outlineView.classList.add('hidden');\n this.attachmentsView.classList.add('hidden');\n\n if (this.isOpen && isViewChanged) {\n this._updateThumbnailViewer();\n shouldForceRendering = true;\n }\n break;\n case SidebarView.OUTLINE:\n if (this.outlineButton.disabled) {\n return;\n }\n this.thumbnailButton.classList.remove('toggled');\n this.outlineButton.classList.add('toggled');\n this.attachmentsButton.classList.remove('toggled');\n\n this.thumbnailView.classList.add('hidden');\n this.outlineView.classList.remove('hidden');\n this.attachmentsView.classList.add('hidden');\n break;\n case SidebarView.ATTACHMENTS:\n if (this.attachmentsButton.disabled) {\n return;\n }\n this.thumbnailButton.classList.remove('toggled');\n this.outlineButton.classList.remove('toggled');\n this.attachmentsButton.classList.add('toggled');\n\n this.thumbnailView.classList.add('hidden');\n this.outlineView.classList.add('hidden');\n this.attachmentsView.classList.remove('hidden');\n break;\n default:\n console.error('PDFSidebar_switchView: \"' + view +\n '\" is an unsupported value.');\n return;\n }\n // Update the active view *after* it has been validated above,\n // in order to prevent setting it to an invalid state.\n this.active = view | 0;\n\n if (forceOpen && !this.isOpen) {\n this.open();\n return; // NOTE: Opening will trigger rendering, and dispatch the event.\n }\n if (shouldForceRendering) {\n this._forceRendering();\n }\n if (isViewChanged) {\n this._dispatchEvent();\n }\n this._hideUINotification(this.active);\n }\n\n open() {\n if (this.isOpen) {\n return;\n }\n this.isOpen = true;\n this.toggleButton.classList.add('toggled');\n\n this.outerContainer.classList.add('sidebarMoving');\n this.outerContainer.classList.add('sidebarOpen');\n\n if (this.active === SidebarView.THUMBS) {\n this._updateThumbnailViewer();\n }\n this._forceRendering();\n this._dispatchEvent();\n\n this._hideUINotification(this.active);\n }\n\n close() {\n if (!this.isOpen) {\n return;\n }\n this.isOpen = false;\n this.toggleButton.classList.remove('toggled');\n\n this.outerContainer.classList.add('sidebarMoving');\n this.outerContainer.classList.remove('sidebarOpen');\n\n this._forceRendering();\n this._dispatchEvent();\n }\n\n toggle() {\n if (this.isOpen) {\n this.close();\n } else {\n this.open();\n }\n }\n\n /**\n * @private\n */\n _dispatchEvent() {\n this.eventBus.dispatch('sidebarviewchanged', {\n source: this,\n view: this.visibleView,\n });\n }\n\n /**\n * @private\n */\n _forceRendering() {\n if (this.onToggled) {\n this.onToggled();\n } else { // Fallback\n this.pdfViewer.forceRendering();\n this.pdfThumbnailViewer.forceRendering();\n }\n }\n\n /**\n * @private\n */\n _updateThumbnailViewer() {\n let { pdfViewer, pdfThumbnailViewer, } = this;\n\n // Use the rendered pages to set the corresponding thumbnail images.\n let pagesCount = pdfViewer.pagesCount;\n for (let pageIndex = 0; pageIndex < pagesCount; pageIndex++) {\n let pageView = pdfViewer.getPageView(pageIndex);\n if (pageView && pageView.renderingState === RenderingStates.FINISHED) {\n let thumbnailView = pdfThumbnailViewer.getThumbnail(pageIndex);\n thumbnailView.setImage(pageView);\n }\n }\n pdfThumbnailViewer.scrollThumbnailIntoView(pdfViewer.currentPageNumber);\n }\n\n /**\n * @private\n */\n _showUINotification(view) {\n if (this.disableNotification) {\n return;\n }\n\n this.l10n.get('toggle_sidebar_notification.title', null,\n 'Toggle Sidebar (document contains outline/attachments)').\n then((msg) => {\n this.toggleButton.title = msg;\n });\n\n if (!this.isOpen) {\n // Only show the notification on the `toggleButton` if the sidebar is\n // currently closed, to avoid unnecessarily bothering the user.\n this.toggleButton.classList.add(UI_NOTIFICATION_CLASS);\n } else if (view === this.active) {\n // If the sidebar is currently open *and* the `view` is visible, do not\n // bother the user with a notification on the corresponding button.\n return;\n }\n\n switch (view) {\n case SidebarView.OUTLINE:\n this.outlineButton.classList.add(UI_NOTIFICATION_CLASS);\n break;\n case SidebarView.ATTACHMENTS:\n this.attachmentsButton.classList.add(UI_NOTIFICATION_CLASS);\n break;\n }\n }\n\n /**\n * @private\n */\n _hideUINotification(view) {\n if (this.disableNotification) {\n return;\n }\n\n let removeNotification = (view) => {\n switch (view) {\n case SidebarView.OUTLINE:\n this.outlineButton.classList.remove(UI_NOTIFICATION_CLASS);\n break;\n case SidebarView.ATTACHMENTS:\n this.attachmentsButton.classList.remove(UI_NOTIFICATION_CLASS);\n break;\n }\n };\n\n if (!this.isOpen && view !== null) {\n // Only hide the notifications when the sidebar is currently open,\n // or when it is being reset (i.e. `view === null`).\n return;\n }\n this.toggleButton.classList.remove(UI_NOTIFICATION_CLASS);\n\n if (view !== null) {\n removeNotification(view);\n return;\n }\n for (view in SidebarView) { // Remove all sidebar notifications on reset.\n removeNotification(SidebarView[view]);\n }\n\n this.l10n.get('toggle_sidebar.title', null, 'Toggle Sidebar').\n then((msg) => {\n this.toggleButton.title = msg;\n });\n }\n\n /**\n * @private\n */\n _addEventListeners() {\n this.mainContainer.addEventListener('transitionend', (evt) => {\n if (evt.target === this.mainContainer) {\n this.outerContainer.classList.remove('sidebarMoving');\n }\n });\n\n // Buttons for switching views.\n this.thumbnailButton.addEventListener('click', () => {\n this.switchView(SidebarView.THUMBS);\n });\n\n this.outlineButton.addEventListener('click', () => {\n this.switchView(SidebarView.OUTLINE);\n });\n this.outlineButton.addEventListener('dblclick', () => {\n this.pdfOutlineViewer.toggleOutlineTree();\n });\n\n this.attachmentsButton.addEventListener('click', () => {\n this.switchView(SidebarView.ATTACHMENTS);\n });\n\n // Disable/enable views.\n this.eventBus.on('outlineloaded', (evt) => {\n let outlineCount = evt.outlineCount;\n\n this.outlineButton.disabled = !outlineCount;\n\n if (outlineCount) {\n this._showUINotification(SidebarView.OUTLINE);\n } else if (this.active === SidebarView.OUTLINE) {\n // If the outline view was opened during document load, switch away\n // from it if it turns out that the document has no outline.\n this.switchView(SidebarView.THUMBS);\n }\n });\n\n this.eventBus.on('attachmentsloaded', (evt) => {\n let attachmentsCount = evt.attachmentsCount;\n\n this.attachmentsButton.disabled = !attachmentsCount;\n\n if (attachmentsCount) {\n this._showUINotification(SidebarView.ATTACHMENTS);\n } else if (this.active === SidebarView.ATTACHMENTS) {\n // If the attachment view was opened during document load, switch away\n // from it if it turns out that the document has no attachments.\n this.switchView(SidebarView.THUMBS);\n }\n });\n\n // Update the thumbnailViewer, if visible, when exiting presentation mode.\n this.eventBus.on('presentationmodechanged', (evt) => {\n if (!evt.active && !evt.switchInProgress && this.isThumbnailViewVisible) {\n this._updateThumbnailViewer();\n }\n });\n }\n}\n\nexport {\n SidebarView,\n PDFSidebar,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/pdf_sidebar.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createPromiseCapability, RenderingCancelledException\n} from 'pdfjs-lib';\nimport { getOutputScale, NullL10n } from './ui_utils';\nimport { RenderingStates } from './pdf_rendering_queue';\n\nconst MAX_NUM_SCALING_STEPS = 3;\nconst THUMBNAIL_CANVAS_BORDER_WIDTH = 1; // px\nconst THUMBNAIL_WIDTH = 98; // px\n\n/**\n * @typedef {Object} PDFThumbnailViewOptions\n * @property {HTMLDivElement} container - The viewer element.\n * @property {number} id - The thumbnail's unique ID (normally its number).\n * @property {PageViewport} defaultViewport - The page viewport.\n * @property {IPDFLinkService} linkService - The navigation/linking service.\n * @property {PDFRenderingQueue} renderingQueue - The rendering queue object.\n * @property {boolean} disableCanvasToImageConversion - (optional) Don't convert\n * the canvas thumbnails to images. This prevents `toDataURL` calls,\n * but increases the overall memory usage. The default value is `false`.\n * @property {IL10n} l10n - Localization service.\n */\n\nconst TempImageFactory = (function TempImageFactoryClosure() {\n let tempCanvasCache = null;\n\n return {\n getCanvas(width, height) {\n let tempCanvas = tempCanvasCache;\n if (!tempCanvas) {\n tempCanvas = document.createElement('canvas');\n tempCanvasCache = tempCanvas;\n }\n tempCanvas.width = width;\n tempCanvas.height = height;\n\n // Since this is a temporary canvas, we need to fill it with a white\n // background ourselves. `_getPageDrawContext` uses CSS rules for this.\n if (typeof PDFJSDev === 'undefined' ||\n PDFJSDev.test('MOZCENTRAL || FIREFOX || GENERIC')) {\n tempCanvas.mozOpaque = true;\n }\n\n let ctx = tempCanvas.getContext('2d', { alpha: false, });\n ctx.save();\n ctx.fillStyle = 'rgb(255, 255, 255)';\n ctx.fillRect(0, 0, width, height);\n ctx.restore();\n return tempCanvas;\n },\n\n destroyCanvas() {\n let tempCanvas = tempCanvasCache;\n if (tempCanvas) {\n // Zeroing the width and height causes Firefox to release graphics\n // resources immediately, which can greatly reduce memory consumption.\n tempCanvas.width = 0;\n tempCanvas.height = 0;\n }\n tempCanvasCache = null;\n },\n };\n})();\n\n/**\n * @implements {IRenderableView}\n */\nclass PDFThumbnailView {\n /**\n * @param {PDFThumbnailViewOptions} options\n */\n constructor({ container, id, defaultViewport, linkService, renderingQueue,\n disableCanvasToImageConversion = false, l10n = NullL10n, }) {\n this.id = id;\n this.renderingId = 'thumbnail' + id;\n this.pageLabel = null;\n\n this.pdfPage = null;\n this.rotation = 0;\n this.viewport = defaultViewport;\n this.pdfPageRotate = defaultViewport.rotation;\n\n this.linkService = linkService;\n this.renderingQueue = renderingQueue;\n\n this.renderTask = null;\n this.renderingState = RenderingStates.INITIAL;\n this.resume = null;\n this.disableCanvasToImageConversion = disableCanvasToImageConversion;\n\n this.pageWidth = this.viewport.width;\n this.pageHeight = this.viewport.height;\n this.pageRatio = this.pageWidth / this.pageHeight;\n\n this.canvasWidth = THUMBNAIL_WIDTH;\n this.canvasHeight = (this.canvasWidth / this.pageRatio) | 0;\n this.scale = this.canvasWidth / this.pageWidth;\n\n this.l10n = l10n;\n\n let anchor = document.createElement('a');\n anchor.href = linkService.getAnchorUrl('#page=' + id);\n this.l10n.get('thumb_page_title', { page: id, }, 'Page {{page}}').\n then((msg) => {\n anchor.title = msg;\n });\n anchor.onclick = function() {\n linkService.page = id;\n return false;\n };\n this.anchor = anchor;\n\n let div = document.createElement('div');\n div.className = 'thumbnail';\n div.setAttribute('data-page-number', this.id);\n this.div = div;\n\n if (id === 1) {\n // Highlight the thumbnail of the first page when no page number is\n // specified (or exists in cache) when the document is loaded.\n div.classList.add('selected');\n }\n\n let ring = document.createElement('div');\n ring.className = 'thumbnailSelectionRing';\n let borderAdjustment = 2 * THUMBNAIL_CANVAS_BORDER_WIDTH;\n ring.style.width = this.canvasWidth + borderAdjustment + 'px';\n ring.style.height = this.canvasHeight + borderAdjustment + 'px';\n this.ring = ring;\n\n div.appendChild(ring);\n anchor.appendChild(div);\n container.appendChild(anchor);\n }\n\n setPdfPage(pdfPage) {\n this.pdfPage = pdfPage;\n this.pdfPageRotate = pdfPage.rotate;\n let totalRotation = (this.rotation + this.pdfPageRotate) % 360;\n this.viewport = pdfPage.getViewport(1, totalRotation);\n this.reset();\n }\n\n reset() {\n this.cancelRendering();\n\n this.pageWidth = this.viewport.width;\n this.pageHeight = this.viewport.height;\n this.pageRatio = this.pageWidth / this.pageHeight;\n\n this.canvasHeight = (this.canvasWidth / this.pageRatio) | 0;\n this.scale = (this.canvasWidth / this.pageWidth);\n\n this.div.removeAttribute('data-loaded');\n let ring = this.ring;\n let childNodes = ring.childNodes;\n for (let i = childNodes.length - 1; i >= 0; i--) {\n ring.removeChild(childNodes[i]);\n }\n let borderAdjustment = 2 * THUMBNAIL_CANVAS_BORDER_WIDTH;\n ring.style.width = this.canvasWidth + borderAdjustment + 'px';\n ring.style.height = this.canvasHeight + borderAdjustment + 'px';\n\n if (this.canvas) {\n // Zeroing the width and height causes Firefox to release graphics\n // resources immediately, which can greatly reduce memory consumption.\n this.canvas.width = 0;\n this.canvas.height = 0;\n delete this.canvas;\n }\n if (this.image) {\n this.image.removeAttribute('src');\n delete this.image;\n }\n }\n\n update(rotation) {\n if (typeof rotation !== 'undefined') {\n this.rotation = rotation;\n }\n let totalRotation = (this.rotation + this.pdfPageRotate) % 360;\n this.viewport = this.viewport.clone({\n scale: 1,\n rotation: totalRotation,\n });\n this.reset();\n }\n\n cancelRendering() {\n if (this.renderTask) {\n this.renderTask.cancel();\n this.renderTask = null;\n }\n this.renderingState = RenderingStates.INITIAL;\n this.resume = null;\n }\n\n /**\n * @private\n */\n _getPageDrawContext(noCtxScale = false) {\n let canvas = document.createElement('canvas');\n // Keep the no-thumbnail outline visible, i.e. `data-loaded === false`,\n // until rendering/image conversion is complete, to avoid display issues.\n this.canvas = canvas;\n\n if (typeof PDFJSDev === 'undefined' ||\n PDFJSDev.test('MOZCENTRAL || FIREFOX || GENERIC')) {\n canvas.mozOpaque = true;\n }\n let ctx = canvas.getContext('2d', { alpha: false, });\n let outputScale = getOutputScale(ctx);\n\n canvas.width = (this.canvasWidth * outputScale.sx) | 0;\n canvas.height = (this.canvasHeight * outputScale.sy) | 0;\n canvas.style.width = this.canvasWidth + 'px';\n canvas.style.height = this.canvasHeight + 'px';\n\n if (!noCtxScale && outputScale.scaled) {\n ctx.scale(outputScale.sx, outputScale.sy);\n }\n return ctx;\n }\n\n /**\n * @private\n */\n _convertCanvasToImage() {\n if (!this.canvas) {\n return;\n }\n if (this.renderingState !== RenderingStates.FINISHED) {\n return;\n }\n let id = this.renderingId;\n let className = 'thumbnailImage';\n\n if (this.disableCanvasToImageConversion) {\n this.canvas.id = id;\n this.canvas.className = className;\n this.l10n.get('thumb_page_canvas', { page: this.pageId, },\n 'Thumbnail of Page {{page}}').then((msg) => {\n this.canvas.setAttribute('aria-label', msg);\n });\n\n this.div.setAttribute('data-loaded', true);\n this.ring.appendChild(this.canvas);\n return;\n }\n let image = document.createElement('img');\n image.id = id;\n image.className = className;\n this.l10n.get('thumb_page_canvas', { page: this.pageId, },\n 'Thumbnail of Page {{page}}').\n then((msg) => {\n image.setAttribute('aria-label', msg);\n });\n\n image.style.width = this.canvasWidth + 'px';\n image.style.height = this.canvasHeight + 'px';\n\n image.src = this.canvas.toDataURL();\n this.image = image;\n\n this.div.setAttribute('data-loaded', true);\n this.ring.appendChild(image);\n\n // Zeroing the width and height causes Firefox to release graphics\n // resources immediately, which can greatly reduce memory consumption.\n this.canvas.width = 0;\n this.canvas.height = 0;\n delete this.canvas;\n }\n\n draw() {\n if (this.renderingState !== RenderingStates.INITIAL) {\n console.error('Must be in new state before drawing');\n return Promise.resolve(undefined);\n }\n this.renderingState = RenderingStates.RUNNING;\n\n let renderCapability = createPromiseCapability();\n let finishRenderTask = (error) => {\n // The renderTask may have been replaced by a new one, so only remove\n // the reference to the renderTask if it matches the one that is\n // triggering this callback.\n if (renderTask === this.renderTask) {\n this.renderTask = null;\n }\n\n if (((typeof PDFJSDev === 'undefined' ||\n !PDFJSDev.test('PDFJS_NEXT')) && error === 'cancelled') ||\n error instanceof RenderingCancelledException) {\n renderCapability.resolve(undefined);\n return;\n }\n\n this.renderingState = RenderingStates.FINISHED;\n this._convertCanvasToImage();\n\n if (!error) {\n renderCapability.resolve(undefined);\n } else {\n renderCapability.reject(error);\n }\n };\n\n let ctx = this._getPageDrawContext();\n let drawViewport = this.viewport.clone({ scale: this.scale, });\n let renderContinueCallback = (cont) => {\n if (!this.renderingQueue.isHighestPriority(this)) {\n this.renderingState = RenderingStates.PAUSED;\n this.resume = () => {\n this.renderingState = RenderingStates.RUNNING;\n cont();\n };\n return;\n }\n cont();\n };\n\n let renderContext = {\n canvasContext: ctx,\n viewport: drawViewport,\n };\n let renderTask = this.renderTask = this.pdfPage.render(renderContext);\n renderTask.onContinue = renderContinueCallback;\n\n renderTask.promise.then(function() {\n finishRenderTask(null);\n }, function(error) {\n finishRenderTask(error);\n });\n return renderCapability.promise;\n }\n\n setImage(pageView) {\n if (this.renderingState !== RenderingStates.INITIAL) {\n return;\n }\n let img = pageView.canvas;\n if (!img) {\n return;\n }\n if (!this.pdfPage) {\n this.setPdfPage(pageView.pdfPage);\n }\n\n this.renderingState = RenderingStates.FINISHED;\n\n let ctx = this._getPageDrawContext(true);\n let canvas = ctx.canvas;\n if (img.width <= 2 * canvas.width) {\n ctx.drawImage(img, 0, 0, img.width, img.height,\n 0, 0, canvas.width, canvas.height);\n this._convertCanvasToImage();\n return;\n }\n\n // drawImage does an awful job of rescaling the image, doing it gradually.\n let reducedWidth = canvas.width << MAX_NUM_SCALING_STEPS;\n let reducedHeight = canvas.height << MAX_NUM_SCALING_STEPS;\n let reducedImage = TempImageFactory.getCanvas(reducedWidth,\n reducedHeight);\n let reducedImageCtx = reducedImage.getContext('2d');\n\n while (reducedWidth > img.width || reducedHeight > img.height) {\n reducedWidth >>= 1;\n reducedHeight >>= 1;\n }\n reducedImageCtx.drawImage(img, 0, 0, img.width, img.height,\n 0, 0, reducedWidth, reducedHeight);\n while (reducedWidth > 2 * canvas.width) {\n reducedImageCtx.drawImage(reducedImage,\n 0, 0, reducedWidth, reducedHeight,\n 0, 0, reducedWidth >> 1, reducedHeight >> 1);\n reducedWidth >>= 1;\n reducedHeight >>= 1;\n }\n ctx.drawImage(reducedImage, 0, 0, reducedWidth, reducedHeight,\n 0, 0, canvas.width, canvas.height);\n this._convertCanvasToImage();\n }\n\n get pageId() {\n return (this.pageLabel !== null ? this.pageLabel : this.id);\n }\n\n /**\n * @param {string|null} label\n */\n setPageLabel(label) {\n this.pageLabel = (typeof label === 'string' ? label : null);\n\n this.l10n.get('thumb_page_title', { page: this.pageId, },\n 'Page {{page}}').then((msg) => {\n this.anchor.title = msg;\n });\n\n if (this.renderingState !== RenderingStates.FINISHED) {\n return;\n }\n\n this.l10n.get('thumb_page_canvas', { page: this.pageId, },\n 'Thumbnail of Page {{page}}').then((ariaLabel) => {\n if (this.image) {\n this.image.setAttribute('aria-label', ariaLabel);\n } else if (this.disableCanvasToImageConversion && this.canvas) {\n this.canvas.setAttribute('aria-label', ariaLabel);\n }\n });\n }\n\n static cleanup() {\n TempImageFactory.destroyCanvas();\n }\n}\n\nexport {\n PDFThumbnailView,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/pdf_thumbnail_view.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n getVisibleElements, NullL10n, scrollIntoView, watchScroll\n} from './ui_utils';\nimport { PDFThumbnailView } from './pdf_thumbnail_view';\n\nconst THUMBNAIL_SCROLL_MARGIN = -19;\n\n/**\n * @typedef {Object} PDFThumbnailViewerOptions\n * @property {HTMLDivElement} container - The container for the thumbnail\n * elements.\n * @property {IPDFLinkService} linkService - The navigation/linking service.\n * @property {PDFRenderingQueue} renderingQueue - The rendering queue object.\n * @property {IL10n} l10n - Localization service.\n */\n\n/**\n * Viewer control to display thumbnails for pages in a PDF document.\n *\n * @implements {IRenderableView}\n */\nclass PDFThumbnailViewer {\n /**\n * @param {PDFThumbnailViewerOptions} options\n */\n constructor({ container, linkService, renderingQueue, l10n = NullL10n, }) {\n this.container = container;\n this.linkService = linkService;\n this.renderingQueue = renderingQueue;\n this.l10n = l10n;\n\n this.scroll = watchScroll(this.container, this._scrollUpdated.bind(this));\n this._resetView();\n }\n\n /**\n * @private\n */\n _scrollUpdated() {\n this.renderingQueue.renderHighestPriority();\n }\n\n getThumbnail(index) {\n return this._thumbnails[index];\n }\n\n /**\n * @private\n */\n _getVisibleThumbs() {\n return getVisibleElements(this.container, this._thumbnails);\n }\n\n scrollThumbnailIntoView(page) {\n let selected = document.querySelector('.thumbnail.selected');\n if (selected) {\n selected.classList.remove('selected');\n }\n let thumbnail = document.querySelector(\n 'div.thumbnail[data-page-number=\"' + page + '\"]');\n if (thumbnail) {\n thumbnail.classList.add('selected');\n }\n let visibleThumbs = this._getVisibleThumbs();\n let numVisibleThumbs = visibleThumbs.views.length;\n\n // If the thumbnail isn't currently visible, scroll it into view.\n if (numVisibleThumbs > 0) {\n let first = visibleThumbs.first.id;\n // Account for only one thumbnail being visible.\n let last = (numVisibleThumbs > 1 ? visibleThumbs.last.id : first);\n if (page <= first || page >= last) {\n scrollIntoView(thumbnail, { top: THUMBNAIL_SCROLL_MARGIN, });\n }\n }\n }\n\n get pagesRotation() {\n return this._pagesRotation;\n }\n\n set pagesRotation(rotation) {\n if (!(typeof rotation === 'number' && rotation % 90 === 0)) {\n throw new Error('Invalid thumbnails rotation angle.');\n }\n if (!this.pdfDocument) {\n return;\n }\n this._pagesRotation = rotation;\n\n for (let i = 0, ii = this._thumbnails.length; i < ii; i++) {\n this._thumbnails[i].update(rotation);\n }\n }\n\n cleanup() {\n PDFThumbnailView.cleanup();\n }\n\n /**\n * @private\n */\n _resetView() {\n this._thumbnails = [];\n this._pageLabels = null;\n this._pagesRotation = 0;\n this._pagesRequests = [];\n\n // Remove the thumbnails from the DOM.\n this.container.textContent = '';\n }\n\n setDocument(pdfDocument) {\n if (this.pdfDocument) {\n this._cancelRendering();\n this._resetView();\n }\n\n this.pdfDocument = pdfDocument;\n if (!pdfDocument) {\n return;\n }\n\n pdfDocument.getPage(1).then((firstPage) => {\n let pagesCount = pdfDocument.numPages;\n let viewport = firstPage.getViewport(1.0);\n for (let pageNum = 1; pageNum <= pagesCount; ++pageNum) {\n let thumbnail = new PDFThumbnailView({\n container: this.container,\n id: pageNum,\n defaultViewport: viewport.clone(),\n linkService: this.linkService,\n renderingQueue: this.renderingQueue,\n disableCanvasToImageConversion: false,\n l10n: this.l10n,\n });\n this._thumbnails.push(thumbnail);\n }\n }).catch((reason) => {\n console.error('Unable to initialize thumbnail viewer', reason);\n });\n }\n\n /**\n * @private\n */\n _cancelRendering() {\n for (let i = 0, ii = this._thumbnails.length; i < ii; i++) {\n if (this._thumbnails[i]) {\n this._thumbnails[i].cancelRendering();\n }\n }\n }\n\n /**\n * @param {Array|null} labels\n */\n setPageLabels(labels) {\n if (!this.pdfDocument) {\n return;\n }\n if (!labels) {\n this._pageLabels = null;\n } else if (!(labels instanceof Array &&\n this.pdfDocument.numPages === labels.length)) {\n this._pageLabels = null;\n console.error('PDFThumbnailViewer_setPageLabels: Invalid page labels.');\n } else {\n this._pageLabels = labels;\n }\n // Update all the `PDFThumbnailView` instances.\n for (let i = 0, ii = this._thumbnails.length; i < ii; i++) {\n let label = this._pageLabels && this._pageLabels[i];\n this._thumbnails[i].setPageLabel(label);\n }\n }\n\n /**\n * @param {PDFThumbnailView} thumbView\n * @returns {PDFPage}\n * @private\n */\n _ensurePdfPageLoaded(thumbView) {\n if (thumbView.pdfPage) {\n return Promise.resolve(thumbView.pdfPage);\n }\n let pageNumber = thumbView.id;\n if (this._pagesRequests[pageNumber]) {\n return this._pagesRequests[pageNumber];\n }\n let promise = this.pdfDocument.getPage(pageNumber).then((pdfPage) => {\n thumbView.setPdfPage(pdfPage);\n this._pagesRequests[pageNumber] = null;\n return pdfPage;\n }).catch((reason) => {\n console.error('Unable to get page for thumb view', reason);\n // Page error -- there is nothing can be done.\n this._pagesRequests[pageNumber] = null;\n });\n this._pagesRequests[pageNumber] = promise;\n return promise;\n }\n\n forceRendering() {\n let visibleThumbs = this._getVisibleThumbs();\n let thumbView = this.renderingQueue.getHighestPriority(visibleThumbs,\n this._thumbnails,\n this.scroll.down);\n if (thumbView) {\n this._ensurePdfPageLoaded(thumbView).then(() => {\n this.renderingQueue.renderView(thumbView);\n });\n return true;\n }\n return false;\n }\n}\n\nexport {\n PDFThumbnailViewer,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/pdf_thumbnail_viewer.js","/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createPromiseCapability, PDFJS } from 'pdfjs-lib';\nimport {\n CSS_UNITS, DEFAULT_SCALE, DEFAULT_SCALE_VALUE, getVisibleElements,\n MAX_AUTO_SCALE, NullL10n, RendererType, SCROLLBAR_PADDING, scrollIntoView,\n UNKNOWN_SCALE, VERTICAL_PADDING, watchScroll\n} from './ui_utils';\nimport { PDFRenderingQueue, RenderingStates } from './pdf_rendering_queue';\nimport { AnnotationLayerBuilder } from './annotation_layer_builder';\nimport { getGlobalEventBus } from './dom_events';\nimport { PDFPageView } from './pdf_page_view';\nimport { SimpleLinkService } from './pdf_link_service';\nimport { TextLayerBuilder } from './text_layer_builder';\n\nconst PresentationModeState = {\n UNKNOWN: 0,\n NORMAL: 1,\n CHANGING: 2,\n FULLSCREEN: 3,\n};\n\nconst DEFAULT_CACHE_SIZE = 10;\n\n/**\n * @typedef {Object} PDFViewerOptions\n * @property {HTMLDivElement} container - The container for the viewer element.\n * @property {HTMLDivElement} viewer - (optional) The viewer element.\n * @property {EventBus} eventBus - The application event bus.\n * @property {IPDFLinkService} linkService - The navigation/linking service.\n * @property {DownloadManager} downloadManager - (optional) The download\n * manager component.\n * @property {PDFRenderingQueue} renderingQueue - (optional) The rendering\n * queue object.\n * @property {boolean} removePageBorders - (optional) Removes the border shadow\n * around the pages. The default is false.\n * @property {boolean} enhanceTextSelection - (optional) Enables the improved\n * text selection behaviour. The default is `false`.\n * @property {boolean} renderInteractiveForms - (optional) Enables rendering of\n * interactive form elements. The default is `false`.\n * @property {boolean} enablePrintAutoRotate - (optional) Enables automatic\n * rotation of pages whose orientation differ from the first page upon\n * printing. The default is `false`.\n * @property {string} renderer - 'canvas' or 'svg'. The default is 'canvas'.\n * @property {IL10n} l10n - Localization service.\n */\n\nfunction PDFPageViewBuffer(size) {\n let data = [];\n this.push = function cachePush(view) {\n let i = data.indexOf(view);\n if (i >= 0) {\n data.splice(i, 1);\n }\n data.push(view);\n if (data.length > size) {\n data.shift().destroy();\n }\n };\n this.resize = function (newSize) {\n size = newSize;\n while (data.length > size) {\n data.shift().destroy();\n }\n };\n}\n\nfunction isSameScale(oldScale, newScale) {\n if (newScale === oldScale) {\n return true;\n }\n if (Math.abs(newScale - oldScale) < 1e-15) {\n // Prevent unnecessary re-rendering of all pages when the scale\n // changes only because of limited numerical precision.\n return true;\n }\n return false;\n}\n\nfunction isPortraitOrientation(size) {\n return size.width <= size.height;\n}\n\n/**\n * Simple viewer control to display PDF content/pages.\n * @implements {IRenderableView}\n */\nclass PDFViewer {\n /**\n * @param {PDFViewerOptions} options\n */\n constructor(options) {\n this.container = options.container;\n this.viewer = options.viewer || options.container.firstElementChild;\n this.eventBus = options.eventBus || getGlobalEventBus();\n this.linkService = options.linkService || new SimpleLinkService();\n this.downloadManager = options.downloadManager || null;\n this.removePageBorders = options.removePageBorders || false;\n this.enhanceTextSelection = options.enhanceTextSelection || false;\n this.renderInteractiveForms = options.renderInteractiveForms || false;\n this.enablePrintAutoRotate = options.enablePrintAutoRotate || false;\n this.renderer = options.renderer || RendererType.CANVAS;\n this.l10n = options.l10n || NullL10n;\n\n this.defaultRenderingQueue = !options.renderingQueue;\n if (this.defaultRenderingQueue) {\n // Custom rendering queue is not specified, using default one\n this.renderingQueue = new PDFRenderingQueue();\n this.renderingQueue.setViewer(this);\n } else {\n this.renderingQueue = options.renderingQueue;\n }\n\n this.scroll = watchScroll(this.container, this._scrollUpdate.bind(this));\n this.presentationModeState = PresentationModeState.UNKNOWN;\n this._resetView();\n\n if (this.removePageBorders) {\n this.viewer.classList.add('removePageBorders');\n }\n }\n\n get pagesCount() {\n return this._pages.length;\n }\n\n getPageView(index) {\n return this._pages[index];\n }\n\n /**\n * @returns {boolean} true if all {PDFPageView} objects are initialized.\n */\n get pageViewsReady() {\n return this._pageViewsReady;\n }\n\n /**\n * @returns {number}\n */\n get currentPageNumber() {\n return this._currentPageNumber;\n }\n\n /**\n * @param {number} val - The page number.\n */\n set currentPageNumber(val) {\n if ((val | 0) !== val) { // Ensure that `val` is an integer.\n throw new Error('Invalid page number.');\n }\n if (!this.pdfDocument) {\n return;\n }\n // The intent can be to just reset a scroll position and/or scale.\n this._setCurrentPageNumber(val, /* resetCurrentPageView = */ true);\n }\n\n /**\n * @private\n */\n _setCurrentPageNumber(val, resetCurrentPageView = false) {\n if (this._currentPageNumber === val) {\n if (resetCurrentPageView) {\n this._resetCurrentPageView();\n }\n return;\n }\n\n if (!(0 < val && val <= this.pagesCount)) {\n console.error(\n `PDFViewer._setCurrentPageNumber: \"${val}\" is out of bounds.`);\n return;\n }\n\n let arg = {\n source: this,\n pageNumber: val,\n pageLabel: this._pageLabels && this._pageLabels[val - 1],\n };\n this._currentPageNumber = val;\n this.eventBus.dispatch('pagechanging', arg);\n this.eventBus.dispatch('pagechange', arg);\n\n if (resetCurrentPageView) {\n this._resetCurrentPageView();\n }\n }\n\n /**\n * @returns {string|null} Returns the current page label,\n * or `null` if no page labels exist.\n */\n get currentPageLabel() {\n return this._pageLabels && this._pageLabels[this._currentPageNumber - 1];\n }\n\n /**\n * @param {string} val - The page label.\n */\n set currentPageLabel(val) {\n let pageNumber = val | 0; // Fallback page number.\n if (this._pageLabels) {\n let i = this._pageLabels.indexOf(val);\n if (i >= 0) {\n pageNumber = i + 1;\n }\n }\n this.currentPageNumber = pageNumber;\n }\n\n /**\n * @returns {number}\n */\n get currentScale() {\n return this._currentScale !== UNKNOWN_SCALE ? this._currentScale :\n DEFAULT_SCALE;\n }\n\n /**\n * @param {number} val - Scale of the pages in percents.\n */\n set currentScale(val) {\n if (isNaN(val)) {\n throw new Error('Invalid numeric scale');\n }\n if (!this.pdfDocument) {\n return;\n }\n this._setScale(val, false);\n }\n\n /**\n * @returns {string}\n */\n get currentScaleValue() {\n return this._currentScaleValue;\n }\n\n /**\n * @param val - The scale of the pages (in percent or predefined value).\n */\n set currentScaleValue(val) {\n if (!this.pdfDocument) {\n return;\n }\n this._setScale(val, false);\n }\n\n /**\n * @returns {number}\n */\n get pagesRotation() {\n return this._pagesRotation;\n }\n\n /**\n * @param {number} rotation - The rotation of the pages (0, 90, 180, 270).\n */\n set pagesRotation(rotation) {\n if (!(typeof rotation === 'number' && rotation % 90 === 0)) {\n throw new Error('Invalid pages rotation angle.');\n }\n if (!this.pdfDocument) {\n return;\n }\n this._pagesRotation = rotation;\n\n for (let i = 0, ii = this._pages.length; i < ii; i++) {\n let pageView = this._pages[i];\n pageView.update(pageView.scale, rotation);\n }\n\n this._setScale(this._currentScaleValue, true);\n\n if (this.defaultRenderingQueue) {\n this.update();\n }\n }\n\n /**\n * @param pdfDocument {PDFDocument}\n */\n setDocument(pdfDocument) {\n if (this.pdfDocument) {\n this._cancelRendering();\n this._resetView();\n }\n\n this.pdfDocument = pdfDocument;\n if (!pdfDocument) {\n return;\n }\n let pagesCount = pdfDocument.numPages;\n\n let pagesCapability = createPromiseCapability();\n this.pagesPromise = pagesCapability.promise;\n\n pagesCapability.promise.then(() => {\n this._pageViewsReady = true;\n this.eventBus.dispatch('pagesloaded', {\n source: this,\n pagesCount,\n });\n });\n\n let isOnePageRenderedResolved = false;\n let onePageRenderedCapability = createPromiseCapability();\n this.onePageRendered = onePageRenderedCapability.promise;\n\n let bindOnAfterAndBeforeDraw = (pageView) => {\n pageView.onBeforeDraw = () => {\n // Add the page to the buffer at the start of drawing. That way it can\n // be evicted from the buffer and destroyed even if we pause its\n // rendering.\n this._buffer.push(pageView);\n };\n pageView.onAfterDraw = () => {\n if (!isOnePageRenderedResolved) {\n isOnePageRenderedResolved = true;\n onePageRenderedCapability.resolve();\n }\n };\n };\n\n let firstPagePromise = pdfDocument.getPage(1);\n this.firstPagePromise = firstPagePromise;\n\n // Fetch a single page so we can get a viewport that will be the default\n // viewport for all pages\n firstPagePromise.then((pdfPage) => {\n let scale = this.currentScale;\n let viewport = pdfPage.getViewport(scale * CSS_UNITS);\n for (let pageNum = 1; pageNum <= pagesCount; ++pageNum) {\n let textLayerFactory = null;\n if (!PDFJS.disableTextLayer) {\n textLayerFactory = this;\n }\n let pageView = new PDFPageView({\n container: this.viewer,\n eventBus: this.eventBus,\n id: pageNum,\n scale,\n defaultViewport: viewport.clone(),\n renderingQueue: this.renderingQueue,\n textLayerFactory,\n annotationLayerFactory: this,\n enhanceTextSelection: this.enhanceTextSelection,\n renderInteractiveForms: this.renderInteractiveForms,\n renderer: this.renderer,\n l10n: this.l10n,\n });\n bindOnAfterAndBeforeDraw(pageView);\n this._pages.push(pageView);\n }\n\n // Fetch all the pages since the viewport is needed before printing\n // starts to create the correct size canvas. Wait until one page is\n // rendered so we don't tie up too many resources early on.\n onePageRenderedCapability.promise.then(() => {\n if (PDFJS.disableAutoFetch) {\n // XXX: Printing is semi-broken with auto fetch disabled.\n pagesCapability.resolve();\n return;\n }\n let getPagesLeft = pagesCount;\n for (let pageNum = 1; pageNum <= pagesCount; ++pageNum) {\n pdfDocument.getPage(pageNum).then((pdfPage) => {\n let pageView = this._pages[pageNum - 1];\n if (!pageView.pdfPage) {\n pageView.setPdfPage(pdfPage);\n }\n this.linkService.cachePageRef(pageNum, pdfPage.ref);\n if (--getPagesLeft === 0) {\n pagesCapability.resolve();\n }\n }, (reason) => {\n console.error(`Unable to get page ${pageNum} to initialize viewer`,\n reason);\n if (--getPagesLeft === 0) {\n pagesCapability.resolve();\n }\n });\n }\n });\n\n this.eventBus.dispatch('pagesinit', { source: this, });\n\n if (this.defaultRenderingQueue) {\n this.update();\n }\n\n if (this.findController) {\n this.findController.resolveFirstPage();\n }\n }).catch((reason) => {\n console.error('Unable to initialize viewer', reason);\n });\n }\n\n /**\n * @param {Array|null} labels\n */\n setPageLabels(labels) {\n if (!this.pdfDocument) {\n return;\n }\n if (!labels) {\n this._pageLabels = null;\n } else if (!(labels instanceof Array &&\n this.pdfDocument.numPages === labels.length)) {\n this._pageLabels = null;\n console.error('PDFViewer.setPageLabels: Invalid page labels.');\n } else {\n this._pageLabels = labels;\n }\n // Update all the `PDFPageView` instances.\n for (let i = 0, ii = this._pages.length; i < ii; i++) {\n let pageView = this._pages[i];\n let label = this._pageLabels && this._pageLabels[i];\n pageView.setPageLabel(label);\n }\n }\n\n _resetView() {\n this._pages = [];\n this._currentPageNumber = 1;\n this._currentScale = UNKNOWN_SCALE;\n this._currentScaleValue = null;\n this._pageLabels = null;\n this._buffer = new PDFPageViewBuffer(DEFAULT_CACHE_SIZE);\n this._location = null;\n this._pagesRotation = 0;\n this._pagesRequests = [];\n this._pageViewsReady = false;\n\n // Remove the pages from the DOM.\n this.viewer.textContent = '';\n }\n\n _scrollUpdate() {\n if (this.pagesCount === 0) {\n return;\n }\n this.update();\n }\n\n _setScaleDispatchEvent(newScale, newValue, preset = false) {\n let arg = {\n source: this,\n scale: newScale,\n presetValue: preset ? newValue : undefined,\n };\n this.eventBus.dispatch('scalechanging', arg);\n this.eventBus.dispatch('scalechange', arg);\n }\n\n _setScaleUpdatePages(newScale, newValue, noScroll = false, preset = false) {\n this._currentScaleValue = newValue.toString();\n\n if (isSameScale(this._currentScale, newScale)) {\n if (preset) {\n this._setScaleDispatchEvent(newScale, newValue, true);\n }\n return;\n }\n\n for (let i = 0, ii = this._pages.length; i < ii; i++) {\n this._pages[i].update(newScale);\n }\n this._currentScale = newScale;\n\n if (!noScroll) {\n let page = this._currentPageNumber, dest;\n if (this._location && !PDFJS.ignoreCurrentPositionOnZoom &&\n !(this.isInPresentationMode || this.isChangingPresentationMode)) {\n page = this._location.pageNumber;\n dest = [null, { name: 'XYZ', }, this._location.left,\n this._location.top, null];\n }\n this.scrollPageIntoView({\n pageNumber: page,\n destArray: dest,\n allowNegativeOffset: true,\n });\n }\n\n this._setScaleDispatchEvent(newScale, newValue, preset);\n\n if (this.defaultRenderingQueue) {\n this.update();\n }\n }\n\n _setScale(value, noScroll = false) {\n let scale = parseFloat(value);\n\n if (scale > 0) {\n this._setScaleUpdatePages(scale, value, noScroll, /* preset = */ false);\n } else {\n let currentPage = this._pages[this._currentPageNumber - 1];\n if (!currentPage) {\n return;\n }\n let hPadding = (this.isInPresentationMode || this.removePageBorders) ?\n 0 : SCROLLBAR_PADDING;\n let vPadding = (this.isInPresentationMode || this.removePageBorders) ?\n 0 : VERTICAL_PADDING;\n let pageWidthScale = (this.container.clientWidth - hPadding) /\n currentPage.width * currentPage.scale;\n let pageHeightScale = (this.container.clientHeight - vPadding) /\n currentPage.height * currentPage.scale;\n switch (value) {\n case 'page-actual':\n scale = 1;\n break;\n case 'page-width':\n scale = pageWidthScale;\n break;\n case 'page-height':\n scale = pageHeightScale;\n break;\n case 'page-fit':\n scale = Math.min(pageWidthScale, pageHeightScale);\n break;\n case 'auto':\n let isLandscape = (currentPage.width > currentPage.height);\n // For pages in landscape mode, fit the page height to the viewer\n // *unless* the page would thus become too wide to fit horizontally.\n let horizontalScale = isLandscape ?\n Math.min(pageHeightScale, pageWidthScale) : pageWidthScale;\n scale = Math.min(MAX_AUTO_SCALE, horizontalScale);\n break;\n default:\n console.error(\n `PDFViewer._setScale: \"${value}\" is an unknown zoom value.`);\n return;\n }\n this._setScaleUpdatePages(scale, value, noScroll, /* preset = */ true);\n }\n }\n\n /**\n * Refreshes page view: scrolls to the current page and updates the scale.\n * @private\n */\n _resetCurrentPageView() {\n if (this.isInPresentationMode) {\n // Fixes the case when PDF has different page sizes.\n this._setScale(this._currentScaleValue, true);\n }\n\n let pageView = this._pages[this._currentPageNumber - 1];\n scrollIntoView(pageView.div);\n }\n\n /**\n * @typedef ScrollPageIntoViewParameters\n * @property {number} pageNumber - The page number.\n * @property {Array} destArray - (optional) The original PDF destination\n * array, in the format: <page-ref> </XYZ|/FitXXX> <args..>\n * @property {boolean} allowNegativeOffset - (optional) Allow negative page\n * offsets. The default value is `false`.\n */\n\n /**\n * Scrolls page into view.\n * @param {ScrollPageIntoViewParameters} params\n */\n scrollPageIntoView(params) {\n if (!this.pdfDocument) {\n return;\n }\n if ((typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) &&\n (arguments.length > 1 || typeof params === 'number')) {\n console.warn('Call of scrollPageIntoView() with obsolete signature.');\n let paramObj = {};\n if (typeof params === 'number') {\n paramObj.pageNumber = params; // pageNumber argument was found.\n }\n if (arguments[1] instanceof Array) {\n paramObj.destArray = arguments[1]; // destArray argument was found.\n }\n params = paramObj;\n }\n let pageNumber = params.pageNumber || 0;\n let dest = params.destArray || null;\n let allowNegativeOffset = params.allowNegativeOffset || false;\n\n if (this.isInPresentationMode || !dest) {\n this._setCurrentPageNumber(pageNumber, /* resetCurrentPageView = */ true);\n return;\n }\n\n let pageView = this._pages[pageNumber - 1];\n if (!pageView) {\n console.error(\n 'PDFViewer.scrollPageIntoView: Invalid \"pageNumber\" parameter.');\n return;\n }\n let x = 0, y = 0;\n let width = 0, height = 0, widthScale, heightScale;\n let changeOrientation = (pageView.rotation % 180 === 0 ? false : true);\n let pageWidth = (changeOrientation ? pageView.height : pageView.width) /\n pageView.scale / CSS_UNITS;\n let pageHeight = (changeOrientation ? pageView.width : pageView.height) /\n pageView.scale / CSS_UNITS;\n let scale = 0;\n switch (dest[1].name) {\n case 'XYZ':\n x = dest[2];\n y = dest[3];\n scale = dest[4];\n // If x and/or y coordinates are not supplied, default to\n // _top_ left of the page (not the obvious bottom left,\n // since aligning the bottom of the intended page with the\n // top of the window is rarely helpful).\n x = x !== null ? x : 0;\n y = y !== null ? y : pageHeight;\n break;\n case 'Fit':\n case 'FitB':\n scale = 'page-fit';\n break;\n case 'FitH':\n case 'FitBH':\n y = dest[2];\n scale = 'page-width';\n // According to the PDF spec, section 12.3.2.2, a `null` value in the\n // parameter should maintain the position relative to the new page.\n if (y === null && this._location) {\n x = this._location.left;\n y = this._location.top;\n }\n break;\n case 'FitV':\n case 'FitBV':\n x = dest[2];\n width = pageWidth;\n height = pageHeight;\n scale = 'page-height';\n break;\n case 'FitR':\n x = dest[2];\n y = dest[3];\n width = dest[4] - x;\n height = dest[5] - y;\n let hPadding = this.removePageBorders ? 0 : SCROLLBAR_PADDING;\n let vPadding = this.removePageBorders ? 0 : VERTICAL_PADDING;\n\n widthScale = (this.container.clientWidth - hPadding) /\n width / CSS_UNITS;\n heightScale = (this.container.clientHeight - vPadding) /\n height / CSS_UNITS;\n scale = Math.min(Math.abs(widthScale), Math.abs(heightScale));\n break;\n default:\n console.error(`PDFViewer.scrollPageIntoView: \"${dest[1].name}\" ` +\n 'is not a valid destination type.');\n return;\n }\n\n if (scale && scale !== this._currentScale) {\n this.currentScaleValue = scale;\n } else if (this._currentScale === UNKNOWN_SCALE) {\n this.currentScaleValue = DEFAULT_SCALE_VALUE;\n }\n\n if (scale === 'page-fit' && !dest[4]) {\n scrollIntoView(pageView.div);\n return;\n }\n\n let boundingRect = [\n pageView.viewport.convertToViewportPoint(x, y),\n pageView.viewport.convertToViewportPoint(x + width, y + height)\n ];\n let left = Math.min(boundingRect[0][0], boundingRect[1][0]);\n let top = Math.min(boundingRect[0][1], boundingRect[1][1]);\n\n if (!allowNegativeOffset) {\n // Some bad PDF generators will create destinations with e.g. top values\n // that exceeds the page height. Ensure that offsets are not negative,\n // to prevent a previous page from becoming visible (fixes bug 874482).\n left = Math.max(left, 0);\n top = Math.max(top, 0);\n }\n scrollIntoView(pageView.div, { left, top, });\n }\n\n _updateLocation(firstPage) {\n let currentScale = this._currentScale;\n let currentScaleValue = this._currentScaleValue;\n let normalizedScaleValue =\n parseFloat(currentScaleValue) === currentScale ?\n Math.round(currentScale * 10000) / 100 : currentScaleValue;\n\n let pageNumber = firstPage.id;\n let pdfOpenParams = '#page=' + pageNumber;\n pdfOpenParams += '&zoom=' + normalizedScaleValue;\n let currentPageView = this._pages[pageNumber - 1];\n let container = this.container;\n let topLeft = currentPageView.getPagePoint(\n (container.scrollLeft - firstPage.x),\n (container.scrollTop - firstPage.y));\n let intLeft = Math.round(topLeft[0]);\n let intTop = Math.round(topLeft[1]);\n pdfOpenParams += ',' + intLeft + ',' + intTop;\n\n this._location = {\n pageNumber,\n scale: normalizedScaleValue,\n top: intTop,\n left: intLeft,\n pdfOpenParams,\n };\n }\n\n update() {\n let visible = this._getVisiblePages();\n let visiblePages = visible.views;\n if (visiblePages.length === 0) {\n return;\n }\n\n let suggestedCacheSize = Math.max(DEFAULT_CACHE_SIZE,\n 2 * visiblePages.length + 1);\n this._buffer.resize(suggestedCacheSize);\n\n this.renderingQueue.renderHighestPriority(visible);\n\n let currentId = this._currentPageNumber;\n let firstPage = visible.first;\n let stillFullyVisible = false;\n\n for (let i = 0, ii = visiblePages.length; i < ii; ++i) {\n let page = visiblePages[i];\n\n if (page.percent < 100) {\n break;\n }\n if (page.id === currentId) {\n stillFullyVisible = true;\n break;\n }\n }\n\n if (!stillFullyVisible) {\n currentId = visiblePages[0].id;\n }\n\n if (!this.isInPresentationMode) {\n this._setCurrentPageNumber(currentId);\n }\n\n this._updateLocation(firstPage);\n\n this.eventBus.dispatch('updateviewarea', {\n source: this,\n location: this._location,\n });\n }\n\n containsElement(element) {\n return this.container.contains(element);\n }\n\n focus() {\n this.container.focus();\n }\n\n get isInPresentationMode() {\n return this.presentationModeState === PresentationModeState.FULLSCREEN;\n }\n\n get isChangingPresentationMode() {\n return this.presentationModeState === PresentationModeState.CHANGING;\n }\n\n get isHorizontalScrollbarEnabled() {\n return (this.isInPresentationMode ?\n false : (this.container.scrollWidth > this.container.clientWidth));\n }\n\n _getVisiblePages() {\n if (!this.isInPresentationMode) {\n return getVisibleElements(this.container, this._pages, true);\n }\n // The algorithm in getVisibleElements doesn't work in all browsers and\n // configurations when presentation mode is active.\n let visible = [];\n let currentPage = this._pages[this._currentPageNumber - 1];\n visible.push({ id: currentPage.id, view: currentPage, });\n return { first: currentPage, last: currentPage, views: visible, };\n }\n\n cleanup() {\n for (let i = 0, ii = this._pages.length; i < ii; i++) {\n if (this._pages[i] &&\n this._pages[i].renderingState !== RenderingStates.FINISHED) {\n this._pages[i].reset();\n }\n }\n }\n\n /**\n * @private\n */\n _cancelRendering() {\n for (let i = 0, ii = this._pages.length; i < ii; i++) {\n if (this._pages[i]) {\n this._pages[i].cancelRendering();\n }\n }\n }\n\n /**\n * @param {PDFPageView} pageView\n * @returns {Promise} Returns a promise containing a {PDFPageProxy} object.\n * @private\n */\n _ensurePdfPageLoaded(pageView) {\n if (pageView.pdfPage) {\n return Promise.resolve(pageView.pdfPage);\n }\n let pageNumber = pageView.id;\n if (this._pagesRequests[pageNumber]) {\n return this._pagesRequests[pageNumber];\n }\n let promise = this.pdfDocument.getPage(pageNumber).then((pdfPage) => {\n if (!pageView.pdfPage) {\n pageView.setPdfPage(pdfPage);\n }\n this._pagesRequests[pageNumber] = null;\n return pdfPage;\n }).catch((reason) => {\n console.error('Unable to get page for page view', reason);\n // Page error -- there is nothing can be done.\n this._pagesRequests[pageNumber] = null;\n });\n this._pagesRequests[pageNumber] = promise;\n return promise;\n }\n\n forceRendering(currentlyVisiblePages) {\n let visiblePages = currentlyVisiblePages || this._getVisiblePages();\n let pageView = this.renderingQueue.getHighestPriority(visiblePages,\n this._pages,\n this.scroll.down);\n if (pageView) {\n this._ensurePdfPageLoaded(pageView).then(() => {\n this.renderingQueue.renderView(pageView);\n });\n return true;\n }\n return false;\n }\n\n getPageTextContent(pageIndex) {\n return this.pdfDocument.getPage(pageIndex + 1).then(function(page) {\n return page.getTextContent({\n normalizeWhitespace: true,\n });\n });\n }\n\n /**\n * @param {HTMLDivElement} textLayerDiv\n * @param {number} pageIndex\n * @param {PageViewport} viewport\n * @returns {TextLayerBuilder}\n */\n createTextLayerBuilder(textLayerDiv, pageIndex, viewport,\n enhanceTextSelection = false) {\n return new TextLayerBuilder({\n textLayerDiv,\n eventBus: this.eventBus,\n pageIndex,\n viewport,\n findController: this.isInPresentationMode ? null : this.findController,\n enhanceTextSelection: this.isInPresentationMode ? false :\n enhanceTextSelection,\n });\n }\n\n /**\n * @param {HTMLDivElement} pageDiv\n * @param {PDFPage} pdfPage\n * @param {boolean} renderInteractiveForms\n * @param {IL10n} l10n\n * @returns {AnnotationLayerBuilder}\n */\n createAnnotationLayerBuilder(pageDiv, pdfPage, renderInteractiveForms = false,\n l10n = NullL10n) {\n return new AnnotationLayerBuilder({\n pageDiv,\n pdfPage,\n renderInteractiveForms,\n linkService: this.linkService,\n downloadManager: this.downloadManager,\n l10n,\n });\n }\n\n setFindController(findController) {\n this.findController = findController;\n }\n\n /**\n * @returns {boolean} Whether all pages of the PDF document have identical\n * widths and heights.\n */\n get hasEqualPageSizes() {\n let firstPageView = this._pages[0];\n for (let i = 1, ii = this._pages.length; i < ii; ++i) {\n let pageView = this._pages[i];\n if (pageView.width !== firstPageView.width ||\n pageView.height !== firstPageView.height) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Returns sizes of the pages.\n * @returns {Array} Array of objects with width/height/rotation fields.\n */\n getPagesOverview() {\n let pagesOverview = this._pages.map(function(pageView) {\n let viewport = pageView.pdfPage.getViewport(1);\n return {\n width: viewport.width,\n height: viewport.height,\n rotation: viewport.rotation,\n };\n });\n if (!this.enablePrintAutoRotate) {\n return pagesOverview;\n }\n let isFirstPagePortrait = isPortraitOrientation(pagesOverview[0]);\n return pagesOverview.map(function (size) {\n if (isFirstPagePortrait === isPortraitOrientation(size)) {\n return size;\n }\n return {\n width: size.height,\n height: size.width,\n rotation: (size.rotation + 90) % 360,\n };\n });\n }\n}\n\nexport {\n PresentationModeState,\n PDFViewer,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/pdf_viewer.js","/* Copyright 2013 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { cloneObj } from './ui_utils';\n\nvar defaultPreferences = null;\nfunction getDefaultPreferences() {\n if (!defaultPreferences) {\n if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('PRODUCTION')) {\n defaultPreferences = Promise.resolve(\n PDFJSDev.json('$ROOT/web/default_preferences.json'));\n } else {\n defaultPreferences = new Promise(function (resolve) {\n var xhr = new XMLHttpRequest();\n xhr.open('GET', 'default_preferences.json');\n xhr.onload = xhr.onerror = function loaded() {\n try {\n resolve(JSON.parse(xhr.responseText));\n } catch (e) {\n console.error(`Unable to load default preferences: ${e}`);\n resolve({});\n }\n };\n xhr.send();\n });\n }\n }\n return defaultPreferences;\n}\n\n/**\n * BasePreferences - Abstract base class for storing persistent settings.\n * Used for settings that should be applied to all opened documents,\n * or every time the viewer is loaded.\n */\nclass BasePreferences {\n constructor() {\n if (this.constructor === BasePreferences) {\n throw new Error('Cannot initialize BasePreferences.');\n }\n this.prefs = null;\n\n this._initializedPromise = getDefaultPreferences().then((defaults) => {\n Object.defineProperty(this, 'defaults', {\n value: Object.freeze(defaults),\n writable: false,\n enumerable: true,\n configurable: false,\n });\n\n this.prefs = cloneObj(defaults);\n return this._readFromStorage(defaults);\n }).then((prefObj) => {\n if (prefObj) {\n this.prefs = prefObj;\n }\n });\n }\n\n /**\n * Stub function for writing preferences to storage.\n * @param {Object} prefObj The preferences that should be written to storage.\n * @return {Promise} A promise that is resolved when the preference values\n * have been written.\n */\n _writeToStorage(prefObj) {\n return Promise.reject(new Error('Not implemented: _writeToStorage'));\n }\n\n /**\n * Stub function for reading preferences from storage.\n * @param {Object} prefObj The preferences that should be read from storage.\n * @return {Promise} A promise that is resolved with an {Object} containing\n * the preferences that have been read.\n */\n _readFromStorage(prefObj) {\n return Promise.reject(new Error('Not implemented: _readFromStorage'));\n }\n\n /**\n * Reset the preferences to their default values and update storage.\n * @return {Promise} A promise that is resolved when the preference values\n * have been reset.\n */\n reset() {\n return this._initializedPromise.then(() => {\n this.prefs = cloneObj(this.defaults);\n return this._writeToStorage(this.defaults);\n });\n }\n\n /**\n * Replace the current preference values with the ones from storage.\n * @return {Promise} A promise that is resolved when the preference values\n * have been updated.\n */\n reload() {\n return this._initializedPromise.then(() => {\n return this._readFromStorage(this.defaults);\n }).then((prefObj) => {\n if (prefObj) {\n this.prefs = prefObj;\n }\n });\n }\n\n /**\n * Set the value of a preference.\n * @param {string} name The name of the preference that should be changed.\n * @param {boolean|number|string} value The new value of the preference.\n * @return {Promise} A promise that is resolved when the value has been set,\n * provided that the preference exists and the types match.\n */\n set(name, value) {\n return this._initializedPromise.then(() => {\n if (this.defaults[name] === undefined) {\n throw new Error(`Set preference: \"${name}\" is undefined.`);\n } else if (value === undefined) {\n throw new Error('Set preference: no value is specified.');\n }\n var valueType = typeof value;\n var defaultType = typeof this.defaults[name];\n\n if (valueType !== defaultType) {\n if (valueType === 'number' && defaultType === 'string') {\n value = value.toString();\n } else {\n throw new Error(`Set preference: \"${value}\" is a ${valueType}, ` +\n `expected a ${defaultType}.`);\n }\n } else {\n if (valueType === 'number' && (value | 0) !== value) {\n throw new Error(`Set preference: \"${value}\" must be an integer.`);\n }\n }\n this.prefs[name] = value;\n return this._writeToStorage(this.prefs);\n });\n }\n\n /**\n * Get the value of a preference.\n * @param {string} name The name of the preference whose value is requested.\n * @return {Promise} A promise that is resolved with a {boolean|number|string}\n * containing the value of the preference.\n */\n get(name) {\n return this._initializedPromise.then(() => {\n var defaultValue = this.defaults[name];\n\n if (defaultValue === undefined) {\n throw new Error(`Get preference: \"${name}\" is undefined.`);\n } else {\n var prefValue = this.prefs[name];\n\n if (prefValue !== undefined) {\n return prefValue;\n }\n }\n return defaultValue;\n });\n }\n}\n\nexport {\n BasePreferences,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/preferences.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { CursorTool } from './pdf_cursor_tools';\nimport { SCROLLBAR_PADDING } from './ui_utils';\n\n/**\n * @typedef {Object} SecondaryToolbarOptions\n * @property {HTMLDivElement} toolbar - Container for the secondary toolbar.\n * @property {HTMLButtonElement} toggleButton - Button to toggle the visibility\n * of the secondary toolbar.\n * @property {HTMLDivElement} toolbarButtonContainer - Container where all the\n * toolbar buttons are placed. The maximum height of the toolbar is controlled\n * dynamically by adjusting the 'max-height' CSS property of this DOM element.\n * @property {HTMLButtonElement} presentationModeButton - Button for entering\n * presentation mode.\n * @property {HTMLButtonElement} openFileButton - Button to open a file.\n * @property {HTMLButtonElement} printButton - Button to print the document.\n * @property {HTMLButtonElement} downloadButton - Button to download the\n * document.\n * @property {HTMLLinkElement} viewBookmarkButton - Button to obtain a bookmark\n * link to the current location in the document.\n * @property {HTMLButtonElement} firstPageButton - Button to go to the first\n * page in the document.\n * @property {HTMLButtonElement} lastPageButton - Button to go to the last page\n * in the document.\n * @property {HTMLButtonElement} pageRotateCwButton - Button to rotate the pages\n * clockwise.\n * @property {HTMLButtonElement} pageRotateCcwButton - Button to rotate the\n * pages counterclockwise.\n * @property {HTMLButtonElement} cursorSelectToolButton - Button to enable the\n * select tool.\n * @property {HTMLButtonElement} cursorHandToolButton - Button to enable the\n * hand tool.\n * @property {HTMLButtonElement} documentPropertiesButton - Button for opening\n * the document properties dialog.\n */\n\nclass SecondaryToolbar {\n /**\n * @param {SecondaryToolbarOptions} options\n * @param {HTMLDivElement} mainContainer\n * @param {EventBus} eventBus\n */\n constructor(options, mainContainer, eventBus) {\n this.toolbar = options.toolbar;\n this.toggleButton = options.toggleButton;\n this.toolbarButtonContainer = options.toolbarButtonContainer;\n this.buttons = [\n { element: options.presentationModeButton, eventName: 'presentationmode',\n close: true, },\n { element: options.openFileButton, eventName: 'openfile', close: true, },\n { element: options.printButton, eventName: 'print', close: true, },\n { element: options.downloadButton, eventName: 'download', close: true, },\n { element: options.viewBookmarkButton, eventName: null, close: true, },\n { element: options.firstPageButton, eventName: 'firstpage',\n close: true, },\n { element: options.lastPageButton, eventName: 'lastpage', close: true, },\n { element: options.pageRotateCwButton, eventName: 'rotatecw',\n close: false, },\n { element: options.pageRotateCcwButton, eventName: 'rotateccw',\n close: false, },\n { element: options.cursorSelectToolButton, eventName: 'switchcursortool',\n eventDetails: { tool: CursorTool.SELECT, }, close: true, },\n { element: options.cursorHandToolButton, eventName: 'switchcursortool',\n eventDetails: { tool: CursorTool.HAND, }, close: true, },\n { element: options.documentPropertiesButton,\n eventName: 'documentproperties', close: true, },\n ];\n this.items = {\n firstPage: options.firstPageButton,\n lastPage: options.lastPageButton,\n pageRotateCw: options.pageRotateCwButton,\n pageRotateCcw: options.pageRotateCcwButton,\n };\n\n this.mainContainer = mainContainer;\n this.eventBus = eventBus;\n\n this.opened = false;\n this.containerHeight = null;\n this.previousContainerHeight = null;\n\n this.reset();\n\n // Bind the event listeners for click and cursor tool actions.\n this._bindClickListeners();\n this._bindCursorToolsListener(options);\n\n // Bind the event listener for adjusting the 'max-height' of the toolbar.\n this.eventBus.on('resize', this._setMaxHeight.bind(this));\n }\n\n /**\n * @return {boolean}\n */\n get isOpen() {\n return this.opened;\n }\n\n setPageNumber(pageNumber) {\n this.pageNumber = pageNumber;\n this._updateUIState();\n }\n\n setPagesCount(pagesCount) {\n this.pagesCount = pagesCount;\n this._updateUIState();\n }\n\n reset() {\n this.pageNumber = 0;\n this.pagesCount = 0;\n this._updateUIState();\n }\n\n _updateUIState() {\n this.items.firstPage.disabled = (this.pageNumber <= 1);\n this.items.lastPage.disabled = (this.pageNumber >= this.pagesCount);\n this.items.pageRotateCw.disabled = this.pagesCount === 0;\n this.items.pageRotateCcw.disabled = this.pagesCount === 0;\n }\n\n _bindClickListeners() {\n // Button to toggle the visibility of the secondary toolbar.\n this.toggleButton.addEventListener('click', this.toggle.bind(this));\n\n // All items within the secondary toolbar.\n for (let button in this.buttons) {\n let { element, eventName, close, eventDetails, } = this.buttons[button];\n\n element.addEventListener('click', (evt) => {\n if (eventName !== null) {\n let details = { source: this, };\n for (let property in eventDetails) {\n details[property] = eventDetails[property];\n }\n this.eventBus.dispatch(eventName, details);\n }\n if (close) {\n this.close();\n }\n });\n }\n }\n\n _bindCursorToolsListener(buttons) {\n this.eventBus.on('cursortoolchanged', function(evt) {\n buttons.cursorSelectToolButton.classList.remove('toggled');\n buttons.cursorHandToolButton.classList.remove('toggled');\n\n switch (evt.tool) {\n case CursorTool.SELECT:\n buttons.cursorSelectToolButton.classList.add('toggled');\n break;\n case CursorTool.HAND:\n buttons.cursorHandToolButton.classList.add('toggled');\n break;\n }\n });\n }\n\n open() {\n if (this.opened) {\n return;\n }\n this.opened = true;\n this._setMaxHeight();\n\n this.toggleButton.classList.add('toggled');\n this.toolbar.classList.remove('hidden');\n }\n\n close() {\n if (!this.opened) {\n return;\n }\n this.opened = false;\n this.toolbar.classList.add('hidden');\n this.toggleButton.classList.remove('toggled');\n }\n\n toggle() {\n if (this.opened) {\n this.close();\n } else {\n this.open();\n }\n }\n\n /**\n * @private\n */\n _setMaxHeight() {\n if (!this.opened) {\n return; // Only adjust the 'max-height' if the toolbar is visible.\n }\n this.containerHeight = this.mainContainer.clientHeight;\n\n if (this.containerHeight === this.previousContainerHeight) {\n return;\n }\n this.toolbarButtonContainer.setAttribute('style',\n 'max-height: ' + (this.containerHeight - SCROLLBAR_PADDING) + 'px;');\n\n this.previousContainerHeight = this.containerHeight;\n }\n}\n\nexport {\n SecondaryToolbar,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/secondary_toolbar.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getGlobalEventBus } from './dom_events';\nimport { renderTextLayer } from 'pdfjs-lib';\n\nconst EXPAND_DIVS_TIMEOUT = 300; // ms\n\n/**\n * @typedef {Object} TextLayerBuilderOptions\n * @property {HTMLDivElement} textLayerDiv - The text layer container.\n * @property {EventBus} eventBus - The application event bus.\n * @property {number} pageIndex - The page index.\n * @property {PageViewport} viewport - The viewport of the text layer.\n * @property {PDFFindController} findController\n * @property {boolean} enhanceTextSelection - Option to turn on improved\n * text selection.\n */\n\n/**\n * The text layer builder provides text selection functionality for the PDF.\n * It does this by creating overlay divs over the PDF's text. These divs\n * contain text that matches the PDF text they are overlaying. This object\n * also provides a way to highlight text that is being searched for.\n */\nclass TextLayerBuilder {\n constructor({ textLayerDiv, eventBus, pageIndex, viewport,\n findController = null, enhanceTextSelection = false, }) {\n this.textLayerDiv = textLayerDiv;\n this.eventBus = eventBus || getGlobalEventBus();\n this.textContent = null;\n this.textContentItemsStr = [];\n this.textContentStream = null;\n this.renderingDone = false;\n this.pageIdx = pageIndex;\n this.pageNumber = this.pageIdx + 1;\n this.matches = [];\n this.viewport = viewport;\n this.textDivs = [];\n this.findController = findController;\n this.textLayerRenderTask = null;\n this.enhanceTextSelection = enhanceTextSelection;\n\n this._bindMouse();\n }\n\n /**\n * @private\n */\n _finishRendering() {\n this.renderingDone = true;\n\n if (!this.enhanceTextSelection) {\n let endOfContent = document.createElement('div');\n endOfContent.className = 'endOfContent';\n this.textLayerDiv.appendChild(endOfContent);\n }\n\n this.eventBus.dispatch('textlayerrendered', {\n source: this,\n pageNumber: this.pageNumber,\n numTextDivs: this.textDivs.length,\n });\n }\n\n /**\n * Renders the text layer.\n *\n * @param {number} timeout - (optional) wait for a specified amount of\n * milliseconds before rendering\n */\n render(timeout = 0) {\n if (!(this.textContent || this.textContentStream) || this.renderingDone) {\n return;\n }\n this.cancel();\n\n this.textDivs = [];\n let textLayerFrag = document.createDocumentFragment();\n this.textLayerRenderTask = renderTextLayer({\n textContent: this.textContent,\n textContentStream: this.textContentStream,\n container: textLayerFrag,\n viewport: this.viewport,\n textDivs: this.textDivs,\n textContentItemsStr: this.textContentItemsStr,\n timeout,\n enhanceTextSelection: this.enhanceTextSelection,\n });\n this.textLayerRenderTask.promise.then(() => {\n this.textLayerDiv.appendChild(textLayerFrag);\n this._finishRendering();\n this.updateMatches();\n }, function (reason) {\n // Cancelled or failed to render text layer; skipping errors.\n });\n }\n\n /**\n * Cancel rendering of the text layer.\n */\n cancel() {\n if (this.textLayerRenderTask) {\n this.textLayerRenderTask.cancel();\n this.textLayerRenderTask = null;\n }\n }\n\n setTextContentStream(readableStream) {\n this.cancel();\n this.textContentStream = readableStream;\n }\n\n setTextContent(textContent) {\n this.cancel();\n this.textContent = textContent;\n }\n\n convertMatches(matches, matchesLength) {\n let i = 0;\n let iIndex = 0;\n let textContentItemsStr = this.textContentItemsStr;\n let end = textContentItemsStr.length - 1;\n let queryLen = (this.findController === null ?\n 0 : this.findController.state.query.length);\n let ret = [];\n if (!matches) {\n return ret;\n }\n for (let m = 0, len = matches.length; m < len; m++) {\n // Calculate the start position.\n let matchIdx = matches[m];\n\n // Loop over the divIdxs.\n while (i !== end && matchIdx >=\n (iIndex + textContentItemsStr[i].length)) {\n iIndex += textContentItemsStr[i].length;\n i++;\n }\n\n if (i === textContentItemsStr.length) {\n console.error('Could not find a matching mapping');\n }\n\n let match = {\n begin: {\n divIdx: i,\n offset: matchIdx - iIndex,\n },\n };\n\n // Calculate the end position.\n if (matchesLength) { // Multiterm search.\n matchIdx += matchesLength[m];\n } else { // Phrase search.\n matchIdx += queryLen;\n }\n\n // Somewhat the same array as above, but use > instead of >= to get\n // the end position right.\n while (i !== end && matchIdx >\n (iIndex + textContentItemsStr[i].length)) {\n iIndex += textContentItemsStr[i].length;\n i++;\n }\n\n match.end = {\n divIdx: i,\n offset: matchIdx - iIndex,\n };\n ret.push(match);\n }\n\n return ret;\n }\n\n renderMatches(matches) {\n // Early exit if there is nothing to render.\n if (matches.length === 0) {\n return;\n }\n\n let textContentItemsStr = this.textContentItemsStr;\n let textDivs = this.textDivs;\n let prevEnd = null;\n let pageIdx = this.pageIdx;\n let isSelectedPage = (this.findController === null ?\n false : (pageIdx === this.findController.selected.pageIdx));\n let selectedMatchIdx = (this.findController === null ?\n -1 : this.findController.selected.matchIdx);\n let highlightAll = (this.findController === null ?\n false : this.findController.state.highlightAll);\n let infinity = {\n divIdx: -1,\n offset: undefined,\n };\n\n function beginText(begin, className) {\n let divIdx = begin.divIdx;\n textDivs[divIdx].textContent = '';\n appendTextToDiv(divIdx, 0, begin.offset, className);\n }\n\n function appendTextToDiv(divIdx, fromOffset, toOffset, className) {\n let div = textDivs[divIdx];\n let content = textContentItemsStr[divIdx].substring(fromOffset, toOffset);\n let node = document.createTextNode(content);\n if (className) {\n let span = document.createElement('span');\n span.className = className;\n span.appendChild(node);\n div.appendChild(span);\n return;\n }\n div.appendChild(node);\n }\n\n let i0 = selectedMatchIdx, i1 = i0 + 1;\n if (highlightAll) {\n i0 = 0;\n i1 = matches.length;\n } else if (!isSelectedPage) {\n // Not highlighting all and this isn't the selected page, so do nothing.\n return;\n }\n\n for (let i = i0; i < i1; i++) {\n let match = matches[i];\n let begin = match.begin;\n let end = match.end;\n let isSelected = (isSelectedPage && i === selectedMatchIdx);\n let highlightSuffix = (isSelected ? ' selected' : '');\n\n if (this.findController) {\n this.findController.updateMatchPosition(pageIdx, i, textDivs,\n begin.divIdx);\n }\n\n // Match inside new div.\n if (!prevEnd || begin.divIdx !== prevEnd.divIdx) {\n // If there was a previous div, then add the text at the end.\n if (prevEnd !== null) {\n appendTextToDiv(prevEnd.divIdx, prevEnd.offset, infinity.offset);\n }\n // Clear the divs and set the content until the starting point.\n beginText(begin);\n } else {\n appendTextToDiv(prevEnd.divIdx, prevEnd.offset, begin.offset);\n }\n\n if (begin.divIdx === end.divIdx) {\n appendTextToDiv(begin.divIdx, begin.offset, end.offset,\n 'highlight' + highlightSuffix);\n } else {\n appendTextToDiv(begin.divIdx, begin.offset, infinity.offset,\n 'highlight begin' + highlightSuffix);\n for (let n0 = begin.divIdx + 1, n1 = end.divIdx; n0 < n1; n0++) {\n textDivs[n0].className = 'highlight middle' + highlightSuffix;\n }\n beginText(end, 'highlight end' + highlightSuffix);\n }\n prevEnd = end;\n }\n\n if (prevEnd) {\n appendTextToDiv(prevEnd.divIdx, prevEnd.offset, infinity.offset);\n }\n }\n\n updateMatches() {\n // Only show matches when all rendering is done.\n if (!this.renderingDone) {\n return;\n }\n\n // Clear all matches.\n let matches = this.matches;\n let textDivs = this.textDivs;\n let textContentItemsStr = this.textContentItemsStr;\n let clearedUntilDivIdx = -1;\n\n // Clear all current matches.\n for (let i = 0, len = matches.length; i < len; i++) {\n let match = matches[i];\n let begin = Math.max(clearedUntilDivIdx, match.begin.divIdx);\n for (let n = begin, end = match.end.divIdx; n <= end; n++) {\n let div = textDivs[n];\n div.textContent = textContentItemsStr[n];\n div.className = '';\n }\n clearedUntilDivIdx = match.end.divIdx + 1;\n }\n\n if (this.findController === null || !this.findController.active) {\n return;\n }\n\n // Convert the matches on the page controller into the match format\n // used for the textLayer.\n let pageMatches, pageMatchesLength;\n if (this.findController !== null) {\n pageMatches = this.findController.pageMatches[this.pageIdx] || null;\n pageMatchesLength = (this.findController.pageMatchesLength) ?\n this.findController.pageMatchesLength[this.pageIdx] || null : null;\n }\n\n this.matches = this.convertMatches(pageMatches, pageMatchesLength);\n this.renderMatches(this.matches);\n }\n\n /**\n * Improves text selection by adding an additional div where the mouse was\n * clicked. This reduces flickering of the content if the mouse is slowly\n * dragged up or down.\n *\n * @private\n */\n _bindMouse() {\n let div = this.textLayerDiv;\n let expandDivsTimer = null;\n\n div.addEventListener('mousedown', (evt) => {\n if (this.enhanceTextSelection && this.textLayerRenderTask) {\n this.textLayerRenderTask.expandTextDivs(true);\n if ((typeof PDFJSDev === 'undefined' ||\n !PDFJSDev.test('FIREFOX || MOZCENTRAL')) &&\n expandDivsTimer) {\n clearTimeout(expandDivsTimer);\n expandDivsTimer = null;\n }\n return;\n }\n\n let end = div.querySelector('.endOfContent');\n if (!end) {\n return;\n }\n if (typeof PDFJSDev === 'undefined' ||\n !PDFJSDev.test('FIREFOX || MOZCENTRAL')) {\n // On non-Firefox browsers, the selection will feel better if the height\n // of the `endOfContent` div is adjusted to start at mouse click\n // location. This avoids flickering when the selection moves up.\n // However it does not work when selection is started on empty space.\n let adjustTop = evt.target !== div;\n if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) {\n adjustTop = adjustTop && window.getComputedStyle(end).\n getPropertyValue('-moz-user-select') !== 'none';\n }\n if (adjustTop) {\n let divBounds = div.getBoundingClientRect();\n let r = Math.max(0, (evt.pageY - divBounds.top) / divBounds.height);\n end.style.top = (r * 100).toFixed(2) + '%';\n }\n }\n end.classList.add('active');\n });\n\n div.addEventListener('mouseup', () => {\n if (this.enhanceTextSelection && this.textLayerRenderTask) {\n if (typeof PDFJSDev === 'undefined' ||\n !PDFJSDev.test('FIREFOX || MOZCENTRAL')) {\n expandDivsTimer = setTimeout(() => {\n if (this.textLayerRenderTask) {\n this.textLayerRenderTask.expandTextDivs(false);\n }\n expandDivsTimer = null;\n }, EXPAND_DIVS_TIMEOUT);\n } else {\n this.textLayerRenderTask.expandTextDivs(false);\n }\n return;\n }\n\n let end = div.querySelector('.endOfContent');\n if (!end) {\n return;\n }\n if (typeof PDFJSDev === 'undefined' ||\n !PDFJSDev.test('FIREFOX || MOZCENTRAL')) {\n end.style.top = '';\n }\n end.classList.remove('active');\n });\n }\n}\n\n/**\n * @implements IPDFTextLayerFactory\n */\nclass DefaultTextLayerFactory {\n /**\n * @param {HTMLDivElement} textLayerDiv\n * @param {number} pageIndex\n * @param {PageViewport} viewport\n * @param {boolean} enhanceTextSelection\n * @returns {TextLayerBuilder}\n */\n createTextLayerBuilder(textLayerDiv, pageIndex, viewport,\n enhanceTextSelection = false) {\n return new TextLayerBuilder({\n textLayerDiv,\n pageIndex,\n viewport,\n enhanceTextSelection,\n });\n }\n}\n\nexport {\n TextLayerBuilder,\n DefaultTextLayerFactory,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/text_layer_builder.js","/* Copyright 2016 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n animationStarted, DEFAULT_SCALE, DEFAULT_SCALE_VALUE, MAX_SCALE,\n MIN_SCALE, noContextMenuHandler, NullL10n\n} from './ui_utils';\n\nconst PAGE_NUMBER_LOADING_INDICATOR = 'visiblePageIsLoading';\nconst SCALE_SELECT_CONTAINER_PADDING = 8;\nconst SCALE_SELECT_PADDING = 22;\n\n/**\n * @typedef {Object} ToolbarOptions\n * @property {HTMLDivElement} container - Container for the secondary toolbar.\n * @property {HTMLSpanElement} numPages - Label that contains number of pages.\n * @property {HTMLInputElement} pageNumber - Control for display and user input\n * of the current page number.\n * @property {HTMLSpanElement} scaleSelectContainer - Container where scale\n * controls are placed. The width is adjusted on UI initialization.\n * @property {HTMLSelectElement} scaleSelect - Scale selection control.\n * @property {HTMLOptionElement} customScaleOption - The item used to display\n * a non-predefined scale.\n * @property {HTMLButtonElement} previous - Button to go to the previous page.\n * @property {HTMLButtonElement} next - Button to go to the next page.\n * @property {HTMLButtonElement} zoomIn - Button to zoom in the pages.\n * @property {HTMLButtonElement} zoomOut - Button to zoom out the pages.\n * @property {HTMLButtonElement} viewFind - Button to open find bar.\n * @property {HTMLButtonElement} openFile - Button to open a new document.\n * @property {HTMLButtonElement} presentationModeButton - Button to switch to\n * presentation mode.\n * @property {HTMLButtonElement} download - Button to download the document.\n * @property {HTMLAElement} viewBookmark - Element to link current url of\n * the page view.\n */\n\nclass Toolbar {\n /**\n * @param {ToolbarOptions} options\n * @param {HTMLDivElement} mainContainer\n * @param {EventBus} eventBus\n * @param {IL10n} l10n - Localization service.\n */\n constructor(options, mainContainer, eventBus, l10n = NullL10n) {\n this.toolbar = options.container;\n this.mainContainer = mainContainer;\n this.eventBus = eventBus;\n this.l10n = l10n;\n this.items = options;\n\n this._wasLocalized = false;\n this.reset();\n\n // Bind the event listeners for click and hand tool actions.\n this._bindListeners();\n }\n\n setPageNumber(pageNumber, pageLabel) {\n this.pageNumber = pageNumber;\n this.pageLabel = pageLabel;\n this._updateUIState(false);\n }\n\n setPagesCount(pagesCount, hasPageLabels) {\n this.pagesCount = pagesCount;\n this.hasPageLabels = hasPageLabels;\n this._updateUIState(true);\n }\n\n setPageScale(pageScaleValue, pageScale) {\n this.pageScaleValue = pageScaleValue;\n this.pageScale = pageScale;\n this._updateUIState(false);\n }\n\n reset() {\n this.pageNumber = 0;\n this.pageLabel = null;\n this.hasPageLabels = false;\n this.pagesCount = 0;\n this.pageScaleValue = DEFAULT_SCALE_VALUE;\n this.pageScale = DEFAULT_SCALE;\n this._updateUIState(true);\n }\n\n _bindListeners() {\n let { eventBus, items, } = this;\n let self = this;\n\n items.previous.addEventListener('click', function() {\n eventBus.dispatch('previouspage');\n });\n\n items.next.addEventListener('click', function() {\n eventBus.dispatch('nextpage');\n });\n\n items.zoomIn.addEventListener('click', function() {\n eventBus.dispatch('zoomin');\n });\n\n items.zoomOut.addEventListener('click', function() {\n eventBus.dispatch('zoomout');\n });\n\n items.pageNumber.addEventListener('click', function() {\n this.select();\n });\n\n items.pageNumber.addEventListener('change', function() {\n eventBus.dispatch('pagenumberchanged', {\n source: self,\n value: this.value,\n });\n });\n\n items.scaleSelect.addEventListener('change', function() {\n if (this.value === 'custom') {\n return;\n }\n eventBus.dispatch('scalechanged', {\n source: self,\n value: this.value,\n });\n });\n\n items.presentationModeButton.addEventListener('click', function() {\n eventBus.dispatch('presentationmode');\n });\n\n items.openFile.addEventListener('click', function() {\n eventBus.dispatch('openfile');\n });\n\n items.print.addEventListener('click', function() {\n eventBus.dispatch('print');\n });\n\n items.download.addEventListener('click', function() {\n eventBus.dispatch('download');\n });\n\n // Suppress context menus for some controls.\n items.scaleSelect.oncontextmenu = noContextMenuHandler;\n\n eventBus.on('localized', () => {\n this._localized();\n });\n }\n\n _localized() {\n this._wasLocalized = true;\n this._adjustScaleWidth();\n this._updateUIState(true);\n }\n\n _updateUIState(resetNumPages = false) {\n if (!this._wasLocalized) {\n // Don't update the UI state until we localize the toolbar.\n return;\n }\n let { pageNumber, pagesCount, items, } = this;\n let scaleValue = (this.pageScaleValue || this.pageScale).toString();\n let scale = this.pageScale;\n\n if (resetNumPages) {\n if (this.hasPageLabels) {\n items.pageNumber.type = 'text';\n } else {\n items.pageNumber.type = 'number';\n this.l10n.get('of_pages', { pagesCount, }, 'of {{pagesCount}}').\n then((msg) => {\n items.numPages.textContent = msg;\n });\n }\n items.pageNumber.max = pagesCount;\n }\n\n if (this.hasPageLabels) {\n items.pageNumber.value = this.pageLabel;\n this.l10n.get('page_of_pages', { pageNumber, pagesCount, },\n '({{pageNumber}} of {{pagesCount}})').then((msg) => {\n items.numPages.textContent = msg;\n });\n } else {\n items.pageNumber.value = pageNumber;\n }\n\n items.previous.disabled = (pageNumber <= 1);\n items.next.disabled = (pageNumber >= pagesCount);\n\n items.zoomOut.disabled = (scale <= MIN_SCALE);\n items.zoomIn.disabled = (scale >= MAX_SCALE);\n\n let customScale = Math.round(scale * 10000) / 100;\n this.l10n.get('page_scale_percent', { scale: customScale, },\n '{{scale}}%').then((msg) => {\n let options = items.scaleSelect.options;\n let predefinedValueFound = false;\n for (let i = 0, ii = options.length; i < ii; i++) {\n let option = options[i];\n if (option.value !== scaleValue) {\n option.selected = false;\n continue;\n }\n option.selected = true;\n predefinedValueFound = true;\n }\n if (!predefinedValueFound) {\n items.customScaleOption.textContent = msg;\n items.customScaleOption.selected = true;\n }\n });\n }\n\n updateLoadingIndicatorState(loading = false) {\n let pageNumberInput = this.items.pageNumber;\n\n if (loading) {\n pageNumberInput.classList.add(PAGE_NUMBER_LOADING_INDICATOR);\n } else {\n pageNumberInput.classList.remove(PAGE_NUMBER_LOADING_INDICATOR);\n }\n }\n\n _adjustScaleWidth() {\n let container = this.items.scaleSelectContainer;\n let select = this.items.scaleSelect;\n\n animationStarted.then(function() {\n // Adjust the width of the zoom box to fit the content.\n // Note: If the window is narrow enough that the zoom box is not\n // visible, we temporarily show it to be able to adjust its width.\n if (container.clientWidth === 0) {\n container.setAttribute('style', 'display: inherit;');\n }\n if (container.clientWidth > 0) {\n select.setAttribute('style', 'min-width: inherit;');\n let width = select.clientWidth + SCALE_SELECT_CONTAINER_PADDING;\n select.setAttribute('style', 'min-width: ' +\n (width + SCALE_SELECT_PADDING) + 'px;');\n container.setAttribute('style', 'min-width: ' + width + 'px; ' +\n 'max-width: ' + width + 'px;');\n }\n });\n }\n}\n\nexport {\n Toolbar,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/toolbar.js","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst DEFAULT_VIEW_HISTORY_CACHE_SIZE = 20;\n\n/**\n * View History - This is a utility for saving various view parameters for\n * recently opened files.\n *\n * The way that the view parameters are stored depends on how PDF.js is built,\n * for 'gulp <flag>' the following cases exist:\n * - FIREFOX or MOZCENTRAL - uses sessionStorage.\n * - GENERIC or CHROME - uses localStorage, if it is available.\n */\nclass ViewHistory {\n constructor(fingerprint, cacheSize = DEFAULT_VIEW_HISTORY_CACHE_SIZE) {\n this.fingerprint = fingerprint;\n this.cacheSize = cacheSize;\n\n this._initializedPromise = this._readFromStorage().then((databaseStr) => {\n let database = JSON.parse(databaseStr || '{}');\n if (!('files' in database)) {\n database.files = [];\n }\n if (database.files.length >= this.cacheSize) {\n database.files.shift();\n }\n let index;\n for (let i = 0, length = database.files.length; i < length; i++) {\n let branch = database.files[i];\n if (branch.fingerprint === this.fingerprint) {\n index = i;\n break;\n }\n }\n if (typeof index !== 'number') {\n index = database.files.push({ fingerprint: this.fingerprint, }) - 1;\n }\n this.file = database.files[index];\n this.database = database;\n });\n }\n\n _writeToStorage() {\n return new Promise((resolve) => {\n let databaseStr = JSON.stringify(this.database);\n\n if (typeof PDFJSDev !== 'undefined' &&\n PDFJSDev.test('FIREFOX || MOZCENTRAL')) {\n sessionStorage.setItem('pdfjs.history', databaseStr);\n } else {\n localStorage.setItem('pdfjs.history', databaseStr);\n }\n resolve();\n });\n }\n\n _readFromStorage() {\n return new Promise(function(resolve) {\n if (typeof PDFJSDev !== 'undefined' &&\n PDFJSDev.test('FIREFOX || MOZCENTRAL')) {\n resolve(sessionStorage.getItem('pdfjs.history'));\n } else {\n let value = localStorage.getItem('pdfjs.history');\n\n // TODO: Remove this key-name conversion after a suitable time-frame.\n // Note that we only remove the old 'database' entry if it looks like\n // it was created by PDF.js, to avoid removing someone else's data.\n if (!value) {\n let databaseStr = localStorage.getItem('database');\n if (databaseStr) {\n try {\n let database = JSON.parse(databaseStr);\n if (typeof database.files[0].fingerprint === 'string') {\n localStorage.setItem('pdfjs.history', databaseStr);\n localStorage.removeItem('database');\n value = databaseStr;\n }\n } catch (ex) { }\n }\n }\n resolve(value);\n }\n });\n }\n\n set(name, val) {\n return this._initializedPromise.then(() => {\n this.file[name] = val;\n return this._writeToStorage();\n });\n }\n\n setMultiple(properties) {\n return this._initializedPromise.then(() => {\n for (let name in properties) {\n this.file[name] = properties[name];\n }\n return this._writeToStorage();\n });\n }\n\n get(name, defaultValue) {\n return this._initializedPromise.then(() => {\n let val = this.file[name];\n return val !== undefined ? val : defaultValue;\n });\n }\n\n getMultiple(properties) {\n return this._initializedPromise.then(() => {\n let values = Object.create(null);\n\n for (let name in properties) {\n let val = this.file[name];\n values[name] = val !== undefined ? val : properties[name];\n }\n return values;\n });\n }\n}\n\nexport {\n ViewHistory,\n};\n\n\n\n// WEBPACK FOOTER //\n// web/view_history.js","/* Copyright 2016 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* globals chrome */\n\n'use strict';\n\nlet DEFAULT_URL = 'compressed.tracemonkey-pldi-09.pdf';\n\nif (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME')) {\n (function rewriteUrlClosure() {\n // Run this code outside DOMContentLoaded to make sure that the URL\n // is rewritten as soon as possible.\n let queryString = document.location.search.slice(1);\n let m = /(^|&)file=([^&]*)/.exec(queryString);\n DEFAULT_URL = m ? decodeURIComponent(m[2]) : '';\n\n // Example: chrome-extension://.../http://example.com/file.pdf\n let humanReadableUrl = '/' + DEFAULT_URL + location.hash;\n history.replaceState(history.state, '', humanReadableUrl);\n if (top === window) {\n chrome.runtime.sendMessage('showPageAction');\n }\n })();\n}\n\nlet pdfjsWebApp;\nif (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('PRODUCTION')) {\n pdfjsWebApp = require('./app.js');\n}\n\nif (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('FIREFOX || MOZCENTRAL')) {\n require('./firefoxcom.js');\n require('./firefox_print_service.js');\n}\nif (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('GENERIC')) {\n require('./genericcom.js');\n}\nif (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME')) {\n require('./chromecom.js');\n}\nif (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME || GENERIC')) {\n require('./pdf_print_service.js');\n}\n\nfunction getViewerConfiguration() {\n return {\n appContainer: document.body,\n mainContainer: document.getElementById('viewerContainer'),\n viewerContainer: document.getElementById('viewer'),\n eventBus: null, // using global event bus with DOM events\n toolbar: {\n container: document.getElementById('toolbarViewer'),\n numPages: document.getElementById('numPages'),\n pageNumber: document.getElementById('pageNumber'),\n scaleSelectContainer: document.getElementById('scaleSelectContainer'),\n scaleSelect: document.getElementById('scaleSelect'),\n customScaleOption: document.getElementById('customScaleOption'),\n previous: document.getElementById('previous'),\n next: document.getElementById('next'),\n zoomIn: document.getElementById('zoomIn'),\n zoomOut: document.getElementById('zoomOut'),\n viewFind: document.getElementById('viewFind'),\n openFile: document.getElementById('openFile'),\n print: document.getElementById('print'),\n presentationModeButton: document.getElementById('presentationMode'),\n download: document.getElementById('download'),\n viewBookmark: document.getElementById('viewBookmark'),\n },\n secondaryToolbar: {\n toolbar: document.getElementById('secondaryToolbar'),\n toggleButton: document.getElementById('secondaryToolbarToggle'),\n toolbarButtonContainer:\n document.getElementById('secondaryToolbarButtonContainer'),\n presentationModeButton:\n document.getElementById('secondaryPresentationMode'),\n openFileButton: document.getElementById('secondaryOpenFile'),\n printButton: document.getElementById('secondaryPrint'),\n downloadButton: document.getElementById('secondaryDownload'),\n viewBookmarkButton: document.getElementById('secondaryViewBookmark'),\n firstPageButton: document.getElementById('firstPage'),\n lastPageButton: document.getElementById('lastPage'),\n pageRotateCwButton: document.getElementById('pageRotateCw'),\n pageRotateCcwButton: document.getElementById('pageRotateCcw'),\n cursorSelectToolButton: document.getElementById('cursorSelectTool'),\n cursorHandToolButton: document.getElementById('cursorHandTool'),\n documentPropertiesButton: document.getElementById('documentProperties'),\n },\n fullscreen: {\n contextFirstPage: document.getElementById('contextFirstPage'),\n contextLastPage: document.getElementById('contextLastPage'),\n contextPageRotateCw: document.getElementById('contextPageRotateCw'),\n contextPageRotateCcw: document.getElementById('contextPageRotateCcw'),\n },\n sidebar: {\n // Divs (and sidebar button)\n mainContainer: document.getElementById('mainContainer'),\n outerContainer: document.getElementById('outerContainer'),\n toggleButton: document.getElementById('sidebarToggle'),\n // Buttons\n thumbnailButton: document.getElementById('viewThumbnail'),\n outlineButton: document.getElementById('viewOutline'),\n attachmentsButton: document.getElementById('viewAttachments'),\n // Views\n thumbnailView: document.getElementById('thumbnailView'),\n outlineView: document.getElementById('outlineView'),\n attachmentsView: document.getElementById('attachmentsView'),\n },\n findBar: {\n bar: document.getElementById('findbar'),\n toggleButton: document.getElementById('viewFind'),\n findField: document.getElementById('findInput'),\n highlightAllCheckbox: document.getElementById('findHighlightAll'),\n caseSensitiveCheckbox: document.getElementById('findMatchCase'),\n findMsg: document.getElementById('findMsg'),\n findResultsCount: document.getElementById('findResultsCount'),\n findStatusIcon: document.getElementById('findStatusIcon'),\n findPreviousButton: document.getElementById('findPrevious'),\n findNextButton: document.getElementById('findNext'),\n },\n passwordOverlay: {\n overlayName: 'passwordOverlay',\n container: document.getElementById('passwordOverlay'),\n label: document.getElementById('passwordText'),\n input: document.getElementById('password'),\n submitButton: document.getElementById('passwordSubmit'),\n cancelButton: document.getElementById('passwordCancel'),\n },\n documentProperties: {\n overlayName: 'documentPropertiesOverlay',\n container: document.getElementById('documentPropertiesOverlay'),\n closeButton: document.getElementById('documentPropertiesClose'),\n fields: {\n 'fileName': document.getElementById('fileNameField'),\n 'fileSize': document.getElementById('fileSizeField'),\n 'title': document.getElementById('titleField'),\n 'author': document.getElementById('authorField'),\n 'subject': document.getElementById('subjectField'),\n 'keywords': document.getElementById('keywordsField'),\n 'creationDate': document.getElementById('creationDateField'),\n 'modificationDate': document.getElementById('modificationDateField'),\n 'creator': document.getElementById('creatorField'),\n 'producer': document.getElementById('producerField'),\n 'version': document.getElementById('versionField'),\n 'pageCount': document.getElementById('pageCountField'),\n },\n },\n errorWrapper: {\n container: document.getElementById('errorWrapper'),\n errorMessage: document.getElementById('errorMessage'),\n closeButton: document.getElementById('errorClose'),\n errorMoreInfo: document.getElementById('errorMoreInfo'),\n moreInfoButton: document.getElementById('errorShowMore'),\n lessInfoButton: document.getElementById('errorShowLess'),\n },\n printContainer: document.getElementById('printContainer'),\n openFileInputName: 'fileInput',\n debuggerScriptPath: './debugger.js',\n defaultUrl: DEFAULT_URL,\n };\n}\n\nfunction webViewerLoad() {\n let config = getViewerConfiguration();\n if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('PRODUCTION')) {\n Promise.all([\n SystemJS.import('pdfjs-web/app'),\n SystemJS.import('pdfjs-web/genericcom'),\n SystemJS.import('pdfjs-web/pdf_print_service'),\n ]).then(function([app, ...otherModules]) {\n window.PDFViewerApplication = app.PDFViewerApplication;\n app.PDFViewerApplication.run(config);\n });\n } else {\n window.PDFViewerApplication = pdfjsWebApp.PDFViewerApplication;\n pdfjsWebApp.PDFViewerApplication.run(config);\n }\n}\n\nif (document.readyState === 'interactive' ||\n document.readyState === 'complete') {\n webViewerLoad();\n} else {\n document.addEventListener('DOMContentLoaded', webViewerLoad, true);\n}\n\n\n\n// WEBPACK FOOTER //\n// web/viewer.js"],"sourceRoot":""}
\ No newline at end of file |