From 13c7e6da3c4ec02273cf13cf851c0ae3d0882eef Mon Sep 17 00:00:00 2001 From: Pablo Alejandro Fiumara Date: Mon, 7 Apr 2014 18:24:19 -0300 Subject: [PATCH 1/9] added documentation comment block to isEOF function located at src/core/parser.js --- src/core/parser.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/parser.js b/src/core/parser.js index aff46087a5c73..adc151337fde9 100644 --- a/src/core/parser.js +++ b/src/core/parser.js @@ -22,6 +22,10 @@ 'use strict'; var EOF = {}; +/** @function + * @name isEOF */ + + function isEOF(v) { return (v == EOF); From 571cfeffbaba409e733091655d727abbabad3716 Mon Sep 17 00:00:00 2001 From: Pablo Alejandro Fiumara Date: Mon, 7 Apr 2014 18:31:17 -0300 Subject: [PATCH 2/9] completed documentation of isEOF function located at src/core/parser.js --- out/global.html | 186 ++++ out/index.html | 63 ++ out/parser.js.html | 930 ++++++++++++++++++++ out/scripts/linenumber.js | 25 + out/scripts/prettify/Apache-License-2.0.txt | 202 +++++ out/scripts/prettify/lang-css.js | 2 + out/scripts/prettify/prettify.js | 28 + out/styles/jsdoc-default.css | 334 +++++++ out/styles/prettify-jsdoc.css | 111 +++ out/styles/prettify-tomorrow.css | 132 +++ src/core/parser.js | 4 +- 11 files changed, 2016 insertions(+), 1 deletion(-) create mode 100644 out/global.html create mode 100644 out/index.html create mode 100644 out/parser.js.html create mode 100644 out/scripts/linenumber.js create mode 100644 out/scripts/prettify/Apache-License-2.0.txt create mode 100644 out/scripts/prettify/lang-css.js create mode 100644 out/scripts/prettify/prettify.js create mode 100644 out/styles/jsdoc-default.css create mode 100644 out/styles/prettify-jsdoc.css create mode 100644 out/styles/prettify-tomorrow.css diff --git a/out/global.html b/out/global.html new file mode 100644 index 0000000000000..9578549912184 --- /dev/null +++ b/out/global.html @@ -0,0 +1,186 @@ + + + + + JSDoc: Global + + + + + + + + + + +
+ +

Global

+ + + + + +
+ +
+

+ +

+ +
+ +
+
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

isEOF()

+ + +
+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.3.0-alpha5 on Mon Apr 07 2014 18:28:59 GMT-0300 (ART) +
+ + + + + \ No newline at end of file diff --git a/out/index.html b/out/index.html new file mode 100644 index 0000000000000..08d5f4ad183e4 --- /dev/null +++ b/out/index.html @@ -0,0 +1,63 @@ + + + + + JSDoc: Index + + + + + + + + + + +
+ +

Index

+ + + + + + + +

+ + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.3.0-alpha5 on Mon Apr 07 2014 18:28:59 GMT-0300 (ART) +
+ + + + + \ No newline at end of file diff --git a/out/parser.js.html b/out/parser.js.html new file mode 100644 index 0000000000000..66567978d8167 --- /dev/null +++ b/out/parser.js.html @@ -0,0 +1,930 @@ + + + + + JSDoc: Source: parser.js + + + + + + + + + + +
+ +

Source: parser.js

+ + + + + +
+
+
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
+/* 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 Ascii85Stream, AsciiHexStream, CCITTFaxStream, Cmd, Dict, error,
+           FlateStream, isArray, isCmd, isDict, isInt, isName, isNum, isRef,
+           isString, Jbig2Stream, JpegStream, JpxStream, LZWStream, Name,
+           NullStream, PredictorStream, Ref, RunLengthStream, warn, info */
+
+'use strict';
+
+var EOF = {};
+/** @function
+ *  @name isEOF */
+
+
+
+function isEOF(v) {
+  return (v == EOF);
+}
+
+var Parser = (function ParserClosure() {
+  function Parser(lexer, allowStreams, xref) {
+    this.lexer = lexer;
+    this.allowStreams = allowStreams;
+    this.xref = xref;
+    this.imageCache = {
+      length: 0,
+      adler32: 0,
+      stream: null
+    };
+    this.refill();
+  }
+
+  Parser.prototype = {
+    refill: function Parser_refill() {
+      this.buf1 = this.lexer.getObj();
+      this.buf2 = this.lexer.getObj();
+    },
+    shift: function Parser_shift() {
+      if (isCmd(this.buf2, 'ID')) {
+        this.buf1 = this.buf2;
+        this.buf2 = null;
+      } else {
+        this.buf1 = this.buf2;
+        this.buf2 = this.lexer.getObj();
+      }
+    },
+    getObj: function Parser_getObj(cipherTransform) {
+      if (isCmd(this.buf1, 'BI')) { // inline image
+        this.shift();
+        return this.makeInlineImage(cipherTransform);
+      }
+      if (isCmd(this.buf1, '[')) { // array
+        this.shift();
+        var array = [];
+        while (!isCmd(this.buf1, ']') && !isEOF(this.buf1)) {
+          array.push(this.getObj(cipherTransform));
+        }
+        if (isEOF(this.buf1)) {
+          error('End of file inside array');
+        }
+        this.shift();
+        return array;
+      }
+      if (isCmd(this.buf1, '<<')) { // dictionary or stream
+        this.shift();
+        var dict = new Dict(this.xref);
+        while (!isCmd(this.buf1, '>>') && !isEOF(this.buf1)) {
+          if (!isName(this.buf1)) {
+            info('Malformed dictionary: key must be a name object');
+            this.shift();
+            continue;
+          }
+
+          var key = this.buf1.name;
+          this.shift();
+          if (isEOF(this.buf1)) {
+            break;
+          }
+          dict.set(key, this.getObj(cipherTransform));
+        }
+        if (isEOF(this.buf1)) {
+          error('End of file inside dictionary');
+        }
+
+        // Stream objects are not allowed inside content streams or
+        // object streams.
+        if (isCmd(this.buf2, 'stream')) {
+          return (this.allowStreams ?
+                  this.makeStream(dict, cipherTransform) : dict);
+        }
+        this.shift();
+        return dict;
+      }
+      if (isInt(this.buf1)) { // indirect reference or integer
+        var num = this.buf1;
+        this.shift();
+        if (isInt(this.buf1) && isCmd(this.buf2, 'R')) {
+          var ref = new Ref(num, this.buf1);
+          this.shift();
+          this.shift();
+          return ref;
+        }
+        return num;
+      }
+      if (isString(this.buf1)) { // string
+        var str = this.buf1;
+        this.shift();
+        if (cipherTransform) {
+          str = cipherTransform.decryptString(str);
+        }
+        return str;
+      }
+
+      // simple object
+      var obj = this.buf1;
+      this.shift();
+      return obj;
+    },
+    makeInlineImage: function Parser_makeInlineImage(cipherTransform) {
+      var lexer = this.lexer;
+      var stream = lexer.stream;
+
+      // parse dictionary
+      var dict = new Dict();
+      while (!isCmd(this.buf1, 'ID') && !isEOF(this.buf1)) {
+        if (!isName(this.buf1)) {
+          error('Dictionary key must be a name object');
+        }
+
+        var key = this.buf1.name;
+        this.shift();
+        if (isEOF(this.buf1)) {
+          break;
+        }
+        dict.set(key, this.getObj(cipherTransform));
+      }
+
+      // parse image stream
+      var startPos = stream.pos;
+
+      // searching for the /EI\s/
+      var state = 0, ch, i, ii;
+      while (state != 4 && (ch = stream.getByte()) !== -1) {
+        switch (ch | 0) {
+          case 0x20:
+          case 0x0D:
+          case 0x0A:
+            // let's check next five bytes to be ASCII... just be sure
+            var followingBytes = stream.peekBytes(5);
+            for (i = 0, ii = followingBytes.length; i < ii; i++) {
+              ch = followingBytes[i];
+              if (ch !== 0x0A && ch !== 0x0D && (ch < 0x20 || ch > 0x7F)) {
+                // not a LF, CR, SPACE or any visible ASCII character
+                state = 0;
+                break; // some binary stuff found, resetting the state
+              }
+            }
+            state = (state === 3 ? 4 : 0);
+            break;
+          case 0x45:
+            state = 2;
+            break;
+          case 0x49:
+            state = (state === 2 ? 3 : 0);
+            break;
+          default:
+            state = 0;
+            break;
+        }
+      }
+
+      var length = (stream.pos - 4) - startPos;
+      var imageStream = stream.makeSubStream(startPos, length, dict);
+
+      // trying to cache repeat images, first we are trying to "warm up" caching
+      // using length, then comparing adler32
+      var MAX_LENGTH_TO_CACHE = 1000;
+      var cacheImage = false, adler32;
+      if (length < MAX_LENGTH_TO_CACHE && this.imageCache.length === length) {
+        var imageBytes = imageStream.getBytes();
+        imageStream.reset();
+
+        var a = 1;
+        var b = 0;
+        for (var i = 0, ii = imageBytes.length; i < ii; ++i) {
+          a = (a + (imageBytes[i] & 0xff)) % 65521;
+          b = (b + a) % 65521;
+        }
+        adler32 = (b << 16) | a;
+
+        if (this.imageCache.stream && this.imageCache.adler32 === adler32) {
+          this.buf2 = Cmd.get('EI');
+          this.shift();
+
+          this.imageCache.stream.reset();
+          return this.imageCache.stream;
+        }
+        cacheImage = true;
+      }
+      if (!cacheImage && !this.imageCache.stream) {
+        this.imageCache.length = length;
+        this.imageCache.stream = null;
+      }
+
+      if (cipherTransform) {
+        imageStream = cipherTransform.createStream(imageStream, length);
+      }
+
+      imageStream = this.filter(imageStream, dict, length);
+      imageStream.dict = dict;
+      if (cacheImage) {
+        imageStream.cacheKey = 'inline_' + length + '_' + adler32;
+        this.imageCache.adler32 = adler32;
+        this.imageCache.stream = imageStream;
+      }
+
+      this.buf2 = Cmd.get('EI');
+      this.shift();
+
+      return imageStream;
+    },
+    fetchIfRef: function Parser_fetchIfRef(obj) {
+      // not relying on the xref.fetchIfRef -- xref might not be set
+      return (isRef(obj) ? this.xref.fetch(obj) : obj);
+    },
+    makeStream: function Parser_makeStream(dict, cipherTransform) {
+      var lexer = this.lexer;
+      var stream = lexer.stream;
+
+      // get stream start position
+      lexer.skipToNextLine();
+      var pos = stream.pos - 1;
+
+      // get length
+      var length = this.fetchIfRef(dict.get('Length'));
+      if (!isInt(length)) {
+        info('Bad ' + length + ' attribute in stream');
+        length = 0;
+      }
+
+      // skip over the stream data
+      stream.pos = pos + length;
+      lexer.nextChar();
+
+      this.shift(); // '>>'
+      this.shift(); // 'stream'
+      if (!isCmd(this.buf1, 'endstream')) {
+        // bad stream length, scanning for endstream
+        stream.pos = pos;
+        var SCAN_BLOCK_SIZE = 2048;
+        var ENDSTREAM_SIGNATURE_LENGTH = 9;
+        var ENDSTREAM_SIGNATURE = [0x65, 0x6E, 0x64, 0x73, 0x74, 0x72, 0x65,
+                                   0x61, 0x6D];
+        var skipped = 0, found = false;
+        while (stream.pos < stream.end) {
+          var scanBytes = stream.peekBytes(SCAN_BLOCK_SIZE);
+          var scanLength = scanBytes.length - ENDSTREAM_SIGNATURE_LENGTH;
+          var found = false, i, j;
+          for (i = 0, j = 0; i < scanLength; i++) {
+            var b = scanBytes[i];
+            if (b !== ENDSTREAM_SIGNATURE[j]) {
+              i -= j;
+              j = 0;
+            } else {
+              j++;
+              if (j >= ENDSTREAM_SIGNATURE_LENGTH) {
+                i++;
+                found = true;
+                break;
+              }
+            }
+          }
+          if (found) {
+            skipped += i - ENDSTREAM_SIGNATURE_LENGTH;
+            stream.pos += i - ENDSTREAM_SIGNATURE_LENGTH;
+            break;
+          }
+          skipped += scanLength;
+          stream.pos += scanLength;
+        }
+        if (!found) {
+          error('Missing endstream');
+        }
+        length = skipped;
+
+        lexer.nextChar();
+        this.shift();
+        this.shift();
+      }
+      this.shift(); // 'endstream'
+
+      stream = stream.makeSubStream(pos, length, dict);
+      if (cipherTransform) {
+        stream = cipherTransform.createStream(stream, length);
+      }
+      stream = this.filter(stream, dict, length);
+      stream.dict = dict;
+      return stream;
+    },
+    filter: function Parser_filter(stream, dict, length) {
+      var filter = this.fetchIfRef(dict.get('Filter', 'F'));
+      var params = this.fetchIfRef(dict.get('DecodeParms', 'DP'));
+      if (isName(filter)) {
+        return this.makeFilter(stream, filter.name, length, params);
+      }
+
+      var maybeLength = length;
+      if (isArray(filter)) {
+        var filterArray = filter;
+        var paramsArray = params;
+        for (var i = 0, ii = filterArray.length; i < ii; ++i) {
+          filter = filterArray[i];
+          if (!isName(filter)) {
+            error('Bad filter name: ' + filter);
+          }
+
+          params = null;
+          if (isArray(paramsArray) && (i in paramsArray)) {
+            params = paramsArray[i];
+          }
+          stream = this.makeFilter(stream, filter.name, maybeLength, params);
+          // after the first stream the length variable is invalid
+          maybeLength = null;
+        }
+      }
+      return stream;
+    },
+    makeFilter: function Parser_makeFilter(stream, name, maybeLength, params) {
+      if (stream.dict.get('Length') === 0) {
+        return new NullStream(stream);
+      }
+      if (name == 'FlateDecode' || name == 'Fl') {
+        if (params) {
+          return new PredictorStream(new FlateStream(stream, maybeLength),
+                                     maybeLength, params);
+        }
+        return new FlateStream(stream, maybeLength);
+      }
+      if (name == 'LZWDecode' || name == 'LZW') {
+        var earlyChange = 1;
+        if (params) {
+          if (params.has('EarlyChange')) {
+            earlyChange = params.get('EarlyChange');
+          }
+          return new PredictorStream(
+            new LZWStream(stream, maybeLength, earlyChange),
+                          maybeLength, params);
+        }
+        return new LZWStream(stream, maybeLength, earlyChange);
+      }
+      if (name == 'DCTDecode' || name == 'DCT') {
+        return new JpegStream(stream, maybeLength, stream.dict, this.xref);
+      }
+      if (name == 'JPXDecode' || name == 'JPX') {
+        return new JpxStream(stream, maybeLength, stream.dict);
+      }
+      if (name == 'ASCII85Decode' || name == 'A85') {
+        return new Ascii85Stream(stream, maybeLength);
+      }
+      if (name == 'ASCIIHexDecode' || name == 'AHx') {
+        return new AsciiHexStream(stream, maybeLength);
+      }
+      if (name == 'CCITTFaxDecode' || name == 'CCF') {
+        return new CCITTFaxStream(stream, maybeLength, params);
+      }
+      if (name == 'RunLengthDecode' || name == 'RL') {
+        return new RunLengthStream(stream, maybeLength);
+      }
+      if (name == 'JBIG2Decode') {
+        return new Jbig2Stream(stream, maybeLength, stream.dict);
+      }
+      warn('filter "' + name + '" not supported yet');
+      return stream;
+    }
+  };
+
+  return Parser;
+})();
+
+var Lexer = (function LexerClosure() {
+  function Lexer(stream, knownCommands) {
+    this.stream = stream;
+    this.nextChar();
+
+    // While lexing, we build up many strings one char at a time. Using += for
+    // this can result in lots of garbage strings. It's better to build an
+    // array of single-char strings and then join() them together at the end.
+    // And reusing a single array (i.e. |this.strBuf|) over and over for this
+    // purpose uses less memory than using a new array for each string.
+    this.strBuf = [];
+
+    // The PDFs might have "glued" commands with other commands, operands or
+    // literals, e.g. "q1". The knownCommands is a dictionary of the valid
+    // commands and their prefixes. The prefixes are built the following way:
+    // if there a command that is a prefix of the other valid command or
+    // literal (e.g. 'f' and 'false') the following prefixes must be included,
+    // 'fa', 'fal', 'fals'. The prefixes are not needed, if the command has no
+    // other commands or literals as a prefix. The knowCommands is optional.
+    this.knownCommands = knownCommands;
+  }
+
+  Lexer.isSpace = function Lexer_isSpace(ch) {
+    // Space is one of the following characters: SPACE, TAB, CR or LF.
+    return (ch === 0x20 || ch === 0x09 || ch === 0x0D || ch === 0x0A);
+  };
+
+  // A '1' in this array means the character is white space. A '1' or
+  // '2' means the character ends a name or command.
+  var specialChars = [
+    1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, // 0x
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
+    1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, // 2x
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, // 3x
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 4x
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, // 5x
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 6x
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, // 7x
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ax
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // bx
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // cx
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // dx
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ex
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0  // fx
+  ];
+
+  function toHexDigit(ch) {
+    if (ch >= 0x30 && ch <= 0x39) { // '0'-'9'
+      return ch & 0x0F;
+    }
+    if ((ch >= 0x41 && ch <= 0x46) || (ch >= 0x61 && ch <= 0x66)) {
+      // 'A'-'F', 'a'-'f'
+      return (ch & 0x0F) + 9;
+    }
+    return -1;
+  }
+
+  Lexer.prototype = {
+    nextChar: function Lexer_nextChar() {
+      return (this.currentChar = this.stream.getByte());
+    },
+    peekChar: function Lexer_peekChar() {
+      return this.stream.peekBytes(1)[0];
+    },
+    getNumber: function Lexer_getNumber() {
+      var ch = this.currentChar;
+      var eNotation = false;
+      var divideBy = 0; // different from 0 if it's a floating point value
+      var sign = 1;
+
+      if (ch === 0x2D) { // '-'
+        sign = -1;
+        ch = this.nextChar();
+      } else if (ch === 0x2B) { // '+'
+        ch = this.nextChar();
+      }
+      if (ch === 0x2E) { // '.'
+        divideBy = 10;
+        ch = this.nextChar();
+      }
+      if (ch < 0x30 || ch > 0x39) { // '0' - '9'
+        error('Invalid number: ' + String.fromCharCode(ch));
+        return 0;
+      }
+
+      var baseValue = ch - 0x30; // '0'
+      var powerValue = 0;
+      var powerValueSign = 1;
+
+      while ((ch = this.nextChar()) >= 0) {
+        if (0x30 <= ch && ch <= 0x39) { // '0' - '9'
+          var currentDigit = ch - 0x30; // '0'
+          if (eNotation) { // We are after an 'e' or 'E'
+            powerValue = powerValue * 10 + currentDigit;
+          } else {
+            if (divideBy !== 0) { // We are after a point
+              divideBy *= 10;
+            }
+            baseValue = baseValue * 10 + currentDigit;
+          }
+        } else if (ch === 0x2E) { // '.'
+          if (divideBy === 0) {
+            divideBy = 1;
+          } else {
+            // A number can have only one '.'
+            break;
+          }
+        } else if (ch === 0x2D) { // '-'
+          // ignore minus signs in the middle of numbers to match
+          // Adobe's behavior
+          warn('Badly formated number');
+        } else if (ch === 0x45 || ch === 0x65) { // 'E', 'e'
+          // 'E' can be either a scientific notation or the beginning of a new
+          // operator
+          var hasE = true;
+          ch = this.peekChar();
+          if (ch === 0x2B || ch === 0x2D) { // '+', '-'
+            powerValueSign = (ch === 0x2D) ? -1 : 1;
+            this.nextChar(); // Consume the sign character
+          } else if (ch < 0x30 || ch > 0x39) { // '0' - '9'
+            // The 'E' must be the beginning of a new operator
+            break;
+          }
+          eNotation = true;
+        } else {
+          // the last character doesn't belong to us
+          break;
+        }
+      }
+
+      if (divideBy !== 0) {
+        baseValue /= divideBy;
+      }
+      if (eNotation) {
+        baseValue *= Math.pow(10, powerValueSign * powerValue);
+      }
+      return sign * baseValue;
+    },
+    getString: function Lexer_getString() {
+      var numParen = 1;
+      var done = false;
+      var strBuf = this.strBuf;
+      strBuf.length = 0;
+
+      var ch = this.nextChar();
+      while (true) {
+        var charBuffered = false;
+        switch (ch | 0) {
+          case -1:
+            warn('Unterminated string');
+            done = true;
+            break;
+          case 0x28: // '('
+            ++numParen;
+            strBuf.push('(');
+            break;
+          case 0x29: // ')'
+            if (--numParen === 0) {
+              this.nextChar(); // consume strings ')'
+              done = true;
+            } else {
+              strBuf.push(')');
+            }
+            break;
+          case 0x5C: // '\\'
+            ch = this.nextChar();
+            switch (ch) {
+              case -1:
+                warn('Unterminated string');
+                done = true;
+                break;
+              case 0x6E: // 'n'
+                strBuf.push('\n');
+                break;
+              case 0x72: // 'r'
+                strBuf.push('\r');
+                break;
+              case 0x74: // 't'
+                strBuf.push('\t');
+                break;
+              case 0x62: // 'b'
+                strBuf.push('\b');
+                break;
+              case 0x66: // 'f'
+                strBuf.push('\f');
+                break;
+              case 0x5C: // '\'
+              case 0x28: // '('
+              case 0x29: // ')'
+                strBuf.push(String.fromCharCode(ch));
+                break;
+              case 0x30: case 0x31: case 0x32: case 0x33: // '0'-'3'
+              case 0x34: case 0x35: case 0x36: case 0x37: // '4'-'7'
+                var x = ch & 0x0F;
+                ch = this.nextChar();
+                charBuffered = true;
+                if (ch >= 0x30 && ch <= 0x37) { // '0'-'7'
+                  x = (x << 3) + (ch & 0x0F);
+                  ch = this.nextChar();
+                  if (ch >= 0x30 && ch <= 0x37) {  // '0'-'7'
+                    charBuffered = false;
+                    x = (x << 3) + (ch & 0x0F);
+                  }
+                }
+                strBuf.push(String.fromCharCode(x));
+                break;
+              case 0x0D: // CR
+                if (this.peekChar() === 0x0A) { // LF
+                  this.nextChar();
+                }
+                break;
+              case 0x0A: // LF
+                break;
+              default:
+                strBuf.push(String.fromCharCode(ch));
+                break;
+            }
+            break;
+          default:
+            strBuf.push(String.fromCharCode(ch));
+            break;
+        }
+        if (done) {
+          break;
+        }
+        if (!charBuffered) {
+          ch = this.nextChar();
+        }
+      }
+      return strBuf.join('');
+    },
+    getName: function Lexer_getName() {
+      var ch;
+      var strBuf = this.strBuf;
+      strBuf.length = 0;
+      while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) {
+        if (ch === 0x23) { // '#'
+          ch = this.nextChar();
+          var x = toHexDigit(ch);
+          if (x != -1) {
+            var x2 = toHexDigit(this.nextChar());
+            if (x2 == -1) {
+              error('Illegal digit in hex char in name: ' + x2);
+            }
+            strBuf.push(String.fromCharCode((x << 4) | x2));
+          } else {
+            strBuf.push('#', String.fromCharCode(ch));
+          }
+        } else {
+          strBuf.push(String.fromCharCode(ch));
+        }
+      }
+      if (strBuf.length > 128) {
+        error('Warning: name token is longer than allowed by the spec: ' +
+              strBuf.length);
+      }
+      return Name.get(strBuf.join(''));
+    },
+    getHexString: function Lexer_getHexString() {
+      var strBuf = this.strBuf;
+      strBuf.length = 0;
+      var ch = this.currentChar;
+      var isFirstHex = true;
+      var firstDigit;
+      var secondDigit;
+      while (true) {
+        if (ch < 0) {
+          warn('Unterminated hex string');
+          break;
+        } else if (ch === 0x3E) { // '>'
+          this.nextChar();
+          break;
+        } else if (specialChars[ch] === 1) {
+          ch = this.nextChar();
+          continue;
+        } else {
+          if (isFirstHex) {
+            firstDigit = toHexDigit(ch);
+            if (firstDigit === -1) {
+              warn('Ignoring invalid character "' + ch + '" in hex string');
+              ch = this.nextChar();
+              continue;
+            }
+          } else {
+            secondDigit = toHexDigit(ch);
+            if (secondDigit === -1) {
+              warn('Ignoring invalid character "' + ch + '" in hex string');
+              ch = this.nextChar();
+              continue;
+            }
+            strBuf.push(String.fromCharCode((firstDigit << 4) | secondDigit));
+          }
+          isFirstHex = !isFirstHex;
+          ch = this.nextChar();
+        }
+      }
+      return strBuf.join('');
+    },
+    getObj: function Lexer_getObj() {
+      // skip whitespace and comments
+      var comment = false;
+      var ch = this.currentChar;
+      while (true) {
+        if (ch < 0) {
+          return EOF;
+        }
+        if (comment) {
+          if (ch === 0x0A || ch == 0x0D) { // LF, CR
+            comment = false;
+          }
+        } else if (ch === 0x25) { // '%'
+          comment = true;
+        } else if (specialChars[ch] !== 1) {
+          break;
+        }
+        ch = this.nextChar();
+      }
+
+      // start reading token
+      switch (ch | 0) {
+        case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: // '0'-'4'
+        case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: // '5'-'9'
+        case 0x2B: case 0x2D: case 0x2E: // '+', '-', '.'
+          return this.getNumber();
+        case 0x28: // '('
+          return this.getString();
+        case 0x2F: // '/'
+          return this.getName();
+        // array punctuation
+        case 0x5B: // '['
+          this.nextChar();
+          return Cmd.get('[');
+        case 0x5D: // ']'
+          this.nextChar();
+          return Cmd.get(']');
+        // hex string or dict punctuation
+        case 0x3C: // '<'
+          ch = this.nextChar();
+          if (ch === 0x3C) {
+            // dict punctuation
+            this.nextChar();
+            return Cmd.get('<<');
+          }
+          return this.getHexString();
+        // dict punctuation
+        case 0x3E: // '>'
+          ch = this.nextChar();
+          if (ch === 0x3E) {
+            this.nextChar();
+            return Cmd.get('>>');
+          }
+          return Cmd.get('>');
+        case 0x7B: // '{'
+          this.nextChar();
+          return Cmd.get('{');
+        case 0x7D: // '}'
+          this.nextChar();
+          return Cmd.get('}');
+        case 0x29: // ')'
+          error('Illegal character: ' + ch);
+          break;
+      }
+
+      // command
+      var str = String.fromCharCode(ch);
+      var knownCommands = this.knownCommands;
+      var knownCommandFound = knownCommands && (str in knownCommands);
+      while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) {
+        // stop if known command is found and next character does not make
+        // the str a command
+        var possibleCommand = str + String.fromCharCode(ch);
+        if (knownCommandFound && !(possibleCommand in knownCommands)) {
+          break;
+        }
+        if (str.length == 128) {
+          error('Command token too long: ' + str.length);
+        }
+        str = possibleCommand;
+        knownCommandFound = knownCommands && (str in knownCommands);
+      }
+      if (str == 'true') {
+        return true;
+      }
+      if (str == 'false') {
+        return false;
+      }
+      if (str == 'null') {
+        return null;
+      }
+      return Cmd.get(str);
+    },
+    skipToNextLine: function Lexer_skipToNextLine() {
+      var stream = this.stream;
+      var ch = this.currentChar;
+      while (ch >= 0) {
+        if (ch === 0x0D) { // CR
+          ch = this.nextChar();
+          if (ch === 0x0A) { // LF
+            this.nextChar();
+          }
+          break;
+        } else if (ch === 0x0A) { // LF
+          this.nextChar();
+          break;
+        }
+        ch = this.nextChar();
+      }
+    }
+  };
+
+  return Lexer;
+})();
+
+var Linearization = (function LinearizationClosure() {
+  function Linearization(stream) {
+    this.parser = new Parser(new Lexer(stream), false, null);
+    var obj1 = this.parser.getObj();
+    var obj2 = this.parser.getObj();
+    var obj3 = this.parser.getObj();
+    this.linDict = this.parser.getObj();
+    if (isInt(obj1) && isInt(obj2) && isCmd(obj3, 'obj') &&
+        isDict(this.linDict)) {
+      var obj = this.linDict.get('Linearized');
+      if (!(isNum(obj) && obj > 0)) {
+        this.linDict = null;
+      }
+    }
+  }
+
+  Linearization.prototype = {
+    getInt: function Linearization_getInt(name) {
+      var linDict = this.linDict;
+      var obj;
+      if (isDict(linDict) && isInt(obj = linDict.get(name)) && obj > 0) {
+        return obj;
+      }
+      error('"' + name + '" field in linearization table is invalid');
+    },
+    getHint: function Linearization_getHint(index) {
+      var linDict = this.linDict;
+      var obj1, obj2;
+      if (isDict(linDict) && isArray(obj1 = linDict.get('H')) &&
+          obj1.length >= 2 && isInt(obj2 = obj1[index]) && obj2 > 0) {
+        return obj2;
+      }
+      error('Hints table in linearization table is invalid: ' + index);
+    },
+    get length() {
+      if (!isDict(this.linDict)) {
+        return 0;
+      }
+      return this.getInt('L');
+    },
+    get hintsOffset() {
+      return this.getHint(0);
+    },
+    get hintsLength() {
+      return this.getHint(1);
+    },
+    get hintsOffset2() {
+      return this.getHint(2);
+    },
+    get hintsLenth2() {
+      return this.getHint(3);
+    },
+    get objectNumberFirst() {
+      return this.getInt('O');
+    },
+    get endFirst() {
+      return this.getInt('E');
+    },
+    get numPages() {
+      return this.getInt('N');
+    },
+    get mainXRefEntriesOffset() {
+      return this.getInt('T');
+    },
+    get pageFirst() {
+      return this.getInt('P');
+    }
+  };
+
+  return Linearization;
+})();
+
+
+
+
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.3.0-alpha5 on Mon Apr 07 2014 18:28:59 GMT-0300 (ART) +
+ + + + + diff --git a/out/scripts/linenumber.js b/out/scripts/linenumber.js new file mode 100644 index 0000000000000..8d52f7eafdb16 --- /dev/null +++ b/out/scripts/linenumber.js @@ -0,0 +1,25 @@ +/*global document */ +(function() { + var source = document.getElementsByClassName('prettyprint source linenums'); + var i = 0; + var lineNumber = 0; + var lineId; + var lines; + var totalLines; + var anchorHash; + + if (source && source[0]) { + anchorHash = document.location.hash.substring(1); + lines = source[0].getElementsByTagName('li'); + totalLines = lines.length; + + for (; i < totalLines; i++) { + lineNumber++; + lineId = 'line' + lineNumber; + lines[i].id = lineId; + if (lineId === anchorHash) { + lines[i].className += ' selected'; + } + } + } +})(); diff --git a/out/scripts/prettify/Apache-License-2.0.txt b/out/scripts/prettify/Apache-License-2.0.txt new file mode 100644 index 0000000000000..d645695673349 --- /dev/null +++ b/out/scripts/prettify/Apache-License-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/out/scripts/prettify/lang-css.js b/out/scripts/prettify/lang-css.js new file mode 100644 index 0000000000000..041e1f5906797 --- /dev/null +++ b/out/scripts/prettify/lang-css.js @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", +/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); diff --git a/out/scripts/prettify/prettify.js b/out/scripts/prettify/prettify.js new file mode 100644 index 0000000000000..eef5ad7e6a076 --- /dev/null +++ b/out/scripts/prettify/prettify.js @@ -0,0 +1,28 @@ +var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; +(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= +[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), +l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, +q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, +q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, +"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), +a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} +for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], +"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], +H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], +J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ +I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), +["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", +/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), +["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", +hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= +!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p p:first-child +{ + margin-top: 0; + padding-top: 0; +} + +.params td.description > p:last-child +{ + margin-bottom: 0; + padding-bottom: 0; +} + +.disabled { + color: #454545; +} diff --git a/out/styles/prettify-jsdoc.css b/out/styles/prettify-jsdoc.css new file mode 100644 index 0000000000000..5a2526e374846 --- /dev/null +++ b/out/styles/prettify-jsdoc.css @@ -0,0 +1,111 @@ +/* JSDoc prettify.js theme */ + +/* plain text */ +.pln { + color: #000000; + font-weight: normal; + font-style: normal; +} + +/* string content */ +.str { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a keyword */ +.kwd { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* a comment */ +.com { + font-weight: normal; + font-style: italic; +} + +/* a type name */ +.typ { + color: #000000; + font-weight: normal; + font-style: normal; +} + +/* a literal value */ +.lit { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* punctuation */ +.pun { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* lisp open bracket */ +.opn { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* lisp close bracket */ +.clo { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* a markup tag name */ +.tag { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a markup attribute name */ +.atn { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a markup attribute value */ +.atv { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a declaration */ +.dec { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* a variable name */ +.var { + color: #000000; + font-weight: normal; + font-style: normal; +} + +/* a function name */ +.fun { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin-top: 0; + margin-bottom: 0; +} diff --git a/out/styles/prettify-tomorrow.css b/out/styles/prettify-tomorrow.css new file mode 100644 index 0000000000000..aa2908c251ea1 --- /dev/null +++ b/out/styles/prettify-tomorrow.css @@ -0,0 +1,132 @@ +/* Tomorrow Theme */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* Pretty printing styles. Used with prettify.js. */ +/* SPAN elements with the classes below are added by prettyprint. */ +/* plain text */ +.pln { + color: #4d4d4c; } + +@media screen { + /* string content */ + .str { + color: #718c00; } + + /* a keyword */ + .kwd { + color: #8959a8; } + + /* a comment */ + .com { + color: #8e908c; } + + /* a type name */ + .typ { + color: #4271ae; } + + /* a literal value */ + .lit { + color: #f5871f; } + + /* punctuation */ + .pun { + color: #4d4d4c; } + + /* lisp open bracket */ + .opn { + color: #4d4d4c; } + + /* lisp close bracket */ + .clo { + color: #4d4d4c; } + + /* a markup tag name */ + .tag { + color: #c82829; } + + /* a markup attribute name */ + .atn { + color: #f5871f; } + + /* a markup attribute value */ + .atv { + color: #3e999f; } + + /* a declaration */ + .dec { + color: #f5871f; } + + /* a variable name */ + .var { + color: #c82829; } + + /* a function name */ + .fun { + color: #4271ae; } } +/* Use higher contrast and text-weight for printable form. */ +@media print, projection { + .str { + color: #060; } + + .kwd { + color: #006; + font-weight: bold; } + + .com { + color: #600; + font-style: italic; } + + .typ { + color: #404; + font-weight: bold; } + + .lit { + color: #044; } + + .pun, .opn, .clo { + color: #440; } + + .tag { + color: #006; + font-weight: bold; } + + .atn { + color: #404; } + + .atv { + color: #060; } } +/* Style */ +/* +pre.prettyprint { + background: white; + font-family: Menlo, Monaco, Consolas, monospace; + font-size: 12px; + line-height: 1.5; + border: 1px solid #ccc; + padding: 10px; } +*/ + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin-top: 0; + margin-bottom: 0; } + +/* IE indents via margin-left */ +li.L0, +li.L1, +li.L2, +li.L3, +li.L4, +li.L5, +li.L6, +li.L7, +li.L8, +li.L9 { + /* */ } + +/* Alternate shading for lines */ +li.L1, +li.L3, +li.L5, +li.L7, +li.L9 { + /* */ } diff --git a/src/core/parser.js b/src/core/parser.js index adc151337fde9..24616537eb058 100644 --- a/src/core/parser.js +++ b/src/core/parser.js @@ -23,7 +23,9 @@ var EOF = {}; /** @function - * @name isEOF */ + * @name isEOF + * @param v + * @return {boolean} true or false */ From 6abb61be39a4eee39ed79345f8c7b388651885fe Mon Sep 17 00:00:00 2001 From: Pablo Alejandro Fiumara Date: Mon, 7 Apr 2014 18:31:49 -0300 Subject: [PATCH 3/9] completed documentation of isEOF function located at src/core/parser.js --- out/global.html | 69 ++++++++++++++++++++++++++++++++++++++++++++-- out/index.html | 2 +- out/parser.js.html | 6 ++-- 3 files changed, 72 insertions(+), 5 deletions(-) diff --git a/out/global.html b/out/global.html index 9578549912184..25232aff095b9 100644 --- a/out/global.html +++ b/out/global.html @@ -91,7 +91,7 @@

