Generic build of PDF.js library.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
699 KiB

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf.worker",[],t):"object"==typeof exports?exports["pdfjs-dist/build/pdf.worker"]=t():e["pdfjs-dist/build/pdf.worker"]=e.pdfjsDistBuildPdfWorker=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(a){if(r[a])return r[a].exports;var i=r[a]={i:a,l:!1,exports:{}};e[a].call(i.exports,i,i.exports,t);i.l=!0;return i.exports}var r={};t.m=e;t.c=r;t.d=function(e,r,a){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:a})};t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};t.d(r,"a",r);return r};t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};t.p="";return t(t.s=71)}([function(e,t,r){"use strict";function a(e){p>=m.warnings&&console.log("Warning: "+e)}function i(e){throw new Error(e)}function n(e,t){e||i(t)}function o(e){n("string"==typeof e,"Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),a=0;a<t;++a)r[a]=255&e.charCodeAt(a);return r}function s(e){if(void 0!==e.length)return e.length;n(void 0!==e.byteLength);return e.byteLength}function c(){var e={};e.promise=new Promise(function(t,r){e.resolve=t;e.reject=r});return e}function l(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return e?new Promise(function(a,i){a(e.apply(r,t))}):Promise.resolve(void 0)}function u(e){if("object"!==(void 0===e?"undefined":d(e)))return e;switch(e.name){case"AbortException":return new _(e.message);case"MissingPDFException":return new w(e.message);case"UnexpectedResponseException":return new k(e.message,e.status);default:return new v(e.message,e.details)}}function h(e,t,r){t?e.resolve():e.reject(r)}function f(e,t,r){var a=this;this.sourceName=e;this.targetName=t;this.comObj=r;this.callbackId=1;this.streamId=1;this.postMessageTransfers=!0;this.streamSinks=Object.create(null);this.streamControllers=Object.create(null);var i=this.callbacksCapabilities=Object.create(null),n=this.actionHandler=Object.create(null);this._onComObjOnMessage=function(e){var t=e.data;if(t.targetName===a.sourceName)if(t.stream)a._processStreamMessage(t);else if(t.isReply){var o=t.callbackId;if(!(t.callbackId in i))throw new Error("Cannot resolve callback "+o);var s=i[o];delete i[o];"error"in t?s.reject(u(t.error)):s.resolve(t.data)}else{if(!(t.action in n))throw new Error("Unknown action from worker: "+t.action);var c=n[t.action];if(t.callbackId){var l=a.sourceName,h=t.sourceName;Promise.resolve().then(function(){return c[0].call(c[1],t.data)}).then(function(e){r.postMessage({sourceName:l,targetName:h,isReply:!0,callbackId:t.callbackId,data:e})},function(e){r.postMessage({sourceName:l,targetName:h,isReply:!0,callbackId:t.callbackId,error:function(e){return!(e instanceof Error)||e instanceof _||e instanceof w||e instanceof k||e instanceof v?e:new v(e.message,e.toString())}(e)})})}else t.streamId?a._createStreamSink(t):c[0].call(c[1],t.data)}};r.addEventListener("message",this._onComObjOnMessage)}Object.defineProperty(t,"__esModule",{value:!0});t.unreachable=t.warn=t.utf8StringToString=t.stringToUTF8String=t.stringToPDFString=t.stringToBytes=t.string32=t.shadow=t.setVerbosityLevel=t.ReadableStream=t.removeNullCharacters=t.readUint32=t.readUint16=t.readInt8=t.log2=t.loadJpegStream=t.isEvalSupported=t.isLittleEndian=t.createValidAbsoluteUrl=t.isSameOrigin=t.isNodeJS=t.isSpace=t.isString=t.isNum=t.isEmptyObj=t.isBool=t.isArrayBuffer=t.info=t.getVerbosityLevel=t.getLookupTableFactory=t.deprecated=t.createObjectURL=t.createPromiseCapability=t.createBlob=t.bytesToString=t.assert=t.arraysToBytes=t.arrayByteLength=t.FormatError=t.XRefParseException=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.StreamType=t.PasswordResponses=t.PasswordException=t.PageViewport=t.NotImplementedException=t.NativeImageDecoding=t.MissingPDFException=t.MissingDataException=t.MessageHandler=t.InvalidPDFException=t.AbortException=t.CMapCompressionType=t.ImageKind=t.FontType=t.Anno