21 lines
1.3 MiB
JavaScript
21 lines
1.3 MiB
JavaScript
|
/**
|
||
|
* @licstart The following is the entire license notice for the
|
||
|
* JavaScript code in this page
|
||
|
*
|
||
|
* Copyright 2023 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.
|
||
|
*
|
||
|
* @licend The above is the entire license notice for the
|
||
|
* JavaScript code in this page
|
||
|
*/var e={d:(t,i)=>{for(var a in i)e.o(i,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:i[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},__webpack_exports__ = globalThis.pdfjsWorker = {};e.d(__webpack_exports__,{WorkerMessageHandler:()=>WorkerMessageHandler});const t=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type),i=[1,0,0,1,0,0],a=[.001,0,0,.001,0,0],s=1.35,r=.35,n=.25925925925925924,g=1,o=2,c=4,C=8,h=16,l=64,Q=256,E="pdfjs_internal_editor_",u=3,d=9,f=13,p=15,m={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},y=0,w=4,D=1,b=2,F=3,S=1,k=2,R=3,N=4,G=5,x=6,U=7,M=8,L=9,H=10,J=11,Y=12,v=13,K=14,T=15,q=16,O=17,W=20,j="Group",X="R",Z=1,V=2,z=4,_=16,$=32,AA=128,eA=512,tA=1,iA=2,aA=4096,sA=8192,rA=32768,nA=65536,gA=131072,oA=1048576,IA=2097152,cA=8388608,CA=16777216,hA=1,BA=2,lA=3,QA=4,EA=5,uA={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},dA={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},fA={O:"PageOpen",C:"PageClose"},pA={ERRORS:0,WARNINGS:1,INFOS:5},mA={NONE:0,BINARY:1},yA=1,wA=2,DA=3,bA=4,FA=5,SA=6,kA=7,RA=8,NA=9,GA=10,xA=11,UA=12,MA=13,LA=14,HA=15,JA=16,YA=17,vA=18,KA=19,TA=20,qA=21,OA=22,PA=23,WA=24,jA=25,XA=26,ZA=27,VA=28,zA=29,_A=30,$A=31,Ae=32,ee=33,te=34,ie=35,ae=36,se=37,re=38,ne=39,ge=40,oe=41,Ie=42,ce=43,Ce=44,he=45,Be=46,le=47,Qe=48,Ee=49,ue=50,de=51,fe=52,pe=53,me=54,ye=55,we=56,De=57,be=58,Fe=59,Se=60,ke=61,Re=62,Ne=63,Ge=64,xe=65,Ue=66,Me=67,Le=68,He=69,Je=70,Ye=71,ve=72,Ke=73,Te=74,qe=75,Oe=76,Pe=77,We=80,je=81,Xe=83,Ze=84,Ve=85,ze=86,_e=87,$e=88,At=89,et=90,tt=91,it=1,at=2;let st=pA.WARNINGS;function getVerbosityLevel(){return st}function info(e){st>=pA.INFOS&&console.log(`Info: ${e}`)}function warn(e){st>=pA.WARNINGS&&console.log(`Warning: ${e}`)}function unreachable(e){throw new Error(e)}function assert(e,t){e||unreachable(t)}function createValidAbsoluteUrl(e,t=null,i=null){if(!e)return null;try{if(i&&"string"==typeof e){if(i.addDefaultProtocol&&e.startsWith("www.")){const t=e.match(/\./g);t?.length>=2&&(e=`http://${e}`)}if(i.tryConvertEncoding)try{e=stringToUTF8String(e)}catch{}}const a=t?new URL(e,t):new URL(e);if(function _isValidProtocol(e){switch(e?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(a))return a}catch{}return null}function shadow(e,t,i,a=!1){Object.defineProperty(e,t,{value:i,enumerable:!a,configurable:!0,writable:!1});return i}const rt=function BaseExceptionClosure(){function BaseException(e,t){this.constructor===BaseException&&unreachable("Cannot initialize BaseException.");this.message=e;this.name=t}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();class PasswordException extends rt{constructor(e,t){super(e,"PasswordException");this.code=t}}class UnknownErrorException extends rt{constructor(e,t){super(e,"UnknownErrorException");this.details=t}}class InvalidPDFException extends rt{constructor(e){super(e,"InvalidPDFException")}}class MissingPDFException extends rt{constructor(e){super(e,"MissingPDFException")}}class UnexpectedResponseException extends rt{constructor(e,t){super(e,"UnexpectedResponseException");this.status=t}}class FormatError extends rt{constructor(e){super(e,"FormatError")}}class AbortException extends rt{constructor(e){super(e,"AbortException")}}function bytesToString(e){"object"==typeof e&&void 0!==e?.length||unreachable("Invalid argument for bytesToString");const t=e.length,i=8192;if(t<i)return String.fromCharCode.apply(null,e);const a=[];for(let s=0;s<t;s+=i){const r=Math.min(s+i,t),n=e.subarray(s,r);a.push(String.fromCharCode.apply(null,n))}return a.join("")}function stringToBytes(e){"string"!=typeof e&&unreachable("Invalid argument for stringToBytes");const t=e.length,i=new
|