Methods

-

isEOF()

+

isEOF(v) → {boolean}

@@ -104,6 +104,49 @@

isEOFParameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
v + +
+
@@ -151,6 +194,28 @@

isEOFReturns:

+ + +
+ true or false +
+ + + +
+
+ Type +
+
+ +boolean + + +
+
+ + @@ -177,7 +242,7 @@

Index

Global

  • diff --git a/out/index.html b/out/index.html index 08d5f4ad183e4..7066fafc336a5 100644 --- a/out/index.html +++ b/out/index.html @@ -54,7 +54,7 @@

    Index

    Global

    • diff --git a/out/parser.js.html b/out/parser.js.html index 66567978d8167..a4e73dfd86a55 100644 --- a/out/parser.js.html +++ b/out/parser.js.html @@ -50,7 +50,9 @@

      Source: parser.js

      var EOF = {}; /** @function - * @name isEOF */ + * @name isEOF + * @param v + * @return {boolean} true or false */ @@ -921,7 +923,7 @@

      Index

      Global

      • From ef2d7e9e2465823dfe2de4b8c6845491dc647fc5 Mon Sep 17 00:00:00 2001 From: Pablo Alejandro Fiumara Date: Tue, 8 Apr 2014 14:52:45 -0300 Subject: [PATCH 4/9] moved API docs from ./out to ./external/jsdoc --- .gitignore | 1 + {out => external/jsdoc}/global.html | 0 {out => external/jsdoc}/index.html | 0 {out => external/jsdoc}/parser.js.html | 0 {out => external/jsdoc}/scripts/linenumber.js | 0 {out => external/jsdoc}/scripts/prettify/Apache-License-2.0.txt | 0 {out => external/jsdoc}/scripts/prettify/lang-css.js | 0 {out => external/jsdoc}/scripts/prettify/prettify.js | 0 {out => external/jsdoc}/styles/jsdoc-default.css | 0 {out => external/jsdoc}/styles/prettify-jsdoc.css | 0 {out => external/jsdoc}/styles/prettify-tomorrow.css | 0 11 files changed, 1 insertion(+) rename {out => external/jsdoc}/global.html (100%) rename {out => external/jsdoc}/index.html (100%) rename {out => external/jsdoc}/parser.js.html (100%) rename {out => external/jsdoc}/scripts/linenumber.js (100%) rename {out => external/jsdoc}/scripts/prettify/Apache-License-2.0.txt (100%) rename {out => external/jsdoc}/scripts/prettify/lang-css.js (100%) rename {out => external/jsdoc}/scripts/prettify/prettify.js (100%) rename {out => external/jsdoc}/styles/jsdoc-default.css (100%) rename {out => external/jsdoc}/styles/prettify-jsdoc.css (100%) rename {out => external/jsdoc}/styles/prettify-tomorrow.css (100%) diff --git a/.gitignore b/.gitignore index 516970e916313..c963f5ccf9a78 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ tags .DS_Store Makefile node_modules/ +nbproject/ diff --git a/out/global.html b/external/jsdoc/global.html similarity index 100% rename from out/global.html rename to external/jsdoc/global.html diff --git a/out/index.html b/external/jsdoc/index.html similarity index 100% rename from out/index.html rename to external/jsdoc/index.html diff --git a/out/parser.js.html b/external/jsdoc/parser.js.html similarity index 100% rename from out/parser.js.html rename to external/jsdoc/parser.js.html diff --git a/out/scripts/linenumber.js b/external/jsdoc/scripts/linenumber.js similarity index 100% rename from out/scripts/linenumber.js rename to external/jsdoc/scripts/linenumber.js diff --git a/out/scripts/prettify/Apache-License-2.0.txt b/external/jsdoc/scripts/prettify/Apache-License-2.0.txt similarity index 100% rename from out/scripts/prettify/Apache-License-2.0.txt rename to external/jsdoc/scripts/prettify/Apache-License-2.0.txt diff --git a/out/scripts/prettify/lang-css.js b/external/jsdoc/scripts/prettify/lang-css.js similarity index 100% rename from out/scripts/prettify/lang-css.js rename to external/jsdoc/scripts/prettify/lang-css.js diff --git a/out/scripts/prettify/prettify.js b/external/jsdoc/scripts/prettify/prettify.js similarity index 100% rename from out/scripts/prettify/prettify.js rename to external/jsdoc/scripts/prettify/prettify.js diff --git a/out/styles/jsdoc-default.css b/external/jsdoc/styles/jsdoc-default.css similarity index 100% rename from out/styles/jsdoc-default.css rename to external/jsdoc/styles/jsdoc-default.css diff --git a/out/styles/prettify-jsdoc.css b/external/jsdoc/styles/prettify-jsdoc.css similarity index 100% rename from out/styles/prettify-jsdoc.css rename to external/jsdoc/styles/prettify-jsdoc.css diff --git a/out/styles/prettify-tomorrow.css b/external/jsdoc/styles/prettify-tomorrow.css similarity index 100% rename from out/styles/prettify-tomorrow.css rename to external/jsdoc/styles/prettify-tomorrow.css From 632be584e60a827fcbb56659de3359f88f34d0e5 Mon Sep 17 00:00:00 2001 From: Pablo Alejandro Fiumara Date: Thu, 10 Apr 2014 14:57:26 -0300 Subject: [PATCH 5/9] added comments to document EOF function at /src/core/parser.js --- src/core/parser.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/core/parser.js b/src/core/parser.js index 24616537eb058..d71856fdbd400 100644 --- a/src/core/parser.js +++ b/src/core/parser.js @@ -21,14 +21,17 @@ 'use strict'; +/** + * + * @global creation of EOF blank object + */ var EOF = {}; + + /** @function * @name isEOF * @param v * @return {boolean} true or false */ - - - function isEOF(v) { return (v == EOF); } From b361e76b585104a5cef04c0fd33af203c264ba15 Mon Sep 17 00:00:00 2001 From: Pablo Alejandro Fiumara Date: Sun, 13 Apr 2014 00:35:08 -0300 Subject: [PATCH 6/9] API documentation designed based on src/display/api.js --- .gitignore | 1 + external/jsdoc/PDFDocumentProxy.html | 1238 ++++++++++++++++++++++++ external/jsdoc/PDFPageProxy.html | 934 ++++++++++++++++++ external/jsdoc/RenderTask.html | 229 +++++ external/jsdoc/api.js.html | 1323 ++++++++++++++++++++++++++ external/jsdoc/global.html | 394 +++++++- external/jsdoc/index.html | 4 +- external/jsdoc/parser.js.html | 932 ------------------ 8 files changed, 4092 insertions(+), 963 deletions(-) create mode 100644 external/jsdoc/PDFDocumentProxy.html create mode 100644 external/jsdoc/PDFPageProxy.html create mode 100644 external/jsdoc/RenderTask.html create mode 100644 external/jsdoc/api.js.html delete mode 100644 external/jsdoc/parser.js.html diff --git a/.gitignore b/.gitignore index c963f5ccf9a78..611ffef02f704 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ tags Makefile node_modules/ nbproject/ +.project diff --git a/external/jsdoc/PDFDocumentProxy.html b/external/jsdoc/PDFDocumentProxy.html new file mode 100644 index 0000000000000..a8d8d17af21e5 --- /dev/null +++ b/external/jsdoc/PDFDocumentProxy.html @@ -0,0 +1,1238 @@ + + + + + JSDoc: Class: PDFDocumentProxy + + + + + + + + + + +
        + +

        Class: PDFDocumentProxy

        + + + + + +
        + +
        +

        + PDFDocumentProxy +

        + +
        + +
        +
        + + + + +
        +

        new PDFDocumentProxy()

        + + +
        +
        + + +
        + Proxy to a PDFDocument in the worker thread. Also, contains commonly used +properties that can be read synchronously. +
        + + + + + + + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + + + + + + + + + + + +
        + + +
        + + + + + + + + + + + + +

        Members

        + +
        + +
        +

        fingerprint

        + + +
        +
        + + + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + +
        + + + +
        +

        numPages

        + + +
        +
        + + + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + +
        + +
        + + + +

        Methods

        + +
        + +
        +

        cleanup()

        + + +
        +
        + + +
        + Cleans up resources allocated by the document, e.g. created @font-face. +
        + + + + + + + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + + + + + + + + + + + +
        + + + +
        +

        destroy()

        + + +
        +
        + + +
        + Destroys current document instance and terminates worker. +
        + + + + + + + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + + + + + + + + + + + +
        + + + +
        +

        getData() → {Promise}

        + + +
        +
        + + + + + + + + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + + + + + + + + + +
        Returns:
        + + +
        + A promise that is resolved with a TypedArray that has +the raw data from the PDF. +
        + + + +
        +
        + Type +
        +
        + +Promise + + +
        +
        + + + + +
        + + + +
        +

        getDestinations() → {Promise}

        + + +
        +
        + + + + + + + + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + + + + + + + + + +
        Returns:
        + + +
        + A promise that is resolved with a lookup table for +mapping named destinations to reference numbers. +
        + + + +
        +
        + Type +
        +
        + +Promise + + +
        +
        + + + + +
        + + + +
        +

        getDownloadInfo() → {Promise}

        + + +
        +
        + + + + + + + + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + + + + + + + + + +
        Returns:
        + + +
        + A promise that is resolved when the document's data +is loaded. It is resolved with an {Object} that contains the length +property that indicates size of the PDF data in bytes. +
        + + + +
        +
        + Type +
        +
        + +Promise + + +
        +
        + + + + +
        + + + +
        +

        getJavaScript() → {Promise}

        + + +
        +
        + + + + + + + + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + + + + + + + + + +
        Returns:
        + + +
        + A promise that is resolved with an array of all the +JavaScript strings in the name tree. +
        + + + +
        +
        + Type +
        +
        + +Promise + + +
        +
        + + + + +
        + + + +
        +

        getMetadata() → {Promise}

        + + +
        +
        + + + + + + + + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + + + + + + + + + +
        Returns:
        + + +
        + A promise that is resolved with an {Object} that has +info and metadata properties. Info is an {Object} filled with anything +available in the information dictionary and similarly metadata is a +{Metadata} object with information from the metadata section of the PDF. +
        + + + +
        +
        + Type +
        +
        + +Promise + + +
        +
        + + + + +
        + + + +
        +

        getOutline() → {Promise}

        + + +
        +
        + + + + + + + + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + + + + + + + + + +
        Returns:
        + + +
        + A promise that is resolved with an {Array} that is a +tree outline (if it has one) of the PDF. The tree is in the format of: +[ + { + title: string, + bold: boolean, + italic: boolean, + color: rgb array, + dest: dest obj, + items: array of more items like this + }, + ... +]. +
        + + + +
        +
        + Type +
        +
        + +Promise + + +
        +
        + + + + +
        + + + +
        +

        getPage(pageNumber) → {Promise}

        + + +
        +
        + + + + + + + + +
        Parameters:
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        NameTypeDescription
        pageNumber + + +number + + + + The page number to get. The first page is 1.
        + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + + + + + + + + + +
        Returns:
        + + +
        + A promise that is resolved with a PDFPageProxy +object. +
        + + + +
        +
        + Type +
        +
        + +Promise + + +
        +
        + + + + +
        + + + +
        +

        getPageIndex(ref) → {Promise}

        + + +
        +
        + + + + + + + + +
        Parameters:
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        NameTypeDescription
        ref + + +Object + + + + The page reference. Must have + the 'num' and 'gen' properties.
        + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + + + + + + + + + +
        Returns:
        + + +
        + A promise that is resolved with the page index that is +associated with the reference. +
        + + + +
        +
        + Type +
        +
        + +Promise + + +
        +
        + + + + +
        + +
        + + + + + +
        + +
        + + + + +
        + + + +
        + +
        + Documentation generated by JSDoc 3.3.0-alpha5 on Sun Apr 13 2014 00:33:02 GMT-0300 (ART) +
        + + + + + \ No newline at end of file diff --git a/external/jsdoc/PDFPageProxy.html b/external/jsdoc/PDFPageProxy.html new file mode 100644 index 0000000000000..a677206c847f9 --- /dev/null +++ b/external/jsdoc/PDFPageProxy.html @@ -0,0 +1,934 @@ + + + + + JSDoc: Class: PDFPageProxy + + + + + + + + + + +
        + +

        Class: PDFPageProxy

        + + + + + +
        + +
        +

        + PDFPageProxy +

        + +
        + +
        +
        + + + + +
        +

        new PDFPageProxy()

        + + +
        +
        + + +
        + Proxy to a PDFPage in the worker thread. +
        + + + + + + + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + + + + + + + + + + + +
        + + +
        + + + + + + + + + + + + +

        Members

        + +
        + +
        +

        pageNumber

        + + +
        +
        + + + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + +
        + + + +
        +

        ref

        + + +
        +
        + + + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + +
        + + + +
        +

        rotate

        + + +
        +
        + + + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + +
        + + + +
        +

        view

        + + +
        +
        + + + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + +
        + +
        + + + +

        Methods

        + +
        + +
        +

        destroy()

        + + +
        +
        + + +
        + Destroys resources allocated by the page. +
        + + + + + + + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + + + + + + + + + + + +
        + + + +
        +

        getAnnotations() → {Promise}

        + + +
        +
        + + + + + + + + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + + + + + + + + + +
        Returns:
        + + +
        + A promise that is resolved with an {Array} of the +annotation objects. +
        + + + +
        +
        + Type +
        +
        + +Promise + + +
        +
        + + + + +
        + + + +
        +

        getTextContent() → {Promise}

        + + +
        +
        + + + + + + + + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + + + + + + + + + +
        Returns:
        + + +
        + That is resolved with the array of BidiText +objects that represent the page text content. +
        + + + +
        +
        + Type +
        +
        + +Promise + + +
        +
        + + + + +
        + + + +
        +

        getViewport(scale, rotate) → {PageViewport}

        + + +
        +
        + + + + + + + + +
        Parameters:
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        NameTypeDescription
        scale + + +number + + + + The desired scale of the viewport.
        rotate + + +number + + + + Degrees to rotate the viewport. If omitted this +defaults to the page rotation.
        + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + + + + + + + + + +
        Returns:
        + + +
        + Contains 'width' and 'height' properties along +with transforms required for rendering. +
        + + + +
        +
        + Type +
        +
        + +PageViewport + + +
        +
        + + + + +
        + + + +
        +

        render(params) → {RenderTask}

        + + +
        +
        + + +
        + Begins the process of rendering a page to the desired context. +
        + + + + + + + +
        Parameters:
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        NameTypeDescription
        params + + +Object + + + + A parameter object that supports: +{ + canvasContext(required): A 2D context of a DOM Canvas object., + textLayer(optional): An object that has beginLayout, endLayout, and + appendText functions., + imageLayer(optional): An object that has beginLayout, endLayout and + appendImage functions., + continueCallback(optional): A function that will be called each time + the rendering is paused. To continue + rendering call the function that is the + first argument to the callback. +}.
        + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + + + + + + + + + +
        Returns:
        + + +
        + An extended promise that is resolved when the page +finishes rendering (see RenderTask). +
        + + + +
        +
        + Type +
        +
        + +RenderTask + + +
        +
        + + + + +
        + +
        + + + + + +
        + +
        + + + + +
        + + + +
        + +
        + Documentation generated by JSDoc 3.3.0-alpha5 on Sun Apr 13 2014 00:33:02 GMT-0300 (ART) +
        + + + + + \ No newline at end of file diff --git a/external/jsdoc/RenderTask.html b/external/jsdoc/RenderTask.html new file mode 100644 index 0000000000000..d5f39c504b173 --- /dev/null +++ b/external/jsdoc/RenderTask.html @@ -0,0 +1,229 @@ + + + + + JSDoc: Class: RenderTask + + + + + + + + + + +
        + +

        Class: RenderTask

        + + + + + +
        + +
        +

        + RenderTask +

        + +
        + +
        +
        + + + + +
        +

        new RenderTask()

        + + +
        +
        + + +
        + Allows controlling of the rendering tasks. +
        + + + + + + + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + + + + + + + + + + + +
        + + +
        + + + + + + + + + + + + + + +

        Methods

        + +
        + +
        +

        cancel()

        + + +
        +
        + + +
        + Cancels the rendering task. If the task is currently rendering it will +not be cancelled until graphics pauses with a timeout. The promise that +this object extends will resolved when cancelled. +
        + + + + + + + + + +
        + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + + +
        + + + + + + + + + + + + + + + +
        + +
        + + + + + +
        + +
        + + + + +
        + + + +
        + +
        + Documentation generated by JSDoc 3.3.0-alpha5 on Sun Apr 13 2014 00:33:02 GMT-0300 (ART) +
        + + + + + \ No newline at end of file diff --git a/external/jsdoc/api.js.html b/external/jsdoc/api.js.html new file mode 100644 index 0000000000000..a739e7bcd20cf --- /dev/null +++ b/external/jsdoc/api.js.html @@ -0,0 +1,1323 @@ + + + + + JSDoc: Source: api.js + + + + + + + + + + +
        + +

        Source: api.js

        + + + + + +
        +
        +
        /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
        +/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
        +/* 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 CanvasGraphics, combineUrl, createScratchCanvas, error,
        +           FontLoader, globalScope, info, isArrayBuffer, loadJpegStream,
        +           MessageHandler, PDFJS, Promise, StatTimer, warn,
        +           PasswordResponses, Util, loadScript, LegacyPromise,
        +           FontFace */
        +
        +'use strict';
        +
        +/**
        + * The maximum allowed image size in total pixels e.g. width * height. Images
        + * above this value will not be drawn. Use -1 for no limit.
        + * @var {number}
        + */
        +PDFJS.maxImageSize = (PDFJS.maxImageSize === undefined ?
        +                      -1 : PDFJS.maxImageSize);
        +
        +/**
        + * The url of where the predefined Adobe CMaps are located. Include trailing
        + * slash.
        + * @var {string}
        + */
        +PDFJS.cMapUrl = (PDFJS.cMapUrl === undefined ? null : PDFJS.cMapUrl);
        +
        +/**
        + * Specifies if CMaps are binary packed.
        + * @var {boolean}
        + */
        +PDFJS.cMapPacked = PDFJS.cMapPacked === undefined ? false : PDFJS.cMapPacked;
        +
        +/*
        + * By default fonts are converted to OpenType fonts and loaded via font face
        + * rules. If disabled, the font will be rendered using a built in font renderer
        + * that constructs the glyphs with primitive path commands.
        + * @var {boolean}
        + */
        +PDFJS.disableFontFace = (PDFJS.disableFontFace === undefined ?
        +                         false : PDFJS.disableFontFace);
        +
        +/**
        + * Path for image resources, mainly for annotation icons. Include trailing
        + * slash.
        + * @var {string}
        + */
        +PDFJS.imageResourcesPath = (PDFJS.imageResourcesPath === undefined ?
        +                            '' : PDFJS.imageResourcesPath);
        +
        +/**
        + * Disable the web worker and run all code on the main thread. This will happen
        + * automatically if the browser doesn't support workers or sending typed arrays
        + * to workers.
        + * @var {boolean}
        + */
        +PDFJS.disableWorker = (PDFJS.disableWorker === undefined ?
        +                       false : PDFJS.disableWorker);
        +
        +/**
        + * Path and filename of the worker file. Required when the worker is enabled in
        + * development mode. If unspecified in the production build, the worker will be
        + * loaded based on the location of the pdf.js file.
        + * @var {string}
        + */
        +PDFJS.workerSrc = (PDFJS.workerSrc === undefined ? null : PDFJS.workerSrc);
        +
        +/**
        + * Disable range request loading of PDF files. When enabled and if the server
        + * supports partial content requests then the PDF will be fetched in chunks.
        + * Enabled (false) by default.
        + * @var {boolean}
        + */
        +PDFJS.disableRange = (PDFJS.disableRange === undefined ?
        +                      false : PDFJS.disableRange);
        +
        +/**
        + * Disable pre-fetching of PDF file data. When range requests are enabled PDF.js
        + * will automatically keep fetching more data even if it isn't needed to display
        + * the current page. This default behavior can be disabled.
        + * @var {boolean}
        + */
        +PDFJS.disableAutoFetch = (PDFJS.disableAutoFetch === undefined ?
        +                          false : PDFJS.disableAutoFetch);
        +
        +/**
        + * Enables special hooks for debugging PDF.js.
        + * @var {boolean}
        + */
        +PDFJS.pdfBug = (PDFJS.pdfBug === undefined ? false : PDFJS.pdfBug);
        +
        +/**
        + * Enables transfer usage in postMessage for ArrayBuffers.
        + * @var {boolean}
        + */
        +PDFJS.postMessageTransfers = (PDFJS.postMessageTransfers === undefined ?
        +                              true : PDFJS.postMessageTransfers);
        +
        +/**
        + * Disables URL.createObjectURL usage.
        + * @var {boolean}
        + */
        +PDFJS.disableCreateObjectURL = (PDFJS.disableCreateObjectURL === undefined ?
        +                                false : PDFJS.disableCreateObjectURL);
        +
        +/**
        + * Controls the logging level.
        + * The constants from PDFJS.VERBOSITY_LEVELS should be used:
        + * - errors
        + * - warnings [default]
        + * - infos
        + * @var {number}
        + */
        +PDFJS.verbosity = (PDFJS.verbosity === undefined ?
        +                   PDFJS.VERBOSITY_LEVELS.warnings : PDFJS.verbosity);
        +
        +/**
        + * Document initialization / loading parameters object.
        + *
        + * @typedef {Object} DocumentInitParameters
        + * @property {string}     url   - The URL of the PDF.
        + * @property {TypedArray} data  - A typed array with PDF data.
        + * @property {Object}     httpHeaders - Basic authentication headers.
        + * @property {boolean}    withCredentials - Indicates whether or not cross-site
        + *   Access-Control requests should be made using credentials such as cookies
        + *   or authorization headers. The default is false.
        + * @property {string}     password - For decrypting password-protected PDFs.
        + * @property {TypedArray} initialData - A typed array with the first portion or
        + *   all of the pdf data. Used by the extension since some data is already
        + *   loaded before the switch to range requests.
        + */
        +
        +/**
        + * This is the main entry point for loading a PDF and interacting with it.
        + * NOTE: If a URL is used to fetch the PDF data a standard XMLHttpRequest(XHR)
        + * is used, which means it must follow the same origin rules that any XHR does
        + * e.g. No cross domain requests without CORS.
        + *
        + * @param {string|TypedArray|DocumentInitParameters} source Can be a url to
        + * where a PDF is located, a typed array (Uint8Array) already populated with
        + * data or parameter object.
        + *
        + * @param {Object} pdfDataRangeTransport is optional. It is used if you want
        + * to manually serve range requests for data in the PDF. See viewer.js for
        + * an example of pdfDataRangeTransport's interface.
        + *
        + * @param {function} passwordCallback is optional. It is used to request a
        + * password if wrong or no password was provided. The callback receives two
        + * parameters: function that needs to be called with new password and reason
        + * (see {PasswordResponses}).
        + *
        + * @return {Promise} A promise that is resolved with {@link PDFDocumentProxy}
        + *   object.
        + */
        +PDFJS.getDocument = function getDocument(source,
        +                                         pdfDataRangeTransport,
        +                                         passwordCallback,
        +                                         progressCallback) {
        +  var workerInitializedPromise, workerReadyPromise, transport;
        +
        +  if (typeof source === 'string') {
        +    source = { url: source };
        +  } else if (isArrayBuffer(source)) {
        +    source = { data: source };
        +  } else if (typeof source !== 'object') {
        +    error('Invalid parameter in getDocument, need either Uint8Array, ' +
        +          'string or a parameter object');
        +  }
        +
        +  if (!source.url && !source.data) {
        +    error('Invalid parameter array, need either .data or .url');
        +  }
        +
        +  // copy/use all keys as is except 'url' -- full path is required
        +  var params = {};
        +  for (var key in source) {
        +    if (key === 'url' && typeof window !== 'undefined') {
        +      params[key] = combineUrl(window.location.href, source[key]);
        +      continue;
        +    }
        +    params[key] = source[key];
        +  }
        +
        +  workerInitializedPromise = new PDFJS.LegacyPromise();
        +  workerReadyPromise = new PDFJS.LegacyPromise();
        +  transport = new WorkerTransport(workerInitializedPromise, workerReadyPromise,
        +                                  pdfDataRangeTransport, progressCallback);
        +  workerInitializedPromise.then(function transportInitialized() {
        +    transport.passwordCallback = passwordCallback;
        +    transport.fetchDocument(params);
        +  });
        +  return workerReadyPromise;
        +};
        +
        +/**
        + * Proxy to a PDFDocument in the worker thread. Also, contains commonly used
        + * properties that can be read synchronously.
        + * @class
        + */
        +var PDFDocumentProxy = (function PDFDocumentProxyClosure() {
        +  function PDFDocumentProxy(pdfInfo, transport) {
        +    this.pdfInfo = pdfInfo;
        +    this.transport = transport;
        +  }
        +  PDFDocumentProxy.prototype = /** @lends PDFDocumentProxy.prototype */ {
        +    /**
        +     * @return {number} Total number of pages the PDF contains.
        +     */
        +    get numPages() {
        +      return this.pdfInfo.numPages;
        +    },
        +    /**
        +     * @return {string} A unique ID to identify a PDF. Not guaranteed to be
        +     * unique.
        +     */
        +    get fingerprint() {
        +      return this.pdfInfo.fingerprint;
        +    },
        +    /**
        +     * @param {number} pageNumber The page number to get. The first page is 1.
        +     * @return {Promise} A promise that is resolved with a {@link PDFPageProxy}
        +     * object.
        +     */
        +    getPage: function PDFDocumentProxy_getPage(pageNumber) {
        +      return this.transport.getPage(pageNumber);
        +    },
        +    /**
        +     * @param {{num: number, gen: number}} ref The page reference. Must have
        +     *   the 'num' and 'gen' properties.
        +     * @return {Promise} A promise that is resolved with the page index that is
        +     * associated with the reference.
        +     */
        +    getPageIndex: function PDFDocumentProxy_getPageIndex(ref) {
        +      return this.transport.getPageIndex(ref);
        +    },
        +    /**
        +     * @return {Promise} A promise that is resolved with a lookup table for
        +     * mapping named destinations to reference numbers.
        +     */
        +    getDestinations: function PDFDocumentProxy_getDestinations() {
        +      return this.transport.getDestinations();
        +    },
        +    /**
        +     * @return {Promise} A promise that is resolved with an array of all the
        +     * JavaScript strings in the name tree.
        +     */
        +    getJavaScript: function PDFDocumentProxy_getJavaScript() {
        +      var promise = new PDFJS.LegacyPromise();
        +      var js = this.pdfInfo.javaScript;
        +      promise.resolve(js);
        +      return promise;
        +    },
        +    /**
        +     * @return {Promise} A promise that is resolved with an {Array} that is a
        +     * tree outline (if it has one) of the PDF. The tree is in the format of:
        +     * [
        +     *  {
        +     *   title: string,
        +     *   bold: boolean,
        +     *   italic: boolean,
        +     *   color: rgb array,
        +     *   dest: dest obj,
        +     *   items: array of more items like this
        +     *  },
        +     *  ...
        +     * ].
        +     */
        +    getOutline: function PDFDocumentProxy_getOutline() {
        +      var promise = new PDFJS.LegacyPromise();
        +      var outline = this.pdfInfo.outline;
        +      promise.resolve(outline);
        +      return promise;
        +    },
        +    /**
        +     * @return {Promise} A promise that is resolved with an {Object} that has
        +     * info and metadata properties.  Info is an {Object} filled with anything
        +     * available in the information dictionary and similarly metadata is a
        +     * {Metadata} object with information from the metadata section of the PDF.
        +     */
        +    getMetadata: function PDFDocumentProxy_getMetadata() {
        +      var promise = new PDFJS.LegacyPromise();
        +      var info = this.pdfInfo.info;
        +      var metadata = this.pdfInfo.metadata;
        +      promise.resolve({
        +        info: info,
        +        metadata: (metadata ? new PDFJS.Metadata(metadata) : null)
        +      });
        +      return promise;
        +    },
        +    /**
        +     * @return {Promise} A promise that is resolved with a TypedArray that has
        +     * the raw data from the PDF.
        +     */
        +    getData: function PDFDocumentProxy_getData() {
        +      var promise = new PDFJS.LegacyPromise();
        +      this.transport.getData(promise);
        +      return promise;
        +    },
        +    /**
        +     * @return {Promise} A promise that is resolved when the document's data
        +     * is loaded. It is resolved with an {Object} that contains the length
        +     * property that indicates size of the PDF data in bytes.
        +     */
        +    getDownloadInfo: function PDFDocumentProxy_getDownloadInfo() {
        +      return this.transport.downloadInfoPromise;
        +    },
        +    /**
        +     * Cleans up resources allocated by the document, e.g. created @font-face.
        +     */
        +    cleanup: function PDFDocumentProxy_cleanup() {
        +      this.transport.startCleanup();
        +    },
        +    /**
        +     * Destroys current document instance and terminates worker.
        +     */
        +    destroy: function PDFDocumentProxy_destroy() {
        +      this.transport.destroy();
        +    }
        +  };
        +  return PDFDocumentProxy;
        +})();
        +
        +/**
        + * Page text content part.
        + *
        + * @typedef {Object} BidiText
        + * @property {string} str - text content.
        + * @property {string} dir - text direction: 'ttb', 'ltr' or 'rtl'.
        + * @property {number} x - x position of the text on the page.
        + * @property {number} y - y position of the text on the page.
        + * @property {number} angle - text rotation.
        + * @property {number} size - font size.
        + */
        +
        +/**
        + * Proxy to a PDFPage in the worker thread.
        + * @class
        + */
        +var PDFPageProxy = (function PDFPageProxyClosure() {
        +  function PDFPageProxy(pageInfo, transport) {
        +    this.pageInfo = pageInfo;
        +    this.transport = transport;
        +    this.stats = new StatTimer();
        +    this.stats.enabled = !!globalScope.PDFJS.enableStats;
        +    this.commonObjs = transport.commonObjs;
        +    this.objs = new PDFObjects();
        +    this.cleanupAfterRender = false;
        +    this.pendingDestroy = false;
        +    this.intentStates = {};
        +  }
        +  PDFPageProxy.prototype = /** @lends PDFPageProxy.prototype */ {
        +    /**
        +     * @return {number} Page number of the page. First page is 1.
        +     */
        +    get pageNumber() {
        +      return this.pageInfo.pageIndex + 1;
        +    },
        +    /**
        +     * @return {number} The number of degrees the page is rotated clockwise.
        +     */
        +    get rotate() {
        +      return this.pageInfo.rotate;
        +    },
        +    /**
        +     * @return {Object} The reference that points to this page. It has 'num' and
        +     * 'gen' properties.
        +     */
        +    get ref() {
        +      return this.pageInfo.ref;
        +    },
        +    /**
        +     * @return {Array} An array of the visible portion of the PDF page in the
        +     * user space units - [x1, y1, x2, y2].
        +     */
        +    get view() {
        +      return this.pageInfo.view;
        +    },
        +    /**
        +     * @param {number} scale The desired scale of the viewport.
        +     * @param {number} rotate Degrees to rotate the viewport. If omitted this
        +     * defaults to the page rotation.
        +     * @return {PageViewport} Contains 'width' and 'height' properties along
        +     * with transforms required for rendering.
        +     */
        +    getViewport: function PDFPageProxy_getViewport(scale, rotate) {
        +      if (arguments.length < 2) {
        +        rotate = this.rotate;
        +      }
        +      return new PDFJS.PageViewport(this.view, scale, rotate, 0, 0);
        +    },
        +    /**
        +     * @return {Promise} A promise that is resolved with an {Array} of the
        +     * annotation objects.
        +     */
        +    getAnnotations: function PDFPageProxy_getAnnotations() {
        +      if (this.annotationsPromise) {
        +        return this.annotationsPromise;
        +      }
        +
        +      var promise = new PDFJS.LegacyPromise();
        +      this.annotationsPromise = promise;
        +      this.transport.getAnnotations(this.pageInfo.pageIndex);
        +      return promise;
        +    },
        +    /**
        +     * Begins the process of rendering a page to the desired context.
        +     * @param {Object} params A parameter object that supports:
        +     * {
        +     *   canvasContext(required): A 2D context of a DOM Canvas object.,
        +     *   textLayer(optional): An object that has beginLayout, endLayout, and
        +     *                        appendText functions.,
        +     *   imageLayer(optional): An object that has beginLayout, endLayout and
        +     *                         appendImage functions.,
        +     *   continueCallback(optional): A function that will be called each time
        +     *                               the rendering is paused.  To continue
        +     *                               rendering call the function that is the
        +     *                               first argument to the callback.
        +     * }.
        +     * @return {RenderTask} An extended promise that is resolved when the page
        +     * finishes rendering (see RenderTask).
        +     */
        +    render: function PDFPageProxy_render(params) {
        +      var stats = this.stats;
        +      stats.time('Overall');
        +
        +      // If there was a pending destroy cancel it so no cleanup happens during
        +      // this call to render.
        +      this.pendingDestroy = false;
        +
        +      var renderingIntent = ('intent' in params ?
        +        (params.intent == 'print' ? 'print' : 'display') : 'display');
        +
        +      if (!this.intentStates[renderingIntent]) {
        +        this.intentStates[renderingIntent] = {};
        +      }
        +      var intentState = this.intentStates[renderingIntent];
        +
        +      // If there is no displayReadyPromise yet, then the operatorList was never
        +      // requested before. Make the request and create the promise.
        +      if (!intentState.displayReadyPromise) {
        +        intentState.receivingOperatorList = true;
        +        intentState.displayReadyPromise = new LegacyPromise();
        +        intentState.operatorList = {
        +          fnArray: [],
        +          argsArray: [],
        +          lastChunk: false
        +        };
        +
        +        this.stats.time('Page Request');
        +        this.transport.messageHandler.send('RenderPageRequest', {
        +          pageIndex: this.pageNumber - 1,
        +          intent: renderingIntent
        +        });
        +      }
        +
        +      var internalRenderTask = new InternalRenderTask(complete, params,
        +                                                      this.objs,
        +                                                      this.commonObjs,
        +                                                      intentState.operatorList,
        +                                                      this.pageNumber);
        +      if (!intentState.renderTasks) {
        +        intentState.renderTasks = [];
        +      }
        +      intentState.renderTasks.push(internalRenderTask);
        +      var renderTask = new RenderTask(internalRenderTask);
        +
        +      var self = this;
        +      intentState.displayReadyPromise.then(
        +        function pageDisplayReadyPromise(transparency) {
        +          if (self.pendingDestroy) {
        +            complete();
        +            return;
        +          }
        +          stats.time('Rendering');
        +          internalRenderTask.initalizeGraphics(transparency);
        +          internalRenderTask.operatorListChanged();
        +        },
        +        function pageDisplayReadPromiseError(reason) {
        +          complete(reason);
        +        }
        +      );
        +
        +      function complete(error) {
        +        var i = intentState.renderTasks.indexOf(internalRenderTask);
        +        if (i >= 0) {
        +          intentState.renderTasks.splice(i, 1);
        +        }
        +
        +        if (self.cleanupAfterRender) {
        +          self.pendingDestroy = true;
        +        }
        +        self._tryDestroy();
        +
        +        if (error) {
        +          renderTask.promise.reject(error);
        +        } else {
        +          renderTask.promise.resolve();
        +        }
        +        stats.timeEnd('Rendering');
        +        stats.timeEnd('Overall');
        +      }
        +
        +      return renderTask;
        +    },
        +    /**
        +     * @return {Promise} That is resolved with the array of {@link BidiText}
        +     * objects that represent the page text content.
        +     */
        +    getTextContent: function PDFPageProxy_getTextContent() {
        +      var promise = new PDFJS.LegacyPromise();
        +      this.transport.messageHandler.send('GetTextContent', {
        +          pageIndex: this.pageNumber - 1
        +        },
        +        function textContentCallback(textContent) {
        +          promise.resolve(textContent);
        +        }
        +      );
        +      return promise;
        +    },
        +    /**
        +     * Destroys resources allocated by the page.
        +     */
        +    destroy: function PDFPageProxy_destroy() {
        +      this.pendingDestroy = true;
        +      this._tryDestroy();
        +    },
        +    /**
        +     * For internal use only. Attempts to clean up if rendering is in a state
        +     * where that's possible.
        +     * @ignore
        +     */
        +    _tryDestroy: function PDFPageProxy__destroy() {
        +      if (!this.pendingDestroy ||
        +          Object.keys(this.intentStates).some(function(intent) {
        +            var intentState = this.intentStates[intent];
        +            return (intentState.renderTasks.length !== 0 ||
        +                    intentState.receivingOperatorList);
        +          }, this)) {
        +        return;
        +      }
        +
        +      Object.keys(this.intentStates).forEach(function(intent) {
        +        delete this.intentStates[intent];
        +      }, this);
        +      this.objs.clear();
        +      this.pendingDestroy = false;
        +    },
        +    /**
        +     * For internal use only.
        +     * @ignore
        +     */
        +    _startRenderPage: function PDFPageProxy_startRenderPage(transparency,
        +                                                            intent) {
        +      var intentState = this.intentStates[intent];
        +      intentState.displayReadyPromise.resolve(transparency);
        +    },
        +    /**
        +     * For internal use only.
        +     * @ignore
        +     */
        +    _renderPageChunk: function PDFPageProxy_renderPageChunk(operatorListChunk,
        +                                                            intent) {
        +      var intentState = this.intentStates[intent];
        +      // Add the new chunk to the current operator list.
        +      for (var i = 0, ii = operatorListChunk.length; i < ii; i++) {
        +        intentState.operatorList.fnArray.push(operatorListChunk.fnArray[i]);
        +        intentState.operatorList.argsArray.push(
        +          operatorListChunk.argsArray[i]);
        +      }
        +      intentState.operatorList.lastChunk = operatorListChunk.lastChunk;
        +
        +      // Notify all the rendering tasks there are more operators to be consumed.
        +      for (var i = 0; i < intentState.renderTasks.length; i++) {
        +        intentState.renderTasks[i].operatorListChanged();
        +      }
        +
        +      if (operatorListChunk.lastChunk) {
        +        intentState.receivingOperatorList = false;
        +        this._tryDestroy();
        +      }
        +    }
        +  };
        +  return PDFPageProxy;
        +})();
        +
        +/**
        + * For internal use only.
        + * @ignore
        + */
        +var WorkerTransport = (function WorkerTransportClosure() {
        +  function WorkerTransport(workerInitializedPromise, workerReadyPromise,
        +                           pdfDataRangeTransport, progressCallback) {
        +    this.pdfDataRangeTransport = pdfDataRangeTransport;
        +
        +    this.workerReadyPromise = workerReadyPromise;
        +    this.progressCallback = progressCallback;
        +    this.commonObjs = new PDFObjects();
        +
        +    this.pageCache = [];
        +    this.pagePromises = [];
        +    this.downloadInfoPromise = new PDFJS.LegacyPromise();
        +    this.passwordCallback = null;
        +
        +    // If worker support isn't disabled explicit and the browser has worker
        +    // support, create a new web worker and test if it/the browser fullfills
        +    // all requirements to run parts of pdf.js in a web worker.
        +    // Right now, the requirement is, that an Uint8Array is still an Uint8Array
        +    // as it arrives on the worker. Chrome added this with version 15.
        +//#if !SINGLE_FILE
        +    if (!globalScope.PDFJS.disableWorker && typeof Worker !== 'undefined') {
        +      var workerSrc = PDFJS.workerSrc;
        +      if (!workerSrc) {
        +        error('No PDFJS.workerSrc specified');
        +      }
        +
        +      try {
        +        // Some versions of FF can't create a worker on localhost, see:
        +        // https://bugzilla.mozilla.org/show_bug.cgi?id=683280
        +        var worker = new Worker(workerSrc);
        +        var messageHandler = new MessageHandler('main', worker);
        +        this.messageHandler = messageHandler;
        +
        +        messageHandler.on('test', function transportTest(data) {
        +          var supportTypedArray = data && data.supportTypedArray;
        +          if (supportTypedArray) {
        +            this.worker = worker;
        +            if (!data.supportTransfers) {
        +              PDFJS.postMessageTransfers = false;
        +            }
        +            this.setupMessageHandler(messageHandler);
        +            workerInitializedPromise.resolve();
        +          } else {
        +            globalScope.PDFJS.disableWorker = true;
        +            this.loadFakeWorkerFiles().then(function() {
        +              this.setupFakeWorker();
        +              workerInitializedPromise.resolve();
        +            }.bind(this));
        +          }
        +        }.bind(this));
        +
        +        var testObj = new Uint8Array([PDFJS.postMessageTransfers ? 255 : 0]);
        +        // Some versions of Opera throw a DATA_CLONE_ERR on serializing the
        +        // typed array. Also, checking if we can use transfers.
        +        try {
        +          messageHandler.send('test', testObj, null, [testObj.buffer]);
        +        } catch (ex) {
        +          info('Cannot use postMessage transfers');
        +          testObj[0] = 0;
        +          messageHandler.send('test', testObj);
        +        }
        +        return;
        +      } catch (e) {
        +        info('The worker has been disabled.');
        +      }
        +    }
        +//#endif    
        +    // Either workers are disabled, not supported or have thrown an exception.
        +    // Thus, we fallback to a faked worker.
        +    globalScope.PDFJS.disableWorker = true;
        +    this.loadFakeWorkerFiles().then(function() {
        +      this.setupFakeWorker();
        +      workerInitializedPromise.resolve();
        +    }.bind(this));
        +  }
        +  WorkerTransport.prototype = {
        +    destroy: function WorkerTransport_destroy() {
        +      this.pageCache = [];
        +      this.pagePromises = [];
        +      var self = this;
        +      this.messageHandler.send('Terminate', null, function () {
        +        FontLoader.clear();
        +        if (self.worker) {
        +          self.worker.terminate();
        +        }
        +      });
        +    },
        +
        +    loadFakeWorkerFiles: function WorkerTransport_loadFakeWorkerFiles() {
        +      if (!PDFJS.fakeWorkerFilesLoadedPromise) {
        +        PDFJS.fakeWorkerFilesLoadedPromise = new LegacyPromise();
        +        // In the developer build load worker_loader which in turn loads all the
        +        // other files and resolves the promise. In production only the
        +        // pdf.worker.js file is needed.
        +//#if !PRODUCTION
        +        Util.loadScript(PDFJS.workerSrc);
        +//#endif
        +//#if PRODUCTION && SINGLE_FILE
        +//      PDFJS.fakeWorkerFilesLoadedPromise.resolve();
        +//#endif
        +//#if PRODUCTION && !SINGLE_FILE
        +//      Util.loadScript(PDFJS.workerSrc, function() {
        +//        PDFJS.fakeWorkerFilesLoadedPromise.resolve();
        +//      });
        +//#endif
        +      }
        +      return PDFJS.fakeWorkerFilesLoadedPromise;
        +    },
        +
        +    setupFakeWorker: function WorkerTransport_setupFakeWorker() {
        +      warn('Setting up fake worker.');
        +      // If we don't use a worker, just post/sendMessage to the main thread.
        +      var fakeWorker = {
        +        postMessage: function WorkerTransport_postMessage(obj) {
        +          fakeWorker.onmessage({data: obj});
        +        },
        +        terminate: function WorkerTransport_terminate() {}
        +      };
        +
        +      var messageHandler = new MessageHandler('main', fakeWorker);
        +      this.setupMessageHandler(messageHandler);
        +
        +      // If the main thread is our worker, setup the handling for the messages
        +      // the main thread sends to it self.
        +      PDFJS.WorkerMessageHandler.setup(messageHandler);
        +    },
        +
        +    setupMessageHandler:
        +      function WorkerTransport_setupMessageHandler(messageHandler) {
        +      this.messageHandler = messageHandler;
        +
        +      function updatePassword(password) {
        +        messageHandler.send('UpdatePassword', password);
        +      }
        +
        +      var pdfDataRangeTransport = this.pdfDataRangeTransport;
        +      if (pdfDataRangeTransport) {
        +        pdfDataRangeTransport.addRangeListener(function(begin, chunk) {
        +          messageHandler.send('OnDataRange', {
        +            begin: begin,
        +            chunk: chunk
        +          });
        +        });
        +
        +        pdfDataRangeTransport.addProgressListener(function(loaded) {
        +          messageHandler.send('OnDataProgress', {
        +            loaded: loaded
        +          });
        +        });
        +
        +        messageHandler.on('RequestDataRange',
        +          function transportDataRange(data) {
        +            pdfDataRangeTransport.requestDataRange(data.begin, data.end);
        +          }, this);
        +      }
        +
        +      messageHandler.on('GetDoc', function transportDoc(data) {
        +        var pdfInfo = data.pdfInfo;
        +        this.numPages = data.pdfInfo.numPages;
        +        var pdfDocument = new PDFDocumentProxy(pdfInfo, this);
        +        this.pdfDocument = pdfDocument;
        +        this.workerReadyPromise.resolve(pdfDocument);
        +      }, this);
        +
        +      messageHandler.on('NeedPassword', function transportPassword(data) {
        +        if (this.passwordCallback) {
        +          return this.passwordCallback(updatePassword,
        +                                       PasswordResponses.NEED_PASSWORD);
        +        }
        +        this.workerReadyPromise.reject(data.exception.message, data.exception);
        +      }, this);
        +
        +      messageHandler.on('IncorrectPassword', function transportBadPass(data) {
        +        if (this.passwordCallback) {
        +          return this.passwordCallback(updatePassword,
        +                                       PasswordResponses.INCORRECT_PASSWORD);
        +        }
        +        this.workerReadyPromise.reject(data.exception.message, data.exception);
        +      }, this);
        +
        +      messageHandler.on('InvalidPDF', function transportInvalidPDF(data) {
        +        this.workerReadyPromise.reject(data.exception.name, data.exception);
        +      }, this);
        +
        +      messageHandler.on('MissingPDF', function transportMissingPDF(data) {
        +        this.workerReadyPromise.reject(data.exception.message, data.exception);
        +      }, this);
        +
        +      messageHandler.on('UnknownError', function transportUnknownError(data) {
        +        this.workerReadyPromise.reject(data.exception.message, data.exception);
        +      }, this);
        +
        +      messageHandler.on('DataLoaded', function transportPage(data) {
        +        this.downloadInfoPromise.resolve(data);
        +      }, this);
        +
        +      messageHandler.on('GetPage', function transportPage(data) {
        +        var pageInfo = data.pageInfo;
        +        var page = new PDFPageProxy(pageInfo, this);
        +        this.pageCache[pageInfo.pageIndex] = page;
        +        var promise = this.pagePromises[pageInfo.pageIndex];
        +        promise.resolve(page);
        +      }, this);
        +
        +      messageHandler.on('GetAnnotations', function transportAnnotations(data) {
        +        var annotations = data.annotations;
        +        var promise = this.pageCache[data.pageIndex].annotationsPromise;
        +        promise.resolve(annotations);
        +      }, this);
        +
        +      messageHandler.on('StartRenderPage', function transportRender(data) {
        +        var page = this.pageCache[data.pageIndex];
        +
        +        page.stats.timeEnd('Page Request');
        +        page._startRenderPage(data.transparency, data.intent);
        +      }, this);
        +
        +      messageHandler.on('RenderPageChunk', function transportRender(data) {
        +        var page = this.pageCache[data.pageIndex];
        +
        +        page._renderPageChunk(data.operatorList, data.intent);
        +      }, this);
        +
        +      messageHandler.on('commonobj', function transportObj(data) {
        +        var id = data[0];
        +        var type = data[1];
        +        if (this.commonObjs.hasData(id)) {
        +          return;
        +        }
        +
        +        switch (type) {
        +          case 'Font':
        +            var exportedData = data[2];
        +
        +            var font;
        +            if ('error' in exportedData) {
        +              var error = exportedData.error;
        +              warn('Error during font loading: ' + error);
        +              this.commonObjs.resolve(id, error);
        +              break;
        +            } else {
        +              font = new FontFace(exportedData);
        +            }
        +
        +            FontLoader.bind(
        +              [font],
        +              function fontReady(fontObjs) {
        +                this.commonObjs.resolve(id, font);
        +              }.bind(this)
        +            );
        +            break;
        +          case 'FontPath':
        +            this.commonObjs.resolve(id, data[2]);
        +            break;
        +          default:
        +            error('Got unknown common object type ' + type);
        +        }
        +      }, this);
        +
        +      messageHandler.on('obj', function transportObj(data) {
        +        var id = data[0];
        +        var pageIndex = data[1];
        +        var type = data[2];
        +        var pageProxy = this.pageCache[pageIndex];
        +        if (pageProxy.objs.hasData(id)) {
        +          return;
        +        }
        +
        +        switch (type) {
        +          case 'JpegStream':
        +            var imageData = data[3];
        +            loadJpegStream(id, imageData, pageProxy.objs);
        +            break;
        +          case 'Image':
        +            var imageData = data[3];
        +            pageProxy.objs.resolve(id, imageData);
        +
        +            // heuristics that will allow not to store large data
        +            var MAX_IMAGE_SIZE_TO_STORE = 8000000;
        +            if ('data' in imageData &&
        +                imageData.data.length > MAX_IMAGE_SIZE_TO_STORE) {
        +              pageProxy.cleanupAfterRender = true;
        +            }
        +            break;
        +          default:
        +            error('Got unknown object type ' + type);
        +        }
        +      }, this);
        +
        +      messageHandler.on('DocProgress', function transportDocProgress(data) {
        +        if (this.progressCallback) {
        +          this.progressCallback({
        +            loaded: data.loaded,
        +            total: data.total
        +          });
        +        }
        +      }, this);
        +
        +      messageHandler.on('DocError', function transportDocError(data) {
        +        this.workerReadyPromise.reject(data);
        +      }, this);
        +
        +      messageHandler.on('PageError', function transportError(data, intent) {
        +        var page = this.pageCache[data.pageNum - 1];
        +        var intentState = page.intentStates[intent];
        +        if (intentState.displayReadyPromise) {
        +          intentState.displayReadyPromise.reject(data.error);
        +        } else {
        +          error(data.error);
        +        }
        +      }, this);
        +
        +      messageHandler.on('JpegDecode', function(data, deferred) {
        +        var imageUrl = data[0];
        +        var components = data[1];
        +        if (components != 3 && components != 1) {
        +          error('Only 3 component or 1 component can be returned');
        +        }
        +
        +        var img = new Image();
        +        img.onload = (function messageHandler_onloadClosure() {
        +          var width = img.width;
        +          var height = img.height;
        +          var size = width * height;
        +          var rgbaLength = size * 4;
        +          var buf = new Uint8Array(size * components);
        +          var tmpCanvas = createScratchCanvas(width, height);
        +          var tmpCtx = tmpCanvas.getContext('2d');
        +          tmpCtx.drawImage(img, 0, 0);
        +          var data = tmpCtx.getImageData(0, 0, width, height).data;
        +
        +          if (components == 3) {
        +            for (var i = 0, j = 0; i < rgbaLength; i += 4, j += 3) {
        +              buf[j] = data[i];
        +              buf[j + 1] = data[i + 1];
        +              buf[j + 2] = data[i + 2];
        +            }
        +          } else if (components == 1) {
        +            for (var i = 0, j = 0; i < rgbaLength; i += 4, j++) {
        +              buf[j] = data[i];
        +            }
        +          }
        +          deferred.resolve({ data: buf, width: width, height: height});
        +        }).bind(this);
        +        img.src = imageUrl;
        +      });
        +    },
        +
        +    fetchDocument: function WorkerTransport_fetchDocument(source) {
        +      source.disableAutoFetch = PDFJS.disableAutoFetch;
        +      source.chunkedViewerLoading = !!this.pdfDataRangeTransport;
        +      this.messageHandler.send('GetDocRequest', {
        +        source: source,
        +        disableRange: PDFJS.disableRange,
        +        maxImageSize: PDFJS.maxImageSize,
        +        cMapUrl: PDFJS.cMapUrl,
        +        cMapPacked: PDFJS.cMapPacked,
        +        disableFontFace: PDFJS.disableFontFace,
        +        disableCreateObjectURL: PDFJS.disableCreateObjectURL,
        +        verbosity: PDFJS.verbosity
        +      });
        +    },
        +
        +    getData: function WorkerTransport_getData(promise) {
        +      this.messageHandler.send('GetData', null, function(data) {
        +        promise.resolve(data);
        +      });
        +    },
        +
        +    getPage: function WorkerTransport_getPage(pageNumber, promise) {
        +      if (pageNumber <= 0 || pageNumber > this.numPages ||
        +          (pageNumber|0) !== pageNumber) {
        +        var pagePromise = new PDFJS.LegacyPromise();
        +        pagePromise.reject(new Error('Invalid page request'));
        +        return pagePromise;
        +      }
        +
        +      var pageIndex = pageNumber - 1;
        +      if (pageIndex in this.pagePromises) {
        +        return this.pagePromises[pageIndex];
        +      }
        +      var promise = new PDFJS.LegacyPromise();
        +      this.pagePromises[pageIndex] = promise;
        +      this.messageHandler.send('GetPageRequest', { pageIndex: pageIndex });
        +      return promise;
        +    },
        +
        +    getPageIndex: function WorkerTransport_getPageIndexByRef(ref) {
        +      var promise = new PDFJS.LegacyPromise();
        +      this.messageHandler.send('GetPageIndex', { ref: ref },
        +        function (pageIndex) {
        +          promise.resolve(pageIndex);
        +        }
        +      );
        +      return promise;
        +    },
        +
        +    getAnnotations: function WorkerTransport_getAnnotations(pageIndex) {
        +      this.messageHandler.send('GetAnnotationsRequest',
        +        { pageIndex: pageIndex });
        +    },
        +
        +    getDestinations: function WorkerTransport_getDestinations() {
        +      var promise = new PDFJS.LegacyPromise();
        +      this.messageHandler.send('GetDestinations', null,
        +        function transportDestinations(destinations) {
        +          promise.resolve(destinations);
        +        }
        +      );
        +      return promise;
        +    },
        +
        +    startCleanup: function WorkerTransport_startCleanup() {
        +      this.messageHandler.send('Cleanup', null,
        +        function endCleanup() {
        +          for (var i = 0, ii = this.pageCache.length; i < ii; i++) {
        +            var page = this.pageCache[i];
        +            if (page) {
        +              page.destroy();
        +            }
        +          }
        +          this.commonObjs.clear();
        +          FontLoader.clear();
        +        }.bind(this)
        +      );
        +    }
        +  };
        +  return WorkerTransport;
        +
        +})();
        +
        +/**
        + * A PDF document and page is built of many objects. E.g. there are objects
        + * for fonts, images, rendering code and such. These objects might get processed
        + * inside of a worker. The `PDFObjects` implements some basic functions to
        + * manage these objects.
        + * @ignore
        + */
        +var PDFObjects = (function PDFObjectsClosure() {
        +  function PDFObjects() {
        +    this.objs = {};
        +  }
        +
        +  PDFObjects.prototype = {
        +    /**
        +     * Internal function.
        +     * Ensures there is an object defined for `objId`.
        +     */
        +    ensureObj: function PDFObjects_ensureObj(objId) {
        +      if (this.objs[objId]) {
        +        return this.objs[objId];
        +      }
        +
        +      var obj = {
        +        promise: new LegacyPromise(),
        +        data: null,
        +        resolved: false
        +      };
        +      this.objs[objId] = obj;
        +
        +      return obj;
        +    },
        +
        +    /**
        +     * If called *without* callback, this returns the data of `objId` but the
        +     * object needs to be resolved. If it isn't, this function throws.
        +     *
        +     * If called *with* a callback, the callback is called with the data of the
        +     * object once the object is resolved. That means, if you call this
        +     * function and the object is already resolved, the callback gets called
        +     * right away.
        +     */
        +    get: function PDFObjects_get(objId, callback) {
        +      // If there is a callback, then the get can be async and the object is
        +      // not required to be resolved right now
        +      if (callback) {
        +        this.ensureObj(objId).promise.then(callback);
        +        return null;
        +      }
        +
        +      // If there isn't a callback, the user expects to get the resolved data
        +      // directly.
        +      var obj = this.objs[objId];
        +
        +      // If there isn't an object yet or the object isn't resolved, then the
        +      // data isn't ready yet!
        +      if (!obj || !obj.resolved) {
        +        error('Requesting object that isn\'t resolved yet ' + objId);
        +      }
        +
        +      return obj.data;
        +    },
        +
        +    /**
        +     * Resolves the object `objId` with optional `data`.
        +     */
        +    resolve: function PDFObjects_resolve(objId, data) {
        +      var obj = this.ensureObj(objId);
        +
        +      obj.resolved = true;
        +      obj.data = data;
        +      obj.promise.resolve(data);
        +    },
        +
        +    isResolved: function PDFObjects_isResolved(objId) {
        +      var objs = this.objs;
        +
        +      if (!objs[objId]) {
        +        return false;
        +      } else {
        +        return objs[objId].resolved;
        +      }
        +    },
        +
        +    hasData: function PDFObjects_hasData(objId) {
        +      return this.isResolved(objId);
        +    },
        +
        +    /**
        +     * Returns the data of `objId` if object exists, null otherwise.
        +     */
        +    getData: function PDFObjects_getData(objId) {
        +      var objs = this.objs;
        +      if (!objs[objId] || !objs[objId].resolved) {
        +        return null;
        +      } else {
        +        return objs[objId].data;
        +      }
        +    },
        +
        +    clear: function PDFObjects_clear() {
        +      this.objs = {};
        +    }
        +  };
        +  return PDFObjects;
        +})();
        +
        +/**
        + * Allows controlling of the rendering tasks.
        + * @class
        + */
        +var RenderTask = (function RenderTaskClosure() {
        +  function RenderTask(internalRenderTask) {
        +    this.internalRenderTask = internalRenderTask;
        +    /**
        +     * Promise for rendering task completion.
        +     * @type {Promise}
        +     */
        +    this.promise = new PDFJS.LegacyPromise();
        +  }
        +
        +  RenderTask.prototype = /** @lends RenderTask.prototype */ {
        +    /**
        +     * Cancels the rendering task. If the task is currently rendering it will
        +     * not be cancelled until graphics pauses with a timeout. The promise that
        +     * this object extends will resolved when cancelled.
        +     */
        +    cancel: function RenderTask_cancel() {
        +      this.internalRenderTask.cancel();
        +      this.promise.reject(new Error('Rendering is cancelled'));
        +    }
        +  };
        +
        +  return RenderTask;
        +})();
        +
        +/**
        + * For internal use only.
        + * @ignore
        + */
        +var InternalRenderTask = (function InternalRenderTaskClosure() {
        +
        +  function InternalRenderTask(callback, params, objs, commonObjs, operatorList,
        +                              pageNumber) {
        +    this.callback = callback;
        +    this.params = params;
        +    this.objs = objs;
        +    this.commonObjs = commonObjs;
        +    this.operatorListIdx = null;
        +    this.operatorList = operatorList;
        +    this.pageNumber = pageNumber;
        +    this.running = false;
        +    this.graphicsReadyCallback = null;
        +    this.graphicsReady = false;
        +    this.cancelled = false;
        +  }
        +
        +  InternalRenderTask.prototype = {
        +
        +    initalizeGraphics:
        +        function InternalRenderTask_initalizeGraphics(transparency) {
        +
        +      if (this.cancelled) {
        +        return;
        +      }
        +      if (PDFJS.pdfBug && 'StepperManager' in globalScope &&
        +          globalScope.StepperManager.enabled) {
        +        this.stepper = globalScope.StepperManager.create(this.pageNumber - 1);
        +        this.stepper.init(this.operatorList);
        +        this.stepper.nextBreakPoint = this.stepper.getNextBreakPoint();
        +      }
        +
        +      var params = this.params;
        +      this.gfx = new CanvasGraphics(params.canvasContext, this.commonObjs,
        +                                    this.objs, params.textLayer,
        +                                    params.imageLayer);
        +
        +      this.gfx.beginDrawing(params.viewport, transparency);
        +      this.operatorListIdx = 0;
        +      this.graphicsReady = true;
        +      if (this.graphicsReadyCallback) {
        +        this.graphicsReadyCallback();
        +      }
        +    },
        +
        +    cancel: function InternalRenderTask_cancel() {
        +      this.running = false;
        +      this.cancelled = true;
        +      this.callback('cancelled');
        +    },
        +
        +    operatorListChanged: function InternalRenderTask_operatorListChanged() {
        +      if (!this.graphicsReady) {
        +        if (!this.graphicsReadyCallback) {
        +          this.graphicsReadyCallback = this._continue.bind(this);
        +        }
        +        return;
        +      }
        +
        +      if (this.stepper) {
        +        this.stepper.updateOperatorList(this.operatorList);
        +      }
        +
        +      if (this.running) {
        +        return;
        +      }
        +      this._continue();
        +    },
        +
        +    _continue: function InternalRenderTask__continue() {
        +      this.running = true;
        +      if (this.cancelled) {
        +        return;
        +      }
        +      if (this.params.continueCallback) {
        +        this.params.continueCallback(this._next.bind(this));
        +      } else {
        +        this._next();
        +      }
        +    },
        +
        +    _next: function InternalRenderTask__next() {
        +      if (this.cancelled) {
        +        return;
        +      }
        +      this.operatorListIdx = this.gfx.executeOperatorList(this.operatorList,
        +                                        this.operatorListIdx,
        +                                        this._continue.bind(this),
        +                                        this.stepper);
        +      if (this.operatorListIdx === this.operatorList.argsArray.length) {
        +        this.running = false;
        +        if (this.operatorList.lastChunk) {
        +          this.gfx.endDrawing();
        +          this.callback();
        +        }
        +      }
        +    }
        +
        +  };
        +
        +  return InternalRenderTask;
        +})();
        +
        +
        +
        + + + + +
        + + + +
        + +
        + Documentation generated by JSDoc 3.3.0-alpha5 on Sun Apr 13 2014 00:33:02 GMT-0300 (ART) +
        + + + + + diff --git a/external/jsdoc/global.html b/external/jsdoc/global.html index 25232aff095b9..511d251cd935e 100644 --- a/external/jsdoc/global.html +++ b/external/jsdoc/global.html @@ -86,28 +86,45 @@

        -

        Methods

        + + +

        Type Definitions

        - +
        -

        isEOF(v) → {boolean}

        +

        BidiText

        - + +
        + Page text content part. +
        +
        Type:
        +
          +
        • + +Object + +
        • +
        -
        Parameters:
        - +
        + - +
        Properties:
        + +
        + +
        @@ -129,27 +146,144 @@
        Parameters:
        - + - + - -
        vstr + +string + + + text content.
        + + + + dir + + + + + +string + + + + + + + + + + text direction: 'ttb', 'ltr' or 'rtl'. + + + + + x + + + + + +number + + + + + + + + + + x position of the text on the page. + + -
        + + + + y + + + + + +number + + + + + + + + + + y position of the text on the page. + + + + + + + angle + + + + + +number + + + + + + + + + + text rotation. + + + + + + + size + + + + + +number + + + + + + + + + + font size. + + + + +
        + @@ -171,7 +305,7 @@
        Parameters:
        Source:
        @@ -186,43 +320,245 @@
        Parameters:
        +
        + + +
        +

        DocumentInitParameters

        + + +
        +
        + +
        + Document initialization / loading parameters object. +
        +
        Type:
        +
          +
        • + +Object + +
        • +
        -
        Returns:
        +
        - -
        - true or false -
        +
        Properties:
        + +
        + + + + + + + + + + -
        -
        - Type -
        -
        + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        NameTypeDescription
        url + + +string + + + + The URL of the PDF.
        data + + +TypedArray + + + + A typed array with PDF data.
        httpHeaders + + +Object + + + + Basic authentication headers.
        withCredentials + + boolean - + + Indicates whether or not cross-site + Access-Control requests should be made using credentials such as cookies + or authorization headers. The default is false.
        password + + +string + + + + For decrypting password-protected PDFs.
        initialData + + +TypedArray + + + + A typed array with the first portion or + all of the pdf data. Used by the extension since some data is already + loaded before the switch to range requests.
        + + + + + + + + + + + + + + + + + + + + +
        Source:
        +
        + + + + + + +
        - -
        -
        + +
