|  | @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
 | 
	
		
			
				|  |  |    (typeof window !== 'undefined' ? window : this).PDFJS = {};
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -PDFJS.version = '1.0.774';
 | 
	
		
			
				|  |  | -PDFJS.build = 'e096669';
 | 
	
		
			
				|  |  | +PDFJS.version = '1.0.780';
 | 
	
		
			
				|  |  | +PDFJS.build = 'ffb613b';
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  (function pdfjsWrapper() {
 | 
	
		
			
				|  |  |    // Use strict in our context only - users might not want it
 | 
	
	
		
			
				|  | @@ -373,6 +373,7 @@ var PasswordException = (function PasswordExceptionClosure() {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    return PasswordException;
 | 
	
		
			
				|  |  |  })();
 | 
	
		
			
				|  |  | +PDFJS.PasswordException = PasswordException;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  var UnknownErrorException = (function UnknownErrorExceptionClosure() {
 | 
	
		
			
				|  |  |    function UnknownErrorException(msg, details) {
 | 
	
	
		
			
				|  | @@ -386,6 +387,7 @@ var UnknownErrorException = (function UnknownErrorExceptionClosure() {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    return UnknownErrorException;
 | 
	
		
			
				|  |  |  })();
 | 
	
		
			
				|  |  | +PDFJS.UnknownErrorException = UnknownErrorException;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  var InvalidPDFException = (function InvalidPDFExceptionClosure() {
 | 
	
		
			
				|  |  |    function InvalidPDFException(msg) {
 | 
	
	
		
			
				|  | @@ -398,6 +400,7 @@ var InvalidPDFException = (function InvalidPDFExceptionClosure() {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    return InvalidPDFException;
 | 
	
		
			
				|  |  |  })();
 | 
	
		
			
				|  |  | +PDFJS.InvalidPDFException = InvalidPDFException;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  var MissingPDFException = (function MissingPDFExceptionClosure() {
 | 
	
		
			
				|  |  |    function MissingPDFException(msg) {
 | 
	
	
		
			
				|  | @@ -410,6 +413,22 @@ var MissingPDFException = (function MissingPDFExceptionClosure() {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    return MissingPDFException;
 | 
	
		
			
				|  |  |  })();
 | 
	
		
			
				|  |  | +PDFJS.MissingPDFException = MissingPDFException;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +var UnexpectedResponseException =
 | 
	
		
			
				|  |  | +    (function UnexpectedResponseExceptionClosure() {
 | 
	
		
			
				|  |  | +  function UnexpectedResponseException(msg, status) {
 | 
	
		
			
				|  |  | +    this.name = 'UnexpectedResponseException';
 | 
	
		
			
				|  |  | +    this.message = msg;
 | 
	
		
			
				|  |  | +    this.status = status;
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  UnexpectedResponseException.prototype = new Error();
 | 
	
		
			
				|  |  | +  UnexpectedResponseException.constructor = UnexpectedResponseException;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  return UnexpectedResponseException;
 | 
	
		
			
				|  |  | +})();
 | 
	
		
			
				|  |  | +PDFJS.UnexpectedResponseException = UnexpectedResponseException;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  var NotImplementedException = (function NotImplementedExceptionClosure() {
 | 
	
		
			
				|  |  |    function NotImplementedException(msg) {
 | 
	
	
		
			
				|  | @@ -2380,36 +2399,46 @@ var WorkerTransport = (function WorkerTransportClosure() {
 | 
	
		
			
				|  |  |          this.workerReadyCapability.resolve(pdfDocument);
 | 
	
		
			
				|  |  |        }, this);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -      messageHandler.on('NeedPassword', function transportPassword(data) {
 | 
	
		
			
				|  |  | +      messageHandler.on('NeedPassword',
 | 
	
		
			
				|  |  | +                        function transportNeedPassword(exception) {
 | 
	
		
			
				|  |  |          if (this.passwordCallback) {
 | 
	
		
			
				|  |  |            return this.passwordCallback(updatePassword,
 | 
	
		
			
				|  |  |                                         PasswordResponses.NEED_PASSWORD);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        this.workerReadyCapability.reject(data.exception.message,
 | 
	
		
			
				|  |  | -                                          data.exception);
 | 
	
		
			
				|  |  | +        this.workerReadyCapability.reject(
 | 
	
		
			
				|  |  | +          new PasswordException(exception.message, exception.code));
 | 
	
		
			
				|  |  |        }, this);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -      messageHandler.on('IncorrectPassword', function transportBadPass(data) {
 | 
	
		
			
				|  |  | +      messageHandler.on('IncorrectPassword',
 | 
	
		
			
				|  |  | +                        function transportIncorrectPassword(exception) {
 | 
	
		
			
				|  |  |          if (this.passwordCallback) {
 | 
	
		
			
				|  |  |            return this.passwordCallback(updatePassword,
 | 
	
		
			
				|  |  |                                         PasswordResponses.INCORRECT_PASSWORD);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        this.workerReadyCapability.reject(data.exception.message,
 | 
	
		
			
				|  |  | -                                          data.exception);
 | 
	
		
			
				|  |  | +        this.workerReadyCapability.reject(
 | 
	
		
			
				|  |  | +          new PasswordException(exception.message, exception.code));
 | 
	
		
			
				|  |  | +      }, this);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      messageHandler.on('InvalidPDF', function transportInvalidPDF(exception) {
 | 
	
		
			
				|  |  | +        this.workerReadyCapability.reject(
 | 
	
		
			
				|  |  | +          new InvalidPDFException(exception.message));
 | 
	
		
			
				|  |  |        }, this);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -      messageHandler.on('InvalidPDF', function transportInvalidPDF(data) {
 | 
	
		
			
				|  |  | -        this.workerReadyCapability.reject(data.exception.name, data.exception);
 | 
	
		
			
				|  |  | +      messageHandler.on('MissingPDF', function transportMissingPDF(exception) {
 | 
	
		
			
				|  |  | +        this.workerReadyCapability.reject(
 | 
	
		
			
				|  |  | +          new MissingPDFException(exception.message));
 | 
	
		
			
				|  |  |        }, this);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -      messageHandler.on('MissingPDF', function transportMissingPDF(data) {
 | 
	
		
			
				|  |  | -        this.workerReadyCapability.reject(data.exception.message,
 | 
	
		
			
				|  |  | -                                          data.exception);
 | 
	
		
			
				|  |  | +      messageHandler.on('UnexpectedResponse',
 | 
	
		
			
				|  |  | +                        function transportUnexpectedResponse(exception) {
 | 
	
		
			
				|  |  | +        this.workerReadyCapability.reject(
 | 
	
		
			
				|  |  | +          new UnexpectedResponseException(exception.message, exception.status));
 | 
	
		
			
				|  |  |        }, this);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -      messageHandler.on('UnknownError', function transportUnknownError(data) {
 | 
	
		
			
				|  |  | -        this.workerReadyCapability.reject(data.exception.message,
 | 
	
		
			
				|  |  | -                                          data.exception);
 | 
	
		
			
				|  |  | +      messageHandler.on('UnknownError',
 | 
	
		
			
				|  |  | +                        function transportUnknownError(exception) {
 | 
	
		
			
				|  |  | +        this.workerReadyCapability.reject(
 | 
	
		
			
				|  |  | +          new UnknownErrorException(exception.message, exception.details));
 | 
	
		
			
				|  |  |        }, this);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        messageHandler.on('DataLoaded', function transportPage(data) {
 | 
	
	
		
			
				|  | @@ -2505,10 +2534,6 @@ var WorkerTransport = (function WorkerTransportClosure() {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        }, this);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -      messageHandler.on('DocError', function transportDocError(data) {
 | 
	
		
			
				|  |  | -        this.workerReadyCapability.reject(data);
 | 
	
		
			
				|  |  | -      }, this);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |        messageHandler.on('PageError', function transportError(data) {
 | 
	
		
			
				|  |  |          var page = this.pageCache[data.pageNum - 1];
 | 
	
		
			
				|  |  |          var intentState = page.intentStates[data.intent];
 | 
	
	
		
			
				|  | @@ -39422,14 +39447,16 @@ var WorkerMessageHandler = PDFJS.WorkerMessageHandler = {
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          onError: function onError(status) {
 | 
	
		
			
				|  |  | +          var exception;
 | 
	
		
			
				|  |  |            if (status === 404) {
 | 
	
		
			
				|  |  | -            var exception = new MissingPDFException('Missing PDF "' +
 | 
	
		
			
				|  |  | -                                                    source.url + '".');
 | 
	
		
			
				|  |  | -            handler.send('MissingPDF', { exception: exception });
 | 
	
		
			
				|  |  | +            exception = new MissingPDFException('Missing PDF "' +
 | 
	
		
			
				|  |  | +                                                source.url + '".');
 | 
	
		
			
				|  |  | +            handler.send('MissingPDF', exception);
 | 
	
		
			
				|  |  |            } else {
 | 
	
		
			
				|  |  | -            handler.send('DocError', 'Unexpected server response (' +
 | 
	
		
			
				|  |  | -                         status + ') while retrieving PDF "' +
 | 
	
		
			
				|  |  | -                         source.url + '".');
 | 
	
		
			
				|  |  | +            exception = new UnexpectedResponseException(
 | 
	
		
			
				|  |  | +              'Unexpected server response (' + status +
 | 
	
		
			
				|  |  | +              ') while retrieving PDF "' + source.url + '".', status);
 | 
	
		
			
				|  |  | +            handler.send('UnexpectedResponse', exception);
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -39481,26 +39508,19 @@ var WorkerMessageHandler = PDFJS.WorkerMessageHandler = {
 | 
	
		
			
				|  |  |        var onFailure = function(e) {
 | 
	
		
			
				|  |  |          if (e instanceof PasswordException) {
 | 
	
		
			
				|  |  |            if (e.code === PasswordResponses.NEED_PASSWORD) {
 | 
	
		
			
				|  |  | -            handler.send('NeedPassword', {
 | 
	
		
			
				|  |  | -              exception: e
 | 
	
		
			
				|  |  | -            });
 | 
	
		
			
				|  |  | +            handler.send('NeedPassword', e);
 | 
	
		
			
				|  |  |            } else if (e.code === PasswordResponses.INCORRECT_PASSWORD) {
 | 
	
		
			
				|  |  | -            handler.send('IncorrectPassword', {
 | 
	
		
			
				|  |  | -              exception: e
 | 
	
		
			
				|  |  | -            });
 | 
	
		
			
				|  |  | +            handler.send('IncorrectPassword', e);
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          } else if (e instanceof InvalidPDFException) {
 | 
	
		
			
				|  |  | -          handler.send('InvalidPDF', {
 | 
	
		
			
				|  |  | -            exception: e
 | 
	
		
			
				|  |  | -          });
 | 
	
		
			
				|  |  | +          handler.send('InvalidPDF', e);
 | 
	
		
			
				|  |  |          } else if (e instanceof MissingPDFException) {
 | 
	
		
			
				|  |  | -          handler.send('MissingPDF', {
 | 
	
		
			
				|  |  | -            exception: e
 | 
	
		
			
				|  |  | -          });
 | 
	
		
			
				|  |  | +          handler.send('MissingPDF', e);
 | 
	
		
			
				|  |  | +        } else if (e instanceof UnexpectedResponseException) {
 | 
	
		
			
				|  |  | +          handler.send('UnexpectedResponse', e);
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  | -          handler.send('UnknownError', {
 | 
	
		
			
				|  |  | -            exception: new UnknownErrorException(e.message, e.toString())
 | 
	
		
			
				|  |  | -          });
 | 
	
		
			
				|  |  | +          handler.send('UnknownError',
 | 
	
		
			
				|  |  | +                       new UnknownErrorException(e.message, e.toString()));
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        };
 | 
	
		
			
				|  |  |  
 |