!function(e,t){"object"==typeofexports&&"object"==typeofmodule?module.exports=t():"function"==typeofdefine&&define.amd?define("pdfjs-dist/build/pdf",[],t):"object"==typeofexports?exports["pdfjs-dist/build/pdf"]=t():e["pdfjs-dist/build/pdf"]=e.pdfjsDistBuildPdf=t()}(this,function(){returnfunction(e){functiont(n){if(r[n])returnr[n].exports;vari=r[n]={i:n,l:!1,exports:{}};returne[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}varr={};returnt.m=e,t.c=r,t.i=function(e){returne},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){varr=e&&e.__esModule?function(){returne.default}:function(){returne};returnt.d(r,"a",r),r},t.o=function(e,t){returnObject.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=14)}([function(e,t,r){"use strict";(function(e){functionn(e){le=e}functioni(){returnle}functiona(e){le>=ae.infos&&console.log("Info: "+e)}functiono(e){le>=ae.warnings&&console.log("Warning: "+e)}functions(e){console.log("Deprecated API usage: "+e)}functionl(e){throwle>=ae.errors&&(console.log("Error: "+e),console.log(c())),newError(e)}functionc(){try{thrownewError}catch(e){returne.stack?e.stack.split("\n").slice(2).join("\n"):""}}functionu(e,t){e||l(t)}functiond(e,t){try{varr=newURL(e);if(!r.origin||"null"===r.origin)return!1}catch(e){return!1}varn=newURL(t,r);returnr.origin===n.origin}functionh(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}functionf(e,t){if(!e)returnnull;try{varr=t?newURL(e,t):newURL(e);if(h(r))returnr}catch(e){}returnnull}functionp(e,t,r){returnObject.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}functionm(e){vart;returnfunction(){returne&&(t=Object.create(null),e(t),e=null),t}}functiong(e){return"string"!=typeofe?(o("The argument for removeNullCharacters must be a string."),e):e.replace(ye,"")}functionv(e){u(null!==e&&"object"===(void0===e?"undefined":H(e))&&void0!==e.length,"Invalid argument for bytesToString");vart=e.length;if(t<8192)returnString.fromCharCode.apply(null,e);for(varr=[],n=0;n<t;n+=8192){vari=Math.min(n+8192,t),a=e.subarray(n,i);r.push(String.fromCharCode.apply(null,a))}returnr.join("")}functionb(e){u("string"==typeofe,"Invalid argument for stringToBytes");for(vart=e.length,r=newUint8Array(t),n=0;n<t;++n)r[n]=255&e.charCodeAt(n);returnr}functiony(e){returnvoid0!==e.length?e.length:(u(void0!==e.byteLength),e.byteLength)}functionA(e){if(1===e.length&&e[0]instanceofUint8Array)returne[0];vart,r,n,i=0,a=e.length;for(t=0;t<a;t++)r=e[t],n=y(r),i+=n;varo=0,s=newUint8Array(i);for(t=0;t<a;t++)r=e[t],rinstanceofUint8Array||(r="string"==typeofr?b(r):newUint8Array(r)),n=r.byteLength,s.set(r,o),o+=n;returns}function_(e){returnString.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}functionS(e){for(vart=1,r=0;e>t;)t<<=1,r++;returnr}functionw(e,t){returne[t]<<24>>24}functionP(e,t){returne[t]<<8|e[t+1]}functionk(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}functionC(){vare=newUint8Array(4);returne[0]=1,1===newUint32Array(e.buffer,0,1)[0]}functionx(){try{returnnewFunction(""),!0}catch(e){return!1}}functionT(e){vart,r=e.length,n=[];if("þ"===e[0]&&"ÿ"===e[1])for(t=2;t<r;t+=2)n.push(String.fromCharCode(e.charCodeAt(t)<<8|e.charCodeAt(t+1)));elsefor(t=0;t<r;++t){vari=we[e.charCodeAt(t)];n.push(i?String.fromCharCode(i):e.charAt(t))}returnn.join("")}functionR(e){returndecodeURIComponent(escape(e))}functionE(e){returnunescape(encodeURIComponent(e))}functionL(e){for(vartine)return!1;return!0}functionI(e){return"boolean"==typeofe}functionO(e){return"number"==typeofe&&(0|e)===e}functionj(e){return"number"==typeofe}functionD(e){return"string"==typeofe}functionF(e){returneinstanceofArray}functionN(e){return"object"===(void0===e?"undefined":H(e))&&null!==e&&void0!==e.byteLength}functionM(e){return32===e||9===e||13===e||10===e}functionW(){return"undefined"==typeof__pdfjsdev_webpack__&&("object"===("undefined"==typeofproce
varr=this;if(!(0,c.isInt)(e)||e<=0||e>this.numPages)returnPromise.reject(newError("Invalid page request"));varn=e-1;if(ninthis.pagePromises)returnthis.pagePromises[n];vari=this.messageHandler.sendWithPromise("GetPage",{pageIndex:n}).then(function(e){if(r.destroyed)thrownewError("Transport destroyed");vart=newC(n,e,r);returnr.pageCache[n]=t,t});returnthis.pagePromises[n]=i,i},getPageIndex:function(e){returnthis.messageHandler.sendWithPromise("GetPageIndex",{ref:e}).catch(function(e){returnPromise.reject(newError(e))})},getAnnotations:function(e,t){returnthis.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})},getDestinations:function(){returnthis.messageHandler.sendWithPromise("GetDestinations",null)},getDestination:function(e){returnthis.messageHandler.sendWithPromise("GetDestination",{id:e})},getPageLabels:function(){returnthis.messageHandler.sendWithPromise("GetPageLabels",null)},getAttachments:function(){returnthis.messageHandler.sendWithPromise("GetAttachments",null)},getJavaScript:function(){returnthis.messageHandler.sendWithPromise("GetJavaScript",null)},getOutline:function(){returnthis.messageHandler.sendWithPromise("GetOutline",null)},getMetadata:function(){returnthis.messageHandler.sendWithPromise("GetMetadata",null).then(function(e){return{info:e[0],metadata:e[1]?newf.Metadata(e[1]):null}})},getStats:function(){returnthis.messageHandler.sendWithPromise("GetStats",null)},startCleanup:function(){vare=this;this.messageHandler.sendWithPromise("Cleanup",null).then(function(){for(vart=0,r=e.pageCache.length;t<r;t++){varn=e.pageCache[t];n&&n.cleanup()}e.commonObjs.clear(),e.fontLoader.clear()})}},e}(),E=function(){functione(){this.objs=Object.create(null)}returne.prototype={ensureObj:function(e){if(this.objs[e])returnthis.objs[e];vart={capability:(0,c.createPromiseCapability)(),data:null,resolved:!1};returnthis.objs[e]=t,t},get:function(e,t){if(t)returnthis.ensureObj(e).capability.promise.then(t),null;varr=this.objs[e];returnr&&r.resolved||(0,c.error)("Requesting object that isn't resolved yet "+e),r.data},resolve:function(e,t){varr=this.ensureObj(e);r.resolved=!0,r.data=t,r.capability.resolve(t)},isResolved:function(e){vart=this.objs;return!!t[e]&&t[e].resolved},hasData:function(e){returnthis.isResolved(e)},getData:function(e){vart=this.objs;returnt[e]&&t[e].resolved?t[e].data:null},clear:function(){this.objs=Object.create(null)}},e}(),L=function(){functione(e){this._internalRenderTask=e,this.onContinue=null}returne.prototype={getpromise(){returnthis._internalRenderTask.capability.promise},cancel:function(){this._internalRenderTask.cancel()},then:function(e,t){returnthis.promise.then.apply(this.promise,arguments)}},e}(),I=function(){functione(e,t,r,n,i,a,o){this.callback=e,this.params=t,this.objs=r,this.commonObjs=n,this.operatorListIdx=null,this.operatorList=i,this.pageNumber=a,this.canvasFactory=o,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this.useRequestAnimationFrame=!1,this.cancelled=!1,this.capability=(0,c.createPromiseCapability)(),this.task=newL(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=t.canvasContext.canvas}vart=newWeakMap;returne.prototype={initializeGraphics:function(e){if(this._canvas){if(t.has(this._canvas))thrownewError("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");t.set(this._canvas,this)}if(!this.cancelled){(0,u.getDefaultSetting)("pdfBug")&&c.globalScope.StepperManager&&c.globalScope.StepperManager.enabled&&(this.stepper=c.globalScope.StepperManager.create(this.pageNumber-1),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());varr=this.params;this.gfx=newh.CanvasGraphics(r.canvasContext,this.commonObjs,this.objs,this.canvasFactory,r.imageLayer),this.gfx.beginDrawing({transform:r.transform,viewport:r.viewport,transparency:e,background:r.b
returnString.fromCharCode(64*t+8*r+1*n)}),n="",i=0;i<r.length;i+=2){vara=256*r.charCodeAt(i)+r.charCodeAt(i+1);n+=a>=32&&a<127&&60!==a&&62!==a&&38!==a?String.fromCharCode(a):"&#x"+(65536+a).toString(16).substring(1)+";"}return">"+n})}functioni(e){if("string"==typeofe){e=n(e);e=(newDOMParser).parseFromString(e,"application/xml")}elseeinstanceofDocument||(0,a.error)("Metadata: Invalid metadata object");this.metaDocument=e,this.metadata=Object.create(null),this.parse()}Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void0;vara=r(0);i.prototype={parse:function(){vare=this.metaDocument,t=e.documentElement;if("rdf:rdf"!==t.nodeName.toLowerCase())for(t=t.firstChild;t&&"rdf:rdf"!==t.nodeName.toLowerCase();)t=t.nextSibling;varr=t?t.nodeName.toLowerCase():null;if(t&&"rdf:rdf"===r&&t.hasChildNodes()){varn,i,a,o,s,l,c,u=t.childNodes;for(o=0,l=u.length;o<l;o++)if(n=u[o],"rdf:description"===n.nodeName.toLowerCase())for(s=0,c=n.childNodes.length;s<c;s++)"#text"!==n.childNodes[s].nodeName.toLowerCase()&&(i=n.childNodes[s],a=i.nodeName.toLowerCase(),this.metadata[a]=i.textContent.trim())}},get:function(e){returnthis.metadata[e]||null},has:function(e){returnvoid0!==this.metadata[e]}},t.Metadata=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebGLUtils=void0;varn=r(1),i=r(0),a=function(){functione(e,t,r){varn=e.createShader(r);if(e.shaderSource(n,t),e.compileShader(n),!e.getShaderParameter(n,e.COMPILE_STATUS)){vari=e.getShaderInfoLog(n);thrownewError("Error during shader compilation: "+i)}returnn}functiont(t,r){returne(t,r,t.VERTEX_SHADER)}functionr(t,r){returne(t,r,t.FRAGMENT_SHADER)}functiona(e,t){for(varr=e.createProgram(),n=0,i=t.length;n<i;++n)e.attachShader(r,t[n]);if(e.linkProgram(r),!e.getProgramParameter(r,e.LINK_STATUS)){vara=e.getProgramInfoLog(r);thrownewError("Error during program linking: "+a)}returnr}functiono(e,t,r){e.activeTexture(r);varn=e.createTexture();returne.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),n}functions(){f||(p=document.createElement("canvas"),f=p.getContext("webgl",{premultipliedalpha:!1}))}functionl(){vare,n;s(),e=p,p=null,n=f,f=null;vari=t(n,m),o=r(n,g),l=a(n,[i,o]);n.useProgram(l);varc={};c.gl=n,c.canvas=e,c.resolutionLocation=n.getUniformLocation(l,"u_resolution"),c.positionLocation=n.getAttribLocation(l,"a_position"),c.backdropLocation=n.getUniformLocation(l,"u_backdrop"),c.subtypeLocation=n.getUniformLocation(l,"u_subtype");varu=n.getAttribLocation(l,"a_texCoord"),d=n.getUniformLocation(l,"u_image"),h=n.getUniformLocation(l,"u_mask"),b=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,b),n.bufferData(n.ARRAY_BUFFER,newFloat32Array([0,0,1,0,0,1,0,1,1,0,1,1]),n.STATIC_DRAW),n.enableVertexAttribArray(u),n.vertexAttribPointer(u,2,n.FLOAT,!1,0,0),n.uniform1i(d,0),n.uniform1i(h,1),v=c}functionc(e,t,r){varn=e.width,i=e.height;v||l();vara=v,s=a.canvas,c=a.gl;s.width=n,s.height=i,c.viewport(0,0,c.drawingBufferWidth,c.drawingBufferHeight),c.uniform2f(a.resolutionLocation,n,i),r.backdrop?c.uniform4f(a.resolutionLocation,r.backdrop[0],r.backdrop[1],r.backdrop[2],1):c.uniform4f(a.resolutionLocation,0,0,0,0),c.uniform1i(a.subtypeLocation,"Luminosity"===r.subtype?1:0);varu=o(c,e,c.TEXTURE0),d=o(c,t,c.TEXTURE1),h=c.createBuffer();returnc.bindBuffer(c.ARRAY_BUFFER,h),c.bufferData(c.ARRAY_BUFFER,newFloat32Array([0,0,n,0,0,i,0,i,n,0,n,i]),c.STATIC_DRAW),c.enableVertexAttribArray(a.positionLocation),c.vertexAttribPointer(a.positionLocation,2,c.FLOAT,!1,0,0),c.clearColor(0,0,0,0),c.enable(c.BLEND),c.blendFunc(c.ONE,c.ONE_MINUS_SRC_ALPHA),c.clear(c.COLOR_BUFFER_BIT),c.drawArrays(c.TRIANGLES,0,6),c.flush(),c.deleteTexture(u),c.deleteTexture(d),c.deleteBuffer(h),s}functionu(){vare,n;s(),e=p,p=null,n=f,f=null;vari=t(n,b),o=r(n,y),l=a(n,[i,o])
key:"desiredSize",get:function(){if(!1===S(this))throwz("desiredSize");if(void0===this._ownerWritableStream)throwG("desiredSize");returnT(this)}},{key:"ready",get:function(){return!1===S(this)?Promise.reject(z("ready")):this._readyPromise}}]),e}(),Ae=function(){functione(t,r,i,o){if(n(this,e),!1===a(t))thrownewTypeError("WritableStreamDefaultController can only be constructed with a WritableStream instance");if(void0!==t._writableStreamController)thrownewTypeError("WritableStreamDefaultController instances can only be created by the WritableStream constructor");this._controlledWritableStream=t,this._underlyingSink=r,this._queue=void0,this._queueTotalSize=void0,ve(this),this._started=!1;vars=le(i,o);this._strategySize=s.size,this._strategyHWM=s.highWaterMark,_(t,U(this))}returnie(e,[{key:"error",value:function(e){if(!1===D(this))thrownewTypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&q(this,e)}},{key:"__abortSteps",value:function(e){returnse(this._underlyingSink,"abort",[e])}},{key:"__errorSteps",value:function(){ve(this)}},{key:"__startSteps",value:function(){vare=this,t=oe(this._underlyingSink,"start",[this]),r=this._controlledWritableStream;Promise.resolve(t).then(function(){de("writable"===r._state||"erroring"===r._state),e._started=!0,F(e)},function(t){de("writable"===r._state||"erroring"===r._state),e._started=!0,c(r,t)}).catch(he)}}]),e}()},function(e,t,r){varn=r(0),i=n.IsFiniteNonNegativeNumber,a=r(1),o=a.assert;t.DequeueValue=function(e){o("_queue"ine&&"_queueTotalSize"ine,"Spec-level failure: DequeueValue should only be used on containers with [[queue]] and [[queueTotalSize]]."),o(e._queue.length>0,"Spec-level failure: should never dequeue from an empty queue.");vart=e._queue.shift();returne._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value},t.EnqueueValueWithSize=function(e,t,r){if(o("_queue"ine&&"_queueTotalSize"ine,"Spec-level failure: EnqueueValueWithSize should only be used on containers with [[queue]] and [[queueTotalSize]]."),r=Number(r),!i(r))thrownewRangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r},t.PeekQueueValue=function(e){returno("_queue"ine&&"_queueTotalSize"ine,"Spec-level failure: PeekQueueValue should only be used on containers with [[queue]] and [[queueTotalSize]]."),o(e._queue.length>0,"Spec-level failure: should never peek at an empty queue."),e._queue[0].value},t.ResetQueue=function(e){o("_queue"ine&&"_queueTotalSize"ine,"Spec-level failure: ResetQueue should only be used on containers with [[queue]] and [[queueTotalSize]]."),e._queue=[],e._queueTotalSize=0}},function(e,t,r){functionn(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functioni(e){returnnewtt(e)}functiona(e){returnnewet(e)}functiono(e){return!!Fe(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}functions(e){returnMe(!0===o(e),"IsReadableStreamDisturbed should only be used on known readable streams"),e._disturbed}functionl(e){returnMe(!0===o(e),"IsReadableStreamLocked should only be used on known readable streams"),void0!==e._reader}functionc(e,t){Me(!0===o(e)),Me("boolean"==typeoft);varr=a(e),n={closedOrErrored:!1,canceled1:!1,canceled2:!1,reason1:void0,reason2:void0};n.promise=newPromise(function(e){n._resolve=e});vari=u();i._reader=r,i._teeState=n,i._cloneForBranch2=t;vars=d();s._stream=e,s._teeState=n;varl=h();l._stream=e,l._teeState=n;varc=Object.create(Object.prototype);De(c,"pull",i),De(c,"cancel",s);varf=new$e(c),p=Object.create(Object.prototype);De(p,"pull",i),De(p,"cancel",l);varm=new$e(p);returni._branch1=f._readableStreamController,i._branch2=m._readableStreamController,r._closedPromise.catch(function(e){!0!==n.closedOrErrored&&(F(i._branch1,e),F(i._branch2,e),n.closedOrErrored=!0)}),[f,m]}functionu(){functione(){vart=e._reader,r=e._branch1,n=e._branch2,i=e._teeState;returnE(t).then
;returnw(r,"transform",[t,n],h,[t,n]).then(function(){returne._transforming=!1,u(e)},function(t){returnl(e,t),Promise.reject(t)})}functionp(e){return!!k(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}functionm(e){return!!k(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}functiong(e){returnnewTypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}functionv(e){returnnewTypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}varb=function(){functione(e,t){for(varr=0;r<t.length;r++){varn=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}returnfunction(t,r,n){returnr&&e(t.prototype,r),n&&e(t,n),t}}(),y=r(1),A=y.assert,_=r(0),S=_.InvokeOrNoop,w=_.PromiseInvokeOrPerformFallback,P=_.PromiseInvokeOrNoop,k=_.typeIsObject,C=r(4),x=C.ReadableStream,T=C.ReadableStreamDefaultControllerClose,R=C.ReadableStreamDefaultControllerEnqueue,E=C.ReadableStreamDefaultControllerError,L=C.ReadableStreamDefaultControllerGetDesiredSize,I=r(2),O=I.WritableStream,j=I.WritableStreamDefaultControllerError,D=function(){functione(t,r){n(this,e),this._transformStream=t,this._startPromise=r}returnb(e,[{key:"start",value:function(e){vart=this._transformStream;returnt._writableController=e,this._startPromise.then(function(){returnu(t)})}},{key:"write",value:function(e){returnf(this._transformStream,e)}},{key:"abort",value:function(){vare=this._transformStream;e._writableDone=!0,c(e,newTypeError("Writable side aborted"))}},{key:"close",value:function(){vare=this._transformStream;returnA(!1===e._transforming),e._writableDone=!0,P(e._transformer,"flush",[e._transformStreamController]).then(function(){return!0===e._errored?Promise.reject(e._storedError):(!1===e._readableClosed&&s(e),Promise.resolve())}).catch(function(t){returnl(e,t),Promise.reject(e._storedError)})}}]),e}(),F=function(){functione(t,r){n(this,e),this._transformStream=t,this._startPromise=r}returnb(e,[{key:"start",value:function(e){vart=this._transformStream;returnt._readableController=e,this._startPromise.then(function(){returnA(void0!==t._backpressureChangePromise,"_backpressureChangePromise should have been initialized"),!0===t._backpressure?Promise.resolve():(A(!1===t._backpressure,"_backpressure should have been initialized"),t._backpressureChangePromise)})}},{key:"pull",value:function(){vare=this._transformStream;returnA(!0===e._backpressure,"pull() should be never called while _backpressure is false"),A(void0!==e._backpressureChangePromise,"_backpressureChangePromise should have been initialized"),d(e,!1),e._backpressureChangePromise}},{key:"cancel",value:function(){vare=this._transformStream;e._readableClosed=!0,c(e,newTypeError("Readable side canceled"))}}]),e}(),N=function(){functione(t){if(n(this,e),!1===m(t))thrownewTypeError("TransformStreamDefaultController can only be constructed with a TransformStream instance");if(void0!==t._transformStreamController)thrownewTypeError("TransformStreamDefaultController instances can only be created by the TransformStream constructor");this._controlledTransformStream=t}returnb(e,[{key:"enqueue",value:function(e){if(!1===p(this))throwg("enqueue");a(this._controlledTransformStream,e)}},{key:"close",value:function(){if(!1===p(this))throwg("close");i(this._controlledTransformStream)}},{key:"error",value:function(e){if(!1===p(this))throwg("error");o(this._controlledTransformStream,e)}},{key:"desiredSize",get:function(){if(!1===p(this))throwg("desiredSize");vare=this._controlledTransformStream,t=e._readableController;returnL(t)}}]),e}(),M=function(){functione(){vart=arguments.length>0&&void0!==arguments[0]?arguments[0]:{};n(this,e),this._transformer=t;varr=t.readableStrategy,i=t.writableStrategy;this._transforming=!1,this._errored=!1,this._storedError=void0,this._writableController=void0,this._readableController=void0,this._transformStreamController=void0,this._writableDone=!1,this._reada
"\t"===A||"\n"===A||"\r"===A?l("Invalid whitespace in file host."):d+=A;break;case"host":case"hostname":if(":"!==A||b){if(A===p||"/"===A||"\\"===A||"?"===A||"#"===A){if(this._host=i.call(this,d),d="",c="relative path start",r)breake;continue}"\t"!==A&&"\n"!==A&&"\r"!==A?("["===A?b=!0:"]"===A&&(b=!1),d+=A):l("Invalid code point in host/hostname: "+A)}elseif(this._host=i.call(this,d),d="",c="port","hostname"===r)breake;break;case"port":if(/[0-9]/.test(A))d+=A;else{if(A===p||"/"===A||"\\"===A||"?"===A||"#"===A||r){if(""!==d){varC=parseInt(d,10);C!==h[this._scheme]&&(this._port=C+""),d=""}if(r)breake;c="relative path start";continue}"\t"===A||"\n"===A||"\r"===A?l("Invalid code point in port: "+A):n.call(this)}break;case"relative path start":if("\\"===A&&l("'\\' not allowed in path."),c="relative path","/"!==A&&"\\"!==A)continue;break;case"relative path":if(A!==p&&"/"!==A&&"\\"!==A&&(r||"?"!==A&&"#"!==A))"\t"!==A&&"\n"!==A&&"\r"!==A&&(d+=a(A));else{"\\"===A&&l("\\ not allowed in relative path.");varx;(x=f[d.toLowerCase()])&&(d=x),".."===d?(this._path.pop(),"/"!==A&&"\\"!==A&&this._path.push("")):"."===d&&"/"!==A&&"\\"!==A?this._path.push(""):"."!==d&&("file"===this._scheme&&0===this._path.length&&2===d.length&&m.test(d[0])&&"|"===d[1]&&(d=d[0]+":"),this._path.push(d)),d="","?"===A?(this._query="?",c="query"):"#"===A&&(this._fragment="#",c="fragment")}break;case"query":r||"#"!==A?A!==p&&"\t"!==A&&"\n"!==A&&"\r"!==A&&(this._query+=o(A)):(this._fragment="#",c="fragment");break;case"fragment":A!==p&&"\t"!==A&&"\n"!==A&&"\r"!==A&&(this._fragment+=A)}u++}}functionl(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1}functionc(e,t){void0===t||tinstanceofc||(t=newc(String(t))),this._url=e,l.call(this);varr=e.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");s.call(this,r,null,t)}varu=!1;try{if("function"==typeofURL&&"object"===t(URL.prototype)&&"origin"inURL.prototype){vard=newURL("b","http://a");d.pathname="c%20d",u="http://a/c%20d"===d.href}}catch(e){}if(!u){varh=Object.create(null);h.ftp=21,h.file=0,h.gopher=70,h.http=80,h.https=443,h.ws=80,h.wss=443;varf=Object.create(null);f["%2e"]=".",f[".%2e"]="..",f["%2e."]="..",f["%2e%2e"]="..";varp,m=/[a-zA-Z]/,g=/[a-zA-Z0-9\+\-\.]/;c.prototype={toString:function(){returnthis.href},gethref(){if(this._isInvalid)returnthis._url;vare="";return""===this._username&&null===this._password||(e=this._username+(null!==this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+e+this.host:"")+this.pathname+this._query+this._fragment},sethref(e){l.call(this),s.call(this,e)},getprotocol(){returnthis._scheme+":"},setprotocol(e){this._isInvalid||s.call(this,e+":","scheme start")},gethost(){returnthis._isInvalid?"":this._port?this._host+":"+this._port:this._host},sethost(e){!this._isInvalid&&this._isRelative&&s.call(this,e,"host")},gethostname(){returnthis._host},sethostname(e){!this._isInvalid&&this._isRelative&&s.call(this,e,"hostname")},getport(){returnthis._port},setport(e){!this._isInvalid&&this._isRelative&&s.call(this,e,"port")},getpathname(){returnthis._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},setpathname(e){!this._isInvalid&&this._isRelative&&(this._path=[],s.call(this,e,"relative path start"))},getsearch(){returnthis._isInvalid||!this._query||"?"===this._query?"":this._query},setsearch(e){!this._isInvalid&&this._isRelative&&(this._query="?","?"===e[0]&&(e=e.slice(1)),s.call(this,e,"query"))},gethash(){returnthis._isInvalid||!this._fragment||"#"===this._fragment?"":this._fragment},sethash(e){this._isInvalid||(this._fragment="#","#"===e[0]&&(e=e.slice(1)),s.call(this,e,"fragment"))},getorigin(){vare;if(this._isInvalid||!this._scheme)return"";switch(this._scheme){case"data":case"file":case"javascript":case"mailto":return"null"}returne=this.host,e?this._scheme+"://"+e:""}};varv=r.URL;v&&(c.createObjectURL=function(e){returnv.createObjectURL.apply(v,arguments)},c.revok