@@ -236,13 +572,13 @@
Returns:

- Documentation generated by JSDoc 3.3.0-alpha5 on Mon Apr 07 2014 18:31:28 GMT-0300 (ART) + Documentation generated by JSDoc 3.3.0-alpha5 on Sun Apr 13 2014 00:33:02 GMT-0300 (ART)
diff --git a/external/jsdoc/index.html b/external/jsdoc/index.html index 7066fafc336a5..ed889ec20d4d9 100644 --- a/external/jsdoc/index.html +++ b/external/jsdoc/index.html @@ -48,13 +48,13 @@


- Documentation generated by JSDoc 3.3.0-alpha5 on Mon Apr 07 2014 18:31:28 GMT-0300 (ART) + Documentation generated by JSDoc 3.3.0-alpha5 on Sun Apr 13 2014 00:33:02 GMT-0300 (ART)
diff --git a/external/jsdoc/parser.js.html b/external/jsdoc/parser.js.html deleted file mode 100644 index a4e73dfd86a55..0000000000000 --- a/external/jsdoc/parser.js.html +++ /dev/null @@ -1,932 +0,0 @@ - - - - - JSDoc: Source: parser.js - - - - - - - - - - -
- -

Source: parser.js

- - - - - -
-
-
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
-/* 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 Ascii85Stream, AsciiHexStream, CCITTFaxStream, Cmd, Dict, error,
-           FlateStream, isArray, isCmd, isDict, isInt, isName, isNum, isRef,
-           isString, Jbig2Stream, JpegStream, JpxStream, LZWStream, Name,
-           NullStream, PredictorStream, Ref, RunLengthStream, warn, info */
-
-'use strict';
-
-var EOF = {};
-/** @function
- *  @name isEOF
- *  @param v
- *  @return {boolean} true or false */
-
-
-
-function isEOF(v) {
-  return (v == EOF);
-}
-
-var Parser = (function ParserClosure() {
-  function Parser(lexer, allowStreams, xref) {
-    this.lexer = lexer;
-    this.allowStreams = allowStreams;
-    this.xref = xref;
-    this.imageCache = {
-      length: 0,
-      adler32: 0,
-      stream: null
-    };
-    this.refill();
-  }
-
-  Parser.prototype = {
-    refill: function Parser_refill() {
-      this.buf1 = this.lexer.getObj();
-      this.buf2 = this.lexer.getObj();
-    },
-    shift: function Parser_shift() {
-      if (isCmd(this.buf2, 'ID')) {
-        this.buf1 = this.buf2;
-        this.buf2 = null;
-      } else {
-        this.buf1 = this.buf2;
-        this.buf2 = this.lexer.getObj();
-      }
-    },
-    getObj: function Parser_getObj(cipherTransform) {
-      if (isCmd(this.buf1, 'BI')) { // inline image
-        this.shift();
-        return this.makeInlineImage(cipherTransform);
-      }
-      if (isCmd(this.buf1, '[')) { // array
-        this.shift();
-        var array = [];
-        while (!isCmd(this.buf1, ']') && !isEOF(this.buf1)) {
-          array.push(this.getObj(cipherTransform));
-        }
-        if (isEOF(this.buf1)) {
-          error('End of file inside array');
-        }
-        this.shift();
-        return array;
-      }
-      if (isCmd(this.buf1, '<<')) { // dictionary or stream
-        this.shift();
-        var dict = new Dict(this.xref);
-        while (!isCmd(this.buf1, '>>') && !isEOF(this.buf1)) {
-          if (!isName(this.buf1)) {
-            info('Malformed dictionary: key must be a name object');
-            this.shift();
-            continue;
-          }
-
-          var key = this.buf1.name;
-          this.shift();
-          if (isEOF(this.buf1)) {
-            break;
-          }
-          dict.set(key, this.getObj(cipherTransform));
-        }
-        if (isEOF(this.buf1)) {
-          error('End of file inside dictionary');
-        }
-
-        // Stream objects are not allowed inside content streams or
-        // object streams.
-        if (isCmd(this.buf2, 'stream')) {
-          return (this.allowStreams ?
-                  this.makeStream(dict, cipherTransform) : dict);
-        }
-        this.shift();
-        return dict;
-      }
-      if (isInt(this.buf1)) { // indirect reference or integer
-        var num = this.buf1;
-        this.shift();
-        if (isInt(this.buf1) && isCmd(this.buf2, 'R')) {
-          var ref = new Ref(num, this.buf1);
-          this.shift();
-          this.shift();
-          return ref;
-        }
-        return num;
-      }
-      if (isString(this.buf1)) { // string
-        var str = this.buf1;
-        this.shift();
-        if (cipherTransform) {
-          str = cipherTransform.decryptString(str);
-        }
-        return str;
-      }
-
-      // simple object
-      var obj = this.buf1;
-      this.shift();
-      return obj;
-    },
-    makeInlineImage: function Parser_makeInlineImage(cipherTransform) {
-      var lexer = this.lexer;
-      var stream = lexer.stream;
-
-      // parse dictionary
-      var dict = new Dict();
-      while (!isCmd(this.buf1, 'ID') && !isEOF(this.buf1)) {
-        if (!isName(this.buf1)) {
-          error('Dictionary key must be a name object');
-        }
-
-        var key = this.buf1.name;
-        this.shift();
-        if (isEOF(this.buf1)) {
-          break;
-        }
-        dict.set(key, this.getObj(cipherTransform));
-      }
-
-      // parse image stream
-      var startPos = stream.pos;
-
-      // searching for the /EI\s/
-      var state = 0, ch, i, ii;
-      while (state != 4 && (ch = stream.getByte()) !== -1) {
-        switch (ch | 0) {
-          case 0x20:
-          case 0x0D:
-          case 0x0A:
-            // let's check next five bytes to be ASCII... just be sure
-            var followingBytes = stream.peekBytes(5);
-            for (i = 0, ii = followingBytes.length; i < ii; i++) {
-              ch = followingBytes[i];
-              if (ch !== 0x0A && ch !== 0x0D && (ch < 0x20 || ch > 0x7F)) {
-                // not a LF, CR, SPACE or any visible ASCII character
-                state = 0;
-                break; // some binary stuff found, resetting the state
-              }
-            }
-            state = (state === 3 ? 4 : 0);
-            break;
-          case 0x45:
-            state = 2;
-            break;
-          case 0x49:
-            state = (state === 2 ? 3 : 0);
-            break;
-          default:
-            state = 0;
-            break;
-        }
-      }
-
-      var length = (stream.pos - 4) - startPos;
-      var imageStream = stream.makeSubStream(startPos, length, dict);
-
-      // trying to cache repeat images, first we are trying to "warm up" caching
-      // using length, then comparing adler32
-      var MAX_LENGTH_TO_CACHE = 1000;
-      var cacheImage = false, adler32;
-      if (length < MAX_LENGTH_TO_CACHE && this.imageCache.length === length) {
-        var imageBytes = imageStream.getBytes();
-        imageStream.reset();
-
-        var a = 1;
-        var b = 0;
-        for (var i = 0, ii = imageBytes.length; i < ii; ++i) {
-          a = (a + (imageBytes[i] & 0xff)) % 65521;
-          b = (b + a) % 65521;
-        }
-        adler32 = (b << 16) | a;
-
-        if (this.imageCache.stream && this.imageCache.adler32 === adler32) {
-          this.buf2 = Cmd.get('EI');
-          this.shift();
-
-          this.imageCache.stream.reset();
-          return this.imageCache.stream;
-        }
-        cacheImage = true;
-      }
-      if (!cacheImage && !this.imageCache.stream) {
-        this.imageCache.length = length;
-        this.imageCache.stream = null;
-      }
-
-      if (cipherTransform) {
-        imageStream = cipherTransform.createStream(imageStream, length);
-      }
-
-      imageStream = this.filter(imageStream, dict, length);
-      imageStream.dict = dict;
-      if (cacheImage) {
-        imageStream.cacheKey = 'inline_' + length + '_' + adler32;
-        this.imageCache.adler32 = adler32;
-        this.imageCache.stream = imageStream;
-      }
-
-      this.buf2 = Cmd.get('EI');
-      this.shift();
-
-      return imageStream;
-    },
-    fetchIfRef: function Parser_fetchIfRef(obj) {
-      // not relying on the xref.fetchIfRef -- xref might not be set
-      return (isRef(obj) ? this.xref.fetch(obj) : obj);
-    },
-    makeStream: function Parser_makeStream(dict, cipherTransform) {
-      var lexer = this.lexer;
-      var stream = lexer.stream;
-
-      // get stream start position
-      lexer.skipToNextLine();
-      var pos = stream.pos - 1;
-
-      // get length
-      var length = this.fetchIfRef(dict.get('Length'));
-      if (!isInt(length)) {
-        info('Bad ' + length + ' attribute in stream');
-        length = 0;
-      }
-
-      // skip over the stream data
-      stream.pos = pos + length;
-      lexer.nextChar();
-
-      this.shift(); // '>>'
-      this.shift(); // 'stream'
-      if (!isCmd(this.buf1, 'endstream')) {
-        // bad stream length, scanning for endstream
-        stream.pos = pos;
-        var SCAN_BLOCK_SIZE = 2048;
-        var ENDSTREAM_SIGNATURE_LENGTH = 9;
-        var ENDSTREAM_SIGNATURE = [0x65, 0x6E, 0x64, 0x73, 0x74, 0x72, 0x65,
-                                   0x61, 0x6D];
-        var skipped = 0, found = false;
-        while (stream.pos < stream.end) {
-          var scanBytes = stream.peekBytes(SCAN_BLOCK_SIZE);
-          var scanLength = scanBytes.length - ENDSTREAM_SIGNATURE_LENGTH;
-          var found = false, i, j;
-          for (i = 0, j = 0; i < scanLength; i++) {
-            var b = scanBytes[i];
-            if (b !== ENDSTREAM_SIGNATURE[j]) {
-              i -= j;
-              j = 0;
-            } else {
-              j++;
-              if (j >= ENDSTREAM_SIGNATURE_LENGTH) {
-                i++;
-                found = true;
-                break;
-              }
-            }
-          }
-          if (found) {
-            skipped += i - ENDSTREAM_SIGNATURE_LENGTH;
-            stream.pos += i - ENDSTREAM_SIGNATURE_LENGTH;
-            break;
-          }
-          skipped += scanLength;
-          stream.pos += scanLength;
-        }
-        if (!found) {
-          error('Missing endstream');
-        }
-        length = skipped;
-
-        lexer.nextChar();
-        this.shift();
-        this.shift();
-      }
-      this.shift(); // 'endstream'
-
-      stream = stream.makeSubStream(pos, length, dict);
-      if (cipherTransform) {
-        stream = cipherTransform.createStream(stream, length);
-      }
-      stream = this.filter(stream, dict, length);
-      stream.dict = dict;
-      return stream;
-    },
-    filter: function Parser_filter(stream, dict, length) {
-      var filter = this.fetchIfRef(dict.get('Filter', 'F'));
-      var params = this.fetchIfRef(dict.get('DecodeParms', 'DP'));
-      if (isName(filter)) {
-        return this.makeFilter(stream, filter.name, length, params);
-      }
-
-      var maybeLength = length;
-      if (isArray(filter)) {
-        var filterArray = filter;
-        var paramsArray = params;
-        for (var i = 0, ii = filterArray.length; i < ii; ++i) {
-          filter = filterArray[i];
-          if (!isName(filter)) {
-            error('Bad filter name: ' + filter);
-          }
-
-          params = null;
-          if (isArray(paramsArray) && (i in paramsArray)) {
-            params = paramsArray[i];
-          }
-          stream = this.makeFilter(stream, filter.name, maybeLength, params);
-          // after the first stream the length variable is invalid
-          maybeLength = null;
-        }
-      }
-      return stream;
-    },
-    makeFilter: function Parser_makeFilter(stream, name, maybeLength, params) {
-      if (stream.dict.get('Length') === 0) {
-        return new NullStream(stream);
-      }
-      if (name == 'FlateDecode' || name == 'Fl') {
-        if (params) {
-          return new PredictorStream(new FlateStream(stream, maybeLength),
-                                     maybeLength, params);
-        }
-        return new FlateStream(stream, maybeLength);
-      }
-      if (name == 'LZWDecode' || name == 'LZW') {
-        var earlyChange = 1;
-        if (params) {
-          if (params.has('EarlyChange')) {
-            earlyChange = params.get('EarlyChange');
-          }
-          return new PredictorStream(
-            new LZWStream(stream, maybeLength, earlyChange),
-                          maybeLength, params);
-        }
-        return new LZWStream(stream, maybeLength, earlyChange);
-      }
-      if (name == 'DCTDecode' || name == 'DCT') {
-        return new JpegStream(stream, maybeLength, stream.dict, this.xref);
-      }
-      if (name == 'JPXDecode' || name == 'JPX') {
-        return new JpxStream(stream, maybeLength, stream.dict);
-      }
-      if (name == 'ASCII85Decode' || name == 'A85') {
-        return new Ascii85Stream(stream, maybeLength);
-      }
-      if (name == 'ASCIIHexDecode' || name == 'AHx') {
-        return new AsciiHexStream(stream, maybeLength);
-      }
-      if (name == 'CCITTFaxDecode' || name == 'CCF') {
-        return new CCITTFaxStream(stream, maybeLength, params);
-      }
-      if (name == 'RunLengthDecode' || name == 'RL') {
-        return new RunLengthStream(stream, maybeLength);
-      }
-      if (name == 'JBIG2Decode') {
-        return new Jbig2Stream(stream, maybeLength, stream.dict);
-      }
-      warn('filter "' + name + '" not supported yet');
-      return stream;
-    }
-  };
-
-  return Parser;
-})();
-
-var Lexer = (function LexerClosure() {
-  function Lexer(stream, knownCommands) {
-    this.stream = stream;
-    this.nextChar();
-
-    // While lexing, we build up many strings one char at a time. Using += for
-    // this can result in lots of garbage strings. It's better to build an
-    // array of single-char strings and then join() them together at the end.
-    // And reusing a single array (i.e. |this.strBuf|) over and over for this
-    // purpose uses less memory than using a new array for each string.
-    this.strBuf = [];
-
-    // The PDFs might have "glued" commands with other commands, operands or
-    // literals, e.g. "q1". The knownCommands is a dictionary of the valid
-    // commands and their prefixes. The prefixes are built the following way:
-    // if there a command that is a prefix of the other valid command or
-    // literal (e.g. 'f' and 'false') the following prefixes must be included,
-    // 'fa', 'fal', 'fals'. The prefixes are not needed, if the command has no
-    // other commands or literals as a prefix. The knowCommands is optional.
-    this.knownCommands = knownCommands;
-  }
-
-  Lexer.isSpace = function Lexer_isSpace(ch) {
-    // Space is one of the following characters: SPACE, TAB, CR or LF.
-    return (ch === 0x20 || ch === 0x09 || ch === 0x0D || ch === 0x0A);
-  };
-
-  // A '1' in this array means the character is white space. A '1' or
-  // '2' means the character ends a name or command.
-  var specialChars = [
-    1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, // 0x
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
-    1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, // 2x
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, // 3x
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 4x
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, // 5x
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 6x
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, // 7x
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ax
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // bx
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // cx
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // dx
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ex
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0  // fx
-  ];
-
-  function toHexDigit(ch) {
-    if (ch >= 0x30 && ch <= 0x39) { // '0'-'9'
-      return ch & 0x0F;
-    }
-    if ((ch >= 0x41 && ch <= 0x46) || (ch >= 0x61 && ch <= 0x66)) {
-      // 'A'-'F', 'a'-'f'
-      return (ch & 0x0F) + 9;
-    }
-    return -1;
-  }
-
-  Lexer.prototype = {
-    nextChar: function Lexer_nextChar() {
-      return (this.currentChar = this.stream.getByte());
-    },
-    peekChar: function Lexer_peekChar() {
-      return this.stream.peekBytes(1)[0];
-    },
-    getNumber: function Lexer_getNumber() {
-      var ch = this.currentChar;
-      var eNotation = false;
-      var divideBy = 0; // different from 0 if it's a floating point value
-      var sign = 1;
-
-      if (ch === 0x2D) { // '-'
-        sign = -1;
-        ch = this.nextChar();
-      } else if (ch === 0x2B) { // '+'
-        ch = this.nextChar();
-      }
-      if (ch === 0x2E) { // '.'
-        divideBy = 10;
-        ch = this.nextChar();
-      }
-      if (ch < 0x30 || ch > 0x39) { // '0' - '9'
-        error('Invalid number: ' + String.fromCharCode(ch));
-        return 0;
-      }
-
-      var baseValue = ch - 0x30; // '0'
-      var powerValue = 0;
-      var powerValueSign = 1;
-
-      while ((ch = this.nextChar()) >= 0) {
-        if (0x30 <= ch && ch <= 0x39) { // '0' - '9'
-          var currentDigit = ch - 0x30; // '0'
-          if (eNotation) { // We are after an 'e' or 'E'
-            powerValue = powerValue * 10 + currentDigit;
-          } else {
-            if (divideBy !== 0) { // We are after a point
-              divideBy *= 10;
-            }
-            baseValue = baseValue * 10 + currentDigit;
-          }
-        } else if (ch === 0x2E) { // '.'
-          if (divideBy === 0) {
-            divideBy = 1;
-          } else {
-            // A number can have only one '.'
-            break;
-          }
-        } else if (ch === 0x2D) { // '-'
-          // ignore minus signs in the middle of numbers to match
-          // Adobe's behavior
-          warn('Badly formated number');
-        } else if (ch === 0x45 || ch === 0x65) { // 'E', 'e'
-          // 'E' can be either a scientific notation or the beginning of a new
-          // operator
-          var hasE = true;
-          ch = this.peekChar();
-          if (ch === 0x2B || ch === 0x2D) { // '+', '-'
-            powerValueSign = (ch === 0x2D) ? -1 : 1;
-            this.nextChar(); // Consume the sign character
-          } else if (ch < 0x30 || ch > 0x39) { // '0' - '9'
-            // The 'E' must be the beginning of a new operator
-            break;
-          }
-          eNotation = true;
-        } else {
-          // the last character doesn't belong to us
-          break;
-        }
-      }
-
-      if (divideBy !== 0) {
-        baseValue /= divideBy;
-      }
-      if (eNotation) {
-        baseValue *= Math.pow(10, powerValueSign * powerValue);
-      }
-      return sign * baseValue;
-    },
-    getString: function Lexer_getString() {
-      var numParen = 1;
-      var done = false;
-      var strBuf = this.strBuf;
-      strBuf.length = 0;
-
-      var ch = this.nextChar();
-      while (true) {
-        var charBuffered = false;
-        switch (ch | 0) {
-          case -1:
-            warn('Unterminated string');
-            done = true;
-            break;
-          case 0x28: // '('
-            ++numParen;
-            strBuf.push('(');
-            break;
-          case 0x29: // ')'
-            if (--numParen === 0) {
-              this.nextChar(); // consume strings ')'
-              done = true;
-            } else {
-              strBuf.push(')');
-            }
-            break;
-          case 0x5C: // '\\'
-            ch = this.nextChar();
-            switch (ch) {
-              case -1:
-                warn('Unterminated string');
-                done = true;
-                break;
-              case 0x6E: // 'n'
-                strBuf.push('\n');
-                break;
-              case 0x72: // 'r'
-                strBuf.push('\r');
-                break;
-              case 0x74: // 't'
-                strBuf.push('\t');
-                break;
-              case 0x62: // 'b'
-                strBuf.push('\b');
-                break;
-              case 0x66: // 'f'
-                strBuf.push('\f');
-                break;
-              case 0x5C: // '\'
-              case 0x28: // '('
-              case 0x29: // ')'
-                strBuf.push(String.fromCharCode(ch));
-                break;
-              case 0x30: case 0x31: case 0x32: case 0x33: // '0'-'3'
-              case 0x34: case 0x35: case 0x36: case 0x37: // '4'-'7'
-                var x = ch & 0x0F;
-                ch = this.nextChar();
-                charBuffered = true;
-                if (ch >= 0x30 && ch <= 0x37) { // '0'-'7'
-                  x = (x << 3) + (ch & 0x0F);
-                  ch = this.nextChar();
-                  if (ch >= 0x30 && ch <= 0x37) {  // '0'-'7'
-                    charBuffered = false;
-                    x = (x << 3) + (ch & 0x0F);
-                  }
-                }
-                strBuf.push(String.fromCharCode(x));
-                break;
-              case 0x0D: // CR
-                if (this.peekChar() === 0x0A) { // LF
-                  this.nextChar();
-                }
-                break;
-              case 0x0A: // LF
-                break;
-              default:
-                strBuf.push(String.fromCharCode(ch));
-                break;
-            }
-            break;
-          default:
-            strBuf.push(String.fromCharCode(ch));
-            break;
-        }
-        if (done) {
-          break;
-        }
-        if (!charBuffered) {
-          ch = this.nextChar();
-        }
-      }
-      return strBuf.join('');
-    },
-    getName: function Lexer_getName() {
-      var ch;
-      var strBuf = this.strBuf;
-      strBuf.length = 0;
-      while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) {
-        if (ch === 0x23) { // '#'
-          ch = this.nextChar();
-          var x = toHexDigit(ch);
-          if (x != -1) {
-            var x2 = toHexDigit(this.nextChar());
-            if (x2 == -1) {
-              error('Illegal digit in hex char in name: ' + x2);
-            }
-            strBuf.push(String.fromCharCode((x << 4) | x2));
-          } else {
-            strBuf.push('#', String.fromCharCode(ch));
-          }
-        } else {
-          strBuf.push(String.fromCharCode(ch));
-        }
-      }
-      if (strBuf.length > 128) {
-        error('Warning: name token is longer than allowed by the spec: ' +
-              strBuf.length);
-      }
-      return Name.get(strBuf.join(''));
-    },
-    getHexString: function Lexer_getHexString() {
-      var strBuf = this.strBuf;
-      strBuf.length = 0;
-      var ch = this.currentChar;
-      var isFirstHex = true;
-      var firstDigit;
-      var secondDigit;
-      while (true) {
-        if (ch < 0) {
-          warn('Unterminated hex string');
-          break;
-        } else if (ch === 0x3E) { // '>'
-          this.nextChar();
-          break;
-        } else if (specialChars[ch] === 1) {
-          ch = this.nextChar();
-          continue;
-        } else {
-          if (isFirstHex) {
-            firstDigit = toHexDigit(ch);
-            if (firstDigit === -1) {
-              warn('Ignoring invalid character "' + ch + '" in hex string');
-              ch = this.nextChar();
-              continue;
-            }
-          } else {
-            secondDigit = toHexDigit(ch);
-            if (secondDigit === -1) {
-              warn('Ignoring invalid character "' + ch + '" in hex string');
-              ch = this.nextChar();
-              continue;
-            }
-            strBuf.push(String.fromCharCode((firstDigit << 4) | secondDigit));
-          }
-          isFirstHex = !isFirstHex;
-          ch = this.nextChar();
-        }
-      }
-      return strBuf.join('');
-    },
-    getObj: function Lexer_getObj() {
-      // skip whitespace and comments
-      var comment = false;
-      var ch = this.currentChar;
-      while (true) {
-        if (ch < 0) {
-          return EOF;
-        }
-        if (comment) {
-          if (ch === 0x0A || ch == 0x0D) { // LF, CR
-            comment = false;
-          }
-        } else if (ch === 0x25) { // '%'
-          comment = true;
-        } else if (specialChars[ch] !== 1) {
-          break;
-        }
-        ch = this.nextChar();
-      }
-
-      // start reading token
-      switch (ch | 0) {
-        case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: // '0'-'4'
-        case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: // '5'-'9'
-        case 0x2B: case 0x2D: case 0x2E: // '+', '-', '.'
-          return this.getNumber();
-        case 0x28: // '('
-          return this.getString();
-        case 0x2F: // '/'
-          return this.getName();
-        // array punctuation
-        case 0x5B: // '['
-          this.nextChar();
-          return Cmd.get('[');
-        case 0x5D: // ']'
-          this.nextChar();
-          return Cmd.get(']');
-        // hex string or dict punctuation
-        case 0x3C: // '<'
-          ch = this.nextChar();
-          if (ch === 0x3C) {
-            // dict punctuation
-            this.nextChar();
-            return Cmd.get('<<');
-          }
-          return this.getHexString();
-        // dict punctuation
-        case 0x3E: // '>'
-          ch = this.nextChar();
-          if (ch === 0x3E) {
-            this.nextChar();
-            return Cmd.get('>>');
-          }
-          return Cmd.get('>');
-        case 0x7B: // '{'
-          this.nextChar();
-          return Cmd.get('{');
-        case 0x7D: // '}'
-          this.nextChar();
-          return Cmd.get('}');
-        case 0x29: // ')'
-          error('Illegal character: ' + ch);
-          break;
-      }
-
-      // command
-      var str = String.fromCharCode(ch);
-      var knownCommands = this.knownCommands;
-      var knownCommandFound = knownCommands && (str in knownCommands);
-      while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) {
-        // stop if known command is found and next character does not make
-        // the str a command
-        var possibleCommand = str + String.fromCharCode(ch);
-        if (knownCommandFound && !(possibleCommand in knownCommands)) {
-          break;
-        }
-        if (str.length == 128) {
-          error('Command token too long: ' + str.length);
-        }
-        str = possibleCommand;
-        knownCommandFound = knownCommands && (str in knownCommands);
-      }
-      if (str == 'true') {
-        return true;
-      }
-      if (str == 'false') {
-        return false;
-      }
-      if (str == 'null') {
-        return null;
-      }
-      return Cmd.get(str);
-    },
-    skipToNextLine: function Lexer_skipToNextLine() {
-      var stream = this.stream;
-      var ch = this.currentChar;
-      while (ch >= 0) {
-        if (ch === 0x0D) { // CR
-          ch = this.nextChar();
-          if (ch === 0x0A) { // LF
-            this.nextChar();
-          }
-          break;
-        } else if (ch === 0x0A) { // LF
-          this.nextChar();
-          break;
-        }
-        ch = this.nextChar();
-      }
-    }
-  };
-
-  return Lexer;
-})();
-
-var Linearization = (function LinearizationClosure() {
-  function Linearization(stream) {
-    this.parser = new Parser(new Lexer(stream), false, null);
-    var obj1 = this.parser.getObj();
-    var obj2 = this.parser.getObj();
-    var obj3 = this.parser.getObj();
-    this.linDict = this.parser.getObj();
-    if (isInt(obj1) && isInt(obj2) && isCmd(obj3, 'obj') &&
-        isDict(this.linDict)) {
-      var obj = this.linDict.get('Linearized');
-      if (!(isNum(obj) && obj > 0)) {
-        this.linDict = null;
-      }
-    }
-  }
-
-  Linearization.prototype = {
-    getInt: function Linearization_getInt(name) {
-      var linDict = this.linDict;
-      var obj;
-      if (isDict(linDict) && isInt(obj = linDict.get(name)) && obj > 0) {
-        return obj;
-      }
-      error('"' + name + '" field in linearization table is invalid');
-    },
-    getHint: function Linearization_getHint(index) {
-      var linDict = this.linDict;
-      var obj1, obj2;
-      if (isDict(linDict) && isArray(obj1 = linDict.get('H')) &&
-          obj1.length >= 2 && isInt(obj2 = obj1[index]) && obj2 > 0) {
-        return obj2;
-      }
-      error('Hints table in linearization table is invalid: ' + index);
-    },
-    get length() {
-      if (!isDict(this.linDict)) {
-        return 0;
-      }
-      return this.getInt('L');
-    },
-    get hintsOffset() {
-      return this.getHint(0);
-    },
-    get hintsLength() {
-      return this.getHint(1);
-    },
-    get hintsOffset2() {
-      return this.getHint(2);
-    },
-    get hintsLenth2() {
-      return this.getHint(3);
-    },
-    get objectNumberFirst() {
-      return this.getInt('O');
-    },
-    get endFirst() {
-      return this.getInt('E');
-    },
-    get numPages() {
-      return this.getInt('N');
-    },
-    get mainXRefEntriesOffset() {
-      return this.getInt('T');
-    },
-    get pageFirst() {
-      return this.getInt('P');
-    }
-  };
-
-  return Linearization;
-})();
-
-
-
-
- - - - -
- - - -
- -
- Documentation generated by JSDoc 3.3.0-alpha5 on Mon Apr 07 2014 18:31:28 GMT-0300 (ART) -
- - - - - From c713a7c7cdeff8919f9d10698c5b45796d7c7956 Mon Sep 17 00:00:00 2001 From: Pablo Alejandro Fiumara Date: Sun, 13 Apr 2014 00:50:32 -0300 Subject: [PATCH 7/9] added strict mode --- external/jsdoc/scripts/linenumber.js | 1 + 1 file changed, 1 insertion(+) diff --git a/external/jsdoc/scripts/linenumber.js b/external/jsdoc/scripts/linenumber.js index 8d52f7eafdb16..250863932f0f0 100644 --- a/external/jsdoc/scripts/linenumber.js +++ b/external/jsdoc/scripts/linenumber.js @@ -1,4 +1,5 @@ /*global document */ +'use strict'; (function() { var source = document.getElementsByClassName('prettyprint source linenums'); var i = 0; From ce86b213528c769fec2f50e936486895021aacfe Mon Sep 17 00:00:00 2001 From: Pablo Alejandro Fiumara Date: Sun, 13 Apr 2014 00:53:51 -0300 Subject: [PATCH 8/9] added strict mode --- external/jsdoc/scripts/prettify/prettify.js | 1 + 1 file changed, 1 insertion(+) diff --git a/external/jsdoc/scripts/prettify/prettify.js b/external/jsdoc/scripts/prettify/prettify.js index eef5ad7e6a076..28265343093fc 100644 --- a/external/jsdoc/scripts/prettify/prettify.js +++ b/external/jsdoc/scripts/prettify/prettify.js @@ -1,3 +1,4 @@ +"use strict"; var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; (function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= [],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c Date: Sun, 13 Apr 2014 13:17:43 -0300 Subject: [PATCH 9/9] deleted output of JSDoc --- external/jsdoc/PDFDocumentProxy.html | 1238 --------------- external/jsdoc/PDFPageProxy.html | 934 ------------ external/jsdoc/RenderTask.html | 229 --- external/jsdoc/api.js.html | 1323 ----------------- external/jsdoc/global.html | 587 -------- external/jsdoc/index.html | 63 - external/jsdoc/scripts/linenumber.js | 26 - .../scripts/prettify/Apache-License-2.0.txt | 202 --- external/jsdoc/scripts/prettify/lang-css.js | 2 - external/jsdoc/scripts/prettify/prettify.js | 29 - external/jsdoc/styles/jsdoc-default.css | 334 ----- external/jsdoc/styles/prettify-jsdoc.css | 111 -- external/jsdoc/styles/prettify-tomorrow.css | 132 -- 13 files changed, 5210 deletions(-) delete mode 100644 external/jsdoc/PDFDocumentProxy.html delete mode 100644 external/jsdoc/PDFPageProxy.html delete mode 100644 external/jsdoc/RenderTask.html delete mode 100644 external/jsdoc/api.js.html delete mode 100644 external/jsdoc/global.html delete mode 100644 external/jsdoc/index.html delete mode 100644 external/jsdoc/scripts/linenumber.js delete mode 100644 external/jsdoc/scripts/prettify/Apache-License-2.0.txt delete mode 100644 external/jsdoc/scripts/prettify/lang-css.js delete mode 100644 external/jsdoc/scripts/prettify/prettify.js delete mode 100644 external/jsdoc/styles/jsdoc-default.css delete mode 100644 external/jsdoc/styles/prettify-jsdoc.css delete mode 100644 external/jsdoc/styles/prettify-tomorrow.css diff --git a/external/jsdoc/PDFDocumentProxy.html b/external/jsdoc/PDFDocumentProxy.html deleted file mode 100644 index a8d8d17af21e5..0000000000000 --- a/external/jsdoc/PDFDocumentProxy.html +++ /dev/null @@ -1,1238 +0,0 @@ - - - - - JSDoc: Class: PDFDocumentProxy - - - - - - - - - - -
- -

Class: PDFDocumentProxy

- - - - - -
- -
-

- PDFDocumentProxy -

- -
- -
-
- - - - -
-

new PDFDocumentProxy()

- - -
-
- - -
- Proxy to a PDFDocument in the worker thread. Also, contains commonly used -properties that can be read synchronously. -
- - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
- - -
- - - - - - - - - - - - -

Members

- -
- -
-

fingerprint

- - -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - -
- - - -
-

numPages

- - -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - -
- -
- - - -

Methods

- -
- -
-

cleanup()

- - -
-
- - -
- Cleans up resources allocated by the document, e.g. created @font-face. -
- - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
- - - -
-

destroy()

- - -
-
- - -
- Destroys current document instance and terminates worker. -
- - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
- - - -
-

getData() → {Promise}

- - -
-
- - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - -
- A promise that is resolved with a TypedArray that has -the raw data from the PDF. -
- - - -
-
- Type -
-
- -Promise - - -
-
- - - - -
- - - -
-

getDestinations() → {Promise}

- - -
-
- - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - -
- A promise that is resolved with a lookup table for -mapping named destinations to reference numbers. -
- - - -
-
- Type -
-
- -Promise - - -
-
- - - - -
- - - -
-

getDownloadInfo() → {Promise}

- - -
-
- - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - -
- A promise that is resolved when the document's data -is loaded. It is resolved with an {Object} that contains the length -property that indicates size of the PDF data in bytes. -
- - - -
-
- Type -
-
- -Promise - - -
-
- - - - -
- - - -
-

getJavaScript() → {Promise}

- - -
-
- - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - -
- A promise that is resolved with an array of all the -JavaScript strings in the name tree. -
- - - -
-
- Type -
-
- -Promise - - -
-
- - - - -
- - - -
-

getMetadata() → {Promise}

- - -
-
- - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - -
- A promise that is resolved with an {Object} that has -info and metadata properties. Info is an {Object} filled with anything -available in the information dictionary and similarly metadata is a -{Metadata} object with information from the metadata section of the PDF. -
- - - -
-
- Type -
-
- -Promise - - -
-
- - - - -
- - - -
-

getOutline() → {Promise}

- - -
-
- - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - -
- A promise that is resolved with an {Array} that is a -tree outline (if it has one) of the PDF. The tree is in the format of: -[ - { - title: string, - bold: boolean, - italic: boolean, - color: rgb array, - dest: dest obj, - items: array of more items like this - }, - ... -]. -
- - - -
-
- Type -
-
- -Promise - - -
-
- - - - -
- - - -
-

getPage(pageNumber) → {Promise}

- - -
-
- - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
pageNumber - - -number - - - - The page number to get. The first page is 1.
- - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - -
- A promise that is resolved with a PDFPageProxy -object. -
- - - -
-
- Type -
-
- -Promise - - -
-
- - - - -
- - - -
-

getPageIndex(ref) → {Promise}

- - -
-
- - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
ref - - -Object - - - - The page reference. Must have - the 'num' and 'gen' properties.
- - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - -
- A promise that is resolved with the page index that is -associated with the reference. -
- - - -
-
- Type -
-
- -Promise - - -
-
- - - - -
- -
- - - - - -
- -
- - - - -
- - - -
- -
- Documentation generated by JSDoc 3.3.0-alpha5 on Sun Apr 13 2014 00:33:02 GMT-0300 (ART) -
- - - - - \ No newline at end of file diff --git a/external/jsdoc/PDFPageProxy.html b/external/jsdoc/PDFPageProxy.html deleted file mode 100644 index a677206c847f9..0000000000000 --- a/external/jsdoc/PDFPageProxy.html +++ /dev/null @@ -1,934 +0,0 @@ - - - - - JSDoc: Class: PDFPageProxy - - - - - - - - - - -
- -

Class: PDFPageProxy

- - - - - -
- -
-

- PDFPageProxy -

- -
- -
-
- - - - -
-

new PDFPageProxy()

- - -
-
- - -
- Proxy to a PDFPage in the worker thread. -
- - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
- - -
- - - - - - - - - - - - -

Members

- -
- -
-

pageNumber

- - -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - -
- - - -
-

ref

- - -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - -
- - - -
-

rotate

- - -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - -
- - - -
-

view

- - -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - -
- -
- - - -

Methods

- -
- -
-

destroy()

- - -
-
- - -
- Destroys resources allocated by the page. -
- - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
- - - -
-

getAnnotations() → {Promise}

- - -
-
- - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - -
- A promise that is resolved with an {Array} of the -annotation objects. -
- - - -
-
- Type -
-
- -Promise - - -
-
- - - - -
- - - -
-

getTextContent() → {Promise}

- - -
-
- - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - -
- That is resolved with the array of BidiText -objects that represent the page text content. -
- - - -
-
- Type -
-
- -Promise - - -
-
- - - - -
- - - -
-

getViewport(scale, rotate) → {PageViewport}

- - -
-
- - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
scale - - -number - - - - The desired scale of the viewport.
rotate - - -number - - - - Degrees to rotate the viewport. If omitted this -defaults to the page rotation.
- - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - -
- Contains 'width' and 'height' properties along -with transforms required for rendering. -
- - - -
-
- Type -
-
- -PageViewport - - -
-
- - - - -
- - - -
-

render(params) → {RenderTask}

- - -
-
- - -
- Begins the process of rendering a page to the desired context. -
- - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
params - - -Object - - - - A parameter object that supports: -{ - canvasContext(required): A 2D context of a DOM Canvas object., - textLayer(optional): An object that has beginLayout, endLayout, and - appendText functions., - imageLayer(optional): An object that has beginLayout, endLayout and - appendImage functions., - continueCallback(optional): A function that will be called each time - the rendering is paused. To continue - rendering call the function that is the - first argument to the callback. -}.
- - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - -
Returns:
- - -
- An extended promise that is resolved when the page -finishes rendering (see RenderTask). -
- - - -
-
- Type -
-
- -RenderTask - - -
-
- - - - -
- -
- - - - - -
- -
- - - - -
- - - -
- -
- Documentation generated by JSDoc 3.3.0-alpha5 on Sun Apr 13 2014 00:33:02 GMT-0300 (ART) -
- - - - - \ No newline at end of file diff --git a/external/jsdoc/RenderTask.html b/external/jsdoc/RenderTask.html deleted file mode 100644 index d5f39c504b173..0000000000000 --- a/external/jsdoc/RenderTask.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - JSDoc: Class: RenderTask - - - - - - - - - - -
- -

Class: RenderTask

- - - - - -
- -
-

- RenderTask -

- -
- -
-
- - - - -
-

new RenderTask()

- - -
-
- - -
- Allows controlling of the rendering tasks. -
- - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - - -

Methods

- -
- -
-

cancel()

- - -
-
- - -
- Cancels the rendering task. If the task is currently rendering it will -not be cancelled until graphics pauses with a timeout. The promise that -this object extends will resolved when cancelled. -
- - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- - - - -
- - - -
- -
- Documentation generated by JSDoc 3.3.0-alpha5 on Sun Apr 13 2014 00:33:02 GMT-0300 (ART) -
- - - - - \ No newline at end of file diff --git a/external/jsdoc/api.js.html b/external/jsdoc/api.js.html deleted file mode 100644 index a739e7bcd20cf..0000000000000 --- a/external/jsdoc/api.js.html +++ /dev/null @@ -1,1323 +0,0 @@ - - - - - JSDoc: Source: api.js - - - - - - - - - - -
- -

Source: api.js

- - - - - -
-
-
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
-/* 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 CanvasGraphics, combineUrl, createScratchCanvas, error,
-           FontLoader, globalScope, info, isArrayBuffer, loadJpegStream,
-           MessageHandler, PDFJS, Promise, StatTimer, warn,
-           PasswordResponses, Util, loadScript, LegacyPromise,
-           FontFace */
-
-'use strict';
-
-/**
- * The maximum allowed image size in total pixels e.g. width * height. Images
- * above this value will not be drawn. Use -1 for no limit.
- * @var {number}
- */
-PDFJS.maxImageSize = (PDFJS.maxImageSize === undefined ?
-                      -1 : PDFJS.maxImageSize);
-
-/**
- * The url of where the predefined Adobe CMaps are located. Include trailing
- * slash.
- * @var {string}
- */
-PDFJS.cMapUrl = (PDFJS.cMapUrl === undefined ? null : PDFJS.cMapUrl);
-
-/**
- * Specifies if CMaps are binary packed.
- * @var {boolean}
- */
-PDFJS.cMapPacked = PDFJS.cMapPacked === undefined ? false : PDFJS.cMapPacked;
-
-/*
- * By default fonts are converted to OpenType fonts and loaded via font face
- * rules. If disabled, the font will be rendered using a built in font renderer
- * that constructs the glyphs with primitive path commands.
- * @var {boolean}
- */
-PDFJS.disableFontFace = (PDFJS.disableFontFace === undefined ?
-                         false : PDFJS.disableFontFace);
-
-/**
- * Path for image resources, mainly for annotation icons. Include trailing
- * slash.
- * @var {string}
- */
-PDFJS.imageResourcesPath = (PDFJS.imageResourcesPath === undefined ?
-                            '' : PDFJS.imageResourcesPath);
-
-/**
- * Disable the web worker and run all code on the main thread. This will happen
- * automatically if the browser doesn't support workers or sending typed arrays
- * to workers.
- * @var {boolean}
- */
-PDFJS.disableWorker = (PDFJS.disableWorker === undefined ?
-                       false : PDFJS.disableWorker);
-
-/**
- * Path and filename of the worker file. Required when the worker is enabled in
- * development mode. If unspecified in the production build, the worker will be
- * loaded based on the location of the pdf.js file.
- * @var {string}
- */
-PDFJS.workerSrc = (PDFJS.workerSrc === undefined ? null : PDFJS.workerSrc);
-
-/**
- * Disable range request loading of PDF files. When enabled and if the server
- * supports partial content requests then the PDF will be fetched in chunks.
- * Enabled (false) by default.
- * @var {boolean}
- */
-PDFJS.disableRange = (PDFJS.disableRange === undefined ?
-                      false : PDFJS.disableRange);
-
-/**
- * Disable pre-fetching of PDF file data. When range requests are enabled PDF.js
- * will automatically keep fetching more data even if it isn't needed to display
- * the current page. This default behavior can be disabled.
- * @var {boolean}
- */
-PDFJS.disableAutoFetch = (PDFJS.disableAutoFetch === undefined ?
-                          false : PDFJS.disableAutoFetch);
-
-/**
- * Enables special hooks for debugging PDF.js.
- * @var {boolean}
- */
-PDFJS.pdfBug = (PDFJS.pdfBug === undefined ? false : PDFJS.pdfBug);
-
-/**
- * Enables transfer usage in postMessage for ArrayBuffers.
- * @var {boolean}
- */
-PDFJS.postMessageTransfers = (PDFJS.postMessageTransfers === undefined ?
-                              true : PDFJS.postMessageTransfers);
-
-/**
- * Disables URL.createObjectURL usage.
- * @var {boolean}
- */
-PDFJS.disableCreateObjectURL = (PDFJS.disableCreateObjectURL === undefined ?
-                                false : PDFJS.disableCreateObjectURL);
-
-/**
- * Controls the logging level.
- * The constants from PDFJS.VERBOSITY_LEVELS should be used:
- * - errors
- * - warnings [default]
- * - infos
- * @var {number}
- */
-PDFJS.verbosity = (PDFJS.verbosity === undefined ?
-                   PDFJS.VERBOSITY_LEVELS.warnings : PDFJS.verbosity);
-
-/**
- * Document initialization / loading parameters object.
- *
- * @typedef {Object} DocumentInitParameters
- * @property {string}     url   - The URL of the PDF.
- * @property {TypedArray} data  - A typed array with PDF data.
- * @property {Object}     httpHeaders - Basic authentication headers.
- * @property {boolean}    withCredentials - Indicates whether or not cross-site
- *   Access-Control requests should be made using credentials such as cookies
- *   or authorization headers. The default is false.
- * @property {string}     password - For decrypting password-protected PDFs.
- * @property {TypedArray} initialData - A typed array with the first portion or
- *   all of the pdf data. Used by the extension since some data is already
- *   loaded before the switch to range requests.
- */
-
-/**
- * This is the main entry point for loading a PDF and interacting with it.
- * NOTE: If a URL is used to fetch the PDF data a standard XMLHttpRequest(XHR)
- * is used, which means it must follow the same origin rules that any XHR does
- * e.g. No cross domain requests without CORS.
- *
- * @param {string|TypedArray|DocumentInitParameters} source Can be a url to
- * where a PDF is located, a typed array (Uint8Array) already populated with
- * data or parameter object.
- *
- * @param {Object} pdfDataRangeTransport is optional. It is used if you want
- * to manually serve range requests for data in the PDF. See viewer.js for
- * an example of pdfDataRangeTransport's interface.
- *
- * @param {function} passwordCallback is optional. It is used to request a
- * password if wrong or no password was provided. The callback receives two
- * parameters: function that needs to be called with new password and reason
- * (see {PasswordResponses}).
- *
- * @return {Promise} A promise that is resolved with {@link PDFDocumentProxy}
- *   object.
- */
-PDFJS.getDocument = function getDocument(source,
-                                         pdfDataRangeTransport,
-                                         passwordCallback,
-                                         progressCallback) {
-  var workerInitializedPromise, workerReadyPromise, transport;
-
-  if (typeof source === 'string') {
-    source = { url: source };
-  } else if (isArrayBuffer(source)) {
-    source = { data: source };
-  } else if (typeof source !== 'object') {
-    error('Invalid parameter in getDocument, need either Uint8Array, ' +
-          'string or a parameter object');
-  }
-
-  if (!source.url && !source.data) {
-    error('Invalid parameter array, need either .data or .url');
-  }
-
-  // copy/use all keys as is except 'url' -- full path is required
-  var params = {};
-  for (var key in source) {
-    if (key === 'url' && typeof window !== 'undefined') {
-      params[key] = combineUrl(window.location.href, source[key]);
-      continue;
-    }
-    params[key] = source[key];
-  }
-
-  workerInitializedPromise = new PDFJS.LegacyPromise();
-  workerReadyPromise = new PDFJS.LegacyPromise();
-  transport = new WorkerTransport(workerInitializedPromise, workerReadyPromise,
-                                  pdfDataRangeTransport, progressCallback);
-  workerInitializedPromise.then(function transportInitialized() {
-    transport.passwordCallback = passwordCallback;
-    transport.fetchDocument(params);
-  });
-  return workerReadyPromise;
-};
-
-/**
- * Proxy to a PDFDocument in the worker thread. Also, contains commonly used
- * properties that can be read synchronously.
- * @class
- */
-var PDFDocumentProxy = (function PDFDocumentProxyClosure() {
-  function PDFDocumentProxy(pdfInfo, transport) {
-    this.pdfInfo = pdfInfo;
-    this.transport = transport;
-  }
-  PDFDocumentProxy.prototype = /** @lends PDFDocumentProxy.prototype */ {
-    /**
-     * @return {number} Total number of pages the PDF contains.
-     */
-    get numPages() {
-      return this.pdfInfo.numPages;
-    },
-    /**
-     * @return {string} A unique ID to identify a PDF. Not guaranteed to be
-     * unique.
-     */
-    get fingerprint() {
-      return this.pdfInfo.fingerprint;
-    },
-    /**
-     * @param {number} pageNumber The page number to get. The first page is 1.
-     * @return {Promise} A promise that is resolved with a {@link PDFPageProxy}
-     * object.
-     */
-    getPage: function PDFDocumentProxy_getPage(pageNumber) {
-      return this.transport.getPage(pageNumber);
-    },
-    /**
-     * @param {{num: number, gen: number}} ref The page reference. Must have
-     *   the 'num' and 'gen' properties.
-     * @return {Promise} A promise that is resolved with the page index that is
-     * associated with the reference.
-     */
-    getPageIndex: function PDFDocumentProxy_getPageIndex(ref) {
-      return this.transport.getPageIndex(ref);
-    },
-    /**
-     * @return {Promise} A promise that is resolved with a lookup table for
-     * mapping named destinations to reference numbers.
-     */
-    getDestinations: function PDFDocumentProxy_getDestinations() {
-      return this.transport.getDestinations();
-    },
-    /**
-     * @return {Promise} A promise that is resolved with an array of all the
-     * JavaScript strings in the name tree.
-     */
-    getJavaScript: function PDFDocumentProxy_getJavaScript() {
-      var promise = new PDFJS.LegacyPromise();
-      var js = this.pdfInfo.javaScript;
-      promise.resolve(js);
-      return promise;
-    },
-    /**
-     * @return {Promise} A promise that is resolved with an {Array} that is a
-     * tree outline (if it has one) of the PDF. The tree is in the format of:
-     * [
-     *  {
-     *   title: string,
-     *   bold: boolean,
-     *   italic: boolean,
-     *   color: rgb array,
-     *   dest: dest obj,
-     *   items: array of more items like this
-     *  },
-     *  ...
-     * ].
-     */
-    getOutline: function PDFDocumentProxy_getOutline() {
-      var promise = new PDFJS.LegacyPromise();
-      var outline = this.pdfInfo.outline;
-      promise.resolve(outline);
-      return promise;
-    },
-    /**
-     * @return {Promise} A promise that is resolved with an {Object} that has
-     * info and metadata properties.  Info is an {Object} filled with anything
-     * available in the information dictionary and similarly metadata is a
-     * {Metadata} object with information from the metadata section of the PDF.
-     */
-    getMetadata: function PDFDocumentProxy_getMetadata() {
-      var promise = new PDFJS.LegacyPromise();
-      var info = this.pdfInfo.info;
-      var metadata = this.pdfInfo.metadata;
-      promise.resolve({
-        info: info,
-        metadata: (metadata ? new PDFJS.Metadata(metadata) : null)
-      });
-      return promise;
-    },
-    /**
-     * @return {Promise} A promise that is resolved with a TypedArray that has
-     * the raw data from the PDF.
-     */
-    getData: function PDFDocumentProxy_getData() {
-      var promise = new PDFJS.LegacyPromise();
-      this.transport.getData(promise);
-      return promise;
-    },
-    /**
-     * @return {Promise} A promise that is resolved when the document's data
-     * is loaded. It is resolved with an {Object} that contains the length
-     * property that indicates size of the PDF data in bytes.
-     */
-    getDownloadInfo: function PDFDocumentProxy_getDownloadInfo() {
-      return this.transport.downloadInfoPromise;
-    },
-    /**
-     * Cleans up resources allocated by the document, e.g. created @font-face.
-     */
-    cleanup: function PDFDocumentProxy_cleanup() {
-      this.transport.startCleanup();
-    },
-    /**
-     * Destroys current document instance and terminates worker.
-     */
-    destroy: function PDFDocumentProxy_destroy() {
-      this.transport.destroy();
-    }
-  };
-  return PDFDocumentProxy;
-})();
-
-/**
- * Page text content part.
- *
- * @typedef {Object} BidiText
- * @property {string} str - text content.
- * @property {string} dir - text direction: 'ttb', 'ltr' or 'rtl'.
- * @property {number} x - x position of the text on the page.
- * @property {number} y - y position of the text on the page.
- * @property {number} angle - text rotation.
- * @property {number} size - font size.
- */
-
-/**
- * Proxy to a PDFPage in the worker thread.
- * @class
- */
-var PDFPageProxy = (function PDFPageProxyClosure() {
-  function PDFPageProxy(pageInfo, transport) {
-    this.pageInfo = pageInfo;
-    this.transport = transport;
-    this.stats = new StatTimer();
-    this.stats.enabled = !!globalScope.PDFJS.enableStats;
-    this.commonObjs = transport.commonObjs;
-    this.objs = new PDFObjects();
-    this.cleanupAfterRender = false;
-    this.pendingDestroy = false;
-    this.intentStates = {};
-  }
-  PDFPageProxy.prototype = /** @lends PDFPageProxy.prototype */ {
-    /**
-     * @return {number} Page number of the page. First page is 1.
-     */
-    get pageNumber() {
-      return this.pageInfo.pageIndex + 1;
-    },
-    /**
-     * @return {number} The number of degrees the page is rotated clockwise.
-     */
-    get rotate() {
-      return this.pageInfo.rotate;
-    },
-    /**
-     * @return {Object} The reference that points to this page. It has 'num' and
-     * 'gen' properties.
-     */
-    get ref() {
-      return this.pageInfo.ref;
-    },
-    /**
-     * @return {Array} An array of the visible portion of the PDF page in the
-     * user space units - [x1, y1, x2, y2].
-     */
-    get view() {
-      return this.pageInfo.view;
-    },
-    /**
-     * @param {number} scale The desired scale of the viewport.
-     * @param {number} rotate Degrees to rotate the viewport. If omitted this
-     * defaults to the page rotation.
-     * @return {PageViewport} Contains 'width' and 'height' properties along
-     * with transforms required for rendering.
-     */
-    getViewport: function PDFPageProxy_getViewport(scale, rotate) {
-      if (arguments.length < 2) {
-        rotate = this.rotate;
-      }
-      return new PDFJS.PageViewport(this.view, scale, rotate, 0, 0);
-    },
-    /**
-     * @return {Promise} A promise that is resolved with an {Array} of the
-     * annotation objects.
-     */
-    getAnnotations: function PDFPageProxy_getAnnotations() {
-      if (this.annotationsPromise) {
-        return this.annotationsPromise;
-      }
-
-      var promise = new PDFJS.LegacyPromise();
-      this.annotationsPromise = promise;
-      this.transport.getAnnotations(this.pageInfo.pageIndex);
-      return promise;
-    },
-    /**
-     * Begins the process of rendering a page to the desired context.
-     * @param {Object} params A parameter object that supports:
-     * {
-     *   canvasContext(required): A 2D context of a DOM Canvas object.,
-     *   textLayer(optional): An object that has beginLayout, endLayout, and
-     *                        appendText functions.,
-     *   imageLayer(optional): An object that has beginLayout, endLayout and
-     *                         appendImage functions.,
-     *   continueCallback(optional): A function that will be called each time
-     *                               the rendering is paused.  To continue
-     *                               rendering call the function that is the
-     *                               first argument to the callback.
-     * }.
-     * @return {RenderTask} An extended promise that is resolved when the page
-     * finishes rendering (see RenderTask).
-     */
-    render: function PDFPageProxy_render(params) {
-      var stats = this.stats;
-      stats.time('Overall');
-
-      // If there was a pending destroy cancel it so no cleanup happens during
-      // this call to render.
-      this.pendingDestroy = false;
-
-      var renderingIntent = ('intent' in params ?
-        (params.intent == 'print' ? 'print' : 'display') : 'display');
-
-      if (!this.intentStates[renderingIntent]) {
-        this.intentStates[renderingIntent] = {};
-      }
-      var intentState = this.intentStates[renderingIntent];
-
-      // If there is no displayReadyPromise yet, then the operatorList was never
-      // requested before. Make the request and create the promise.
-      if (!intentState.displayReadyPromise) {
-        intentState.receivingOperatorList = true;
-        intentState.displayReadyPromise = new LegacyPromise();
-        intentState.operatorList = {
-          fnArray: [],
-          argsArray: [],
-          lastChunk: false
-        };
-
-        this.stats.time('Page Request');
-        this.transport.messageHandler.send('RenderPageRequest', {
-          pageIndex: this.pageNumber - 1,
-          intent: renderingIntent
-        });
-      }
-
-      var internalRenderTask = new InternalRenderTask(complete, params,
-                                                      this.objs,
-                                                      this.commonObjs,
-                                                      intentState.operatorList,
-                                                      this.pageNumber);
-      if (!intentState.renderTasks) {
-        intentState.renderTasks = [];
-      }
-      intentState.renderTasks.push(internalRenderTask);
-      var renderTask = new RenderTask(internalRenderTask);
-
-      var self = this;
-      intentState.displayReadyPromise.then(
-        function pageDisplayReadyPromise(transparency) {
-          if (self.pendingDestroy) {
-            complete();
-            return;
-          }
-          stats.time('Rendering');
-          internalRenderTask.initalizeGraphics(transparency);
-          internalRenderTask.operatorListChanged();
-        },
-        function pageDisplayReadPromiseError(reason) {
-          complete(reason);
-        }
-      );
-
-      function complete(error) {
-        var i = intentState.renderTasks.indexOf(internalRenderTask);
-        if (i >= 0) {
-          intentState.renderTasks.splice(i, 1);
-        }
-
-        if (self.cleanupAfterRender) {
-          self.pendingDestroy = true;
-        }
-        self._tryDestroy();
-
-        if (error) {
-          renderTask.promise.reject(error);
-        } else {
-          renderTask.promise.resolve();
-        }
-        stats.timeEnd('Rendering');
-        stats.timeEnd('Overall');
-      }
-
-      return renderTask;
-    },
-    /**
-     * @return {Promise} That is resolved with the array of {@link BidiText}
-     * objects that represent the page text content.
-     */
-    getTextContent: function PDFPageProxy_getTextContent() {
-      var promise = new PDFJS.LegacyPromise();
-      this.transport.messageHandler.send('GetTextContent', {
-          pageIndex: this.pageNumber - 1
-        },
-        function textContentCallback(textContent) {
-          promise.resolve(textContent);
-        }
-      );
-      return promise;
-    },
-    /**
-     * Destroys resources allocated by the page.
-     */
-    destroy: function PDFPageProxy_destroy() {
-      this.pendingDestroy = true;
-      this._tryDestroy();
-    },
-    /**
-     * For internal use only. Attempts to clean up if rendering is in a state
-     * where that's possible.
-     * @ignore
-     */
-    _tryDestroy: function PDFPageProxy__destroy() {
-      if (!this.pendingDestroy ||
-          Object.keys(this.intentStates).some(function(intent) {
-            var intentState = this.intentStates[intent];
-            return (intentState.renderTasks.length !== 0 ||
-                    intentState.receivingOperatorList);
-          }, this)) {
-        return;
-      }
-
-      Object.keys(this.intentStates).forEach(function(intent) {
-        delete this.intentStates[intent];
-      }, this);
-      this.objs.clear();
-      this.pendingDestroy = false;
-    },
-    /**
-     * For internal use only.
-     * @ignore
-     */
-    _startRenderPage: function PDFPageProxy_startRenderPage(transparency,
-                                                            intent) {
-      var intentState = this.intentStates[intent];
-      intentState.displayReadyPromise.resolve(transparency);
-    },
-    /**
-     * For internal use only.
-     * @ignore
-     */
-    _renderPageChunk: function PDFPageProxy_renderPageChunk(operatorListChunk,
-                                                            intent) {
-      var intentState = this.intentStates[intent];
-      // Add the new chunk to the current operator list.
-      for (var i = 0, ii = operatorListChunk.length; i < ii; i++) {
-        intentState.operatorList.fnArray.push(operatorListChunk.fnArray[i]);
-        intentState.operatorList.argsArray.push(
-          operatorListChunk.argsArray[i]);
-      }
-      intentState.operatorList.lastChunk = operatorListChunk.lastChunk;
-
-      // Notify all the rendering tasks there are more operators to be consumed.
-      for (var i = 0; i < intentState.renderTasks.length; i++) {
-        intentState.renderTasks[i].operatorListChanged();
-      }
-
-      if (operatorListChunk.lastChunk) {
-        intentState.receivingOperatorList = false;
-        this._tryDestroy();
-      }
-    }
-  };
-  return PDFPageProxy;
-})();
-
-/**
- * For internal use only.
- * @ignore
- */
-var WorkerTransport = (function WorkerTransportClosure() {
-  function WorkerTransport(workerInitializedPromise, workerReadyPromise,
-                           pdfDataRangeTransport, progressCallback) {
-    this.pdfDataRangeTransport = pdfDataRangeTransport;
-
-    this.workerReadyPromise = workerReadyPromise;
-    this.progressCallback = progressCallback;
-    this.commonObjs = new PDFObjects();
-
-    this.pageCache = [];
-    this.pagePromises = [];
-    this.downloadInfoPromise = new PDFJS.LegacyPromise();
-    this.passwordCallback = null;
-
-    // If worker support isn't disabled explicit and the browser has worker
-    // support, create a new web worker and test if it/the browser fullfills
-    // all requirements to run parts of pdf.js in a web worker.
-    // Right now, the requirement is, that an Uint8Array is still an Uint8Array
-    // as it arrives on the worker. Chrome added this with version 15.
-//#if !SINGLE_FILE
-    if (!globalScope.PDFJS.disableWorker && typeof Worker !== 'undefined') {
-      var workerSrc = PDFJS.workerSrc;
-      if (!workerSrc) {
-        error('No PDFJS.workerSrc specified');
-      }
-
-      try {
-        // Some versions of FF can't create a worker on localhost, see:
-        // https://bugzilla.mozilla.org/show_bug.cgi?id=683280
-        var worker = new Worker(workerSrc);
-        var messageHandler = new MessageHandler('main', worker);
-        this.messageHandler = messageHandler;
-
-        messageHandler.on('test', function transportTest(data) {
-          var supportTypedArray = data && data.supportTypedArray;
-          if (supportTypedArray) {
-            this.worker = worker;
-            if (!data.supportTransfers) {
-              PDFJS.postMessageTransfers = false;
-            }
-            this.setupMessageHandler(messageHandler);
-            workerInitializedPromise.resolve();
-          } else {
-            globalScope.PDFJS.disableWorker = true;
-            this.loadFakeWorkerFiles().then(function() {
-              this.setupFakeWorker();
-              workerInitializedPromise.resolve();
-            }.bind(this));
-          }
-        }.bind(this));
-
-        var testObj = new Uint8Array([PDFJS.postMessageTransfers ? 255 : 0]);
-        // Some versions of Opera throw a DATA_CLONE_ERR on serializing the
-        // typed array. Also, checking if we can use transfers.
-        try {
-          messageHandler.send('test', testObj, null, [testObj.buffer]);
-        } catch (ex) {
-          info('Cannot use postMessage transfers');
-          testObj[0] = 0;
-          messageHandler.send('test', testObj);
-        }
-        return;
-      } catch (e) {
-        info('The worker has been disabled.');
-      }
-    }
-//#endif    
-    // Either workers are disabled, not supported or have thrown an exception.
-    // Thus, we fallback to a faked worker.
-    globalScope.PDFJS.disableWorker = true;
-    this.loadFakeWorkerFiles().then(function() {
-      this.setupFakeWorker();
-      workerInitializedPromise.resolve();
-    }.bind(this));
-  }
-  WorkerTransport.prototype = {
-    destroy: function WorkerTransport_destroy() {
-      this.pageCache = [];
-      this.pagePromises = [];
-      var self = this;
-      this.messageHandler.send('Terminate', null, function () {
-        FontLoader.clear();
-        if (self.worker) {
-          self.worker.terminate();
-        }
-      });
-    },
-
-    loadFakeWorkerFiles: function WorkerTransport_loadFakeWorkerFiles() {
-      if (!PDFJS.fakeWorkerFilesLoadedPromise) {
-        PDFJS.fakeWorkerFilesLoadedPromise = new LegacyPromise();
-        // In the developer build load worker_loader which in turn loads all the
-        // other files and resolves the promise. In production only the
-        // pdf.worker.js file is needed.
-//#if !PRODUCTION
-        Util.loadScript(PDFJS.workerSrc);
-//#endif
-//#if PRODUCTION && SINGLE_FILE
-//      PDFJS.fakeWorkerFilesLoadedPromise.resolve();
-//#endif
-//#if PRODUCTION && !SINGLE_FILE
-//      Util.loadScript(PDFJS.workerSrc, function() {
-//        PDFJS.fakeWorkerFilesLoadedPromise.resolve();
-//      });
-//#endif
-      }
-      return PDFJS.fakeWorkerFilesLoadedPromise;
-    },
-
-    setupFakeWorker: function WorkerTransport_setupFakeWorker() {
-      warn('Setting up fake worker.');
-      // If we don't use a worker, just post/sendMessage to the main thread.
-      var fakeWorker = {
-        postMessage: function WorkerTransport_postMessage(obj) {
-          fakeWorker.onmessage({data: obj});
-        },
-        terminate: function WorkerTransport_terminate() {}
-      };
-
-      var messageHandler = new MessageHandler('main', fakeWorker);
-      this.setupMessageHandler(messageHandler);
-
-      // If the main thread is our worker, setup the handling for the messages
-      // the main thread sends to it self.
-      PDFJS.WorkerMessageHandler.setup(messageHandler);
-    },
-
-    setupMessageHandler:
-      function WorkerTransport_setupMessageHandler(messageHandler) {
-      this.messageHandler = messageHandler;
-
-      function updatePassword(password) {
-        messageHandler.send('UpdatePassword', password);
-      }
-
-      var pdfDataRangeTransport = this.pdfDataRangeTransport;
-      if (pdfDataRangeTransport) {
-        pdfDataRangeTransport.addRangeListener(function(begin, chunk) {
-          messageHandler.send('OnDataRange', {
-            begin: begin,
-            chunk: chunk
-          });
-        });
-
-        pdfDataRangeTransport.addProgressListener(function(loaded) {
-          messageHandler.send('OnDataProgress', {
-            loaded: loaded
-          });
-        });
-
-        messageHandler.on('RequestDataRange',
-          function transportDataRange(data) {
-            pdfDataRangeTransport.requestDataRange(data.begin, data.end);
-          }, this);
-      }
-
-      messageHandler.on('GetDoc', function transportDoc(data) {
-        var pdfInfo = data.pdfInfo;
-        this.numPages = data.pdfInfo.numPages;
-        var pdfDocument = new PDFDocumentProxy(pdfInfo, this);
-        this.pdfDocument = pdfDocument;
-        this.workerReadyPromise.resolve(pdfDocument);
-      }, this);
-
-      messageHandler.on('NeedPassword', function transportPassword(data) {
-        if (this.passwordCallback) {
-          return this.passwordCallback(updatePassword,
-                                       PasswordResponses.NEED_PASSWORD);
-        }
-        this.workerReadyPromise.reject(data.exception.message, data.exception);
-      }, this);
-
-      messageHandler.on('IncorrectPassword', function transportBadPass(data) {
-        if (this.passwordCallback) {
-          return this.passwordCallback(updatePassword,
-                                       PasswordResponses.INCORRECT_PASSWORD);
-        }
-        this.workerReadyPromise.reject(data.exception.message, data.exception);
-      }, this);
-
-      messageHandler.on('InvalidPDF', function transportInvalidPDF(data) {
-        this.workerReadyPromise.reject(data.exception.name, data.exception);
-      }, this);
-
-      messageHandler.on('MissingPDF', function transportMissingPDF(data) {
-        this.workerReadyPromise.reject(data.exception.message, data.exception);
-      }, this);
-
-      messageHandler.on('UnknownError', function transportUnknownError(data) {
-        this.workerReadyPromise.reject(data.exception.message, data.exception);
-      }, this);
-
-      messageHandler.on('DataLoaded', function transportPage(data) {
-        this.downloadInfoPromise.resolve(data);
-      }, this);
-
-      messageHandler.on('GetPage', function transportPage(data) {
-        var pageInfo = data.pageInfo;
-        var page = new PDFPageProxy(pageInfo, this);
-        this.pageCache[pageInfo.pageIndex] = page;
-        var promise = this.pagePromises[pageInfo.pageIndex];
-        promise.resolve(page);
-      }, this);
-
-      messageHandler.on('GetAnnotations', function transportAnnotations(data) {
-        var annotations = data.annotations;
-        var promise = this.pageCache[data.pageIndex].annotationsPromise;
-        promise.resolve(annotations);
-      }, this);
-
-      messageHandler.on('StartRenderPage', function transportRender(data) {
-        var page = this.pageCache[data.pageIndex];
-
-        page.stats.timeEnd('Page Request');
-        page._startRenderPage(data.transparency, data.intent);
-      }, this);
-
-      messageHandler.on('RenderPageChunk', function transportRender(data) {
-        var page = this.pageCache[data.pageIndex];
-
-        page._renderPageChunk(data.operatorList, data.intent);
-      }, this);
-
-      messageHandler.on('commonobj', function transportObj(data) {
-        var id = data[0];
-        var type = data[1];
-        if (this.commonObjs.hasData(id)) {
-          return;
-        }
-
-        switch (type) {
-          case 'Font':
-            var exportedData = data[2];
-
-            var font;
-            if ('error' in exportedData) {
-              var error = exportedData.error;
-              warn('Error during font loading: ' + error);
-              this.commonObjs.resolve(id, error);
-              break;
-            } else {
-              font = new FontFace(exportedData);
-            }
-
-            FontLoader.bind(
-              [font],
-              function fontReady(fontObjs) {
-                this.commonObjs.resolve(id, font);
-              }.bind(this)
-            );
-            break;
-          case 'FontPath':
-            this.commonObjs.resolve(id, data[2]);
-            break;
-          default:
-            error('Got unknown common object type ' + type);
-        }
-      }, this);
-
-      messageHandler.on('obj', function transportObj(data) {
-        var id = data[0];
-        var pageIndex = data[1];
-        var type = data[2];
-        var pageProxy = this.pageCache[pageIndex];
-        if (pageProxy.objs.hasData(id)) {
-          return;
-        }
-
-        switch (type) {
-          case 'JpegStream':
-            var imageData = data[3];
-            loadJpegStream(id, imageData, pageProxy.objs);
-            break;
-          case 'Image':
-            var imageData = data[3];
-            pageProxy.objs.resolve(id, imageData);
-
-            // heuristics that will allow not to store large data
-            var MAX_IMAGE_SIZE_TO_STORE = 8000000;
-            if ('data' in imageData &&
-                imageData.data.length > MAX_IMAGE_SIZE_TO_STORE) {
-              pageProxy.cleanupAfterRender = true;
-            }
-            break;
-          default:
-            error('Got unknown object type ' + type);
-        }
-      }, this);
-
-      messageHandler.on('DocProgress', function transportDocProgress(data) {
-        if (this.progressCallback) {
-          this.progressCallback({
-            loaded: data.loaded,
-            total: data.total
-          });
-        }
-      }, this);
-
-      messageHandler.on('DocError', function transportDocError(data) {
-        this.workerReadyPromise.reject(data);
-      }, this);
-
-      messageHandler.on('PageError', function transportError(data, intent) {
-        var page = this.pageCache[data.pageNum - 1];
-        var intentState = page.intentStates[intent];
-        if (intentState.displayReadyPromise) {
-          intentState.displayReadyPromise.reject(data.error);
-        } else {
-          error(data.error);
-        }
-      }, this);
-
-      messageHandler.on('JpegDecode', function(data, deferred) {
-        var imageUrl = data[0];
-        var components = data[1];
-        if (components != 3 && components != 1) {
-          error('Only 3 component or 1 component can be returned');
-        }
-
-        var img = new Image();
-        img.onload = (function messageHandler_onloadClosure() {
-          var width = img.width;
-          var height = img.height;
-          var size = width * height;
-          var rgbaLength = size * 4;
-          var buf = new Uint8Array(size * components);
-          var tmpCanvas = createScratchCanvas(width, height);
-          var tmpCtx = tmpCanvas.getContext('2d');
-          tmpCtx.drawImage(img, 0, 0);
-          var data = tmpCtx.getImageData(0, 0, width, height).data;
-
-          if (components == 3) {
-            for (var i = 0, j = 0; i < rgbaLength; i += 4, j += 3) {
-              buf[j] = data[i];
-              buf[j + 1] = data[i + 1];
-              buf[j + 2] = data[i + 2];
-            }
-          } else if (components == 1) {
-            for (var i = 0, j = 0; i < rgbaLength; i += 4, j++) {
-              buf[j] = data[i];
-            }
-          }
-          deferred.resolve({ data: buf, width: width, height: height});
-        }).bind(this);
-        img.src = imageUrl;
-      });
-    },
-
-    fetchDocument: function WorkerTransport_fetchDocument(source) {
-      source.disableAutoFetch = PDFJS.disableAutoFetch;
-      source.chunkedViewerLoading = !!this.pdfDataRangeTransport;
-      this.messageHandler.send('GetDocRequest', {
-        source: source,
-        disableRange: PDFJS.disableRange,
-        maxImageSize: PDFJS.maxImageSize,
-        cMapUrl: PDFJS.cMapUrl,
-        cMapPacked: PDFJS.cMapPacked,
-        disableFontFace: PDFJS.disableFontFace,
-        disableCreateObjectURL: PDFJS.disableCreateObjectURL,
-        verbosity: PDFJS.verbosity
-      });
-    },
-
-    getData: function WorkerTransport_getData(promise) {
-      this.messageHandler.send('GetData', null, function(data) {
-        promise.resolve(data);
-      });
-    },
-
-    getPage: function WorkerTransport_getPage(pageNumber, promise) {
-      if (pageNumber <= 0 || pageNumber > this.numPages ||
-          (pageNumber|0) !== pageNumber) {
-        var pagePromise = new PDFJS.LegacyPromise();
-        pagePromise.reject(new Error('Invalid page request'));
-        return pagePromise;
-      }
-
-      var pageIndex = pageNumber - 1;
-      if (pageIndex in this.pagePromises) {
-        return this.pagePromises[pageIndex];
-      }
-      var promise = new PDFJS.LegacyPromise();
-      this.pagePromises[pageIndex] = promise;
-      this.messageHandler.send('GetPageRequest', { pageIndex: pageIndex });
-      return promise;
-    },
-
-    getPageIndex: function WorkerTransport_getPageIndexByRef(ref) {
-      var promise = new PDFJS.LegacyPromise();
-      this.messageHandler.send('GetPageIndex', { ref: ref },
-        function (pageIndex) {
-          promise.resolve(pageIndex);
-        }
-      );
-      return promise;
-    },
-
-    getAnnotations: function WorkerTransport_getAnnotations(pageIndex) {
-      this.messageHandler.send('GetAnnotationsRequest',
-        { pageIndex: pageIndex });
-    },
-
-    getDestinations: function WorkerTransport_getDestinations() {
-      var promise = new PDFJS.LegacyPromise();
-      this.messageHandler.send('GetDestinations', null,
-        function transportDestinations(destinations) {
-          promise.resolve(destinations);
-        }
-      );
-      return promise;
-    },
-
-    startCleanup: function WorkerTransport_startCleanup() {
-      this.messageHandler.send('Cleanup', null,
-        function endCleanup() {
-          for (var i = 0, ii = this.pageCache.length; i < ii; i++) {
-            var page = this.pageCache[i];
-            if (page) {
-              page.destroy();
-            }
-          }
-          this.commonObjs.clear();
-          FontLoader.clear();
-        }.bind(this)
-      );
-    }
-  };
-  return WorkerTransport;
-
-})();
-
-/**
- * A PDF document and page is built of many objects. E.g. there are objects
- * for fonts, images, rendering code and such. These objects might get processed
- * inside of a worker. The `PDFObjects` implements some basic functions to
- * manage these objects.
- * @ignore
- */
-var PDFObjects = (function PDFObjectsClosure() {
-  function PDFObjects() {
-    this.objs = {};
-  }
-
-  PDFObjects.prototype = {
-    /**
-     * Internal function.
-     * Ensures there is an object defined for `objId`.
-     */
-    ensureObj: function PDFObjects_ensureObj(objId) {
-      if (this.objs[objId]) {
-        return this.objs[objId];
-      }
-
-      var obj = {
-        promise: new LegacyPromise(),
-        data: null,
-        resolved: false
-      };
-      this.objs[objId] = obj;
-
-      return obj;
-    },
-
-    /**
-     * If called *without* callback, this returns the data of `objId` but the
-     * object needs to be resolved. If it isn't, this function throws.
-     *
-     * If called *with* a callback, the callback is called with the data of the
-     * object once the object is resolved. That means, if you call this
-     * function and the object is already resolved, the callback gets called
-     * right away.
-     */
-    get: function PDFObjects_get(objId, callback) {
-      // If there is a callback, then the get can be async and the object is
-      // not required to be resolved right now
-      if (callback) {
-        this.ensureObj(objId).promise.then(callback);
-        return null;
-      }
-
-      // If there isn't a callback, the user expects to get the resolved data
-      // directly.
-      var obj = this.objs[objId];
-
-      // If there isn't an object yet or the object isn't resolved, then the
-      // data isn't ready yet!
-      if (!obj || !obj.resolved) {
-        error('Requesting object that isn\'t resolved yet ' + objId);
-      }
-
-      return obj.data;
-    },
-
-    /**
-     * Resolves the object `objId` with optional `data`.
-     */
-    resolve: function PDFObjects_resolve(objId, data) {
-      var obj = this.ensureObj(objId);
-
-      obj.resolved = true;
-      obj.data = data;
-      obj.promise.resolve(data);
-    },
-
-    isResolved: function PDFObjects_isResolved(objId) {
-      var objs = this.objs;
-
-      if (!objs[objId]) {
-        return false;
-      } else {
-        return objs[objId].resolved;
-      }
-    },
-
-    hasData: function PDFObjects_hasData(objId) {
-      return this.isResolved(objId);
-    },
-
-    /**
-     * Returns the data of `objId` if object exists, null otherwise.
-     */
-    getData: function PDFObjects_getData(objId) {
-      var objs = this.objs;
-      if (!objs[objId] || !objs[objId].resolved) {
-        return null;
-      } else {
-        return objs[objId].data;
-      }
-    },
-
-    clear: function PDFObjects_clear() {
-      this.objs = {};
-    }
-  };
-  return PDFObjects;
-})();
-
-/**
- * Allows controlling of the rendering tasks.
- * @class
- */
-var RenderTask = (function RenderTaskClosure() {
-  function RenderTask(internalRenderTask) {
-    this.internalRenderTask = internalRenderTask;
-    /**
-     * Promise for rendering task completion.
-     * @type {Promise}
-     */
-    this.promise = new PDFJS.LegacyPromise();
-  }
-
-  RenderTask.prototype = /** @lends RenderTask.prototype */ {
-    /**
-     * Cancels the rendering task. If the task is currently rendering it will
-     * not be cancelled until graphics pauses with a timeout. The promise that
-     * this object extends will resolved when cancelled.
-     */
-    cancel: function RenderTask_cancel() {
-      this.internalRenderTask.cancel();
-      this.promise.reject(new Error('Rendering is cancelled'));
-    }
-  };
-
-  return RenderTask;
-})();
-
-/**
- * For internal use only.
- * @ignore
- */
-var InternalRenderTask = (function InternalRenderTaskClosure() {
-
-  function InternalRenderTask(callback, params, objs, commonObjs, operatorList,
-                              pageNumber) {
-    this.callback = callback;
-    this.params = params;
-    this.objs = objs;
-    this.commonObjs = commonObjs;
-    this.operatorListIdx = null;
-    this.operatorList = operatorList;
-    this.pageNumber = pageNumber;
-    this.running = false;
-    this.graphicsReadyCallback = null;
-    this.graphicsReady = false;
-    this.cancelled = false;
-  }
-
-  InternalRenderTask.prototype = {
-
-    initalizeGraphics:
-        function InternalRenderTask_initalizeGraphics(transparency) {
-
-      if (this.cancelled) {
-        return;
-      }
-      if (PDFJS.pdfBug && 'StepperManager' in globalScope &&
-          globalScope.StepperManager.enabled) {
-        this.stepper = globalScope.StepperManager.create(this.pageNumber - 1);
-        this.stepper.init(this.operatorList);
-        this.stepper.nextBreakPoint = this.stepper.getNextBreakPoint();
-      }
-
-      var params = this.params;
-      this.gfx = new CanvasGraphics(params.canvasContext, this.commonObjs,
-                                    this.objs, params.textLayer,
-                                    params.imageLayer);
-
-      this.gfx.beginDrawing(params.viewport, transparency);
-      this.operatorListIdx = 0;
-      this.graphicsReady = true;
-      if (this.graphicsReadyCallback) {
-        this.graphicsReadyCallback();
-      }
-    },
-
-    cancel: function InternalRenderTask_cancel() {
-      this.running = false;
-      this.cancelled = true;
-      this.callback('cancelled');
-    },
-
-    operatorListChanged: function InternalRenderTask_operatorListChanged() {
-      if (!this.graphicsReady) {
-        if (!this.graphicsReadyCallback) {
-          this.graphicsReadyCallback = this._continue.bind(this);
-        }
-        return;
-      }
-
-      if (this.stepper) {
-        this.stepper.updateOperatorList(this.operatorList);
-      }
-
-      if (this.running) {
-        return;
-      }
-      this._continue();
-    },
-
-    _continue: function InternalRenderTask__continue() {
-      this.running = true;
-      if (this.cancelled) {
-        return;
-      }
-      if (this.params.continueCallback) {
-        this.params.continueCallback(this._next.bind(this));
-      } else {
-        this._next();
-      }
-    },
-
-    _next: function InternalRenderTask__next() {
-      if (this.cancelled) {
-        return;
-      }
-      this.operatorListIdx = this.gfx.executeOperatorList(this.operatorList,
-                                        this.operatorListIdx,
-                                        this._continue.bind(this),
-                                        this.stepper);
-      if (this.operatorListIdx === this.operatorList.argsArray.length) {
-        this.running = false;
-        if (this.operatorList.lastChunk) {
-          this.gfx.endDrawing();
-          this.callback();
-        }
-      }
-    }
-
-  };
-
-  return InternalRenderTask;
-})();
-
-
-
- - - - -
- - - -
- -
- Documentation generated by JSDoc 3.3.0-alpha5 on Sun Apr 13 2014 00:33:02 GMT-0300 (ART) -
- - - - - diff --git a/external/jsdoc/global.html b/external/jsdoc/global.html deleted file mode 100644 index 511d251cd935e..0000000000000 --- a/external/jsdoc/global.html +++ /dev/null @@ -1,587 +0,0 @@ - - - - - JSDoc: Global - - - - - - - - - - -
- -

Global

- - - - - -
- -
-

- -

- -
- -
-
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - - - - - - - - - - - - - -

Type Definitions

- -
- -
-

BidiText

- - -
-
- -
- Page text content part. -
- - - -
Type:
-
    -
  • - -Object - - -
  • -
- - - -
- - -
Properties:
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
str - - -string - - - - text content.
dir - - -string - - - - text direction: 'ttb', 'ltr' or 'rtl'.
x - - -number - - - - x position of the text on the page.
y - - -number - - - - y position of the text on the page.
angle - - -number - - - - text rotation.
size - - -number - - - - font size.
- - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - -
- - - -
-

DocumentInitParameters

- - -
-
- -
- Document initialization / loading parameters object. -
- - - -
Type:
-
    -
  • - -Object - - -
  • -
- - - -
- - -
Properties:
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
url - - -string - - - - The URL of the PDF.
data - - -TypedArray - - - - A typed array with PDF data.
httpHeaders - - -Object - - - - Basic authentication headers.
withCredentials - - -boolean - - - - Indicates whether or not cross-site - Access-Control requests should be made using credentials such as cookies - or authorization headers. The default is false.
password - - -string - - - - For decrypting password-protected PDFs.
initialData - - -TypedArray - - - - A typed array with the first portion or - all of the pdf data. Used by the extension since some data is already - loaded before the switch to range requests.
- - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - -
- -
- - - -
- -
- - - - -
- - - -
- -
- Documentation generated by JSDoc 3.3.0-alpha5 on Sun Apr 13 2014 00:33:02 GMT-0300 (ART) -
- - - - - \ No newline at end of file diff --git a/external/jsdoc/index.html b/external/jsdoc/index.html deleted file mode 100644 index ed889ec20d4d9..0000000000000 --- a/external/jsdoc/index.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - JSDoc: Index - - - - - - - - - - -
- -

Index

- - - - - - - -

- - - - - - - - - - - - - - - - - - - -
- - - -
- -
- Documentation generated by JSDoc 3.3.0-alpha5 on Sun Apr 13 2014 00:33:02 GMT-0300 (ART) -
- - - - - \ No newline at end of file diff --git a/external/jsdoc/scripts/linenumber.js b/external/jsdoc/scripts/linenumber.js deleted file mode 100644 index 250863932f0f0..0000000000000 --- a/external/jsdoc/scripts/linenumber.js +++ /dev/null @@ -1,26 +0,0 @@ -/*global document */ -'use strict'; -(function() { - var source = document.getElementsByClassName('prettyprint source linenums'); - var i = 0; - var lineNumber = 0; - var lineId; - var lines; - var totalLines; - var anchorHash; - - if (source && source[0]) { - anchorHash = document.location.hash.substring(1); - lines = source[0].getElementsByTagName('li'); - totalLines = lines.length; - - for (; i < totalLines; i++) { - lineNumber++; - lineId = 'line' + lineNumber; - lines[i].id = lineId; - if (lineId === anchorHash) { - lines[i].className += ' selected'; - } - } - } -})(); diff --git a/external/jsdoc/scripts/prettify/Apache-License-2.0.txt b/external/jsdoc/scripts/prettify/Apache-License-2.0.txt deleted file mode 100644 index d645695673349..0000000000000 --- a/external/jsdoc/scripts/prettify/Apache-License-2.0.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/external/jsdoc/scripts/prettify/lang-css.js b/external/jsdoc/scripts/prettify/lang-css.js deleted file mode 100644 index 041e1f5906797..0000000000000 --- a/external/jsdoc/scripts/prettify/lang-css.js +++ /dev/null @@ -1,2 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", -/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); diff --git a/external/jsdoc/scripts/prettify/prettify.js b/external/jsdoc/scripts/prettify/prettify.js deleted file mode 100644 index 28265343093fc..0000000000000 --- a/external/jsdoc/scripts/prettify/prettify.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; -(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= -[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), -l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, -q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, -q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, -"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), -a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} -for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], -"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], -H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], -J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ -I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), -["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", -/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), -["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", -hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= -!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p p:first-child -{ - margin-top: 0; - padding-top: 0; -} - -.params td.description > p:last-child -{ - margin-bottom: 0; - padding-bottom: 0; -} - -.disabled { - color: #454545; -} diff --git a/external/jsdoc/styles/prettify-jsdoc.css b/external/jsdoc/styles/prettify-jsdoc.css deleted file mode 100644 index 5a2526e374846..0000000000000 --- a/external/jsdoc/styles/prettify-jsdoc.css +++ /dev/null @@ -1,111 +0,0 @@ -/* JSDoc prettify.js theme */ - -/* plain text */ -.pln { - color: #000000; - font-weight: normal; - font-style: normal; -} - -/* string content */ -.str { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a keyword */ -.kwd { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* a comment */ -.com { - font-weight: normal; - font-style: italic; -} - -/* a type name */ -.typ { - color: #000000; - font-weight: normal; - font-style: normal; -} - -/* a literal value */ -.lit { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* punctuation */ -.pun { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* lisp open bracket */ -.opn { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* lisp close bracket */ -.clo { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* a markup tag name */ -.tag { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a markup attribute name */ -.atn { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a markup attribute value */ -.atv { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a declaration */ -.dec { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* a variable name */ -.var { - color: #000000; - font-weight: normal; - font-style: normal; -} - -/* a function name */ -.fun { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* Specify class=linenums on a pre to get line numbering */ -ol.linenums { - margin-top: 0; - margin-bottom: 0; -} diff --git a/external/jsdoc/styles/prettify-tomorrow.css b/external/jsdoc/styles/prettify-tomorrow.css deleted file mode 100644 index aa2908c251ea1..0000000000000 --- a/external/jsdoc/styles/prettify-tomorrow.css +++ /dev/null @@ -1,132 +0,0 @@ -/* Tomorrow Theme */ -/* Original theme - https://github.com/chriskempson/tomorrow-theme */ -/* Pretty printing styles. Used with prettify.js. */ -/* SPAN elements with the classes below are added by prettyprint. */ -/* plain text */ -.pln { - color: #4d4d4c; } - -@media screen { - /* string content */ - .str { - color: #718c00; } - - /* a keyword */ - .kwd { - color: #8959a8; } - - /* a comment */ - .com { - color: #8e908c; } - - /* a type name */ - .typ { - color: #4271ae; } - - /* a literal value */ - .lit { - color: #f5871f; } - - /* punctuation */ - .pun { - color: #4d4d4c; } - - /* lisp open bracket */ - .opn { - color: #4d4d4c; } - - /* lisp close bracket */ - .clo { - color: #4d4d4c; } - - /* a markup tag name */ - .tag { - color: #c82829; } - - /* a markup attribute name */ - .atn { - color: #f5871f; } - - /* a markup attribute value */ - .atv { - color: #3e999f; } - - /* a declaration */ - .dec { - color: #f5871f; } - - /* a variable name */ - .var { - color: #c82829; } - - /* a function name */ - .fun { - color: #4271ae; } } -/* Use higher contrast and text-weight for printable form. */ -@media print, projection { - .str { - color: #060; } - - .kwd { - color: #006; - font-weight: bold; } - - .com { - color: #600; - font-style: italic; } - - .typ { - color: #404; - font-weight: bold; } - - .lit { - color: #044; } - - .pun, .opn, .clo { - color: #440; } - - .tag { - color: #006; - font-weight: bold; } - - .atn { - color: #404; } - - .atv { - color: #060; } } -/* Style */ -/* -pre.prettyprint { - background: white; - font-family: Menlo, Monaco, Consolas, monospace; - font-size: 12px; - line-height: 1.5; - border: 1px solid #ccc; - padding: 10px; } -*/ - -/* Specify class=linenums on a pre to get line numbering */ -ol.linenums { - margin-top: 0; - margin-bottom: 0; } - -/* IE indents via margin-left */ -li.L0, -li.L1, -li.L2, -li.L3, -li.L4, -li.L5, -li.L6, -li.L7, -li.L8, -li.L9 { - /* */ } - -/* Alternate shading for lines */ -li.L1, -li.L3, -li.L5, -li.L7, -li.L9 { - /* */ }