diff --git a/index.html b/index.html index 423c2d4..9a6931b 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -
x?1:(p-D)/(p-x),R=f-(f-v)*e,I=b-(b-C)*e,L=y-(y-A)*e,O=w-(w-k)*e;const t=Math.round(Math.min(N,R)),n=Math.round(Math.max(N,R));let r=u*D+4*t;for(let a=t;a<=n;a++)e=(N-a)/(N-R),e<0?e=0:e>1&&(e=1),d[r++]=F-(F-I)*e|0,d[r++]=T-(T-L)*e|0,d[r++]=M-(M-O)*e|0,d[r++]=255}}function d(e,t,n){const r=t.coords,a=t.colors;let i,s;switch(t.type){case"lattice":const l=t.verticesPerRow,o=Math.floor(r.length/l)-1,d=l-1;for(i=0;i x?1:(p-D)/(p-x),R=f-(f-v)*e,I=b-(b-C)*e,L=y-(y-A)*e,O=w-(w-k)*e;const t=Math.round(Math.min(N,R)),n=Math.round(Math.max(N,R));let r=u*D+4*t;for(let a=t;a<=n;a++)e=(N-a)/(N-R),e<0?e=0:e>1&&(e=1),d[r++]=F-(F-I)*e|0,d[r++]=T-(T-L)*e|0,d[r++]=M-(M-O)*e|0,d[r++]=255}}function d(e,t,n){const r=t.coords,a=t.colors;let i,s;switch(t.type){case"lattice":const l=t.verticesPerRow,o=Math.floor(r.length/l)-1,d=l-1;for(i=0;i{Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;const n=Object.create(null);t.GlobalWorkerOptions=n,n.workerPort=null,n.workerSrc=""},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var r=n(1);const a=1,i=2,s=1,l=2,o=3,c=4,d=5,u=6,h=7,f=8;function p(e){switch(e instanceof Error||"object"===typeof e&&null!==e||(0,r.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new r.AbortException(e.message);case"MissingPDFException":return new r.MissingPDFException(e.message);case"PasswordException":return new r.PasswordException(e.message,e.code);case"UnexpectedResponseException":return new r.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new r.UnknownErrorException(e.message,e.details);default:return new r.UnknownErrorException(e.message,e.toString())}}var m=new WeakSet;function g(e){const t=e.streamId,n=this.sourceName,a=e.sourceName,i=this.comObj,s=this,l=this.actionHandler[e.action],u={enqueue(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,l=arguments.length>2?arguments[2]:void 0;if(this.isCancelled)return;const o=this.desiredSize;this.desiredSize-=s,o>0&&this.desiredSize<=0&&(this.sinkCapability=new r.PromiseCapability,this.ready=this.sinkCapability.promise),i.postMessage({sourceName:n,targetName:a,stream:c,streamId:t,chunk:e},l)},close(){this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:n,targetName:a,stream:o,streamId:t}),delete s.streamSinks[t])},error(e){(0,r.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:n,targetName:a,stream:d,streamId:t,reason:p(e)}))},sinkCapability:new r.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};u.sinkCapability.resolve(),u.ready=u.sinkCapability.promise,this.streamSinks[t]=u,new Promise((function(t){t(l(e.data,u))})).then((function(){i.postMessage({sourceName:n,targetName:a,stream:f,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:n,targetName:a,stream:f,streamId:t,reason:p(e)})}))}function v(e){const t=e.streamId,n=this.sourceName,a=e.sourceName,i=this.comObj,g=this.streamControllers[t],v=this.streamSinks[t];switch(e.stream){case f:e.success?g.startCall.resolve():g.startCall.reject(p(e.reason));break;case h:e.success?g.pullCall.resolve():g.pullCall.reject(p(e.reason));break;case u:if(!v){i.postMessage({sourceName:n,targetName:a,stream:h,streamId:t,success:!0});break}v.desiredSize<=0&&e.desiredSize>0&&v.sinkCapability.resolve(),v.desiredSize=e.desiredSize,new Promise((function(e){var t;e(null===(t=v.onPull)||void 0===t?void 0:t.call(v))})).then((function(){i.postMessage({sourceName:n,targetName:a,stream:h,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:n,targetName:a,stream:h,streamId:t,reason:p(e)})}));break;case c:if((0,r.assert)(g,"enqueue should have stream controller"),g.isClosed)break;g.controller.enqueue(e.chunk);break;case o:if((0,r.assert)(g,"close should have stream controller"),g.isClosed)break;g.isClosed=!0,g.controller.close(),_assertClassBrand(m,this,x).call(this,g,t);break;case d:(0,r.assert)(g,"error should have stream controller"),g.controller.error(p(e.reason)),_assertClassBrand(m,this,x).call(this,g,t);break;case l:e.success?g.cancelCall.resolve():g.cancelCall.reject(p(e.reason)),_assertClassBrand(m,this,x).call(this,g,t);break;case s:if(!v)break;new Promise((function(t){var n;t(null===(n=v.onCancel)||void 0===n?void 0:n.call(v,p(e.reason)))})).then((function(){i.postMessage({sourceName:n,targetName:a,stream:l,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:n,targetName:a,stream:l,streamId:t,reason:p(e)})})),v.sinkCapability.reject(p(e.reason)),v.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}async function x(e,t){var n,r,a;await Promise.allSettled([null===(n=e.startCall)||void 0===n?void 0:n.promise,null===(r=e.pullCall)||void 0===r?void 0:r.promise,null===(a=e.cancelCall)||void 0===a?void 0:a.promise]),delete this.streamControllers[t]}t.MessageHandler=class{constructor(e,t,n){_classPrivateMethodInitSpec(this,m),this.sourceName=e,this.targetName=t,this.comObj=n,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=e=>{const t=e.data;if(t.targetName!==this.sourceName)return;if(t.stream)return void _assertClassBrand(m,this,v).call(this,t);if(t.callback){const e=t.callbackId,n=this.callbackCapabilities[e];if(!n)throw new Error("Cannot resolve callback ".concat(e));if(delete this.callbackCapabilities[e],t.callback===a)n.resolve(t.data);else{if(t.callback!==i)throw new Error("Unexpected callback case");n.reject(p(t.reason))}return}const r=this.actionHandler[t.action];if(!r)throw new Error("Unknown action from worker: ".concat(t.action));if(t.callbackId){const e=this.sourceName,s=t.sourceName;new Promise((function(e){e(r(t.data))})).then((function(r){n.postMessage({sourceName:e,targetName:s,callback:a,callbackId:t.callbackId,data:r})}),(function(r){n.postMessage({sourceName:e,targetName:s,callback:i,callbackId:t.callbackId,reason:p(r)})}))}else t.streamId?_assertClassBrand(m,this,g).call(this,t):r(t.data)},n.addEventListener("message",this._onComObjOnMessage)}on(e,t){const n=this.actionHandler;if(n[e])throw new Error('There is already an actionName called "'.concat(e,'"'));n[e]=t}send(e,t,n){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},n)}sendWithPromise(e,t,n){const a=this.callbackId++,i=new r.PromiseCapability;this.callbackCapabilities[a]=i;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:a,data:t},n)}catch(s){i.reject(s)}return i.promise}sendWithStream(e,t,n,a){const i=this.streamId++,l=this.sourceName,o=this.targetName,c=this.comObj;return new ReadableStream({start:n=>{const s=new r.PromiseCapability;return this.streamControllers[i]={controller:n,startCall:s,pullCall:null,cancelCall:null,isClosed:!1},c.postMessage({sourceName:l,targetName:o,action:e,streamId:i,data:t,desiredSize:n.desiredSize},a),s.promise},pull:e=>{const t=new r.PromiseCapability;return this.streamControllers[i].pullCall=t,c.postMessage({sourceName:l,targetName:o,stream:u,streamId:i,desiredSize:e.desiredSize}),t.promise},cancel:e=>{(0,r.assert)(e instanceof Error,"cancel must have a valid reason");const t=new r.PromiseCapability;return this.streamControllers[i].cancelCall=t,this.streamControllers[i].isClosed=!0,c.postMessage({sourceName:l,targetName:o,stream:s,streamId:i,reason:p(e)}),t.promise}},n)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var r=n(1),a=new WeakMap,i=new WeakMap;t.Metadata=class{constructor(e){let{parsedData:t,rawData:n}=e;_classPrivateFieldInitSpec(this,a,void 0),_classPrivateFieldInitSpec(this,i,void 0),_classPrivateFieldSet(a,this,t),_classPrivateFieldSet(i,this,n)}getRaw(){return _classPrivateFieldGet(i,this)}get(e){var t;return null!==(t=_classPrivateFieldGet(a,this).get(e))&&void 0!==t?t:null}getAll(){return(0,r.objectFromMap)(_classPrivateFieldGet(a,this))}has(e){return _classPrivateFieldGet(a,this).has(e)}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalContentConfig=void 0;var r=n(1),a=n(8);const i=Symbol("INTERNAL");var s=new WeakMap;class l{constructor(e,t){_classPrivateFieldInitSpec(this,s,!0),this.name=e,this.intent=t}get visible(){return _classPrivateFieldGet(s,this)}_setVisible(e,t){e!==i&&(0,r.unreachable)("Internal method `_setVisible` called."),_classPrivateFieldSet(s,this,t)}}var o=new WeakMap,c=new WeakMap,d=new WeakMap,u=new WeakMap,h=new WeakSet;function f(e){const t=e.length;if(t<2)return!0;const n=e[0];for(let a=1;a>2]+r[(3&t)<<4|n>>4]+r[i+1>6:64]+r[i+2>1&2147483647:e>>1&2147483647;t[a]=e}function n(e,n,r,a){let i=a;const s=n.length;r[i]=s>>24&255,r[i+1]=s>>16&255,r[i+2]=s>>8&255,r[i+3]=255&s,i+=4,r[i]=255&e.charCodeAt(0),r[i+1]=255&e.charCodeAt(1),r[i+2]=255&e.charCodeAt(2),r[i+3]=255&e.charCodeAt(3),i+=4,r.set(n,i),i+=n.length;const l=function(e,n,r){let a=-1;for(let i=n;i0&&(this.current.lineWidth=e)}setLineCap(e){this.current.lineCap=o[e]}setLineJoin(e){this.current.lineJoin=c[e]}setMiterLimit(e){this.current.miterLimit=e}setStrokeAlpha(e){this.current.strokeAlpha=e}setStrokeRGBColor(e,t,n){this.current.strokeColor=a.Util.makeHexColor(e,t,n)}setFillAlpha(e){this.current.fillAlpha=e}setFillRGBColor(e,t,n){this.current.fillColor=a.Util.makeHexColor(e,t,n),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(e){this.current.strokeColor=this._makeColorN_Pattern(e)}setFillColorN(e){this.current.fillColor=this._makeColorN_Pattern(e)}shadingFill(e){const{width:t,height:n}=this.viewport,r=a.Util.inverseTransform(this.transformMatrix),[i,s,l,o]=a.Util.getAxialAlignedBoundingBox([0,0,t,n],r),c=this.svgFactory.createElement("svg:rect");c.setAttributeNS(null,"x",i),c.setAttributeNS(null,"y",s),c.setAttributeNS(null,"width",l-i),c.setAttributeNS(null,"height",o-s),c.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this.current.fillAlpha<1&&c.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(c)}_makeColorN_Pattern(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}_makeTilingPattern(e){const t=e[1],n=e[2],r=e[3]||a.IDENTITY_MATRIX,[i,s,l,o]=e[4],c=e[5],d=e[6],u=e[7],h="shading".concat(v++),[f,p,m,g]=a.Util.normalizeRect([...a.Util.applyTransform([i,s],r),...a.Util.applyTransform([l,o],r)]),[x,b]=a.Util.singularValueDecompose2dScale(r),y=c*x,w=d*b,_=this.svgFactory.createElement("svg:pattern");_.setAttributeNS(null,"id",h),_.setAttributeNS(null,"patternUnits","userSpaceOnUse"),_.setAttributeNS(null,"width",y),_.setAttributeNS(null,"height",w),_.setAttributeNS(null,"x","".concat(f)),_.setAttributeNS(null,"y","".concat(p));const S=this.svg,P=this.transformMatrix,C=this.current.fillColor,A=this.current.strokeColor,k=this.svgFactory.create(m-f,g-p);if(this.svg=k,this.transformMatrix=r,2===u){const e=a.Util.makeHexColor(...t);this.current.fillColor=e,this.current.strokeColor=e}return this.executeOpTree(this.convertOpList(n)),this.svg=S,this.transformMatrix=P,this.current.fillColor=C,this.current.strokeColor=A,_.append(k.childNodes[0]),this.defs.append(_),"url(#".concat(h,")")}_makeShadingPattern(e){switch("string"===typeof e&&(e=this.objs.get(e)),e[0]){case"RadialAxial":const t="shading".concat(v++),n=e[3];let r;switch(e[1]){case"axial":const n=e[4],a=e[5];r=this.svgFactory.createElement("svg:linearGradient"),r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),r.setAttributeNS(null,"x1",n[0]),r.setAttributeNS(null,"y1",n[1]),r.setAttributeNS(null,"x2",a[0]),r.setAttributeNS(null,"y2",a[1]);break;case"radial":const i=e[4],s=e[5],l=e[6],o=e[7];r=this.svgFactory.createElement("svg:radialGradient"),r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),r.setAttributeNS(null,"cx",s[0]),r.setAttributeNS(null,"cy",s[1]),r.setAttributeNS(null,"r",o),r.setAttributeNS(null,"fx",i[0]),r.setAttributeNS(null,"fy",i[1]),r.setAttributeNS(null,"fr",l);break;default:throw new Error("Unknown RadialAxial type: ".concat(e[1]))}for(const e of n){const t=this.svgFactory.createElement("svg:stop");t.setAttributeNS(null,"offset",e[0]),t.setAttributeNS(null,"stop-color",e[1]),r.append(t)}return this.defs.append(r),"url(#".concat(t,")");case"Mesh":return(0,a.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: ".concat(e[0]))}}setDash(e,t){this.current.dashArray=e,this.current.dashPhase=t}constructPath(e,t){const n=this.current;let r=n.x,i=n.y,s=[],l=0;for(const o of e)switch(0|o){case a.OPS.rectangle:r=t[l++],i=t[l++];const e=r+t[l++],n=i+t[l++];s.push("M",f(r),f(i),"L",f(e),f(i),"L",f(e),f(n),"L",f(r),f(n),"Z");break;case a.OPS.moveTo:r=t[l++],i=t[l++],s.push("M",f(r),f(i));break;case a.OPS.lineTo:r=t[l++],i=t[l++],s.push("L",f(r),f(i));break;case a.OPS.curveTo:r=t[l+4],i=t[l+5],s.push("C",f(t[l]),f(t[l+1]),f(t[l+2]),f(t[l+3]),f(r),f(i)),l+=6;break;case a.OPS.curveTo2:s.push("C",f(r),f(i),f(t[l]),f(t[l+1]),f(t[l+2]),f(t[l+3])),r=t[l+2],i=t[l+3],l+=4;break;case a.OPS.curveTo3:r=t[l+2],i=t[l+3],s.push("C",f(t[l]),f(t[l+1]),f(r),f(i),f(r),f(i)),l+=4;break;case a.OPS.closePath:s.push("Z")}s=s.join(" "),n.path&&e.length>0&&e[0]!==a.OPS.rectangle&&e[0]!==a.OPS.moveTo?s=n.path.getAttributeNS(null,"d")+s:(n.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(n.path)),n.path.setAttributeNS(null,"d",s),n.path.setAttributeNS(null,"fill","none"),n.element=n.path,n.setCurrentPoint(r,i)}endPath(){const e=this.current;if(e.path=null,!this.pendingClip)return;if(!e.element)return void(this.pendingClip=null);const t="clippath".concat(m++),n=this.svgFactory.createElement("svg:clipPath");n.setAttributeNS(null,"id",t),n.setAttributeNS(null,"transform",p(this.transformMatrix));const r=e.element.cloneNode(!0);if("evenodd"===this.pendingClip?r.setAttributeNS(null,"clip-rule","evenodd"):r.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,n.append(r),this.defs.append(n),e.activeClipUrl){e.clipGroup=null;for(const e of this.extraStack)e.clipGroup=null;n.setAttributeNS(null,"clip-path",e.activeClipUrl)}e.activeClipUrl="url(#".concat(t,")"),this.tgrp=null}clip(e){this.pendingClip=e}closePath(){const e=this.current;if(e.path){const t="".concat(e.path.getAttributeNS(null,"d"),"Z");e.path.setAttributeNS(null,"d",t)}}setLeading(e){this.current.leading=-e}setTextRise(e){this.current.textRise=e}setTextRenderingMode(e){this.current.textRenderingMode=e}setHScale(e){this.current.textHScale=e/100}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,n]of e)switch(t){case"LW":this.setLineWidth(n);break;case"LC":this.setLineCap(n);break;case"LJ":this.setLineJoin(n);break;case"ML":this.setMiterLimit(n);break;case"D":this.setDash(n[0],n[1]);break;case"RI":this.setRenderingIntent(n);break;case"FL":this.setFlatness(n);break;case"Font":this.setFont(n);break;case"CA":this.setStrokeAlpha(n);break;case"ca":this.setFillAlpha(n);break;default:(0,a.warn)("Unimplemented graphic state operator ".concat(t))}}fill(){const e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}stroke(){const e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=this.current;let r=n.dashArray;1!==t&&r.length>0&&(r=r.map((function(e){return t*e}))),e.setAttributeNS(null,"stroke",n.strokeColor),e.setAttributeNS(null,"stroke-opacity",n.strokeAlpha),e.setAttributeNS(null,"stroke-miterlimit",f(n.miterLimit)),e.setAttributeNS(null,"stroke-linecap",n.lineCap),e.setAttributeNS(null,"stroke-linejoin",n.lineJoin),e.setAttributeNS(null,"stroke-width",f(t*n.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",r.map(f).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",f(t*n.dashPhase)+"px")}eoFill(){var e;null===(e=this.current.element)||void 0===e||e.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){var e;null===(e=this.current.element)||void 0===e||e.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const e=this.svgFactory.createElement("svg:rect");e.setAttributeNS(null,"x","0"),e.setAttributeNS(null,"y","0"),e.setAttributeNS(null,"width","1px"),e.setAttributeNS(null,"height","1px"),e.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(e)}paintImageXObject(e){const t=this.getObject(e);t?this.paintInlineImageXObject(t):(0,a.warn)("Dependent image with object ID ".concat(e," is not ready yet"))}paintInlineImageXObject(e,t){const n=e.width,r=e.height,a=u(e,this.forceDataSchema,!!t),i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y","0"),i.setAttributeNS(null,"width",f(n)),i.setAttributeNS(null,"height",f(r)),this.current.element=i,this.clip("nonzero");const s=this.svgFactory.createElement("svg:image");s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a),s.setAttributeNS(null,"x","0"),s.setAttributeNS(null,"y",f(-r)),s.setAttributeNS(null,"width",f(n)+"px"),s.setAttributeNS(null,"height",f(r)+"px"),s.setAttributeNS(null,"transform","scale(".concat(f(1/n)," ").concat(f(-1/r),")")),t?t.append(s):this._ensureTransformGroup().append(s)}paintImageMaskXObject(e){const t=this.getObject(e.data,e);if(t.bitmap)return void(0,a.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");const n=this.current,r=t.width,i=t.height,s=n.fillColor;n.maskId="mask".concat(g++);const l=this.svgFactory.createElement("svg:mask");l.setAttributeNS(null,"id",n.maskId);const o=this.svgFactory.createElement("svg:rect");o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y","0"),o.setAttributeNS(null,"width",f(r)),o.setAttributeNS(null,"height",f(i)),o.setAttributeNS(null,"fill",s),o.setAttributeNS(null,"mask","url(#".concat(n.maskId,")")),this.defs.append(l),this._ensureTransformGroup().append(o),this.paintInlineImageXObject(t,l)}paintFormXObjectBegin(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){const e=t[2]-t[0],n=t[3]-t[1],r=this.svgFactory.createElement("svg:rect");r.setAttributeNS(null,"x",t[0]),r.setAttributeNS(null,"y",t[1]),r.setAttributeNS(null,"width",f(e)),r.setAttributeNS(null,"height",f(n)),this.current.element=r,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(e){const t=this.svgFactory.create(e.width,e.height),n=this.svgFactory.createElement("svg:defs");t.append(n),this.defs=n;const r=this.svgFactory.createElement("svg:g");return r.setAttributeNS(null,"transform",p(e.transform)),t.append(r),this.svg=r,t}_ensureClipGroup(){if(!this.current.clipGroup){const e=this.svgFactory.createElement("svg:g");e.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(e),this.current.clipGroup=e}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",p(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaText=void 0;class n{static textContent(e){const t=[],r={items:t,styles:Object.create(null)};return function e(r){var a;if(!r)return;let i=null;const s=r.name;if("#text"===s)i=r.value;else{if(!n.shouldBuildText(s))return;null!==r&&void 0!==r&&null!==(a=r.attributes)&&void 0!==a&&a.textContent?i=r.attributes.textContent:r.value&&(i=r.value)}if(null!==i&&t.push({str:i}),r.children)for(const t of r.children)e(t)}(e),r}static shouldBuildText(e){return!("textarea"===e||"input"===e||"option"===e||"select"===e)}}t.XfaText=n},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextLayerRenderTask=void 0,t.renderTextLayer=function(e){e.textContentSource||!e.textContent&&!e.textContentStream||((0,a.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),e.textContentSource=e.textContent||e.textContentStream);const{container:t,viewport:n}=e,r=getComputedStyle(t),i=r.getPropertyValue("visibility"),s=parseFloat(r.getPropertyValue("--scale-factor"));"visible"===i&&(!s||Math.abs(s-n.scale)>1e-5)&&console.error("The `--scale-factor` CSS-variable must be set, to the same value as `viewport.scale`, either on the `container`-element itself or higher up in the DOM.");const l=new u(e);return l._render(),l},t.updateTextLayer=function(e){let{container:t,viewport:n,textDivs:r,textDivProperties:i,isOffscreenCanvasSupported:s,mustRotate:l=!0,mustRescale:c=!0}=e;if(l&&(0,a.setLayerDimensions)(t,{rotation:n.rotation}),c){const e=o(0,s),t={prevFontSize:null,prevFontFamily:null,div:null,scale:n.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:e};for(const n of r)t.properties=i.get(n),t.div=n,d(t)}};var r=n(1),a=n(6);const i=30,s=.8,l=new Map;function o(e,t){let n;if(t&&r.FeatureTest.isOffscreenCanvasSupported)n=new OffscreenCanvas(e,e).getContext("2d",{alpha:!1});else{const t=document.createElement("canvas");t.width=t.height=e,n=t.getContext("2d",{alpha:!1})}return n}function c(e,t,n){const a=document.createElement("span"),c={angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL,fontSize:0};e._textDivs.push(a);const d=r.Util.transform(e._transform,t.transform);let u=Math.atan2(d[1],d[0]);const h=n[t.fontName];h.vertical&&(u+=Math.PI/2);const f=Math.hypot(d[2],d[3]),p=f*function(e,t){const n=l.get(e);if(n)return n;const r=o(i,t);r.font="".concat(i,"px ").concat(e);const a=r.measureText("");let c=a.fontBoundingBoxAscent,d=Math.abs(a.fontBoundingBoxDescent);if(c){const t=c/(c+d);return l.set(e,t),r.canvas.width=r.canvas.height=0,t}r.strokeStyle="red",r.clearRect(0,0,i,i),r.strokeText("g",0,0);let u=r.getImageData(0,0,i,i).data;d=0;for(let s=u.length-1-3;s>=0;s-=4)if(u[s]>0){d=Math.ceil(s/4/i);break}r.clearRect(0,0,i,i),r.strokeText("A",0,i),u=r.getImageData(0,0,i,i).data,c=0;for(let s=0,l=u.length;s{"Enter"===e.key&&(a?e.metaKey:e.ctrlKey)&&_assertClassBrand(ge,this,xe).call(this)})),!t.popupRef&&this.hasPopupData?this._createPopup():n.classList.add("popupTriggerArea"),e.append(n),e}getElementsToTriggerPopup(){return _classPrivateFieldGet(me,this)}addHighlightArea(){this.container.classList.add("highlightArea")}}function xe(){var e;null===(e=this.downloadManager)||void 0===e||e.openOrDownloadData(this.container,this.content,this.filename)}var be=new WeakMap,ye=new WeakMap,we=new WeakMap,_e=new WeakSet;function Se(e,t){var n;const a=e.firstChild||e;a.id="".concat(r.AnnotationPrefix).concat(t),this.div.append(e),null===(n=_classPrivateFieldGet(be,this))||void 0===n||n.moveElementInDOM(this.div,e,a,!1)}function Pe(){if(!_classPrivateFieldGet(ye,this))return;const e=this.div;for(const[t,n]of _classPrivateFieldGet(ye,this)){const r=e.querySelector('[data-annotation-id="'.concat(t,'"]'));if(!r)continue;const{firstChild:a}=r;a?"CANVAS"===a.nodeName?a.replaceWith(n):a.before(n):r.append(n)}_classPrivateFieldGet(ye,this).clear()}t.AnnotationLayer=class{constructor(e){let{div:t,accessibilityManager:n,annotationCanvasMap:r,l10n:a,page:i,viewport:s}=e;_classPrivateMethodInitSpec(this,_e),_classPrivateFieldInitSpec(this,be,null),_classPrivateFieldInitSpec(this,ye,null),_classPrivateFieldInitSpec(this,we,new Map),this.div=t,_classPrivateFieldSet(be,this,n),_classPrivateFieldSet(ye,this,r),this.l10n=a,this.page=i,this.viewport=s,this.zIndex=0,this.l10n||(this.l10n=l.NullL10n)}async render(e){const{annotations:t}=e,n=this.div;(0,a.setLayerDimensions)(n,this.viewport);const s=new Map,l={data:null,layer:n,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:!1!==e.renderForms,svgFactory:new a.DOMSVGFactory,annotationStorage:e.annotationStorage||new i.AnnotationStorage,enableScripting:!0===e.enableScripting,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,parent:this,elements:null};for(const a of t){if(a.noHTML)continue;const e=a.annotationType===r.AnnotationType.POPUP;if(e){const e=s.get(a.id);if(!e)continue;l.elements=e}else{const{width:e,height:t}=u(a.rect);if(e<=0||t<=0)continue}l.data=a;const t=h.create(l);if(!t.isRenderable)continue;if(!e&&a.popupRef){const e=s.get(a.popupRef);e?e.push(t):s.set(a.popupRef,[t])}t.annotationEditorType>0&&_classPrivateFieldGet(we,this).set(t.data.id,t);const n=t.render();a.hidden&&(n.style.visibility="hidden"),_assertClassBrand(_e,this,Se).call(this,n,a.id)}_assertClassBrand(_e,this,Pe).call(this),await this.l10n.translate(n)}update(e){let{viewport:t}=e;const n=this.div;this.viewport=t,(0,a.setLayerDimensions)(n,{rotation:t.rotation}),_assertClassBrand(_e,this,Pe).call(this),n.hidden=!1}getEditableAnnotations(){return Array.from(_classPrivateFieldGet(we,this).values())}getEditableAnnotation(e){return _classPrivateFieldGet(we,this).get(e)}}},(e,t)=>{function n(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}function r(e){return Math.max(0,Math.min(255,255*e))}Object.defineProperty(t,"__esModule",{value:!0}),t.ColorConverters=void 0,t.ColorConverters=class{static CMYK_G(e){let[t,n,r,a]=e;return["G",1-Math.min(1,.3*t+.59*r+.11*n+a)]}static G_CMYK(e){let[t]=e;return["CMYK",0,0,0,1-t]}static G_RGB(e){let[t]=e;return["RGB",t,t,t]}static G_rgb(e){let[t]=e;return t=r(t),[t,t,t]}static G_HTML(e){let[t]=e;const r=n(t);return"#".concat(r).concat(r).concat(r)}static RGB_G(e){let[t,n,r]=e;return["G",.3*t+.59*n+.11*r]}static RGB_rgb(e){return e.map(r)}static RGB_HTML(e){return"#".concat(e.map(n).join(""))}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB(e){let[t,n,r,a]=e;return["RGB",1-Math.min(1,t+a),1-Math.min(1,r+a),1-Math.min(1,n+a)]}static CMYK_rgb(e){let[t,n,a,i]=e;return[r(1-Math.min(1,t+i)),r(1-Math.min(1,a+i)),r(1-Math.min(1,n+i))]}static CMYK_HTML(e){const t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}static RGB_CMYK(e){let[t,n,r]=e;const a=1-t,i=1-n,s=1-r;return["CMYK",a,i,s,Math.min(a,i,s)]}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NullL10n=void 0,t.getL10nFallback=r;const n={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} \xd7 {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} \xd7 {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",rendering_error:"An error occurred while rendering the page.",annotation_date_string:"{{date}}, {{time}}",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts.",free_text2_default_content:"Start typing\u2026",editor_free_text2_aria_label:"Text Editor",editor_ink2_aria_label:"Draw Editor",editor_ink_canvas_aria_label:"User-created image",editor_alt_text_button_label:"Alt text",editor_alt_text_edit_button_label:"Edit alt text",editor_alt_text_decorative_tooltip:"Marked as decorative"};function r(e,t){switch(e){case"find_match_count":e="find_match_count[".concat(1===t.total?"one":"other","]");break;case"find_match_count_limit":e="find_match_count_limit[".concat(1===t.limit?"one":"other","]")}return n[e]||""}n.print_progress_percent="{{progress}}%";const a={getLanguage:async()=>"en-us",getDirection:async()=>"ltr",async get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(e,t){return t?e.replaceAll(/\{\{\s*(\w+)\s*\}\}/g,((e,n)=>n in t?t[n]:"{{"+n+"}}")):e}(arguments.length>2&&void 0!==arguments[2]?arguments[2]:r(e,t),t)},async translate(e){}};t.NullL10n=a},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaLayer=void 0;var r=n(25);t.XfaLayer=class{static setupStorage(e,t,n,r,a){const i=r.getValue(t,{value:null});switch(n.name){case"textarea":if(null!==i.value&&(e.textContent=i.value),"print"===a)break;e.addEventListener("input",(e=>{r.setValue(t,{value:e.target.value})}));break;case"input":if("radio"===n.attributes.type||"checkbox"===n.attributes.type){if(i.value===n.attributes.xfaOn?e.setAttribute("checked",!0):i.value===n.attributes.xfaOff&&e.removeAttribute("checked"),"print"===a)break;e.addEventListener("change",(e=>{r.setValue(t,{value:e.target.checked?e.target.getAttribute("xfaOn"):e.target.getAttribute("xfaOff")})}))}else{if(null!==i.value&&e.setAttribute("value",i.value),"print"===a)break;e.addEventListener("input",(e=>{r.setValue(t,{value:e.target.value})}))}break;case"select":if(null!==i.value){e.setAttribute("value",i.value);for(const e of n.children)e.attributes.value===i.value?e.attributes.selected=!0:e.attributes.hasOwnProperty("selected")&&delete e.attributes.selected}e.addEventListener("input",(e=>{const n=e.target.options,a=-1===n.selectedIndex?"":n[n.selectedIndex].value;r.setValue(t,{value:a})}))}}static setAttributes(e){let{html:t,element:n,storage:r=null,intent:a,linkService:i}=e;const{attributes:s}=n,l=t instanceof HTMLAnchorElement;"radio"===s.type&&(s.name="".concat(s.name,"-").concat(a));for(const[o,c]of Object.entries(s))if(null!==c&&void 0!==c)switch(o){case"class":c.length&&t.setAttribute(o,c.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",c);break;case"style":Object.assign(t.style,c);break;case"textContent":t.textContent=c;break;default:(!l||"href"!==o&&"newWindow"!==o)&&t.setAttribute(o,c)}l&&i.addLinkAttributes(t,s.href,s.newWindow),r&&s.dataId&&this.setupStorage(t,s.dataId,n,r)}static render(e){const t=e.annotationStorage,n=e.linkService,a=e.xfaHtml,i=e.intent||"display",s=document.createElement(a.name);a.attributes&&this.setAttributes({html:s,element:a,intent:i,linkService:n});const l=[[a,-1,s]],o=e.div;if(o.append(s),e.viewport){const t="matrix(".concat(e.viewport.transform.join(","),")");o.style.transform=t}"richText"!==i&&o.setAttribute("class","xfaLayer xfaFont");const c=[];for(;l.length>0;){var d;const[e,a,s]=l.at(-1);if(a+1===e.children.length){l.pop();continue}const o=e.children[++l.at(-1)[1]];if(null===o)continue;const{name:u}=o;if("#text"===u){const e=document.createTextNode(o.value);c.push(e),s.append(e);continue}const h=null!==o&&void 0!==o&&null!==(d=o.attributes)&&void 0!==d&&d.xmlns?document.createElementNS(o.attributes.xmlns,u):document.createElement(u);if(s.append(h),o.attributes&&this.setAttributes({html:h,element:o,storage:t,intent:i,linkService:n}),o.children&&o.children.length>0)l.push([o,-1,h]);else if(o.value){const e=document.createTextNode(o.value);r.XfaText.shouldBuildText(u)&&c.push(e),h.append(e)}}for(const r of o.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))r.setAttribute("readOnly",!0);return{textDivs:c}}static update(e){const t="matrix(".concat(e.viewport.transform.join(","),")");e.div.style.transform=t,e.div.hidden=!1}}},(e,t,n)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.InkEditor=void 0;var a=n(1),i=n(4),s=n(29),l=n(6),o=n(5),c=new WeakMap,d=new WeakMap,u=new WeakMap,h=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,g=new WeakMap,v=new WeakMap,x=new WeakMap,b=new WeakMap,y=new WeakMap,w=new WeakMap,_=new WeakMap,S=new WeakSet;class P extends i.AnnotationEditor{constructor(e){super({...e,name:"inkEditor"}),_classPrivateMethodInitSpec(this,S),_classPrivateFieldInitSpec(this,c,0),_classPrivateFieldInitSpec(this,d,0),_classPrivateFieldInitSpec(this,u,this.canvasPointermove.bind(this)),_classPrivateFieldInitSpec(this,h,this.canvasPointerleave.bind(this)),_classPrivateFieldInitSpec(this,f,this.canvasPointerup.bind(this)),_classPrivateFieldInitSpec(this,p,this.canvasPointerdown.bind(this)),_classPrivateFieldInitSpec(this,m,new Path2D),_classPrivateFieldInitSpec(this,g,!1),_classPrivateFieldInitSpec(this,v,!1),_classPrivateFieldInitSpec(this,x,!1),_classPrivateFieldInitSpec(this,b,null),_classPrivateFieldInitSpec(this,y,0),_classPrivateFieldInitSpec(this,w,0),_classPrivateFieldInitSpec(this,_,null),this.color=e.color||null,this.thickness=e.thickness||null,this.opacity=e.opacity||null,this.paths=[],this.bezierPath2D=[],this.allRawPaths=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0,this._willKeepAspectRatio=!0}static initialize(e){i.AnnotationEditor.initialize(e,{strings:["editor_ink_canvas_aria_label","editor_ink2_aria_label"]})}static updateDefaultParams(e,t){switch(e){case a.AnnotationEditorParamsType.INK_THICKNESS:P._defaultThickness=t;break;case a.AnnotationEditorParamsType.INK_COLOR:P._defaultColor=t;break;case a.AnnotationEditorParamsType.INK_OPACITY:P._defaultOpacity=t/100}}updateParams(e,t){switch(e){case a.AnnotationEditorParamsType.INK_THICKNESS:_assertClassBrand(S,this,C).call(this,t);break;case a.AnnotationEditorParamsType.INK_COLOR:_assertClassBrand(S,this,A).call(this,t);break;case a.AnnotationEditorParamsType.INK_OPACITY:_assertClassBrand(S,this,k).call(this,t)}}static get defaultPropertiesToUpdate(){return[[a.AnnotationEditorParamsType.INK_THICKNESS,P._defaultThickness],[a.AnnotationEditorParamsType.INK_COLOR,P._defaultColor||i.AnnotationEditor._defaultLineColor],[a.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*P._defaultOpacity)]]}get propertiesToUpdate(){var e;return[[a.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||P._defaultThickness],[a.AnnotationEditorParamsType.INK_COLOR,this.color||P._defaultColor||i.AnnotationEditor._defaultLineColor],[a.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(null!==(e=this.opacity)&&void 0!==e?e:P._defaultOpacity))]]}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.canvas||(_assertClassBrand(S,this,G).call(this),_assertClassBrand(S,this,B).call(this)),this.isAttachedToDOM||(this.parent.add(this),_assertClassBrand(S,this,z).call(this)),_assertClassBrand(S,this,J).call(this)))}remove(){null!==this.canvas&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,_classPrivateFieldGet(b,this).disconnect(),_classPrivateFieldSet(b,this,null),super.remove())}setParent(e){!this.parent&&e?this._uiManager.removeShouldRescale(this):this.parent&&null===e&&this._uiManager.addShouldRescale(this),super.setParent(e)}onScaleChanging(){const[e,t]=this.parentDimensions,n=this.width*e,r=this.height*t;this.setDimensions(n,r)}enableEditMode(){_classPrivateFieldGet(g,this)||null===this.canvas||(super.enableEditMode(),this._isDraggable=!1,this.canvas.addEventListener("pointerdown",_classPrivateFieldGet(p,this)))}disableEditMode(){this.isInEditMode()&&null!==this.canvas&&(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",_classPrivateFieldGet(p,this)))}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}commit(){_classPrivateFieldGet(g,this)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),_classPrivateFieldSet(g,this,!0),this.div.classList.add("disabled"),_assertClassBrand(S,this,J).call(this,!0),this.makeResizable(),this.parent.addInkEditorIfNeeded(!0),this.moveInDOM(),this.div.focus({preventScroll:!0}))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),this.enableEditMode())}canvasPointerdown(e){0===e.button&&this.isInEditMode()&&!_classPrivateFieldGet(g,this)&&(this.setInForeground(),e.preventDefault(),"mouse"!==e.type&&this.div.focus(),_assertClassBrand(S,this,N).call(this,e.offsetX,e.offsetY))}canvasPointermove(e){e.preventDefault(),_assertClassBrand(S,this,F).call(this,e.offsetX,e.offsetY)}canvasPointerup(e){e.preventDefault(),_assertClassBrand(S,this,D).call(this,e)}canvasPointerleave(e){_assertClassBrand(S,this,D).call(this,e)}get isResizable(){return!this.isEmpty()&&_classPrivateFieldGet(g,this)}render(){if(this.div)return this.div;let e,t;this.width&&(e=this.x,t=this.y),super.render(),i.AnnotationEditor._l10nPromise.get("editor_ink2_aria_label").then((e=>{var t;return null===(t=this.div)||void 0===t?void 0:t.setAttribute("aria-label",e)}));const[n,r,a,s]=_assertClassBrand(S,this,j).call(this);if(this.setAt(n,r,0,0),this.setDims(a,s),_assertClassBrand(S,this,G).call(this),this.width){const[n,r]=this.parentDimensions;this.setAspectRatio(this.width*n,this.height*r),this.setAt(e*n,t*r,this.width*n,this.height*r),_classPrivateFieldSet(x,this,!0),_assertClassBrand(S,this,z).call(this),this.setDims(this.width*n,this.height*r),_assertClassBrand(S,this,O).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return _assertClassBrand(S,this,B).call(this),this.div}setDimensions(e,t){const n=Math.round(e),r=Math.round(t);if(_classPrivateFieldGet(y,this)===n&&_classPrivateFieldGet(w,this)===r)return;_classPrivateFieldSet(y,this,n),_classPrivateFieldSet(w,this,r),this.canvas.style.visibility="hidden";const[a,i]=this.parentDimensions;this.width=e/a,this.height=t/i,this.fixAndSetPosition(),_classPrivateFieldGet(g,this)&&_assertClassBrand(S,this,W).call(this,e,t),_assertClassBrand(S,this,z).call(this),_assertClassBrand(S,this,O).call(this),this.canvas.style.visibility="visible",this.fixDims()}static deserialize(e,t,n){if(e instanceof s.InkAnnotationElement)return null;const r=super.deserialize(e,t,n);r.thickness=e.thickness,r.color=a.Util.makeHexColor(...e.color),r.opacity=e.opacity;const[l,o]=r.pageDimensions,u=r.width*l,h=r.height*o,f=r.parentScale,p=e.thickness/2;_classPrivateFieldSet(g,r,!0),_classPrivateFieldSet(y,r,Math.round(u)),_classPrivateFieldSet(w,r,Math.round(h));const{paths:m,rect:v,rotation:x}=e;for(let{bezier:a}of m){a=V.call(P,a,v,x);const e=[];r.paths.push(e);let t=f*(a[0]-p),n=f*(a[1]-p);for(let r=2,s=a.length;r{this.thickness=e,_assertClassBrand(S,this,J).call(this)},undo:()=>{this.thickness=t,_assertClassBrand(S,this,J).call(this)},mustExec:!0,type:a.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}function A(e){const t=this.color;this.addCommands({cmd:()=>{this.color=e,_assertClassBrand(S,this,O).call(this)},undo:()=>{this.color=t,_assertClassBrand(S,this,O).call(this)},mustExec:!0,type:a.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function k(e){e/=100;const t=this.opacity;this.addCommands({cmd:()=>{this.opacity=e,_assertClassBrand(S,this,O).call(this)},undo:()=>{this.opacity=t,_assertClassBrand(S,this,O).call(this)},mustExec:!0,type:a.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}function j(){const{parentRotation:e,parentDimensions:[t,n]}=this;switch(e){case 90:return[0,n,n,t];case 180:return[t,n,t,n];case 270:return[t,0,n,t];default:return[0,0,t,n]}}function E(){const{ctx:e,color:t,opacity:n,thickness:r,parentScale:a,scaleFactor:i}=this;e.lineWidth=r*a/i,e.lineCap="round",e.lineJoin="round",e.miterLimit=10,e.strokeStyle="".concat(t).concat((0,o.opacityToHex)(n))}function N(e,t){var n;this.canvas.addEventListener("contextmenu",l.noContextMenu),this.canvas.addEventListener("pointerleave",_classPrivateFieldGet(h,this)),this.canvas.addEventListener("pointermove",_classPrivateFieldGet(u,this)),this.canvas.addEventListener("pointerup",_classPrivateFieldGet(f,this)),this.canvas.removeEventListener("pointerdown",_classPrivateFieldGet(p,this)),this.isEditing=!0,_classPrivateFieldGet(x,this)||(_classPrivateFieldSet(x,this,!0),_assertClassBrand(S,this,z).call(this),this.thickness||(this.thickness=r._defaultThickness),this.color||(this.color=r._defaultColor||i.AnnotationEditor._defaultLineColor),null!==(n=this.opacity)&&void 0!==n||(this.opacity=r._defaultOpacity)),this.currentPath.push([e,t]),_classPrivateFieldSet(v,this,!1),_assertClassBrand(S,this,E).call(this),_classPrivateFieldSet(_,this,(()=>{_assertClassBrand(S,this,R).call(this),_classPrivateFieldGet(_,this)&&window.requestAnimationFrame(_classPrivateFieldGet(_,this))})),window.requestAnimationFrame(_classPrivateFieldGet(_,this))}function F(e,t){const[n,r]=this.currentPath.at(-1);if(this.currentPath.length>1&&e===n&&t===r)return;const a=this.currentPath;let i=_classPrivateFieldGet(m,this);if(a.push([e,t]),_classPrivateFieldSet(v,this,!0),a.length<=2)return i.moveTo(...a[0]),void i.lineTo(e,t);3===a.length&&(_classPrivateFieldSet(m,this,i=new Path2D),i.moveTo(...a[0])),_assertClassBrand(S,this,I).call(this,i,...a.at(-3),...a.at(-2),e,t)}function T(){if(0===this.currentPath.length)return;const e=this.currentPath.at(-1);_classPrivateFieldGet(m,this).lineTo(...e)}function M(e,t){let n;if(_classPrivateFieldSet(_,this,null),e=Math.min(Math.max(e,0),this.canvas.width),t=Math.min(Math.max(t,0),this.canvas.height),_assertClassBrand(S,this,F).call(this,e,t),_assertClassBrand(S,this,T).call(this),1!==this.currentPath.length)n=_assertClassBrand(S,this,L).call(this);else{const r=[e,t];n=[[r,r.slice(),r.slice(),r]]}const r=_classPrivateFieldGet(m,this),a=this.currentPath;this.currentPath=[],_classPrivateFieldSet(m,this,new Path2D),this.addCommands({cmd:()=>{this.allRawPaths.push(a),this.paths.push(n),this.bezierPath2D.push(r),this.rebuild()},undo:()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),0===this.paths.length?this.remove():(this.canvas||(_assertClassBrand(S,this,G).call(this),_assertClassBrand(S,this,B).call(this)),_assertClassBrand(S,this,J).call(this))},mustExec:!0})}function R(){if(!_classPrivateFieldGet(v,this))return;_classPrivateFieldSet(v,this,!1);Math.ceil(this.thickness*this.parentScale);const e=this.currentPath.slice(-3),t=e.map((e=>e[0])),n=e.map((e=>e[1])),{ctx:r}=(Math.min(...t),Math.max(...t),Math.min(...n),Math.max(...n),this);r.save(),r.clearRect(0,0,this.canvas.width,this.canvas.height);for(const a of this.bezierPath2D)r.stroke(a);r.stroke(_classPrivateFieldGet(m,this)),r.restore()}function I(e,t,n,r,a,i,s){const l=(t+r)/2,o=(n+a)/2,c=(r+i)/2,d=(a+s)/2;e.bezierCurveTo(l+2*(r-l)/3,o+2*(a-o)/3,c+2*(r-c)/3,d+2*(a-d)/3,c,d)}function L(){const e=this.currentPath;if(e.length<=2)return[[e[0],e[0],e.at(-1),e.at(-1)]];const t=[];let n,[r,a]=e[0];for(n=1;ni(o,n))ci(d,o)?(e[r]=d,e[c]=n,r=c):(e[r]=o,e[l]=n,r=l);else{if(!(ci(d,n)))break e;e[r]=d,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var l=Date,o=l.now();t.unstable_now=function(){return l.now()-o}}var c=[],d=[],u=1,h=null,f=3,p=!1,m=!1,g=!1,v="function"===typeof setTimeout?setTimeout:null,x="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof setImmediate?setImmediate:null;function y(e){for(var t=r(d);null!==t;){if(null===t.callback)a(d);else{if(!(t.startTime<=e))break;a(d),t.sortIndex=t.expirationTime,n(c,t)}t=r(d)}}function w(e){if(g=!1,y(e),!m)if(null!==r(c))m=!0,M(_);else{var t=r(d);null!==t&&R(w,t.startTime-e)}}function _(e,n){m=!1,g&&(g=!1,x(A),A=-1),p=!0;var i=f;try{for(y(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!E());){var s=h.callback;if("function"===typeof s){h.callback=null,f=h.priorityLevel;var l=s(h.expirationTime<=n);n=t.unstable_now(),"function"===typeof l?h.callback=l:h===r(c)&&a(c),y(n)}else a(c);h=r(c)}if(null!==h)var o=!0;else{var u=r(d);null!==u&&R(w,u.startTime-n),o=!1}return o}finally{h=null,f=i,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,P=!1,C=null,A=-1,k=5,j=-1;function E(){return!(t.unstable_now()-j0?a[a.length-1][4]:n;break;default:r.push(t)}return n}(function(e){for(var t,n,r=[],a=0,i=e.length;a"===s?l=this.renderPartial(i,t,n,a):"&"===s?l=this.unescapedValue(i,t):"name"===s?l=this.escapedValue(i,t,a):"text"===s&&(l=this.rawValue(i)),void 0!==l&&(o+=l);return o},Cs.prototype.renderSection=function(e,t,n,r,a){var i=this,s="",l=t.lookup(e[1]);if(l){if(ds(l))for(var o=0,c=l.length;o30)return(0,r.warn)("Load test font never loaded."),void n();o.font="30px "+t,o.fillText(".",0,20),o.getImageData(0,0,1,1).data[3]>0?n():setTimeout(e.bind(null,t,n))}(d,(()=>{g.remove(),t.complete()}))}},t.FontFaceObject=class{constructor(e,t){let{isEvalSupported:n=!0,disableFontFace:r=!1,ignoreErrors:a=!1,inspectFont:i=null}=t;this.compiledGlyphs=Object.create(null);for(const s in e)this[s]=e[s];this.isEvalSupported=!1!==n,this.disableFontFace=!0===r,this.ignoreErrors=!0===a,this._inspectFont=i}createNativeFontFace(){var e;if(!this.data||this.disableFontFace)return null;let t;if(this.cssFontInfo){const e={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(e.style="oblique ".concat(this.cssFontInfo.italicAngle,"deg")),t=new FontFace(this.cssFontInfo.fontFamily,this.data,e)}else t=new FontFace(this.loadedName,this.data,{});return null===(e=this._inspectFont)||void 0===e||e.call(this,this),t}createFontFaceRule(){var e;if(!this.data||this.disableFontFace)return null;const t=(0,r.bytesToString)(this.data),n="url(data:".concat(this.mimetype,";base64,").concat(btoa(t),");");let a;if(this.cssFontInfo){let e="font-weight: ".concat(this.cssFontInfo.fontWeight,";");this.cssFontInfo.italicAngle&&(e+="font-style: oblique ".concat(this.cssFontInfo.italicAngle,"deg;")),a='@font-face {font-family:"'.concat(this.cssFontInfo.fontFamily,'";').concat(e,"src:").concat(n,"}")}else a='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(n,"}");return null===(e=this._inspectFont)||void 0===e||e.call(this,this,n),a}getPathGenerator(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];let n;try{n=e.get(this.loadedName+"_path_"+t)}catch(a){if(!this.ignoreErrors)throw a;return(0,r.warn)('getPathGenerator - ignoring character: "'.concat(a,'".')),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&r.FeatureTest.isEvalSupported){const e=[];for(const t of n){const n=void 0!==t.args?t.args.join(","):"";e.push("c.",t.cmd,"(",n,");\n")}return this.compiledGlyphs[t]=new Function("c","size",e.join(""))}return this.compiledGlyphs[t]=function(e,t){for(const r of n)"scale"===r.cmd&&(r.args=[t,-t]),e[r.cmd].apply(e,r.args)}}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeStandardFontDataFactory=t.NodeFilterFactory=t.NodeCanvasFactory=t.NodeCMapReaderFactory=void 0;var r=n(7);n(1);const a=function(e){return new Promise(((t,n)=>{__webpack_require__(3237).readFile(e,((e,r)=>{!e&&r?t(new Uint8Array(r)):n(new Error(e))}))}))};class i extends r.BaseFilterFactory{}t.NodeFilterFactory=i;class s extends r.BaseCanvasFactory{_createCanvas(e,t){return __webpack_require__(7640).createCanvas(e,t)}}t.NodeCanvasFactory=s;class l extends r.BaseCMapReaderFactory{_fetchData(e,t){return a(e).then((e=>({cMapData:e,compressionType:t})))}}t.NodeCMapReaderFactory=l;class o extends r.BaseStandardFontDataFactory{_fetchData(e){return a(e)}}t.NodeStandardFontDataFactory=o},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var r=n(1),a=n(6),i=n(12),s=n(13);const l=4096,o=16;class c{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,t,n){let r;return void 0!==this.cache[e]?(r=this.cache[e],this.canvasFactory.reset(r,t,n)):(r=this.canvasFactory.create(t,n),this.cache[e]=r),r}delete(e){delete this.cache[e]}clear(){for(const e in this.cache){const t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}}function d(e,t,n,r,i,s,l,o,c,d){const[u,h,f,p,m,g]=(0,a.getCurrentTransform)(e);if(0===h&&0===f){const a=l*u+m,v=Math.round(a),x=o*p+g,b=Math.round(x),y=(l+c)*u+m,w=Math.abs(Math.round(y)-v)||1,_=(o+d)*p+g,S=Math.abs(Math.round(_)-b)||1;return e.setTransform(Math.sign(u),0,0,Math.sign(p),v,b),e.drawImage(t,n,r,i,s,0,0,w,S),e.setTransform(u,h,f,p,m,g),[w,S]}if(0===u&&0===p){const a=o*f+m,v=Math.round(a),x=l*h+g,b=Math.round(x),y=(o+d)*f+m,w=Math.abs(Math.round(y)-v)||1,_=(l+c)*h+g,S=Math.abs(Math.round(_)-b)||1;return e.setTransform(0,Math.sign(h),Math.sign(f),0,v,b),e.drawImage(t,n,r,i,s,0,0,S,w),e.setTransform(u,h,f,p,m,g),[S,w]}return e.drawImage(t,n,r,i,s,l,o,c,d),[Math.hypot(u,h)*c,Math.hypot(f,p)*d]}class u{constructor(e,t){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=r.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=r.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=r.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,e,t])}clone(){const e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}setCurrentPoint(e,t){this.x=e,this.y=t}updatePathMinMax(e,t,n){[t,n]=r.Util.applyTransform([t,n],e),this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,n),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,n)}updateRectMinMax(e,t){const n=r.Util.applyTransform(t,e),a=r.Util.applyTransform(t.slice(2),e);this.minX=Math.min(this.minX,n[0],a[0]),this.minY=Math.min(this.minY,n[1],a[1]),this.maxX=Math.max(this.maxX,n[0],a[0]),this.maxY=Math.max(this.maxY,n[1],a[1])}updateScalingPathMinMax(e,t){r.Util.scaleMinMax(e,t),this.minX=Math.min(this.minX,t[0]),this.maxX=Math.max(this.maxX,t[1]),this.minY=Math.min(this.minY,t[2]),this.maxY=Math.max(this.maxY,t[3])}updateCurvePathMinMax(e,t,n,a,i,s,l,o,c,d){const u=r.Util.bezierBoundingBox(t,n,a,i,s,l,o,c);if(d)return d[0]=Math.min(d[0],u[0],u[2]),d[1]=Math.max(d[1],u[0],u[2]),d[2]=Math.min(d[2],u[1],u[3]),void(d[3]=Math.max(d[3],u[1],u[3]));this.updateRectMinMax(e,u)}getPathBoundingBox(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.PathType.FILL,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=[this.minX,this.minY,this.maxX,this.maxY];if(e===i.PathType.STROKE){t||(0,r.unreachable)("Stroke bounding box must include transform.");const e=r.Util.singularValueDecompose2dScale(t),a=e[0]*this.lineWidth/2,i=e[1]*this.lineWidth/2;n[0]-=a,n[1]-=i,n[2]+=a,n[3]+=i}return n}updateClipFromPath(){const e=r.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.PathType.FILL,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return r.Util.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}function h(e,t){if("undefined"!==typeof ImageData&&t instanceof ImageData)return void e.putImageData(t,0,0);const n=t.height,a=t.width,i=n%o,s=(n-i)/o,l=0===i?s:s+1,c=e.createImageData(a,o);let d,u=0;const h=t.data,f=c.data;let p,m,g,v;if(t.kind===r.ImageKind.GRAYSCALE_1BPP){const t=h.byteLength,n=new Uint32Array(f.buffer,0,f.byteLength>>2),v=n.length,x=a+7>>3,b=4294967295,y=r.FeatureTest.isLittleEndian?4278190080:255;for(p=0;p>=1}for(;d{Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;const n=Object.create(null);t.GlobalWorkerOptions=n,n.workerPort=null,n.workerSrc=""},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var r=n(1);const a=1,i=2,s=1,l=2,o=3,c=4,d=5,u=6,h=7,f=8;function p(e){switch(e instanceof Error||"object"===typeof e&&null!==e||(0,r.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new r.AbortException(e.message);case"MissingPDFException":return new r.MissingPDFException(e.message);case"PasswordException":return new r.PasswordException(e.message,e.code);case"UnexpectedResponseException":return new r.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new r.UnknownErrorException(e.message,e.details);default:return new r.UnknownErrorException(e.message,e.toString())}}var m=new WeakSet;function g(e){const t=e.streamId,n=this.sourceName,a=e.sourceName,i=this.comObj,s=this,l=this.actionHandler[e.action],u={enqueue(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,l=arguments.length>2?arguments[2]:void 0;if(this.isCancelled)return;const o=this.desiredSize;this.desiredSize-=s,o>0&&this.desiredSize<=0&&(this.sinkCapability=new r.PromiseCapability,this.ready=this.sinkCapability.promise),i.postMessage({sourceName:n,targetName:a,stream:c,streamId:t,chunk:e},l)},close(){this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:n,targetName:a,stream:o,streamId:t}),delete s.streamSinks[t])},error(e){(0,r.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:n,targetName:a,stream:d,streamId:t,reason:p(e)}))},sinkCapability:new r.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};u.sinkCapability.resolve(),u.ready=u.sinkCapability.promise,this.streamSinks[t]=u,new Promise((function(t){t(l(e.data,u))})).then((function(){i.postMessage({sourceName:n,targetName:a,stream:f,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:n,targetName:a,stream:f,streamId:t,reason:p(e)})}))}function v(e){const t=e.streamId,n=this.sourceName,a=e.sourceName,i=this.comObj,g=this.streamControllers[t],v=this.streamSinks[t];switch(e.stream){case f:e.success?g.startCall.resolve():g.startCall.reject(p(e.reason));break;case h:e.success?g.pullCall.resolve():g.pullCall.reject(p(e.reason));break;case u:if(!v){i.postMessage({sourceName:n,targetName:a,stream:h,streamId:t,success:!0});break}v.desiredSize<=0&&e.desiredSize>0&&v.sinkCapability.resolve(),v.desiredSize=e.desiredSize,new Promise((function(e){var t;e(null===(t=v.onPull)||void 0===t?void 0:t.call(v))})).then((function(){i.postMessage({sourceName:n,targetName:a,stream:h,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:n,targetName:a,stream:h,streamId:t,reason:p(e)})}));break;case c:if((0,r.assert)(g,"enqueue should have stream controller"),g.isClosed)break;g.controller.enqueue(e.chunk);break;case o:if((0,r.assert)(g,"close should have stream controller"),g.isClosed)break;g.isClosed=!0,g.controller.close(),_assertClassBrand(m,this,x).call(this,g,t);break;case d:(0,r.assert)(g,"error should have stream controller"),g.controller.error(p(e.reason)),_assertClassBrand(m,this,x).call(this,g,t);break;case l:e.success?g.cancelCall.resolve():g.cancelCall.reject(p(e.reason)),_assertClassBrand(m,this,x).call(this,g,t);break;case s:if(!v)break;new Promise((function(t){var n;t(null===(n=v.onCancel)||void 0===n?void 0:n.call(v,p(e.reason)))})).then((function(){i.postMessage({sourceName:n,targetName:a,stream:l,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:n,targetName:a,stream:l,streamId:t,reason:p(e)})})),v.sinkCapability.reject(p(e.reason)),v.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}async function x(e,t){var n,r,a;await Promise.allSettled([null===(n=e.startCall)||void 0===n?void 0:n.promise,null===(r=e.pullCall)||void 0===r?void 0:r.promise,null===(a=e.cancelCall)||void 0===a?void 0:a.promise]),delete this.streamControllers[t]}t.MessageHandler=class{constructor(e,t,n){_classPrivateMethodInitSpec(this,m),this.sourceName=e,this.targetName=t,this.comObj=n,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=e=>{const t=e.data;if(t.targetName!==this.sourceName)return;if(t.stream)return void _assertClassBrand(m,this,v).call(this,t);if(t.callback){const e=t.callbackId,n=this.callbackCapabilities[e];if(!n)throw new Error("Cannot resolve callback ".concat(e));if(delete this.callbackCapabilities[e],t.callback===a)n.resolve(t.data);else{if(t.callback!==i)throw new Error("Unexpected callback case");n.reject(p(t.reason))}return}const r=this.actionHandler[t.action];if(!r)throw new Error("Unknown action from worker: ".concat(t.action));if(t.callbackId){const e=this.sourceName,s=t.sourceName;new Promise((function(e){e(r(t.data))})).then((function(r){n.postMessage({sourceName:e,targetName:s,callback:a,callbackId:t.callbackId,data:r})}),(function(r){n.postMessage({sourceName:e,targetName:s,callback:i,callbackId:t.callbackId,reason:p(r)})}))}else t.streamId?_assertClassBrand(m,this,g).call(this,t):r(t.data)},n.addEventListener("message",this._onComObjOnMessage)}on(e,t){const n=this.actionHandler;if(n[e])throw new Error('There is already an actionName called "'.concat(e,'"'));n[e]=t}send(e,t,n){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},n)}sendWithPromise(e,t,n){const a=this.callbackId++,i=new r.PromiseCapability;this.callbackCapabilities[a]=i;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:a,data:t},n)}catch(s){i.reject(s)}return i.promise}sendWithStream(e,t,n,a){const i=this.streamId++,l=this.sourceName,o=this.targetName,c=this.comObj;return new ReadableStream({start:n=>{const s=new r.PromiseCapability;return this.streamControllers[i]={controller:n,startCall:s,pullCall:null,cancelCall:null,isClosed:!1},c.postMessage({sourceName:l,targetName:o,action:e,streamId:i,data:t,desiredSize:n.desiredSize},a),s.promise},pull:e=>{const t=new r.PromiseCapability;return this.streamControllers[i].pullCall=t,c.postMessage({sourceName:l,targetName:o,stream:u,streamId:i,desiredSize:e.desiredSize}),t.promise},cancel:e=>{(0,r.assert)(e instanceof Error,"cancel must have a valid reason");const t=new r.PromiseCapability;return this.streamControllers[i].cancelCall=t,this.streamControllers[i].isClosed=!0,c.postMessage({sourceName:l,targetName:o,stream:s,streamId:i,reason:p(e)}),t.promise}},n)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var r=n(1),a=new WeakMap,i=new WeakMap;t.Metadata=class{constructor(e){let{parsedData:t,rawData:n}=e;_classPrivateFieldInitSpec(this,a,void 0),_classPrivateFieldInitSpec(this,i,void 0),_classPrivateFieldSet(a,this,t),_classPrivateFieldSet(i,this,n)}getRaw(){return _classPrivateFieldGet(i,this)}get(e){var t;return null!==(t=_classPrivateFieldGet(a,this).get(e))&&void 0!==t?t:null}getAll(){return(0,r.objectFromMap)(_classPrivateFieldGet(a,this))}has(e){return _classPrivateFieldGet(a,this).has(e)}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalContentConfig=void 0;var r=n(1),a=n(8);const i=Symbol("INTERNAL");var s=new WeakMap;class l{constructor(e,t){_classPrivateFieldInitSpec(this,s,!0),this.name=e,this.intent=t}get visible(){return _classPrivateFieldGet(s,this)}_setVisible(e,t){e!==i&&(0,r.unreachable)("Internal method `_setVisible` called."),_classPrivateFieldSet(s,this,t)}}var o=new WeakMap,c=new WeakMap,d=new WeakMap,u=new WeakMap,h=new WeakSet;function f(e){const t=e.length;if(t<2)return!0;const n=e[0];for(let a=1;a>2]+r[(3&t)<<4|n>>4]+r[i+1>6:64]+r[i+2>1&2147483647:e>>1&2147483647;t[a]=e}function n(e,n,r,a){let i=a;const s=n.length;r[i]=s>>24&255,r[i+1]=s>>16&255,r[i+2]=s>>8&255,r[i+3]=255&s,i+=4,r[i]=255&e.charCodeAt(0),r[i+1]=255&e.charCodeAt(1),r[i+2]=255&e.charCodeAt(2),r[i+3]=255&e.charCodeAt(3),i+=4,r.set(n,i),i+=n.length;const l=function(e,n,r){let a=-1;for(let i=n;i0&&(this.current.lineWidth=e)}setLineCap(e){this.current.lineCap=o[e]}setLineJoin(e){this.current.lineJoin=c[e]}setMiterLimit(e){this.current.miterLimit=e}setStrokeAlpha(e){this.current.strokeAlpha=e}setStrokeRGBColor(e,t,n){this.current.strokeColor=a.Util.makeHexColor(e,t,n)}setFillAlpha(e){this.current.fillAlpha=e}setFillRGBColor(e,t,n){this.current.fillColor=a.Util.makeHexColor(e,t,n),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(e){this.current.strokeColor=this._makeColorN_Pattern(e)}setFillColorN(e){this.current.fillColor=this._makeColorN_Pattern(e)}shadingFill(e){const{width:t,height:n}=this.viewport,r=a.Util.inverseTransform(this.transformMatrix),[i,s,l,o]=a.Util.getAxialAlignedBoundingBox([0,0,t,n],r),c=this.svgFactory.createElement("svg:rect");c.setAttributeNS(null,"x",i),c.setAttributeNS(null,"y",s),c.setAttributeNS(null,"width",l-i),c.setAttributeNS(null,"height",o-s),c.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this.current.fillAlpha<1&&c.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(c)}_makeColorN_Pattern(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}_makeTilingPattern(e){const t=e[1],n=e[2],r=e[3]||a.IDENTITY_MATRIX,[i,s,l,o]=e[4],c=e[5],d=e[6],u=e[7],h="shading".concat(v++),[f,p,m,g]=a.Util.normalizeRect([...a.Util.applyTransform([i,s],r),...a.Util.applyTransform([l,o],r)]),[x,b]=a.Util.singularValueDecompose2dScale(r),y=c*x,w=d*b,_=this.svgFactory.createElement("svg:pattern");_.setAttributeNS(null,"id",h),_.setAttributeNS(null,"patternUnits","userSpaceOnUse"),_.setAttributeNS(null,"width",y),_.setAttributeNS(null,"height",w),_.setAttributeNS(null,"x","".concat(f)),_.setAttributeNS(null,"y","".concat(p));const S=this.svg,P=this.transformMatrix,C=this.current.fillColor,A=this.current.strokeColor,k=this.svgFactory.create(m-f,g-p);if(this.svg=k,this.transformMatrix=r,2===u){const e=a.Util.makeHexColor(...t);this.current.fillColor=e,this.current.strokeColor=e}return this.executeOpTree(this.convertOpList(n)),this.svg=S,this.transformMatrix=P,this.current.fillColor=C,this.current.strokeColor=A,_.append(k.childNodes[0]),this.defs.append(_),"url(#".concat(h,")")}_makeShadingPattern(e){switch("string"===typeof e&&(e=this.objs.get(e)),e[0]){case"RadialAxial":const t="shading".concat(v++),n=e[3];let r;switch(e[1]){case"axial":const n=e[4],a=e[5];r=this.svgFactory.createElement("svg:linearGradient"),r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),r.setAttributeNS(null,"x1",n[0]),r.setAttributeNS(null,"y1",n[1]),r.setAttributeNS(null,"x2",a[0]),r.setAttributeNS(null,"y2",a[1]);break;case"radial":const i=e[4],s=e[5],l=e[6],o=e[7];r=this.svgFactory.createElement("svg:radialGradient"),r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),r.setAttributeNS(null,"cx",s[0]),r.setAttributeNS(null,"cy",s[1]),r.setAttributeNS(null,"r",o),r.setAttributeNS(null,"fx",i[0]),r.setAttributeNS(null,"fy",i[1]),r.setAttributeNS(null,"fr",l);break;default:throw new Error("Unknown RadialAxial type: ".concat(e[1]))}for(const e of n){const t=this.svgFactory.createElement("svg:stop");t.setAttributeNS(null,"offset",e[0]),t.setAttributeNS(null,"stop-color",e[1]),r.append(t)}return this.defs.append(r),"url(#".concat(t,")");case"Mesh":return(0,a.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: ".concat(e[0]))}}setDash(e,t){this.current.dashArray=e,this.current.dashPhase=t}constructPath(e,t){const n=this.current;let r=n.x,i=n.y,s=[],l=0;for(const o of e)switch(0|o){case a.OPS.rectangle:r=t[l++],i=t[l++];const e=r+t[l++],n=i+t[l++];s.push("M",f(r),f(i),"L",f(e),f(i),"L",f(e),f(n),"L",f(r),f(n),"Z");break;case a.OPS.moveTo:r=t[l++],i=t[l++],s.push("M",f(r),f(i));break;case a.OPS.lineTo:r=t[l++],i=t[l++],s.push("L",f(r),f(i));break;case a.OPS.curveTo:r=t[l+4],i=t[l+5],s.push("C",f(t[l]),f(t[l+1]),f(t[l+2]),f(t[l+3]),f(r),f(i)),l+=6;break;case a.OPS.curveTo2:s.push("C",f(r),f(i),f(t[l]),f(t[l+1]),f(t[l+2]),f(t[l+3])),r=t[l+2],i=t[l+3],l+=4;break;case a.OPS.curveTo3:r=t[l+2],i=t[l+3],s.push("C",f(t[l]),f(t[l+1]),f(r),f(i),f(r),f(i)),l+=4;break;case a.OPS.closePath:s.push("Z")}s=s.join(" "),n.path&&e.length>0&&e[0]!==a.OPS.rectangle&&e[0]!==a.OPS.moveTo?s=n.path.getAttributeNS(null,"d")+s:(n.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(n.path)),n.path.setAttributeNS(null,"d",s),n.path.setAttributeNS(null,"fill","none"),n.element=n.path,n.setCurrentPoint(r,i)}endPath(){const e=this.current;if(e.path=null,!this.pendingClip)return;if(!e.element)return void(this.pendingClip=null);const t="clippath".concat(m++),n=this.svgFactory.createElement("svg:clipPath");n.setAttributeNS(null,"id",t),n.setAttributeNS(null,"transform",p(this.transformMatrix));const r=e.element.cloneNode(!0);if("evenodd"===this.pendingClip?r.setAttributeNS(null,"clip-rule","evenodd"):r.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,n.append(r),this.defs.append(n),e.activeClipUrl){e.clipGroup=null;for(const e of this.extraStack)e.clipGroup=null;n.setAttributeNS(null,"clip-path",e.activeClipUrl)}e.activeClipUrl="url(#".concat(t,")"),this.tgrp=null}clip(e){this.pendingClip=e}closePath(){const e=this.current;if(e.path){const t="".concat(e.path.getAttributeNS(null,"d"),"Z");e.path.setAttributeNS(null,"d",t)}}setLeading(e){this.current.leading=-e}setTextRise(e){this.current.textRise=e}setTextRenderingMode(e){this.current.textRenderingMode=e}setHScale(e){this.current.textHScale=e/100}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,n]of e)switch(t){case"LW":this.setLineWidth(n);break;case"LC":this.setLineCap(n);break;case"LJ":this.setLineJoin(n);break;case"ML":this.setMiterLimit(n);break;case"D":this.setDash(n[0],n[1]);break;case"RI":this.setRenderingIntent(n);break;case"FL":this.setFlatness(n);break;case"Font":this.setFont(n);break;case"CA":this.setStrokeAlpha(n);break;case"ca":this.setFillAlpha(n);break;default:(0,a.warn)("Unimplemented graphic state operator ".concat(t))}}fill(){const e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}stroke(){const e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=this.current;let r=n.dashArray;1!==t&&r.length>0&&(r=r.map((function(e){return t*e}))),e.setAttributeNS(null,"stroke",n.strokeColor),e.setAttributeNS(null,"stroke-opacity",n.strokeAlpha),e.setAttributeNS(null,"stroke-miterlimit",f(n.miterLimit)),e.setAttributeNS(null,"stroke-linecap",n.lineCap),e.setAttributeNS(null,"stroke-linejoin",n.lineJoin),e.setAttributeNS(null,"stroke-width",f(t*n.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",r.map(f).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",f(t*n.dashPhase)+"px")}eoFill(){var e;null===(e=this.current.element)||void 0===e||e.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){var e;null===(e=this.current.element)||void 0===e||e.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const e=this.svgFactory.createElement("svg:rect");e.setAttributeNS(null,"x","0"),e.setAttributeNS(null,"y","0"),e.setAttributeNS(null,"width","1px"),e.setAttributeNS(null,"height","1px"),e.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(e)}paintImageXObject(e){const t=this.getObject(e);t?this.paintInlineImageXObject(t):(0,a.warn)("Dependent image with object ID ".concat(e," is not ready yet"))}paintInlineImageXObject(e,t){const n=e.width,r=e.height,a=u(e,this.forceDataSchema,!!t),i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y","0"),i.setAttributeNS(null,"width",f(n)),i.setAttributeNS(null,"height",f(r)),this.current.element=i,this.clip("nonzero");const s=this.svgFactory.createElement("svg:image");s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a),s.setAttributeNS(null,"x","0"),s.setAttributeNS(null,"y",f(-r)),s.setAttributeNS(null,"width",f(n)+"px"),s.setAttributeNS(null,"height",f(r)+"px"),s.setAttributeNS(null,"transform","scale(".concat(f(1/n)," ").concat(f(-1/r),")")),t?t.append(s):this._ensureTransformGroup().append(s)}paintImageMaskXObject(e){const t=this.getObject(e.data,e);if(t.bitmap)return void(0,a.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");const n=this.current,r=t.width,i=t.height,s=n.fillColor;n.maskId="mask".concat(g++);const l=this.svgFactory.createElement("svg:mask");l.setAttributeNS(null,"id",n.maskId);const o=this.svgFactory.createElement("svg:rect");o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y","0"),o.setAttributeNS(null,"width",f(r)),o.setAttributeNS(null,"height",f(i)),o.setAttributeNS(null,"fill",s),o.setAttributeNS(null,"mask","url(#".concat(n.maskId,")")),this.defs.append(l),this._ensureTransformGroup().append(o),this.paintInlineImageXObject(t,l)}paintFormXObjectBegin(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){const e=t[2]-t[0],n=t[3]-t[1],r=this.svgFactory.createElement("svg:rect");r.setAttributeNS(null,"x",t[0]),r.setAttributeNS(null,"y",t[1]),r.setAttributeNS(null,"width",f(e)),r.setAttributeNS(null,"height",f(n)),this.current.element=r,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(e){const t=this.svgFactory.create(e.width,e.height),n=this.svgFactory.createElement("svg:defs");t.append(n),this.defs=n;const r=this.svgFactory.createElement("svg:g");return r.setAttributeNS(null,"transform",p(e.transform)),t.append(r),this.svg=r,t}_ensureClipGroup(){if(!this.current.clipGroup){const e=this.svgFactory.createElement("svg:g");e.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(e),this.current.clipGroup=e}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",p(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaText=void 0;class n{static textContent(e){const t=[],r={items:t,styles:Object.create(null)};return function e(r){var a;if(!r)return;let i=null;const s=r.name;if("#text"===s)i=r.value;else{if(!n.shouldBuildText(s))return;null!==r&&void 0!==r&&null!==(a=r.attributes)&&void 0!==a&&a.textContent?i=r.attributes.textContent:r.value&&(i=r.value)}if(null!==i&&t.push({str:i}),r.children)for(const t of r.children)e(t)}(e),r}static shouldBuildText(e){return!("textarea"===e||"input"===e||"option"===e||"select"===e)}}t.XfaText=n},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextLayerRenderTask=void 0,t.renderTextLayer=function(e){e.textContentSource||!e.textContent&&!e.textContentStream||((0,a.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),e.textContentSource=e.textContent||e.textContentStream);const{container:t,viewport:n}=e,r=getComputedStyle(t),i=r.getPropertyValue("visibility"),s=parseFloat(r.getPropertyValue("--scale-factor"));"visible"===i&&(!s||Math.abs(s-n.scale)>1e-5)&&console.error("The `--scale-factor` CSS-variable must be set, to the same value as `viewport.scale`, either on the `container`-element itself or higher up in the DOM.");const l=new u(e);return l._render(),l},t.updateTextLayer=function(e){let{container:t,viewport:n,textDivs:r,textDivProperties:i,isOffscreenCanvasSupported:s,mustRotate:l=!0,mustRescale:c=!0}=e;if(l&&(0,a.setLayerDimensions)(t,{rotation:n.rotation}),c){const e=o(0,s),t={prevFontSize:null,prevFontFamily:null,div:null,scale:n.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:e};for(const n of r)t.properties=i.get(n),t.div=n,d(t)}};var r=n(1),a=n(6);const i=30,s=.8,l=new Map;function o(e,t){let n;if(t&&r.FeatureTest.isOffscreenCanvasSupported)n=new OffscreenCanvas(e,e).getContext("2d",{alpha:!1});else{const t=document.createElement("canvas");t.width=t.height=e,n=t.getContext("2d",{alpha:!1})}return n}function c(e,t,n){const a=document.createElement("span"),c={angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL,fontSize:0};e._textDivs.push(a);const d=r.Util.transform(e._transform,t.transform);let u=Math.atan2(d[1],d[0]);const h=n[t.fontName];h.vertical&&(u+=Math.PI/2);const f=Math.hypot(d[2],d[3]),p=f*function(e,t){const n=l.get(e);if(n)return n;const r=o(i,t);r.font="".concat(i,"px ").concat(e);const a=r.measureText("");let c=a.fontBoundingBoxAscent,d=Math.abs(a.fontBoundingBoxDescent);if(c){const t=c/(c+d);return l.set(e,t),r.canvas.width=r.canvas.height=0,t}r.strokeStyle="red",r.clearRect(0,0,i,i),r.strokeText("g",0,0);let u=r.getImageData(0,0,i,i).data;d=0;for(let s=u.length-1-3;s>=0;s-=4)if(u[s]>0){d=Math.ceil(s/4/i);break}r.clearRect(0,0,i,i),r.strokeText("A",0,i),u=r.getImageData(0,0,i,i).data,c=0;for(let s=0,l=u.length;s{"Enter"===e.key&&(a?e.metaKey:e.ctrlKey)&&_assertClassBrand(ge,this,xe).call(this)})),!t.popupRef&&this.hasPopupData?this._createPopup():n.classList.add("popupTriggerArea"),e.append(n),e}getElementsToTriggerPopup(){return _classPrivateFieldGet(me,this)}addHighlightArea(){this.container.classList.add("highlightArea")}}function xe(){var e;null===(e=this.downloadManager)||void 0===e||e.openOrDownloadData(this.container,this.content,this.filename)}var be=new WeakMap,ye=new WeakMap,we=new WeakMap,_e=new WeakSet;function Se(e,t){var n;const a=e.firstChild||e;a.id="".concat(r.AnnotationPrefix).concat(t),this.div.append(e),null===(n=_classPrivateFieldGet(be,this))||void 0===n||n.moveElementInDOM(this.div,e,a,!1)}function Pe(){if(!_classPrivateFieldGet(ye,this))return;const e=this.div;for(const[t,n]of _classPrivateFieldGet(ye,this)){const r=e.querySelector('[data-annotation-id="'.concat(t,'"]'));if(!r)continue;const{firstChild:a}=r;a?"CANVAS"===a.nodeName?a.replaceWith(n):a.before(n):r.append(n)}_classPrivateFieldGet(ye,this).clear()}t.AnnotationLayer=class{constructor(e){let{div:t,accessibilityManager:n,annotationCanvasMap:r,l10n:a,page:i,viewport:s}=e;_classPrivateMethodInitSpec(this,_e),_classPrivateFieldInitSpec(this,be,null),_classPrivateFieldInitSpec(this,ye,null),_classPrivateFieldInitSpec(this,we,new Map),this.div=t,_classPrivateFieldSet(be,this,n),_classPrivateFieldSet(ye,this,r),this.l10n=a,this.page=i,this.viewport=s,this.zIndex=0,this.l10n||(this.l10n=l.NullL10n)}async render(e){const{annotations:t}=e,n=this.div;(0,a.setLayerDimensions)(n,this.viewport);const s=new Map,l={data:null,layer:n,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:!1!==e.renderForms,svgFactory:new a.DOMSVGFactory,annotationStorage:e.annotationStorage||new i.AnnotationStorage,enableScripting:!0===e.enableScripting,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,parent:this,elements:null};for(const a of t){if(a.noHTML)continue;const e=a.annotationType===r.AnnotationType.POPUP;if(e){const e=s.get(a.id);if(!e)continue;l.elements=e}else{const{width:e,height:t}=u(a.rect);if(e<=0||t<=0)continue}l.data=a;const t=h.create(l);if(!t.isRenderable)continue;if(!e&&a.popupRef){const e=s.get(a.popupRef);e?e.push(t):s.set(a.popupRef,[t])}t.annotationEditorType>0&&_classPrivateFieldGet(we,this).set(t.data.id,t);const n=t.render();a.hidden&&(n.style.visibility="hidden"),_assertClassBrand(_e,this,Se).call(this,n,a.id)}_assertClassBrand(_e,this,Pe).call(this),await this.l10n.translate(n)}update(e){let{viewport:t}=e;const n=this.div;this.viewport=t,(0,a.setLayerDimensions)(n,{rotation:t.rotation}),_assertClassBrand(_e,this,Pe).call(this),n.hidden=!1}getEditableAnnotations(){return Array.from(_classPrivateFieldGet(we,this).values())}getEditableAnnotation(e){return _classPrivateFieldGet(we,this).get(e)}}},(e,t)=>{function n(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}function r(e){return Math.max(0,Math.min(255,255*e))}Object.defineProperty(t,"__esModule",{value:!0}),t.ColorConverters=void 0,t.ColorConverters=class{static CMYK_G(e){let[t,n,r,a]=e;return["G",1-Math.min(1,.3*t+.59*r+.11*n+a)]}static G_CMYK(e){let[t]=e;return["CMYK",0,0,0,1-t]}static G_RGB(e){let[t]=e;return["RGB",t,t,t]}static G_rgb(e){let[t]=e;return t=r(t),[t,t,t]}static G_HTML(e){let[t]=e;const r=n(t);return"#".concat(r).concat(r).concat(r)}static RGB_G(e){let[t,n,r]=e;return["G",.3*t+.59*n+.11*r]}static RGB_rgb(e){return e.map(r)}static RGB_HTML(e){return"#".concat(e.map(n).join(""))}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB(e){let[t,n,r,a]=e;return["RGB",1-Math.min(1,t+a),1-Math.min(1,r+a),1-Math.min(1,n+a)]}static CMYK_rgb(e){let[t,n,a,i]=e;return[r(1-Math.min(1,t+i)),r(1-Math.min(1,a+i)),r(1-Math.min(1,n+i))]}static CMYK_HTML(e){const t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}static RGB_CMYK(e){let[t,n,r]=e;const a=1-t,i=1-n,s=1-r;return["CMYK",a,i,s,Math.min(a,i,s)]}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NullL10n=void 0,t.getL10nFallback=r;const n={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} \xd7 {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} \xd7 {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",rendering_error:"An error occurred while rendering the page.",annotation_date_string:"{{date}}, {{time}}",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts.",free_text2_default_content:"Start typing\u2026",editor_free_text2_aria_label:"Text Editor",editor_ink2_aria_label:"Draw Editor",editor_ink_canvas_aria_label:"User-created image",editor_alt_text_button_label:"Alt text",editor_alt_text_edit_button_label:"Edit alt text",editor_alt_text_decorative_tooltip:"Marked as decorative"};function r(e,t){switch(e){case"find_match_count":e="find_match_count[".concat(1===t.total?"one":"other","]");break;case"find_match_count_limit":e="find_match_count_limit[".concat(1===t.limit?"one":"other","]")}return n[e]||""}n.print_progress_percent="{{progress}}%";const a={getLanguage:async()=>"en-us",getDirection:async()=>"ltr",async get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(e,t){return t?e.replaceAll(/\{\{\s*(\w+)\s*\}\}/g,((e,n)=>n in t?t[n]:"{{"+n+"}}")):e}(arguments.length>2&&void 0!==arguments[2]?arguments[2]:r(e,t),t)},async translate(e){}};t.NullL10n=a},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaLayer=void 0;var r=n(25);t.XfaLayer=class{static setupStorage(e,t,n,r,a){const i=r.getValue(t,{value:null});switch(n.name){case"textarea":if(null!==i.value&&(e.textContent=i.value),"print"===a)break;e.addEventListener("input",(e=>{r.setValue(t,{value:e.target.value})}));break;case"input":if("radio"===n.attributes.type||"checkbox"===n.attributes.type){if(i.value===n.attributes.xfaOn?e.setAttribute("checked",!0):i.value===n.attributes.xfaOff&&e.removeAttribute("checked"),"print"===a)break;e.addEventListener("change",(e=>{r.setValue(t,{value:e.target.checked?e.target.getAttribute("xfaOn"):e.target.getAttribute("xfaOff")})}))}else{if(null!==i.value&&e.setAttribute("value",i.value),"print"===a)break;e.addEventListener("input",(e=>{r.setValue(t,{value:e.target.value})}))}break;case"select":if(null!==i.value){e.setAttribute("value",i.value);for(const e of n.children)e.attributes.value===i.value?e.attributes.selected=!0:e.attributes.hasOwnProperty("selected")&&delete e.attributes.selected}e.addEventListener("input",(e=>{const n=e.target.options,a=-1===n.selectedIndex?"":n[n.selectedIndex].value;r.setValue(t,{value:a})}))}}static setAttributes(e){let{html:t,element:n,storage:r=null,intent:a,linkService:i}=e;const{attributes:s}=n,l=t instanceof HTMLAnchorElement;"radio"===s.type&&(s.name="".concat(s.name,"-").concat(a));for(const[o,c]of Object.entries(s))if(null!==c&&void 0!==c)switch(o){case"class":c.length&&t.setAttribute(o,c.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",c);break;case"style":Object.assign(t.style,c);break;case"textContent":t.textContent=c;break;default:(!l||"href"!==o&&"newWindow"!==o)&&t.setAttribute(o,c)}l&&i.addLinkAttributes(t,s.href,s.newWindow),r&&s.dataId&&this.setupStorage(t,s.dataId,n,r)}static render(e){const t=e.annotationStorage,n=e.linkService,a=e.xfaHtml,i=e.intent||"display",s=document.createElement(a.name);a.attributes&&this.setAttributes({html:s,element:a,intent:i,linkService:n});const l=[[a,-1,s]],o=e.div;if(o.append(s),e.viewport){const t="matrix(".concat(e.viewport.transform.join(","),")");o.style.transform=t}"richText"!==i&&o.setAttribute("class","xfaLayer xfaFont");const c=[];for(;l.length>0;){var d;const[e,a,s]=l.at(-1);if(a+1===e.children.length){l.pop();continue}const o=e.children[++l.at(-1)[1]];if(null===o)continue;const{name:u}=o;if("#text"===u){const e=document.createTextNode(o.value);c.push(e),s.append(e);continue}const h=null!==o&&void 0!==o&&null!==(d=o.attributes)&&void 0!==d&&d.xmlns?document.createElementNS(o.attributes.xmlns,u):document.createElement(u);if(s.append(h),o.attributes&&this.setAttributes({html:h,element:o,storage:t,intent:i,linkService:n}),o.children&&o.children.length>0)l.push([o,-1,h]);else if(o.value){const e=document.createTextNode(o.value);r.XfaText.shouldBuildText(u)&&c.push(e),h.append(e)}}for(const r of o.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))r.setAttribute("readOnly",!0);return{textDivs:c}}static update(e){const t="matrix(".concat(e.viewport.transform.join(","),")");e.div.style.transform=t,e.div.hidden=!1}}},(e,t,n)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.InkEditor=void 0;var a=n(1),i=n(4),s=n(29),l=n(6),o=n(5),c=new WeakMap,d=new WeakMap,u=new WeakMap,h=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,g=new WeakMap,v=new WeakMap,x=new WeakMap,b=new WeakMap,y=new WeakMap,w=new WeakMap,_=new WeakMap,S=new WeakSet;class P extends i.AnnotationEditor{constructor(e){super({...e,name:"inkEditor"}),_classPrivateMethodInitSpec(this,S),_classPrivateFieldInitSpec(this,c,0),_classPrivateFieldInitSpec(this,d,0),_classPrivateFieldInitSpec(this,u,this.canvasPointermove.bind(this)),_classPrivateFieldInitSpec(this,h,this.canvasPointerleave.bind(this)),_classPrivateFieldInitSpec(this,f,this.canvasPointerup.bind(this)),_classPrivateFieldInitSpec(this,p,this.canvasPointerdown.bind(this)),_classPrivateFieldInitSpec(this,m,new Path2D),_classPrivateFieldInitSpec(this,g,!1),_classPrivateFieldInitSpec(this,v,!1),_classPrivateFieldInitSpec(this,x,!1),_classPrivateFieldInitSpec(this,b,null),_classPrivateFieldInitSpec(this,y,0),_classPrivateFieldInitSpec(this,w,0),_classPrivateFieldInitSpec(this,_,null),this.color=e.color||null,this.thickness=e.thickness||null,this.opacity=e.opacity||null,this.paths=[],this.bezierPath2D=[],this.allRawPaths=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0,this._willKeepAspectRatio=!0}static initialize(e){i.AnnotationEditor.initialize(e,{strings:["editor_ink_canvas_aria_label","editor_ink2_aria_label"]})}static updateDefaultParams(e,t){switch(e){case a.AnnotationEditorParamsType.INK_THICKNESS:P._defaultThickness=t;break;case a.AnnotationEditorParamsType.INK_COLOR:P._defaultColor=t;break;case a.AnnotationEditorParamsType.INK_OPACITY:P._defaultOpacity=t/100}}updateParams(e,t){switch(e){case a.AnnotationEditorParamsType.INK_THICKNESS:_assertClassBrand(S,this,C).call(this,t);break;case a.AnnotationEditorParamsType.INK_COLOR:_assertClassBrand(S,this,A).call(this,t);break;case a.AnnotationEditorParamsType.INK_OPACITY:_assertClassBrand(S,this,k).call(this,t)}}static get defaultPropertiesToUpdate(){return[[a.AnnotationEditorParamsType.INK_THICKNESS,P._defaultThickness],[a.AnnotationEditorParamsType.INK_COLOR,P._defaultColor||i.AnnotationEditor._defaultLineColor],[a.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*P._defaultOpacity)]]}get propertiesToUpdate(){var e;return[[a.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||P._defaultThickness],[a.AnnotationEditorParamsType.INK_COLOR,this.color||P._defaultColor||i.AnnotationEditor._defaultLineColor],[a.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(null!==(e=this.opacity)&&void 0!==e?e:P._defaultOpacity))]]}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.canvas||(_assertClassBrand(S,this,G).call(this),_assertClassBrand(S,this,B).call(this)),this.isAttachedToDOM||(this.parent.add(this),_assertClassBrand(S,this,z).call(this)),_assertClassBrand(S,this,J).call(this)))}remove(){null!==this.canvas&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,_classPrivateFieldGet(b,this).disconnect(),_classPrivateFieldSet(b,this,null),super.remove())}setParent(e){!this.parent&&e?this._uiManager.removeShouldRescale(this):this.parent&&null===e&&this._uiManager.addShouldRescale(this),super.setParent(e)}onScaleChanging(){const[e,t]=this.parentDimensions,n=this.width*e,r=this.height*t;this.setDimensions(n,r)}enableEditMode(){_classPrivateFieldGet(g,this)||null===this.canvas||(super.enableEditMode(),this._isDraggable=!1,this.canvas.addEventListener("pointerdown",_classPrivateFieldGet(p,this)))}disableEditMode(){this.isInEditMode()&&null!==this.canvas&&(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",_classPrivateFieldGet(p,this)))}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}commit(){_classPrivateFieldGet(g,this)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),_classPrivateFieldSet(g,this,!0),this.div.classList.add("disabled"),_assertClassBrand(S,this,J).call(this,!0),this.makeResizable(),this.parent.addInkEditorIfNeeded(!0),this.moveInDOM(),this.div.focus({preventScroll:!0}))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),this.enableEditMode())}canvasPointerdown(e){0===e.button&&this.isInEditMode()&&!_classPrivateFieldGet(g,this)&&(this.setInForeground(),e.preventDefault(),"mouse"!==e.type&&this.div.focus(),_assertClassBrand(S,this,N).call(this,e.offsetX,e.offsetY))}canvasPointermove(e){e.preventDefault(),_assertClassBrand(S,this,F).call(this,e.offsetX,e.offsetY)}canvasPointerup(e){e.preventDefault(),_assertClassBrand(S,this,D).call(this,e)}canvasPointerleave(e){_assertClassBrand(S,this,D).call(this,e)}get isResizable(){return!this.isEmpty()&&_classPrivateFieldGet(g,this)}render(){if(this.div)return this.div;let e,t;this.width&&(e=this.x,t=this.y),super.render(),i.AnnotationEditor._l10nPromise.get("editor_ink2_aria_label").then((e=>{var t;return null===(t=this.div)||void 0===t?void 0:t.setAttribute("aria-label",e)}));const[n,r,a,s]=_assertClassBrand(S,this,j).call(this);if(this.setAt(n,r,0,0),this.setDims(a,s),_assertClassBrand(S,this,G).call(this),this.width){const[n,r]=this.parentDimensions;this.setAspectRatio(this.width*n,this.height*r),this.setAt(e*n,t*r,this.width*n,this.height*r),_classPrivateFieldSet(x,this,!0),_assertClassBrand(S,this,z).call(this),this.setDims(this.width*n,this.height*r),_assertClassBrand(S,this,O).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return _assertClassBrand(S,this,B).call(this),this.div}setDimensions(e,t){const n=Math.round(e),r=Math.round(t);if(_classPrivateFieldGet(y,this)===n&&_classPrivateFieldGet(w,this)===r)return;_classPrivateFieldSet(y,this,n),_classPrivateFieldSet(w,this,r),this.canvas.style.visibility="hidden";const[a,i]=this.parentDimensions;this.width=e/a,this.height=t/i,this.fixAndSetPosition(),_classPrivateFieldGet(g,this)&&_assertClassBrand(S,this,W).call(this,e,t),_assertClassBrand(S,this,z).call(this),_assertClassBrand(S,this,O).call(this),this.canvas.style.visibility="visible",this.fixDims()}static deserialize(e,t,n){if(e instanceof s.InkAnnotationElement)return null;const r=super.deserialize(e,t,n);r.thickness=e.thickness,r.color=a.Util.makeHexColor(...e.color),r.opacity=e.opacity;const[l,o]=r.pageDimensions,u=r.width*l,h=r.height*o,f=r.parentScale,p=e.thickness/2;_classPrivateFieldSet(g,r,!0),_classPrivateFieldSet(y,r,Math.round(u)),_classPrivateFieldSet(w,r,Math.round(h));const{paths:m,rect:v,rotation:x}=e;for(let{bezier:a}of m){a=V.call(P,a,v,x);const e=[];r.paths.push(e);let t=f*(a[0]-p),n=f*(a[1]-p);for(let r=2,s=a.length;r{this.thickness=e,_assertClassBrand(S,this,J).call(this)},undo:()=>{this.thickness=t,_assertClassBrand(S,this,J).call(this)},mustExec:!0,type:a.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}function A(e){const t=this.color;this.addCommands({cmd:()=>{this.color=e,_assertClassBrand(S,this,O).call(this)},undo:()=>{this.color=t,_assertClassBrand(S,this,O).call(this)},mustExec:!0,type:a.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function k(e){e/=100;const t=this.opacity;this.addCommands({cmd:()=>{this.opacity=e,_assertClassBrand(S,this,O).call(this)},undo:()=>{this.opacity=t,_assertClassBrand(S,this,O).call(this)},mustExec:!0,type:a.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}function j(){const{parentRotation:e,parentDimensions:[t,n]}=this;switch(e){case 90:return[0,n,n,t];case 180:return[t,n,t,n];case 270:return[t,0,n,t];default:return[0,0,t,n]}}function E(){const{ctx:e,color:t,opacity:n,thickness:r,parentScale:a,scaleFactor:i}=this;e.lineWidth=r*a/i,e.lineCap="round",e.lineJoin="round",e.miterLimit=10,e.strokeStyle="".concat(t).concat((0,o.opacityToHex)(n))}function N(e,t){var n;this.canvas.addEventListener("contextmenu",l.noContextMenu),this.canvas.addEventListener("pointerleave",_classPrivateFieldGet(h,this)),this.canvas.addEventListener("pointermove",_classPrivateFieldGet(u,this)),this.canvas.addEventListener("pointerup",_classPrivateFieldGet(f,this)),this.canvas.removeEventListener("pointerdown",_classPrivateFieldGet(p,this)),this.isEditing=!0,_classPrivateFieldGet(x,this)||(_classPrivateFieldSet(x,this,!0),_assertClassBrand(S,this,z).call(this),this.thickness||(this.thickness=r._defaultThickness),this.color||(this.color=r._defaultColor||i.AnnotationEditor._defaultLineColor),null!==(n=this.opacity)&&void 0!==n||(this.opacity=r._defaultOpacity)),this.currentPath.push([e,t]),_classPrivateFieldSet(v,this,!1),_assertClassBrand(S,this,E).call(this),_classPrivateFieldSet(_,this,(()=>{_assertClassBrand(S,this,R).call(this),_classPrivateFieldGet(_,this)&&window.requestAnimationFrame(_classPrivateFieldGet(_,this))})),window.requestAnimationFrame(_classPrivateFieldGet(_,this))}function F(e,t){const[n,r]=this.currentPath.at(-1);if(this.currentPath.length>1&&e===n&&t===r)return;const a=this.currentPath;let i=_classPrivateFieldGet(m,this);if(a.push([e,t]),_classPrivateFieldSet(v,this,!0),a.length<=2)return i.moveTo(...a[0]),void i.lineTo(e,t);3===a.length&&(_classPrivateFieldSet(m,this,i=new Path2D),i.moveTo(...a[0])),_assertClassBrand(S,this,I).call(this,i,...a.at(-3),...a.at(-2),e,t)}function T(){if(0===this.currentPath.length)return;const e=this.currentPath.at(-1);_classPrivateFieldGet(m,this).lineTo(...e)}function M(e,t){let n;if(_classPrivateFieldSet(_,this,null),e=Math.min(Math.max(e,0),this.canvas.width),t=Math.min(Math.max(t,0),this.canvas.height),_assertClassBrand(S,this,F).call(this,e,t),_assertClassBrand(S,this,T).call(this),1!==this.currentPath.length)n=_assertClassBrand(S,this,L).call(this);else{const r=[e,t];n=[[r,r.slice(),r.slice(),r]]}const r=_classPrivateFieldGet(m,this),a=this.currentPath;this.currentPath=[],_classPrivateFieldSet(m,this,new Path2D),this.addCommands({cmd:()=>{this.allRawPaths.push(a),this.paths.push(n),this.bezierPath2D.push(r),this.rebuild()},undo:()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),0===this.paths.length?this.remove():(this.canvas||(_assertClassBrand(S,this,G).call(this),_assertClassBrand(S,this,B).call(this)),_assertClassBrand(S,this,J).call(this))},mustExec:!0})}function R(){if(!_classPrivateFieldGet(v,this))return;_classPrivateFieldSet(v,this,!1);Math.ceil(this.thickness*this.parentScale);const e=this.currentPath.slice(-3),t=e.map((e=>e[0])),n=e.map((e=>e[1])),{ctx:r}=(Math.min(...t),Math.max(...t),Math.min(...n),Math.max(...n),this);r.save(),r.clearRect(0,0,this.canvas.width,this.canvas.height);for(const a of this.bezierPath2D)r.stroke(a);r.stroke(_classPrivateFieldGet(m,this)),r.restore()}function I(e,t,n,r,a,i,s){const l=(t+r)/2,o=(n+a)/2,c=(r+i)/2,d=(a+s)/2;e.bezierCurveTo(l+2*(r-l)/3,o+2*(a-o)/3,c+2*(r-c)/3,d+2*(a-d)/3,c,d)}function L(){const e=this.currentPath;if(e.length<=2)return[[e[0],e[0],e.at(-1),e.at(-1)]];const t=[];let n,[r,a]=e[0];for(n=1;ni(o,n))ci(d,o)?(e[r]=d,e[c]=n,r=c):(e[r]=o,e[l]=n,r=l);else{if(!(ci(d,n)))break e;e[r]=d,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var l=Date,o=l.now();t.unstable_now=function(){return l.now()-o}}var c=[],d=[],u=1,h=null,f=3,p=!1,m=!1,g=!1,v="function"===typeof setTimeout?setTimeout:null,x="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof setImmediate?setImmediate:null;function y(e){for(var t=r(d);null!==t;){if(null===t.callback)a(d);else{if(!(t.startTime<=e))break;a(d),t.sortIndex=t.expirationTime,n(c,t)}t=r(d)}}function w(e){if(g=!1,y(e),!m)if(null!==r(c))m=!0,M(_);else{var t=r(d);null!==t&&R(w,t.startTime-e)}}function _(e,n){m=!1,g&&(g=!1,x(A),A=-1),p=!0;var i=f;try{for(y(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!E());){var s=h.callback;if("function"===typeof s){h.callback=null,f=h.priorityLevel;var l=s(h.expirationTime<=n);n=t.unstable_now(),"function"===typeof l?h.callback=l:h===r(c)&&a(c),y(n)}else a(c);h=r(c)}if(null!==h)var o=!0;else{var u=r(d);null!==u&&R(w,u.startTime-n),o=!1}return o}finally{h=null,f=i,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,P=!1,C=null,A=-1,k=5,j=-1;function E(){return!(t.unstable_now()-j0?a[a.length-1][4]:n;break;default:r.push(t)}return n}(function(e){for(var t,n,r=[],a=0,i=e.length;a"===s?l=this.renderPartial(i,t,n,a):"&"===s?l=this.unescapedValue(i,t):"name"===s?l=this.escapedValue(i,t,a):"text"===s&&(l=this.rawValue(i)),void 0!==l&&(o+=l);return o},As.prototype.renderSection=function(e,t,n,r,a){var i=this,s="",l=t.lookup(e[1]);if(l){if(us(l))for(var o=0,c=l.length;o=N)return L(!0);break}h.push({type:\"Quotes\",code:\"InvalidQuotes\",message:\"Trailing quote on quoted field is malformed\",row:u.length,index:W}),S++}}else S++}return T();function I(e){u.push(e),d=W}function A(e){var t=0;if(-1!==e){var r=i.substring(S+1,e);r&&\"\"===r.trim()&&(t=r.length)}return t}function T(e){return r||(void 0===e&&(e=i.substring(W)),f.push(e),W=n,I(f),o&&F()),L()}function D(e){W=e,I(f),f=[],R=i.indexOf(P,W)}function L(e){return{data:u,errors:h,meta:{delimiter:M,linebreak:P,aborted:H,truncated:!!e,cursor:d+(t||0)}}}function F(){q(L()),u=[],h=[]}},this.abort=function(){H=!0},this.getCharIndex=function(){return W}}function _(e){var t=e.data,r=a[t.workerId],i=!1;if(t.error)r.userError(t.error,t.file);else if(t.results&&t.results.data){var n={abort:function(){i=!0,m(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:y,resume:y};if(J(r.userStep)){for(var s=0;s