@ -2706,8 +2706,8 @@ if (typeof __g == 'number') __g = global;
@@ -2706,8 +2706,8 @@ if (typeof __g == 'number') __g = global;
var global = _ _w _pdfjs _require _ _ ( 5 ) ;
var core = _ _w _pdfjs _require _ _ ( 7 ) ;
var hide = _ _w _pdfjs _require _ _ ( 13 ) ;
var redefine = _ _w _pdfjs _require _ _ ( 11 ) ;
var ctx = _ _w _pdfjs _require _ _ ( 12 ) ;
var redefine = _ _w _pdfjs _require _ _ ( 10 ) ;
var ctx = _ _w _pdfjs _require _ _ ( 11 ) ;
var PROTOTYPE = 'prototype' ;
var $export = function $export ( type , name , source ) {
var IS _FORCED = type & $export . F ;
@ -2782,6 +2782,72 @@ module.exports = function (it, key) {
@@ -2782,6 +2782,72 @@ module.exports = function (it, key) {
"use strict" ;
var global = _ _w _pdfjs _require _ _ ( 5 ) ;
var hide = _ _w _pdfjs _require _ _ ( 13 ) ;
var has = _ _w _pdfjs _require _ _ ( 9 ) ;
var SRC = _ _w _pdfjs _require _ _ ( 25 ) ( 'src' ) ;
var TO _STRING = 'toString' ;
var $toString = Function [ TO _STRING ] ;
var TPL = ( '' + $toString ) . split ( TO _STRING ) ;
_ _w _pdfjs _require _ _ ( 7 ) . inspectSource = function ( it ) {
return $toString . call ( it ) ;
} ;
( module . exports = function ( O , key , val , safe ) {
var isFunction = typeof val == 'function' ;
if ( isFunction ) has ( val , 'name' ) || hide ( val , 'name' , key ) ;
if ( O [ key ] === val ) return ;
if ( isFunction ) has ( val , SRC ) || hide ( val , SRC , O [ key ] ? '' + O [ key ] : TPL . join ( String ( key ) ) ) ;
if ( O === global ) {
O [ key ] = val ;
} else if ( ! safe ) {
delete O [ key ] ;
hide ( O , key , val ) ;
} else if ( O [ key ] ) {
O [ key ] = val ;
} else {
hide ( O , key , val ) ;
}
} ) ( Function . prototype , TO _STRING , function toString ( ) {
return typeof this == 'function' && this [ SRC ] || $toString . call ( this ) ;
} ) ;
/***/ } ) ,
/* 11 */
/***/ ( function ( module , exports , _ _w _pdfjs _require _ _ ) {
"use strict" ;
var aFunction = _ _w _pdfjs _require _ _ ( 18 ) ;
module . exports = function ( fn , that , length ) {
aFunction ( fn ) ;
if ( that === undefined ) return fn ;
switch ( length ) {
case 1 :
return function ( a ) {
return fn . call ( that , a ) ;
} ;
case 2 :
return function ( a , b ) {
return fn . call ( that , a , b ) ;
} ;
case 3 :
return function ( a , b , c ) {
return fn . call ( that , a , b , c ) ;
} ;
}
return function ( ) {
return fn . apply ( that , arguments ) ;
} ;
} ;
/***/ } ) ,
/* 12 */
/***/ ( function ( module , exports , _ _w _pdfjs _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
@ -3288,72 +3354,6 @@ exports.SimpleXMLParser = SimpleXMLParser;
@@ -3288,72 +3354,6 @@ exports.SimpleXMLParser = SimpleXMLParser;
exports . StatTimer = StatTimer ;
exports . DummyStatTimer = DummyStatTimer ;
/***/ } ) ,
/* 11 */
/***/ ( function ( module , exports , _ _w _pdfjs _require _ _ ) {
"use strict" ;
var global = _ _w _pdfjs _require _ _ ( 5 ) ;
var hide = _ _w _pdfjs _require _ _ ( 13 ) ;
var has = _ _w _pdfjs _require _ _ ( 9 ) ;
var SRC = _ _w _pdfjs _require _ _ ( 25 ) ( 'src' ) ;
var TO _STRING = 'toString' ;
var $toString = Function [ TO _STRING ] ;
var TPL = ( '' + $toString ) . split ( TO _STRING ) ;
_ _w _pdfjs _require _ _ ( 7 ) . inspectSource = function ( it ) {
return $toString . call ( it ) ;
} ;
( module . exports = function ( O , key , val , safe ) {
var isFunction = typeof val == 'function' ;
if ( isFunction ) has ( val , 'name' ) || hide ( val , 'name' , key ) ;
if ( O [ key ] === val ) return ;
if ( isFunction ) has ( val , SRC ) || hide ( val , SRC , O [ key ] ? '' + O [ key ] : TPL . join ( String ( key ) ) ) ;
if ( O === global ) {
O [ key ] = val ;
} else if ( ! safe ) {
delete O [ key ] ;
hide ( O , key , val ) ;
} else if ( O [ key ] ) {
O [ key ] = val ;
} else {
hide ( O , key , val ) ;
}
} ) ( Function . prototype , TO _STRING , function toString ( ) {
return typeof this == 'function' && this [ SRC ] || $toString . call ( this ) ;
} ) ;
/***/ } ) ,
/* 12 */
/***/ ( function ( module , exports , _ _w _pdfjs _require _ _ ) {
"use strict" ;
var aFunction = _ _w _pdfjs _require _ _ ( 18 ) ;
module . exports = function ( fn , that , length ) {
aFunction ( fn ) ;
if ( that === undefined ) return fn ;
switch ( length ) {
case 1 :
return function ( a ) {
return fn . call ( that , a ) ;
} ;
case 2 :
return function ( a , b ) {
return fn . call ( that , a , b ) ;
} ;
case 3 :
return function ( a , b , c ) {
return fn . call ( that , a , b , c ) ;
} ;
}
return function ( ) {
return fn . apply ( that , arguments ) ;
} ;
} ;
/***/ } ) ,
/* 13 */
/***/ ( function ( module , exports , _ _w _pdfjs _require _ _ ) {
@ -4516,7 +4516,7 @@ module.exports = function (it, tag, stat) {
@@ -4516,7 +4516,7 @@ module.exports = function (it, tag, stat) {
"use strict" ;
var ctx = _ _w _pdfjs _require _ _ ( 12 ) ;
var ctx = _ _w _pdfjs _require _ _ ( 11 ) ;
var call = _ _w _pdfjs _require _ _ ( 106 ) ;
var isArrayIter = _ _w _pdfjs _require _ _ ( 107 ) ;
var anObject = _ _w _pdfjs _require _ _ ( 8 ) ;
@ -5697,7 +5697,7 @@ module.exports.f = function (C) {
@@ -5697,7 +5697,7 @@ module.exports.f = function (C) {
"use strict" ;
var redefine = _ _w _pdfjs _require _ _ ( 11 ) ;
var redefine = _ _w _pdfjs _require _ _ ( 10 ) ;
module . exports = function ( target , src , safe ) {
for ( var key in src ) {
redefine ( target , key , src [ key ] , safe ) ;
@ -10929,7 +10929,7 @@ exports.validateResponseStatus = exports.validateRangeRequestCapabilities = expo
@@ -10929,7 +10929,7 @@ exports.validateResponseStatus = exports.validateRangeRequestCapabilities = expo
var _util = _ _w _pdfjs _require _ _ ( 0 ) ;
var _dom _utils = _ _w _pdfjs _require _ _ ( 10 ) ;
var _content _disposition = _ _w _pdfjs _require _ _ ( 161 ) ;
function validateRangeRequestCapabilities ( _ref ) {
var getResponseHeader = _ref . getResponseHeader ,
@ -10966,9 +10966,9 @@ function validateRangeRequestCapabilities(_ref) {
@@ -10966,9 +10966,9 @@ function validateRangeRequestCapabilities(_ref) {
function extractFilenameFromHeader ( getResponseHeader ) {
var contentDisposition = getResponseHeader ( 'Content-Disposition' ) ;
if ( contentDisposition ) {
var parts = /.+;\s*filename=(?:'|")(.+\.pdf)(?:'|")/gi . exec ( contentDisposition ) ;
if ( parts !== null && parts . length > 1 ) {
return ( 0 , _dom _utils . getFilenameFromUrl ) ( parts [ 1 ] ) ;
var filename = ( 0 , _content _disposition . getFilenameFromContentDispositionHeader ) ( contentDisposition ) ;
if ( /\.pdf$/i . test ( filename ) ) {
return filename ;
}
}
return null ;
@ -11094,7 +11094,7 @@ var classof = __w_pdfjs_require__(38);
@@ -11094,7 +11094,7 @@ var classof = __w_pdfjs_require__(38);
var test = { } ;
test [ _ _w _pdfjs _require _ _ ( 4 ) ( 'toStringTag' ) ] = 'z' ;
if ( test + '' != '[object z]' ) {
_ _w _pdfjs _require _ _ ( 11 ) ( Object . prototype , 'toString' , function toString ( ) {
_ _w _pdfjs _require _ _ ( 10 ) ( Object . prototype , 'toString' , function toString ( ) {
return '[object ' + classof ( this ) + ']' ;
} , true ) ;
}
@ -11108,7 +11108,7 @@ if (test + '' != '[object z]') {
@@ -11108,7 +11108,7 @@ if (test + '' != '[object z]') {
var LIBRARY = _ _w _pdfjs _require _ _ ( 56 ) ;
var $export = _ _w _pdfjs _require _ _ ( 6 ) ;
var redefine = _ _w _pdfjs _require _ _ ( 11 ) ;
var redefine = _ _w _pdfjs _require _ _ ( 10 ) ;
var hide = _ _w _pdfjs _require _ _ ( 13 ) ;
var has = _ _w _pdfjs _require _ _ ( 9 ) ;
var Iterators = _ _w _pdfjs _require _ _ ( 21 ) ;
@ -11209,7 +11209,7 @@ module.exports = document && document.documentElement;
@@ -11209,7 +11209,7 @@ module.exports = document && document.documentElement;
var $iterators = _ _w _pdfjs _require _ _ ( 103 ) ;
var getKeys = _ _w _pdfjs _require _ _ ( 26 ) ;
var redefine = _ _w _pdfjs _require _ _ ( 11 ) ;
var redefine = _ _w _pdfjs _require _ _ ( 10 ) ;
var global = _ _w _pdfjs _require _ _ ( 5 ) ;
var hide = _ _w _pdfjs _require _ _ ( 13 ) ;
var Iterators = _ _w _pdfjs _require _ _ ( 21 ) ;
@ -11289,7 +11289,7 @@ module.exports = function (O, D) {
@@ -11289,7 +11289,7 @@ module.exports = function (O, D) {
"use strict" ;
var ctx = _ _w _pdfjs _require _ _ ( 12 ) ;
var ctx = _ _w _pdfjs _require _ _ ( 11 ) ;
var invoke = _ _w _pdfjs _require _ _ ( 109 ) ;
var html = _ _w _pdfjs _require _ _ ( 57 ) ;
var cel = _ _w _pdfjs _require _ _ ( 30 ) ;
@ -11447,7 +11447,7 @@ module.exports = function (exec, skipClosing) {
@@ -11447,7 +11447,7 @@ module.exports = function (exec, skipClosing) {
"use strict" ;
var ctx = _ _w _pdfjs _require _ _ ( 12 ) ;
var ctx = _ _w _pdfjs _require _ _ ( 11 ) ;
var IObject = _ _w _pdfjs _require _ _ ( 32 ) ;
var toObject = _ _w _pdfjs _require _ _ ( 39 ) ;
var toLength = _ _w _pdfjs _require _ _ ( 34 ) ;
@ -11520,7 +11520,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
@@ -11520,7 +11520,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
var _util = _ _w _pdfjs _require _ _ ( 0 ) ;
var _dom _utils = _ _w _pdfjs _require _ _ ( 10 ) ;
var _dom _utils = _ _w _pdfjs _require _ _ ( 12 ) ;
var _font _loader = _ _w _pdfjs _require _ _ ( 133 ) ;
@ -11641,7 +11641,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
@@ -11641,7 +11641,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
if ( worker . destroyed ) {
return Promise . reject ( new Error ( 'Worker was destroyed' ) ) ;
}
var apiVersion = '2.0.285 ' ;
var apiVersion = '2.0.288 ' ;
source . disableRange = ( 0 , _dom _utils . getDefaultSetting ) ( 'disableRange' ) ;
source . disableAutoFetch = ( 0 , _dom _utils . getDefaultSetting ) ( 'disableAutoFetch' ) ;
source . disableStream = ( 0 , _dom _utils . getDefaultSetting ) ( 'disableStream' ) ;
@ -12936,8 +12936,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
@@ -12936,8 +12936,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
} ( ) ;
var version , build ;
{
exports . version = version = '2.0.285 ' ;
exports . build = build = '97466465 ' ;
exports . version = version = '2.0.288 ' ;
exports . build = build = 'f0216484 ' ;
}
exports . getDocument = getDocument ;
exports . LoopbackPort = LoopbackPort ;
@ -12965,7 +12965,7 @@ var _createClass = function () { function defineProperties(target, props) { for
@@ -12965,7 +12965,7 @@ var _createClass = function () { function defineProperties(target, props) { for
var _util = _ _w _pdfjs _require _ _ ( 0 ) ;
var _dom _utils = _ _w _pdfjs _require _ _ ( 10 ) ;
var _dom _utils = _ _w _pdfjs _require _ _ ( 12 ) ;
function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( "Cannot call a class as a function" ) ; } }
@ -24121,7 +24121,7 @@ var _get = function get(object, property, receiver) { if (object === null) objec
@@ -24121,7 +24121,7 @@ var _get = function get(object, property, receiver) { if (object === null) objec
var _createClass = function ( ) { function defineProperties ( target , props ) { for ( var i = 0 ; i < props . length ; i ++ ) { var descriptor = props [ i ] ; descriptor . enumerable = descriptor . enumerable || false ; descriptor . configurable = true ; if ( "value" in descriptor ) descriptor . writable = true ; Object . defineProperty ( target , descriptor . key , descriptor ) ; } } return function ( Constructor , protoProps , staticProps ) { if ( protoProps ) defineProperties ( Constructor . prototype , protoProps ) ; if ( staticProps ) defineProperties ( Constructor , staticProps ) ; return Constructor ; } ; } ( ) ;
var _dom _utils = _ _w _pdfjs _require _ _ ( 10 ) ;
var _dom _utils = _ _w _pdfjs _require _ _ ( 12 ) ;
var _util = _ _w _pdfjs _require _ _ ( 0 ) ;
@ -25144,7 +25144,7 @@ exports.renderTextLayer = undefined;
@@ -25144,7 +25144,7 @@ exports.renderTextLayer = undefined;
var _util = _ _w _pdfjs _require _ _ ( 0 ) ;
var _dom _utils = _ _w _pdfjs _require _ _ ( 10 ) ;
var _dom _utils = _ _w _pdfjs _require _ _ ( 12 ) ;
var renderTextLayer = function renderTextLayerClosure ( ) {
var MAX _TEXT _DIVS _TO _RENDER = 100000 ;
@ -25695,7 +25695,7 @@ exports.SVGGraphics = undefined;
@@ -25695,7 +25695,7 @@ exports.SVGGraphics = undefined;
var _util = _ _w _pdfjs _require _ _ ( 0 ) ;
var _dom _utils = _ _w _pdfjs _require _ _ ( 10 ) ;
var _dom _utils = _ _w _pdfjs _require _ _ ( 12 ) ;
var _is _node = _ _w _pdfjs _require _ _ ( 24 ) ;
@ -26734,14 +26734,14 @@ exports.SVGGraphics = SVGGraphics;
@@ -26734,14 +26734,14 @@ exports.SVGGraphics = SVGGraphics;
"use strict" ;
var pdfjsVersion = '2.0.285 ' ;
var pdfjsBuild = '97466465 ' ;
var pdfjsVersion = '2.0.288 ' ;
var pdfjsBuild = 'f0216484 ' ;
var pdfjsSharedUtil = _ _w _pdfjs _require _ _ ( 0 ) ;
var pdfjsDisplayGlobal = _ _w _pdfjs _require _ _ ( 132 ) ;
var pdfjsDisplayAPI = _ _w _pdfjs _require _ _ ( 66 ) ;
var pdfjsDisplayTextLayer = _ _w _pdfjs _require _ _ ( 78 ) ;
var pdfjsDisplayAnnotationLayer = _ _w _pdfjs _require _ _ ( 77 ) ;
var pdfjsDisplayDOMUtils = _ _w _pdfjs _require _ _ ( 10 ) ;
var pdfjsDisplayDOMUtils = _ _w _pdfjs _require _ _ ( 12 ) ;
var pdfjsDisplaySVG = _ _w _pdfjs _require _ _ ( 79 ) ;
{
var isNodeJS = _ _w _pdfjs _require _ _ ( 24 ) ;
@ -26751,12 +26751,12 @@ var pdfjsDisplaySVG = __w_pdfjs_require__(79);
@@ -26751,12 +26751,12 @@ var pdfjsDisplaySVG = __w_pdfjs_require__(79);
return new PDFNodeStream ( params ) ;
} ) ;
} else if ( typeof Response !== 'undefined' && 'body' in Response . prototype && typeof ReadableStream !== 'undefined' ) {
var PDFFetchStream = _ _w _pdfjs _require _ _ ( 161 ) . PDFFetchStream ;
var PDFFetchStream = _ _w _pdfjs _require _ _ ( 162 ) . PDFFetchStream ;
pdfjsDisplayAPI . setPDFNetworkStreamFactory ( function ( params ) {
return new PDFFetchStream ( params ) ;
} ) ;
} else {
var PDFNetworkStream = _ _w _pdfjs _require _ _ ( 162 ) . PDFNetworkStream ;
var PDFNetworkStream = _ _w _pdfjs _require _ _ ( 163 ) . PDFNetworkStream ;
pdfjsDisplayAPI . setPDFNetworkStreamFactory ( function ( params ) {
return new PDFNetworkStream ( params ) ;
} ) ;
@ -27903,7 +27903,7 @@ module.exports = function (done, value) {
@@ -27903,7 +27903,7 @@ module.exports = function (done, value) {
var LIBRARY = _ _w _pdfjs _require _ _ ( 56 ) ;
var global = _ _w _pdfjs _require _ _ ( 5 ) ;
var ctx = _ _w _pdfjs _require _ _ ( 12 ) ;
var ctx = _ _w _pdfjs _require _ _ ( 11 ) ;
var classof = _ _w _pdfjs _require _ _ ( 38 ) ;
var $export = _ _w _pdfjs _require _ _ ( 6 ) ;
var isObject = _ _w _pdfjs _require _ _ ( 3 ) ;
@ -28392,7 +28392,7 @@ module.exports = __w_pdfjs_require__(7).WeakMap;
@@ -28392,7 +28392,7 @@ module.exports = __w_pdfjs_require__(7).WeakMap;
var each = _ _w _pdfjs _require _ _ ( 64 ) ( 0 ) ;
var redefine = _ _w _pdfjs _require _ _ ( 11 ) ;
var redefine = _ _w _pdfjs _require _ _ ( 10 ) ;
var meta = _ _w _pdfjs _require _ _ ( 43 ) ;
var assign = _ _w _pdfjs _require _ _ ( 119 ) ;
var weak = _ _w _pdfjs _require _ _ ( 121 ) ;
@ -28633,7 +28633,7 @@ module.exports = {
@@ -28633,7 +28633,7 @@ module.exports = {
var global = _ _w _pdfjs _require _ _ ( 5 ) ;
var $export = _ _w _pdfjs _require _ _ ( 6 ) ;
var redefine = _ _w _pdfjs _require _ _ ( 11 ) ;
var redefine = _ _w _pdfjs _require _ _ ( 10 ) ;
var redefineAll = _ _w _pdfjs _require _ _ ( 42 ) ;
var meta = _ _w _pdfjs _require _ _ ( 43 ) ;
var forOf = _ _w _pdfjs _require _ _ ( 28 ) ;
@ -28746,7 +28746,7 @@ var check = function check(O, proto) {
@@ -28746,7 +28746,7 @@ var check = function check(O, proto) {
module . exports = {
set : Object . setPrototypeOf || ( '__proto__' in { } ? function ( test , buggy , set ) {
try {
set = _ _w _pdfjs _require _ _ ( 12 ) ( Function . call , _ _w _pdfjs _require _ _ ( 125 ) . f ( Object . prototype , '__proto__' ) . set , 2 ) ;
set = _ _w _pdfjs _require _ _ ( 11 ) ( Function . call , _ _w _pdfjs _require _ _ ( 125 ) . f ( Object . prototype , '__proto__' ) . set , 2 ) ;
set ( test , [ ] ) ;
buggy = ! ( test instanceof Array ) ;
} catch ( e ) {
@ -28831,7 +28831,7 @@ __w_pdfjs_require__(129)('WeakMap');
@@ -28831,7 +28831,7 @@ __w_pdfjs_require__(129)('WeakMap');
var $export = _ _w _pdfjs _require _ _ ( 6 ) ;
var aFunction = _ _w _pdfjs _require _ _ ( 18 ) ;
var ctx = _ _w _pdfjs _require _ _ ( 12 ) ;
var ctx = _ _w _pdfjs _require _ _ ( 11 ) ;
var forOf = _ _w _pdfjs _require _ _ ( 28 ) ;
module . exports = function ( COLLECTION ) {
$export ( $export . S , COLLECTION , {
@ -31913,7 +31913,7 @@ Object.defineProperty(exports, "__esModule", {
@@ -31913,7 +31913,7 @@ Object.defineProperty(exports, "__esModule", {
} ) ;
exports . PDFJS = exports . globalScope = undefined ;
var _dom _utils = _ _w _pdfjs _require _ _ ( 10 ) ;
var _dom _utils = _ _w _pdfjs _require _ _ ( 12 ) ;
var _util = _ _w _pdfjs _require _ _ ( 0 ) ;
@ -31938,8 +31938,8 @@ if (!_global_scope2.default.PDFJS) {
@@ -31938,8 +31938,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global _scope2 . default . PDFJS ;
{
PDFJS . version = '2.0.285 ' ;
PDFJS . build = '97466465 ' ;
PDFJS . version = '2.0.288 ' ;
PDFJS . build = 'f0216484 ' ;
}
PDFJS . pdfBug = false ;
if ( PDFJS . verbosity !== undefined ) {
@ -35310,7 +35310,7 @@ var WorkerMessageHandler = {
@@ -35310,7 +35310,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null ;
var WorkerTasks = [ ] ;
var apiVersion = docParams . apiVersion ;
var workerVersion = '2.0.285 ' ;
var workerVersion = '2.0.288 ' ;
if ( apiVersion !== null && apiVersion !== workerVersion ) {
throw new Error ( 'The API version "' + apiVersion + '" does not match ' + ( 'the Worker version "' + workerVersion + '".' ) ) ;
}
@ -52944,6 +52944,159 @@ exports.PDFNodeStream = PDFNodeStream;
@@ -52944,6 +52944,159 @@ exports.PDFNodeStream = PDFNodeStream;
"use strict" ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
var _slicedToArray = function ( ) { function sliceIterator ( arr , i ) { var _arr = [ ] ; var _n = true ; var _d = false ; var _e = undefined ; try { for ( var _i = arr [ Symbol . iterator ] ( ) , _s ; ! ( _n = ( _s = _i . next ( ) ) . done ) ; _n = true ) { _arr . push ( _s . value ) ; if ( i && _arr . length === i ) break ; } } catch ( err ) { _d = true ; _e = err ; } finally { try { if ( ! _n && _i [ "return" ] ) _i [ "return" ] ( ) ; } finally { if ( _d ) throw _e ; } } return _arr ; } return function ( arr , i ) { if ( Array . isArray ( arr ) ) { return arr ; } else if ( Symbol . iterator in Object ( arr ) ) { return sliceIterator ( arr , i ) ; } else { throw new TypeError ( "Invalid attempt to destructure non-iterable instance" ) ; } } ; } ( ) ;
function getFilenameFromContentDispositionHeader ( contentDisposition ) {
var needsEncodingFixup = true ;
var tmp = /(?:^|;)\s*filename\*\s*=\s*([^;\s]+)/i . exec ( contentDisposition ) ;
if ( tmp ) {
tmp = tmp [ 1 ] ;
var filename = rfc2616unquote ( tmp ) ;
filename = unescape ( filename ) ;
filename = rfc5987decode ( filename ) ;
filename = rfc2047decode ( filename ) ;
return fixupEncoding ( filename ) ;
}
tmp = rfc2231getparam ( contentDisposition ) ;
if ( tmp ) {
var _filename = rfc2047decode ( tmp ) ;
return fixupEncoding ( _filename ) ;
}
tmp = /(?:^|;)\s*filename\s*=\s*([^;\s]+)/ . exec ( contentDisposition ) ;
if ( tmp ) {
tmp = tmp [ 1 ] ;
var _filename2 = rfc2616unquote ( tmp ) ;
_filename2 = rfc2047decode ( _filename2 ) ;
return fixupEncoding ( _filename2 ) ;
}
function textdecode ( encoding , value ) {
if ( encoding ) {
if ( ! /^[^\x00-\xFF]+$/ . test ( value ) ) {
return value ;
}
try {
var decoder = new TextDecoder ( encoding , { fatal : true } ) ;
var bytes = new Array ( value . length ) ;
for ( var i = 0 ; i < value . length ; ++ i ) {
bytes [ i ] = value . charCodeAt ( 0 ) ;
}
value = decoder . decode ( new Uint8Array ( bytes ) ) ;
needsEncodingFixup = false ;
} catch ( e ) {
if ( /^utf-?8$/i . test ( encoding ) ) {
value = decodeURIComponent ( escape ( value ) ) ;
needsEncodingFixup = false ;
}
}
}
return value ;
}
function fixupEncoding ( value ) {
if ( needsEncodingFixup && /[\x80-\xff]/ . test ( value ) ) {
return textdecode ( 'utf-8' , value ) ;
}
return value ;
}
function rfc2231getparam ( contentDisposition ) {
var matches = [ ] ,
match = void 0 ;
var iter = /(?:^|;)\s*filename\*((?!0\d)\d+)(\*?)\s*=\s*([^;\s]+)/ig ;
while ( ( match = iter . exec ( contentDisposition ) ) !== null ) {
var _match = match ,
_match2 = _slicedToArray ( _match , 4 ) ,
n = _match2 [ 1 ] ,
quot = _match2 [ 2 ] ,
part = _match2 [ 3 ] ;
n = parseInt ( n , 10 ) ;
if ( n in matches ) {
if ( n === 0 ) {
break ;
}
continue ;
}
matches [ n ] = [ quot , part ] ;
}
var parts = [ ] ;
for ( var _n = 0 ; _n < matches . length ; ++ _n ) {
if ( ! ( _n in matches ) ) {
break ;
}
var _matches$ _n = _slicedToArray ( matches [ _n ] , 2 ) ,
_quot = _matches$ _n [ 0 ] ,
_part = _matches$ _n [ 1 ] ;
_part = rfc2616unquote ( _part ) ;
if ( _quot ) {
_part = unescape ( _part ) ;
if ( _n === 0 ) {
_part = rfc5987decode ( _part ) ;
}
}
parts . push ( _part ) ;
}
return parts . join ( '' ) ;
}
function rfc2616unquote ( value ) {
if ( value . charAt ( 0 ) === '"' ) {
var parts = value . slice ( 1 ) . split ( '\\"' ) ;
for ( var i = 0 ; i < parts . length ; ++ i ) {
var quotindex = parts [ i ] . indexOf ( '"' ) ;
if ( quotindex !== - 1 ) {
parts [ i ] = parts [ i ] . slice ( 0 , quotindex ) ;
parts . length = i + 1 ;
}
parts [ i ] = parts [ i ] . replace ( /\\(.)/g , '$1' ) ;
}
value = parts . join ( '"' ) ;
}
return value ;
}
function rfc5987decode ( extvalue ) {
var encodingend = extvalue . indexOf ( '\'' ) ;
if ( encodingend === - 1 ) {
return extvalue ;
}
var encoding = extvalue . slice ( 0 , encodingend ) ;
var langvalue = extvalue . slice ( encodingend + 1 ) ;
var value = langvalue . replace ( /^[^']*'/ , '' ) ;
return textdecode ( encoding , value ) ;
}
function rfc2047decode ( value ) {
if ( value . slice ( 0 , 2 ) !== '=?' || /[\x00-\x19\x80-\xff]/ . test ( value ) ) {
return value ;
}
return value . replace ( /=\?([\w\-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g , function ( _ , charset , encoding , text ) {
if ( encoding === 'q' || encoding === 'Q' ) {
text = text . replace ( /_/g , ' ' ) ;
text = text . replace ( /=([0-9a-fA-F]{2})/g , function ( _ , hex ) {
return String . fromCharCode ( parseInt ( hex , 16 ) ) ;
} ) ;
return textdecode ( charset , text ) ;
}
try {
return atob ( text ) ;
} catch ( e ) {
return text ;
}
} ) ;
}
return '' ;
}
exports . getFilenameFromContentDispositionHeader = getFilenameFromContentDispositionHeader ;
/***/ } ) ,
/* 162 */
/***/ ( function ( module , exports , _ _w _pdfjs _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
@ -53217,7 +53370,7 @@ var PDFFetchStreamRangeReader = function () {
@@ -53217,7 +53370,7 @@ var PDFFetchStreamRangeReader = function () {
exports . PDFFetchStream = PDFFetchStream ;
/***/ } ) ,
/* 162 */
/* 163 */
/***/ ( function ( module , exports , _ _w _pdfjs _require _ _ ) {
"use strict" ;