From cc68847fa1c708f4ba4562640434dfb7cfb82686 Mon Sep 17 00:00:00 2001 From: wangyu <727842003@qq.com> Date: Tue, 30 Jan 2024 08:54:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/dist/assets/ImageViewer-b2513ebd.css | 9 ++ public/dist/assets/ImageViewer-ed99ad9c.js | 9 ++ public/dist/assets/MarkdownViewer-52070412.js | 45 ++++++++ .../dist/assets/MarkdownViewer-86c94709.css | 1 + public/dist/assets/PdfView-3f48c404.js | 15 +++ public/dist/assets/PdfView-89e0fbd8.css | 1 + public/dist/assets/PptxRender-5a3debe6.js | 47 ++++++++ public/dist/assets/PptxRender-846be824.css | 9 ++ public/dist/assets/XlsxTable-0a398d95.js | 102 ++++++++++++++++++ public/dist/assets/XlsxTable-5454e362.css | 41 +++++++ .../_commonjs-dynamic-modules-302442b1.js | 1 + public/dist/assets/docx-preview-1cf76835.js | 27 +++++ public/dist/assets/index-b9d6ea81.css | 1 + public/dist/assets/index-be50c070.js | 27 +++++ public/dist/assets/loading-43b144a3.gif | Bin 0 -> 48413 bytes public/dist/assets/pdf.worker-2ce04d0b.js | 58 ++++++++++ public/dist/assets/pptx.worker-a9caaa79.js | 21 ++++ public/dist/assets/sheet.worker-d79186a2.js | 38 +++++++ public/dist/assets/worker-ref-b3abaee8.js | 1 + public/dist/assets/xlsx-08add3c8.png | Bin 0 -> 15131 bytes public/dist/assets/xlsx.worker-9278a0aa.js | 62 +++++++++++ public/dist/favicon.ico | Bin 0 -> 4286 bytes public/dist/index.html | 15 +++ 23 files changed, 530 insertions(+) create mode 100644 public/dist/assets/ImageViewer-b2513ebd.css create mode 100644 public/dist/assets/ImageViewer-ed99ad9c.js create mode 100644 public/dist/assets/MarkdownViewer-52070412.js create mode 100644 public/dist/assets/MarkdownViewer-86c94709.css create mode 100644 public/dist/assets/PdfView-3f48c404.js create mode 100644 public/dist/assets/PdfView-89e0fbd8.css create mode 100644 public/dist/assets/PptxRender-5a3debe6.js create mode 100644 public/dist/assets/PptxRender-846be824.css create mode 100644 public/dist/assets/XlsxTable-0a398d95.js create mode 100644 public/dist/assets/XlsxTable-5454e362.css create mode 100644 public/dist/assets/_commonjs-dynamic-modules-302442b1.js create mode 100644 public/dist/assets/docx-preview-1cf76835.js create mode 100644 public/dist/assets/index-b9d6ea81.css create mode 100644 public/dist/assets/index-be50c070.js create mode 100644 public/dist/assets/loading-43b144a3.gif create mode 100644 public/dist/assets/pdf.worker-2ce04d0b.js create mode 100644 public/dist/assets/pptx.worker-a9caaa79.js create mode 100644 public/dist/assets/sheet.worker-d79186a2.js create mode 100644 public/dist/assets/worker-ref-b3abaee8.js create mode 100644 public/dist/assets/xlsx-08add3c8.png create mode 100644 public/dist/assets/xlsx.worker-9278a0aa.js create mode 100644 public/dist/favicon.ico create mode 100644 public/dist/index.html diff --git a/public/dist/assets/ImageViewer-b2513ebd.css b/public/dist/assets/ImageViewer-b2513ebd.css new file mode 100644 index 0000000..00a884d --- /dev/null +++ b/public/dist/assets/ImageViewer-b2513ebd.css @@ -0,0 +1,9 @@ +/*! + * Viewer.js v1.11.6 + * https://fengyuanchen.github.io/viewerjs + * + * Copyright 2015-present Chen Fengyuan + * Released under the MIT license + * + * Date: 2023-09-17T03:16:35.830Z + */.viewer-zoom-in:before,.viewer-zoom-out:before,.viewer-one-to-one:before,.viewer-reset:before,.viewer-prev:before,.viewer-play:before,.viewer-next:before,.viewer-rotate-left:before,.viewer-rotate-right:before,.viewer-flip-horizontal:before,.viewer-flip-vertical:before,.viewer-fullscreen:before,.viewer-fullscreen-exit:before,.viewer-close:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAAUCAYAAABWOyJDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAQPSURBVHic7Zs/iFxVFMa/0U2UaJGksUgnIVhYxVhpjDbZCBmLdAYECxsRFBTUamcXUiSNncgKQbSxsxH8gzAP3FU2jY0kKKJNiiiIghFlccnP4p3nPCdv3p9778vsLOcHB2bfveeb7955c3jvvNkBIMdxnD64a94GHMfZu3iBcRynN7zAOI7TG15gHCeeNUkr8zaxG2lbYDYsdgMbktBsP03jdQwljSXdtBhLOmtjowC9Mg9L+knSlcD8TNKpSA9lBpK2JF2VdDSR5n5J64m0qli399hNFMUlpshQii5jbXTbHGviB0nLNeNDSd9VO4A2UdB2fp+x0eCnaXxWXGA2X0au/3HgN9P4LFCjIANOJdrLr0zzZ+BEpNYDwKbpnQMeAw4m8HjQtM6Z9qa917zPQwFr3M5KgA6J5rTJCdFZJj9/lyvGhsDvwFNVuV2MhhjrK6b9bFiE+j1r87eBl4HDwCF7/U/k+ofAX5b/EXBv5JoLMuILzf3Ap6Z3EzgdqHMCuF7hcQf4HDgeoHnccncqdK/TvSDWffFXI/exICY/xZyqc6XLWF1UFZna4gJ7q8BsRvgd2/xXpo6P+D9dfT7PpECtA3cnWPM0GXGFZh/wgWltA+cDNC7X+AP4GzjZQe+k5dRxuYPeiuXU7e1qwLpDz7dFjXKRaSwuMLvAlG8zZlG+YmiK1HoFqT7wP2z+4Q45TfEGcMt01xLoNZEBTwRqD4BLpnMLeC1A41UmVxsXgXeBayV/Wx20rpTyrpnWRft7p6O/FdqzGrDukPNtkaMoMo3FBdBSQMOnYBCReyf05s126fU9ytfX98+mY54Kxnp7S9K3kj6U9KYdG0h6UdLbkh7poFXMfUnSOyVvL0h6VtIXHbS6nOP+s/Zm9mvyXW1uuC9ohZ72E9uDmXWLJOB1GxsH+DxPftsB8B6wlGDN02TAkxG6+4D3TWsbeC5CS8CDFce+AW500LhhOW2020TRjK3b21HEmgti9m0RonxbdMZeVzV+/4tF3cBpP7E9mKHNL5q8h5g0eYsCMQz0epq8gQrwMXAgcs0FGXGFRcB9wCemF9PkbYqM/Bas7fxLwNeJPdTdpo4itQti8lPMqTpXuozVRVXPpbHI3KkNTB1NfkL81j2mvhDp91HgV9MKuRIqrykj3WPq4rHyL+axj8/qGPmTqi6F9YDlHOvJU6oYcTsh/TYSzWmTE6JT19CtLTJt32D6CmHe0eQn1O8z5AXgT4sx4Vcu0/EQecMydB8z0hUWkTd2t4CrwNEePqMBcAR4mrBbwyXLPWJa8zrXmmLEhNBmfpkuY2102xxrih+pb+ieAb6vGhuA97UcJ5KR8gZ77K+99xxeYBzH6Q3/Z0fHcXrDC4zjOL3hBcZxnN74F+zlvXFWXF9PAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-size:280px;color:transparent;display:block;font-size:0;height:20px;line-height:0;width:20px}.viewer-zoom-in:before{background-position:0 0;content:"Zoom In"}.viewer-zoom-out:before{background-position:-20px 0;content:"Zoom Out"}.viewer-one-to-one:before{background-position:-40px 0;content:"One to One"}.viewer-reset:before{background-position:-60px 0;content:"Reset"}.viewer-prev:before{background-position:-80px 0;content:"Previous"}.viewer-play:before{background-position:-100px 0;content:"Play"}.viewer-next:before{background-position:-120px 0;content:"Next"}.viewer-rotate-left:before{background-position:-140px 0;content:"Rotate Left"}.viewer-rotate-right:before{background-position:-160px 0;content:"Rotate Right"}.viewer-flip-horizontal:before{background-position:-180px 0;content:"Flip Horizontal"}.viewer-flip-vertical:before{background-position:-200px 0;content:"Flip Vertical"}.viewer-fullscreen:before{background-position:-220px 0;content:"Enter Full Screen"}.viewer-fullscreen-exit:before{background-position:-240px 0;content:"Exit Full Screen"}.viewer-close:before{background-position:-260px 0;content:"Close"}.viewer-container{bottom:0;direction:ltr;font-size:0;left:0;line-height:0;overflow:hidden;position:absolute;right:0;-webkit-tap-highlight-color:transparent;top:0;-ms-touch-action:none;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.viewer-container::-moz-selection,.viewer-container *::-moz-selection{background-color:transparent}.viewer-container::selection,.viewer-container *::selection{background-color:transparent}.viewer-container:focus{outline:0}.viewer-container img{display:block;height:auto;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.viewer-canvas{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.viewer-canvas>img{height:auto;margin:15px auto;max-width:90%!important;width:auto}.viewer-footer{bottom:0;left:0;overflow:hidden;position:absolute;right:0;text-align:center}.viewer-navbar{background-color:#00000080;overflow:hidden}.viewer-list{box-sizing:content-box;height:50px;margin:0;overflow:hidden;padding:1px 0}.viewer-list>li{color:transparent;cursor:pointer;float:left;font-size:0;height:50px;line-height:0;opacity:.5;overflow:hidden;transition:opacity .15s;width:30px}.viewer-list>li:focus,.viewer-list>li:hover{opacity:.75}.viewer-list>li:focus{outline:0}.viewer-list>li+li{margin-left:1px}.viewer-list>.viewer-loading{position:relative}.viewer-list>.viewer-loading:after{border-width:2px;height:20px;margin-left:-10px;margin-top:-10px;width:20px}.viewer-list>.viewer-active,.viewer-list>.viewer-active:focus,.viewer-list>.viewer-active:hover{opacity:1}.viewer-player{background-color:#000;bottom:0;cursor:none;display:none;left:0;position:absolute;right:0;top:0;z-index:1}.viewer-player>img{left:0;position:absolute;top:0}.viewer-toolbar>ul{display:inline-block;margin:0 auto 5px;overflow:hidden;padding:6px 3px}.viewer-toolbar>ul>li{background-color:#00000080;border-radius:50%;cursor:pointer;float:left;height:24px;overflow:hidden;transition:background-color .15s;width:24px}.viewer-toolbar>ul>li:focus,.viewer-toolbar>ul>li:hover{background-color:#000c}.viewer-toolbar>ul>li:focus{box-shadow:0 0 3px #fff;outline:0;position:relative;z-index:1}.viewer-toolbar>ul>li:before{margin:2px}.viewer-toolbar>ul>li+li{margin-left:1px}.viewer-toolbar>ul>.viewer-small{height:18px;margin-bottom:3px;margin-top:3px;width:18px}.viewer-toolbar>ul>.viewer-small:before{margin:-1px}.viewer-toolbar>ul>.viewer-large{height:30px;margin-bottom:-3px;margin-top:-3px;width:30px}.viewer-toolbar>ul>.viewer-large:before{margin:5px}.viewer-tooltip{background-color:#000c;border-radius:10px;color:#fff;display:none;font-size:12px;height:20px;left:50%;line-height:20px;margin-left:-25px;margin-top:-10px;position:absolute;text-align:center;top:50%;width:50px}.viewer-title{color:#ccc;display:inline-block;font-size:12px;line-height:1.2;margin:5px 5%;max-width:90%;min-height:14px;opacity:.8;overflow:hidden;text-overflow:ellipsis;transition:opacity .15s;white-space:nowrap}.viewer-title:hover{opacity:1}.viewer-button{-webkit-app-region:no-drag;background-color:#00000080;border-radius:50%;cursor:pointer;height:80px;overflow:hidden;position:absolute;right:-40px;top:-40px;transition:background-color .15s;width:80px}.viewer-button:focus,.viewer-button:hover{background-color:#000c}.viewer-button:focus{box-shadow:0 0 3px #fff;outline:0}.viewer-button:before{bottom:15px;left:15px;position:absolute}.viewer-fixed{position:fixed}.viewer-open{overflow:hidden}.viewer-show{display:block}.viewer-hide{display:none}.viewer-backdrop{background-color:#00000080}.viewer-invisible{visibility:hidden}.viewer-move{cursor:move;cursor:grab}.viewer-fade{opacity:0}.viewer-in{opacity:1}.viewer-transition{transition:all .3s}@keyframes viewer-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.viewer-loading:after{animation:viewer-spinner 1s linear infinite;border:4px solid rgba(255,255,255,.1);border-left-color:#ffffff80;border-radius:50%;content:"";display:inline-block;height:40px;left:50%;margin-left:-20px;margin-top:-20px;position:absolute;top:50%;width:40px;z-index:1}@media (max-width: 767px){.viewer-hide-xs-down{display:none}}@media (max-width: 991px){.viewer-hide-sm-down{display:none}}@media (max-width: 1199px){.viewer-hide-md-down{display:none}}.image[data-v-b0f61c51]{display:block;width:auto;height:100%;margin:0 auto} diff --git a/public/dist/assets/ImageViewer-ed99ad9c.js b/public/dist/assets/ImageViewer-ed99ad9c.js new file mode 100644 index 0000000..44360cb --- /dev/null +++ b/public/dist/assets/ImageViewer-ed99ad9c.js @@ -0,0 +1,9 @@ +import{d as Se,r as qe,w as Tt,p as Ot,o as Ue,f as Be,a as ft,b as At,e as Ze,h as $e,y as Ke,z as Ge,u as Qe,n as Je,F as ti,_ as ei}from"./index-be50c070.js";/*! + * Viewer.js v1.11.6 + * https://fengyuanchen.github.io/viewerjs + * + * Copyright 2015-present Chen Fengyuan + * Released under the MIT license + * + * Date: 2023-09-17T03:16:38.052Z + */function Yt(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),i.push.apply(i,n)}return i}function kt(e){for(var t=1;t
',yt=typeof window<"u"&&typeof window.document<"u",P=yt?window:{},K=yt&&P.document.documentElement?"ontouchstart"in P.document.documentElement:!1,zt=yt?"PointerEvent"in P:!1,v="viewer",dt="move",_e="switch",it="zoom",lt="".concat(v,"-active"),si="".concat(v,"-close"),vt="".concat(v,"-fade"),It="".concat(v,"-fixed"),li="".concat(v,"-fullscreen"),Ht="".concat(v,"-fullscreen-exit"),W="".concat(v,"-hide"),ui="".concat(v,"-hide-md-down"),ci="".concat(v,"-hide-sm-down"),hi="".concat(v,"-hide-xs-down"),k="".concat(v,"-in"),nt="".concat(v,"-invisible"),G="".concat(v,"-loading"),fi="".concat(v,"-move"),qt="".concat(v,"-open"),q="".concat(v,"-show"),x="".concat(v,"-transition"),Q="click",Nt="dblclick",Ut="dragstart",Bt="focusin",Zt="keydown",z="load",X="error",di=K?"touchend touchcancel":"mouseup",vi=K?"touchmove":"mousemove",mi=K?"touchstart":"mousedown",$t=zt?"pointerdown":mi,Kt=zt?"pointermove":vi,Gt=zt?"pointerup pointercancel":di,Qt="resize",j="transitionend",Jt="wheel",te="ready",ee="show",ie="shown",ne="hide",re="hidden",ae="view",at="viewed",oe="move",se="moved",le="rotate",ue="rotated",ce="scale",he="scaled",fe="zoom",de="zoomed",ve="play",me="stop",gt="".concat(v,"Action"),jt=/\s\s*/,ut=["zoom-in","zoom-out","one-to-one","reset","prev","play","next","rotate-left","rotate-right","flip-horizontal","flip-vertical"];function ot(e){return typeof e=="string"}var gi=Number.isNaN||P.isNaN;function O(e){return typeof e=="number"&&!gi(e)}function B(e){return typeof e>"u"}function J(e){return Dt(e)==="object"&&e!==null}var pi=Object.prototype.hasOwnProperty;function Z(e){if(!J(e))return!1;try{var t=e.constructor,i=t.prototype;return t&&i&&pi.call(i,"isPrototypeOf")}catch{return!1}}function p(e){return typeof e=="function"}function y(e,t){if(e&&p(t))if(Array.isArray(e)||O(e.length)){var i=e.length,n;for(n=0;n1?i-1:0),r=1;r0&&n.forEach(function(a){J(a)&&Object.keys(a).forEach(function(o){t[o]=a[o]})}),t},bi=/^(?:width|height|left|top|marginLeft|marginTop)$/;function L(e,t){var i=e.style;y(t,function(n,r){bi.test(r)&&O(n)&&(n+="px"),i[r]=n})}function yi(e){return ot(e)?e.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">"):e}function U(e,t){return!e||!t?!1:e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function f(e,t){if(!(!e||!t)){if(O(e.length)){y(e,function(n){f(n,t)});return}if(e.classList){e.classList.add(t);return}var i=e.className.trim();i?i.indexOf(t)<0&&(e.className="".concat(i," ").concat(t)):e.className=t}}function g(e,t){if(!(!e||!t)){if(O(e.length)){y(e,function(i){g(i,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function st(e,t,i){if(t){if(O(e.length)){y(e,function(n){st(n,t,i)});return}i?f(e,t):g(e,t)}}var wi=/([a-z\d])([A-Z])/g;function Lt(e){return e.replace(wi,"$1-$2").toLowerCase()}function $(e,t){return J(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(Lt(t)))}function Ct(e,t,i){J(i)?e[t]=i:e.dataset?e.dataset[t]=i:e.setAttribute("data-".concat(Lt(t)),i)}var Ae=function(){var e=!1;if(yt){var t=!1,i=function(){},n=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(a){t=a}});P.addEventListener("test",i,n),P.removeEventListener("test",i,n)}return e}();function b(e,t,i){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},r=i;t.trim().split(jt).forEach(function(a){if(!Ae){var o=e.listeners;o&&o[a]&&o[a][i]&&(r=o[a][i],delete o[a][i],Object.keys(o[a]).length===0&&delete o[a],Object.keys(o).length===0&&delete e.listeners)}e.removeEventListener(a,r,n)})}function d(e,t,i){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},r=i;t.trim().split(jt).forEach(function(a){if(n.once&&!Ae){var o=e.listeners,s=o===void 0?{}:o;r=function(){delete s[a][i],e.removeEventListener(a,r,n);for(var l=arguments.length,u=new Array(l),h=0;hs?D=s/_:T=c*_,S=O(S)?S:.9,T=Math.min(T*S,h),D=Math.min(D*S,m);var I=(s-T)/2,N=(c-D)/2,E={left:I,top:N,x:I,y:N,width:T,height:D,oldRatio:1,ratio:T/h,aspectRatio:_,naturalWidth:h,naturalHeight:m},R=C({},E);n.rotatable&&(E.rotate=l.rotate||0,R.rotate=0),n.scalable&&(E.scaleX=l.scaleX||1,E.scaleY=l.scaleY||1,R.scaleX=1,R.scaleY=1),i.imageData=E,i.initialImageData=R,t&&t()})},renderImage:function(t){var i=this,n=this.image,r=this.imageData;if(L(n,C({width:r.width,height:r.height,marginLeft:r.x,marginTop:r.y},mt(r))),t)if((this.viewing||this.moving||this.rotating||this.scaling||this.zooming)&&this.options.transition&&U(n,x)){var a=function(){i.imageRendering=!1,t()};this.imageRendering={abort:function(){b(n,j,a)}},d(n,j,a,{once:!0})}else t()},resetImage:function(){var t=this.image;t&&(this.viewing&&this.viewing.abort(),t.parentNode.removeChild(t),this.image=null,this.title.innerHTML="")}},_i={bind:function(){var t=this.options,i=this.viewer,n=this.canvas,r=this.element.ownerDocument;d(i,Q,this.onClick=this.click.bind(this)),d(i,Ut,this.onDragStart=this.dragstart.bind(this)),d(n,$t,this.onPointerDown=this.pointerdown.bind(this)),d(r,Kt,this.onPointerMove=this.pointermove.bind(this)),d(r,Gt,this.onPointerUp=this.pointerup.bind(this)),d(r,Zt,this.onKeyDown=this.keydown.bind(this)),d(window,Qt,this.onResize=this.resize.bind(this)),t.zoomable&&t.zoomOnWheel&&d(i,Jt,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),t.toggleOnDblclick&&d(n,Nt,this.onDblclick=this.dblclick.bind(this))},unbind:function(){var t=this.options,i=this.viewer,n=this.canvas,r=this.element.ownerDocument;b(i,Q,this.onClick),b(i,Ut,this.onDragStart),b(n,$t,this.onPointerDown),b(r,Kt,this.onPointerMove),b(r,Gt,this.onPointerUp),b(r,Zt,this.onKeyDown),b(window,Qt,this.onResize),t.zoomable&&t.zoomOnWheel&&b(i,Jt,this.onWheel,{passive:!1,capture:!0}),t.toggleOnDblclick&&b(n,Nt,this.onDblclick)}},Ai={click:function(t){var i=this.options,n=this.imageData,r=t.target,a=$(r,gt);switch(!a&&r.localName==="img"&&r.parentElement.localName==="li"&&(r=r.parentElement,a=$(r,gt)),K&&t.isTrusted&&r===this.canvas&&clearTimeout(this.clickCanvasTimeout),a){case"mix":this.played?this.stop():i.inline?this.fulled?this.exit():this.full():this.hide();break;case"hide":this.pointerMoved||this.hide();break;case"view":this.view($(r,"index"));break;case"zoom-in":this.zoom(.1,!0);break;case"zoom-out":this.zoom(-.1,!0);break;case"one-to-one":this.toggle();break;case"reset":this.reset();break;case"prev":this.prev(i.loop);break;case"play":this.play(i.fullscreen);break;case"next":this.next(i.loop);break;case"rotate-left":this.rotate(-90);break;case"rotate-right":this.rotate(90);break;case"flip-horizontal":this.scaleX(-n.scaleX||-1);break;case"flip-vertical":this.scaleY(-n.scaleY||-1);break;default:this.played&&this.stop()}},dblclick:function(t){t.preventDefault(),this.viewed&&t.target===this.image&&(K&&t.isTrusted&&clearTimeout(this.doubleClickImageTimeout),this.toggle(t.isTrusted?t:t.detail&&t.detail.originalEvent))},load:function(){var t=this;this.timeout&&(clearTimeout(this.timeout),this.timeout=!1);var i=this.element,n=this.options,r=this.image,a=this.index,o=this.viewerData;g(r,nt),n.loading&&g(this.canvas,G),r.style.cssText="height:0;"+"margin-left:".concat(o.width/2,"px;")+"margin-top:".concat(o.height/2,"px;")+"max-width:none!important;position:relative;width:0;",this.initImage(function(){st(r,fi,n.movable),st(r,x,n.transition),t.renderImage(function(){t.viewed=!0,t.viewing=!1,p(n.viewed)&&d(i,at,n.viewed,{once:!0}),A(i,at,{originalImage:t.images[a],index:a,image:r},{cancelable:!1})})})},loadImage:function(t){var i=t.target,n=i.parentNode,r=n.offsetWidth||30,a=n.offsetHeight||50,o=!!$(i,"filled");De(i,this.options,function(s,c){var l=s/c,u=r,h=a;a*l>r?o?u=a*l:h=r/l:o?h=r/l:u=a*l,L(i,C({width:u,height:h},mt({translateX:(r-u)/2,translateY:(a-h)/2})))})},keydown:function(t){var i=this.options;if(i.keyboard){var n=t.keyCode||t.which||t.charCode;switch(n){case 13:this.viewer.contains(t.target)&&this.click(t);break}if(this.fulled)switch(n){case 27:this.played?this.stop():i.inline?this.fulled&&this.exit():this.hide();break;case 32:this.played&&this.stop();break;case 37:this.played&&this.playing?this.playing.prev():this.prev(i.loop);break;case 38:t.preventDefault(),this.zoom(i.zoomRatio,!0);break;case 39:this.played&&this.playing?this.playing.next():this.next(i.loop);break;case 40:t.preventDefault(),this.zoom(-i.zoomRatio,!0);break;case 48:case 49:t.ctrlKey&&(t.preventDefault(),this.toggle());break}}},dragstart:function(t){t.target.localName==="img"&&t.preventDefault()},pointerdown:function(t){var i=this.options,n=this.pointers,r=t.buttons,a=t.button;if(this.pointerMoved=!1,!(!this.viewed||this.showing||this.viewing||this.hiding||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(O(r)&&r!==1||O(a)&&a!==0||t.ctrlKey))){t.preventDefault(),t.changedTouches?y(t.changedTouches,function(s){n[s.identifier]=ht(s)}):n[t.pointerId||0]=ht(t);var o=i.movable?dt:!1;i.zoomOnTouch&&i.zoomable&&Object.keys(n).length>1?o=it:i.slideOnTouch&&(t.pointerType==="touch"||t.type==="touchstart")&&this.isSwitchable()&&(o=_e),i.transition&&(o===dt||o===it)&&g(this.image,x),this.action=o}},pointermove:function(t){var i=this.pointers,n=this.action;!this.viewed||!n||(t.preventDefault(),t.changedTouches?y(t.changedTouches,function(r){C(i[r.identifier]||{},ht(r,!0))}):C(i[t.pointerId||0]||{},ht(t,!0)),this.change(t))},pointerup:function(t){var i=this,n=this.options,r=this.action,a=this.pointers,o;t.changedTouches?y(t.changedTouches,function(s){o=a[s.identifier],delete a[s.identifier]}):(o=a[t.pointerId||0],delete a[t.pointerId||0]),r&&(t.preventDefault(),n.transition&&(r===dt||r===it)&&f(this.image,x),this.action=!1,K&&r!==it&&o&&Date.now()-o.timeStamp<500&&(clearTimeout(this.clickCanvasTimeout),clearTimeout(this.doubleClickImageTimeout),n.toggleOnDblclick&&this.viewed&&t.target===this.image?this.imageClicked?(this.imageClicked=!1,this.doubleClickImageTimeout=setTimeout(function(){A(i.image,Nt,{originalEvent:t})},50)):(this.imageClicked=!0,this.doubleClickImageTimeout=setTimeout(function(){i.imageClicked=!1},500)):(this.imageClicked=!1,n.backdrop&&n.backdrop!=="static"&&t.target===this.canvas&&(this.clickCanvasTimeout=setTimeout(function(){A(i.canvas,Q,{originalEvent:t})},50)))))},resize:function(){var t=this;if(!(!this.isShown||this.hiding)&&(this.fulled&&(this.close(),this.initBody(),this.open()),this.initContainer(),this.initViewer(),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){t.renderImage()}),this.played)){if(this.options.fullscreen&&this.fulled&&!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)){this.stop();return}y(this.player.getElementsByTagName("img"),function(i){d(i,z,t.loadImage.bind(t),{once:!0}),A(i,z)})}},wheel:function(t){var i=this;if(this.viewed&&(t.preventDefault(),!this.wheeling)){this.wheeling=!0,setTimeout(function(){i.wheeling=!1},50);var n=Number(this.options.zoomRatio)||.1,r=1;t.deltaY?r=t.deltaY>0?1:-1:t.wheelDelta?r=-t.wheelDelta/120:t.detail&&(r=t.detail>0?1:-1),this.zoom(-r*n,!0,null,t)}}},Di={show:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=this.element,n=this.options;if(n.inline||this.showing||this.isShown||this.showing)return this;if(!this.ready)return this.build(),this.ready&&this.show(t),this;if(p(n.show)&&d(i,ee,n.show,{once:!0}),A(i,ee)===!1||!this.ready)return this;this.hiding&&this.transitioning.abort(),this.showing=!0,this.open();var r=this.viewer;if(g(r,W),r.setAttribute("role","dialog"),r.setAttribute("aria-labelledby",this.title.id),r.setAttribute("aria-modal",!0),r.removeAttribute("aria-hidden"),n.transition&&!t){var a=this.shown.bind(this);this.transitioning={abort:function(){b(r,j,a),g(r,k)}},f(r,x),r.initialOffsetWidth=r.offsetWidth,d(r,j,a,{once:!0}),f(r,k)}else f(r,k),this.shown();return this},hide:function(){var t=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.element,r=this.options;if(r.inline||this.hiding||!(this.isShown||this.showing))return this;if(p(r.hide)&&d(n,ne,r.hide,{once:!0}),A(n,ne)===!1)return this;this.showing&&this.transitioning.abort(),this.hiding=!0,this.played?this.stop():this.viewing&&this.viewing.abort();var a=this.viewer,o=this.image,s=function(){g(a,k),t.hidden()};if(r.transition&&!i){var c=function u(h){h&&h.target===a&&(b(a,j,u),t.hidden())},l=function(){U(a,x)?(d(a,j,c),g(a,k)):s()};this.transitioning={abort:function(){t.viewed&&U(o,x)?b(o,j,l):U(a,x)&&b(a,j,c)}},this.viewed&&U(o,x)?(d(o,j,l,{once:!0}),this.zoomTo(0,!1,null,null,!0)):l()}else s();return this},view:function(){var t=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.initialViewIndex;if(i=Number(i)||0,this.hiding||this.played||i<0||i>=this.length||this.viewed&&i===this.index)return this;if(!this.isShown)return this.index=i,this.show();this.viewing&&this.viewing.abort();var n=this.element,r=this.options,a=this.title,o=this.canvas,s=this.items[i],c=s.querySelector("img"),l=$(c,"originalUrl"),u=c.getAttribute("alt"),h=document.createElement("img");if(y(r.inheritedAttributes,function(D){var I=c.getAttribute(D);I!==null&&h.setAttribute(D,I)}),h.src=l,h.alt=u,p(r.view)&&d(n,ae,r.view,{once:!0}),A(n,ae,{originalImage:this.images[i],index:i,image:h})===!1||!this.isShown||this.hiding||this.played)return this;var m=this.items[this.index];m&&(g(m,lt),m.removeAttribute("aria-selected")),f(s,lt),s.setAttribute("aria-selected",!0),r.focus&&s.focus(),this.image=h,this.viewed=!1,this.index=i,this.imageData={},f(h,nt),r.loading&&f(o,G),o.innerHTML="",o.appendChild(h),this.renderList(),a.innerHTML="";var _=function(){var I=t.imageData,N=Array.isArray(r.title)?r.title[1]:r.title;a.innerHTML=yi(p(N)?N.call(t,h,I):"".concat(u," (").concat(I.naturalWidth," × ").concat(I.naturalHeight,")"))},S,T;return d(n,at,_,{once:!0}),this.viewing={abort:function(){b(n,at,_),h.complete?t.imageRendering?t.imageRendering.abort():t.imageInitializing&&t.imageInitializing.abort():(h.src="",b(h,z,S),t.timeout&&clearTimeout(t.timeout))}},h.complete?this.load():(d(h,z,S=function(){b(h,X,T),t.load()},{once:!0}),d(h,X,T=function(){b(h,z,S),t.timeout&&(clearTimeout(t.timeout),t.timeout=!1),g(h,nt),r.loading&&g(t.canvas,G)},{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){g(h,nt),t.timeout=!1},1e3)),this},prev:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=this.index-1;return i<0&&(i=t?this.length-1:0),this.view(i),this},next:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=this.length-1,n=this.index+1;return n>i&&(n=t?0:i),this.view(n),this},move:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=this.imageData;return this.moveTo(B(t)?t:n.x+Number(t),B(i)?i:n.y+Number(i)),this},moveTo:function(t){var i=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=this.element,o=this.options,s=this.imageData;if(t=Number(t),n=Number(n),this.viewed&&!this.played&&o.movable){var c=s.x,l=s.y,u=!1;if(O(t)?u=!0:t=c,O(n)?u=!0:n=l,u){if(p(o.move)&&d(a,oe,o.move,{once:!0}),A(a,oe,{x:t,y:n,oldX:c,oldY:l,originalEvent:r})===!1)return this;s.x=t,s.y=n,s.left=t,s.top=n,this.moving=!0,this.renderImage(function(){i.moving=!1,p(o.moved)&&d(a,se,o.moved,{once:!0}),A(a,se,{x:t,y:n,oldX:c,oldY:l,originalEvent:r},{cancelable:!1})})}}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t)),this},rotateTo:function(t){var i=this,n=this.element,r=this.options,a=this.imageData;if(t=Number(t),O(t)&&this.viewed&&!this.played&&r.rotatable){var o=a.rotate;if(p(r.rotate)&&d(n,le,r.rotate,{once:!0}),A(n,le,{degree:t,oldDegree:o})===!1)return this;a.rotate=t,this.rotating=!0,this.renderImage(function(){i.rotating=!1,p(r.rotated)&&d(n,ue,r.rotated,{once:!0}),A(n,ue,{degree:t,oldDegree:o},{cancelable:!1})})}return this},scaleX:function(t){return this.scale(t,this.imageData.scaleY),this},scaleY:function(t){return this.scale(this.imageData.scaleX,t),this},scale:function(t){var i=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,r=this.element,a=this.options,o=this.imageData;if(t=Number(t),n=Number(n),this.viewed&&!this.played&&a.scalable){var s=o.scaleX,c=o.scaleY,l=!1;if(O(t)?l=!0:t=s,O(n)?l=!0:n=c,l){if(p(a.scale)&&d(r,ce,a.scale,{once:!0}),A(r,ce,{scaleX:t,scaleY:n,oldScaleX:s,oldScaleY:c})===!1)return this;o.scaleX=t,o.scaleY=n,this.scaling=!0,this.renderImage(function(){i.scaling=!1,p(a.scaled)&&d(r,he,a.scaled,{once:!0}),A(r,he,{scaleX:t,scaleY:n,oldScaleX:s,oldScaleY:c},{cancelable:!1})})}}return this},zoom:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a=this.imageData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(a.width*t/a.naturalWidth,i,n,r),this},zoomTo:function(t){var i=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s=this.element,c=this.options,l=this.pointers,u=this.imageData,h=u.x,m=u.y,_=u.width,S=u.height,T=u.naturalWidth,D=u.naturalHeight;if(t=Math.max(0,t),O(t)&&this.viewed&&!this.played&&(o||c.zoomable)){if(!o){var I=Math.max(.01,c.minZoomRatio),N=Math.min(100,c.maxZoomRatio);t=Math.min(Math.max(t,I),N)}if(a)switch(a.type){case"wheel":c.zoomRatio>=.055&&t>.95&&t<1.05&&(t=1);break;case"pointermove":case"touchmove":case"mousemove":t>.99&&t<1.01&&(t=1);break}var E=T*t,R=D*t,M=E-_,V=R-S,Y=u.ratio;if(p(c.zoom)&&d(s,fe,c.zoom,{once:!0}),A(s,fe,{ratio:t,oldRatio:Y,originalEvent:a})===!1)return this;if(this.zooming=!0,a){var tt=Ei(this.viewer),H=l&&Object.keys(l).length>0?Si(l):{pageX:a.pageX,pageY:a.pageY};u.x-=M*((H.pageX-tt.left-h)/_),u.y-=V*((H.pageY-tt.top-m)/S)}else Z(r)&&O(r.x)&&O(r.y)?(u.x-=M*((r.x-h)/_),u.y-=V*((r.y-m)/S)):(u.x-=M/2,u.y-=V/2);u.left=u.x,u.top=u.y,u.width=E,u.height=R,u.oldRatio=Y,u.ratio=t,this.renderImage(function(){i.zooming=!1,p(c.zoomed)&&d(s,de,c.zoomed,{once:!0}),A(s,de,{ratio:t,oldRatio:Y,originalEvent:a},{cancelable:!1})}),n&&this.tooltip()}return this},play:function(){var t=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!this.isShown||this.played)return this;var n=this.element,r=this.options;if(p(r.play)&&d(n,ve,r.play,{once:!0}),A(n,ve)===!1)return this;var a=this.player,o=this.loadImage.bind(this),s=[],c=0,l=0;if(this.played=!0,this.onLoadWhenPlay=o,i&&this.requestFullscreen(i),f(a,q),y(this.items,function(m,_){var S=m.querySelector("img"),T=document.createElement("img");T.src=$(S,"originalUrl"),T.alt=S.getAttribute("alt"),T.referrerPolicy=S.referrerPolicy,c+=1,f(T,vt),st(T,x,r.transition),U(m,lt)&&(f(T,k),l=_),s.push(T),d(T,z,o,{once:!0}),a.appendChild(T)}),O(r.interval)&&r.interval>0){var u=function m(){clearTimeout(t.playing.timeout),g(s[l],k),l-=1,l=l>=0?l:c-1,f(s[l],k),t.playing.timeout=setTimeout(m,r.interval)},h=function m(){clearTimeout(t.playing.timeout),g(s[l],k),l+=1,l=l1&&(this.playing={prev:u,next:h,timeout:setTimeout(h,r.interval)})}return this},stop:function(){var t=this;if(!this.played)return this;var i=this.element,n=this.options;if(p(n.stop)&&d(i,me,n.stop,{once:!0}),A(i,me)===!1)return this;var r=this.player;return clearTimeout(this.playing.timeout),this.playing=!1,this.played=!1,y(r.getElementsByTagName("img"),function(a){b(a,z,t.onLoadWhenPlay)}),g(r,q),r.innerHTML="",this.exitFullscreen(),this},full:function(){var t=this,i=this.options,n=this.viewer,r=this.image,a=this.list;return!this.isShown||this.played||this.fulled||!i.inline?this:(this.fulled=!0,this.open(),f(this.button,Ht),i.transition&&(g(a,x),this.viewed&&g(r,x)),f(n,It),n.setAttribute("role","dialog"),n.setAttribute("aria-labelledby",this.title.id),n.setAttribute("aria-modal",!0),n.removeAttribute("style"),L(n,{zIndex:i.zIndex}),i.focus&&this.enforceFocus(),this.initContainer(),this.viewerData=C({},this.containerData),this.renderList(),this.viewed&&this.initImage(function(){t.renderImage(function(){i.transition&&setTimeout(function(){f(r,x),f(a,x)},0)})}),this)},exit:function(){var t=this,i=this.options,n=this.viewer,r=this.image,a=this.list;return!this.isShown||this.played||!this.fulled||!i.inline?this:(this.fulled=!1,this.close(),g(this.button,Ht),i.transition&&(g(a,x),this.viewed&&g(r,x)),i.focus&&this.clearEnforceFocus(),n.removeAttribute("role"),n.removeAttribute("aria-labelledby"),n.removeAttribute("aria-modal"),g(n,It),L(n,{zIndex:i.zIndexInline}),this.viewerData=C({},this.parentData),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){t.renderImage(function(){i.transition&&setTimeout(function(){f(r,x),f(a,x)},0)})}),this)},tooltip:function(){var t=this,i=this.options,n=this.tooltipBox,r=this.imageData;return!this.viewed||this.played||!i.tooltip?this:(n.textContent="".concat(Math.round(r.ratio*100),"%"),this.tooltipping?clearTimeout(this.tooltipping):i.transition?(this.fading&&A(n,j),f(n,q),f(n,vt),f(n,x),n.removeAttribute("aria-hidden"),n.initialOffsetWidth=n.offsetWidth,f(n,k)):(f(n,q),n.removeAttribute("aria-hidden")),this.tooltipping=setTimeout(function(){i.transition?(d(n,j,function(){g(n,q),g(n,vt),g(n,x),n.setAttribute("aria-hidden",!0),t.fading=!1},{once:!0}),g(n,k),t.fading=!0):(g(n,q),n.setAttribute("aria-hidden",!0)),t.tooltipping=!1},1e3),this)},toggle:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this.imageData.ratio===1?this.zoomTo(this.imageData.oldRatio,!0,null,t):this.zoomTo(1,!0,null,t),this},reset:function(){return this.viewed&&!this.played&&(this.imageData=C({},this.initialImageData),this.renderImage()),this},update:function(){var t=this,i=this.element,n=this.options,r=this.isImg;if(r&&!i.parentNode)return this.destroy();var a=[];if(y(r?[i]:i.querySelectorAll("img"),function(l){p(n.filter)?n.filter.call(t,l)&&a.push(l):t.getImageURL(l)&&a.push(l)}),!a.length)return this;if(this.images=a,this.length=a.length,this.ready){var o=[];if(y(this.items,function(l,u){var h=l.querySelector("img"),m=a[u];m&&h?(m.src!==h.src||m.alt!==h.alt)&&o.push(u):o.push(u)}),L(this.list,{width:"auto"}),this.initList(),this.isShown)if(this.length){if(this.viewed){var s=o.indexOf(this.index);if(s>=0)this.viewed=!1,this.view(Math.max(Math.min(this.index-s,this.length-1),0));else{var c=this.items[this.index];f(c,lt),c.setAttribute("aria-selected",!0)}}}else this.image=null,this.viewed=!1,this.index=0,this.imageData={},this.canvas.innerHTML="",this.title.innerHTML=""}else this.build();return this},destroy:function(){var t=this.element,i=this.options;return t[v]?(this.destroyed=!0,this.ready?(this.played&&this.stop(),i.inline?(this.fulled&&this.exit(),this.unbind()):this.isShown?(this.viewing&&(this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort()),this.hiding&&this.transitioning.abort(),this.hidden()):this.showing&&(this.transitioning.abort(),this.hidden()),this.ready=!1,this.viewer.parentNode.removeChild(this.viewer)):i.inline&&(this.delaying?this.delaying.abort():this.initializing&&this.initializing.abort()),i.inline||b(t,Q,this.onStart),t[v]=void 0,this):this}},Ii={getImageURL:function(t){var i=this.options.url;return ot(i)?i=t.getAttribute(i):p(i)?i=i.call(this,t):i="",i},enforceFocus:function(){var t=this;this.clearEnforceFocus(),d(document,Bt,this.onFocusin=function(i){var n=t.viewer,r=i.target;if(!(r===document||r===n||n.contains(r))){for(;r;){if(r.getAttribute("tabindex")!==null||r.getAttribute("aria-modal")==="true")return;r=r.parentElement}n.focus()}})},clearEnforceFocus:function(){this.onFocusin&&(b(document,Bt,this.onFocusin),this.onFocusin=null)},open:function(){var t=this.body;f(t,qt),this.scrollbarWidth>0&&(t.style.paddingRight="".concat(this.scrollbarWidth+(parseFloat(this.initialBodyComputedPaddingRight)||0),"px"))},close:function(){var t=this.body;g(t,qt),this.scrollbarWidth>0&&(t.style.paddingRight=this.initialBodyPaddingRight)},shown:function(){var t=this.element,i=this.options,n=this.viewer;this.fulled=!0,this.isShown=!0,this.render(),this.bind(),this.showing=!1,i.focus&&(n.focus(),this.enforceFocus()),p(i.shown)&&d(t,ie,i.shown,{once:!0}),A(t,ie)!==!1&&this.ready&&this.isShown&&!this.hiding&&this.view(this.index)},hidden:function(){var t=this.element,i=this.options,n=this.viewer;i.fucus&&this.clearEnforceFocus(),this.close(),this.unbind(),f(n,W),n.removeAttribute("role"),n.removeAttribute("aria-labelledby"),n.removeAttribute("aria-modal"),n.setAttribute("aria-hidden",!0),this.resetList(),this.resetImage(),this.fulled=!1,this.viewed=!1,this.isShown=!1,this.hiding=!1,this.destroyed||(p(i.hidden)&&d(t,re,i.hidden,{once:!0}),A(t,re,null,{cancelable:!1}))},requestFullscreen:function(t){var i=this.element.ownerDocument;if(this.fulled&&!(i.fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.msFullscreenElement)){var n=i.documentElement;n.requestFullscreen?Z(t)?n.requestFullscreen(t):n.requestFullscreen():n.webkitRequestFullscreen?n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):n.mozRequestFullScreen?n.mozRequestFullScreen():n.msRequestFullscreen&&n.msRequestFullscreen()}},exitFullscreen:function(){var t=this.element.ownerDocument;this.fulled&&(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement)&&(t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen())},change:function(t){var i=this.options,n=this.pointers,r=n[Object.keys(n)[0]];if(r){var a=r.endX-r.startX,o=r.endY-r.startY;switch(this.action){case dt:(a!==0||o!==0)&&(this.pointerMoved=!0,this.move(a,o,t));break;case it:this.zoom(Oi(n),!1,null,t);break;case _e:{this.action="switched";var s=Math.abs(a);s>1&&s>Math.abs(o)&&(this.pointers={},a>1?this.prev(i.loop):a<-1&&this.next(i.loop));break}}y(n,function(c){c.startX=c.endX,c.startY=c.endY})}},isSwitchable:function(){var t=this.imageData,i=this.viewerData;return this.length>1&&t.x>=0&&t.y>=0&&t.width<=i.width&&t.height<=i.height}},Ni=P.Viewer,Ci=function(e){return function(){return e+=1,e}}(-1),Ie=function(){function e(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(ii(this,e),!t||t.nodeType!==1)throw new Error("The first argument is required and must be an element.");this.element=t,this.options=C({},Xt,Z(i)&&i),this.action=!1,this.fading=!1,this.fulled=!1,this.hiding=!1,this.imageClicked=!1,this.imageData={},this.index=this.options.initialViewIndex,this.isImg=!1,this.isShown=!1,this.length=0,this.moving=!1,this.played=!1,this.playing=!1,this.pointers={},this.ready=!1,this.rotating=!1,this.scaling=!1,this.showing=!1,this.timeout=!1,this.tooltipping=!1,this.viewed=!1,this.viewing=!1,this.wheeling=!1,this.zooming=!1,this.pointerMoved=!1,this.id=Ci(),this.init()}return ni(e,[{key:"init",value:function(){var i=this,n=this.element,r=this.options;if(!n[v]){n[v]=this,r.focus&&!r.keyboard&&(r.focus=!1);var a=n.localName==="img",o=[];if(y(a?[n]:n.querySelectorAll("img"),function(l){p(r.filter)?r.filter.call(i,l)&&o.push(l):i.getImageURL(l)&&o.push(l)}),this.isImg=a,this.length=o.length,this.images=o,this.initBody(),B(document.createElement(v).style.transition)&&(r.transition=!1),r.inline){var s=0,c=function(){if(s+=1,s===i.length){var u;i.initializing=!1,i.delaying={abort:function(){clearTimeout(u)}},u=setTimeout(function(){i.delaying=!1,i.build()},0)}};this.initializing={abort:function(){y(o,function(u){u.complete||(b(u,z,c),b(u,X,c))})}},y(o,function(l){if(l.complete)c();else{var u,h;d(l,z,u=function(){b(l,X,h),c()},{once:!0}),d(l,X,h=function(){b(l,z,u),c()},{once:!0})}})}else d(n,Q,this.onStart=function(l){var u=l.target;u.localName==="img"&&(!p(r.filter)||r.filter.call(i,u))&&i.view(i.images.indexOf(u))})}}},{key:"build",value:function(){if(!this.ready){var i=this.element,n=this.options,r=i.parentNode,a=document.createElement("div");a.innerHTML=oi;var o=a.querySelector(".".concat(v,"-container")),s=o.querySelector(".".concat(v,"-title")),c=o.querySelector(".".concat(v,"-toolbar")),l=o.querySelector(".".concat(v,"-navbar")),u=o.querySelector(".".concat(v,"-button")),h=o.querySelector(".".concat(v,"-canvas"));if(this.parent=r,this.viewer=o,this.title=s,this.toolbar=c,this.navbar=l,this.button=u,this.canvas=h,this.footer=o.querySelector(".".concat(v,"-footer")),this.tooltipBox=o.querySelector(".".concat(v,"-tooltip")),this.player=o.querySelector(".".concat(v,"-player")),this.list=o.querySelector(".".concat(v,"-list")),o.id="".concat(v).concat(this.id),s.id="".concat(v,"Title").concat(this.id),f(s,n.title?ct(Array.isArray(n.title)?n.title[0]:n.title):W),f(l,n.navbar?ct(n.navbar):W),st(u,W,!n.button),n.keyboard&&u.setAttribute("tabindex",0),n.backdrop&&(f(o,"".concat(v,"-backdrop")),!n.inline&&n.backdrop!=="static"&&Ct(h,gt,"hide")),ot(n.className)&&n.className&&n.className.split(jt).forEach(function(E){f(o,E)}),n.toolbar){var m=document.createElement("ul"),_=Z(n.toolbar),S=ut.slice(0,3),T=ut.slice(7,9),D=ut.slice(9);_||f(c,ct(n.toolbar)),y(_?n.toolbar:ut,function(E,R){var M=_&&Z(E),V=_?Lt(R):E,Y=M&&!B(E.show)?E.show:E;if(!(!Y||!n.zoomable&&S.indexOf(V)!==-1||!n.rotatable&&T.indexOf(V)!==-1||!n.scalable&&D.indexOf(V)!==-1)){var tt=M&&!B(E.size)?E.size:E,H=M&&!B(E.click)?E.click:E,F=document.createElement("li");n.keyboard&&F.setAttribute("tabindex",0),F.setAttribute("role","button"),f(F,"".concat(v,"-").concat(V)),p(H)||Ct(F,gt,V),O(Y)&&f(F,ct(Y)),["small","large"].indexOf(tt)!==-1?f(F,"".concat(v,"-").concat(tt)):V==="play"&&f(F,"".concat(v,"-large")),p(H)&&d(F,Q,H),m.appendChild(F)}}),c.appendChild(m)}else f(c,W);if(!n.rotatable){var I=c.querySelectorAll('li[class*="rotate"]');f(I,nt),y(I,function(E){c.appendChild(E)})}if(n.inline)f(u,li),L(o,{zIndex:n.zIndexInline}),window.getComputedStyle(r).position==="static"&&L(r,{position:"relative"}),r.insertBefore(o,i.nextSibling);else{f(u,si),f(o,It),f(o,vt),f(o,W),L(o,{zIndex:n.zIndex});var N=n.container;ot(N)&&(N=i.ownerDocument.querySelector(N)),N||(N=this.body),N.appendChild(o)}if(n.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,p(n.ready)&&d(i,te,n.ready,{once:!0}),A(i,te)===!1){this.ready=!1;return}this.ready&&n.inline&&this.view(this.index)}}}],[{key:"noConflict",value:function(){return window.Viewer=Ni,e}},{key:"setDefaults",value:function(i){C(Xt,Z(i)&&i)}}]),e}();C(Ie.prototype,xi,_i,Ai,Di,Ii);var ki=typeof global=="object"&&global&&global.Object===Object&&global;const Ne=ki;var zi=typeof self=="object"&&self&&self.Object===Object&&self,ji=Ne||zi||Function("return this")();const Vt=ji;var Li=Vt.Symbol;const pt=Li;var Ce=Object.prototype,Vi=Ce.hasOwnProperty,Ri=Ce.toString,et=pt?pt.toStringTag:void 0;function Fi(e){var t=Vi.call(e,et),i=e[et];try{e[et]=void 0;var n=!0}catch{}var r=Ri.call(e);return n&&(t?e[et]=i:delete e[et]),r}var Pi=Object.prototype,Mi=Pi.toString;function Yi(e){return Mi.call(e)}var Wi="[object Null]",Xi="[object Undefined]",ge=pt?pt.toStringTag:void 0;function Rt(e){return e==null?e===void 0?Xi:Wi:ge&&ge in Object(e)?Fi(e):Yi(e)}function Ft(e){return e!=null&&typeof e=="object"}var Hi=Array.isArray;const qi=Hi;function wt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function ke(e){return e}var Ui="[object AsyncFunction]",Bi="[object Function]",Zi="[object GeneratorFunction]",$i="[object Proxy]";function ze(e){if(!wt(e))return!1;var t=Rt(e);return t==Bi||t==Zi||t==Ui||t==$i}var Ki=Vt["__core-js_shared__"];const xt=Ki;var pe=function(){var e=/[^.]+$/.exec(xt&&xt.keys&&xt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Gi(e){return!!pe&&pe in e}var Qi=Function.prototype,Ji=Qi.toString;function tn(e){if(e!=null){try{return Ji.call(e)}catch{}try{return e+""}catch{}}return""}var en=/[\\^$.*+?()[\]{}|]/g,nn=/^\[object .+?Constructor\]$/,rn=Function.prototype,an=Object.prototype,on=rn.toString,sn=an.hasOwnProperty,ln=RegExp("^"+on.call(sn).replace(en,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function un(e){if(!wt(e)||Gi(e))return!1;var t=ze(e)?ln:nn;return t.test(tn(e))}function cn(e,t){return e==null?void 0:e[t]}function hn(e,t){var i=cn(e,t);return un(i)?i:void 0}function fn(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}var dn=800,vn=16,mn=Date.now;function gn(e){var t=0,i=0;return function(){var n=mn(),r=vn-(n-i);if(i=n,r>0){if(++t>=dn)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function pn(e){return function(){return e}}var bn=function(){try{var e=hn(Object,"defineProperty");return e({},"",{}),e}catch{}}();const bt=bn;var yn=bt?function(e,t){return bt(e,"toString",{configurable:!0,enumerable:!1,value:pn(t),writable:!0})}:ke;const wn=yn;var En=gn(wn);const Tn=En;var On=9007199254740991,Sn=/^(?:0|[1-9]\d*)$/;function je(e,t){var i=typeof e;return t=t??On,!!t&&(i=="number"||i!="symbol"&&Sn.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=In}function Et(e){return e!=null&&Fe(e.length)&&!ze(e)}function Pe(e,t,i){if(!wt(i))return!1;var n=typeof t;return(n=="number"?Et(i)&&je(t,i.length):n=="string"&&t in i)?Pt(i[t],e):!1}function Nn(e){return Re(function(t,i){var n=-1,r=i.length,a=r>1?i[r-1]:void 0,o=r>2?i[2]:void 0;for(a=e.length>3&&typeof a=="function"?(r--,a):void 0,o&&Pe(i[0],i[1],o)&&(a=r<3?void 0:a,r=1),t=Object(t);++n2?t[2]:void 0;for(r&&Pe(t[0],t[1],r)&&(n=1);++i[]},rebuild:{type:Boolean,default:!1},trigger:{type:Object,default:null},options:{type:Object,default:()=>null}},emits:["inited"],setup(e,{emit:t}){let i;const n=qe();function r(){i=new Ie(n.value,e.options),t("inited",i)}function a(){i&&i.destroy()}function o(){a(),r()}function s(){i?(i.update(),t("inited",i)):r()}function c(){e.rebuild?o():s()}const l={deep:!0};return Tt(()=>e.images,()=>{Ot(()=>{c()})},l),Tt(()=>e.trigger,()=>{Ot(()=>{c()})},l),Tt(()=>e.options,()=>{Ot(()=>{o()})},l),Ue(()=>r()),Be(()=>a()),{root:n,createViewer:r,rebuildViewer:o,updateViewer:s,destroyViewer:a}}}),Rr=(e,t)=>{const i=e.__vccOpts||e;for(const[n,r]of t)i[n]=r;return i},Fr={ref:"root"};function Pr(e,t,i,n,r,a){return ft(),At("div",Fr,[Ze(e.$slots,"default",{images:e.images,options:e.options})],512)}const Mr=Rr(Vr,[["render",Pr]]);const Yr=["src"],Wr=Se({__name:"ImageViewer",props:{image:{}},setup(e){const t=e,i=$e(()=>t.image?[{src:t.image,index:0}]:[]);return(n,r)=>(ft(),Ke(Qe(Mr),{images:i.value,style:{height:"100%"}},{default:Ge(()=>[(ft(!0),At(ti,null,Je(i.value,a=>(ft(),At("img",{alt:"图片",src:a.src,key:a.index,class:"image"},null,8,Yr))),128))]),_:1},8,["images"]))}});const Hr=ei(Wr,[["__scopeId","data-v-b0f61c51"]]);export{Hr as default}; diff --git a/public/dist/assets/MarkdownViewer-52070412.js b/public/dist/assets/MarkdownViewer-52070412.js new file mode 100644 index 0000000..7d9ce99 --- /dev/null +++ b/public/dist/assets/MarkdownViewer-52070412.js @@ -0,0 +1,45 @@ +var de=Object.defineProperty;var xe=(a,t,e)=>t in a?de(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var d=(a,t,e)=>(xe(a,typeof t!="symbol"?t+"":t,e),e),be=(a,t,e)=>{if(!t.has(a))throw TypeError("Cannot "+e)};var O=(a,t,e)=>{if(t.has(a))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(a):t.set(a,e)};var L=(a,t,e)=>(be(a,t,"access private method"),e);import{d as me,h as we,a as ye,b as $e,_ as Te}from"./index-be50c070.js";function N(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let _=N();function re(a){_=a}const le=/[&<>"']/,_e=new RegExp(le.source,"g"),oe=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ze=new RegExp(oe.source,"g"),Re={"&":"&","<":"<",">":">",'"':""","'":"'"},ee=a=>Re[a];function x(a,t){if(t){if(le.test(a))return a.replace(_e,ee)}else if(oe.test(a))return a.replace(ze,ee);return a}const Ie=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Se(a){return a.replace(Ie,(t,e)=>(e=e.toLowerCase(),e==="colon"?":":e.charAt(0)==="#"?e.charAt(1)==="x"?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))}const Ae=/(^|[^\[])\^/g;function k(a,t){let e=typeof a=="string"?a:a.source;t=t||"";const n={replace:(i,r)=>{let s=typeof r=="string"?r:r.source;return s=s.replace(Ae,"$1"),e=e.replace(i,s),n},getRegex:()=>new RegExp(e,t)};return n}function te(a){try{a=encodeURI(a).replace(/%25/g,"%")}catch{return null}return a}const R={exec:()=>null};function ne(a,t){const e=a.replace(/\|/g,(r,s,l)=>{let o=!1,p=s;for(;--p>=0&&l[p]==="\\";)o=!o;return o?"|":" |"}),n=e.split(/ \|/);let i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length{const r=i.match(/^\s+/);if(r===null)return i;const[s]=r;return s.length>=n.length?i.slice(n.length):i}).join(` +`)}class B{constructor(t){d(this,"options");d(this,"rules");d(this,"lexer");this.options=t||_}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const n=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:C(n,` +`)}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const n=e[0],i=Le(n,e[3]||"");return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(/#$/.test(n)){const i=C(n,"#");(this.options.pedantic||!i||/ $/.test(i))&&(n=i.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:e[0]}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){const n=C(e[0].replace(/^ *>[ \t]?/gm,""),` +`),i=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(n);return this.lexer.state.top=i,{type:"blockquote",raw:e[0],tokens:r,text:n}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim();const i=n.length>1,r={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");const s=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);let l="",o="",p=!1;for(;t;){let c=!1;if(!(e=s.exec(t))||this.rules.block.hr.test(t))break;l=e[0],t=t.substring(l.length);let u=e[2].split(` +`,1)[0].replace(/^\t+/,Q=>" ".repeat(3*Q.length)),h=t.split(` +`,1)[0],g=0;this.options.pedantic?(g=2,o=u.trimStart()):(g=e[2].search(/[^ ]/),g=g>4?1:g,o=u.slice(g),g+=e[1].length);let y=!1;if(!u&&/^ *$/.test(h)&&(l+=h+` +`,t=t.substring(h.length+1),c=!0),!c){const Q=new RegExp(`^ {0,${Math.min(3,g-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),J=new RegExp(`^ {0,${Math.min(3,g-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),K=new RegExp(`^ {0,${Math.min(3,g-1)}}(?:\`\`\`|~~~)`),Y=new RegExp(`^ {0,${Math.min(3,g-1)}}#`);for(;t;){const D=t.split(` +`,1)[0];if(h=D,this.options.pedantic&&(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),K.test(h)||Y.test(h)||Q.test(h)||J.test(t))break;if(h.search(/[^ ]/)>=g||!h.trim())o+=` +`+h.slice(g);else{if(y||u.search(/[^ ]/)>=4||K.test(u)||Y.test(u)||J.test(u))break;o+=` +`+h}!y&&!h.trim()&&(y=!0),l+=D+` +`,t=t.substring(D.length+1),u=h.slice(g)}}r.loose||(p?r.loose=!0:/\n *\n *$/.test(l)&&(p=!0));let b=null,$;this.options.gfm&&(b=/^\[[ xX]\] /.exec(o),b&&($=b[0]!=="[ ] ",o=o.replace(/^\[[ xX]\] +/,""))),r.items.push({type:"list_item",raw:l,task:!!b,checked:$,loose:!1,text:o,tokens:[]}),r.raw+=l}r.items[r.items.length-1].raw=l.trimEnd(),r.items[r.items.length-1].text=o.trimEnd(),r.raw=r.raw.trimEnd();for(let c=0;cg.type==="space"),h=u.length>0&&u.some(g=>/\n.*\n/.test(g.raw));r.loose=h}if(r.loose)for(let c=0;c$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:i,title:r}}}table(t){const e=this.rules.block.table.exec(t);if(!e||!/[:|]/.test(e[2]))return;const n=ne(e[1]),i=e[2].replace(/^\||\| *$/g,"").split("|"),r=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split(` +`):[],s={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===i.length){for(const l of i)/^ *-+: *$/.test(l)?s.align.push("right"):/^ *:-+: *$/.test(l)?s.align.push("center"):/^ *:-+ *$/.test(l)?s.align.push("left"):s.align.push(null);for(const l of n)s.header.push({text:l,tokens:this.lexer.inline(l)});for(const l of r)s.rows.push(ne(l,s.header.length).map(o=>({text:o,tokens:this.lexer.inline(o)})));return s}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const n=e[1].charAt(e[1].length-1)===` +`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:x(e[1])}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&/^/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const n=e[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;const s=C(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{const s=Ee(e[2],"()");if(s>-1){const o=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,o).trim(),e[3]=""}}let i=e[2],r="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);s&&(i=s[1],r=s[3])}else r=e[3]?e[3].slice(1,-1):"";return i=i.trim(),/^$/.test(n)?i=i.slice(1):i=i.slice(1,-1)),se(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){const i=(n[2]||n[1]).replace(/\s+/g," "),r=e[i.toLowerCase()];if(!r){const s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return se(n,r,n[0],this.lexer)}}emStrong(t,e,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i||i[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const s=[...i[0]].length-1;let l,o,p=s,c=0;const u=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,e=e.slice(-1*t.length+s);(i=u.exec(e))!=null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l)continue;if(o=[...l].length,i[3]||i[4]){p+=o;continue}else if((i[5]||i[6])&&s%3&&!((s+o)%3)){c+=o;continue}if(p-=o,p>0)continue;o=Math.min(o,o+p+c);const h=[...i[0]][0].length,g=t.slice(0,s+i.index+h+o);if(Math.min(s,o)%2){const b=g.slice(1,-1);return{type:"em",raw:g,text:b,tokens:this.lexer.inlineTokens(b)}}const y=g.slice(2,-2);return{type:"strong",raw:g,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(/\n/g," ");const i=/[^ ]/.test(n),r=/^ /.test(n)&&/ $/.test(n);return i&&r&&(n=n.substring(1,n.length-1)),n=x(n,!0),{type:"codespan",raw:e[0],text:n}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let n,i;return e[2]==="@"?(n=x(e[1]),i="mailto:"+n):(n=x(e[1]),i=n),{type:"link",raw:e[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t){var n;let e;if(e=this.rules.inline.url.exec(t)){let i,r;if(e[2]==="@")i=x(e[0]),r="mailto:"+i;else{let s;do s=e[0],e[0]=((n=this.rules.inline._backpedal.exec(e[0]))==null?void 0:n[0])??"";while(s!==e[0]);i=x(e[0]),e[1]==="www."?r="http://"+e[0]:r=e[0]}return{type:"link",raw:e[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){let n;return this.lexer.state.inRawBlock?n=e[0]:n=x(e[0]),{type:"text",raw:e[0],text:n}}}}const Ce=/^(?: *(?:\n|$))+/,ve=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,Be=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,A=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ze=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ae=/(?:[*+-]|\d{1,9}[.)])/,ce=k(/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,ae).getRegex(),F=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Pe=/^[^\n]+/,U=/(?!\s*\])(?:\\.|[^\[\]\\])+/,qe=k(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",U).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Me=k(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ae).getRegex(),M="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",V=/|$)/,Qe=k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",V).replace("tag",M).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),he=k(F).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",M).getRegex(),De=k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",he).getRegex(),X={blockquote:De,code:ve,def:qe,fences:Be,heading:Ze,hr:A,html:Qe,lheading:ce,list:Me,newline:Ce,paragraph:he,table:R,text:Pe},ie=k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",M).getRegex(),Oe={...X,table:ie,paragraph:k(F).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ie).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",M).getRegex()},je={...X,html:k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",V).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:R,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:k(F).replace("hr",A).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",ce).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},pe=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,He=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ue=/^( {2,}|\\)\n(?!\s*$)/,Ne=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~",Fe=k(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,E).getRegex(),Ue=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,Ve=k(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,E).getRegex(),Xe=k("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,E).getRegex(),Ge=k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,E).getRegex(),We=k(/\\([punct])/,"gu").replace(/punct/g,E).getRegex(),Je=k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ke=k(V).replace("(?:-->|$)","-->").getRegex(),Ye=k("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Ke).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Z=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,et=k(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Z).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),fe=k(/^!?\[(label)\]\[(ref)\]/).replace("label",Z).replace("ref",U).getRegex(),ge=k(/^!?\[(ref)\](?:\[\])?/).replace("ref",U).getRegex(),tt=k("reflink|nolink(?!\\()","g").replace("reflink",fe).replace("nolink",ge).getRegex(),G={_backpedal:R,anyPunctuation:We,autolink:Je,blockSkip:Ue,br:ue,code:He,del:R,emStrongLDelim:Ve,emStrongRDelimAst:Xe,emStrongRDelimUnd:Ge,escape:pe,link:et,nolink:ge,punctuation:Fe,reflink:fe,reflinkSearch:tt,tag:Ye,text:Ne,url:R},nt={...G,link:k(/^!?\[(label)\]\((.*?)\)/).replace("label",Z).getRegex(),reflink:k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Z).getRegex()},j={...G,escape:k(pe).replace("])","~|])").getRegex(),url:k(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\o+" ".repeat(p.length));let n,i,r,s;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(n=l.call({lexer:this},t,e))?(t=t.substring(n.raw.length),e.push(n),!0):!1))){if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length),n.raw.length===1&&e.length>0?e[e.length-1].raw+=` +`:e.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length),i=e[e.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=` +`+n.raw,i.text+=` +`+n.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length),i=e[e.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=` +`+n.raw,i.text+=` +`+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),e.push(n);continue}if(r=t,this.options.extensions&&this.options.extensions.startBlock){let l=1/0;const o=t.slice(1);let p;this.options.extensions.startBlock.forEach(c=>{p=c.call({lexer:this},o),typeof p=="number"&&p>=0&&(l=Math.min(l,p))}),l<1/0&&l>=0&&(r=t.substring(0,l+1))}if(this.state.top&&(n=this.tokenizer.paragraph(r))){i=e[e.length-1],s&&i.type==="paragraph"?(i.raw+=` +`+n.raw,i.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(n),s=r.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length),i=e[e.length-1],i&&i.type==="text"?(i.raw+=` +`+n.raw,i.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(n);continue}if(t){const l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let n,i,r,s=t,l,o,p;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)c.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,l.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(o||(p=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(n=c.call({lexer:this},t,e))?(t=t.substring(n.raw.length),e.push(n),!0):!1))){if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),i=e[e.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):e.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length),i=e[e.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):e.push(n);continue}if(n=this.tokenizer.emStrong(t,s,p)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length),e.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),e.push(n);continue}if(r=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const u=t.slice(1);let h;this.options.extensions.startInline.forEach(g=>{h=g.call({lexer:this},u),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(r=t.substring(0,c+1))}if(n=this.tokenizer.inlineText(r)){t=t.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(p=n.raw.slice(-1)),o=!0,i=e[e.length-1],i&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):e.push(n);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return e}}class P{constructor(t){d(this,"options");this.options=t||_}code(t,e,n){var r;const i=(r=(e||"").match(/^\S*/))==null?void 0:r[0];return t=t.replace(/\n$/,"")+` +`,i?'
'+(n?t:x(t,!0))+`
+`:"
"+(n?t:x(t,!0))+`
+`}blockquote(t){return`
+${t}
+`}html(t,e){return t}heading(t,e,n){return`${t} +`}hr(){return`
+`}list(t,e,n){const i=e?"ol":"ul",r=e&&n!==1?' start="'+n+'"':"";return"<"+i+r+`> +`+t+" +`}listitem(t,e,n){return`
  • ${t}
  • +`}checkbox(t){return"'}paragraph(t){return`

    ${t}

    +`}table(t,e){return e&&(e=`${e}`),` + +`+t+` +`+e+`
    +`}tablerow(t){return` +${t} +`}tablecell(t,e){const n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` +`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return"
    "}del(t){return`${t}`}link(t,e,n){const i=te(t);if(i===null)return n;t=i;let r='
    ",r}image(t,e,n){const i=te(t);if(i===null)return n;t=i;let r=`${n}0&&h.tokens[0].type==="paragraph"?(h.tokens[0].text=$+" "+h.tokens[0].text,h.tokens[0].tokens&&h.tokens[0].tokens.length>0&&h.tokens[0].tokens[0].type==="text"&&(h.tokens[0].tokens[0].text=$+" "+h.tokens[0].tokens[0].text)):h.tokens.unshift({type:"text",text:$+" "}):b+=$+" "}b+=this.parse(h.tokens,p),c+=this.renderer.listitem(b,y,!!g)}n+=this.renderer.list(c,l,o);continue}case"html":{const s=r;n+=this.renderer.html(s.text,s.block);continue}case"paragraph":{const s=r;n+=this.renderer.paragraph(this.parseInline(s.tokens));continue}case"text":{let s=r,l=s.tokens?this.parseInline(s.tokens):s.text;for(;i+1{n=n.concat(this.walkTokens(l[o],e))}):l.tokens&&(n=n.concat(this.walkTokens(l.tokens,e)))}}return n}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{const i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){const s=e.renderers[r.name];s?e.renderers[r.name]=function(...l){let o=r.renderer.apply(this,l);return o===!1&&(o=s.apply(this,l)),o}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const s=e[r.level];s?s.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),i.extensions=e),n.renderer){const r=this.defaults.renderer||new P(this.defaults);for(const s in n.renderer){if(!(s in r))throw new Error(`renderer '${s}' does not exist`);if(s==="options")continue;const l=s,o=n.renderer[l],p=r[l];r[l]=(...c)=>{let u=o.apply(r,c);return u===!1&&(u=p.apply(r,c)),u||""}}i.renderer=r}if(n.tokenizer){const r=this.defaults.tokenizer||new B(this.defaults);for(const s in n.tokenizer){if(!(s in r))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;const l=s,o=n.tokenizer[l],p=r[l];r[l]=(...c)=>{let u=o.apply(r,c);return u===!1&&(u=p.apply(r,c)),u}}i.tokenizer=r}if(n.hooks){const r=this.defaults.hooks||new I;for(const s in n.hooks){if(!(s in r))throw new Error(`hook '${s}' does not exist`);if(s==="options")continue;const l=s,o=n.hooks[l],p=r[l];I.passThroughHooks.has(s)?r[l]=c=>{if(this.defaults.async)return Promise.resolve(o.call(r,c)).then(h=>p.call(r,h));const u=o.call(r,c);return p.call(r,u)}:r[l]=(...c)=>{let u=o.apply(r,c);return u===!1&&(u=p.apply(r,c)),u}}i.hooks=r}if(n.walkTokens){const r=this.defaults.walkTokens,s=n.walkTokens;i.walkTokens=function(l){let o=[];return o.push(s.call(this,l)),r&&(o=o.concat(r.call(this,l))),o}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return m.lex(t,e??this.defaults)}parser(t,e){return w.parse(t,e??this.defaults)}}S=new WeakSet,H=function(t,e){return(n,i)=>{const r={...i},s={...this.defaults,...r};this.defaults.async===!0&&r.async===!1&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const l=L(this,q,ke).call(this,!!s.silent,!!s.async);if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then(o=>t(o,s)).then(o=>s.hooks?s.hooks.processAllTokens(o):o).then(o=>s.walkTokens?Promise.all(this.walkTokens(o,s.walkTokens)).then(()=>o):o).then(o=>e(o,s)).then(o=>s.hooks?s.hooks.postprocess(o):o).catch(l);try{s.hooks&&(n=s.hooks.preprocess(n));let o=t(n,s);s.hooks&&(o=s.hooks.processAllTokens(o)),s.walkTokens&&this.walkTokens(o,s.walkTokens);let p=e(o,s);return s.hooks&&(p=s.hooks.postprocess(p)),p}catch(o){return l(o)}}},q=new WeakSet,ke=function(t,e){return n=>{if(n.message+=` +Please report this to https://github.com/markedjs/marked.`,t){const i="

    An error occurred:

    "+x(n.message+"",!0)+"
    ";return e?Promise.resolve(i):i}if(e)return Promise.reject(n);throw n}};const T=new it;function f(a,t){return T.parse(a,t)}f.options=f.setOptions=function(a){return T.setOptions(a),f.defaults=T.defaults,re(f.defaults),f};f.getDefaults=N;f.defaults=_;f.use=function(...a){return T.use(...a),f.defaults=T.defaults,re(f.defaults),f};f.walkTokens=function(a,t){return T.walkTokens(a,t)};f.parseInline=T.parseInline;f.Parser=w;f.parser=w.parse;f.Renderer=P;f.TextRenderer=W;f.Lexer=m;f.lexer=m.lex;f.Tokenizer=B;f.Hooks=I;f.parse=f;f.options;f.setOptions;f.use;f.walkTokens;f.parseInline;w.parse;m.lex;const rt=["innerHTML"],lt=me({__name:"MarkdownViewer",props:{data:{}},setup(a){const t=a,e=we(()=>f(t.data));return(n,i)=>(ye(),$e("div",{class:"markdown-body",innerHTML:e.value},null,8,rt))}});const ct=Te(lt,[["__scopeId","data-v-e0bd8a5a"]]);export{ct as default}; diff --git a/public/dist/assets/MarkdownViewer-86c94709.css b/public/dist/assets/MarkdownViewer-86c94709.css new file mode 100644 index 0000000..47446e1 --- /dev/null +++ b/public/dist/assets/MarkdownViewer-86c94709.css @@ -0,0 +1 @@ +@media (prefers-color-scheme: dark){.markdown-body,[data-theme=dark]{color-scheme:dark;--color-prettylights-syntax-comment: #8b949e;--color-prettylights-syntax-constant: #79c0ff;--color-prettylights-syntax-entity: #d2a8ff;--color-prettylights-syntax-storage-modifier-import: #c9d1d9;--color-prettylights-syntax-entity-tag: #7ee787;--color-prettylights-syntax-keyword: #ff7b72;--color-prettylights-syntax-string: #a5d6ff;--color-prettylights-syntax-variable: #ffa657;--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;--color-prettylights-syntax-invalid-illegal-bg: #8e1519;--color-prettylights-syntax-carriage-return-text: #f0f6fc;--color-prettylights-syntax-carriage-return-bg: #b62324;--color-prettylights-syntax-string-regexp: #7ee787;--color-prettylights-syntax-markup-list: #f2cc60;--color-prettylights-syntax-markup-heading: #1f6feb;--color-prettylights-syntax-markup-italic: #c9d1d9;--color-prettylights-syntax-markup-bold: #c9d1d9;--color-prettylights-syntax-markup-deleted-text: #ffdcd7;--color-prettylights-syntax-markup-deleted-bg: #67060c;--color-prettylights-syntax-markup-inserted-text: #aff5b4;--color-prettylights-syntax-markup-inserted-bg: #033a16;--color-prettylights-syntax-markup-changed-text: #ffdfb6;--color-prettylights-syntax-markup-changed-bg: #5a1e02;--color-prettylights-syntax-markup-ignored-text: #c9d1d9;--color-prettylights-syntax-markup-ignored-bg: #1158c7;--color-prettylights-syntax-meta-diff-range: #d2a8ff;--color-prettylights-syntax-brackethighlighter-angle: #8b949e;--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;--color-fg-default: #e6edf3;--color-fg-muted: #848d97;--color-fg-subtle: #6e7681;--color-canvas-default: #0d1117;--color-canvas-subtle: #161b22;--color-border-default: #30363d;--color-border-muted: #21262d;--color-neutral-muted: rgba(110,118,129,.4);--color-accent-fg: #2f81f7;--color-accent-emphasis: #1f6feb;--color-success-fg: #3fb950;--color-success-emphasis: #238636;--color-attention-fg: #d29922;--color-attention-emphasis: #9e6a03;--color-attention-subtle: rgba(187,128,9,.15);--color-danger-fg: #f85149;--color-danger-emphasis: #da3633;--color-done-fg: #a371f7;--color-done-emphasis: #8957e5}}@media (prefers-color-scheme: light){.markdown-body,[data-theme=light]{color-scheme:light;--color-prettylights-syntax-comment: #57606a;--color-prettylights-syntax-constant: #0550ae;--color-prettylights-syntax-entity: #6639ba;--color-prettylights-syntax-storage-modifier-import: #24292f;--color-prettylights-syntax-entity-tag: #116329;--color-prettylights-syntax-keyword: #cf222e;--color-prettylights-syntax-string: #0a3069;--color-prettylights-syntax-variable: #953800;--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;--color-prettylights-syntax-invalid-illegal-bg: #82071e;--color-prettylights-syntax-carriage-return-text: #f6f8fa;--color-prettylights-syntax-carriage-return-bg: #cf222e;--color-prettylights-syntax-string-regexp: #116329;--color-prettylights-syntax-markup-list: #3b2300;--color-prettylights-syntax-markup-heading: #0550ae;--color-prettylights-syntax-markup-italic: #24292f;--color-prettylights-syntax-markup-bold: #24292f;--color-prettylights-syntax-markup-deleted-text: #82071e;--color-prettylights-syntax-markup-deleted-bg: #ffebe9;--color-prettylights-syntax-markup-inserted-text: #116329;--color-prettylights-syntax-markup-inserted-bg: #dafbe1;--color-prettylights-syntax-markup-changed-text: #953800;--color-prettylights-syntax-markup-changed-bg: #ffd8b5;--color-prettylights-syntax-markup-ignored-text: #eaeef2;--color-prettylights-syntax-markup-ignored-bg: #0550ae;--color-prettylights-syntax-meta-diff-range: #8250df;--color-prettylights-syntax-brackethighlighter-angle: #57606a;--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;--color-prettylights-syntax-constant-other-reference-link: #0a3069;--color-fg-default: #1F2328;--color-fg-muted: #656d76;--color-fg-subtle: #6e7781;--color-canvas-default: #ffffff;--color-canvas-subtle: #f6f8fa;--color-border-default: #d0d7de;--color-border-muted: hsla(210,18%,87%,1);--color-neutral-muted: rgba(175,184,193,.2);--color-accent-fg: #0969da;--color-accent-emphasis: #0969da;--color-success-fg: #1a7f37;--color-success-emphasis: #1f883d;--color-attention-fg: #9a6700;--color-attention-emphasis: #9a6700;--color-attention-subtle: #fff8c5;--color-danger-fg: #d1242f;--color-danger-emphasis: #cf222e;--color-done-fg: #8250df;--color-done-emphasis: #8250df}}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;margin:0;color:var(--color-fg-default);background-color:var(--color-canvas-default);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body .octicon{display:inline-block;fill:currentColor;vertical-align:text-bottom}.markdown-body h1:hover .anchor .octicon-link:before,.markdown-body h2:hover .anchor .octicon-link:before,.markdown-body h3:hover .anchor .octicon-link:before,.markdown-body h4:hover .anchor .octicon-link:before,.markdown-body h5:hover .anchor .octicon-link:before,.markdown-body h6:hover .anchor .octicon-link:before{width:16px;height:16px;content:" ";display:inline-block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,");mask-image:url("data:image/svg+xml,")}.markdown-body details,.markdown-body figcaption,.markdown-body figure{display:block}.markdown-body summary{display:list-item}.markdown-body [hidden]{display:none!important}.markdown-body a{background-color:transparent;color:var(--color-accent-fg);text-decoration:none}.markdown-body abbr[title]{border-bottom:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.markdown-body b,.markdown-body strong{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dfn{font-style:italic}.markdown-body h1{margin:.67em 0;font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:2em;border-bottom:1px solid var(--color-border-muted)}.markdown-body mark{background-color:var(--color-attention-subtle);color:var(--color-fg-default)}.markdown-body small{font-size:90%}.markdown-body sub,.markdown-body sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.markdown-body sub{bottom:-.25em}.markdown-body sup{top:-.5em}.markdown-body img{border-style:none;max-width:100%;box-sizing:content-box;background-color:var(--color-canvas-default)}.markdown-body code,.markdown-body kbd,.markdown-body pre,.markdown-body samp{font-family:monospace;font-size:1em}.markdown-body figure{margin:1em 40px}.markdown-body hr{box-sizing:content-box;overflow:hidden;background:transparent;border-bottom:1px solid var(--color-border-muted);height:.25em;padding:0;margin:24px 0;background-color:var(--color-border-default);border:0}.markdown-body input{font:inherit;margin:0;overflow:visible;font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body [type=button],.markdown-body [type=reset],.markdown-body [type=submit]{-webkit-appearance:button;-moz-appearance:button;appearance:button}.markdown-body [type=checkbox],.markdown-body [type=radio]{box-sizing:border-box;padding:0}.markdown-body [type=number]::-webkit-inner-spin-button,.markdown-body [type=number]::-webkit-outer-spin-button{height:auto}.markdown-body [type=search]::-webkit-search-cancel-button,.markdown-body [type=search]::-webkit-search-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}.markdown-body ::-webkit-input-placeholder{color:inherit;opacity:.54}.markdown-body ::-webkit-file-upload-button{-webkit-appearance:button;-moz-appearance:button;appearance:button;font:inherit}.markdown-body a:hover{text-decoration:underline}.markdown-body ::placeholder{color:var(--color-fg-subtle);opacity:1}.markdown-body hr:before{display:table;content:""}.markdown-body hr:after{display:table;clear:both;content:""}.markdown-body table{border-spacing:0;border-collapse:collapse;display:block;width:max-content;max-width:100%;overflow:auto}.markdown-body td,.markdown-body th{padding:0}.markdown-body details summary{cursor:pointer}.markdown-body details:not([open])>*:not(summary){display:none!important}.markdown-body a:focus,.markdown-body [role=button]:focus,.markdown-body input[type=radio]:focus,.markdown-body input[type=checkbox]:focus{outline:2px solid var(--color-accent-fg);outline-offset:-2px;box-shadow:none}.markdown-body a:focus:not(:focus-visible),.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body input[type=radio]:focus:not(:focus-visible),.markdown-body input[type=checkbox]:focus:not(:focus-visible){outline:solid 1px transparent}.markdown-body a:focus-visible,.markdown-body [role=button]:focus-visible,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus-visible{outline:2px solid var(--color-accent-fg);outline-offset:-2px;box-shadow:none}.markdown-body a:not([class]):focus,.markdown-body a:not([class]):focus-visible,.markdown-body input[type=radio]:focus,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus,.markdown-body input[type=checkbox]:focus-visible{outline-offset:0}.markdown-body kbd{display:inline-block;padding:3px 5px;font:11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;line-height:10px;color:var(--color-fg-default);vertical-align:middle;background-color:var(--color-canvas-subtle);border:solid 1px var(--color-neutral-muted);border-bottom-color:var(--color-neutral-muted);border-radius:6px;box-shadow:inset 0 -1px 0 var(--color-neutral-muted)}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:24px;margin-bottom:16px;font-weight:var(--base-text-weight-semibold, 600);line-height:1.25}.markdown-body h2{font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:1.5em;border-bottom:1px solid var(--color-border-muted)}.markdown-body h3{font-weight:var(--base-text-weight-semibold, 600);font-size:1.25em}.markdown-body h4{font-weight:var(--base-text-weight-semibold, 600);font-size:1em}.markdown-body h5{font-weight:var(--base-text-weight-semibold, 600);font-size:.875em}.markdown-body h6{font-weight:var(--base-text-weight-semibold, 600);font-size:.85em;color:var(--color-fg-muted)}.markdown-body p{margin-top:0;margin-bottom:10px}.markdown-body blockquote{margin:0;padding:0 1em;color:var(--color-fg-muted);border-left:.25em solid var(--color-border-default)}.markdown-body ul,.markdown-body ol{margin-top:0;margin-bottom:0;padding-left:2em}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ul ul ol,.markdown-body ul ol ol,.markdown-body ol ul ol,.markdown-body ol ol ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body tt,.markdown-body code,.markdown-body samp{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px}.markdown-body pre{margin-top:0;margin-bottom:0;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;word-wrap:normal}.markdown-body .octicon{display:inline-block;overflow:visible!important;vertical-align:text-bottom;fill:currentColor}.markdown-body input::-webkit-outer-spin-button,.markdown-body input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.markdown-body .mr-2{margin-right:var(--base-size-8, 8px)!important}.markdown-body:before{display:table;content:""}.markdown-body:after{display:table;clear:both;content:""}.markdown-body>*:first-child{margin-top:0!important}.markdown-body>*:last-child{margin-bottom:0!important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .absent{color:var(--color-danger-fg)}.markdown-body .anchor{float:left;padding-right:4px;margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:none}.markdown-body p,.markdown-body blockquote,.markdown-body ul,.markdown-body ol,.markdown-body dl,.markdown-body table,.markdown-body pre,.markdown-body details{margin-top:0;margin-bottom:16px}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:var(--color-fg-default);vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 tt,.markdown-body h1 code,.markdown-body h2 tt,.markdown-body h2 code,.markdown-body h3 tt,.markdown-body h3 code,.markdown-body h4 tt,.markdown-body h4 code,.markdown-body h5 tt,.markdown-body h5 code,.markdown-body h6 tt,.markdown-body h6 code{padding:0 .2em;font-size:inherit}.markdown-body summary h1,.markdown-body summary h2,.markdown-body summary h3,.markdown-body summary h4,.markdown-body summary h5,.markdown-body summary h6{display:inline-block}.markdown-body summary h1 .anchor,.markdown-body summary h2 .anchor,.markdown-body summary h3 .anchor,.markdown-body summary h4 .anchor,.markdown-body summary h5 .anchor,.markdown-body summary h6 .anchor{margin-left:-40px}.markdown-body summary h1,.markdown-body summary h2{padding-bottom:0;border-bottom:0}.markdown-body ul.no-list,.markdown-body ol.no-list{padding:0;list-style-type:none}.markdown-body ol[type="a s"]{list-style-type:lower-alpha}.markdown-body ol[type="A s"]{list-style-type:upper-alpha}.markdown-body ol[type="i s"]{list-style-type:lower-roman}.markdown-body ol[type="I s"]{list-style-type:upper-roman}.markdown-body ol[type="1"]{list-style-type:decimal}.markdown-body div>ol:not([type]){list-style-type:decimal}.markdown-body ul ul,.markdown-body ul ol,.markdown-body ol ol,.markdown-body ol ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:16px}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body table th{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body table th,.markdown-body table td{padding:6px 13px;border:1px solid var(--color-border-default)}.markdown-body table td>:last-child{margin-bottom:0}.markdown-body table tr{background-color:var(--color-canvas-default);border-top:1px solid var(--color-border-muted)}.markdown-body table tr:nth-child(2n){background-color:var(--color-canvas-subtle)}.markdown-body table img{background-color:transparent}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body .emoji{max-width:none;vertical-align:text-top;background-color:transparent}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid var(--color-border-default)}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:var(--color-fg-default)}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:.2em .4em;margin:0;font-size:85%;white-space:break-spaces;background-color:var(--color-neutral-muted);border-radius:6px}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body samp{font-size:85%}.markdown-body pre code{font-size:100%}.markdown-body pre>code{padding:0;margin:0;word-break:normal;white-space:pre;background:transparent;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;color:var(--color-fg-default);background-color:var(--color-canvas-subtle);border-radius:6px}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-num{padding:10px 8px 9px;text-align:right;background:var(--color-canvas-default);border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:var(--base-text-weight-semibold, 600);background:var(--color-canvas-subtle);border-top:0}.markdown-body [data-footnote-ref]:before{content:"["}.markdown-body [data-footnote-ref]:after{content:"]"}.markdown-body .footnotes{font-size:12px;color:var(--color-fg-muted);border-top:1px solid var(--color-border-default)}.markdown-body .footnotes ol{padding-left:16px}.markdown-body .footnotes ol ul{display:inline-block;padding-left:16px;margin-top:16px}.markdown-body .footnotes li{position:relative}.markdown-body .footnotes li:target:before{position:absolute;top:-8px;right:-8px;bottom:-8px;left:-24px;pointer-events:none;content:"";border:2px solid var(--color-accent-emphasis);border-radius:6px}.markdown-body .footnotes li:target{color:var(--color-fg-default)}.markdown-body .footnotes .data-footnote-backref g-emoji{font-family:monospace}.markdown-body .pl-c{color:var(--color-prettylights-syntax-comment)}.markdown-body .pl-c1,.markdown-body .pl-s .pl-v{color:var(--color-prettylights-syntax-constant)}.markdown-body .pl-e,.markdown-body .pl-en{color:var(--color-prettylights-syntax-entity)}.markdown-body .pl-smi,.markdown-body .pl-s .pl-s1{color:var(--color-prettylights-syntax-storage-modifier-import)}.markdown-body .pl-ent{color:var(--color-prettylights-syntax-entity-tag)}.markdown-body .pl-k{color:var(--color-prettylights-syntax-keyword)}.markdown-body .pl-s,.markdown-body .pl-pds,.markdown-body .pl-s .pl-pse .pl-s1,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-sr .pl-sra{color:var(--color-prettylights-syntax-string)}.markdown-body .pl-v,.markdown-body .pl-smw{color:var(--color-prettylights-syntax-variable)}.markdown-body .pl-bu{color:var(--color-prettylights-syntax-brackethighlighter-unmatched)}.markdown-body .pl-ii{color:var(--color-prettylights-syntax-invalid-illegal-text);background-color:var(--color-prettylights-syntax-invalid-illegal-bg)}.markdown-body .pl-c2{color:var(--color-prettylights-syntax-carriage-return-text);background-color:var(--color-prettylights-syntax-carriage-return-bg)}.markdown-body .pl-sr .pl-cce{font-weight:700;color:var(--color-prettylights-syntax-string-regexp)}.markdown-body .pl-ml{color:var(--color-prettylights-syntax-markup-list)}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{font-weight:700;color:var(--color-prettylights-syntax-markup-heading)}.markdown-body .pl-mi{font-style:italic;color:var(--color-prettylights-syntax-markup-italic)}.markdown-body .pl-mb{font-weight:700;color:var(--color-prettylights-syntax-markup-bold)}.markdown-body .pl-md{color:var(--color-prettylights-syntax-markup-deleted-text);background-color:var(--color-prettylights-syntax-markup-deleted-bg)}.markdown-body .pl-mi1{color:var(--color-prettylights-syntax-markup-inserted-text);background-color:var(--color-prettylights-syntax-markup-inserted-bg)}.markdown-body .pl-mc{color:var(--color-prettylights-syntax-markup-changed-text);background-color:var(--color-prettylights-syntax-markup-changed-bg)}.markdown-body .pl-mi2{color:var(--color-prettylights-syntax-markup-ignored-text);background-color:var(--color-prettylights-syntax-markup-ignored-bg)}.markdown-body .pl-mdr{font-weight:700;color:var(--color-prettylights-syntax-meta-diff-range)}.markdown-body .pl-ba{color:var(--color-prettylights-syntax-brackethighlighter-angle)}.markdown-body .pl-sg{color:var(--color-prettylights-syntax-sublimelinter-gutter-mark)}.markdown-body .pl-corl{text-decoration:underline;color:var(--color-prettylights-syntax-constant-other-reference-link)}.markdown-body g-emoji{display:inline-block;min-width:1ch;font-family:"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;font-size:1em;font-style:normal!important;font-weight:var(--base-text-weight-normal, 400);line-height:1;vertical-align:-.075em}.markdown-body g-emoji img{width:1em;height:1em}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item label{font-weight:var(--base-text-weight-normal, 400)}.markdown-body .task-list-item.enabled label{cursor:pointer}.markdown-body .task-list-item+.task-list-item{margin-top:4px}.markdown-body .task-list-item .handle{display:none}.markdown-body .task-list-item-checkbox{margin:0 .2em .25em -1.4em;vertical-align:middle}.markdown-body .contains-task-list:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body .contains-task-list{position:relative}.markdown-body .contains-task-list:hover .task-list-item-convert-container,.markdown-body .contains-task-list:focus-within .task-list-item-convert-container{display:block;width:auto;height:24px;overflow:visible;clip:auto}.markdown-body ::-webkit-calendar-picker-indicator{filter:invert(50%)}.markdown-body .markdown-alert{padding:var(--base-size-8) var(--base-size-16);margin-bottom:16px;color:inherit;border-left:.25em solid var(--color-border-default)}.markdown-body .markdown-alert>:first-child{margin-top:0}.markdown-body .markdown-alert>:last-child{margin-bottom:0}.markdown-body .markdown-alert .markdown-alert-title{display:flex;font-weight:var(--base-text-weight-medium, 500);align-items:center;line-height:1}.markdown-body .markdown-alert.markdown-alert-note{border-left-color:var(--color-accent-emphasis)}.markdown-body .markdown-alert.markdown-alert-note .markdown-alert-title{color:var(--color-accent-fg)}.markdown-body .markdown-alert.markdown-alert-important{border-left-color:var(--color-done-emphasis)}.markdown-body .markdown-alert.markdown-alert-important .markdown-alert-title{color:var(--color-done-fg)}.markdown-body .markdown-alert.markdown-alert-warning{border-left-color:var(--color-attention-emphasis)}.markdown-body .markdown-alert.markdown-alert-warning .markdown-alert-title{color:var(--color-attention-fg)}.markdown-body .markdown-alert.markdown-alert-tip{border-left-color:var(--color-success-emphasis)}.markdown-body .markdown-alert.markdown-alert-tip .markdown-alert-title{color:var(--color-success-fg)}.markdown-body .markdown-alert.markdown-alert-caution{border-left-color:var(--color-danger-emphasis)}.markdown-body .markdown-alert.markdown-alert-caution .markdown-alert-title{color:var(--color-danger-fg)}.markdown-body[data-v-e0bd8a5a]{background:white;border:.5px solid lightgrey;margin:35px auto;box-sizing:border-box;min-width:200px;max-width:980px;padding:45px}@media (max-width: 767px){.markdown-body[data-v-e0bd8a5a]{padding:15px}} diff --git a/public/dist/assets/PdfView-3f48c404.js b/public/dist/assets/PdfView-3f48c404.js new file mode 100644 index 0000000..6770bd2 --- /dev/null +++ b/public/dist/assets/PdfView-3f48c404.js @@ -0,0 +1,15 @@ +var ii=Object.defineProperty;var si=(N,w,t)=>w in N?ii(N,w,{enumerable:!0,configurable:!0,writable:!0,value:t}):N[w]=t;var tt=(N,w,t)=>(si(N,typeof w!="symbol"?w+"":w,t),t),Jt=(N,w,t)=>{if(!w.has(N))throw TypeError("Cannot "+t)};var l=(N,w,t)=>(Jt(N,w,"read from private field"),t?t.call(N):w.get(N)),$=(N,w,t)=>{if(w.has(N))throw TypeError("Cannot add the same private member more than once");w instanceof WeakSet?w.add(N):w.set(N,t)},le=(N,w,t,p)=>(Jt(N,w,"write to private field"),p?p.call(N,t):w.set(N,t),t);var ut=(N,w,t,p)=>({set _(y){le(N,w,y,t)},get _(){return l(N,w,p)}}),J=(N,w,t)=>(Jt(N,w,"access private method"),t);import{x as require$$6,c as commonjsGlobal,d as defineComponent,r as ref,o as onMounted,a as openBlock,b as createElementBlock,k as createBaseVNode,q as pushScopeId,s as popScopeId,_ as _export_sfc}from"./index-be50c070.js";import{c as commonjsRequire}from"./_commonjs-dynamic-modules-302442b1.js";import{r as refWorker}from"./worker-ref-b3abaee8.js";var pdf$1={exports:{}},path2dPolyfill_esm={},hasRequiredPath2dPolyfill_esm;function requirePath2dPolyfill_esm(){if(hasRequiredPath2dPolyfill_esm)return path2dPolyfill_esm;hasRequiredPath2dPolyfill_esm=1;function N(a,r,o){if(o||arguments.length===2)for(var m=0,v=r.length,A;m2&&(r.push(N([s],b.splice(0,2),!0)),c="l",s=s==="m"?"l":"L"),b.length=w[c]&&b.length&&w[c];)r.push(N([s],b.splice(0,w[c]),!0));return""}),r}function u(a,r){var o=a.x*Math.cos(r)-a.y*Math.sin(r),m=a.y*Math.cos(r)+a.x*Math.sin(r);a.x=o,a.y=m}function g(a,r,o){a.x+=r,a.y+=o}function e(a,r){a.x*=r,a.y*=r}var i=function(){function a(r){var o;this.commands=[],r&&r instanceof a?(o=this.commands).push.apply(o,r.commands):r&&(this.commands=k(r))}return a.prototype.addPath=function(r){var o;r&&r instanceof a&&(o=this.commands).push.apply(o,r.commands)},a.prototype.moveTo=function(r,o){this.commands.push(["M",r,o])},a.prototype.lineTo=function(r,o){this.commands.push(["L",r,o])},a.prototype.arc=function(r,o,m,v,A,b){this.commands.push(["AC",r,o,m,v,A,!!b])},a.prototype.arcTo=function(r,o,m,v,A){this.commands.push(["AT",r,o,m,v,A])},a.prototype.ellipse=function(r,o,m,v,A,b,c,s){this.commands.push(["E",r,o,m,v,A,b,c,!!s])},a.prototype.closePath=function(){this.commands.push(["Z"])},a.prototype.bezierCurveTo=function(r,o,m,v,A,b){this.commands.push(["C",r,o,m,v,A,b])},a.prototype.quadraticCurveTo=function(r,o,m,v){this.commands.push(["Q",r,o,m,v])},a.prototype.rect=function(r,o,m,v){this.commands.push(["R",r,o,m,v])},a.prototype.roundRect=function(r,o,m,v,A){typeof A>"u"?this.commands.push(["RR",r,o,m,v,0]):this.commands.push(["RR",r,o,m,v,A])},a}();function n(a,r){var o=0,m=0,v,A,b,c,s,x,T,S,D,I,_,Q,W,j,he,Y,z,ee,oe,ye,Pe,L=null,P=null,M=null,E=null,R=null,O=null;a.beginPath();for(var B=0;B1&&(S=Math.sqrt(S),j*=S,he*=S),oe={x:j*x.y/he,y:-(he*x.x)/j},D=j*j*he*he,I=j*j*x.y*x.y+he*he*x.x*x.x,c!==b?e(oe,Math.sqrt((D-I)/I)||0):e(oe,-Math.sqrt((D-I)/I)||0),A=Math.atan2((x.y-oe.y)/he,(x.x-oe.x)/j),v=Math.atan2(-(x.y+oe.y)/he,-(x.x+oe.x)/j),u(oe,T),g(oe,(s.x+O.x)/2,(s.y+O.y)/2),a.save(),a.translate(oe.x,oe.y),a.rotate(T),a.scale(j,he),a.arc(0,0,1,A,v,!c),a.restore();break;case"C":F=r[B],L=F[3],P=F[4],o=F[5],m=F[6],a.bezierCurveTo(F[1],F[2],L,P,o,m);break;case"c":F=r[B],a.bezierCurveTo(F[1]+o,F[2]+m,F[3]+o,F[4]+m,F[5]+o,F[6]+m),L=F[3]+o,P=F[4]+m,o+=F[5],m+=F[6];break;case"S":F=r[B],(L===null||P===null)&&(L=o,P=m),a.bezierCurveTo(2*o-L,2*m-P,F[1],F[2],F[3],F[4]),L=F[1],P=F[2],o=F[3],m=F[4];break;case"s":F=r[B],(L===null||P===null)&&(L=o,P=m),a.bezierCurveTo(2*o-L,2*m-P,F[1]+o,F[2]+m,F[3]+o,F[4]+m),L=F[1]+o,P=F[2]+m,o+=F[3],m+=F[4];break;case"Q":F=r[B],M=F[1],E=F[2],o=F[3],m=F[4],a.quadraticCurveTo(M,E,o,m);break;case"q":F=r[B],M=F[1]+o,E=F[2]+m,o+=F[3],m+=F[4],a.quadraticCurveTo(M,E,o,m);break;case"T":F=r[B],(M===null||E===null)&&(M=o,E=m),M=2*o-M,E=2*m-E,o=F[1],m=F[2],a.quadraticCurveTo(M,E,o,m);break;case"t":F=r[B],(M===null||E===null)&&(M=o,E=m),M=2*o-M,E=2*m-E,o+=F[1],m+=F[2],a.quadraticCurveTo(M,E,o,m);break;case"z":case"Z":R&&(o=R.x,m=R.y),R=null,a.closePath();break;case"AC":F=r[B],o=F[1],m=F[2],W=F[3],A=F[4],v=F[5],ye=F[6],a.arc(o,m,W,A,v,ye);break;case"AT":F=r[B],_=F[1],Q=F[2],o=F[3],m=F[4],W=F[5],a.arcTo(_,Q,o,m,W);break;case"E":F=r[B],o=F[1],m=F[2],j=F[3],he=F[4],T=F[5],A=F[6],v=F[7],ye=F[8],a.save(),a.translate(o,m),a.rotate(T),a.scale(j,he),a.arc(0,0,1,A,v,ye),a.restore();break;case"R":F=r[B],o=F[1],m=F[2],Y=F[3],z=F[4],R={x:o,y:m},a.rect(o,m,Y,z);break;case"RR":F=r[B],o=F[1],m=F[2],Y=F[3],z=F[4],Pe=F[5],R={x:o,y:m},a.roundRect(o,m,Y,z,Pe);break}O?(O.x=o,O.y=m):O={x:o,y:m}}}function d(a){if(!(!a||!a.CanvasRenderingContext2D||a.Path2D)){var r=a.CanvasRenderingContext2D,o=r.prototype.fill,m=r.prototype.stroke,v=r.prototype.isPointInPath;r.prototype.fill=function(){for(var b=[],c=0;c4)throw new RangeError("Failed to execute 'roundRect' on '".concat(this.constructor.name,"': ").concat(v.length," radii provided. Between one and four radii are necessary."));v.forEach(function(S){if(S<0)throw new RangeError("Failed to execute 'roundRect' on '".concat(A.constructor.name,"': Radius value ").concat(S," is negative."))})}else return;if(v.length===1&&v[0]===0)return this.rect(a,r,o,m);var b=Math.min(o,m)/2,c,s,x,T=c=s=x=Math.min(b,v[0]);v.length===2&&(c=x=Math.min(b,v[1])),v.length===3&&(c=x=Math.min(b,v[1]),s=Math.min(b,v[2])),v.length===4&&(c=Math.min(b,v[1]),s=Math.min(b,v[2]),x=Math.min(b,v[3])),this.moveTo(a,r+m-x),this.arcTo(a,r,a+T,r,T),this.arcTo(a+o,r,a+o,r+c,c),this.arcTo(a+o,r+m,a+o-s,r+m,s),this.arcTo(a,r+m,a,r+m-x,x),this.moveTo(a,r)}function f(a){if(!(!a||!a.CanvasRenderingContext2D)){var r=a.CanvasRenderingContext2D,o=a.Path2D;r&&!r.prototype.roundRect&&(r.prototype.roundRect=h),o&&!o.prototype.roundRect&&(o.prototype.roundRect=h)}}return d(window),f(window),path2dPolyfill_esm}(function(module,exports){(function(w,t){module.exports=w.pdfjsLib=t()})(globalThis,()=>(()=>{var __webpack_modules__=[,(N,w,t)=>{var Je;Object.defineProperty(w,"__esModule",{value:!0}),w.VerbosityLevel=w.Util=w.UnknownErrorException=w.UnexpectedResponseException=w.TextRenderingMode=w.RenderingIntentFlag=w.PromiseCapability=w.PermissionFlag=w.PasswordResponses=w.PasswordException=w.PageActionEventType=w.OPS=w.MissingPDFException=w.MAX_IMAGE_SIZE_TO_CACHE=w.LINE_FACTOR=w.LINE_DESCENT_FACTOR=w.InvalidPDFException=w.ImageKind=w.IDENTITY_MATRIX=w.FormatError=w.FeatureTest=w.FONT_IDENTITY_MATRIX=w.DocumentActionEventType=w.CMapCompressionType=w.BaseException=w.BASELINE_FACTOR=w.AnnotationType=w.AnnotationReplyType=w.AnnotationPrefix=w.AnnotationMode=w.AnnotationFlag=w.AnnotationFieldFlag=w.AnnotationEditorType=w.AnnotationEditorPrefix=w.AnnotationEditorParamsType=w.AnnotationBorderStyleType=w.AnnotationActionEventType=w.AbortException=void 0,w.assert=oe,w.bytesToString=se,w.createValidAbsoluteUrl=Pe,w.getModificationDate=Ve,w.getUuid=Xe,w.getVerbosityLevel=he,w.info=Y,w.isArrayBuffer=Ce,w.isArrayEqual=Me,w.isNodeJS=void 0,w.normalizeUnicode=Ke,w.objectFromMap=me,w.objectSize=te,w.setVerbosityLevel=j,w.shadow=L,w.string32=pe,w.stringToBytes=q,w.stringToPDFString=ne,w.stringToUTF8String=ce,w.unreachable=ee,w.utf8StringToString=ge,w.warn=z,t(2),t(84),t(86),t(87),t(89),t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123);const p=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser");w.isNodeJS=p;const y=[1,0,0,1,0,0];w.IDENTITY_MATRIX=y;const k=[.001,0,0,.001,0,0];w.FONT_IDENTITY_MATRIX=k;const u=1e7;w.MAX_IMAGE_SIZE_TO_CACHE=u;const g=1.35;w.LINE_FACTOR=g;const e=.35;w.LINE_DESCENT_FACTOR=e;const i=e/g;w.BASELINE_FACTOR=i;const n={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256};w.RenderingIntentFlag=n;const d={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3};w.AnnotationMode=d;const h="pdfjs_internal_editor_";w.AnnotationEditorPrefix=h;const f={DISABLE:-1,NONE:0,FREETEXT:3,STAMP:13,INK:15};w.AnnotationEditorType=f;const a={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23};w.AnnotationEditorParamsType=a;const r={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};w.PermissionFlag=r;const o={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};w.TextRenderingMode=o;const m={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};w.ImageKind=m;const v={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};w.AnnotationType=v;const A={GROUP:"Group",REPLY:"R"};w.AnnotationReplyType=A;const b={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};w.AnnotationFlag=b;const c={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864};w.AnnotationFieldFlag=c;const s={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};w.AnnotationBorderStyleType=s;const x={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"};w.AnnotationActionEventType=x;const T={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};w.DocumentActionEventType=T;const S={O:"PageOpen",C:"PageClose"};w.PageActionEventType=S;const D={ERRORS:0,WARNINGS:1,INFOS:5};w.VerbosityLevel=D;const I={NONE:0,BINARY:1};w.CMapCompressionType=I;const _={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};w.OPS=_;const Q={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};w.PasswordResponses=Q;let W=D.WARNINGS;function j(V){Number.isInteger(V)&&(W=V)}function he(){return W}function Y(V){W>=D.INFOS&&console.log(`Info: ${V}`)}function z(V){W>=D.WARNINGS&&console.log(`Warning: ${V}`)}function ee(V){throw new Error(V)}function oe(V,H){V||ee(H)}function ye(V){switch(V==null?void 0:V.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function Pe(V){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!V)return null;try{if(X&&typeof V=="string"){if(X.addDefaultProtocol&&V.startsWith("www.")){const Ee=V.match(/\./g);(Ee==null?void 0:Ee.length)>=2&&(V=`http://${V}`)}if(X.tryConvertEncoding)try{V=ce(V)}catch{}}const de=H?new URL(V,H):new URL(V);if(ye(de))return de}catch{}return null}function L(V,H,X){let de=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Object.defineProperty(V,H,{value:X,enumerable:!de,configurable:!0,writable:!1}),X}const P=function(){function H(X,de){this.constructor===H&&ee("Cannot initialize BaseException."),this.message=X,this.name=de}return H.prototype=new Error,H.constructor=H,H}();w.BaseException=P;class M extends P{constructor(H,X){super(H,"PasswordException"),this.code=X}}w.PasswordException=M;class E extends P{constructor(H,X){super(H,"UnknownErrorException"),this.details=X}}w.UnknownErrorException=E;class R extends P{constructor(H){super(H,"InvalidPDFException")}}w.InvalidPDFException=R;class O extends P{constructor(H){super(H,"MissingPDFException")}}w.MissingPDFException=O;class B extends P{constructor(H,X){super(H,"UnexpectedResponseException"),this.status=X}}w.UnexpectedResponseException=B;class F extends P{constructor(H){super(H,"FormatError")}}w.FormatError=F;class Z extends P{constructor(H){super(H,"AbortException")}}w.AbortException=Z;function se(V){(typeof V!="object"||(V==null?void 0:V.length)===void 0)&&ee("Invalid argument for bytesToString");const H=V.length,X=8192;if(H>24&255,V>>16&255,V>>8&255,V&255)}function te(V){return Object.keys(V).length}function me(V){const H=Object.create(null);for(const[X,de]of V)H[X]=de;return H}function ve(){const V=new Uint8Array(4);return V[0]=1,new Uint32Array(V.buffer,0,1)[0]===1}function Re(){try{return new Function(""),!0}catch{return!1}}class Oe{static get isLittleEndian(){return L(this,"isLittleEndian",ve())}static get isEvalSupported(){return L(this,"isEvalSupported",Re())}static get isOffscreenCanvasSupported(){return L(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator>"u"?L(this,"platform",{isWin:!1,isMac:!1}):L(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}static get isCSSRoundSupported(){var H,X;return L(this,"isCSSRoundSupported",(X=(H=globalThis.CSS)==null?void 0:H.supports)==null?void 0:X.call(H,"width: round(1.5px, 1px)"))}}w.FeatureTest=Oe;const Ie=[...Array(256).keys()].map(V=>V.toString(16).padStart(2,"0"));class Le{static makeHexColor(H,X,de){return`#${Ie[H]}${Ie[X]}${Ie[de]}`}static scaleMinMax(H,X){let de;H[0]?(H[0]<0&&(de=X[0],X[0]=X[1],X[1]=de),X[0]*=H[0],X[1]*=H[0],H[3]<0&&(de=X[2],X[2]=X[3],X[3]=de),X[2]*=H[3],X[3]*=H[3]):(de=X[0],X[0]=X[2],X[2]=de,de=X[1],X[1]=X[3],X[3]=de,H[1]<0&&(de=X[2],X[2]=X[3],X[3]=de),X[2]*=H[1],X[3]*=H[1],H[2]<0&&(de=X[0],X[0]=X[1],X[1]=de),X[0]*=H[2],X[1]*=H[2]),X[0]+=H[4],X[1]+=H[4],X[2]+=H[5],X[3]+=H[5]}static transform(H,X){return[H[0]*X[0]+H[2]*X[1],H[1]*X[0]+H[3]*X[1],H[0]*X[2]+H[2]*X[3],H[1]*X[2]+H[3]*X[3],H[0]*X[4]+H[2]*X[5]+H[4],H[1]*X[4]+H[3]*X[5]+H[5]]}static applyTransform(H,X){const de=H[0]*X[0]+H[1]*X[2]+X[4],Ee=H[0]*X[1]+H[1]*X[3]+X[5];return[de,Ee]}static applyInverseTransform(H,X){const de=X[0]*X[3]-X[1]*X[2],Ee=(H[0]*X[3]-H[1]*X[2]+X[2]*X[5]-X[4]*X[3])/de,K=(-H[0]*X[1]+H[1]*X[0]+X[4]*X[1]-X[5]*X[0])/de;return[Ee,K]}static getAxialAlignedBoundingBox(H,X){const de=this.applyTransform(H,X),Ee=this.applyTransform(H.slice(2,4),X),K=this.applyTransform([H[0],H[3]],X),U=this.applyTransform([H[2],H[1]],X);return[Math.min(de[0],Ee[0],K[0],U[0]),Math.min(de[1],Ee[1],K[1],U[1]),Math.max(de[0],Ee[0],K[0],U[0]),Math.max(de[1],Ee[1],K[1],U[1])]}static inverseTransform(H){const X=H[0]*H[3]-H[1]*H[2];return[H[3]/X,-H[1]/X,-H[2]/X,H[0]/X,(H[2]*H[5]-H[4]*H[3])/X,(H[4]*H[1]-H[5]*H[0])/X]}static singularValueDecompose2dScale(H){const X=[H[0],H[2],H[1],H[3]],de=H[0]*X[0]+H[1]*X[2],Ee=H[0]*X[1]+H[1]*X[3],K=H[2]*X[0]+H[3]*X[2],U=H[2]*X[1]+H[3]*X[3],ie=(de+U)/2,Ae=Math.sqrt((de+U)**2-4*(de*U-K*Ee))/2,Se=ie+Ae||1,we=ie-Ae||1;return[Math.sqrt(Se),Math.sqrt(we)]}static normalizeRect(H){const X=H.slice(0);return H[0]>H[2]&&(X[0]=H[2],X[2]=H[0]),H[1]>H[3]&&(X[1]=H[3],X[3]=H[1]),X}static intersect(H,X){const de=Math.max(Math.min(H[0],H[2]),Math.min(X[0],X[2])),Ee=Math.min(Math.max(H[0],H[2]),Math.max(X[0],X[2]));if(de>Ee)return null;const K=Math.max(Math.min(H[1],H[3]),Math.min(X[1],X[3])),U=Math.min(Math.max(H[1],H[3]),Math.max(X[1],X[3]));return K>U?null:[de,K,Ee,U]}static bezierBoundingBox(H,X,de,Ee,K,U,ie,Ae){const Se=[],we=[[],[]];let Te,Ne,ke,Ue,Be,re,C,G;for(let xe=0;xe<2;++xe){if(xe===0?(Ne=6*H-12*de+6*K,Te=-3*H+9*de-9*K+3*ie,ke=3*de-3*H):(Ne=6*X-12*Ee+6*U,Te=-3*X+9*Ee-9*U+3*Ae,ke=3*Ee-3*X),Math.abs(Te)<1e-12){if(Math.abs(Ne)<1e-12)continue;Ue=-ke/Ne,0="ï"){let X;if(V[0]==="þ"&&V[1]==="ÿ"?X="utf-16be":V[0]==="ÿ"&&V[1]==="þ"?X="utf-16le":V[0]==="ï"&&V[1]==="»"&&V[2]==="¿"&&(X="utf-8"),X)try{const de=new TextDecoder(X,{fatal:!0}),Ee=q(V);return de.decode(Ee)}catch(de){z(`stringToPDFString: "${de}".`)}}const H=[];for(let X=0,de=V.length;X0&&arguments[0]!==void 0?arguments[0]:new Date;return[V.getUTCFullYear().toString(),(V.getUTCMonth()+1).toString().padStart(2,"0"),V.getUTCDate().toString().padStart(2,"0"),V.getUTCHours().toString().padStart(2,"0"),V.getUTCMinutes().toString().padStart(2,"0"),V.getUTCSeconds().toString().padStart(2,"0")].join("")}class ze{constructor(){$(this,Je,!1);this.promise=new Promise((H,X)=>{this.resolve=de=>{le(this,Je,!0),H(de)},this.reject=de=>{le(this,Je,!0),X(de)}})}get settled(){return l(this,Je)}}Je=new WeakMap,w.PromiseCapability=ze;let _e=null,He=null;function Ke(V){return _e||(_e=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,He=new Map([["ſt","ſt"]])),V.replaceAll(_e,(H,X,de)=>X?X.normalize("NFKC"):He.get(de))}function Xe(){if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.randomUUID)=="function")return crypto.randomUUID();const V=new Uint8Array(32);if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.getRandomValues)=="function")crypto.getRandomValues(V);else for(let H=0;H<32;H++)V[H]=Math.floor(Math.random()*255);return se(V)}const je="pdfjs_internal_id_";w.AnnotationPrefix=je},(N,w,t)=>{var p=t(3),y=t(4),k=t(69),u=t(70),g="WebAssembly",e=y[g],i=Error("e",{cause:7}).cause!==7,n=function(h,f){var a={};a[h]=u(h,f,i),p({global:!0,constructor:!0,arity:1,forced:i},a)},d=function(h,f){if(e&&e[h]){var a={};a[h]=u(g+"."+h,f,i),p({target:g,stat:!0,constructor:!0,arity:1,forced:i},a)}};n("Error",function(h){return function(a){return k(h,this,arguments)}}),n("EvalError",function(h){return function(a){return k(h,this,arguments)}}),n("RangeError",function(h){return function(a){return k(h,this,arguments)}}),n("ReferenceError",function(h){return function(a){return k(h,this,arguments)}}),n("SyntaxError",function(h){return function(a){return k(h,this,arguments)}}),n("TypeError",function(h){return function(a){return k(h,this,arguments)}}),n("URIError",function(h){return function(a){return k(h,this,arguments)}}),d("CompileError",function(h){return function(a){return k(h,this,arguments)}}),d("LinkError",function(h){return function(a){return k(h,this,arguments)}}),d("RuntimeError",function(h){return function(a){return k(h,this,arguments)}})},(N,w,t)=>{var p=t(4),y=t(5).f,k=t(44),u=t(48),g=t(38),e=t(56),i=t(68);N.exports=function(n,d){var h=n.target,f=n.global,a=n.stat,r,o,m,v,A,b;if(f?o=p:a?o=p[h]||g(h,{}):o=(p[h]||{}).prototype,o)for(m in d){if(A=d[m],n.dontCallGetSet?(b=y(o,m),v=b&&b.value):v=o[m],r=i(f?m:h+(a?".":"#")+m,n.forced),!r&&v!==void 0){if(typeof A==typeof v)continue;e(A,v)}(n.sham||v&&v.sham)&&k(A,"sham",!0),u(o,m,A,n)}}},function(N){var w=function(t){return t&&t.Math===Math&&t};N.exports=w(typeof globalThis=="object"&&globalThis)||w(typeof window=="object"&&window)||w(typeof self=="object"&&self)||w(typeof commonjsGlobal=="object"&&commonjsGlobal)||function(){return this}()||this||Function("return this")()},(N,w,t)=>{var p=t(6),y=t(8),k=t(10),u=t(11),g=t(12),e=t(18),i=t(39),n=t(42),d=Object.getOwnPropertyDescriptor;w.f=p?d:function(f,a){if(f=g(f),a=e(a),n)try{return d(f,a)}catch{}if(i(f,a))return u(!y(k.f,f,a),f[a])}},(N,w,t)=>{var p=t(7);N.exports=!p(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},N=>{N.exports=function(w){try{return!!w()}catch{return!0}}},(N,w,t)=>{var p=t(9),y=Function.prototype.call;N.exports=p?y.bind(y):function(){return y.apply(y,arguments)}},(N,w,t)=>{var p=t(7);N.exports=!p(function(){var y=(function(){}).bind();return typeof y!="function"||y.hasOwnProperty("prototype")})},(N,w)=>{var t={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,y=p&&!t.call({1:2},1);w.f=y?function(u){var g=p(this,u);return!!g&&g.enumerable}:t},N=>{N.exports=function(w,t){return{enumerable:!(w&1),configurable:!(w&2),writable:!(w&4),value:t}}},(N,w,t)=>{var p=t(13),y=t(16);N.exports=function(k){return p(y(k))}},(N,w,t)=>{var p=t(14),y=t(7),k=t(15),u=Object,g=p("".split);N.exports=y(function(){return!u("z").propertyIsEnumerable(0)})?function(e){return k(e)==="String"?g(e,""):u(e)}:u},(N,w,t)=>{var p=t(9),y=Function.prototype,k=y.call,u=p&&y.bind.bind(k,k);N.exports=p?u:function(g){return function(){return k.apply(g,arguments)}}},(N,w,t)=>{var p=t(14),y=p({}.toString),k=p("".slice);N.exports=function(u){return k(y(u),8,-1)}},(N,w,t)=>{var p=t(17),y=TypeError;N.exports=function(k){if(p(k))throw y("Can't call method on "+k);return k}},N=>{N.exports=function(w){return w==null}},(N,w,t)=>{var p=t(19),y=t(23);N.exports=function(k){var u=p(k,"string");return y(u)?u:u+""}},(N,w,t)=>{var p=t(8),y=t(20),k=t(23),u=t(30),g=t(33),e=t(34),i=TypeError,n=e("toPrimitive");N.exports=function(d,h){if(!y(d)||k(d))return d;var f=u(d,n),a;if(f){if(h===void 0&&(h="default"),a=p(f,d,h),!y(a)||k(a))return a;throw i("Can't convert object to primitive value")}return h===void 0&&(h="number"),g(d,h)}},(N,w,t)=>{var p=t(21),y=t(22),k=y.all;N.exports=y.IS_HTMLDDA?function(u){return typeof u=="object"?u!==null:p(u)||u===k}:function(u){return typeof u=="object"?u!==null:p(u)}},(N,w,t)=>{var p=t(22),y=p.all;N.exports=p.IS_HTMLDDA?function(k){return typeof k=="function"||k===y}:function(k){return typeof k=="function"}},N=>{var w=typeof document=="object"&&document.all,t=typeof w>"u"&&w!==void 0;N.exports={all:w,IS_HTMLDDA:t}},(N,w,t)=>{var p=t(24),y=t(21),k=t(25),u=t(26),g=Object;N.exports=u?function(e){return typeof e=="symbol"}:function(e){var i=p("Symbol");return y(i)&&k(i.prototype,g(e))}},(N,w,t)=>{var p=t(4),y=t(21),k=function(u){return y(u)?u:void 0};N.exports=function(u,g){return arguments.length<2?k(p[u]):p[u]&&p[u][g]}},(N,w,t)=>{var p=t(14);N.exports=p({}.isPrototypeOf)},(N,w,t)=>{var p=t(27);N.exports=p&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},(N,w,t)=>{var p=t(28),y=t(7),k=t(4),u=k.String;N.exports=!!Object.getOwnPropertySymbols&&!y(function(){var g=Symbol("symbol detection");return!u(g)||!(Object(g)instanceof Symbol)||!Symbol.sham&&p&&p<41})},(N,w,t)=>{var p=t(4),y=t(29),k=p.process,u=p.Deno,g=k&&k.versions||u&&u.version,e=g&&g.v8,i,n;e&&(i=e.split("."),n=i[0]>0&&i[0]<4?1:+(i[0]+i[1])),!n&&y&&(i=y.match(/Edge\/(\d+)/),(!i||i[1]>=74)&&(i=y.match(/Chrome\/(\d+)/),i&&(n=+i[1]))),N.exports=n},N=>{N.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},(N,w,t)=>{var p=t(31),y=t(17);N.exports=function(k,u){var g=k[u];return y(g)?void 0:p(g)}},(N,w,t)=>{var p=t(21),y=t(32),k=TypeError;N.exports=function(u){if(p(u))return u;throw k(y(u)+" is not a function")}},N=>{var w=String;N.exports=function(t){try{return w(t)}catch{return"Object"}}},(N,w,t)=>{var p=t(8),y=t(21),k=t(20),u=TypeError;N.exports=function(g,e){var i,n;if(e==="string"&&y(i=g.toString)&&!k(n=p(i,g))||y(i=g.valueOf)&&!k(n=p(i,g))||e!=="string"&&y(i=g.toString)&&!k(n=p(i,g)))return n;throw u("Can't convert object to primitive value")}},(N,w,t)=>{var p=t(4),y=t(35),k=t(39),u=t(41),g=t(27),e=t(26),i=p.Symbol,n=y("wks"),d=e?i.for||i:i&&i.withoutSetter||u;N.exports=function(h){return k(n,h)||(n[h]=g&&k(i,h)?i[h]:d("Symbol."+h)),n[h]}},(N,w,t)=>{var p=t(36),y=t(37);(N.exports=function(k,u){return y[k]||(y[k]=u!==void 0?u:{})})("versions",[]).push({version:"3.32.2",mode:p?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.2/LICENSE",source:"https://github.com/zloirock/core-js"})},N=>{N.exports=!1},(N,w,t)=>{var p=t(4),y=t(38),k="__core-js_shared__",u=p[k]||y(k,{});N.exports=u},(N,w,t)=>{var p=t(4),y=Object.defineProperty;N.exports=function(k,u){try{y(p,k,{value:u,configurable:!0,writable:!0})}catch{p[k]=u}return u}},(N,w,t)=>{var p=t(14),y=t(40),k=p({}.hasOwnProperty);N.exports=Object.hasOwn||function(g,e){return k(y(g),e)}},(N,w,t)=>{var p=t(16),y=Object;N.exports=function(k){return y(p(k))}},(N,w,t)=>{var p=t(14),y=0,k=Math.random(),u=p(1 .toString);N.exports=function(g){return"Symbol("+(g===void 0?"":g)+")_"+u(++y+k,36)}},(N,w,t)=>{var p=t(6),y=t(7),k=t(43);N.exports=!p&&!y(function(){return Object.defineProperty(k("div"),"a",{get:function(){return 7}}).a!==7})},(N,w,t)=>{var p=t(4),y=t(20),k=p.document,u=y(k)&&y(k.createElement);N.exports=function(g){return u?k.createElement(g):{}}},(N,w,t)=>{var p=t(6),y=t(45),k=t(11);N.exports=p?function(u,g,e){return y.f(u,g,k(1,e))}:function(u,g,e){return u[g]=e,u}},(N,w,t)=>{var p=t(6),y=t(42),k=t(46),u=t(47),g=t(18),e=TypeError,i=Object.defineProperty,n=Object.getOwnPropertyDescriptor,d="enumerable",h="configurable",f="writable";w.f=p?k?function(r,o,m){if(u(r),o=g(o),u(m),typeof r=="function"&&o==="prototype"&&"value"in m&&f in m&&!m[f]){var v=n(r,o);v&&v[f]&&(r[o]=m.value,m={configurable:h in m?m[h]:v[h],enumerable:d in m?m[d]:v[d],writable:!1})}return i(r,o,m)}:i:function(r,o,m){if(u(r),o=g(o),u(m),y)try{return i(r,o,m)}catch{}if("get"in m||"set"in m)throw e("Accessors not supported");return"value"in m&&(r[o]=m.value),r}},(N,w,t)=>{var p=t(6),y=t(7);N.exports=p&&y(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},(N,w,t)=>{var p=t(20),y=String,k=TypeError;N.exports=function(u){if(p(u))return u;throw k(y(u)+" is not an object")}},(N,w,t)=>{var p=t(21),y=t(45),k=t(49),u=t(38);N.exports=function(g,e,i,n){n||(n={});var d=n.enumerable,h=n.name!==void 0?n.name:e;if(p(i)&&k(i,h,n),n.global)d?g[e]=i:u(e,i);else{try{n.unsafe?g[e]&&(d=!0):delete g[e]}catch{}d?g[e]=i:y.f(g,e,{value:i,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return g}},(N,w,t)=>{var p=t(14),y=t(7),k=t(21),u=t(39),g=t(6),e=t(50).CONFIGURABLE,i=t(51),n=t(52),d=n.enforce,h=n.get,f=String,a=Object.defineProperty,r=p("".slice),o=p("".replace),m=p([].join),v=g&&!y(function(){return a(function(){},"length",{value:8}).length!==8}),A=String(String).split("String"),b=N.exports=function(c,s,x){r(f(s),0,7)==="Symbol("&&(s="["+o(f(s),/^Symbol\(([^)]*)\)/,"$1")+"]"),x&&x.getter&&(s="get "+s),x&&x.setter&&(s="set "+s),(!u(c,"name")||e&&c.name!==s)&&(g?a(c,"name",{value:s,configurable:!0}):c.name=s),v&&x&&u(x,"arity")&&c.length!==x.arity&&a(c,"length",{value:x.arity});try{x&&u(x,"constructor")&&x.constructor?g&&a(c,"prototype",{writable:!1}):c.prototype&&(c.prototype=void 0)}catch{}var T=d(c);return u(T,"source")||(T.source=m(A,typeof s=="string"?s:"")),c};Function.prototype.toString=b(function(){return k(this)&&h(this).source||i(this)},"toString")},(N,w,t)=>{var p=t(6),y=t(39),k=Function.prototype,u=p&&Object.getOwnPropertyDescriptor,g=y(k,"name"),e=g&&(function(){}).name==="something",i=g&&(!p||p&&u(k,"name").configurable);N.exports={EXISTS:g,PROPER:e,CONFIGURABLE:i}},(N,w,t)=>{var p=t(14),y=t(21),k=t(37),u=p(Function.toString);y(k.inspectSource)||(k.inspectSource=function(g){return u(g)}),N.exports=k.inspectSource},(N,w,t)=>{var p=t(53),y=t(4),k=t(20),u=t(44),g=t(39),e=t(37),i=t(54),n=t(55),d="Object already initialized",h=y.TypeError,f=y.WeakMap,a,r,o,m=function(c){return o(c)?r(c):a(c,{})},v=function(c){return function(s){var x;if(!k(s)||(x=r(s)).type!==c)throw h("Incompatible receiver, "+c+" required");return x}};if(p||e.state){var A=e.state||(e.state=new f);A.get=A.get,A.has=A.has,A.set=A.set,a=function(c,s){if(A.has(c))throw h(d);return s.facade=c,A.set(c,s),s},r=function(c){return A.get(c)||{}},o=function(c){return A.has(c)}}else{var b=i("state");n[b]=!0,a=function(c,s){if(g(c,b))throw h(d);return s.facade=c,u(c,b,s),s},r=function(c){return g(c,b)?c[b]:{}},o=function(c){return g(c,b)}}N.exports={set:a,get:r,has:o,enforce:m,getterFor:v}},(N,w,t)=>{var p=t(4),y=t(21),k=p.WeakMap;N.exports=y(k)&&/native code/.test(String(k))},(N,w,t)=>{var p=t(35),y=t(41),k=p("keys");N.exports=function(u){return k[u]||(k[u]=y(u))}},N=>{N.exports={}},(N,w,t)=>{var p=t(39),y=t(57),k=t(5),u=t(45);N.exports=function(g,e,i){for(var n=y(e),d=u.f,h=k.f,f=0;f{var p=t(24),y=t(14),k=t(58),u=t(67),g=t(47),e=y([].concat);N.exports=p("Reflect","ownKeys")||function(n){var d=k.f(g(n)),h=u.f;return h?e(d,h(n)):d}},(N,w,t)=>{var p=t(59),y=t(66),k=y.concat("length","prototype");w.f=Object.getOwnPropertyNames||function(g){return p(g,k)}},(N,w,t)=>{var p=t(14),y=t(39),k=t(12),u=t(60).indexOf,g=t(55),e=p([].push);N.exports=function(i,n){var d=k(i),h=0,f=[],a;for(a in d)!y(g,a)&&y(d,a)&&e(f,a);for(;n.length>h;)y(d,a=n[h++])&&(~u(f,a)||e(f,a));return f}},(N,w,t)=>{var p=t(12),y=t(61),k=t(64),u=function(g){return function(e,i,n){var d=p(e),h=k(d),f=y(n,h),a;if(g&&i!==i){for(;h>f;)if(a=d[f++],a!==a)return!0}else for(;h>f;f++)if((g||f in d)&&d[f]===i)return g||f||0;return!g&&-1}};N.exports={includes:u(!0),indexOf:u(!1)}},(N,w,t)=>{var p=t(62),y=Math.max,k=Math.min;N.exports=function(u,g){var e=p(u);return e<0?y(e+g,0):k(e,g)}},(N,w,t)=>{var p=t(63);N.exports=function(y){var k=+y;return k!==k||k===0?0:p(k)}},N=>{var w=Math.ceil,t=Math.floor;N.exports=Math.trunc||function(y){var k=+y;return(k>0?t:w)(k)}},(N,w,t)=>{var p=t(65);N.exports=function(y){return p(y.length)}},(N,w,t)=>{var p=t(62),y=Math.min;N.exports=function(k){return k>0?y(p(k),9007199254740991):0}},N=>{N.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(N,w)=>{w.f=Object.getOwnPropertySymbols},(N,w,t)=>{var p=t(7),y=t(21),k=/#|\.prototype\./,u=function(d,h){var f=e[g(d)];return f===n?!0:f===i?!1:y(h)?p(h):!!h},g=u.normalize=function(d){return String(d).replace(k,".").toLowerCase()},e=u.data={},i=u.NATIVE="N",n=u.POLYFILL="P";N.exports=u},(N,w,t)=>{var p=t(9),y=Function.prototype,k=y.apply,u=y.call;N.exports=typeof Reflect=="object"&&Reflect.apply||(p?u.bind(k):function(){return u.apply(k,arguments)})},(N,w,t)=>{var p=t(24),y=t(39),k=t(44),u=t(25),g=t(71),e=t(56),i=t(74),n=t(75),d=t(76),h=t(80),f=t(81),a=t(6),r=t(36);N.exports=function(o,m,v,A){var b="stackTraceLimit",c=A?2:1,s=o.split("."),x=s[s.length-1],T=p.apply(null,s);if(T){var S=T.prototype;if(!r&&y(S,"cause")&&delete S.cause,!v)return T;var D=p("Error"),I=m(function(_,Q){var W=d(A?Q:_,void 0),j=A?new T(_):new T;return W!==void 0&&k(j,"message",W),f(j,I,j.stack,2),this&&u(S,this)&&n(j,this,I),arguments.length>c&&h(j,arguments[c]),j});if(I.prototype=S,x!=="Error"?g?g(I,D):e(I,D,{name:!0}):a&&b in T&&(i(I,T,b),i(I,T,"prepareStackTrace")),e(I,T),!r)try{S.name!==x&&k(S,"name",x),S.constructor=I}catch{}return I}}},(N,w,t)=>{var p=t(72),y=t(47),k=t(73);N.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var u=!1,g={},e;try{e=p(Object.prototype,"__proto__","set"),e(g,[]),u=g instanceof Array}catch{}return function(n,d){return y(n),k(d),u?e(n,d):n.__proto__=d,n}}():void 0)},(N,w,t)=>{var p=t(14),y=t(31);N.exports=function(k,u,g){try{return p(y(Object.getOwnPropertyDescriptor(k,u)[g]))}catch{}}},(N,w,t)=>{var p=t(21),y=String,k=TypeError;N.exports=function(u){if(typeof u=="object"||p(u))return u;throw k("Can't set "+y(u)+" as a prototype")}},(N,w,t)=>{var p=t(45).f;N.exports=function(y,k,u){u in y||p(y,u,{configurable:!0,get:function(){return k[u]},set:function(g){k[u]=g}})}},(N,w,t)=>{var p=t(21),y=t(20),k=t(71);N.exports=function(u,g,e){var i,n;return k&&p(i=g.constructor)&&i!==e&&y(n=i.prototype)&&n!==e.prototype&&k(u,n),u}},(N,w,t)=>{var p=t(77);N.exports=function(y,k){return y===void 0?arguments.length<2?"":k:p(y)}},(N,w,t)=>{var p=t(78),y=String;N.exports=function(k){if(p(k)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return y(k)}},(N,w,t)=>{var p=t(79),y=t(21),k=t(15),u=t(34),g=u("toStringTag"),e=Object,i=k(function(){return arguments}())==="Arguments",n=function(d,h){try{return d[h]}catch{}};N.exports=p?k:function(d){var h,f,a;return d===void 0?"Undefined":d===null?"Null":typeof(f=n(h=e(d),g))=="string"?f:i?k(h):(a=k(h))==="Object"&&y(h.callee)?"Arguments":a}},(N,w,t)=>{var p=t(34),y=p("toStringTag"),k={};k[y]="z",N.exports=String(k)==="[object z]"},(N,w,t)=>{var p=t(20),y=t(44);N.exports=function(k,u){p(u)&&"cause"in u&&y(k,"cause",u.cause)}},(N,w,t)=>{var p=t(44),y=t(82),k=t(83),u=Error.captureStackTrace;N.exports=function(g,e,i,n){k&&(u?u(g,e):p(g,"stack",y(i,n)))}},(N,w,t)=>{var p=t(14),y=Error,k=p("".replace),u=function(i){return String(y(i).stack)}("zxcasd"),g=/\n\s*at [^:]*:[^\n]*/,e=g.test(u);N.exports=function(i,n){if(e&&typeof i=="string"&&!y.prepareStackTrace)for(;n--;)i=k(i,g,"");return i}},(N,w,t)=>{var p=t(7),y=t(11);N.exports=!p(function(){var k=Error("a");return"stack"in k?(Object.defineProperty(k,"stack",y(1,7)),k.stack!==7):!0})},(N,w,t)=>{var p=t(48),y=t(14),k=t(77),u=t(85),g=URLSearchParams,e=g.prototype,i=y(e.append),n=y(e.delete),d=y(e.forEach),h=y([].push),f=new g("a=1&a=2&b=3");f.delete("a",1),f.delete("b",void 0),f+""!="a=2"&&p(e,"delete",function(a){var r=arguments.length,o=r<2?void 0:arguments[1];if(r&&o===void 0)return n(this,a);var m=[];d(this,function(S,D){h(m,{key:D,value:S})}),u(r,1);for(var v=k(a),A=k(o),b=0,c=0,s=!1,x=m.length,T;b{var w=TypeError;N.exports=function(t,p){if(t{var p=t(48),y=t(14),k=t(77),u=t(85),g=URLSearchParams,e=g.prototype,i=y(e.getAll),n=y(e.has),d=new g("a=1");(d.has("a",2)||!d.has("a",void 0))&&p(e,"has",function(f){var a=arguments.length,r=a<2?void 0:arguments[1];if(a&&r===void 0)return n(this,f);var o=i(this,f);u(a,1);for(var m=k(r),v=0;v{var p=t(6),y=t(14),k=t(88),u=URLSearchParams.prototype,g=y(u.forEach);p&&!("size"in u)&&k(u,"size",{get:function(){var i=0;return g(this,function(){i++}),i},configurable:!0,enumerable:!0})},(N,w,t)=>{var p=t(49),y=t(45);N.exports=function(k,u,g){return g.get&&p(g.get,u,{getter:!0}),g.set&&p(g.set,u,{setter:!0}),y.f(k,u,g)}},(N,w,t)=>{var p=t(3),y=t(40),k=t(64),u=t(90),g=t(92),e=t(7),i=e(function(){return[].push.call({length:4294967296},1)!==4294967297}),n=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(h){return h instanceof TypeError}},d=i||!n();p({target:"Array",proto:!0,arity:1,forced:d},{push:function(f){var a=y(this),r=k(a),o=arguments.length;g(r+o);for(var m=0;m{var p=t(6),y=t(91),k=TypeError,u=Object.getOwnPropertyDescriptor,g=p&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();N.exports=g?function(e,i){if(y(e)&&!u(e,"length").writable)throw k("Cannot set read only .length");return e.length=i}:function(e,i){return e.length=i}},(N,w,t)=>{var p=t(15);N.exports=Array.isArray||function(k){return p(k)==="Array"}},N=>{var w=TypeError,t=9007199254740991;N.exports=function(p){if(p>t)throw w("Maximum allowed index exceeded");return p}},(N,w,t)=>{var p=t(94),y=t(98).findLast,k=p.aTypedArray,u=p.exportTypedArrayMethod;u("findLast",function(e){return y(k(this),e,arguments.length>1?arguments[1]:void 0)})},(N,w,t)=>{var p=t(95),y=t(6),k=t(4),u=t(21),g=t(20),e=t(39),i=t(78),n=t(32),d=t(44),h=t(48),f=t(88),a=t(25),r=t(96),o=t(71),m=t(34),v=t(41),A=t(52),b=A.enforce,c=A.get,s=k.Int8Array,x=s&&s.prototype,T=k.Uint8ClampedArray,S=T&&T.prototype,D=s&&r(s),I=x&&r(x),_=Object.prototype,Q=k.TypeError,W=m("toStringTag"),j=v("TYPED_ARRAY_TAG"),he="TypedArrayConstructor",Y=p&&!!o&&i(k.opera)!=="Opera",z=!1,ee,oe,ye,Pe={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},L={BigInt64Array:8,BigUint64Array:8},P=function(se){if(!g(se))return!1;var q=i(se);return q==="DataView"||e(Pe,q)||e(L,q)},M=function(Z){var se=r(Z);if(g(se)){var q=c(se);return q&&e(q,he)?q[he]:M(se)}},E=function(Z){if(!g(Z))return!1;var se=i(Z);return e(Pe,se)||e(L,se)},R=function(Z){if(E(Z))return Z;throw Q("Target is not a typed array")},O=function(Z){if(u(Z)&&(!o||a(D,Z)))return Z;throw Q(n(Z)+" is not a typed array constructor")},B=function(Z,se,q,pe){if(y){if(q)for(var te in Pe){var me=k[te];if(me&&e(me.prototype,Z))try{delete me.prototype[Z]}catch{try{me.prototype[Z]=se}catch{}}}(!I[Z]||q)&&h(I,Z,q?se:Y&&x[Z]||se,pe)}},F=function(Z,se,q){var pe,te;if(y){if(o){if(q){for(pe in Pe)if(te=k[pe],te&&e(te,Z))try{delete te[Z]}catch{}}if(!D[Z]||q)try{return h(D,Z,q?se:Y&&D[Z]||se)}catch{}else return}for(pe in Pe)te=k[pe],te&&(!te[Z]||q)&&h(te,Z,se)}};for(ee in Pe)oe=k[ee],ye=oe&&oe.prototype,ye?b(ye)[he]=oe:Y=!1;for(ee in L)oe=k[ee],ye=oe&&oe.prototype,ye&&(b(ye)[he]=oe);if((!Y||!u(D)||D===Function.prototype)&&(D=function(){throw Q("Incorrect invocation")},Y))for(ee in Pe)k[ee]&&o(k[ee],D);if((!Y||!I||I===_)&&(I=D.prototype,Y))for(ee in Pe)k[ee]&&o(k[ee].prototype,I);if(Y&&r(S)!==I&&o(S,I),y&&!e(I,W)){z=!0,f(I,W,{configurable:!0,get:function(){return g(this)?this[j]:void 0}});for(ee in Pe)k[ee]&&d(k[ee],j,ee)}N.exports={NATIVE_ARRAY_BUFFER_VIEWS:Y,TYPED_ARRAY_TAG:z&&j,aTypedArray:R,aTypedArrayConstructor:O,exportTypedArrayMethod:B,exportTypedArrayStaticMethod:F,getTypedArrayConstructor:M,isView:P,isTypedArray:E,TypedArray:D,TypedArrayPrototype:I}},N=>{N.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"},(N,w,t)=>{var p=t(39),y=t(21),k=t(40),u=t(54),g=t(97),e=u("IE_PROTO"),i=Object,n=i.prototype;N.exports=g?i.getPrototypeOf:function(d){var h=k(d);if(p(h,e))return h[e];var f=h.constructor;return y(f)&&h instanceof f?f.prototype:h instanceof i?n:null}},(N,w,t)=>{var p=t(7);N.exports=!p(function(){function y(){}return y.prototype.constructor=null,Object.getPrototypeOf(new y)!==y.prototype})},(N,w,t)=>{var p=t(99),y=t(13),k=t(40),u=t(64),g=function(e){var i=e===1;return function(n,d,h){for(var f=k(n),a=y(f),r=p(d,h),o=u(a),m,v;o-- >0;)if(m=a[o],v=r(m,o,f),v)switch(e){case 0:return m;case 1:return o}return i?-1:void 0}};N.exports={findLast:g(0),findLastIndex:g(1)}},(N,w,t)=>{var p=t(100),y=t(31),k=t(9),u=p(p.bind);N.exports=function(g,e){return y(g),e===void 0?g:k?u(g,e):function(){return g.apply(e,arguments)}}},(N,w,t)=>{var p=t(15),y=t(14);N.exports=function(k){if(p(k)==="Function")return y(k)}},(N,w,t)=>{var p=t(94),y=t(98).findLastIndex,k=p.aTypedArray,u=p.exportTypedArrayMethod;u("findLastIndex",function(e){return y(k(this),e,arguments.length>1?arguments[1]:void 0)})},(N,w,t)=>{var p=t(4),y=t(8),k=t(94),u=t(64),g=t(103),e=t(40),i=t(7),n=p.RangeError,d=p.Int8Array,h=d&&d.prototype,f=h&&h.set,a=k.aTypedArray,r=k.exportTypedArrayMethod,o=!i(function(){var v=new Uint8ClampedArray(2);return y(f,v,{length:1,0:3},1),v[1]!==3}),m=o&&k.NATIVE_ARRAY_BUFFER_VIEWS&&i(function(){var v=new d(2);return v.set(1),v.set("2",1),v[0]!==0||v[1]!==2});r("set",function(A){a(this);var b=g(arguments.length>1?arguments[1]:void 0,1),c=e(A);if(o)return y(f,this,c,b);var s=this.length,x=u(c),T=0;if(x+b>s)throw n("Wrong length");for(;T{var p=t(104),y=RangeError;N.exports=function(k,u){var g=p(k);if(g%u)throw y("Wrong offset");return g}},(N,w,t)=>{var p=t(62),y=RangeError;N.exports=function(k){var u=p(k);if(u<0)throw y("The argument can't be less than 0");return u}},(N,w,t)=>{var p=t(106),y=t(94),k=y.aTypedArray,u=y.exportTypedArrayMethod,g=y.getTypedArrayConstructor;u("toReversed",function(){return p(k(this),g(this))})},(N,w,t)=>{var p=t(64);N.exports=function(y,k){for(var u=p(y),g=new k(u),e=0;e{var p=t(94),y=t(14),k=t(31),u=t(108),g=p.aTypedArray,e=p.getTypedArrayConstructor,i=p.exportTypedArrayMethod,n=y(p.TypedArrayPrototype.sort);i("toSorted",function(h){h!==void 0&&k(h);var f=g(this),a=u(e(f),f);return n(a,h)})},(N,w,t)=>{var p=t(64);N.exports=function(y,k){for(var u=0,g=p(k),e=new y(g);g>u;)e[u]=k[u++];return e}},(N,w,t)=>{var p=t(110),y=t(94),k=t(111),u=t(62),g=t(112),e=y.aTypedArray,i=y.getTypedArrayConstructor,n=y.exportTypedArrayMethod,d=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(h){return h===8}}();n("with",function(h,f){var a=e(this),r=u(h),o=k(a)?g(f):+f;return p(a,i(a),r,o)},!d)},(N,w,t)=>{var p=t(64),y=t(62),k=RangeError;N.exports=function(u,g,e,i){var n=p(u),d=y(e),h=d<0?n+d:d;if(h>=n||h<0)throw k("Incorrect index");for(var f=new g(n),a=0;a{var p=t(78);N.exports=function(y){var k=p(y);return k==="BigInt64Array"||k==="BigUint64Array"}},(N,w,t)=>{var p=t(19),y=TypeError;N.exports=function(k){var u=p(k,"number");if(typeof u=="number")throw y("Can't convert number to bigint");return BigInt(u)}},(N,w,t)=>{var p=t(6),y=t(88),k=t(114),u=ArrayBuffer.prototype;p&&!("detached"in u)&&y(u,"detached",{configurable:!0,get:function(){return k(this)}})},(N,w,t)=>{var p=t(14),y=t(115),k=p(ArrayBuffer.prototype.slice);N.exports=function(u){if(y(u)!==0)return!1;try{return k(u,0,0),!1}catch{return!0}}},(N,w,t)=>{var p=t(72),y=t(15),k=TypeError;N.exports=p(ArrayBuffer.prototype,"byteLength","get")||function(u){if(y(u)!=="ArrayBuffer")throw k("ArrayBuffer expected");return u.byteLength}},(N,w,t)=>{var p=t(3),y=t(117);y&&p({target:"ArrayBuffer",proto:!0},{transfer:function(){return y(this,arguments.length?arguments[0]:void 0,!0)}})},(N,w,t)=>{var p=t(4),y=t(14),k=t(72),u=t(118),g=t(114),e=t(115),i=t(119),n=p.TypeError,d=p.structuredClone,h=p.ArrayBuffer,f=p.DataView,a=Math.min,r=h.prototype,o=f.prototype,m=y(r.slice),v=k(r,"resizable","get"),A=k(r,"maxByteLength","get"),b=y(o.getInt8),c=y(o.setInt8);N.exports=i&&function(s,x,T){var S=e(s),D=x===void 0?S:u(x),I=!v||!v(s);if(g(s))throw n("ArrayBuffer is detached");var _=d(s,{transfer:[s]});if(S===D&&(T||I))return _;if(S>=D&&(!T||I))return m(_,0,D);for(var Q=T&&!I&&A?{maxByteLength:A(_)}:void 0,W=new h(D,Q),j=new f(_),he=new f(W),Y=a(D,S),z=0;z{var p=t(62),y=t(65),k=RangeError;N.exports=function(u){if(u===void 0)return 0;var g=p(u),e=y(g);if(g!==e)throw k("Wrong length or index");return e}},(N,w,t)=>{var p=t(4),y=t(7),k=t(28),u=t(120),g=t(121),e=t(122),i=p.structuredClone;N.exports=!!i&&!y(function(){if(g&&k>92||e&&k>94||u&&k>97)return!1;var n=new ArrayBuffer(8),d=i(n,{transfer:[n]});return n.byteLength!==0||d.byteLength!==8})},(N,w,t)=>{var p=t(121),y=t(122);N.exports=!p&&!y&&typeof window=="object"&&typeof document=="object"},N=>{N.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},(N,w,t)=>{var p=t(4),y=t(15);N.exports=y(p.process)==="process"},(N,w,t)=>{var p=t(3),y=t(117);y&&p({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return y(this,arguments.length?arguments[0]:void 0,!1)}})},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{var N,t,p,y,dt,u,Rt,e,i,n,d,h,f,a,r,o,Mt,v,A,Qt,c,s;Object.defineProperty(exports,"__esModule",{value:!0}),exports.RenderTask=exports.PDFWorkerUtil=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultFilterFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0,Object.defineProperty(exports,"SVGGraphics",{enumerable:!0,get:function(){return _displaySvg.SVGGraphics}}),exports.build=void 0,exports.getDocument=getDocument,exports.version=void 0,__w_pdfjs_require__(84),__w_pdfjs_require__(86),__w_pdfjs_require__(87),__w_pdfjs_require__(2),__w_pdfjs_require__(93),__w_pdfjs_require__(101),__w_pdfjs_require__(102),__w_pdfjs_require__(105),__w_pdfjs_require__(107),__w_pdfjs_require__(109),__w_pdfjs_require__(113),__w_pdfjs_require__(116),__w_pdfjs_require__(123),__w_pdfjs_require__(89),__w_pdfjs_require__(125),__w_pdfjs_require__(136),__w_pdfjs_require__(138),__w_pdfjs_require__(141),__w_pdfjs_require__(143),__w_pdfjs_require__(145),__w_pdfjs_require__(147),__w_pdfjs_require__(149),__w_pdfjs_require__(152);var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(163),_display_utils=__w_pdfjs_require__(168),_font_loader=__w_pdfjs_require__(171),_displayNode_utils=__w_pdfjs_require__(172),_canvas=__w_pdfjs_require__(173),_worker_options=__w_pdfjs_require__(176),_message_handler=__w_pdfjs_require__(177),_metadata=__w_pdfjs_require__(178),_optional_content_config=__w_pdfjs_require__(179),_transport_stream=__w_pdfjs_require__(180),_displayFetch_stream=__w_pdfjs_require__(181),_displayNetwork=__w_pdfjs_require__(184),_displayNode_stream=__w_pdfjs_require__(185),_displaySvg=__w_pdfjs_require__(186),_xfa_text=__w_pdfjs_require__(194);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3,DefaultCanvasFactory=_util.isNodeJS?_displayNode_utils.NodeCanvasFactory:_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;const DefaultCMapReaderFactory=_util.isNodeJS?_displayNode_utils.NodeCMapReaderFactory:_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;const DefaultFilterFactory=_util.isNodeJS?_displayNode_utils.NodeFilterFactory:_display_utils.DOMFilterFactory;exports.DefaultFilterFactory=DefaultFilterFactory;const DefaultStandardFontDataFactory=_util.isNodeJS?_displayNode_utils.NodeStandardFontDataFactory:_display_utils.DOMStandardFontDataFactory;exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;function getDocument(T){if(typeof T=="string"||T instanceof URL?T={url:T}:(0,_util.isArrayBuffer)(T)&&(T={data:T}),typeof T!="object")throw new Error("Invalid parameter in getDocument, need parameter object.");if(!T.url&&!T.data&&!T.range)throw new Error("Invalid parameter object: need either .data, .range or .url");const S=new PDFDocumentLoadingTask,{docId:D}=S,I=T.url?getUrlProp(T.url):null,_=T.data?getDataProp(T.data):null,Q=T.httpHeaders||null,W=T.withCredentials===!0,j=T.password??null,he=T.range instanceof PDFDataRangeTransport?T.range:null,Y=Number.isInteger(T.rangeChunkSize)&&T.rangeChunkSize>0?T.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let z=T.worker instanceof PDFWorker?T.worker:null;const ee=T.verbosity,oe=typeof T.docBaseUrl=="string"&&!(0,_display_utils.isDataScheme)(T.docBaseUrl)?T.docBaseUrl:null,ye=typeof T.cMapUrl=="string"?T.cMapUrl:null,Pe=T.cMapPacked!==!1,L=T.CMapReaderFactory||DefaultCMapReaderFactory,P=typeof T.standardFontDataUrl=="string"?T.standardFontDataUrl:null,M=T.StandardFontDataFactory||DefaultStandardFontDataFactory,E=T.stopAtErrors!==!0,R=Number.isInteger(T.maxImageSize)&&T.maxImageSize>-1?T.maxImageSize:-1,O=T.isEvalSupported!==!1,B=typeof T.isOffscreenCanvasSupported=="boolean"?T.isOffscreenCanvasSupported:!_util.isNodeJS,F=Number.isInteger(T.canvasMaxAreaInBytes)?T.canvasMaxAreaInBytes:-1,Z=typeof T.disableFontFace=="boolean"?T.disableFontFace:_util.isNodeJS,se=T.fontExtraProperties===!0,q=T.enableXfa===!0,pe=T.ownerDocument||globalThis.document,te=T.disableRange===!0,me=T.disableStream===!0,ve=T.disableAutoFetch===!0,Re=T.pdfBug===!0,Oe=he?he.length:T.length??NaN,Ie=typeof T.useSystemFonts=="boolean"?T.useSystemFonts:!_util.isNodeJS&&!Z,Le=typeof T.useWorkerFetch=="boolean"?T.useWorkerFetch:L===_display_utils.DOMCMapReaderFactory&&M===_display_utils.DOMStandardFontDataFactory&&ye&&P&&(0,_display_utils.isValidFetchUrl)(ye,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(P,document.baseURI),ue=T.canvasFactory||new DefaultCanvasFactory({ownerDocument:pe}),ne=T.filterFactory||new DefaultFilterFactory({docId:D,ownerDocument:pe}),ce=null;(0,_util.setVerbosityLevel)(ee);const ge={canvasFactory:ue,filterFactory:ne};if(Le||(ge.cMapReaderFactory=new L({baseUrl:ye,isCompressed:Pe}),ge.standardFontDataFactory=new M({baseUrl:P})),!z){const Ve={verbosity:ee,port:_worker_options.GlobalWorkerOptions.workerPort};z=Ve.port?PDFWorker.fromPort(Ve):new PDFWorker(Ve),S._worker=z}const Ce={docId:D,apiVersion:"3.11.174",data:_,password:j,disableAutoFetch:ve,rangeChunkSize:Y,length:Oe,docBaseUrl:oe,enableXfa:q,evaluatorOptions:{maxImageSize:R,disableFontFace:Z,ignoreErrors:E,isEvalSupported:O,isOffscreenCanvasSupported:B,canvasMaxAreaInBytes:F,fontExtraProperties:se,useSystemFonts:Ie,cMapUrl:Le?ye:null,standardFontDataUrl:Le?P:null}},Me={ignoreErrors:E,isEvalSupported:O,disableFontFace:Z,fontExtraProperties:se,enableXfa:q,ownerDocument:pe,disableAutoFetch:ve,pdfBug:Re,styleElement:ce};return z.promise.then(function(){if(S.destroyed)throw new Error("Loading aborted");const Ve=_fetchDocument(z,Ce),ze=new Promise(function(_e){let He;he?He=new _transport_stream.PDFDataTransportStream({length:Oe,initialData:he.initialData,progressiveDone:he.progressiveDone,contentDispositionFilename:he.contentDispositionFilename,disableRange:te,disableStream:me},he):_||(He=(Xe=>_util.isNodeJS?new _displayNode_stream.PDFNodeStream(Xe):(0,_display_utils.isValidFetchUrl)(Xe.url)?new _displayFetch_stream.PDFFetchStream(Xe):new _displayNetwork.PDFNetworkStream(Xe))({url:I,length:Oe,httpHeaders:Q,withCredentials:W,rangeChunkSize:Y,disableRange:te,disableStream:me})),_e(He)});return Promise.all([Ve,ze]).then(function(_e){let[He,Ke]=_e;if(S.destroyed)throw new Error("Loading aborted");const Xe=new _message_handler.MessageHandler(D,He,z.port),je=new WorkerTransport(Xe,S,Ke,Me,ge);S._transport=je,Xe.send("Ready",null)})}).catch(S._capability.reject),S}async function _fetchDocument(T,S){if(T.destroyed)throw new Error("Worker was destroyed");const D=await T.messageHandler.sendWithPromise("GetDocRequest",S,S.data?[S.data.buffer]:null);if(T.destroyed)throw new Error("Worker was destroyed");return D}function getUrlProp(T){if(T instanceof URL)return T.href;try{return new URL(T,window.location).href}catch{if(_util.isNodeJS&&typeof T=="string")return T}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(T){if(_util.isNodeJS&&typeof Buffer<"u"&&T instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(T instanceof Uint8Array&&T.byteLength===T.buffer.byteLength)return T;if(typeof T=="string")return(0,_util.stringToBytes)(T);if(typeof T=="object"&&!isNaN(T==null?void 0:T.length)||(0,_util.isArrayBuffer)(T))return new Uint8Array(T);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}const w=class w{constructor(){this._capability=new _util.PromiseCapability,this._transport=null,this._worker=null,this.docId=`d${ut(w,N)._++}`,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){var S,D,I;this.destroyed=!0;try{(S=this._worker)!=null&&S.port&&(this._worker._pendingDestroy=!0),await((D=this._transport)==null?void 0:D.destroy())}catch(_){throw(I=this._worker)!=null&&I.port&&delete this._worker._pendingDestroy,_}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}};N=new WeakMap,$(w,N,0);let PDFDocumentLoadingTask=w;exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;class PDFDataRangeTransport{constructor(S,D){let I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,_=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;this.length=S,this.initialData=D,this.progressiveDone=I,this.contentDispositionFilename=_,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=new _util.PromiseCapability}addRangeListener(S){this._rangeListeners.push(S)}addProgressListener(S){this._progressListeners.push(S)}addProgressiveReadListener(S){this._progressiveReadListeners.push(S)}addProgressiveDoneListener(S){this._progressiveDoneListeners.push(S)}onDataRange(S,D){for(const I of this._rangeListeners)I(S,D)}onDataProgress(S,D){this._readyCapability.promise.then(()=>{for(const I of this._progressListeners)I(S,D)})}onDataProgressiveRead(S){this._readyCapability.promise.then(()=>{for(const D of this._progressiveReadListeners)D(S)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const S of this._progressiveDoneListeners)S()})}transportReady(){this._readyCapability.resolve()}requestDataRange(S,D){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(S,D){this._pdfInfo=S,this._transport=D,Object.defineProperty(this,"getJavaScript",{value:()=>((0,_display_utils.deprecated)("`PDFDocumentProxy.getJavaScript`, please use `PDFDocumentProxy.getJSActions` instead."),this.getJSActions().then(I=>{if(!I)return I;const _=[];for(const Q in I)_.push(...I[Q]);return _}))})}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(S){return this._transport.getPage(S)}getPageIndex(S){return this._transport.getPageIndex(S)}getDestinations(){return this._transport.getDestinations()}getDestination(S){return this._transport.getDestination(S)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return this._transport.startCleanup(S||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{constructor(S,D,I){$(this,y);$(this,u);$(this,t,null);$(this,p,!1);let _=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;this._pageIndex=S,this._pageInfo=D,this._transport=I,this._stats=_?new _display_utils.StatTimer:null,this._pdfBug=_,this.commonObjs=I.commonObjs,this.objs=new PDFObjects,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport(){let{scale:S,rotation:D=this.rotate,offsetX:I=0,offsetY:_=0,dontFlip:Q=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new _display_utils.PageViewport({viewBox:this.view,scale:S,rotation:D,offsetX:I,offsetY:_,dontFlip:Q})}getAnnotations(){let{intent:S="display"}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const D=this._transport.getRenderingIntent(S);return this._transport.getAnnotations(this._pageIndex,D.renderingIntent)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var S;return((S=this._transport._htmlForXfa)==null?void 0:S.children[this._pageIndex])||null}render(S){var E,R;let{canvasContext:D,viewport:I,intent:_="display",annotationMode:Q=_util.AnnotationMode.ENABLE,transform:W=null,background:j=null,optionalContentConfigPromise:he=null,annotationCanvasMap:Y=null,pageColors:z=null,printAnnotationStorage:ee=null}=S;(E=this._stats)==null||E.time("Overall");const oe=this._transport.getRenderingIntent(_,Q,ee);le(this,p,!1),J(this,u,Rt).call(this),he||(he=this._transport.getOptionalContentConfig());let ye=this._intentStates.get(oe.cacheKey);ye||(ye=Object.create(null),this._intentStates.set(oe.cacheKey,ye)),ye.streamReaderCancelTimeout&&(clearTimeout(ye.streamReaderCancelTimeout),ye.streamReaderCancelTimeout=null);const Pe=!!(oe.renderingIntent&_util.RenderingIntentFlag.PRINT);ye.displayReadyCapability||(ye.displayReadyCapability=new _util.PromiseCapability,ye.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(R=this._stats)==null||R.time("Page Request"),this._pumpOperatorList(oe));const L=O=>{var B,F;ye.renderTasks.delete(P),(this._maybeCleanupAfterRender||Pe)&&le(this,p,!0),J(this,y,dt).call(this,!Pe),O?(P.capability.reject(O),this._abortOperatorList({intentState:ye,reason:O instanceof Error?O:new Error(O)})):P.capability.resolve(),(B=this._stats)==null||B.timeEnd("Rendering"),(F=this._stats)==null||F.timeEnd("Overall")},P=new InternalRenderTask({callback:L,params:{canvasContext:D,viewport:I,transform:W,background:j},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:Y,operatorList:ye.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!Pe,pdfBug:this._pdfBug,pageColors:z});(ye.renderTasks||(ye.renderTasks=new Set)).add(P);const M=P.task;return Promise.all([ye.displayReadyCapability.promise,he]).then(O=>{var Z;let[B,F]=O;if(this.destroyed){L();return}(Z=this._stats)==null||Z.time("Rendering"),P.initializeGraphics({transparency:B,optionalContentConfig:F}),P.operatorListChanged()}).catch(L),M}getOperatorList(){var he;let{intent:S="display",annotationMode:D=_util.AnnotationMode.ENABLE,printAnnotationStorage:I=null}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};function _(){W.operatorList.lastChunk&&(W.opListReadCapability.resolve(W.operatorList),W.renderTasks.delete(j))}const Q=this._transport.getRenderingIntent(S,D,I,!0);let W=this._intentStates.get(Q.cacheKey);W||(W=Object.create(null),this._intentStates.set(Q.cacheKey,W));let j;return W.opListReadCapability||(j=Object.create(null),j.operatorListChanged=_,W.opListReadCapability=new _util.PromiseCapability,(W.renderTasks||(W.renderTasks=new Set)).add(j),W.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(he=this._stats)==null||he.time("Page Request"),this._pumpOperatorList(Q)),W.opListReadCapability.promise}streamTextContent(){let{includeMarkedContent:S=!1,disableNormalization:D=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const I=100;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:S===!0,disableNormalization:D===!0},{highWaterMark:I,size(_){return _.items.length}})}getTextContent(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then(I=>_xfa_text.XfaText.textContent(I));const D=this.streamTextContent(S);return new Promise(function(I,_){function Q(){W.read().then(function(he){let{value:Y,done:z}=he;if(z){I(j);return}Object.assign(j.styles,Y.styles),j.items.push(...Y.items),Q()},_)}const W=D.getReader(),j={items:[],styles:Object.create(null)};Q()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const S=[];for(const D of this._intentStates.values())if(this._abortOperatorList({intentState:D,reason:new Error("Page was destroyed."),force:!0}),!D.opListReadCapability)for(const I of D.renderTasks)S.push(I.completed),I.cancel();return this.objs.clear(),le(this,p,!1),J(this,u,Rt).call(this),Promise.all(S)}cleanup(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;le(this,p,!0);const D=J(this,y,dt).call(this,!1);return S&&D&&this._stats&&(this._stats=new _display_utils.StatTimer),D}_startRenderPage(S,D){var _,Q;const I=this._intentStates.get(D);I&&((_=this._stats)==null||_.timeEnd("Page Request"),(Q=I.displayReadyCapability)==null||Q.resolve(S))}_renderPageChunk(S,D){for(let I=0,_=S.length;I<_;I++)D.operatorList.fnArray.push(S.fnArray[I]),D.operatorList.argsArray.push(S.argsArray[I]);D.operatorList.lastChunk=S.lastChunk,D.operatorList.separateAnnots=S.separateAnnots;for(const I of D.renderTasks)I.operatorListChanged();S.lastChunk&&J(this,y,dt).call(this,!0)}_pumpOperatorList(S){let{renderingIntent:D,cacheKey:I,annotationStorageSerializable:_}=S;const{map:Q,transfers:W}=_,he=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:D,cacheKey:I,annotationStorage:Q},W).getReader(),Y=this._intentStates.get(I);Y.streamReader=he;const z=()=>{he.read().then(ee=>{let{value:oe,done:ye}=ee;if(ye){Y.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(oe,Y),z())},ee=>{if(Y.streamReader=null,!this._transport.destroyed){if(Y.operatorList){Y.operatorList.lastChunk=!0;for(const oe of Y.renderTasks)oe.operatorListChanged();J(this,y,dt).call(this,!0)}if(Y.displayReadyCapability)Y.displayReadyCapability.reject(ee);else if(Y.opListReadCapability)Y.opListReadCapability.reject(ee);else throw ee}})};z()}_abortOperatorList(S){let{intentState:D,reason:I,force:_=!1}=S;if(D.streamReader){if(D.streamReaderCancelTimeout&&(clearTimeout(D.streamReaderCancelTimeout),D.streamReaderCancelTimeout=null),!_){if(D.renderTasks.size>0)return;if(I instanceof _display_utils.RenderingCancelledException){let Q=RENDERING_CANCELLED_TIMEOUT;I.extraDelay>0&&I.extraDelay<1e3&&(Q+=I.extraDelay),D.streamReaderCancelTimeout=setTimeout(()=>{D.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:D,reason:I,force:!0})},Q);return}}if(D.streamReader.cancel(new _util.AbortException(I.message)).catch(()=>{}),D.streamReader=null,!this._transport.destroyed){for(const[Q,W]of this._intentStates)if(W===D){this._intentStates.delete(Q);break}this.cleanup()}}}get stats(){return this._stats}}t=new WeakMap,p=new WeakMap,y=new WeakSet,dt=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(J(this,u,Rt).call(this),!l(this,p)||this.destroyed)return!1;if(S)return le(this,t,setTimeout(()=>{le(this,t,null),J(this,y,dt).call(this,!1)},DELAYED_CLEANUP_TIMEOUT)),!1;for(const{renderTasks:D,operatorList:I}of this._intentStates.values())if(D.size>0||!I.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),le(this,p,!1),!0},u=new WeakSet,Rt=function(){l(this,t)&&(clearTimeout(l(this,t)),le(this,t,null))},exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{constructor(){$(this,e,new Set);$(this,i,Promise.resolve())}postMessage(S,D){const I={data:structuredClone(S,null)};l(this,i).then(()=>{for(const _ of l(this,e))_.call(this,I)})}addEventListener(S,D){l(this,e).add(D)}removeEventListener(S,D){l(this,e).delete(D)}terminate(){l(this,e).clear()}}e=new WeakMap,i=new WeakMap,exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};exports.PDFWorkerUtil=PDFWorkerUtil;{if(_util.isNodeJS&&typeof commonjsRequire=="function")PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if(typeof document=="object"){const T=(n=document==null?void 0:document.currentScript)==null?void 0:n.src;T&&(PDFWorkerUtil.fallbackWorkerSrc=T.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(T,S){let D;try{if(D=new URL(T),!D.origin||D.origin==="null")return!1}catch{return!1}const I=new URL(S,D);return D.origin===I.origin},PDFWorkerUtil.createCDNWrapper=function(T){const S=`importScripts("${T}");`;return URL.createObjectURL(new Blob([S]))}}const _PDFWorker=class _PDFWorker{constructor(){var I;let{name:T=null,port:S=null,verbosity:D=(0,_util.getVerbosityLevel)()}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this.name=T,this.destroyed=!1,this.verbosity=D,this._readyCapability=new _util.PromiseCapability,this._port=null,this._webWorker=null,this._messageHandler=null,S){if((I=l(_PDFWorker,d))!=null&&I.has(S))throw new Error("Cannot use more than one PDFWorker per port.");(l(_PDFWorker,d)||le(_PDFWorker,d,new WeakMap)).set(S,this),this._initializeFromPort(S);return}this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(T){this._port=T,this._messageHandler=new _message_handler.MessageHandler("main","worker",T),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}_initialize(){if(!PDFWorkerUtil.isWorkerDisabled&&!_PDFWorker._mainThreadWorkerMessageHandler){let{workerSrc:T}=_PDFWorker;try{PDFWorkerUtil.isSameOrigin(window.location.href,T)||(T=PDFWorkerUtil.createCDNWrapper(new URL(T,window.location).href));const S=new Worker(T),D=new _message_handler.MessageHandler("main","worker",S),I=()=>{S.removeEventListener("error",_),D.destroy(),S.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},_=()=>{this._webWorker||I()};S.addEventListener("error",_),D.on("test",W=>{if(S.removeEventListener("error",_),this.destroyed){I();return}W?(this._messageHandler=D,this._port=S,this._webWorker=S,this._readyCapability.resolve(),D.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),D.destroy(),S.terminate())}),D.on("ready",W=>{if(S.removeEventListener("error",_),this.destroyed){I();return}try{Q()}catch{this._setupFakeWorker()}});const Q=()=>{const W=new Uint8Array;D.send("test",W,[W.buffer])};Q();return}catch{(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),_PDFWorker._setupFakeWorkerGlobal.then(T=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const S=new LoopbackPort;this._port=S;const D=`fake${PDFWorkerUtil.fakeWorkerId++}`,I=new _message_handler.MessageHandler(D+"_worker",D,S);T.setup(I,S);const _=new _message_handler.MessageHandler(D,D+"_worker",S);this._messageHandler=_,this._readyCapability.resolve(),_.send("configure",{verbosity:this.verbosity})}).catch(T=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${T.message}".`))})}destroy(){var T;this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),(T=l(_PDFWorker,d))==null||T.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(T){var D;if(!(T!=null&&T.port))throw new Error("PDFWorker.fromPort - invalid method signature.");const S=(D=l(this,d))==null?void 0:D.get(T.port);if(S){if(S._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return S}return new _PDFWorker(T)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(PDFWorkerUtil.fallbackWorkerSrc!==null)return _util.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){var T;try{return((T=globalThis.pdfjsWorker)==null?void 0:T.WorkerMessageHandler)||null}catch{return null}}static get _setupFakeWorkerGlobal(){const loader=async()=>{const mainWorkerMessageHandler=this._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_util.isNodeJS&&typeof commonjsRequire=="function"){const worker=eval("require")(this.workerSrc);return worker.WorkerMessageHandler}return await(0,_display_utils.loadScript)(this.workerSrc),window.pdfjsWorker.WorkerMessageHandler};return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}};d=new WeakMap,$(_PDFWorker,d,void 0);let PDFWorker=_PDFWorker;exports.PDFWorker=PDFWorker;class WorkerTransport{constructor(S,D,I,_,Q){$(this,o);$(this,h,new Map);$(this,f,new Map);$(this,a,new Map);$(this,r,null);this.messageHandler=S,this.loadingTask=D,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({ownerDocument:_.ownerDocument,styleElement:_.styleElement}),this._params=_,this.canvasFactory=Q.canvasFactory,this.filterFactory=Q.filterFactory,this.cMapReaderFactory=Q.cMapReaderFactory,this.standardFontDataFactory=Q.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=I,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=new _util.PromiseCapability,this.setupMessageHandler()}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}getRenderingIntent(S){let D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_util.AnnotationMode.ENABLE,I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,_=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,Q=_util.RenderingIntentFlag.DISPLAY,W=_annotation_storage.SerializableEmpty;switch(S){case"any":Q=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":Q=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${S}`)}switch(D){case _util.AnnotationMode.DISABLE:Q+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:Q+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:Q+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,W=(Q&_util.RenderingIntentFlag.PRINT&&I instanceof _annotation_storage.PrintAnnotationStorage?I:this.annotationStorage).serializable;break;default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${D}`)}return _&&(Q+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:Q,cacheKey:`${Q}_${W.hash}`,annotationStorageSerializable:W}}destroy(){var I;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=new _util.PromiseCapability,(I=l(this,r))==null||I.reject(new Error("Worker was destroyed during onPassword callback"));const S=[];for(const _ of l(this,f).values())S.push(_._destroy());l(this,f).clear(),l(this,a).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const D=this.messageHandler.sendWithPromise("Terminate",null);return S.push(D),Promise.all(S).then(()=>{var _;this.commonObjs.clear(),this.fontLoader.clear(),l(this,h).clear(),this.filterFactory.destroy(),(_=this._networkStream)==null||_.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:S,loadingTask:D}=this;S.on("GetReader",(I,_)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=Q=>{this._lastProgress={loaded:Q.loaded,total:Q.total}},_.onPull=()=>{this._fullReader.read().then(function(Q){let{value:W,done:j}=Q;if(j){_.close();return}(0,_util.assert)(W instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),_.enqueue(new Uint8Array(W),1,[W])}).catch(Q=>{_.error(Q)})},_.onCancel=Q=>{this._fullReader.cancel(Q),_.ready.catch(W=>{if(!this.destroyed)throw W})}}),S.on("ReaderHeadersReady",I=>{const _=new _util.PromiseCapability,Q=this._fullReader;return Q.headersReady.then(()=>{var W;(!Q.isStreamingSupported||!Q.isRangeSupported)&&(this._lastProgress&&((W=D.onProgress)==null||W.call(D,this._lastProgress)),Q.onProgress=j=>{var he;(he=D.onProgress)==null||he.call(D,{loaded:j.loaded,total:j.total})}),_.resolve({isStreamingSupported:Q.isStreamingSupported,isRangeSupported:Q.isRangeSupported,contentLength:Q.contentLength})},_.reject),_.promise}),S.on("GetRangeReader",(I,_)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const Q=this._networkStream.getRangeReader(I.begin,I.end);if(!Q){_.close();return}_.onPull=()=>{Q.read().then(function(W){let{value:j,done:he}=W;if(he){_.close();return}(0,_util.assert)(j instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),_.enqueue(new Uint8Array(j),1,[j])}).catch(W=>{_.error(W)})},_.onCancel=W=>{Q.cancel(W),_.ready.catch(j=>{if(!this.destroyed)throw j})}}),S.on("GetDoc",I=>{let{pdfInfo:_}=I;this._numPages=_.numPages,this._htmlForXfa=_.htmlForXfa,delete _.htmlForXfa,D._capability.resolve(new PDFDocumentProxy(_,this))}),S.on("DocException",function(I){let _;switch(I.name){case"PasswordException":_=new _util.PasswordException(I.message,I.code);break;case"InvalidPDFException":_=new _util.InvalidPDFException(I.message);break;case"MissingPDFException":_=new _util.MissingPDFException(I.message);break;case"UnexpectedResponseException":_=new _util.UnexpectedResponseException(I.message,I.status);break;case"UnknownErrorException":_=new _util.UnknownErrorException(I.message,I.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}D._capability.reject(_)}),S.on("PasswordRequest",I=>{if(le(this,r,new _util.PromiseCapability),D.onPassword){const _=Q=>{Q instanceof Error?l(this,r).reject(Q):l(this,r).resolve({password:Q})};try{D.onPassword(_,I.code)}catch(Q){l(this,r).reject(Q)}}else l(this,r).reject(new _util.PasswordException(I.message,I.code));return l(this,r).promise}),S.on("DataLoaded",I=>{var _;(_=D.onProgress)==null||_.call(D,{loaded:I.length,total:I.length}),this.downloadInfoCapability.resolve(I)}),S.on("StartRenderPage",I=>{if(this.destroyed)return;l(this,f).get(I.pageIndex)._startRenderPage(I.transparency,I.cacheKey)}),S.on("commonobj",I=>{var j;let[_,Q,W]=I;if(!this.destroyed&&!this.commonObjs.has(_))switch(Q){case"Font":const he=this._params;if("error"in W){const ee=W.error;(0,_util.warn)(`Error during font loading: ${ee}`),this.commonObjs.resolve(_,ee);break}const Y=he.pdfBug&&((j=globalThis.FontInspector)!=null&&j.enabled)?(ee,oe)=>globalThis.FontInspector.fontAdded(ee,oe):null,z=new _font_loader.FontFaceObject(W,{isEvalSupported:he.isEvalSupported,disableFontFace:he.disableFontFace,ignoreErrors:he.ignoreErrors,inspectFont:Y});this.fontLoader.bind(z).catch(ee=>S.sendWithPromise("FontFallback",{id:_})).finally(()=>{!he.fontExtraProperties&&z.data&&(z.data=null),this.commonObjs.resolve(_,z)});break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(_,W);break;default:throw new Error(`Got unknown common object type ${Q}`)}}),S.on("obj",I=>{var Y;let[_,Q,W,j]=I;if(this.destroyed)return;const he=l(this,f).get(Q);if(!he.objs.has(_))switch(W){case"Image":if(he.objs.resolve(_,j),j){let z;if(j.bitmap){const{width:ee,height:oe}=j;z=ee*oe*4}else z=((Y=j.data)==null?void 0:Y.length)||0;z>_util.MAX_IMAGE_SIZE_TO_CACHE&&(he._maybeCleanupAfterRender=!0)}break;case"Pattern":he.objs.resolve(_,j);break;default:throw new Error(`Got unknown object type ${W}`)}}),S.on("DocProgress",I=>{var _;this.destroyed||(_=D.onProgress)==null||_.call(D,{loaded:I.loaded,total:I.total})}),S.on("FetchBuiltInCMap",I=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(I):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),S.on("FetchStandardFontData",I=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(I):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var I;this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:S,transfers:D}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:S,filename:((I=this._fullReader)==null?void 0:I.filename)??null},D).finally(()=>{this.annotationStorage.resetModified()})}getPage(S){if(!Number.isInteger(S)||S<=0||S>this._numPages)return Promise.reject(new Error("Invalid page request."));const D=S-1,I=l(this,a).get(D);if(I)return I;const _=this.messageHandler.sendWithPromise("GetPage",{pageIndex:D}).then(Q=>{if(this.destroyed)throw new Error("Transport destroyed");const W=new PDFPageProxy(D,Q,this,this._params.pdfBug);return l(this,f).set(D,W),W});return l(this,a).set(D,_),_}getPageIndex(S){return typeof S!="object"||S===null||!Number.isInteger(S.num)||S.num<0||!Number.isInteger(S.gen)||S.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:S.num,gen:S.gen})}getAnnotations(S,D){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:S,intent:D})}getFieldObjects(){return J(this,o,Mt).call(this,"GetFieldObjects")}hasJSActions(){return J(this,o,Mt).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(S){return typeof S!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:S})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return J(this,o,Mt).call(this,"GetDocJSActions")}getPageJSActions(S){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:S})}getStructTree(S){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:S})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(S=>new _optional_content_config.OptionalContentConfig(S))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const S="GetMetadata",D=l(this,h).get(S);if(D)return D;const I=this.messageHandler.sendWithPromise(S,null).then(_=>{var Q,W;return{info:_[0],metadata:_[1]?new _metadata.Metadata(_[1]):null,contentDispositionFilename:((Q=this._fullReader)==null?void 0:Q.filename)??null,contentLength:((W=this._fullReader)==null?void 0:W.contentLength)??null}});return l(this,h).set(S,I),I}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const D of l(this,f).values())if(!D.cleanup())throw new Error(`startCleanup: Page ${D.pageNumber} is currently rendering.`);this.commonObjs.clear(),S||this.fontLoader.clear(),l(this,h).clear(),this.filterFactory.destroy(!0)}}get loadingParams(){const{disableAutoFetch:S,enableXfa:D}=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:S,enableXfa:D})}}h=new WeakMap,f=new WeakMap,a=new WeakMap,r=new WeakMap,o=new WeakSet,Mt=function(S){let D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const I=l(this,h).get(S);if(I)return I;const _=this.messageHandler.sendWithPromise(S,D);return l(this,h).set(S,_),_};class PDFObjects{constructor(){$(this,A);$(this,v,Object.create(null))}get(S){let D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(D){const _=J(this,A,Qt).call(this,S);return _.capability.promise.then(()=>D(_.data)),null}const I=l(this,v)[S];if(!(I!=null&&I.capability.settled))throw new Error(`Requesting object that isn't resolved yet ${S}.`);return I.data}has(S){const D=l(this,v)[S];return(D==null?void 0:D.capability.settled)||!1}resolve(S){let D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const I=J(this,A,Qt).call(this,S);I.data=D,I.capability.resolve()}clear(){var S;for(const D in l(this,v)){const{data:I}=l(this,v)[D];(S=I==null?void 0:I.bitmap)==null||S.close()}le(this,v,Object.create(null))}}v=new WeakMap,A=new WeakSet,Qt=function(S){var D;return(D=l(this,v))[S]||(D[S]={capability:new _util.PromiseCapability,data:null})};class RenderTask{constructor(S){$(this,c,null);le(this,c,S),this.onContinue=null}get promise(){return l(this,c).capability.promise}cancel(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;l(this,c).cancel(null,S)}get separateAnnots(){const{separateAnnots:S}=l(this,c).operatorList;if(!S)return!1;const{annotationCanvasMap:D}=l(this,c);return S.form||S.canvas&&(D==null?void 0:D.size)>0}}c=new WeakMap,exports.RenderTask=RenderTask;const x=class x{constructor(S){let{callback:D,params:I,objs:_,commonObjs:Q,annotationCanvasMap:W,operatorList:j,pageIndex:he,canvasFactory:Y,filterFactory:z,useRequestAnimationFrame:ee=!1,pdfBug:oe=!1,pageColors:ye=null}=S;this.callback=D,this.params=I,this.objs=_,this.commonObjs=Q,this.annotationCanvasMap=W,this.operatorListIdx=null,this.operatorList=j,this._pageIndex=he,this.canvasFactory=Y,this.filterFactory=z,this._pdfBug=oe,this.pageColors=ye,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=ee===!0&&typeof window<"u",this.cancelled=!1,this.capability=new _util.PromiseCapability,this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=I.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics(S){var he,Y;let{transparency:D=!1,optionalContentConfig:I}=S;if(this.cancelled)return;if(this._canvas){if(l(x,s).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");l(x,s).add(this._canvas)}this._pdfBug&&((he=globalThis.StepperManager)!=null&&he.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:_,viewport:Q,transform:W,background:j}=this.params;this.gfx=new _canvas.CanvasGraphics(_,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:I},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:W,viewport:Q,transparency:D,background:j}),this.operatorListIdx=0,this.graphicsReady=!0,(Y=this.graphicsReadyCallback)==null||Y.call(this)}cancel(){var I;let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.running=!1,this.cancelled=!0,(I=this.gfx)==null||I.endDrawing(),l(x,s).delete(this._canvas),this.callback(S||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,D))}operatorListChanged(){var S;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(S=this.stepper)==null||S.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame(()=>{this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),l(x,s).delete(this._canvas),this.callback())))}};s=new WeakMap,$(x,s,new WeakSet);let InternalRenderTask=x;const version="3.11.174";exports.version=version;const build="ce8716743";exports.build=build},(N,w,t)=>{var p=t(3),y=t(126),k=t(135);p({target:"Set",proto:!0,real:!0,forced:!k("difference")},{difference:y})},(N,w,t)=>{var p=t(127),y=t(128),k=t(129),u=t(132),g=t(133),e=t(130),i=t(131),n=y.has,d=y.remove;N.exports=function(f){var a=p(this),r=g(f),o=k(a);return u(a)<=r.size?e(a,function(m){r.includes(m)&&d(o,m)}):i(r.getIterator(),function(m){n(a,m)&&d(o,m)}),o}},(N,w,t)=>{var p=t(128).has;N.exports=function(y){return p(y),y}},(N,w,t)=>{var p=t(14),y=Set.prototype;N.exports={Set,add:p(y.add),has:p(y.has),remove:p(y.delete),proto:y}},(N,w,t)=>{var p=t(128),y=t(130),k=p.Set,u=p.add;N.exports=function(g){var e=new k;return y(g,function(i){u(e,i)}),e}},(N,w,t)=>{var p=t(14),y=t(131),k=t(128),u=k.Set,g=k.proto,e=p(g.forEach),i=p(g.keys),n=i(new u).next;N.exports=function(d,h,f){return f?y({iterator:i(d),next:n},h):e(d,h)}},(N,w,t)=>{var p=t(8);N.exports=function(y,k,u){for(var g=u?y:y.iterator,e=y.next,i,n;!(i=p(e,g)).done;)if(n=k(i.value),n!==void 0)return n}},(N,w,t)=>{var p=t(72),y=t(128);N.exports=p(y.proto,"size","get")||function(k){return k.size}},(N,w,t)=>{var p=t(31),y=t(47),k=t(8),u=t(62),g=t(134),e="Invalid size",i=RangeError,n=TypeError,d=Math.max,h=function(f,a,r,o){this.set=f,this.size=a,this.has=r,this.keys=o};h.prototype={getIterator:function(){return g(y(k(this.keys,this.set)))},includes:function(f){return k(this.has,this.set,f)}},N.exports=function(f){y(f);var a=+f.size;if(a!==a)throw n(e);var r=u(a);if(r<0)throw i(e);return new h(f,d(r,0),p(f.has),p(f.keys))}},N=>{N.exports=function(w){return{iterator:w,next:w.next,done:!1}}},(N,w,t)=>{var p=t(24),y=function(k){return{size:k,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};N.exports=function(k){var u=p("Set");try{new u()[k](y(0));try{return new u()[k](y(-1)),!1}catch{return!0}}catch{return!1}}},(N,w,t)=>{var p=t(3),y=t(7),k=t(137),u=t(135),g=!u("intersection")||y(function(){return Array.from(new Set([1,2,3]).intersection(new Set([3,2])))!=="3,2"});p({target:"Set",proto:!0,real:!0,forced:g},{intersection:k})},(N,w,t)=>{var p=t(127),y=t(128),k=t(132),u=t(133),g=t(130),e=t(131),i=y.Set,n=y.add,d=y.has;N.exports=function(f){var a=p(this),r=u(f),o=new i;return k(a)>r.size?e(r.getIterator(),function(m){d(a,m)&&n(o,m)}):g(a,function(m){r.includes(m)&&n(o,m)}),o}},(N,w,t)=>{var p=t(3),y=t(139),k=t(135);p({target:"Set",proto:!0,real:!0,forced:!k("isDisjointFrom")},{isDisjointFrom:y})},(N,w,t)=>{var p=t(127),y=t(128).has,k=t(132),u=t(133),g=t(130),e=t(131),i=t(140);N.exports=function(d){var h=p(this),f=u(d);if(k(h)<=f.size)return g(h,function(r){if(f.includes(r))return!1},!0)!==!1;var a=f.getIterator();return e(a,function(r){if(y(h,r))return i(a,"normal",!1)})!==!1}},(N,w,t)=>{var p=t(8),y=t(47),k=t(30);N.exports=function(u,g,e){var i,n;y(u);try{if(i=k(u,"return"),!i){if(g==="throw")throw e;return e}i=p(i,u)}catch(d){n=!0,i=d}if(g==="throw")throw e;if(n)throw i;return y(i),e}},(N,w,t)=>{var p=t(3),y=t(142),k=t(135);p({target:"Set",proto:!0,real:!0,forced:!k("isSubsetOf")},{isSubsetOf:y})},(N,w,t)=>{var p=t(127),y=t(132),k=t(130),u=t(133);N.exports=function(e){var i=p(this),n=u(e);return y(i)>n.size?!1:k(i,function(d){if(!n.includes(d))return!1},!0)!==!1}},(N,w,t)=>{var p=t(3),y=t(144),k=t(135);p({target:"Set",proto:!0,real:!0,forced:!k("isSupersetOf")},{isSupersetOf:y})},(N,w,t)=>{var p=t(127),y=t(128).has,k=t(132),u=t(133),g=t(131),e=t(140);N.exports=function(n){var d=p(this),h=u(n);if(k(d){var p=t(3),y=t(146),k=t(135);p({target:"Set",proto:!0,real:!0,forced:!k("symmetricDifference")},{symmetricDifference:y})},(N,w,t)=>{var p=t(127),y=t(128),k=t(129),u=t(133),g=t(131),e=y.add,i=y.has,n=y.remove;N.exports=function(h){var f=p(this),a=u(h).getIterator(),r=k(f);return g(a,function(o){i(f,o)?n(r,o):e(r,o)}),r}},(N,w,t)=>{var p=t(3),y=t(148),k=t(135);p({target:"Set",proto:!0,real:!0,forced:!k("union")},{union:y})},(N,w,t)=>{var p=t(127),y=t(128).add,k=t(129),u=t(133),g=t(131);N.exports=function(i){var n=p(this),d=u(i).getIterator(),h=k(n);return g(d,function(f){y(h,f)}),h}},(N,w,t)=>{var p=t(3),y=t(4),k=t(24),u=t(11),g=t(45).f,e=t(39),i=t(150),n=t(75),d=t(76),h=t(151),f=t(82),a=t(6),r=t(36),o="DOMException",m=k("Error"),v=k(o),A=function(){i(this,b);var he=arguments.length,Y=d(he<1?void 0:arguments[0]),z=d(he<2?void 0:arguments[1],"Error"),ee=new v(Y,z),oe=m(Y);return oe.name=o,g(ee,"stack",u(1,f(oe.stack,1))),n(ee,this,A),ee},b=A.prototype=v.prototype,c="stack"in m(o),s="stack"in new v(1,2),x=v&&a&&Object.getOwnPropertyDescriptor(y,o),T=!!x&&!(x.writable&&x.configurable),S=c&&!T&&!s;p({global:!0,constructor:!0,forced:r||S},{DOMException:S?A:v});var D=k(o),I=D.prototype;if(I.constructor!==D){r||g(I,"constructor",u(1,D));for(var _ in h)if(e(h,_)){var Q=h[_],W=Q.s;e(D,W)||g(D,W,u(6,Q.c))}}},(N,w,t)=>{var p=t(25),y=TypeError;N.exports=function(k,u){if(p(u,k))return k;throw y("Incorrect invocation")}},N=>{N.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},(N,w,t)=>{var p=t(36),y=t(3),k=t(4),u=t(24),g=t(14),e=t(7),i=t(41),n=t(21),d=t(153),h=t(17),f=t(20),a=t(23),r=t(154),o=t(47),m=t(78),v=t(39),A=t(159),b=t(44),c=t(64),s=t(85),x=t(160),T=t(162),S=t(128),D=t(83),I=t(119),_=k.Object,Q=k.Array,W=k.Date,j=k.Error,he=k.EvalError,Y=k.RangeError,z=k.ReferenceError,ee=k.SyntaxError,oe=k.TypeError,ye=k.URIError,Pe=k.PerformanceMark,L=k.WebAssembly,P=L&&L.CompileError||j,M=L&&L.LinkError||j,E=L&&L.RuntimeError||j,R=u("DOMException"),O=T.Map,B=T.has,F=T.get,Z=T.set,se=S.Set,q=S.add,pe=u("Object","keys"),te=g([].push),me=g((!0).valueOf),ve=g(1 .valueOf),Re=g("".valueOf),Oe=g(W.prototype.getTime),Ie=i("structuredClone"),Le="DataCloneError",ue="Transferring",ne=function(K){return!e(function(){var U=new k.Set([7]),ie=K(U),Ae=K(_(7));return ie===U||!ie.has(7)||typeof Ae!="object"||+Ae!=7})&&K},ce=function(K,U){return!e(function(){var ie=new U,Ae=K({a:ie,b:ie});return!(Ae&&Ae.a===Ae.b&&Ae.a instanceof U&&Ae.a.stack===ie.stack)})},ge=function(K){return!e(function(){var U=K(new k.AggregateError([1],Ie,{cause:3}));return U.name!=="AggregateError"||U.errors[0]!==1||U.message!==Ie||U.cause!==3})},Ce=k.structuredClone,Me=p||!ce(Ce,j)||!ce(Ce,R)||!ge(Ce),Ve=!Ce&&ne(function(K){return new Pe(Ie,{detail:K}).detail}),ze=ne(Ce)||Ve,_e=function(K){throw new R("Uncloneable type: "+K,Le)},He=function(K,U){throw new R((U||"Cloning")+" of "+K+" cannot be properly polyfilled in this engine",Le)},Ke=function(K,U){return ze||He(U),ze(K)},Xe=function(){var K;try{K=new k.DataTransfer}catch{try{K=new k.ClipboardEvent("").clipboardData}catch{}}return K&&K.items&&K.files?K:null},je=function(K,U,ie){if(B(U,K))return F(U,K);var Ae=ie||m(K),Se,we,Te,Ne,ke,Ue;if(Ae==="SharedArrayBuffer")ze?Se=ze(K):Se=K;else{var Be=k.DataView;!Be&&typeof K.slice!="function"&&He("ArrayBuffer");try{if(typeof K.slice=="function"&&!K.resizable)Se=K.slice(0);else for(we=K.byteLength,Te=("maxByteLength"in K)?{maxByteLength:K.maxByteLength}:void 0,Se=new ArrayBuffer(we,Te),Ne=new Be(K),ke=new Be(Se),Ue=0;Ue1&&!h(arguments[1])?o(arguments[1]):void 0,Ae=ie?ie.transfer:void 0,Se=!1,we,Te;Ae!==void 0&&(we=new O,Te=de(Ae,we),Se=!!c(Te));var Ne=H(U,we,Se);return Se&&(we=new O,Ee(Ae,we),Ne=X(Ne,we)),Ne}})},(N,w,t)=>{var p=t(14),y=t(7),k=t(21),u=t(78),g=t(24),e=t(51),i=function(){},n=[],d=g("Reflect","construct"),h=/^\s*(?:class|function)\b/,f=p(h.exec),a=!h.exec(i),r=function(v){if(!k(v))return!1;try{return d(i,n,v),!0}catch{return!1}},o=function(v){if(!k(v))return!1;switch(u(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return a||!!f(h,e(v))}catch{return!0}};o.sham=!0,N.exports=!d||y(function(){var m;return r(r.call)||!r(Object)||!r(function(){m=!0})||m})?o:r},(N,w,t)=>{var p=t(99),y=t(8),k=t(47),u=t(32),g=t(155),e=t(64),i=t(25),n=t(157),d=t(158),h=t(140),f=TypeError,a=function(o,m){this.stopped=o,this.result=m},r=a.prototype;N.exports=function(o,m,v){var A=v&&v.that,b=!!(v&&v.AS_ENTRIES),c=!!(v&&v.IS_RECORD),s=!!(v&&v.IS_ITERATOR),x=!!(v&&v.INTERRUPTED),T=p(m,A),S,D,I,_,Q,W,j,he=function(z){return S&&h(S,"normal",z),new a(!0,z)},Y=function(z){return b?(k(z),x?T(z[0],z[1],he):T(z[0],z[1])):x?T(z,he):T(z)};if(c)S=o.iterator;else if(s)S=o;else{if(D=d(o),!D)throw f(u(o)+" is not iterable");if(g(D)){for(I=0,_=e(o);_>I;I++)if(Q=Y(o[I]),Q&&i(r,Q))return Q;return new a(!1)}S=n(o,D)}for(W=c?o.next:S.next;!(j=y(W,S)).done;){try{Q=Y(j.value)}catch(z){h(S,"throw",z)}if(typeof Q=="object"&&Q&&i(r,Q))return Q}return new a(!1)}},(N,w,t)=>{var p=t(34),y=t(156),k=p("iterator"),u=Array.prototype;N.exports=function(g){return g!==void 0&&(y.Array===g||u[k]===g)}},N=>{N.exports={}},(N,w,t)=>{var p=t(8),y=t(31),k=t(47),u=t(32),g=t(158),e=TypeError;N.exports=function(i,n){var d=arguments.length<2?g(i):n;if(y(d))return k(p(d,i));throw e(u(i)+" is not iterable")}},(N,w,t)=>{var p=t(78),y=t(30),k=t(17),u=t(156),g=t(34),e=g("iterator");N.exports=function(i){if(!k(i))return y(i,e)||y(i,"@@iterator")||u[p(i)]}},(N,w,t)=>{var p=t(18),y=t(45),k=t(11);N.exports=function(u,g,e){var i=p(g);i in u?y.f(u,i,k(0,e)):u[i]=e}},(N,w,t)=>{var p=t(8),y=t(39),k=t(25),u=t(161),g=RegExp.prototype;N.exports=function(e){var i=e.flags;return i===void 0&&!("flags"in g)&&!y(e,"flags")&&k(g,e)?p(u,e):i}},(N,w,t)=>{var p=t(47);N.exports=function(){var y=p(this),k="";return y.hasIndices&&(k+="d"),y.global&&(k+="g"),y.ignoreCase&&(k+="i"),y.multiline&&(k+="m"),y.dotAll&&(k+="s"),y.unicode&&(k+="u"),y.unicodeSets&&(k+="v"),y.sticky&&(k+="y"),k}},(N,w,t)=>{var p=t(14),y=Map.prototype;N.exports={Map,set:p(y.set),get:p(y.get),has:p(y.has),remove:p(y.delete),proto:y}},(N,w,t)=>{var i,n,d,er,f;Object.defineProperty(w,"__esModule",{value:!0}),w.SerializableEmpty=w.PrintAnnotationStorage=w.AnnotationStorage=void 0,t(89),t(149),t(152);var p=t(1),y=t(164),k=t(170);const u=Object.freeze({map:null,hash:"",transfers:void 0});w.SerializableEmpty=u;class g{constructor(){$(this,d);$(this,i,!1);$(this,n,new Map);this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(r,o){const m=l(this,n).get(r);return m===void 0?o:Object.assign(o,m)}getRawValue(r){return l(this,n).get(r)}remove(r){if(l(this,n).delete(r),l(this,n).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const o of l(this,n).values())if(o instanceof y.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(r,o){const m=l(this,n).get(r);let v=!1;if(m!==void 0)for(const[A,b]of Object.entries(o))m[A]!==b&&(v=!0,m[A]=b);else v=!0,l(this,n).set(r,o);v&&J(this,d,er).call(this),o instanceof y.AnnotationEditor&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(o.constructor._type)}has(r){return l(this,n).has(r)}getAll(){return l(this,n).size>0?(0,p.objectFromMap)(l(this,n)):null}setAll(r){for(const[o,m]of Object.entries(r))this.setValue(o,m)}get size(){return l(this,n).size}resetModified(){l(this,i)&&(le(this,i,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new e(this)}get serializable(){if(l(this,n).size===0)return u;const r=new Map,o=new k.MurmurHash3_64,m=[],v=Object.create(null);let A=!1;for(const[b,c]of l(this,n)){const s=c instanceof y.AnnotationEditor?c.serialize(!1,v):c;s&&(r.set(b,s),o.update(`${b}:${JSON.stringify(s)}`),A||(A=!!s.bitmap))}if(A)for(const b of r.values())b.bitmap&&m.push(b.bitmap);return r.size>0?{map:r,hash:o.hexdigest(),transfers:m}:u}}i=new WeakMap,n=new WeakMap,d=new WeakSet,er=function(){l(this,i)||(le(this,i,!0),typeof this.onSetModified=="function"&&this.onSetModified())},w.AnnotationStorage=g;class e extends g{constructor(o){super();$(this,f,void 0);const{map:m,hash:v,transfers:A}=o.serializable,b=structuredClone(m,null);le(this,f,{map:b,hash:v,transfers:A})}get print(){(0,p.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return l(this,f)}}f=new WeakMap,w.PrintAnnotationStorage=e},(N,w,t)=>{var e,i,n,d,h,f,a,r,o,m,v,A,b,c,s,Zt,T,jt,D,qt,_,en,W,tr,he,nr,z,rr,oe,tn,Pe,ir;Object.defineProperty(w,"__esModule",{value:!0}),w.AnnotationEditor=void 0,t(89),t(2);var p=t(165),y=t(1),k=t(168);const P=class P{constructor(E){$(this,s);$(this,T);$(this,_);$(this,W);$(this,he);$(this,z);$(this,oe);$(this,Pe);$(this,e,"");$(this,i,!1);$(this,n,null);$(this,d,null);$(this,h,null);$(this,f,!1);$(this,a,null);$(this,r,this.focusin.bind(this));$(this,o,this.focusout.bind(this));$(this,m,!1);$(this,v,!1);$(this,A,!1);tt(this,"_initialOptions",Object.create(null));tt(this,"_uiManager",null);tt(this,"_focusEventsAllowed",!0);tt(this,"_l10nPromise",null);$(this,b,!1);$(this,c,P._zIndex++);this.constructor===P&&(0,y.unreachable)("Cannot initialize AnnotationEditor."),this.parent=E.parent,this.id=E.id,this.width=this.height=null,this.pageIndex=E.parent.pageIndex,this.name=E.name,this.div=null,this._uiManager=E.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=E.isCentered,this._structTreeParentId=null;const{rotation:R,rawDims:{pageWidth:O,pageHeight:B,pageX:F,pageY:Z}}=this.parent.viewport;this.rotation=R,this.pageRotation=(360+R-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[O,B],this.pageTranslation=[F,Z];const[se,q]=this.parentDimensions;this.x=E.x/se,this.y=E.y/q,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return(0,y.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(E){const R=new g({id:E.parent.getNextId(),parent:E.parent,uiManager:E._uiManager});R.annotationElementId=E.annotationElementId,R.deleted=!0,R._uiManager.addToAnnotationStorage(R)}static initialize(E){let R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(P._l10nPromise||(P._l10nPromise=new Map(["editor_alt_text_button_label","editor_alt_text_edit_button_label","editor_alt_text_decorative_tooltip"].map(B=>[B,E.get(B)]))),R!=null&&R.strings)for(const B of R.strings)P._l10nPromise.set(B,E.get(B));if(P._borderLineWidth!==-1)return;const O=getComputedStyle(document.documentElement);P._borderLineWidth=parseFloat(O.getPropertyValue("--outline-width"))||0}static updateDefaultParams(E,R){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(E){return!1}static paste(E,R){(0,y.unreachable)("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return l(this,b)}set _isDraggable(E){var R;le(this,b,E),(R=this.div)==null||R.classList.toggle("draggable",E)}center(){const[E,R]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*R/(E*2),this.y+=this.width*E/(R*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*R/(E*2),this.y-=this.width*E/(R*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(E){this._uiManager.addCommands(E)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=l(this,c)}setParent(E){E!==null&&(this.pageIndex=E.pageIndex,this.pageDimensions=E.pageDimensions),this.parent=E}focusin(E){this._focusEventsAllowed&&(l(this,m)?le(this,m,!1):this.parent.setSelected(this))}focusout(E){var O;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const R=E.relatedTarget;R!=null&&R.closest(`#${this.id}`)||(E.preventDefault(),(O=this.parent)!=null&&O.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(E,R,O,B){const[F,Z]=this.parentDimensions;[O,B]=this.screenToPageTranslation(O,B),this.x=(E+O)/F,this.y=(R+B)/Z,this.fixAndSetPosition()}translate(E,R){J(this,s,Zt).call(this,this.parentDimensions,E,R)}translateInPage(E,R){J(this,s,Zt).call(this,this.pageDimensions,E,R),this.div.scrollIntoView({block:"nearest"})}drag(E,R){const[O,B]=this.parentDimensions;if(this.x+=E/O,this.y+=R/B,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:pe,y:te}=this.div.getBoundingClientRect();this.parent.findNewParent(this,pe,te)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:F,y:Z}=this;const[se,q]=J(this,T,jt).call(this);F+=se,Z+=q,this.div.style.left=`${(100*F).toFixed(2)}%`,this.div.style.top=`${(100*Z).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}fixAndSetPosition(){const[E,R]=this.pageDimensions;let{x:O,y:B,width:F,height:Z}=this;switch(F*=E,Z*=R,O*=E,B*=R,this.rotation){case 0:O=Math.max(0,Math.min(E-F,O)),B=Math.max(0,Math.min(R-Z,B));break;case 90:O=Math.max(0,Math.min(E-Z,O)),B=Math.min(R,Math.max(F,B));break;case 180:O=Math.min(E,Math.max(F,O)),B=Math.min(R,Math.max(Z,B));break;case 270:O=Math.min(E,Math.max(Z,O)),B=Math.max(0,Math.min(R-F,B));break}this.x=O/=E,this.y=B/=R;const[se,q]=J(this,T,jt).call(this);O+=se,B+=q;const{style:pe}=this.div;pe.left=`${(100*O).toFixed(2)}%`,pe.top=`${(100*B).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(E,R){var O;return J(O=P,D,qt).call(O,E,R,this.parentRotation)}pageTranslationToScreen(E,R){var O;return J(O=P,D,qt).call(O,E,R,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:E,pageDimensions:[R,O]}=this,B=R*E,F=O*E;return y.FeatureTest.isCSSRoundSupported?[Math.round(B),Math.round(F)]:[B,F]}setDims(E,R){var F;const[O,B]=this.parentDimensions;this.div.style.width=`${(100*E/O).toFixed(2)}%`,l(this,f)||(this.div.style.height=`${(100*R/B).toFixed(2)}%`),(F=l(this,n))==null||F.classList.toggle("small",EO.stopPropagation()),E.addEventListener("click",O=>{O.preventDefault(),this._uiManager.editAltText(this)},{capture:!0}),E.addEventListener("keydown",O=>{O.target===E&&O.key==="Enter"&&(O.preventDefault(),this._uiManager.editAltText(this))}),J(this,oe,tn).call(this),this.div.append(E),P.SMALL_EDITOR_SIZE||(P.SMALL_EDITOR_SIZE=Math.min(128,Math.round(E.getBoundingClientRect().width*1.4)))}getClientDimensions(){return this.div.getBoundingClientRect()}get altTextData(){return{altText:l(this,e),decorative:l(this,i)}}set altTextData(E){let{altText:R,decorative:O}=E;l(this,e)===R&&l(this,i)===O||(le(this,e,R),le(this,i,O),J(this,oe,tn).call(this))}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.setAttribute("tabIndex",0),this.setInForeground(),this.div.addEventListener("focusin",l(this,r)),this.div.addEventListener("focusout",l(this,o));const[E,R]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth=`${(100*R/E).toFixed(2)}%`,this.div.style.maxHeight=`${(100*E/R).toFixed(2)}%`);const[O,B]=this.getInitialTranslation();return this.translate(O,B),(0,p.bindEvents)(this,this.div,["pointerdown"]),this.div}pointerdown(E){const{isMac:R}=y.FeatureTest.platform;if(E.button!==0||E.ctrlKey&&R){E.preventDefault();return}le(this,m,!0),J(this,Pe,ir).call(this,E)}moveInDOM(){var E;(E=this.parent)==null||E.moveEditorInDOM(this)}_setParentAndPosition(E,R,O){E.changeParent(this),this.x=R,this.y=O,this.fixAndSetPosition()}getRect(E,R){const O=this.parentScale,[B,F]=this.pageDimensions,[Z,se]=this.pageTranslation,q=E/O,pe=R/O,te=this.x*B,me=this.y*F,ve=this.width*B,Re=this.height*F;switch(this.rotation){case 0:return[te+q+Z,F-me-pe-Re+se,te+q+ve+Z,F-me-pe+se];case 90:return[te+pe+Z,F-me+q+se,te+pe+Re+Z,F-me+q+ve+se];case 180:return[te-q-ve+Z,F-me+pe+se,te-q+Z,F-me+pe+Re+se];case 270:return[te-pe-Re+Z,F-me-q-ve+se,te-pe+Z,F-me-q+se];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(E,R){const[O,B,F,Z]=E,se=F-O,q=Z-B;switch(this.rotation){case 0:return[O,R-Z,se,q];case 90:return[O,R-B,q,se];case 180:return[F,R-B,se,q];case 270:return[F,R-Z,q,se];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){le(this,A,!0)}disableEditMode(){le(this,A,!1)}isInEditMode(){return l(this,A)}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){var E,R;(E=this.div)==null||E.addEventListener("focusin",l(this,r)),(R=this.div)==null||R.addEventListener("focusout",l(this,o))}serialize(){(0,y.unreachable)("An editor must be serializable")}static deserialize(E,R,O){const B=new this.prototype.constructor({parent:R,id:R.getNextId(),uiManager:O});B.rotation=E.rotation;const[F,Z]=B.pageDimensions,[se,q,pe,te]=B.getRectInCurrentCoords(E.rect,Z);return B.x=se/F,B.y=q/Z,B.width=pe/F,B.height=te/Z,B}remove(){var E;this.div.removeEventListener("focusin",l(this,r)),this.div.removeEventListener("focusout",l(this,o)),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),(E=l(this,n))==null||E.remove(),le(this,n,null),le(this,d,null)}get isResizable(){return!1}makeResizable(){this.isResizable&&(J(this,W,tr).call(this),l(this,a).classList.remove("hidden"))}select(){var E;this.makeResizable(),(E=this.div)==null||E.classList.add("selectedEditor")}unselect(){var E,R,O;(E=l(this,a))==null||E.classList.add("hidden"),(R=this.div)==null||R.classList.remove("selectedEditor"),(O=this.div)!=null&&O.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus()}updateParams(E,R){}disableEditing(){l(this,n)&&(l(this,n).hidden=!0)}enableEditing(){l(this,n)&&(l(this,n).hidden=!1)}enterInEditMode(){}get contentDiv(){return this.div}get isEditing(){return l(this,v)}set isEditing(E){le(this,v,E),this.parent&&(E?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(E,R){le(this,f,!0);const O=E/R,{style:B}=this.div;B.aspectRatio=O,B.height="auto"}static get MIN_SIZE(){return 16}};e=new WeakMap,i=new WeakMap,n=new WeakMap,d=new WeakMap,h=new WeakMap,f=new WeakMap,a=new WeakMap,r=new WeakMap,o=new WeakMap,m=new WeakMap,v=new WeakMap,A=new WeakMap,b=new WeakMap,c=new WeakMap,s=new WeakSet,Zt=function(E,R,O){let[B,F]=E;[R,O]=this.screenToPageTranslation(R,O),this.x+=R/B,this.y+=O/F,this.fixAndSetPosition()},T=new WeakSet,jt=function(){const[E,R]=this.parentDimensions,{_borderLineWidth:O}=P,B=O/E,F=O/R;switch(this.rotation){case 90:return[-B,F];case 180:return[B,F];case 270:return[B,-F];default:return[-B,-F]}},D=new WeakSet,qt=function(E,R,O){switch(O){case 90:return[R,-E];case 180:return[-E,-R];case 270:return[-R,E];default:return[E,R]}},_=new WeakSet,en=function(E){switch(E){case 90:{const[R,O]=this.pageDimensions;return[0,-R/O,O/R,0]}case 180:return[-1,0,0,-1];case 270:{const[R,O]=this.pageDimensions;return[0,R/O,-O/R,0]}default:return[1,0,0,1]}},W=new WeakSet,tr=function(){if(l(this,a))return;le(this,a,document.createElement("div")),l(this,a).classList.add("resizers");const E=["topLeft","topRight","bottomRight","bottomLeft"];this._willKeepAspectRatio||E.push("topMiddle","middleRight","bottomMiddle","middleLeft");for(const R of E){const O=document.createElement("div");l(this,a).append(O),O.classList.add("resizer",R),O.addEventListener("pointerdown",J(this,he,nr).bind(this,R)),O.addEventListener("contextmenu",k.noContextMenu)}this.div.prepend(l(this,a))},he=new WeakSet,nr=function(E,R){R.preventDefault();const{isMac:O}=y.FeatureTest.platform;if(R.button!==0||R.ctrlKey&&O)return;const B=J(this,z,rr).bind(this,E),F=this._isDraggable;this._isDraggable=!1;const Z={passive:!0,capture:!0};window.addEventListener("pointermove",B,Z);const se=this.x,q=this.y,pe=this.width,te=this.height,me=this.parent.div.style.cursor,ve=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(R.target).cursor;const Re=()=>{this._isDraggable=F,window.removeEventListener("pointerup",Re),window.removeEventListener("blur",Re),window.removeEventListener("pointermove",B,Z),this.parent.div.style.cursor=me,this.div.style.cursor=ve;const Oe=this.x,Ie=this.y,Le=this.width,ue=this.height;Oe===se&&Ie===q&&Le===pe&&ue===te||this.addCommands({cmd:()=>{this.width=Le,this.height=ue,this.x=Oe,this.y=Ie;const[ne,ce]=this.parentDimensions;this.setDims(ne*Le,ce*ue),this.fixAndSetPosition()},undo:()=>{this.width=pe,this.height=te,this.x=se,this.y=q;const[ne,ce]=this.parentDimensions;this.setDims(ne*pe,ce*te),this.fixAndSetPosition()},mustExec:!0})};window.addEventListener("pointerup",Re),window.addEventListener("blur",Re)},z=new WeakSet,rr=function(E,R){const[O,B]=this.parentDimensions,F=this.x,Z=this.y,se=this.width,q=this.height,pe=P.MIN_SIZE/O,te=P.MIN_SIZE/B,me=X=>Math.round(X*1e4)/1e4,ve=J(this,_,en).call(this,this.rotation),Re=(X,de)=>[ve[0]*X+ve[2]*de,ve[1]*X+ve[3]*de],Oe=J(this,_,en).call(this,360-this.rotation),Ie=(X,de)=>[Oe[0]*X+Oe[2]*de,Oe[1]*X+Oe[3]*de];let Le,ue,ne=!1,ce=!1;switch(E){case"topLeft":ne=!0,Le=(X,de)=>[0,0],ue=(X,de)=>[X,de];break;case"topMiddle":Le=(X,de)=>[X/2,0],ue=(X,de)=>[X/2,de];break;case"topRight":ne=!0,Le=(X,de)=>[X,0],ue=(X,de)=>[0,de];break;case"middleRight":ce=!0,Le=(X,de)=>[X,de/2],ue=(X,de)=>[0,de/2];break;case"bottomRight":ne=!0,Le=(X,de)=>[X,de],ue=(X,de)=>[0,0];break;case"bottomMiddle":Le=(X,de)=>[X/2,de],ue=(X,de)=>[X/2,0];break;case"bottomLeft":ne=!0,Le=(X,de)=>[0,de],ue=(X,de)=>[X,0];break;case"middleLeft":ce=!0,Le=(X,de)=>[0,de/2],ue=(X,de)=>[X,de/2];break}const ge=Le(se,q),Ce=ue(se,q);let Me=Re(...Ce);const Ve=me(F+Me[0]),ze=me(Z+Me[1]);let _e=1,He=1,[Ke,Xe]=this.screenToPageTranslation(R.movementX,R.movementY);if([Ke,Xe]=Ie(Ke/O,Xe/B),ne){const X=Math.hypot(se,q);_e=He=Math.max(Math.min(Math.hypot(Ce[0]-ge[0]-Ke,Ce[1]-ge[1]-Xe)/X,1/se,1/q),pe/se,te/q)}else ce?_e=Math.max(pe,Math.min(1,Math.abs(Ce[0]-ge[0]-Ke)))/se:He=Math.max(te,Math.min(1,Math.abs(Ce[1]-ge[1]-Xe)))/q;const je=me(se*_e),Je=me(q*He);Me=Re(...ue(je,Je));const V=Ve-Me[0],H=ze-Me[1];this.width=je,this.height=Je,this.x=V,this.y=H,this.setDims(O*je,B*Je),this.fixAndSetPosition()},oe=new WeakSet,tn=async function(){var O;const E=l(this,n);if(!E)return;if(!l(this,e)&&!l(this,i)){E.classList.remove("done"),(O=l(this,d))==null||O.remove();return}P._l10nPromise.get("editor_alt_text_edit_button_label").then(B=>{E.setAttribute("aria-label",B)});let R=l(this,d);if(!R){le(this,d,R=document.createElement("span")),R.className="tooltip",R.setAttribute("role","tooltip");const B=R.id=`alt-text-tooltip-${this.id}`;E.setAttribute("aria-describedby",B);const F=100;E.addEventListener("mouseenter",()=>{le(this,h,setTimeout(()=>{le(this,h,null),l(this,d).classList.add("show"),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"alt_text_tooltip"}}})},F))}),E.addEventListener("mouseleave",()=>{var Z;clearTimeout(l(this,h)),le(this,h,null),(Z=l(this,d))==null||Z.classList.remove("show")})}E.classList.add("done"),R.innerText=l(this,i)?await P._l10nPromise.get("editor_alt_text_decorative_tooltip"):l(this,e),R.parentNode||E.append(R)},Pe=new WeakSet,ir=function(E){if(!this._isDraggable)return;const R=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();let O,B;R&&(O={passive:!0,capture:!0},B=Z=>{const[se,q]=this.screenToPageTranslation(Z.movementX,Z.movementY);this._uiManager.dragSelectedEditors(se,q)},window.addEventListener("pointermove",B,O));const F=()=>{if(window.removeEventListener("pointerup",F),window.removeEventListener("blur",F),R&&window.removeEventListener("pointermove",B,O),le(this,m,!1),!this._uiManager.endDragSession()){const{isMac:Z}=y.FeatureTest.platform;E.ctrlKey&&!Z||E.shiftKey||E.metaKey&&Z?this.parent.toggleSelected(this):this.parent.setSelected(this)}};window.addEventListener("pointerup",F),window.addEventListener("blur",F)},$(P,D),tt(P,"_borderLineWidth",-1),tt(P,"_colorManager",new p.ColorManager),tt(P,"_zIndex",1),tt(P,"SMALL_EDITOR_SIZE",0);let u=P;w.AnnotationEditor=u;class g extends u{constructor(E){super(E),this.annotationElementId=E.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}},(N,w,t)=>{var f,a,r,o,m,nn,b,c,s,x,T,sr,I,_,Q,W,j,he,Y,z,ee,oe,ye,Pe,L,P,M,E,R,O,B,F,Z,se,q,pe,te,me,ve,Re,Oe,Ie,Le,ue,ne,ce,ge,ar,Me,rn,ze,sn,He,It,Xe,an,Je,on,H,st,de,bt,K,or,ie,lr,Se,ln,Te,yt,ke,cn;Object.defineProperty(w,"__esModule",{value:!0}),w.KeyboardManager=w.CommandManager=w.ColorManager=w.AnnotationEditorUIManager=void 0,w.bindEvents=k,w.opacityToHex=u,t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123),t(2),t(89),t(125),t(136),t(138),t(141),t(143),t(145),t(147),t(166);var p=t(1),y=t(168);function k(re,C,G){for(const ae of G)C.addEventListener(ae,re[ae].bind(re))}function u(re){return Math.round(Math.min(255,Math.max(1,255*re))).toString(16).padStart(2,"0")}class g{constructor(){$(this,f,0)}getId(){return`${p.AnnotationEditorPrefix}${ut(this,f)._++}`}}f=new WeakMap;const A=class A{constructor(){$(this,m);$(this,a,(0,p.getUuid)());$(this,r,0);$(this,o,null)}static get _isSVGFittingCanvas(){const C='data:image/svg+xml;charset=UTF-8,',ae=new OffscreenCanvas(1,3).getContext("2d"),fe=new Image;fe.src=C;const be=fe.decode().then(()=>(ae.drawImage(fe,0,0,1,1,0,0,1,3),new Uint32Array(ae.getImageData(0,0,1,1).data.buffer)[0]===0));return(0,p.shadow)(this,"_isSVGFittingCanvas",be)}async getFromFile(C){const{lastModified:G,name:ae,size:fe,type:be}=C;return J(this,m,nn).call(this,`${G}_${ae}_${fe}_${be}`,C)}async getFromUrl(C){return J(this,m,nn).call(this,C,C)}async getFromId(C){l(this,o)||le(this,o,new Map);const G=l(this,o).get(C);return G?G.bitmap?(G.refCounter+=1,G):G.file?this.getFromFile(G.file):this.getFromUrl(G.url):null}getSvgUrl(C){const G=l(this,o).get(C);return G!=null&&G.isSvg?G.svgUrl:null}deleteId(C){l(this,o)||le(this,o,new Map);const G=l(this,o).get(C);G&&(G.refCounter-=1,G.refCounter===0&&(G.bitmap=null))}isValidId(C){return C.startsWith(`image_${l(this,a)}_`)}};a=new WeakMap,r=new WeakMap,o=new WeakMap,m=new WeakSet,nn=async function(C,G){l(this,o)||le(this,o,new Map);let ae=l(this,o).get(C);if(ae===null)return null;if(ae!=null&&ae.bitmap)return ae.refCounter+=1,ae;try{ae||(ae={bitmap:null,id:`image_${l(this,a)}_${ut(this,r)._++}`,refCounter:0,isSvg:!1});let fe;if(typeof G=="string"){ae.url=G;const be=await fetch(G);if(!be.ok)throw new Error(be.statusText);fe=await be.blob()}else fe=ae.file=G;if(fe.type==="image/svg+xml"){const be=A._isSVGFittingCanvas,xe=new FileReader,De=new Image,We=new Promise((Fe,Ze)=>{De.onload=()=>{ae.bitmap=De,ae.isSvg=!0,Fe()},xe.onload=async()=>{const Ge=ae.svgUrl=xe.result;De.src=await be?`${Ge}#svgView(preserveAspectRatio(none))`:Ge},De.onerror=xe.onerror=Ze});xe.readAsDataURL(fe),await We}else ae.bitmap=await createImageBitmap(fe);ae.refCounter=1}catch(fe){console.error(fe),ae=null}return l(this,o).set(C,ae),ae&&l(this,o).set(ae.id,ae),ae};let e=A;class i{constructor(){$(this,b,[]);$(this,c,!1);$(this,s,void 0);$(this,x,-1);let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:128;le(this,s,C)}add(C){let{cmd:G,undo:ae,mustExec:fe,type:be=NaN,overwriteIfSameType:xe=!1,keepUndo:De=!1}=C;if(fe&&G(),l(this,c))return;const We={cmd:G,undo:ae,type:be};if(l(this,x)===-1){l(this,b).length>0&&(l(this,b).length=0),le(this,x,0),l(this,b).push(We);return}if(xe&&l(this,b)[l(this,x)].type===be){De&&(We.undo=l(this,b)[l(this,x)].undo),l(this,b)[l(this,x)]=We;return}const Fe=l(this,x)+1;Fe===l(this,s)?l(this,b).splice(0,1):(le(this,x,Fe),Febe===G[xe]))return D._colorsMapping.get(ae);return G}getHexCode(C){const G=this._colors.get(C);return G?p.Util.makeHexColor(...G):C}};tt(D,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let d=D;w.ColorManager=d;const Be=class Be{constructor(C,G,ae,fe,be,xe){$(this,ge);$(this,Me);$(this,ze);$(this,He);$(this,Xe);$(this,Je);$(this,H);$(this,de);$(this,K);$(this,ie);$(this,Se);$(this,Te);$(this,ke);$(this,I,null);$(this,_,new Map);$(this,Q,new Map);$(this,W,null);$(this,j,null);$(this,he,new i);$(this,Y,0);$(this,z,new Set);$(this,ee,null);$(this,oe,null);$(this,ye,new Set);$(this,Pe,null);$(this,L,new g);$(this,P,!1);$(this,M,!1);$(this,E,null);$(this,R,p.AnnotationEditorType.NONE);$(this,O,new Set);$(this,B,null);$(this,F,this.blur.bind(this));$(this,Z,this.focus.bind(this));$(this,se,this.copy.bind(this));$(this,q,this.cut.bind(this));$(this,pe,this.paste.bind(this));$(this,te,this.keydown.bind(this));$(this,me,this.onEditingAction.bind(this));$(this,ve,this.onPageChanging.bind(this));$(this,Re,this.onScaleChanging.bind(this));$(this,Oe,this.onRotationChanging.bind(this));$(this,Ie,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1});$(this,Le,[0,0]);$(this,ue,null);$(this,ne,null);$(this,ce,null);le(this,ne,C),le(this,ce,G),le(this,W,ae),this._eventBus=fe,this._eventBus._on("editingaction",l(this,me)),this._eventBus._on("pagechanging",l(this,ve)),this._eventBus._on("scalechanging",l(this,Re)),this._eventBus._on("rotationchanging",l(this,Oe)),le(this,j,be.annotationStorage),le(this,Pe,be.filterFactory),le(this,B,xe),this.viewParameters={realScale:y.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}static get _keyboardManager(){const C=Be.prototype,G=be=>{const{activeElement:xe}=document;return xe&&l(be,ne).contains(xe)&&be.hasSomethingToControl()},ae=this.TRANSLATE_SMALL,fe=this.TRANSLATE_BIG;return(0,p.shadow)(this,"_keyboardManager",new n([[["ctrl+a","mac+meta+a"],C.selectAll],[["ctrl+z","mac+meta+z"],C.undo],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],C.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],C.delete],[["Escape","mac+Escape"],C.unselectAll],[["ArrowLeft","mac+ArrowLeft"],C.translateSelectedEditors,{args:[-ae,0],checker:G}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],C.translateSelectedEditors,{args:[-fe,0],checker:G}],[["ArrowRight","mac+ArrowRight"],C.translateSelectedEditors,{args:[ae,0],checker:G}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],C.translateSelectedEditors,{args:[fe,0],checker:G}],[["ArrowUp","mac+ArrowUp"],C.translateSelectedEditors,{args:[0,-ae],checker:G}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],C.translateSelectedEditors,{args:[0,-fe],checker:G}],[["ArrowDown","mac+ArrowDown"],C.translateSelectedEditors,{args:[0,ae],checker:G}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],C.translateSelectedEditors,{args:[0,fe],checker:G}]]))}destroy(){J(this,He,It).call(this),J(this,Me,rn).call(this),this._eventBus._off("editingaction",l(this,me)),this._eventBus._off("pagechanging",l(this,ve)),this._eventBus._off("scalechanging",l(this,Re)),this._eventBus._off("rotationchanging",l(this,Oe));for(const C of l(this,Q).values())C.destroy();l(this,Q).clear(),l(this,_).clear(),l(this,ye).clear(),le(this,I,null),l(this,O).clear(),l(this,he).destroy(),l(this,W).destroy()}get hcmFilter(){return(0,p.shadow)(this,"hcmFilter",l(this,B)?l(this,Pe).addHCMFilter(l(this,B).foreground,l(this,B).background):"none")}get direction(){return(0,p.shadow)(this,"direction",getComputedStyle(l(this,ne)).direction)}editAltText(C){var G;(G=l(this,W))==null||G.editAltText(this,C)}onPageChanging(C){let{pageNumber:G}=C;le(this,Y,G-1)}focusMainContainer(){l(this,ne).focus()}findParent(C,G){for(const ae of l(this,Q).values()){const{x:fe,y:be,width:xe,height:De}=ae.div.getBoundingClientRect();if(C>=fe&&C<=fe+xe&&G>=be&&G<=be+De)return ae}return null}disableUserSelect(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;l(this,ce).classList.toggle("noUserSelect",C)}addShouldRescale(C){l(this,ye).add(C)}removeShouldRescale(C){l(this,ye).delete(C)}onScaleChanging(C){let{scale:G}=C;this.commitOrRemove(),this.viewParameters.realScale=G*y.PixelsPerInch.PDF_TO_CSS_UNITS;for(const ae of l(this,ye))ae.onScaleChanging()}onRotationChanging(C){let{pagesRotation:G}=C;this.commitOrRemove(),this.viewParameters.rotation=G}addToAnnotationStorage(C){!C.isEmpty()&&l(this,j)&&!l(this,j).has(C.id)&&l(this,j).setValue(C.id,C)}blur(){if(!this.hasSelection)return;const{activeElement:C}=document;for(const G of l(this,O))if(G.div.contains(C)){le(this,E,[G,C]),G._focusEventsAllowed=!1;break}}focus(){if(!l(this,E))return;const[C,G]=l(this,E);le(this,E,null),G.addEventListener("focusin",()=>{C._focusEventsAllowed=!0},{once:!0}),G.focus()}addEditListeners(){J(this,ze,sn).call(this),J(this,Xe,an).call(this)}removeEditListeners(){J(this,He,It).call(this),J(this,Je,on).call(this)}copy(C){var ae;if(C.preventDefault(),(ae=l(this,I))==null||ae.commitOrRemove(),!this.hasSelection)return;const G=[];for(const fe of l(this,O)){const be=fe.serialize(!0);be&&G.push(be)}G.length!==0&&C.clipboardData.setData("application/pdfjs",JSON.stringify(G))}cut(C){this.copy(C),this.delete()}paste(C){C.preventDefault();const{clipboardData:G}=C;for(const be of G.items)for(const xe of l(this,oe))if(xe.isHandlingMimeForPasting(be.type)){xe.paste(be,this.currentLayer);return}let ae=G.getData("application/pdfjs");if(!ae)return;try{ae=JSON.parse(ae)}catch(be){(0,p.warn)(`paste: "${be.message}".`);return}if(!Array.isArray(ae))return;this.unselectAll();const fe=this.currentLayer;try{const be=[];for(const We of ae){const Fe=fe.deserialize(We);if(!Fe)return;be.push(Fe)}const xe=()=>{for(const We of be)J(this,Se,ln).call(this,We);J(this,ke,cn).call(this,be)},De=()=>{for(const We of be)We.remove()};this.addCommands({cmd:xe,undo:De,mustExec:!0})}catch(be){(0,p.warn)(`paste: "${be.message}".`)}}keydown(C){var G;(G=this.getActive())!=null&&G.shouldGetKeyboardEvents()||Be._keyboardManager.exec(this,C)}onEditingAction(C){["undo","redo","delete","selectAll"].includes(C.name)&&this[C.name]()}setEditingState(C){C?(J(this,ge,ar).call(this),J(this,ze,sn).call(this),J(this,Xe,an).call(this),J(this,H,st).call(this,{isEditing:l(this,R)!==p.AnnotationEditorType.NONE,isEmpty:J(this,Te,yt).call(this),hasSomethingToUndo:l(this,he).hasSomethingToUndo(),hasSomethingToRedo:l(this,he).hasSomethingToRedo(),hasSelectedEditor:!1})):(J(this,Me,rn).call(this),J(this,He,It).call(this),J(this,Je,on).call(this),J(this,H,st).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(C){if(!l(this,oe)){le(this,oe,C);for(const G of l(this,oe))J(this,de,bt).call(this,G.defaultPropertiesToUpdate)}}getId(){return l(this,L).getId()}get currentLayer(){return l(this,Q).get(l(this,Y))}getLayer(C){return l(this,Q).get(C)}get currentPageIndex(){return l(this,Y)}addLayer(C){l(this,Q).set(C.pageIndex,C),l(this,P)?C.enable():C.disable()}removeLayer(C){l(this,Q).delete(C.pageIndex)}updateMode(C){let G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(l(this,R)!==C){if(le(this,R,C),C===p.AnnotationEditorType.NONE){this.setEditingState(!1),J(this,ie,lr).call(this);return}this.setEditingState(!0),J(this,K,or).call(this),this.unselectAll();for(const ae of l(this,Q).values())ae.updateMode(C);if(G){for(const ae of l(this,_).values())if(ae.annotationElementId===G){this.setSelected(ae),ae.enterInEditMode();break}}}}updateToolbar(C){C!==l(this,R)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:C})}updateParams(C,G){if(l(this,oe)){if(C===p.AnnotationEditorParamsType.CREATE){this.currentLayer.addNewEditor(C);return}for(const ae of l(this,O))ae.updateParams(C,G);for(const ae of l(this,oe))ae.updateDefaultParams(C,G)}}enableWaiting(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(l(this,M)!==C){le(this,M,C);for(const G of l(this,Q).values())C?G.disableClick():G.enableClick(),G.div.classList.toggle("waiting",C)}}getEditors(C){const G=[];for(const ae of l(this,_).values())ae.pageIndex===C&&G.push(ae);return G}getEditor(C){return l(this,_).get(C)}addEditor(C){l(this,_).set(C.id,C)}removeEditor(C){var G;l(this,_).delete(C.id),this.unselect(C),(!C.annotationElementId||!l(this,z).has(C.annotationElementId))&&((G=l(this,j))==null||G.remove(C.id))}addDeletedAnnotationElement(C){l(this,z).add(C.annotationElementId),C.deleted=!0}isDeletedAnnotationElement(C){return l(this,z).has(C)}removeDeletedAnnotationElement(C){l(this,z).delete(C.annotationElementId),C.deleted=!1}setActiveEditor(C){l(this,I)!==C&&(le(this,I,C),C&&J(this,de,bt).call(this,C.propertiesToUpdate))}toggleSelected(C){if(l(this,O).has(C)){l(this,O).delete(C),C.unselect(),J(this,H,st).call(this,{hasSelectedEditor:this.hasSelection});return}l(this,O).add(C),C.select(),J(this,de,bt).call(this,C.propertiesToUpdate),J(this,H,st).call(this,{hasSelectedEditor:!0})}setSelected(C){for(const G of l(this,O))G!==C&&G.unselect();l(this,O).clear(),l(this,O).add(C),C.select(),J(this,de,bt).call(this,C.propertiesToUpdate),J(this,H,st).call(this,{hasSelectedEditor:!0})}isSelected(C){return l(this,O).has(C)}unselect(C){C.unselect(),l(this,O).delete(C),J(this,H,st).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return l(this,O).size!==0}undo(){l(this,he).undo(),J(this,H,st).call(this,{hasSomethingToUndo:l(this,he).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:J(this,Te,yt).call(this)})}redo(){l(this,he).redo(),J(this,H,st).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:l(this,he).hasSomethingToRedo(),isEmpty:J(this,Te,yt).call(this)})}addCommands(C){l(this,he).add(C),J(this,H,st).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:J(this,Te,yt).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const C=[...l(this,O)],G=()=>{for(const fe of C)fe.remove()},ae=()=>{for(const fe of C)J(this,Se,ln).call(this,fe)};this.addCommands({cmd:G,undo:ae,mustExec:!0})}commitOrRemove(){var C;(C=l(this,I))==null||C.commitOrRemove()}hasSomethingToControl(){return l(this,I)||this.hasSelection}selectAll(){for(const C of l(this,O))C.commit();J(this,ke,cn).call(this,l(this,_).values())}unselectAll(){if(l(this,I)){l(this,I).commitOrRemove();return}if(this.hasSelection){for(const C of l(this,O))C.unselect();l(this,O).clear(),J(this,H,st).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(C,G){if((arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1)||this.commitOrRemove(),!this.hasSelection)return;l(this,Le)[0]+=C,l(this,Le)[1]+=G;const[fe,be]=l(this,Le),xe=[...l(this,O)],De=1e3;l(this,ue)&&clearTimeout(l(this,ue)),le(this,ue,setTimeout(()=>{le(this,ue,null),l(this,Le)[0]=l(this,Le)[1]=0,this.addCommands({cmd:()=>{for(const We of xe)l(this,_).has(We.id)&&We.translateInPage(fe,be)},undo:()=>{for(const We of xe)l(this,_).has(We.id)&&We.translateInPage(-fe,-be)},mustExec:!1})},De));for(const We of xe)We.translateInPage(C,G)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),le(this,ee,new Map);for(const C of l(this,O))l(this,ee).set(C,{savedX:C.x,savedY:C.y,savedPageIndex:C.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!l(this,ee))return!1;this.disableUserSelect(!1);const C=l(this,ee);le(this,ee,null);let G=!1;for(const[{x:fe,y:be,pageIndex:xe},De]of C)De.newX=fe,De.newY=be,De.newPageIndex=xe,G||(G=fe!==De.savedX||be!==De.savedY||xe!==De.savedPageIndex);if(!G)return!1;const ae=(fe,be,xe,De)=>{if(l(this,_).has(fe.id)){const We=l(this,Q).get(De);We?fe._setParentAndPosition(We,be,xe):(fe.pageIndex=De,fe.x=be,fe.y=xe)}};return this.addCommands({cmd:()=>{for(const[fe,{newX:be,newY:xe,newPageIndex:De}]of C)ae(fe,be,xe,De)},undo:()=>{for(const[fe,{savedX:be,savedY:xe,savedPageIndex:De}]of C)ae(fe,be,xe,De)},mustExec:!0}),!0}dragSelectedEditors(C,G){if(l(this,ee))for(const ae of l(this,ee).keys())ae.drag(C,G)}rebuild(C){if(C.parent===null){const G=this.getLayer(C.pageIndex);G?(G.changeParent(C),G.addOrRebuild(C)):(this.addEditor(C),this.addToAnnotationStorage(C),C.rebuild())}else C.parent.addOrRebuild(C)}isActive(C){return l(this,I)===C}getActive(){return l(this,I)}getMode(){return l(this,R)}get imageManager(){return(0,p.shadow)(this,"imageManager",new e)}};I=new WeakMap,_=new WeakMap,Q=new WeakMap,W=new WeakMap,j=new WeakMap,he=new WeakMap,Y=new WeakMap,z=new WeakMap,ee=new WeakMap,oe=new WeakMap,ye=new WeakMap,Pe=new WeakMap,L=new WeakMap,P=new WeakMap,M=new WeakMap,E=new WeakMap,R=new WeakMap,O=new WeakMap,B=new WeakMap,F=new WeakMap,Z=new WeakMap,se=new WeakMap,q=new WeakMap,pe=new WeakMap,te=new WeakMap,me=new WeakMap,ve=new WeakMap,Re=new WeakMap,Oe=new WeakMap,Ie=new WeakMap,Le=new WeakMap,ue=new WeakMap,ne=new WeakMap,ce=new WeakMap,ge=new WeakSet,ar=function(){window.addEventListener("focus",l(this,Z)),window.addEventListener("blur",l(this,F))},Me=new WeakSet,rn=function(){window.removeEventListener("focus",l(this,Z)),window.removeEventListener("blur",l(this,F))},ze=new WeakSet,sn=function(){window.addEventListener("keydown",l(this,te),{capture:!0})},He=new WeakSet,It=function(){window.removeEventListener("keydown",l(this,te),{capture:!0})},Xe=new WeakSet,an=function(){document.addEventListener("copy",l(this,se)),document.addEventListener("cut",l(this,q)),document.addEventListener("paste",l(this,pe))},Je=new WeakSet,on=function(){document.removeEventListener("copy",l(this,se)),document.removeEventListener("cut",l(this,q)),document.removeEventListener("paste",l(this,pe))},H=new WeakSet,st=function(C){Object.entries(C).some(ae=>{let[fe,be]=ae;return l(this,Ie)[fe]!==be})&&this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(l(this,Ie),C)})},de=new WeakSet,bt=function(C){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:C})},K=new WeakSet,or=function(){if(!l(this,P)){le(this,P,!0);for(const C of l(this,Q).values())C.enable()}},ie=new WeakSet,lr=function(){if(this.unselectAll(),l(this,P)){le(this,P,!1);for(const C of l(this,Q).values())C.disable()}},Se=new WeakSet,ln=function(C){const G=l(this,Q).get(C.pageIndex);G?G.addOrRebuild(C):this.addEditor(C)},Te=new WeakSet,yt=function(){if(l(this,_).size===0)return!0;if(l(this,_).size===1)for(const C of l(this,_).values())return C.isEmpty();return!1},ke=new WeakSet,cn=function(C){l(this,O).clear();for(const G of C)G.isEmpty()||(l(this,O).add(G),G.select());J(this,H,st).call(this,{hasSelectedEditor:!0})},tt(Be,"TRANSLATE_SMALL",1),tt(Be,"TRANSLATE_BIG",10);let h=Be;w.AnnotationEditorUIManager=h},(N,w,t)=>{var p=t(3),y=t(6),k=t(4),u=t(24),g=t(14),e=t(8),i=t(21),n=t(20),d=t(91),h=t(39),f=t(77),a=t(64),r=t(159),o=t(7),m=t(167),v=t(27),A=k.JSON,b=k.Number,c=k.SyntaxError,s=A&&A.parse,x=u("Object","keys"),T=Object.getOwnPropertyDescriptor,S=g("".charAt),D=g("".slice),I=g(/./.exec),_=g([].push),Q=/^\d$/,W=/^[1-9]$/,j=/^(?:-|\d)$/,he=/^[\t\n\r ]$/,Y=0,z=1,ee=function(E,R){E=f(E);var O=new L(E,0),B=O.parse(),F=B.value,Z=O.skip(he,B.end);if(Z{var p=t(14),y=t(39),k=SyntaxError,u=parseInt,g=String.fromCharCode,e=p("".charAt),i=p("".slice),n=p(/./.exec),d={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":` +`,"\\r":"\r","\\t":" "},h=/^[\da-f]{4}$/i,f=/^[\u0000-\u001F]$/;N.exports=function(a,r){for(var o=!0,m="";r{var Y,z,ee,oe,ye,Pe,L,P,M,E,R,O,ft,F,pt,se,hn,pe,Lt,me,Ot,Re,At,Ie,St;Object.defineProperty(w,"__esModule",{value:!0}),w.StatTimer=w.RenderingCancelledException=w.PixelsPerInch=w.PageViewport=w.PDFDateString=w.DOMStandardFontDataFactory=w.DOMSVGFactory=w.DOMFilterFactory=w.DOMCanvasFactory=w.DOMCMapReaderFactory=void 0,w.deprecated=x,w.getColorValues=_,w.getCurrentTransform=Q,w.getCurrentTransformInverse=W,w.getFilenameFromUrl=m,w.getPdfFilenameFromUrl=v,w.getRGB=I,w.getXfaPageViewport=D,w.isDataScheme=r,w.isPdfFile=o,w.isValidFetchUrl=b,w.loadScript=s,w.noContextMenu=c,w.setLayerDimensions=j,t(2),t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123),t(89),t(84),t(86),t(87);var p=t(169),y=t(1);const k="http://www.w3.org/2000/svg",he=class he{};tt(he,"CSS",96),tt(he,"PDF",72),tt(he,"PDF_TO_CSS_UNITS",he.CSS/he.PDF);let u=he;w.PixelsPerInch=u;class g extends p.BaseFilterFactory{constructor(){let{docId:ce,ownerDocument:ge=globalThis.document}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super();$(this,O);$(this,F);$(this,se);$(this,pe);$(this,me);$(this,Re);$(this,Ie);$(this,Y,void 0);$(this,z,void 0);$(this,ee,void 0);$(this,oe,void 0);$(this,ye,void 0);$(this,Pe,void 0);$(this,L,void 0);$(this,P,void 0);$(this,M,void 0);$(this,E,void 0);$(this,R,0);le(this,ee,ce),le(this,oe,ge)}addFilter(ce){if(!ce)return"none";let ge=l(this,O,ft).get(ce);if(ge)return ge;let Ce,Me,Ve,ze;if(ce.length===1){const Xe=ce[0],je=new Array(256);for(let Je=0;Je<256;Je++)je[Je]=Xe[Je]/255;ze=Ce=Me=Ve=je.join(",")}else{const[Xe,je,Je]=ce,V=new Array(256),H=new Array(256),X=new Array(256);for(let de=0;de<256;de++)V[de]=Xe[de]/255,H[de]=je[de]/255,X[de]=Je[de]/255;Ce=V.join(","),Me=H.join(","),Ve=X.join(","),ze=`${Ce}${Me}${Ve}`}if(ge=l(this,O,ft).get(ze),ge)return l(this,O,ft).set(ce,ge),ge;const _e=`g_${l(this,ee)}_transfer_map_${ut(this,R)._++}`,He=`url(#${_e})`;l(this,O,ft).set(ce,He),l(this,O,ft).set(ze,He);const Ke=J(this,pe,Lt).call(this,_e);return J(this,Re,At).call(this,Ce,Me,Ve,Ke),He}addHCMFilter(ce,ge){var je;const Ce=`${ce}-${ge}`;if(l(this,Pe)===Ce)return l(this,L);if(le(this,Pe,Ce),le(this,L,"none"),(je=l(this,ye))==null||je.remove(),!ce||!ge)return l(this,L);const Me=J(this,Ie,St).call(this,ce);ce=y.Util.makeHexColor(...Me);const Ve=J(this,Ie,St).call(this,ge);if(ge=y.Util.makeHexColor(...Ve),l(this,F,pt).style.color="",ce==="#000000"&&ge==="#ffffff"||ce===ge)return l(this,L);const ze=new Array(256);for(let Je=0;Je<=255;Je++){const V=Je/255;ze[Je]=V<=.03928?V/12.92:((V+.055)/1.055)**2.4}const _e=ze.join(","),He=`g_${l(this,ee)}_hcm_filter`,Ke=le(this,P,J(this,pe,Lt).call(this,He));J(this,Re,At).call(this,_e,_e,_e,Ke),J(this,se,hn).call(this,Ke);const Xe=(Je,V)=>{const H=Me[Je]/255,X=Ve[Je]/255,de=new Array(V+1);for(let Ee=0;Ee<=V;Ee++)de[Ee]=H+Ee/V*(X-H);return de.join(",")};return J(this,Re,At).call(this,Xe(0,5),Xe(1,5),Xe(2,5),Ke),le(this,L,`url(#${He})`),l(this,L)}addHighlightHCMFilter(ce,ge,Ce,Me){var X;const Ve=`${ce}-${ge}-${Ce}-${Me}`;if(l(this,M)===Ve)return l(this,E);if(le(this,M,Ve),le(this,E,"none"),(X=l(this,P))==null||X.remove(),!ce||!ge)return l(this,E);const[ze,_e]=[ce,ge].map(J(this,Ie,St).bind(this));let He=Math.round(.2126*ze[0]+.7152*ze[1]+.0722*ze[2]),Ke=Math.round(.2126*_e[0]+.7152*_e[1]+.0722*_e[2]),[Xe,je]=[Ce,Me].map(J(this,Ie,St).bind(this));Ke{const U=new Array(256),ie=(Ke-He)/K,Ae=de/255,Se=(Ee-de)/(255*K);let we=0;for(let Te=0;Te<=K;Te++){const Ne=Math.round(He+Te*ie),ke=Ae+Te*Se;for(let Ue=we;Ue<=Ne;Ue++)U[Ue]=ke;we=Ne+1}for(let Te=we;Te<256;Te++)U[Te]=U[we-1];return U.join(",")},V=`g_${l(this,ee)}_hcm_highlight_filter`,H=le(this,P,J(this,pe,Lt).call(this,V));return J(this,se,hn).call(this,H),J(this,Re,At).call(this,Je(Xe[0],je[0],5),Je(Xe[1],je[1],5),Je(Xe[2],je[2],5),H),le(this,E,`url(#${V})`),l(this,E)}destroy(){arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&(l(this,L)||l(this,E))||(l(this,z)&&(l(this,z).parentNode.parentNode.remove(),le(this,z,null)),l(this,Y)&&(l(this,Y).clear(),le(this,Y,null)),le(this,R,0))}}Y=new WeakMap,z=new WeakMap,ee=new WeakMap,oe=new WeakMap,ye=new WeakMap,Pe=new WeakMap,L=new WeakMap,P=new WeakMap,M=new WeakMap,E=new WeakMap,R=new WeakMap,O=new WeakSet,ft=function(){return l(this,Y)||le(this,Y,new Map)},F=new WeakSet,pt=function(){if(!l(this,z)){const ce=l(this,oe).createElement("div"),{style:ge}=ce;ge.visibility="hidden",ge.contain="strict",ge.width=ge.height=0,ge.position="absolute",ge.top=ge.left=0,ge.zIndex=-1;const Ce=l(this,oe).createElementNS(k,"svg");Ce.setAttribute("width",0),Ce.setAttribute("height",0),le(this,z,l(this,oe).createElementNS(k,"defs")),ce.append(Ce),Ce.append(l(this,z)),l(this,oe).body.append(ce)}return l(this,z)},se=new WeakSet,hn=function(ce){const ge=l(this,oe).createElementNS(k,"feColorMatrix");ge.setAttribute("type","matrix"),ge.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),ce.append(ge)},pe=new WeakSet,Lt=function(ce){const ge=l(this,oe).createElementNS(k,"filter");return ge.setAttribute("color-interpolation-filters","sRGB"),ge.setAttribute("id",ce),l(this,F,pt).append(ge),ge},me=new WeakSet,Ot=function(ce,ge,Ce){const Me=l(this,oe).createElementNS(k,ge);Me.setAttribute("type","discrete"),Me.setAttribute("tableValues",Ce),ce.append(Me)},Re=new WeakSet,At=function(ce,ge,Ce,Me){const Ve=l(this,oe).createElementNS(k,"feComponentTransfer");Me.append(Ve),J(this,me,Ot).call(this,Ve,"feFuncR",ce),J(this,me,Ot).call(this,Ve,"feFuncG",ge),J(this,me,Ot).call(this,Ve,"feFuncB",Ce)},Ie=new WeakSet,St=function(ce){return l(this,F,pt).style.color=ce,I(getComputedStyle(l(this,F,pt)).getPropertyValue("color"))},w.DOMFilterFactory=g;class e extends p.BaseCanvasFactory{constructor(){let{ownerDocument:ne=globalThis.document}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),this._document=ne}_createCanvas(ne,ce){const ge=this._document.createElement("canvas");return ge.width=ne,ge.height=ce,ge}}w.DOMCanvasFactory=e;async function i(ue){let ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(b(ue,document.baseURI)){const ce=await fetch(ue);if(!ce.ok)throw new Error(ce.statusText);return ne?new Uint8Array(await ce.arrayBuffer()):(0,y.stringToBytes)(await ce.text())}return new Promise((ce,ge)=>{const Ce=new XMLHttpRequest;Ce.open("GET",ue,!0),ne&&(Ce.responseType="arraybuffer"),Ce.onreadystatechange=()=>{if(Ce.readyState===XMLHttpRequest.DONE){if(Ce.status===200||Ce.status===0){let Me;if(ne&&Ce.response?Me=new Uint8Array(Ce.response):!ne&&Ce.responseText&&(Me=(0,y.stringToBytes)(Ce.responseText)),Me){ce(Me);return}}ge(new Error(Ce.statusText))}},Ce.send(null)})}class n extends p.BaseCMapReaderFactory{_fetchData(ne,ce){return i(ne,this.isCompressed).then(ge=>({cMapData:ge,compressionType:ce}))}}w.DOMCMapReaderFactory=n;class d extends p.BaseStandardFontDataFactory{_fetchData(ne){return i(ne,!0)}}w.DOMStandardFontDataFactory=d;class h extends p.BaseSVGFactory{_createSVG(ne){return document.createElementNS(k,ne)}}w.DOMSVGFactory=h;class f{constructor(ne){let{viewBox:ce,scale:ge,rotation:Ce,offsetX:Me=0,offsetY:Ve=0,dontFlip:ze=!1}=ne;this.viewBox=ce,this.scale=ge,this.rotation=Ce,this.offsetX=Me,this.offsetY=Ve;const _e=(ce[2]+ce[0])/2,He=(ce[3]+ce[1])/2;let Ke,Xe,je,Je;switch(Ce%=360,Ce<0&&(Ce+=360),Ce){case 180:Ke=-1,Xe=0,je=0,Je=1;break;case 90:Ke=0,Xe=1,je=1,Je=0;break;case 270:Ke=0,Xe=-1,je=-1,Je=0;break;case 0:Ke=1,Xe=0,je=0,Je=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}ze&&(je=-je,Je=-Je);let V,H,X,de;Ke===0?(V=Math.abs(He-ce[1])*ge+Me,H=Math.abs(_e-ce[0])*ge+Ve,X=(ce[3]-ce[1])*ge,de=(ce[2]-ce[0])*ge):(V=Math.abs(_e-ce[0])*ge+Me,H=Math.abs(He-ce[1])*ge+Ve,X=(ce[2]-ce[0])*ge,de=(ce[3]-ce[1])*ge),this.transform=[Ke*ge,Xe*ge,je*ge,Je*ge,V-Ke*ge*_e-je*ge*He,H-Xe*ge*_e-Je*ge*He],this.width=X,this.height=de}get rawDims(){const{viewBox:ne}=this;return(0,y.shadow)(this,"rawDims",{pageWidth:ne[2]-ne[0],pageHeight:ne[3]-ne[1],pageX:ne[0],pageY:ne[1]})}clone(){let{scale:ne=this.scale,rotation:ce=this.rotation,offsetX:ge=this.offsetX,offsetY:Ce=this.offsetY,dontFlip:Me=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new f({viewBox:this.viewBox.slice(),scale:ne,rotation:ce,offsetX:ge,offsetY:Ce,dontFlip:Me})}convertToViewportPoint(ne,ce){return y.Util.applyTransform([ne,ce],this.transform)}convertToViewportRectangle(ne){const ce=y.Util.applyTransform([ne[0],ne[1]],this.transform),ge=y.Util.applyTransform([ne[2],ne[3]],this.transform);return[ce[0],ce[1],ge[0],ge[1]]}convertToPdfPoint(ne,ce){return y.Util.applyInverseTransform([ne,ce],this.transform)}}w.PageViewport=f;class a extends y.BaseException{constructor(ne){let ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;super(ne,"RenderingCancelledException"),this.extraDelay=ce}}w.RenderingCancelledException=a;function r(ue){const ne=ue.length;let ce=0;for(;ce1&&arguments[1]!==void 0?arguments[1]:!1)||([ue]=ue.split(/[#?]/,1)),ue.substring(ue.lastIndexOf("/")+1)}function v(ue){let ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"document.pdf";if(typeof ue!="string")return ne;if(r(ue))return(0,y.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),ne;const ce=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,ge=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,Ce=ce.exec(ue);let Me=ge.exec(Ce[1])||ge.exec(Ce[2])||ge.exec(Ce[3]);if(Me&&(Me=Me[0],Me.includes("%")))try{Me=ge.exec(decodeURIComponent(Me))[0]}catch{}return Me||ne}class A{constructor(){tt(this,"started",Object.create(null));tt(this,"times",[])}time(ne){ne in this.started&&(0,y.warn)(`Timer is already running for ${ne}`),this.started[ne]=Date.now()}timeEnd(ne){ne in this.started||(0,y.warn)(`Timer has not been started for ${ne}`),this.times.push({name:ne,start:this.started[ne],end:Date.now()}),delete this.started[ne]}toString(){const ne=[];let ce=0;for(const{name:ge}of this.times)ce=Math.max(ge.length,ce);for(const{name:ge,start:Ce,end:Me}of this.times)ne.push(`${ge.padEnd(ce)} ${Me-Ce}ms +`);return ne.join("")}}w.StatTimer=A;function b(ue,ne){try{const{protocol:ce}=ne?new URL(ue,ne):new URL(ue);return ce==="http:"||ce==="https:"}catch{return!1}}function c(ue){ue.preventDefault()}function s(ue){let ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return new Promise((ce,ge)=>{const Ce=document.createElement("script");Ce.src=ue,Ce.onload=function(Me){ne&&Ce.remove(),ce(Me)},Ce.onerror=function(){ge(new Error(`Cannot load script at: ${Ce.src}`))},(document.head||document.documentElement).append(Ce)})}function x(ue){console.log("Deprecated API usage: "+ue)}let T;class S{static toDateObject(ne){if(!ne||typeof ne!="string")return null;T||(T=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const ce=T.exec(ne);if(!ce)return null;const ge=parseInt(ce[1],10);let Ce=parseInt(ce[2],10);Ce=Ce>=1&&Ce<=12?Ce-1:0;let Me=parseInt(ce[3],10);Me=Me>=1&&Me<=31?Me:1;let Ve=parseInt(ce[4],10);Ve=Ve>=0&&Ve<=23?Ve:0;let ze=parseInt(ce[5],10);ze=ze>=0&&ze<=59?ze:0;let _e=parseInt(ce[6],10);_e=_e>=0&&_e<=59?_e:0;const He=ce[7]||"Z";let Ke=parseInt(ce[8],10);Ke=Ke>=0&&Ke<=23?Ke:0;let Xe=parseInt(ce[9],10)||0;return Xe=Xe>=0&&Xe<=59?Xe:0,He==="-"?(Ve+=Ke,ze+=Xe):He==="+"&&(Ve-=Ke,ze-=Xe),new Date(Date.UTC(ge,Ce,Me,Ve,ze,_e))}}w.PDFDateString=S;function D(ue,ne){let{scale:ce=1,rotation:ge=0}=ne;const{width:Ce,height:Me}=ue.attributes.style,Ve=[0,0,parseInt(Ce),parseInt(Me)];return new f({viewBox:Ve,scale:ce,rotation:ge})}function I(ue){if(ue.startsWith("#")){const ne=parseInt(ue.slice(1),16);return[(ne&16711680)>>16,(ne&65280)>>8,ne&255]}return ue.startsWith("rgb(")?ue.slice(4,-1).split(",").map(ne=>parseInt(ne)):ue.startsWith("rgba(")?ue.slice(5,-1).split(",").map(ne=>parseInt(ne)).slice(0,3):((0,y.warn)(`Not a valid color format: "${ue}"`),[0,0,0])}function _(ue){const ne=document.createElement("span");ne.style.visibility="hidden",document.body.append(ne);for(const ce of ue.keys()){ne.style.color=ce;const ge=window.getComputedStyle(ne).color;ue.set(ce,I(ge))}ne.remove()}function Q(ue){const{a:ne,b:ce,c:ge,d:Ce,e:Me,f:Ve}=ue.getTransform();return[ne,ce,ge,Ce,Me,Ve]}function W(ue){const{a:ne,b:ce,c:ge,d:Ce,e:Me,f:Ve}=ue.getTransform().invertSelf();return[ne,ce,ge,Ce,Me,Ve]}function j(ue,ne){let ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ge=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;if(ne instanceof f){const{pageWidth:Ce,pageHeight:Me}=ne.rawDims,{style:Ve}=ue,ze=y.FeatureTest.isCSSRoundSupported,_e=`var(--scale-factor) * ${Ce}px`,He=`var(--scale-factor) * ${Me}px`,Ke=ze?`round(${_e}, 1px)`:`calc(${_e})`,Xe=ze?`round(${He}, 1px)`:`calc(${He})`;!ce||ne.rotation%180===0?(Ve.width=Ke,Ve.height=Xe):(Ve.width=Xe,Ve.height=Ke)}ge&&ue.setAttribute("data-main-rotation",ne.rotation)}},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.BaseStandardFontDataFactory=w.BaseSVGFactory=w.BaseFilterFactory=w.BaseCanvasFactory=w.BaseCMapReaderFactory=void 0,t(2);var p=t(1);class y{constructor(){this.constructor===y&&(0,p.unreachable)("Cannot initialize BaseFilterFactory.")}addFilter(n){return"none"}addHCMFilter(n,d){return"none"}addHighlightHCMFilter(n,d,h,f){return"none"}destroy(){}}w.BaseFilterFactory=y;class k{constructor(){this.constructor===k&&(0,p.unreachable)("Cannot initialize BaseCanvasFactory.")}create(n,d){if(n<=0||d<=0)throw new Error("Invalid canvas size");const h=this._createCanvas(n,d);return{canvas:h,context:h.getContext("2d")}}reset(n,d,h){if(!n.canvas)throw new Error("Canvas is not specified");if(d<=0||h<=0)throw new Error("Invalid canvas size");n.canvas.width=d,n.canvas.height=h}destroy(n){if(!n.canvas)throw new Error("Canvas is not specified");n.canvas.width=0,n.canvas.height=0,n.canvas=null,n.context=null}_createCanvas(n,d){(0,p.unreachable)("Abstract method `_createCanvas` called.")}}w.BaseCanvasFactory=k;class u{constructor(n){let{baseUrl:d=null,isCompressed:h=!0}=n;this.constructor===u&&(0,p.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=d,this.isCompressed=h}async fetch(n){let{name:d}=n;if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!d)throw new Error("CMap name must be specified.");const h=this.baseUrl+d+(this.isCompressed?".bcmap":""),f=this.isCompressed?p.CMapCompressionType.BINARY:p.CMapCompressionType.NONE;return this._fetchData(h,f).catch(a=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${h}`)})}_fetchData(n,d){(0,p.unreachable)("Abstract method `_fetchData` called.")}}w.BaseCMapReaderFactory=u;class g{constructor(n){let{baseUrl:d=null}=n;this.constructor===g&&(0,p.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=d}async fetch(n){let{filename:d}=n;if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!d)throw new Error("Font filename must be specified.");const h=`${this.baseUrl}${d}`;return this._fetchData(h).catch(f=>{throw new Error(`Unable to load font data at: ${h}`)})}_fetchData(n){(0,p.unreachable)("Abstract method `_fetchData` called.")}}w.BaseStandardFontDataFactory=g;class e{constructor(){this.constructor===e&&(0,p.unreachable)("Cannot initialize BaseSVGFactory.")}create(n,d){let h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(n<=0||d<=0)throw new Error("Invalid SVG dimensions");const f=this._createSVG("svg:svg");return f.setAttribute("version","1.1"),h||(f.setAttribute("width",`${n}px`),f.setAttribute("height",`${d}px`)),f.setAttribute("preserveAspectRatio","none"),f.setAttribute("viewBox",`0 0 ${n} ${d}`),f}createElement(n){if(typeof n!="string")throw new Error("Invalid SVG element type");return this._createSVG(n)}_createSVG(n){(0,p.unreachable)("Abstract method `_createSVG` called.")}}w.BaseSVGFactory=e},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.MurmurHash3_64=void 0,t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123),t(2);var p=t(1);const y=3285377520,k=4294901760,u=65535;class g{constructor(i){this.h1=i?i&4294967295:y,this.h2=i?i&4294967295:y}update(i){let n,d;if(typeof i=="string"){n=new Uint8Array(i.length*2),d=0;for(let x=0,T=i.length;x>>8,n[d++]=S&255)}}else if((0,p.isArrayBuffer)(i))n=i.slice(),d=n.byteLength;else throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");const h=d>>2,f=d-h*4,a=new Uint32Array(n.buffer,0,h);let r=0,o=0,m=this.h1,v=this.h2;const A=3432918353,b=461845907,c=A&u,s=b&u;for(let x=0;x>>17,r=r*b&k|r*s&u,m^=r,m=m<<13|m>>>19,m=m*5+3864292196):(o=a[x],o=o*A&k|o*c&u,o=o<<15|o>>>17,o=o*b&k|o*s&u,v^=o,v=v<<13|v>>>19,v=v*5+3864292196);switch(r=0,f){case 3:r^=n[h*4+2]<<16;case 2:r^=n[h*4+1]<<8;case 1:r^=n[h*4],r=r*A&k|r*c&u,r=r<<15|r>>>17,r=r*b&k|r*s&u,h&1?m^=r:v^=r}this.h1=m,this.h2=v}hexdigest(){let i=this.h1,n=this.h2;return i^=n>>>1,i=i*3981806797&k|i*36045&u,n=n*4283543511&k|((n<<16|i>>>16)*2950163797&k)>>>16,i^=n>>>1,i=i*444984403&k|i*60499&u,n=n*3301882366&k|((n<<16|i>>>16)*3120437893&k)>>>16,i^=n>>>1,(i>>>0).toString(16).padStart(8,"0")+(n>>>0).toString(16).padStart(8,"0")}}w.MurmurHash3_64=g},(N,w,t)=>{var u;Object.defineProperty(w,"__esModule",{value:!0}),w.FontLoader=w.FontFaceObject=void 0,t(125),t(136),t(138),t(141),t(143),t(145),t(147),t(89),t(149);var p=t(1);class y{constructor(e){$(this,u,new Set);let{ownerDocument:i=globalThis.document,styleElement:n=null}=e;this._document=i,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.add(e),this._document.fonts.add(e)}removeNativeFontFace(e){this.nativeFontFaces.delete(e),this._document.fonts.delete(e)}insertRule(e){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const i=this.styleElement.sheet;i.insertRule(e,i.cssRules.length)}clear(){for(const e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.clear(),l(this,u).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont(e){if(!(!e||l(this,u).has(e.loadedName))){if((0,p.assert)(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:i,src:n,style:d}=e,h=new FontFace(i,n,d);this.addNativeFontFace(h);try{await h.load(),l(this,u).add(i)}catch{(0,p.warn)(`Cannot load system font: ${e.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(h)}return}(0,p.unreachable)("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(e){if(e.attached||e.missingFile&&!e.systemFontInfo)return;if(e.attached=!0,e.systemFontInfo){await this.loadSystemFont(e.systemFontInfo);return}if(this.isFontLoadingAPISupported){const n=e.createNativeFontFace();if(n){this.addNativeFontFace(n);try{await n.loaded}catch(d){throw(0,p.warn)(`Failed to load font '${n.family}': '${d}'.`),e.disableFontFace=!0,d}}return}const i=e.createFontFaceRule();if(i){if(this.insertRule(i),this.isSyncFontLoadingSupported)return;await new Promise(n=>{const d=this._queueLoadingCallback(n);this._prepareFontLoadEvent(e,d)})}}get isFontLoadingAPISupported(){var i;const e=!!((i=this._document)!=null&&i.fonts);return(0,p.shadow)(this,"isFontLoadingAPISupported",e)}get isSyncFontLoadingSupported(){let e=!1;return(p.isNodeJS||typeof navigator<"u"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),(0,p.shadow)(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){function i(){for((0,p.assert)(!d.done,"completeRequest() cannot be called twice."),d.done=!0;n.length>0&&n[0].done;){const h=n.shift();setTimeout(h.callback,0)}}const{loadingRequests:n}=this,d={done:!1,complete:i,callback:e};return n.push(d),d}get _loadTestFont(){const e=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return(0,p.shadow)(this,"_loadTestFont",e)}_prepareFontLoadEvent(e,i){function n(I,_){return I.charCodeAt(_)<<24|I.charCodeAt(_+1)<<16|I.charCodeAt(_+2)<<8|I.charCodeAt(_+3)&255}function d(I,_,Q,W){const j=I.substring(0,_),he=I.substring(_+Q);return j+W+he}let h,f;const a=this._document.createElement("canvas");a.width=1,a.height=1;const r=a.getContext("2d");let o=0;function m(I,_){if(++o>30){(0,p.warn)("Load test font never loaded."),_();return}if(r.font="30px "+I,r.fillText(".",0,20),r.getImageData(0,0,1,1).data[3]>0){_();return}setTimeout(m.bind(null,I,_))}const v=`lt${Date.now()}${this.loadTestFontId++}`;let A=this._loadTestFont;A=d(A,976,v.length,v);const c=16,s=1482184792;let x=n(A,c);for(h=0,f=v.length-3;h{D.remove(),i.complete()})}}u=new WeakMap,w.FontLoader=y;class k{constructor(e,i){let{isEvalSupported:n=!0,disableFontFace:d=!1,ignoreErrors:h=!1,inspectFont:f=null}=i;this.compiledGlyphs=Object.create(null);for(const a in e)this[a]=e[a];this.isEvalSupported=n!==!1,this.disableFontFace=d===!0,this.ignoreErrors=h===!0,this._inspectFont=f}createNativeFontFace(){var i;if(!this.data||this.disableFontFace)return null;let e;if(!this.cssFontInfo)e=new FontFace(this.loadedName,this.data,{});else{const n={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(n.style=`oblique ${this.cssFontInfo.italicAngle}deg`),e=new FontFace(this.cssFontInfo.fontFamily,this.data,n)}return(i=this._inspectFont)==null||i.call(this,this),e}createFontFaceRule(){var d;if(!this.data||this.disableFontFace)return null;const e=(0,p.bytesToString)(this.data),i=`url(data:${this.mimetype};base64,${btoa(e)});`;let n;if(!this.cssFontInfo)n=`@font-face {font-family:"${this.loadedName}";src:${i}}`;else{let h=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(h+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),n=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${h}src:${i}}`}return(d=this._inspectFont)==null||d.call(this,this,i),n}getPathGenerator(e,i){if(this.compiledGlyphs[i]!==void 0)return this.compiledGlyphs[i];let n;try{n=e.get(this.loadedName+"_path_"+i)}catch(d){if(!this.ignoreErrors)throw d;return(0,p.warn)(`getPathGenerator - ignoring character: "${d}".`),this.compiledGlyphs[i]=function(h,f){}}if(this.isEvalSupported&&p.FeatureTest.isEvalSupported){const d=[];for(const h of n){const f=h.args!==void 0?h.args.join(","):"";d.push("c.",h.cmd,"(",f,`); +`)}return this.compiledGlyphs[i]=new Function("c","size",d.join(""))}return this.compiledGlyphs[i]=function(d,h){for(const f of n)f.cmd==="scale"&&(f.args=[h,-h]),d[f.cmd].apply(d,f.args)}}}w.FontFaceObject=k},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.NodeStandardFontDataFactory=w.NodeFilterFactory=w.NodeCanvasFactory=w.NodeCMapReaderFactory=void 0,t(2),t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123);var p=t(169),y=t(1);(function(){if(!(globalThis.DOMMatrix||!y.isNodeJS))try{globalThis.DOMMatrix=require$$6.DOMMatrix}catch(d){(0,y.warn)(`Cannot polyfill \`DOMMatrix\`, rendering may be broken: "${d}".`)}})(),function(){if(!(globalThis.Path2D||!y.isNodeJS))try{const{CanvasRenderingContext2D:d}=require$$6,{polyfillPath2D:h}=requirePath2dPolyfill_esm();globalThis.CanvasRenderingContext2D=d,h(globalThis)}catch(d){(0,y.warn)(`Cannot polyfill \`Path2D\`, rendering may be broken: "${d}".`)}}();const k=function(n){return new Promise((d,h)=>{require$$6.readFile(n,(a,r)=>{if(a||!r){h(new Error(a));return}d(new Uint8Array(r))})})};class u extends p.BaseFilterFactory{}w.NodeFilterFactory=u;class g extends p.BaseCanvasFactory{_createCanvas(d,h){return require$$6.createCanvas(d,h)}}w.NodeCanvasFactory=g;class e extends p.BaseCMapReaderFactory{_fetchData(d,h){return k(d).then(f=>({cMapData:f,compressionType:h}))}}w.NodeCMapReaderFactory=e;class i extends p.BaseStandardFontDataFactory{_fetchData(d){return k(d)}}w.NodeStandardFontDataFactory=i},(N,w,t)=>{var z,un,oe,dn;Object.defineProperty(w,"__esModule",{value:!0}),w.CanvasGraphics=void 0,t(2),t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123),t(89);var p=t(1),y=t(168),k=t(174),u=t(175);const g=16,e=100,i=4096,n=15,d=10,h=1e3,f=16;function a(L,P){if(L._removeMirroring)throw new Error("Context is already forwarding operations.");L.__originalSave=L.save,L.__originalRestore=L.restore,L.__originalRotate=L.rotate,L.__originalScale=L.scale,L.__originalTranslate=L.translate,L.__originalTransform=L.transform,L.__originalSetTransform=L.setTransform,L.__originalResetTransform=L.resetTransform,L.__originalClip=L.clip,L.__originalMoveTo=L.moveTo,L.__originalLineTo=L.lineTo,L.__originalBezierCurveTo=L.bezierCurveTo,L.__originalRect=L.rect,L.__originalClosePath=L.closePath,L.__originalBeginPath=L.beginPath,L._removeMirroring=()=>{L.save=L.__originalSave,L.restore=L.__originalRestore,L.rotate=L.__originalRotate,L.scale=L.__originalScale,L.translate=L.__originalTranslate,L.transform=L.__originalTransform,L.setTransform=L.__originalSetTransform,L.resetTransform=L.__originalResetTransform,L.clip=L.__originalClip,L.moveTo=L.__originalMoveTo,L.lineTo=L.__originalLineTo,L.bezierCurveTo=L.__originalBezierCurveTo,L.rect=L.__originalRect,L.closePath=L.__originalClosePath,L.beginPath=L.__originalBeginPath,delete L._removeMirroring},L.save=function(){P.save(),this.__originalSave()},L.restore=function(){P.restore(),this.__originalRestore()},L.translate=function(E,R){P.translate(E,R),this.__originalTranslate(E,R)},L.scale=function(E,R){P.scale(E,R),this.__originalScale(E,R)},L.transform=function(E,R,O,B,F,Z){P.transform(E,R,O,B,F,Z),this.__originalTransform(E,R,O,B,F,Z)},L.setTransform=function(E,R,O,B,F,Z){P.setTransform(E,R,O,B,F,Z),this.__originalSetTransform(E,R,O,B,F,Z)},L.resetTransform=function(){P.resetTransform(),this.__originalResetTransform()},L.rotate=function(E){P.rotate(E),this.__originalRotate(E)},L.clip=function(E){P.clip(E),this.__originalClip(E)},L.moveTo=function(M,E){P.moveTo(M,E),this.__originalMoveTo(M,E)},L.lineTo=function(M,E){P.lineTo(M,E),this.__originalLineTo(M,E)},L.bezierCurveTo=function(M,E,R,O,B,F){P.bezierCurveTo(M,E,R,O,B,F),this.__originalBezierCurveTo(M,E,R,O,B,F)},L.rect=function(M,E,R,O){P.rect(M,E,R,O),this.__originalRect(M,E,R,O)},L.closePath=function(){P.closePath(),this.__originalClosePath()},L.beginPath=function(){P.beginPath(),this.__originalBeginPath()}}class r{constructor(P){this.canvasFactory=P,this.cache=Object.create(null)}getCanvas(P,M,E){let R;return this.cache[P]!==void 0?(R=this.cache[P],this.canvasFactory.reset(R,M,E)):(R=this.canvasFactory.create(M,E),this.cache[P]=R),R}delete(P){delete this.cache[P]}clear(){for(const P in this.cache){const M=this.cache[P];this.canvasFactory.destroy(M),delete this.cache[P]}}}function o(L,P,M,E,R,O,B,F,Z,se){const[q,pe,te,me,ve,Re]=(0,y.getCurrentTransform)(L);if(pe===0&&te===0){const Le=B*q+ve,ue=Math.round(Le),ne=F*me+Re,ce=Math.round(ne),ge=(B+Z)*q+ve,Ce=Math.abs(Math.round(ge)-ue)||1,Me=(F+se)*me+Re,Ve=Math.abs(Math.round(Me)-ce)||1;return L.setTransform(Math.sign(q),0,0,Math.sign(me),ue,ce),L.drawImage(P,M,E,R,O,0,0,Ce,Ve),L.setTransform(q,pe,te,me,ve,Re),[Ce,Ve]}if(q===0&&me===0){const Le=F*te+ve,ue=Math.round(Le),ne=B*pe+Re,ce=Math.round(ne),ge=(F+se)*te+ve,Ce=Math.abs(Math.round(ge)-ue)||1,Me=(B+Z)*pe+Re,Ve=Math.abs(Math.round(Me)-ce)||1;return L.setTransform(0,Math.sign(pe),Math.sign(te),0,ue,ce),L.drawImage(P,M,E,R,O,0,0,Ve,Ce),L.setTransform(q,pe,te,me,ve,Re),[Ve,Ce]}L.drawImage(P,M,E,R,O,B,F,Z,se);const Oe=Math.hypot(q,pe),Ie=Math.hypot(te,me);return[Oe*Z,Ie*se]}function m(L){const{width:P,height:M}=L;if(P>h||M>h)return null;const E=1e3,R=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),O=P+1;let B=new Uint8Array(O*(M+1)),F,Z,se;const q=P+7&-8;let pe=new Uint8Array(q*M),te=0;for(const Ie of L.data){let Le=128;for(;Le>0;)pe[te++]=Ie&Le?0:255,Le>>=1}let me=0;for(te=0,pe[te]!==0&&(B[0]=1,++me),Z=1;Z>2)+(pe[te+1]?4:0)+(pe[te-q+1]?8:0),R[Ie]&&(B[se+Z]=R[Ie],++me),te++;if(pe[te-q]!==pe[te]&&(B[se+Z]=pe[te]?2:4,++me),me>E)return null}for(te=q*(M-1),se=F*O,pe[te]!==0&&(B[se]=8,++me),Z=1;ZE)return null;const ve=new Int32Array([0,O,-1,0,-O,0,0,0,1]),Re=new Path2D;for(F=0;me&&F<=M;F++){let Ie=F*O;const Le=Ie+P;for(;Ie>4,B[Ie]&=ne>>2|ne<<2),Re.lineTo(Ie%O,Ie/O|0),B[Ie]||--me}while(ue!==Ie);--F}return pe=null,B=null,function(Ie){Ie.save(),Ie.scale(1/P,-1/M),Ie.translate(0,-M),Ie.fill(Re),Ie.beginPath(),Ie.restore()}}class v{constructor(P,M){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=p.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=p.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=p.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,P,M])}clone(){const P=Object.create(this);return P.clipBox=this.clipBox.slice(),P}setCurrentPoint(P,M){this.x=P,this.y=M}updatePathMinMax(P,M,E){[M,E]=p.Util.applyTransform([M,E],P),this.minX=Math.min(this.minX,M),this.minY=Math.min(this.minY,E),this.maxX=Math.max(this.maxX,M),this.maxY=Math.max(this.maxY,E)}updateRectMinMax(P,M){const E=p.Util.applyTransform(M,P),R=p.Util.applyTransform(M.slice(2),P);this.minX=Math.min(this.minX,E[0],R[0]),this.minY=Math.min(this.minY,E[1],R[1]),this.maxX=Math.max(this.maxX,E[0],R[0]),this.maxY=Math.max(this.maxY,E[1],R[1])}updateScalingPathMinMax(P,M){p.Util.scaleMinMax(P,M),this.minX=Math.min(this.minX,M[0]),this.maxX=Math.max(this.maxX,M[1]),this.minY=Math.min(this.minY,M[2]),this.maxY=Math.max(this.maxY,M[3])}updateCurvePathMinMax(P,M,E,R,O,B,F,Z,se,q){const pe=p.Util.bezierBoundingBox(M,E,R,O,B,F,Z,se);if(q){q[0]=Math.min(q[0],pe[0],pe[2]),q[1]=Math.max(q[1],pe[0],pe[2]),q[2]=Math.min(q[2],pe[1],pe[3]),q[3]=Math.max(q[3],pe[1],pe[3]);return}this.updateRectMinMax(P,pe)}getPathBoundingBox(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:k.PathType.FILL,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const E=[this.minX,this.minY,this.maxX,this.maxY];if(P===k.PathType.STROKE){M||(0,p.unreachable)("Stroke bounding box must include transform.");const R=p.Util.singularValueDecompose2dScale(M),O=R[0]*this.lineWidth/2,B=R[1]*this.lineWidth/2;E[0]-=O,E[1]-=B,E[2]+=O,E[3]+=B}return E}updateClipFromPath(){const P=p.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(P||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(P){this.clipBox=P,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:k.PathType.FILL,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return p.Util.intersect(this.clipBox,this.getPathBoundingBox(P,M))}}function A(L,P){if(typeof ImageData<"u"&&P instanceof ImageData){L.putImageData(P,0,0);return}const M=P.height,E=P.width,R=M%f,O=(M-R)/f,B=R===0?O:O+1,F=L.createImageData(E,f);let Z=0,se;const q=P.data,pe=F.data;let te,me,ve,Re;if(P.kind===p.ImageKind.GRAYSCALE_1BPP){const Oe=q.byteLength,Ie=new Uint32Array(pe.buffer,0,pe.byteLength>>2),Le=Ie.length,ue=E+7>>3,ne=4294967295,ce=p.FeatureTest.isLittleEndian?4278190080:255;for(te=0;teue?E:ge*8-7,Ve=Me&-8;let ze=0,_e=0;for(;Ce>=1}for(;se=O&&(ve=R,Re=E*ve),se=0,me=Re;me--;)pe[se++]=q[Z++],pe[se++]=q[Z++],pe[se++]=q[Z++],pe[se++]=255;L.putImageData(F,0,te*f)}else throw new Error(`bad image kind: ${P.kind}`)}function b(L,P){if(P.bitmap){L.drawImage(P.bitmap,0,0);return}const M=P.height,E=P.width,R=M%f,O=(M-R)/f,B=R===0?O:O+1,F=L.createImageData(E,f);let Z=0;const se=P.data,q=F.data;for(let pe=0;pe>8,L[O-2]=L[O-2]*B+M*F>>8,L[O-1]=L[O-1]*B+E*F>>8}}}function T(L,P,M){const E=L.length,R=1/255;for(let O=3;O>8]>>8:P[R]*O>>16}}function D(L,P,M,E,R,O,B,F,Z,se,q){const pe=!!O,te=pe?O[0]:0,me=pe?O[1]:0,ve=pe?O[2]:0,Re=R==="Luminosity"?S:T,Ie=Math.min(E,Math.ceil(1048576/M));for(let Le=0;Le1&&arguments[1]!==void 0?arguments[1]:null;return typeof P=="string"?P.startsWith("g_")?this.commonObjs.get(P):this.objs.get(P):M}beginDrawing(P){let{transform:M,viewport:E,transparency:R=!1,background:O=null}=P;const B=this.ctx.canvas.width,F=this.ctx.canvas.height,Z=this.ctx.fillStyle;if(this.ctx.fillStyle=O||"#ffffff",this.ctx.fillRect(0,0,B,F),this.ctx.fillStyle=Z,R){const se=this.cachedCanvases.getCanvas("transparent",B,F);this.compositeCtx=this.ctx,this.transparentCanvas=se.canvas,this.ctx=se.context,this.ctx.save(),this.ctx.transform(...(0,y.getCurrentTransform)(this.compositeCtx))}this.ctx.save(),s(this.ctx),M&&(this.ctx.transform(...M),this.outputScaleX=M[0],this.outputScaleY=M[0]),this.ctx.transform(...E.transform),this.viewportScale=E.scale,this.baseTransform=(0,y.getCurrentTransform)(this.ctx)}executeOperatorList(P,M,E,R){const O=P.argsArray,B=P.fnArray;let F=M||0;const Z=O.length;if(Z===F)return F;const se=Z-F>d&&typeof E=="function",q=se?Date.now()+n:0;let pe=0;const te=this.commonObjs,me=this.objs;let ve;for(;;){if(R!==void 0&&F===R.nextBreakPoint)return R.breakIt(F,E),F;if(ve=B[F],ve!==p.OPS.dependency)this[ve].apply(this,O[F]);else for(const Re of O[F]){const Oe=Re.startsWith("g_")?te:me;if(!Oe.has(Re))return Oe.get(Re,E),F}if(F++,F===Z)return F;if(se&&++pe>d){if(Date.now()>q)return E(),F;pe=0}}}endDrawing(){J(this,z,un).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const P of this._cachedBitmapsMap.values()){for(const M of P.values())typeof HTMLCanvasElement<"u"&&M instanceof HTMLCanvasElement&&(M.width=M.height=0);P.clear()}this._cachedBitmapsMap.clear(),J(this,oe,dn).call(this)}_scaleImage(P,M){const E=P.width,R=P.height;let O=Math.max(Math.hypot(M[0],M[1]),1),B=Math.max(Math.hypot(M[2],M[3]),1),F=E,Z=R,se="prescale1",q,pe;for(;O>2&&F>1||B>2&&Z>1;){let te=F,me=Z;O>2&&F>1&&(te=F>=16384?Math.floor(F/2)-1||1:Math.ceil(F/2),O/=F/te),B>2&&Z>1&&(me=Z>=16384?Math.floor(Z/2)-1||1:Math.ceil(Z)/2,B/=Z/me),q=this.cachedCanvases.getCanvas(se,te,me),pe=q.context,pe.clearRect(0,0,te,me),pe.drawImage(P,0,0,F,Z,0,0,te,me),P=q.canvas,F=te,Z=me,se=se==="prescale1"?"prescale2":"prescale1"}return{img:P,paintWidth:F,paintHeight:Z}}_createMaskCanvas(P){const M=this.ctx,{width:E,height:R}=P,O=this.current.fillColor,B=this.current.patternFill,F=(0,y.getCurrentTransform)(M);let Z,se,q,pe;if((P.bitmap||P.data)&&P.count>1){const Ce=P.bitmap||P.data.buffer;se=JSON.stringify(B?F:[F.slice(0,4),O]),Z=this._cachedBitmapsMap.get(Ce),Z||(Z=new Map,this._cachedBitmapsMap.set(Ce,Z));const Me=Z.get(se);if(Me&&!B){const Ve=Math.round(Math.min(F[0],F[2])+F[4]),ze=Math.round(Math.min(F[1],F[3])+F[5]);return{canvas:Me,offsetX:Ve,offsetY:ze}}q=Me}q||(pe=this.cachedCanvases.getCanvas("maskCanvas",E,R),b(pe.context,P));let te=p.Util.transform(F,[1/E,0,0,-1/R,0,0]);te=p.Util.transform(te,[1,0,0,1,0,-R]);const me=p.Util.applyTransform([0,0],te),ve=p.Util.applyTransform([E,R],te),Re=p.Util.normalizeRect([me[0],me[1],ve[0],ve[1]]),Oe=Math.round(Re[2]-Re[0])||1,Ie=Math.round(Re[3]-Re[1])||1,Le=this.cachedCanvases.getCanvas("fillCanvas",Oe,Ie),ue=Le.context,ne=Math.min(me[0],ve[0]),ce=Math.min(me[1],ve[1]);ue.translate(-ne,-ce),ue.transform(...te),q||(q=this._scaleImage(pe.canvas,(0,y.getCurrentTransformInverse)(ue)),q=q.img,Z&&B&&Z.set(se,q)),ue.imageSmoothingEnabled=_((0,y.getCurrentTransform)(ue),P.interpolate),o(ue,q,0,0,q.width,q.height,0,0,E,R),ue.globalCompositeOperation="source-in";const ge=p.Util.transform((0,y.getCurrentTransformInverse)(ue),[1,0,0,1,-ne,-ce]);return ue.fillStyle=B?O.getPattern(M,this,ge,k.PathType.FILL):O,ue.fillRect(0,0,E,R),Z&&!B&&(this.cachedCanvases.delete("fillCanvas"),Z.set(se,Le.canvas)),{canvas:Le.canvas,offsetX:Math.round(ne),offsetY:Math.round(ce)}}setLineWidth(P){P!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=P,this.ctx.lineWidth=P}setLineCap(P){this.ctx.lineCap=Q[P]}setLineJoin(P){this.ctx.lineJoin=W[P]}setMiterLimit(P){this.ctx.miterLimit=P}setDash(P,M){const E=this.ctx;E.setLineDash!==void 0&&(E.setLineDash(P),E.lineDashOffset=M)}setRenderingIntent(P){}setFlatness(P){}setGState(P){for(const[M,E]of P)switch(M){case"LW":this.setLineWidth(E);break;case"LC":this.setLineCap(E);break;case"LJ":this.setLineJoin(E);break;case"ML":this.setMiterLimit(E);break;case"D":this.setDash(E[0],E[1]);break;case"RI":this.setRenderingIntent(E);break;case"FL":this.setFlatness(E);break;case"Font":this.setFont(E[0],E[1]);break;case"CA":this.current.strokeAlpha=E;break;case"ca":this.current.fillAlpha=E,this.ctx.globalAlpha=E;break;case"BM":this.ctx.globalCompositeOperation=E;break;case"SMask":this.current.activeSMask=E?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(E);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const P=this.inSMaskMode;this.current.activeSMask&&!P?this.beginSMaskMode():!this.current.activeSMask&&P&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const P=this.ctx.canvas.width,M=this.ctx.canvas.height,E="smaskGroupAt"+this.groupLevel,R=this.cachedCanvases.getCanvas(E,P,M);this.suspendedCtx=this.ctx,this.ctx=R.context;const O=this.ctx;O.setTransform(...(0,y.getCurrentTransform)(this.suspendedCtx)),c(this.suspendedCtx,O),a(O,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),c(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(P){if(!this.current.activeSMask)return;P?(P[0]=Math.floor(P[0]),P[1]=Math.floor(P[1]),P[2]=Math.ceil(P[2]),P[3]=Math.ceil(P[3])):P=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const M=this.current.activeSMask,E=this.suspendedCtx;I(E,M,this.ctx,P),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}save(){this.inSMaskMode?(c(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const P=this.current;this.stateStack.push(P),this.current=P.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),c(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(P,M,E,R,O,B){this.ctx.transform(P,M,E,R,O,B),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(P,M,E){const R=this.ctx,O=this.current;let B=O.x,F=O.y,Z,se;const q=(0,y.getCurrentTransform)(R),pe=q[0]===0&&q[3]===0||q[1]===0&&q[2]===0,te=pe?E.slice(0):null;for(let me=0,ve=0,Re=P.length;me0&&arguments[0]!==void 0?arguments[0]:!0;const M=this.ctx,E=this.current.strokeColor;M.globalAlpha=this.current.strokeAlpha,this.contentVisible&&(typeof E=="object"&&(E!=null&&E.getPattern)?(M.save(),M.strokeStyle=E.getPattern(M,this,(0,y.getCurrentTransformInverse)(M),k.PathType.STROKE),this.rescaleAndStroke(!1),M.restore()):this.rescaleAndStroke(!0)),P&&this.consumePath(this.current.getClippedPathBoundingBox()),M.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const M=this.ctx,E=this.current.fillColor,R=this.current.patternFill;let O=!1;R&&(M.save(),M.fillStyle=E.getPattern(M,this,(0,y.getCurrentTransformInverse)(M),k.PathType.FILL),O=!0);const B=this.current.getClippedPathBoundingBox();this.contentVisible&&B!==null&&(this.pendingEOFill?(M.fill("evenodd"),this.pendingEOFill=!1):M.fill()),O&&M.restore(),P&&this.consumePath(B)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=j}eoClip(){this.pendingClip=he}beginText(){this.current.textMatrix=p.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const P=this.pendingTextPaths,M=this.ctx;if(P===void 0){M.beginPath();return}M.save(),M.beginPath();for(const E of P)M.setTransform(...E.transform),M.translate(E.x,E.y),E.addToPath(M,E.fontSize);M.restore(),M.clip(),M.beginPath(),delete this.pendingTextPaths}setCharSpacing(P){this.current.charSpacing=P}setWordSpacing(P){this.current.wordSpacing=P}setHScale(P){this.current.textHScale=P/100}setLeading(P){this.current.leading=-P}setFont(P,M){var q;const E=this.commonObjs.get(P),R=this.current;if(!E)throw new Error(`Can't find font for ${P}`);if(R.fontMatrix=E.fontMatrix||p.FONT_IDENTITY_MATRIX,(R.fontMatrix[0]===0||R.fontMatrix[3]===0)&&(0,p.warn)("Invalid font matrix for font "+P),M<0?(M=-M,R.fontDirection=-1):R.fontDirection=1,this.current.font=E,this.current.fontSize=M,E.isType3Font)return;const O=E.loadedName||"sans-serif",B=((q=E.systemFontInfo)==null?void 0:q.css)||`"${O}", ${E.fallbackName}`;let F="normal";E.black?F="900":E.bold&&(F="bold");const Z=E.italic?"italic":"normal";let se=M;Me&&(se=e),this.current.fontSizeScale=M/se,this.ctx.font=`${Z} ${F} ${se}px ${B}`}setTextRenderingMode(P){this.current.textRenderingMode=P}setTextRise(P){this.current.textRise=P}moveText(P,M){this.current.x=this.current.lineX+=P,this.current.y=this.current.lineY+=M}setLeadingMoveText(P,M){this.setLeading(-M),this.moveText(P,M)}setTextMatrix(P,M,E,R,O,B){this.current.textMatrix=[P,M,E,R,O,B],this.current.textMatrixScale=Math.hypot(P,M),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(P,M,E,R){const O=this.ctx,B=this.current,F=B.font,Z=B.textRenderingMode,se=B.fontSize/B.fontSizeScale,q=Z&p.TextRenderingMode.FILL_STROKE_MASK,pe=!!(Z&p.TextRenderingMode.ADD_TO_PATH_FLAG),te=B.patternFill&&!F.missingFile;let me;(F.disableFontFace||pe||te)&&(me=F.getPathGenerator(this.commonObjs,P)),F.disableFontFace||te?(O.save(),O.translate(M,E),O.beginPath(),me(O,se),R&&O.setTransform(...R),(q===p.TextRenderingMode.FILL||q===p.TextRenderingMode.FILL_STROKE)&&O.fill(),(q===p.TextRenderingMode.STROKE||q===p.TextRenderingMode.FILL_STROKE)&&O.stroke(),O.restore()):((q===p.TextRenderingMode.FILL||q===p.TextRenderingMode.FILL_STROKE)&&O.fillText(P,M,E),(q===p.TextRenderingMode.STROKE||q===p.TextRenderingMode.FILL_STROKE)&&O.strokeText(P,M,E)),pe&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:(0,y.getCurrentTransform)(O),x:M,y:E,fontSize:se,addToPath:me})}get isFontSubpixelAAEnabled(){const{context:P}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);P.scale(1.5,1),P.fillText("I",0,10);const M=P.getImageData(0,0,10,10).data;let E=!1;for(let R=3;R0&&M[R]<255){E=!0;break}return(0,p.shadow)(this,"isFontSubpixelAAEnabled",E)}showText(P){const M=this.current,E=M.font;if(E.isType3Font)return this.showType3Text(P);const R=M.fontSize;if(R===0)return;const O=this.ctx,B=M.fontSizeScale,F=M.charSpacing,Z=M.wordSpacing,se=M.fontDirection,q=M.textHScale*se,pe=P.length,te=E.vertical,me=te?1:-1,ve=E.defaultVMetrics,Re=R*M.fontMatrix[0],Oe=M.textRenderingMode===p.TextRenderingMode.FILL&&!E.disableFontFace&&!M.patternFill;O.save(),O.transform(...M.textMatrix),O.translate(M.x,M.y+M.textRise),se>0?O.scale(q,-1):O.scale(q,1);let Ie;if(M.patternFill){O.save();const ge=M.fillColor.getPattern(O,this,(0,y.getCurrentTransformInverse)(O),k.PathType.FILL);Ie=(0,y.getCurrentTransform)(O),O.restore(),O.fillStyle=ge}let Le=M.lineWidth;const ue=M.textMatrixScale;if(ue===0||Le===0){const ge=M.textRenderingMode&p.TextRenderingMode.FILL_STROKE_MASK;(ge===p.TextRenderingMode.STROKE||ge===p.TextRenderingMode.FILL_STROKE)&&(Le=this.getSinglePixelWidth())}else Le/=ue;if(B!==1&&(O.scale(B,B),Le/=B),O.lineWidth=Le,E.isInvalidPDFjsFont){const ge=[];let Ce=0;for(const Me of P)ge.push(Me.unicode),Ce+=Me.width;O.fillText(ge.join(""),0,0),M.x+=Ce*Re*q,O.restore(),this.compose();return}let ne=0,ce;for(ce=0;ce0){const je=O.measureText(Ve).width*1e3/R*B;if(Kenew Pe(B,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};M=new k.TilingPattern(P,E,this.ctx,O,R)}else M=this._getPattern(P[1],P[2]);return M}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(P,M,E){const R=p.Util.makeHexColor(P,M,E);this.ctx.strokeStyle=R,this.current.strokeColor=R}setFillRGBColor(P,M,E){const R=p.Util.makeHexColor(P,M,E);this.ctx.fillStyle=R,this.current.fillColor=R,this.current.patternFill=!1}_getPattern(P){let M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,E;return this.cachedPatterns.has(P)?E=this.cachedPatterns.get(P):(E=(0,k.getShadingPattern)(this.getObject(P)),this.cachedPatterns.set(P,E)),M&&(E.matrix=M),E}shadingFill(P){if(!this.contentVisible)return;const M=this.ctx;this.save();const E=this._getPattern(P);M.fillStyle=E.getPattern(M,this,(0,y.getCurrentTransformInverse)(M),k.PathType.SHADING);const R=(0,y.getCurrentTransformInverse)(M);if(R){const{width:O,height:B}=M.canvas,[F,Z,se,q]=p.Util.getAxialAlignedBoundingBox([0,0,O,B],R);this.ctx.fillRect(F,Z,se-F,q-Z)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){(0,p.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,p.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(P,M){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(P)&&P.length===6&&this.transform(...P),this.baseTransform=(0,y.getCurrentTransform)(this.ctx),M)){const E=M[2]-M[0],R=M[3]-M[1];this.ctx.rect(M[0],M[1],E,R),this.current.updateRectMinMax((0,y.getCurrentTransform)(this.ctx),M),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(P){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const M=this.ctx;P.isolated||(0,p.info)("TODO: Support non-isolated groups."),P.knockout&&(0,p.warn)("Knockout groups not supported.");const E=(0,y.getCurrentTransform)(M);if(P.matrix&&M.transform(...P.matrix),!P.bbox)throw new Error("Bounding box is required.");let R=p.Util.getAxialAlignedBoundingBox(P.bbox,(0,y.getCurrentTransform)(M));const O=[0,0,M.canvas.width,M.canvas.height];R=p.Util.intersect(R,O)||[0,0,0,0];const B=Math.floor(R[0]),F=Math.floor(R[1]);let Z=Math.max(Math.ceil(R[2])-B,1),se=Math.max(Math.ceil(R[3])-F,1),q=1,pe=1;Z>i&&(q=Z/i,Z=i),se>i&&(pe=se/i,se=i),this.current.startNewPathAndClipBox([0,0,Z,se]);let te="groupAt"+this.groupLevel;P.smask&&(te+="_smask_"+this.smaskCounter++%2);const me=this.cachedCanvases.getCanvas(te,Z,se),ve=me.context;ve.scale(1/q,1/pe),ve.translate(-B,-F),ve.transform(...E),P.smask?this.smaskStack.push({canvas:me.canvas,context:ve,offsetX:B,offsetY:F,scaleX:q,scaleY:pe,subtype:P.smask.subtype,backdrop:P.smask.backdrop,transferMap:P.smask.transferMap||null,startTransformInverse:null}):(M.setTransform(1,0,0,1,0,0),M.translate(B,F),M.scale(q,pe),M.save()),c(M,ve),this.ctx=ve,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(M),this.groupLevel++}endGroup(P){if(!this.contentVisible)return;this.groupLevel--;const M=this.ctx,E=this.groupStack.pop();if(this.ctx=E,this.ctx.imageSmoothingEnabled=!1,P.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const R=(0,y.getCurrentTransform)(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...R);const O=p.Util.getAxialAlignedBoundingBox([0,0,M.canvas.width,M.canvas.height],R);this.ctx.drawImage(M.canvas,0,0),this.ctx.restore(),this.compose(O)}}beginAnnotation(P,M,E,R,O){if(J(this,z,un).call(this),s(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Array.isArray(M)&&M.length===4){const B=M[2]-M[0],F=M[3]-M[1];if(O&&this.annotationCanvasMap){E=E.slice(),E[4]-=M[0],E[5]-=M[1],M=M.slice(),M[0]=M[1]=0,M[2]=B,M[3]=F;const[Z,se]=p.Util.singularValueDecompose2dScale((0,y.getCurrentTransform)(this.ctx)),{viewportScale:q}=this,pe=Math.ceil(B*this.outputScaleX*q),te=Math.ceil(F*this.outputScaleY*q);this.annotationCanvas=this.canvasFactory.create(pe,te);const{canvas:me,context:ve}=this.annotationCanvas;this.annotationCanvasMap.set(P,me),this.annotationCanvas.savedCtx=this.ctx,this.ctx=ve,this.ctx.save(),this.ctx.setTransform(Z,0,0,-se,0,F*se),s(this.ctx)}else s(this.ctx),this.ctx.rect(M[0],M[1],B,F),this.ctx.clip(),this.endPath()}this.current=new v(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...E),this.transform(...R)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),J(this,oe,dn).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(P){if(!this.contentVisible)return;const M=P.count;P=this.getObject(P.data,P),P.count=M;const E=this.ctx,R=this.processingType3;if(R&&(R.compiled===void 0&&(R.compiled=m(P)),R.compiled)){R.compiled(E);return}const O=this._createMaskCanvas(P),B=O.canvas;E.save(),E.setTransform(1,0,0,1,0,0),E.drawImage(B,O.offsetX,O.offsetY),E.restore(),this.compose()}paintImageMaskXObjectRepeat(P,M){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,R=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,O=arguments.length>4?arguments[4]:void 0,B=arguments.length>5?arguments[5]:void 0;if(!this.contentVisible)return;P=this.getObject(P.data,P);const F=this.ctx;F.save();const Z=(0,y.getCurrentTransform)(F);F.transform(M,E,R,O,0,0);const se=this._createMaskCanvas(P);F.setTransform(1,0,0,1,se.offsetX-Z[4],se.offsetY-Z[5]);for(let q=0,pe=B.length;qpe?q/pe:1,F=se>pe?se/pe:1}}this._cachedScaleForStroking[0]=B,this._cachedScaleForStroking[1]=F}return this._cachedScaleForStroking}rescaleAndStroke(P){const{ctx:M}=this,{lineWidth:E}=this.current,[R,O]=this.getScaleForStroking();if(M.lineWidth=E||1,R===1&&O===1){M.stroke();return}const B=M.getLineDash();if(P&&M.save(),M.scale(R,O),B.length>0){const F=Math.max(R,O);M.setLineDash(B.map(Z=>Z/F)),M.lineDashOffset/=F}M.stroke(),P&&M.restore()}isContentVisible(){for(let P=this.markedContentStack.length-1;P>=0;P--)if(!this.markedContentStack[P].visible)return!1;return!0}};z=new WeakSet,un=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)},oe=new WeakSet,dn=function(){if(this.pageColors){const P=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(P!=="none"){const M=this.ctx.filter;this.ctx.filter=P,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=M}}};let Y=Pe;w.CanvasGraphics=Y;for(const L in p.OPS)Y.prototype[L]!==void 0&&(Y.prototype[p.OPS[L]]=Y.prototype[L])},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.TilingPattern=w.PathType=void 0,w.getShadingPattern=f,t(2);var p=t(1),y=t(168);const k={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};w.PathType=k;function u(m,v){if(!v)return;const A=v[2]-v[0],b=v[3]-v[1],c=new Path2D;c.rect(v[0],v[1],A,b),m.clip(c)}class g{constructor(){this.constructor===g&&(0,p.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,p.unreachable)("Abstract method `getPattern` called.")}}class e extends g{constructor(v){super(),this._type=v[1],this._bbox=v[2],this._colorStops=v[3],this._p0=v[4],this._p1=v[5],this._r0=v[6],this._r1=v[7],this.matrix=null}_createGradient(v){let A;this._type==="axial"?A=v.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(A=v.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const b of this._colorStops)A.addColorStop(b[0],b[1]);return A}getPattern(v,A,b,c){let s;if(c===k.STROKE||c===k.FILL){const x=A.current.getClippedPathBoundingBox(c,(0,y.getCurrentTransform)(v))||[0,0,0,0],T=Math.ceil(x[2]-x[0])||1,S=Math.ceil(x[3]-x[1])||1,D=A.cachedCanvases.getCanvas("pattern",T,S,!0),I=D.context;I.clearRect(0,0,I.canvas.width,I.canvas.height),I.beginPath(),I.rect(0,0,I.canvas.width,I.canvas.height),I.translate(-x[0],-x[1]),b=p.Util.transform(b,[1,0,0,1,x[0],x[1]]),I.transform(...A.baseTransform),this.matrix&&I.transform(...this.matrix),u(I,this._bbox),I.fillStyle=this._createGradient(I),I.fill(),s=v.createPattern(D.canvas,"no-repeat");const _=new DOMMatrix(b);s.setTransform(_)}else u(v,this._bbox),s=this._createGradient(v);return s}}function i(m,v,A,b,c,s,x,T){const S=v.coords,D=v.colors,I=m.data,_=m.width*4;let Q;S[A+1]>S[b+1]&&(Q=A,A=b,b=Q,Q=s,s=x,x=Q),S[b+1]>S[c+1]&&(Q=b,b=c,c=Q,Q=x,x=T,T=Q),S[A+1]>S[b+1]&&(Q=A,A=b,b=Q,Q=s,s=x,x=Q);const W=(S[A]+v.offsetX)*v.scaleX,j=(S[A+1]+v.offsetY)*v.scaleY,he=(S[b]+v.offsetX)*v.scaleX,Y=(S[b+1]+v.offsetY)*v.scaleY,z=(S[c]+v.offsetX)*v.scaleX,ee=(S[c+1]+v.offsetY)*v.scaleY;if(j>=ee)return;const oe=D[s],ye=D[s+1],Pe=D[s+2],L=D[x],P=D[x+1],M=D[x+2],E=D[T],R=D[T+1],O=D[T+2],B=Math.round(j),F=Math.round(ee);let Z,se,q,pe,te,me,ve,Re;for(let Oe=B;Oe<=F;Oe++){if(Oeee?ce=1:Y===ee?ce=0:ce=(Y-Oe)/(Y-ee),Z=he-(he-z)*ce,se=L-(L-E)*ce,q=P-(P-R)*ce,pe=M-(M-O)*ce}let Ie;Oeee?Ie=1:Ie=(j-Oe)/(j-ee),te=W-(W-z)*Ie,me=oe-(oe-E)*Ie,ve=ye-(ye-R)*Ie,Re=Pe-(Pe-O)*Ie;const Le=Math.round(Math.min(Z,te)),ue=Math.round(Math.max(Z,te));let ne=_*Oe+Le*4;for(let ce=Le;ce<=ue;ce++)Ie=(Z-ce)/(Z-te),Ie<0?Ie=0:Ie>1&&(Ie=1),I[ne++]=se-(se-me)*Ie|0,I[ne++]=q-(q-ve)*Ie|0,I[ne++]=pe-(pe-Re)*Ie|0,I[ne++]=255}}function n(m,v,A){const b=v.coords,c=v.colors;let s,x;switch(v.type){case"lattice":const T=v.verticesPerRow,S=Math.floor(b.length/T)-1,D=T-1;for(s=0;s=c?s=c:b=s/v,{scale:b,size:s}}clipBbox(v,A,b,c,s){const x=c-A,T=s-b;v.ctx.rect(A,b,x,T),v.current.updateRectMinMax((0,y.getCurrentTransform)(v.ctx),[A,b,c,s]),v.clip(),v.endPath()}setFillAndStrokeStyleToContext(v,A,b){const c=v.ctx,s=v.current;switch(A){case a.COLORED:const x=this.ctx;c.fillStyle=x.fillStyle,c.strokeStyle=x.strokeStyle,s.fillColor=x.fillStyle,s.strokeColor=x.strokeStyle;break;case a.UNCOLORED:const T=p.Util.makeHexColor(b[0],b[1],b[2]);c.fillStyle=T,c.strokeStyle=T,s.fillColor=T,s.strokeColor=T;break;default:throw new p.FormatError(`Unsupported paint type: ${A}`)}}getPattern(v,A,b,c){let s=b;c!==k.SHADING&&(s=p.Util.transform(s,A.baseTransform),this.matrix&&(s=p.Util.transform(s,this.matrix)));const x=this.createPatternCanvas(A);let T=new DOMMatrix(s);T=T.translate(x.offsetX,x.offsetY),T=T.scale(1/x.scaleX,1/x.scaleY);const S=v.createPattern(x.canvas,"repeat");return S.setTransform(T),S}};tt(o,"MAX_PATTERN_SIZE",3e3);let r=o;w.TilingPattern=r},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.convertBlackAndWhiteToRGBA=k,w.convertToRGBA=y,w.grayToRGBA=g,t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123);var p=t(1);function y(e){switch(e.kind){case p.ImageKind.GRAYSCALE_1BPP:return k(e);case p.ImageKind.RGB_24BPP:return u(e)}return null}function k(e){let{src:i,srcPos:n=0,dest:d,width:h,height:f,nonBlackColor:a=4294967295,inverseDecode:r=!1}=e;const o=p.FeatureTest.isLittleEndian?4278190080:255,[m,v]=r?[a,o]:[o,a],A=h>>3,b=h&7,c=i.length;d=new Uint32Array(d.buffer);let s=0;for(let x=0;x>2,m=new Uint32Array(i.buffer,n,o);if(p.FeatureTest.isLittleEndian){for(;r>>24|A<<8|4278190080,d[h+2]=A>>>16|b<<16|4278190080,d[h+3]=b>>>8|4278190080}for(let v=r*4,A=i.length;v>>8|255,d[h+2]=A<<16|b>>>16|255,d[h+3]=b<<8|255}for(let v=r*4,A=i.length;v{Object.defineProperty(w,"__esModule",{value:!0}),w.GlobalWorkerOptions=void 0;const t=Object.create(null);w.GlobalWorkerOptions=t,t.workerPort=null,t.workerSrc=""},(N,w,t)=>{var e,cr,n,hr,h,Dt;Object.defineProperty(w,"__esModule",{value:!0}),w.MessageHandler=void 0,t(2);var p=t(1);const y={UNKNOWN:0,DATA:1,ERROR:2},k={UNKNOWN:0,CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function u(a){switch(a instanceof Error||typeof a=="object"&&a!==null||(0,p.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),a.name){case"AbortException":return new p.AbortException(a.message);case"MissingPDFException":return new p.MissingPDFException(a.message);case"PasswordException":return new p.PasswordException(a.message,a.code);case"UnexpectedResponseException":return new p.UnexpectedResponseException(a.message,a.status);case"UnknownErrorException":return new p.UnknownErrorException(a.message,a.details);default:return new p.UnknownErrorException(a.message,a.toString())}}class g{constructor(r,o,m){$(this,e);$(this,n);$(this,h);this.sourceName=r,this.targetName=o,this.comObj=m,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=v=>{const A=v.data;if(A.targetName!==this.sourceName)return;if(A.stream){J(this,n,hr).call(this,A);return}if(A.callback){const c=A.callbackId,s=this.callbackCapabilities[c];if(!s)throw new Error(`Cannot resolve callback ${c}`);if(delete this.callbackCapabilities[c],A.callback===y.DATA)s.resolve(A.data);else if(A.callback===y.ERROR)s.reject(u(A.reason));else throw new Error("Unexpected callback case");return}const b=this.actionHandler[A.action];if(!b)throw new Error(`Unknown action from worker: ${A.action}`);if(A.callbackId){const c=this.sourceName,s=A.sourceName;new Promise(function(x){x(b(A.data))}).then(function(x){m.postMessage({sourceName:c,targetName:s,callback:y.DATA,callbackId:A.callbackId,data:x})},function(x){m.postMessage({sourceName:c,targetName:s,callback:y.ERROR,callbackId:A.callbackId,reason:u(x)})});return}if(A.streamId){J(this,e,cr).call(this,A);return}b(A.data)},m.addEventListener("message",this._onComObjOnMessage)}on(r,o){const m=this.actionHandler;if(m[r])throw new Error(`There is already an actionName called "${r}"`);m[r]=o}send(r,o,m){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:r,data:o},m)}sendWithPromise(r,o,m){const v=this.callbackId++,A=new p.PromiseCapability;this.callbackCapabilities[v]=A;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:r,callbackId:v,data:o},m)}catch(b){A.reject(b)}return A.promise}sendWithStream(r,o,m,v){const A=this.streamId++,b=this.sourceName,c=this.targetName,s=this.comObj;return new ReadableStream({start:x=>{const T=new p.PromiseCapability;return this.streamControllers[A]={controller:x,startCall:T,pullCall:null,cancelCall:null,isClosed:!1},s.postMessage({sourceName:b,targetName:c,action:r,streamId:A,data:o,desiredSize:x.desiredSize},v),T.promise},pull:x=>{const T=new p.PromiseCapability;return this.streamControllers[A].pullCall=T,s.postMessage({sourceName:b,targetName:c,stream:k.PULL,streamId:A,desiredSize:x.desiredSize}),T.promise},cancel:x=>{(0,p.assert)(x instanceof Error,"cancel must have a valid reason");const T=new p.PromiseCapability;return this.streamControllers[A].cancelCall=T,this.streamControllers[A].isClosed=!0,s.postMessage({sourceName:b,targetName:c,stream:k.CANCEL,streamId:A,reason:u(x)}),T.promise}},m)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}e=new WeakSet,cr=function(r){const o=r.streamId,m=this.sourceName,v=r.sourceName,A=this.comObj,b=this,c=this.actionHandler[r.action],s={enqueue(x){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,S=arguments.length>2?arguments[2]:void 0;if(this.isCancelled)return;const D=this.desiredSize;this.desiredSize-=T,D>0&&this.desiredSize<=0&&(this.sinkCapability=new p.PromiseCapability,this.ready=this.sinkCapability.promise),A.postMessage({sourceName:m,targetName:v,stream:k.ENQUEUE,streamId:o,chunk:x},S)},close(){this.isCancelled||(this.isCancelled=!0,A.postMessage({sourceName:m,targetName:v,stream:k.CLOSE,streamId:o}),delete b.streamSinks[o])},error(x){(0,p.assert)(x instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,A.postMessage({sourceName:m,targetName:v,stream:k.ERROR,streamId:o,reason:u(x)}))},sinkCapability:new p.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:r.desiredSize,ready:null};s.sinkCapability.resolve(),s.ready=s.sinkCapability.promise,this.streamSinks[o]=s,new Promise(function(x){x(c(r.data,s))}).then(function(){A.postMessage({sourceName:m,targetName:v,stream:k.START_COMPLETE,streamId:o,success:!0})},function(x){A.postMessage({sourceName:m,targetName:v,stream:k.START_COMPLETE,streamId:o,reason:u(x)})})},n=new WeakSet,hr=function(r){const o=r.streamId,m=this.sourceName,v=r.sourceName,A=this.comObj,b=this.streamControllers[o],c=this.streamSinks[o];switch(r.stream){case k.START_COMPLETE:r.success?b.startCall.resolve():b.startCall.reject(u(r.reason));break;case k.PULL_COMPLETE:r.success?b.pullCall.resolve():b.pullCall.reject(u(r.reason));break;case k.PULL:if(!c){A.postMessage({sourceName:m,targetName:v,stream:k.PULL_COMPLETE,streamId:o,success:!0});break}c.desiredSize<=0&&r.desiredSize>0&&c.sinkCapability.resolve(),c.desiredSize=r.desiredSize,new Promise(function(s){var x;s((x=c.onPull)==null?void 0:x.call(c))}).then(function(){A.postMessage({sourceName:m,targetName:v,stream:k.PULL_COMPLETE,streamId:o,success:!0})},function(s){A.postMessage({sourceName:m,targetName:v,stream:k.PULL_COMPLETE,streamId:o,reason:u(s)})});break;case k.ENQUEUE:if((0,p.assert)(b,"enqueue should have stream controller"),b.isClosed)break;b.controller.enqueue(r.chunk);break;case k.CLOSE:if((0,p.assert)(b,"close should have stream controller"),b.isClosed)break;b.isClosed=!0,b.controller.close(),J(this,h,Dt).call(this,b,o);break;case k.ERROR:(0,p.assert)(b,"error should have stream controller"),b.controller.error(u(r.reason)),J(this,h,Dt).call(this,b,o);break;case k.CANCEL_COMPLETE:r.success?b.cancelCall.resolve():b.cancelCall.reject(u(r.reason)),J(this,h,Dt).call(this,b,o);break;case k.CANCEL:if(!c)break;new Promise(function(s){var x;s((x=c.onCancel)==null?void 0:x.call(c,u(r.reason)))}).then(function(){A.postMessage({sourceName:m,targetName:v,stream:k.CANCEL_COMPLETE,streamId:o,success:!0})},function(s){A.postMessage({sourceName:m,targetName:v,stream:k.CANCEL_COMPLETE,streamId:o,reason:u(s)})}),c.sinkCapability.reject(u(r.reason)),c.isCancelled=!0,delete this.streamSinks[o];break;default:throw new Error("Unexpected stream case")}},h=new WeakSet,Dt=async function(r,o){var m,v,A;await Promise.allSettled([(m=r.startCall)==null?void 0:m.promise,(v=r.pullCall)==null?void 0:v.promise,(A=r.cancelCall)==null?void 0:A.promise]),delete this.streamControllers[o]},w.MessageHandler=g},(N,w,t)=>{var k,u;Object.defineProperty(w,"__esModule",{value:!0}),w.Metadata=void 0;var p=t(1);class y{constructor(e){$(this,k,void 0);$(this,u,void 0);let{parsedData:i,rawData:n}=e;le(this,k,i),le(this,u,n)}getRaw(){return l(this,u)}get(e){return l(this,k).get(e)??null}getAll(){return(0,p.objectFromMap)(l(this,k))}has(e){return l(this,k).has(e)}}k=new WeakMap,u=new WeakMap,w.Metadata=y},(N,w,t)=>{var e,i,n,d,h,f,fn;Object.defineProperty(w,"__esModule",{value:!0}),w.OptionalContentConfig=void 0;var p=t(1),y=t(170);const k=Symbol("INTERNAL");class u{constructor(o,m){$(this,e,!0);this.name=o,this.intent=m}get visible(){return l(this,e)}_setVisible(o,m){o!==k&&(0,p.unreachable)("Internal method `_setVisible` called."),le(this,e,m)}}e=new WeakMap;class g{constructor(o){$(this,f);$(this,i,null);$(this,n,new Map);$(this,d,null);$(this,h,null);if(this.name=null,this.creator=null,o!==null){this.name=o.name,this.creator=o.creator,le(this,h,o.order);for(const m of o.groups)l(this,n).set(m.id,new u(m.name,m.intent));if(o.baseState==="OFF")for(const m of l(this,n).values())m._setVisible(k,!1);for(const m of o.on)l(this,n).get(m)._setVisible(k,!0);for(const m of o.off)l(this,n).get(m)._setVisible(k,!1);le(this,d,this.getHash())}}isVisible(o){if(l(this,n).size===0)return!0;if(!o)return(0,p.warn)("Optional content group not defined."),!0;if(o.type==="OCG")return l(this,n).has(o.id)?l(this,n).get(o.id).visible:((0,p.warn)(`Optional content group not found: ${o.id}`),!0);if(o.type==="OCMD"){if(o.expression)return J(this,f,fn).call(this,o.expression);if(!o.policy||o.policy==="AnyOn"){for(const m of o.ids){if(!l(this,n).has(m))return(0,p.warn)(`Optional content group not found: ${m}`),!0;if(l(this,n).get(m).visible)return!0}return!1}else if(o.policy==="AllOn"){for(const m of o.ids){if(!l(this,n).has(m))return(0,p.warn)(`Optional content group not found: ${m}`),!0;if(!l(this,n).get(m).visible)return!1}return!0}else if(o.policy==="AnyOff"){for(const m of o.ids){if(!l(this,n).has(m))return(0,p.warn)(`Optional content group not found: ${m}`),!0;if(!l(this,n).get(m).visible)return!0}return!1}else if(o.policy==="AllOff"){for(const m of o.ids){if(!l(this,n).has(m))return(0,p.warn)(`Optional content group not found: ${m}`),!0;if(l(this,n).get(m).visible)return!1}return!0}return(0,p.warn)(`Unknown optional content policy ${o.policy}.`),!0}return(0,p.warn)(`Unknown group type ${o.type}.`),!0}setVisibility(o){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!l(this,n).has(o)){(0,p.warn)(`Optional content group not found: ${o}`);return}l(this,n).get(o)._setVisible(k,!!m),le(this,i,null)}get hasInitialVisibility(){return l(this,d)===null||this.getHash()===l(this,d)}getOrder(){return l(this,n).size?l(this,h)?l(this,h).slice():[...l(this,n).keys()]:null}getGroups(){return l(this,n).size>0?(0,p.objectFromMap)(l(this,n)):null}getGroup(o){return l(this,n).get(o)||null}getHash(){if(l(this,i)!==null)return l(this,i);const o=new y.MurmurHash3_64;for(const[m,v]of l(this,n))o.update(`${m}:${v.visible}`);return le(this,i,o.hexdigest())}}i=new WeakMap,n=new WeakMap,d=new WeakMap,h=new WeakMap,f=new WeakSet,fn=function(o){const m=o.length;if(m<2)return!0;const v=o[0];for(let A=1;A{Object.defineProperty(w,"__esModule",{value:!0}),w.PDFDataTransportStream=void 0,t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123),t(89);var p=t(1),y=t(168);class k{constructor(i,n){let{length:d,initialData:h,progressiveDone:f=!1,contentDispositionFilename:a=null,disableRange:r=!1,disableStream:o=!1}=i;if((0,p.assert)(n,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=f,this._contentDispositionFilename=a,(h==null?void 0:h.length)>0){const m=h instanceof Uint8Array&&h.byteLength===h.buffer.byteLength?h.buffer:new Uint8Array(h).buffer;this._queuedChunks.push(m)}this._pdfDataRangeTransport=n,this._isStreamingSupported=!o,this._isRangeSupported=!r,this._contentLength=d,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((m,v)=>{this._onReceiveData({begin:m,chunk:v})}),this._pdfDataRangeTransport.addProgressListener((m,v)=>{this._onProgress({loaded:m,total:v})}),this._pdfDataRangeTransport.addProgressiveReadListener(m=>{this._onReceiveData({chunk:m})}),this._pdfDataRangeTransport.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}_onReceiveData(i){let{begin:n,chunk:d}=i;const h=d instanceof Uint8Array&&d.byteLength===d.buffer.byteLength?d.buffer:new Uint8Array(d).buffer;if(n===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(h):this._queuedChunks.push(h);else{const f=this._rangeReaders.some(function(a){return a._begin!==n?!1:(a._enqueue(h),!0)});(0,p.assert)(f,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var i;return((i=this._fullRequestReader)==null?void 0:i._loaded)??0}_onProgress(i){var n,d,h,f;i.total===void 0?(d=(n=this._rangeReaders[0])==null?void 0:n.onProgress)==null||d.call(n,{loaded:i.loaded}):(f=(h=this._fullRequestReader)==null?void 0:h.onProgress)==null||f.call(h,{loaded:i.loaded,total:i.total})}_onProgressiveDone(){var i;(i=this._fullRequestReader)==null||i.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(i){const n=this._rangeReaders.indexOf(i);n>=0&&this._rangeReaders.splice(n,1)}getFullReader(){(0,p.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const i=this._queuedChunks;return this._queuedChunks=null,new u(this,i,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(i,n){if(n<=this._progressiveDataLength)return null;const d=new g(this,i,n);return this._pdfDataRangeTransport.requestDataRange(i,n),this._rangeReaders.push(d),d}cancelAllRequests(i){var n;(n=this._fullRequestReader)==null||n.cancel(i);for(const d of this._rangeReaders.slice(0))d.cancel(i);this._pdfDataRangeTransport.abort()}}w.PDFDataTransportStream=k;class u{constructor(i,n){let d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;this._stream=i,this._done=d||!1,this._filename=(0,y.isPdfFile)(h)?h:null,this._queuedChunks=n||[],this._loaded=0;for(const f of this._queuedChunks)this._loaded+=f.byteLength;this._requests=[],this._headersReady=Promise.resolve(),i._fullRequestReader=this,this.onProgress=null}_enqueue(i){this._done||(this._requests.length>0?this._requests.shift().resolve({value:i,done:!1}):this._queuedChunks.push(i),this._loaded+=i.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const i=new p.PromiseCapability;return this._requests.push(i),i.promise}cancel(i){this._done=!0;for(const n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class g{constructor(i,n,d){this._stream=i,this._begin=n,this._end=d,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(i){if(!this._done){if(this._requests.length===0)this._queuedChunk=i;else{this._requests.shift().resolve({value:i,done:!1});for(const d of this._requests)d.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const n=this._queuedChunk;return this._queuedChunk=null,{value:n,done:!1}}if(this._done)return{value:void 0,done:!0};const i=new p.PromiseCapability;return this._requests.push(i),i.promise}cancel(i){this._done=!0;for(const n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.PDFFetchStream=void 0,t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123),t(89);var p=t(1),y=t(182);function k(d,h,f){return{method:"GET",headers:d,signal:f.signal,mode:"cors",credentials:h?"include":"same-origin",redirect:"follow"}}function u(d){const h=new Headers;for(const f in d){const a=d[f];a!==void 0&&h.append(f,a)}return h}function g(d){return d instanceof Uint8Array?d.buffer:d instanceof ArrayBuffer?d:((0,p.warn)(`getArrayBuffer - unexpected data format: ${d}`),new Uint8Array(d).buffer)}class e{constructor(h){this.source=h,this.isHttp=/^https?:/i.test(h.url),this.httpHeaders=this.isHttp&&h.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var h;return((h=this._fullRequestReader)==null?void 0:h._loaded)??0}getFullReader(){return(0,p.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new i(this),this._fullRequestReader}getRangeReader(h,f){if(f<=this._progressiveDataLength)return null;const a=new n(this,h,f);return this._rangeRequestReaders.push(a),a}cancelAllRequests(h){var f;(f=this._fullRequestReader)==null||f.cancel(h);for(const a of this._rangeRequestReaders.slice(0))a.cancel(h)}}w.PDFFetchStream=e;class i{constructor(h){this._stream=h,this._reader=null,this._loaded=0,this._filename=null;const f=h.source;this._withCredentials=f.withCredentials||!1,this._contentLength=f.length,this._headersCapability=new p.PromiseCapability,this._disableRange=f.disableRange||!1,this._rangeChunkSize=f.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!f.disableStream,this._isRangeSupported=!f.disableRange,this._headers=u(this._stream.httpHeaders);const a=f.url;fetch(a,k(this._headers,this._withCredentials,this._abortController)).then(r=>{if(!(0,y.validateResponseStatus)(r.status))throw(0,y.createResponseStatusError)(r.status,a);this._reader=r.body.getReader(),this._headersCapability.resolve();const o=A=>r.headers.get(A),{allowRangeRequests:m,suggestedLength:v}=(0,y.validateRangeRequestCapabilities)({getResponseHeader:o,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=m,this._contentLength=v||this._contentLength,this._filename=(0,y.extractFilenameFromHeader)(o),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new p.AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var a;await this._headersCapability.promise;const{value:h,done:f}=await this._reader.read();return f?{value:h,done:f}:(this._loaded+=h.byteLength,(a=this.onProgress)==null||a.call(this,{loaded:this._loaded,total:this._contentLength}),{value:g(h),done:!1})}cancel(h){var f;(f=this._reader)==null||f.cancel(h),this._abortController.abort()}}class n{constructor(h,f,a){this._stream=h,this._reader=null,this._loaded=0;const r=h.source;this._withCredentials=r.withCredentials||!1,this._readCapability=new p.PromiseCapability,this._isStreamingSupported=!r.disableStream,this._abortController=new AbortController,this._headers=u(this._stream.httpHeaders),this._headers.append("Range",`bytes=${f}-${a-1}`);const o=r.url;fetch(o,k(this._headers,this._withCredentials,this._abortController)).then(m=>{if(!(0,y.validateResponseStatus)(m.status))throw(0,y.createResponseStatusError)(m.status,o);this._readCapability.resolve(),this._reader=m.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var a;await this._readCapability.promise;const{value:h,done:f}=await this._reader.read();return f?{value:h,done:f}:(this._loaded+=h.byteLength,(a=this.onProgress)==null||a.call(this,{loaded:this._loaded}),{value:g(h),done:!1})}cancel(h){var f;(f=this._reader)==null||f.cancel(h),this._abortController.abort()}}},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.createResponseStatusError=e,w.extractFilenameFromHeader=g,w.validateRangeRequestCapabilities=u,w.validateResponseStatus=i;var p=t(1),y=t(183),k=t(168);function u(n){let{getResponseHeader:d,isHttp:h,rangeChunkSize:f,disableRange:a}=n;const r={allowRangeRequests:!1,suggestedLength:void 0},o=parseInt(d("Content-Length"),10);return!Number.isInteger(o)||(r.suggestedLength=o,o<=2*f)||a||!h||d("Accept-Ranges")!=="bytes"||(d("Content-Encoding")||"identity")!=="identity"||(r.allowRangeRequests=!0),r}function g(n){const d=n("Content-Disposition");if(d){let h=(0,y.getFilenameFromContentDispositionHeader)(d);if(h.includes("%"))try{h=decodeURIComponent(h)}catch{}if((0,k.isPdfFile)(h))return h}return null}function e(n,d){return n===404||n===0&&d.startsWith("file:")?new p.MissingPDFException('Missing PDF "'+d+'".'):new p.UnexpectedResponseException(`Unexpected server response (${n}) while retrieving PDF "${d}".`,n)}function i(n){return n===200||n===206}},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.getFilenameFromContentDispositionHeader=y,t(89),t(149);var p=t(1);function y(k){let u=!0,g=e("filename\\*","i").exec(k);if(g){g=g[1];let r=h(g);return r=unescape(r),r=f(r),r=a(r),n(r)}if(g=d(k),g){const r=a(g);return n(r)}if(g=e("filename","i").exec(k),g){g=g[1];let r=h(g);return r=a(r),n(r)}function e(r,o){return new RegExp("(?:^|;)\\s*"+r+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',o)}function i(r,o){if(r){if(!/^[\x00-\xFF]+$/.test(o))return o;try{const m=new TextDecoder(r,{fatal:!0}),v=(0,p.stringToBytes)(o);o=m.decode(v),u=!1}catch{}}return o}function n(r){return u&&/[\x80-\xff]/.test(r)&&(r=i("utf-8",r),u&&(r=i("iso-8859-1",r))),r}function d(r){const o=[];let m;const v=e("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(m=v.exec(r))!==null;){let[,b,c,s]=m;if(b=parseInt(b,10),b in o){if(b===0)break;continue}o[b]=[c,s]}const A=[];for(let b=0;b{Object.defineProperty(w,"__esModule",{value:!0}),w.PDFNetworkStream=void 0,t(89);var p=t(1),y=t(182);const k=200,u=206;function g(h){const f=h.response;return typeof f!="string"?f:(0,p.stringToBytes)(f).buffer}class e{constructor(f){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.url=f,this.isHttp=/^https?:/i.test(f),this.httpHeaders=this.isHttp&&a.httpHeaders||Object.create(null),this.withCredentials=a.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(f,a,r){const o={begin:f,end:a};for(const m in r)o[m]=r[m];return this.request(o)}requestFull(f){return this.request(f)}request(f){const a=new XMLHttpRequest,r=this.currXhrId++,o=this.pendingRequests[r]={xhr:a};a.open("GET",this.url),a.withCredentials=this.withCredentials;for(const m in this.httpHeaders){const v=this.httpHeaders[m];v!==void 0&&a.setRequestHeader(m,v)}return this.isHttp&&"begin"in f&&"end"in f?(a.setRequestHeader("Range",`bytes=${f.begin}-${f.end-1}`),o.expectedStatus=u):o.expectedStatus=k,a.responseType="arraybuffer",f.onError&&(a.onerror=function(m){f.onError(a.status)}),a.onreadystatechange=this.onStateChange.bind(this,r),a.onprogress=this.onProgress.bind(this,r),o.onHeadersReceived=f.onHeadersReceived,o.onDone=f.onDone,o.onError=f.onError,o.onProgress=f.onProgress,a.send(null),r}onProgress(f,a){var o;const r=this.pendingRequests[f];r&&((o=r.onProgress)==null||o.call(r,a))}onStateChange(f,a){var b,c,s;const r=this.pendingRequests[f];if(!r)return;const o=r.xhr;if(o.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),o.readyState!==4||!(f in this.pendingRequests))return;if(delete this.pendingRequests[f],o.status===0&&this.isHttp){(b=r.onError)==null||b.call(r,o.status);return}const m=o.status||k;if(!(m===k&&r.expectedStatus===u)&&m!==r.expectedStatus){(c=r.onError)==null||c.call(r,o.status);return}const A=g(o);if(m===u){const x=o.getResponseHeader("Content-Range"),T=/bytes (\d+)-(\d+)\/(\d+)/.exec(x);r.onDone({begin:parseInt(T[1],10),chunk:A})}else A?r.onDone({begin:0,chunk:A}):(s=r.onError)==null||s.call(r,o.status)}getRequestXhr(f){return this.pendingRequests[f].xhr}isPendingRequest(f){return f in this.pendingRequests}abortRequest(f){const a=this.pendingRequests[f].xhr;delete this.pendingRequests[f],a.abort()}}class i{constructor(f){this._source=f,this._manager=new e(f.url,{httpHeaders:f.httpHeaders,withCredentials:f.withCredentials}),this._rangeChunkSize=f.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(f){const a=this._rangeRequestReaders.indexOf(f);a>=0&&this._rangeRequestReaders.splice(a,1)}getFullReader(){return(0,p.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new n(this._manager,this._source),this._fullRequestReader}getRangeReader(f,a){const r=new d(this._manager,f,a);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}cancelAllRequests(f){var a;(a=this._fullRequestReader)==null||a.cancel(f);for(const r of this._rangeRequestReaders.slice(0))r.cancel(f)}}w.PDFNetworkStream=i;class n{constructor(f,a){this._manager=f;const r={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=a.url,this._fullRequestId=f.requestFull(r),this._headersReceivedCapability=new p.PromiseCapability,this._disableRange=a.disableRange||!1,this._contentLength=a.length,this._rangeChunkSize=a.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const f=this._fullRequestId,a=this._manager.getRequestXhr(f),r=v=>a.getResponseHeader(v),{allowRangeRequests:o,suggestedLength:m}=(0,y.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});o&&(this._isRangeSupported=!0),this._contentLength=m||this._contentLength,this._filename=(0,y.extractFilenameFromHeader)(r),this._isRangeSupported&&this._manager.abortRequest(f),this._headersReceivedCapability.resolve()}_onDone(f){if(f&&(this._requests.length>0?this._requests.shift().resolve({value:f.chunk,done:!1}):this._cachedChunks.push(f.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const a of this._requests)a.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(f){this._storedError=(0,y.createResponseStatusError)(f,this._url),this._headersReceivedCapability.reject(this._storedError);for(const a of this._requests)a.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(f){var a;(a=this.onProgress)==null||a.call(this,{loaded:f.loaded,total:f.lengthComputable?f.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const f=new p.PromiseCapability;return this._requests.push(f),f.promise}cancel(f){this._done=!0,this._headersReceivedCapability.reject(f);for(const a of this._requests)a.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class d{constructor(f,a,r){this._manager=f;const o={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=f.url,this._requestId=f.requestRange(a,r,o),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var f;(f=this.onClosed)==null||f.call(this,this)}_onDone(f){const a=f.chunk;this._requests.length>0?this._requests.shift().resolve({value:a,done:!1}):this._queuedChunk=a,this._done=!0;for(const r of this._requests)r.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(f){this._storedError=(0,y.createResponseStatusError)(f,this._url);for(const a of this._requests)a.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(f){var a;this.isStreamingSupported||(a=this.onProgress)==null||a.call(this,{loaded:f.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const a=this._queuedChunk;return this._queuedChunk=null,{value:a,done:!1}}if(this._done)return{value:void 0,done:!0};const f=new p.PromiseCapability;return this._requests.push(f),f.promise}cancel(f){this._done=!0;for(const a of this._requests)a.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.PDFNodeStream=void 0,t(89),t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123);var p=t(1),y=t(182);const k=/^file:\/\/\/[a-zA-Z]:\//;function u(r){const o=require$$6,m=o.parse(r);return m.protocol==="file:"||m.host?m:/^[a-z]:[/\\]/i.test(r)?o.parse(`file:///${r}`):(m.host||(m.protocol="file:"),m)}class g{constructor(o){this.source=o,this.url=u(o.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.httpHeaders=this.isHttp&&o.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var o;return((o=this._fullRequestReader)==null?void 0:o._loaded)??0}getFullReader(){return(0,p.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new f(this):new d(this),this._fullRequestReader}getRangeReader(o,m){if(m<=this._progressiveDataLength)return null;const v=this.isFsUrl?new a(this,o,m):new h(this,o,m);return this._rangeRequestReaders.push(v),v}cancelAllRequests(o){var m;(m=this._fullRequestReader)==null||m.cancel(o);for(const v of this._rangeRequestReaders.slice(0))v.cancel(o)}}w.PDFNodeStream=g;class e{constructor(o){this._url=o.url,this._done=!1,this._storedError=null,this.onProgress=null;const m=o.source;this._contentLength=m.length,this._loaded=0,this._filename=null,this._disableRange=m.disableRange||!1,this._rangeChunkSize=m.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!m.disableStream,this._isRangeSupported=!m.disableRange,this._readableStream=null,this._readCapability=new p.PromiseCapability,this._headersCapability=new p.PromiseCapability}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var v;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const o=this._readableStream.read();return o===null?(this._readCapability=new p.PromiseCapability,this.read()):(this._loaded+=o.length,(v=this.onProgress)==null||v.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(o).buffer,done:!1})}cancel(o){if(!this._readableStream){this._error(o);return}this._readableStream.destroy(o)}_error(o){this._storedError=o,this._readCapability.resolve()}_setReadableStream(o){this._readableStream=o,o.on("readable",()=>{this._readCapability.resolve()}),o.on("end",()=>{o.destroy(),this._done=!0,this._readCapability.resolve()}),o.on("error",m=>{this._error(m)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new p.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class i{constructor(o){this._url=o.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=new p.PromiseCapability;const m=o.source;this._isStreamingSupported=!m.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){var v;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const o=this._readableStream.read();return o===null?(this._readCapability=new p.PromiseCapability,this.read()):(this._loaded+=o.length,(v=this.onProgress)==null||v.call(this,{loaded:this._loaded}),{value:new Uint8Array(o).buffer,done:!1})}cancel(o){if(!this._readableStream){this._error(o);return}this._readableStream.destroy(o)}_error(o){this._storedError=o,this._readCapability.resolve()}_setReadableStream(o){this._readableStream=o,o.on("readable",()=>{this._readCapability.resolve()}),o.on("end",()=>{o.destroy(),this._done=!0,this._readCapability.resolve()}),o.on("error",m=>{this._error(m)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function n(r,o){return{protocol:r.protocol,auth:r.auth,host:r.hostname,port:r.port,path:r.path,method:"GET",headers:o}}class d extends e{constructor(o){super(o);const m=v=>{if(v.statusCode===404){const s=new p.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=s,this._headersCapability.reject(s);return}this._headersCapability.resolve(),this._setReadableStream(v);const A=s=>this._readableStream.headers[s.toLowerCase()],{allowRangeRequests:b,suggestedLength:c}=(0,y.validateRangeRequestCapabilities)({getResponseHeader:A,isHttp:o.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=b,this._contentLength=c||this._contentLength,this._filename=(0,y.extractFilenameFromHeader)(A)};if(this._request=null,this._url.protocol==="http:"){const v=require$$6;this._request=v.request(n(this._url,o.httpHeaders),m)}else{const v=require$$6;this._request=v.request(n(this._url,o.httpHeaders),m)}this._request.on("error",v=>{this._storedError=v,this._headersCapability.reject(v)}),this._request.end()}}class h extends i{constructor(o,m,v){super(o),this._httpHeaders={};for(const b in o.httpHeaders){const c=o.httpHeaders[b];c!==void 0&&(this._httpHeaders[b]=c)}this._httpHeaders.Range=`bytes=${m}-${v-1}`;const A=b=>{if(b.statusCode===404){const c=new p.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=c;return}this._setReadableStream(b)};if(this._request=null,this._url.protocol==="http:"){const b=require$$6;this._request=b.request(n(this._url,this._httpHeaders),A)}else{const b=require$$6;this._request=b.request(n(this._url,this._httpHeaders),A)}this._request.on("error",b=>{this._storedError=b}),this._request.end()}}class f extends e{constructor(o){super(o);let m=decodeURIComponent(this._url.path);k.test(this._url.href)&&(m=m.replace(/^\//,""));const v=require$$6;v.lstat(m,(A,b)=>{if(A){A.code==="ENOENT"&&(A=new p.MissingPDFException(`Missing PDF "${m}".`)),this._storedError=A,this._headersCapability.reject(A);return}this._contentLength=b.size,this._setReadableStream(v.createReadStream(m)),this._headersCapability.resolve()})}}class a extends i{constructor(o,m,v){super(o);let A=decodeURIComponent(this._url.path);k.test(this._url.href)&&(A=A.replace(/^\//,""));const b=require$$6;this._setReadableStream(b.createReadStream(A,{start:m,end:v-1}))}}},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.SVGGraphics=void 0,t(84),t(86),t(87),t(93),t(101),t(102),t(105),t(107),t(109),t(113),t(116),t(123),t(2),t(89),t(187);var p=t(168),y=t(1);const k={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},u="http://www.w3.org/XML/1998/namespace",g="http://www.w3.org/1999/xlink",e=["butt","round","square"],i=["miter","round","bevel"],n=function(b){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(URL.createObjectURL&&typeof Blob<"u"&&!s)return URL.createObjectURL(new Blob([b],{type:c}));const x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let T=`data:${c};base64,`;for(let S=0,D=b.length;S>2,j=(I&3)<<4|_>>4,he=S+1>6:64,Y=S+2>1&2147483647:W>>1&2147483647;s[Q]=W}function x(Q,W,j){let he=-1;for(let Y=W;Y>>8^ee}return he^-1}function T(Q,W,j,he){let Y=he;const z=W.length;j[Y]=z>>24&255,j[Y+1]=z>>16&255,j[Y+2]=z>>8&255,j[Y+3]=z&255,Y+=4,j[Y]=Q.charCodeAt(0)&255,j[Y+1]=Q.charCodeAt(1)&255,j[Y+2]=Q.charCodeAt(2)&255,j[Y+3]=Q.charCodeAt(3)&255,Y+=4,j.set(W,Y),Y+=W.length;const ee=x(j,he+4,Y);j[Y]=ee>>24&255,j[Y+1]=ee>>16&255,j[Y+2]=ee>>8&255,j[Y+3]=ee&255}function S(Q,W,j){let he=1,Y=0;for(let z=W;z=8?Q:Buffer.from(Q),j=require$$6.deflateSync(W,{level:9});return j instanceof Uint8Array?j:new Uint8Array(j)}catch(W){(0,y.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+W)}return I(Q)}function I(Q){let W=Q.length;const j=65535,he=Math.ceil(W/j),Y=new Uint8Array(2+W+he*5+4);let z=0;Y[z++]=120,Y[z++]=156;let ee=0;for(;W>j;)Y[z++]=0,Y[z++]=255,Y[z++]=255,Y[z++]=0,Y[z++]=0,Y.set(Q.subarray(ee,ee+j),z),z+=j,ee+=j,W-=j;Y[z++]=1,Y[z++]=W&255,Y[z++]=W>>8&255,Y[z++]=~W&65535&255,Y[z++]=(~W&65535)>>8&255,Y.set(Q.subarray(ee),z),z+=Q.length-ee;const oe=S(Q,0,Q.length);return Y[z++]=oe>>24&255,Y[z++]=oe>>16&255,Y[z++]=oe>>8&255,Y[z++]=oe&255,Y}function _(Q,W,j,he){const Y=Q.width,z=Q.height;let ee,oe,ye;const Pe=Q.data;switch(W){case y.ImageKind.GRAYSCALE_1BPP:oe=0,ee=1,ye=Y+7>>3;break;case y.ImageKind.RGB_24BPP:oe=2,ee=8,ye=Y*3;break;case y.ImageKind.RGBA_32BPP:oe=6,ee=8,ye=Y*4;break;default:throw new Error("invalid format")}const L=new Uint8Array((1+ye)*z);let P=0,M=0;for(let Z=0;Z>24&255,Y>>16&255,Y>>8&255,Y&255,z>>24&255,z>>16&255,z>>8&255,z&255,ee,oe,0,0,0]),R=D(L),O=b.length+c*3+E.length+R.length,B=new Uint8Array(O);let F=0;return B.set(b,F),F+=b.length,T("IHDR",E,B,F),F+=c+E.length,T("IDATA",R,B,F),F+=c+R.length,T("IEND",new Uint8Array(0),B,F),n(B,"image/png",j)}return function(W,j,he){const Y=W.kind===void 0?y.ImageKind.GRAYSCALE_1BPP:W.kind;return _(W,Y,j,he)}}();class h{constructor(){this.fontSizeScale=1,this.fontWeight=k.fontWeight,this.fontSize=0,this.textMatrix=y.IDENTITY_MATRIX,this.fontMatrix=y.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=y.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=k.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(c,s){this.x=c,this.y=s}}function f(b){let c=[];const s=[];for(const x of b){if(x.fn==="save"){c.push({fnId:92,fn:"group",items:[]}),s.push(c),c=c.at(-1).items;continue}x.fn==="restore"?c=s.pop():c.push(x)}return c}function a(b){if(Number.isInteger(b))return b.toString();const c=b.toFixed(10);let s=c.length-1;if(c[s]!=="0")return c;do s--;while(c[s]==="0");return c.substring(0,c[s]==="."?s:s+1)}function r(b){if(b[4]===0&&b[5]===0){if(b[1]===0&&b[2]===0)return b[0]===1&&b[3]===1?"":`scale(${a(b[0])} ${a(b[3])})`;if(b[0]===b[3]&&b[1]===-b[2]){const c=Math.acos(b[0])*180/Math.PI;return`rotate(${a(c)})`}}else if(b[0]===1&&b[1]===0&&b[2]===0&&b[3]===1)return`translate(${a(b[4])} ${a(b[5])})`;return`matrix(${a(b[0])} ${a(b[1])} ${a(b[2])} ${a(b[3])} ${a(b[4])} ${a(b[5])})`}let o=0,m=0,v=0;class A{constructor(c,s){let x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;(0,p.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new p.DOMSVGFactory,this.current=new h,this.transformMatrix=y.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=c,this.objs=s,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!x,this._operatorIdMapping=[];for(const T in y.OPS)this._operatorIdMapping[y.OPS[T]]=T}getObject(c){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return typeof c=="string"?c.startsWith("g_")?this.commonObjs.get(c):this.objs.get(c):s}save(){this.transformStack.push(this.transformMatrix);const c=this.current;this.extraStack.push(c),this.current=c.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(c){this.save(),this.executeOpTree(c),this.restore()}loadDependencies(c){const s=c.fnArray,x=c.argsArray;for(let T=0,S=s.length;T{I.get(D,Q)});this.current.dependencies.push(_)}return Promise.all(this.current.dependencies)}transform(c,s,x,T,S,D){const I=[c,s,x,T,S,D];this.transformMatrix=y.Util.transform(this.transformMatrix,I),this.tgrp=null}getSVG(c,s){this.viewport=s;const x=this._initialize(s);return this.loadDependencies(c).then(()=>(this.transformMatrix=y.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(c)),x))}convertOpList(c){const s=this._operatorIdMapping,x=c.argsArray,T=c.fnArray,S=[];for(let D=0,I=T.length;D0&&(this.current.lineWidth=c)}setLineCap(c){this.current.lineCap=e[c]}setLineJoin(c){this.current.lineJoin=i[c]}setMiterLimit(c){this.current.miterLimit=c}setStrokeAlpha(c){this.current.strokeAlpha=c}setStrokeRGBColor(c,s,x){this.current.strokeColor=y.Util.makeHexColor(c,s,x)}setFillAlpha(c){this.current.fillAlpha=c}setFillRGBColor(c,s,x){this.current.fillColor=y.Util.makeHexColor(c,s,x),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(c){this.current.strokeColor=this._makeColorN_Pattern(c)}setFillColorN(c){this.current.fillColor=this._makeColorN_Pattern(c)}shadingFill(c){const{width:s,height:x}=this.viewport,T=y.Util.inverseTransform(this.transformMatrix),[S,D,I,_]=y.Util.getAxialAlignedBoundingBox([0,0,s,x],T),Q=this.svgFactory.createElement("svg:rect");Q.setAttributeNS(null,"x",S),Q.setAttributeNS(null,"y",D),Q.setAttributeNS(null,"width",I-S),Q.setAttributeNS(null,"height",_-D),Q.setAttributeNS(null,"fill",this._makeShadingPattern(c)),this.current.fillAlpha<1&&Q.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(Q)}_makeColorN_Pattern(c){return c[0]==="TilingPattern"?this._makeTilingPattern(c):this._makeShadingPattern(c)}_makeTilingPattern(c){const s=c[1],x=c[2],T=c[3]||y.IDENTITY_MATRIX,[S,D,I,_]=c[4],Q=c[5],W=c[6],j=c[7],he=`shading${v++}`,[Y,z,ee,oe]=y.Util.normalizeRect([...y.Util.applyTransform([S,D],T),...y.Util.applyTransform([I,_],T)]),[ye,Pe]=y.Util.singularValueDecompose2dScale(T),L=Q*ye,P=W*Pe,M=this.svgFactory.createElement("svg:pattern");M.setAttributeNS(null,"id",he),M.setAttributeNS(null,"patternUnits","userSpaceOnUse"),M.setAttributeNS(null,"width",L),M.setAttributeNS(null,"height",P),M.setAttributeNS(null,"x",`${Y}`),M.setAttributeNS(null,"y",`${z}`);const E=this.svg,R=this.transformMatrix,O=this.current.fillColor,B=this.current.strokeColor,F=this.svgFactory.create(ee-Y,oe-z);if(this.svg=F,this.transformMatrix=T,j===2){const Z=y.Util.makeHexColor(...s);this.current.fillColor=Z,this.current.strokeColor=Z}return this.executeOpTree(this.convertOpList(x)),this.svg=E,this.transformMatrix=R,this.current.fillColor=O,this.current.strokeColor=B,M.append(F.childNodes[0]),this.defs.append(M),`url(#${he})`}_makeShadingPattern(c){switch(typeof c=="string"&&(c=this.objs.get(c)),c[0]){case"RadialAxial":const s=`shading${v++}`,x=c[3];let T;switch(c[1]){case"axial":const S=c[4],D=c[5];T=this.svgFactory.createElement("svg:linearGradient"),T.setAttributeNS(null,"id",s),T.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),T.setAttributeNS(null,"x1",S[0]),T.setAttributeNS(null,"y1",S[1]),T.setAttributeNS(null,"x2",D[0]),T.setAttributeNS(null,"y2",D[1]);break;case"radial":const I=c[4],_=c[5],Q=c[6],W=c[7];T=this.svgFactory.createElement("svg:radialGradient"),T.setAttributeNS(null,"id",s),T.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),T.setAttributeNS(null,"cx",_[0]),T.setAttributeNS(null,"cy",_[1]),T.setAttributeNS(null,"r",W),T.setAttributeNS(null,"fx",I[0]),T.setAttributeNS(null,"fy",I[1]),T.setAttributeNS(null,"fr",Q);break;default:throw new Error(`Unknown RadialAxial type: ${c[1]}`)}for(const S of x){const D=this.svgFactory.createElement("svg:stop");D.setAttributeNS(null,"offset",S[0]),D.setAttributeNS(null,"stop-color",S[1]),T.append(D)}return this.defs.append(T),`url(#${s})`;case"Mesh":return(0,y.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${c[0]}`)}}setDash(c,s){this.current.dashArray=c,this.current.dashPhase=s}constructPath(c,s){const x=this.current;let T=x.x,S=x.y,D=[],I=0;for(const _ of c)switch(_|0){case y.OPS.rectangle:T=s[I++],S=s[I++];const Q=s[I++],W=s[I++],j=T+Q,he=S+W;D.push("M",a(T),a(S),"L",a(j),a(S),"L",a(j),a(he),"L",a(T),a(he),"Z");break;case y.OPS.moveTo:T=s[I++],S=s[I++],D.push("M",a(T),a(S));break;case y.OPS.lineTo:T=s[I++],S=s[I++],D.push("L",a(T),a(S));break;case y.OPS.curveTo:T=s[I+4],S=s[I+5],D.push("C",a(s[I]),a(s[I+1]),a(s[I+2]),a(s[I+3]),a(T),a(S)),I+=6;break;case y.OPS.curveTo2:D.push("C",a(T),a(S),a(s[I]),a(s[I+1]),a(s[I+2]),a(s[I+3])),T=s[I+2],S=s[I+3],I+=4;break;case y.OPS.curveTo3:T=s[I+2],S=s[I+3],D.push("C",a(s[I]),a(s[I+1]),a(T),a(S),a(T),a(S)),I+=4;break;case y.OPS.closePath:D.push("Z");break}D=D.join(" "),x.path&&c.length>0&&c[0]!==y.OPS.rectangle&&c[0]!==y.OPS.moveTo?D=x.path.getAttributeNS(null,"d")+D:(x.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(x.path)),x.path.setAttributeNS(null,"d",D),x.path.setAttributeNS(null,"fill","none"),x.element=x.path,x.setCurrentPoint(T,S)}endPath(){const c=this.current;if(c.path=null,!this.pendingClip)return;if(!c.element){this.pendingClip=null;return}const s=`clippath${o++}`,x=this.svgFactory.createElement("svg:clipPath");x.setAttributeNS(null,"id",s),x.setAttributeNS(null,"transform",r(this.transformMatrix));const T=c.element.cloneNode(!0);if(this.pendingClip==="evenodd"?T.setAttributeNS(null,"clip-rule","evenodd"):T.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,x.append(T),this.defs.append(x),c.activeClipUrl){c.clipGroup=null;for(const S of this.extraStack)S.clipGroup=null;x.setAttributeNS(null,"clip-path",c.activeClipUrl)}c.activeClipUrl=`url(#${s})`,this.tgrp=null}clip(c){this.pendingClip=c}closePath(){const c=this.current;if(c.path){const s=`${c.path.getAttributeNS(null,"d")}Z`;c.path.setAttributeNS(null,"d",s)}}setLeading(c){this.current.leading=-c}setTextRise(c){this.current.textRise=c}setTextRenderingMode(c){this.current.textRenderingMode=c}setHScale(c){this.current.textHScale=c/100}setRenderingIntent(c){}setFlatness(c){}setGState(c){for(const[s,x]of c)switch(s){case"LW":this.setLineWidth(x);break;case"LC":this.setLineCap(x);break;case"LJ":this.setLineJoin(x);break;case"ML":this.setMiterLimit(x);break;case"D":this.setDash(x[0],x[1]);break;case"RI":this.setRenderingIntent(x);break;case"FL":this.setFlatness(x);break;case"Font":this.setFont(x);break;case"CA":this.setStrokeAlpha(x);break;case"ca":this.setFillAlpha(x);break;default:(0,y.warn)(`Unimplemented graphic state operator ${s}`);break}}fill(){const c=this.current;c.element&&(c.element.setAttributeNS(null,"fill",c.fillColor),c.element.setAttributeNS(null,"fill-opacity",c.fillAlpha),this.endPath())}stroke(){const c=this.current;c.element&&(this._setStrokeAttributes(c.element),c.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(c){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const x=this.current;let T=x.dashArray;s!==1&&T.length>0&&(T=T.map(function(S){return s*S})),c.setAttributeNS(null,"stroke",x.strokeColor),c.setAttributeNS(null,"stroke-opacity",x.strokeAlpha),c.setAttributeNS(null,"stroke-miterlimit",a(x.miterLimit)),c.setAttributeNS(null,"stroke-linecap",x.lineCap),c.setAttributeNS(null,"stroke-linejoin",x.lineJoin),c.setAttributeNS(null,"stroke-width",a(s*x.lineWidth)+"px"),c.setAttributeNS(null,"stroke-dasharray",T.map(a).join(" ")),c.setAttributeNS(null,"stroke-dashoffset",a(s*x.dashPhase)+"px")}eoFill(){var c;(c=this.current.element)==null||c.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){var c;(c=this.current.element)==null||c.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const c=this.svgFactory.createElement("svg:rect");c.setAttributeNS(null,"x","0"),c.setAttributeNS(null,"y","0"),c.setAttributeNS(null,"width","1px"),c.setAttributeNS(null,"height","1px"),c.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(c)}paintImageXObject(c){const s=this.getObject(c);if(!s){(0,y.warn)(`Dependent image with object ID ${c} is not ready yet`);return}this.paintInlineImageXObject(s)}paintInlineImageXObject(c,s){const x=c.width,T=c.height,S=d(c,this.forceDataSchema,!!s),D=this.svgFactory.createElement("svg:rect");D.setAttributeNS(null,"x","0"),D.setAttributeNS(null,"y","0"),D.setAttributeNS(null,"width",a(x)),D.setAttributeNS(null,"height",a(T)),this.current.element=D,this.clip("nonzero");const I=this.svgFactory.createElement("svg:image");I.setAttributeNS(g,"xlink:href",S),I.setAttributeNS(null,"x","0"),I.setAttributeNS(null,"y",a(-T)),I.setAttributeNS(null,"width",a(x)+"px"),I.setAttributeNS(null,"height",a(T)+"px"),I.setAttributeNS(null,"transform",`scale(${a(1/x)} ${a(-1/T)})`),s?s.append(I):this._ensureTransformGroup().append(I)}paintImageMaskXObject(c){const s=this.getObject(c.data,c);if(s.bitmap){(0,y.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");return}const x=this.current,T=s.width,S=s.height,D=x.fillColor;x.maskId=`mask${m++}`;const I=this.svgFactory.createElement("svg:mask");I.setAttributeNS(null,"id",x.maskId);const _=this.svgFactory.createElement("svg:rect");_.setAttributeNS(null,"x","0"),_.setAttributeNS(null,"y","0"),_.setAttributeNS(null,"width",a(T)),_.setAttributeNS(null,"height",a(S)),_.setAttributeNS(null,"fill",D),_.setAttributeNS(null,"mask",`url(#${x.maskId})`),this.defs.append(I),this._ensureTransformGroup().append(_),this.paintInlineImageXObject(s,I)}paintFormXObjectBegin(c,s){if(Array.isArray(c)&&c.length===6&&this.transform(c[0],c[1],c[2],c[3],c[4],c[5]),s){const x=s[2]-s[0],T=s[3]-s[1],S=this.svgFactory.createElement("svg:rect");S.setAttributeNS(null,"x",s[0]),S.setAttributeNS(null,"y",s[1]),S.setAttributeNS(null,"width",a(x)),S.setAttributeNS(null,"height",a(T)),this.current.element=S,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(c){const s=this.svgFactory.create(c.width,c.height),x=this.svgFactory.createElement("svg:defs");s.append(x),this.defs=x;const T=this.svgFactory.createElement("svg:g");return T.setAttributeNS(null,"transform",r(c.transform)),s.append(T),this.svg=T,s}_ensureClipGroup(){if(!this.current.clipGroup){const c=this.svgFactory.createElement("svg:g");c.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(c),this.current.clipGroup=c}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",r(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}w.SVGGraphics=A},(N,w,t)=>{var p=t(3),y=t(188),k=t(193);p({target:"Array",proto:!0},{group:function(g){var e=arguments.length>1?arguments[1]:void 0;return y(this,g,e)}}),k("group")},(N,w,t)=>{var p=t(99),y=t(14),k=t(13),u=t(40),g=t(18),e=t(64),i=t(189),n=t(108),d=Array,h=y([].push);N.exports=function(f,a,r,o){for(var m=u(f),v=k(m),A=p(a,r),b=i(null),c=e(v),s=0,x,T,S;c>s;s++)S=v[s],T=g(A(S,s,m)),T in b?h(b[T],S):b[T]=[S];if(o&&(x=o(m),x!==d))for(T in b)b[T]=n(x,b[T]);return b}},(N,w,t)=>{var p=t(47),y=t(190),k=t(66),u=t(55),g=t(192),e=t(43),i=t(54),n=">",d="<",h="prototype",f="script",a=i("IE_PROTO"),r=function(){},o=function(c){return d+f+n+c+d+"/"+f+n},m=function(c){c.write(o("")),c.close();var s=c.parentWindow.Object;return c=null,s},v=function(){var c=e("iframe"),s="java"+f+":",x;return c.style.display="none",g.appendChild(c),c.src=String(s),x=c.contentWindow.document,x.open(),x.write(o("document.F=Object")),x.close(),x.F},A,b=function(){try{A=new ActiveXObject("htmlfile")}catch{}b=typeof document<"u"?document.domain&&A?m(A):v():m(A);for(var c=k.length;c--;)delete b[h][k[c]];return b()};u[a]=!0,N.exports=Object.create||function(s,x){var T;return s!==null?(r[h]=p(s),T=new r,r[h]=null,T[a]=s):T=b(),x===void 0?T:y.f(T,x)}},(N,w,t)=>{var p=t(6),y=t(46),k=t(45),u=t(47),g=t(12),e=t(191);w.f=p&&!y?Object.defineProperties:function(n,d){u(n);for(var h=g(d),f=e(d),a=f.length,r=0,o;a>r;)k.f(n,o=f[r++],h[o]);return n}},(N,w,t)=>{var p=t(59),y=t(66);N.exports=Object.keys||function(u){return p(u,y)}},(N,w,t)=>{var p=t(24);N.exports=p("document","documentElement")},(N,w,t)=>{var p=t(34),y=t(189),k=t(45).f,u=p("unscopables"),g=Array.prototype;g[u]===void 0&&k(g,u,{configurable:!0,value:y(null)}),N.exports=function(e){g[u][e]=!0}},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.XfaText=void 0,t(89);class p{static textContent(k){const u=[],g={items:u,styles:Object.create(null)};function e(i){var h;if(!i)return;let n=null;const d=i.name;if(d==="#text")n=i.value;else if(p.shouldBuildText(d))(h=i==null?void 0:i.attributes)!=null&&h.textContent?n=i.attributes.textContent:i.value&&(n=i.value);else return;if(n!==null&&u.push({str:n}),!!i.children)for(const f of i.children)e(f)}return e(k),g}static shouldBuildText(k){return!(k==="textarea"||k==="input"||k==="option"||k==="select")}}w.XfaText=p},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.TextLayerRenderTask=void 0,w.renderTextLayer=r,w.updateTextLayer=o,t(89),t(2);var p=t(1),y=t(168);const k=1e5,u=30,g=.8,e=new Map;function i(m,v){let A;if(v&&p.FeatureTest.isOffscreenCanvasSupported)A=new OffscreenCanvas(m,m).getContext("2d",{alpha:!1});else{const b=document.createElement("canvas");b.width=b.height=m,A=b.getContext("2d",{alpha:!1})}return A}function n(m,v){const A=e.get(m);if(A)return A;const b=i(u,v);b.font=`${u}px ${m}`;const c=b.measureText("");let s=c.fontBoundingBoxAscent,x=Math.abs(c.fontBoundingBoxDescent);if(s){const S=s/(s+x);return e.set(m,S),b.canvas.width=b.canvas.height=0,S}b.strokeStyle="red",b.clearRect(0,0,u,u),b.strokeText("g",0,0);let T=b.getImageData(0,0,u,u).data;x=0;for(let S=T.length-1-3;S>=0;S-=4)if(T[S]>0){x=Math.ceil(S/4/u);break}b.clearRect(0,0,u,u),b.strokeText("A",0,u),T=b.getImageData(0,0,u,u).data,s=0;for(let S=0,D=T.length;S0){s=u-Math.floor(S/4/u);break}if(b.canvas.width=b.canvas.height=0,s){const S=s/(s+x);return e.set(m,S),S}return e.set(m,g),g}function d(m,v,A){const b=document.createElement("span"),c={angle:0,canvasWidth:0,hasText:v.str!=="",hasEOL:v.hasEOL,fontSize:0};m._textDivs.push(b);const s=p.Util.transform(m._transform,v.transform);let x=Math.atan2(s[1],s[0]);const T=A[v.fontName];T.vertical&&(x+=Math.PI/2);const S=Math.hypot(s[2],s[3]),D=S*n(T.fontFamily,m._isOffscreenCanvasSupported);let I,_;x===0?(I=s[4],_=s[5]-D):(I=s[4]+D*Math.sin(x),_=s[5]-D*Math.cos(x));const Q="calc(var(--scale-factor)*",W=b.style;m._container===m._rootContainer?(W.left=`${(100*I/m._pageWidth).toFixed(2)}%`,W.top=`${(100*_/m._pageHeight).toFixed(2)}%`):(W.left=`${Q}${I.toFixed(2)}px)`,W.top=`${Q}${_.toFixed(2)}px)`),W.fontSize=`${Q}${S.toFixed(2)}px)`,W.fontFamily=T.fontFamily,c.fontSize=S,b.setAttribute("role","presentation"),b.textContent=v.str,b.dir=v.dir,m._fontInspectorEnabled&&(b.dataset.fontName=v.fontName),x!==0&&(c.angle=x*(180/Math.PI));let j=!1;if(v.str.length>1)j=!0;else if(v.str!==" "&&v.transform[0]!==v.transform[3]){const he=Math.abs(v.transform[0]),Y=Math.abs(v.transform[3]);he!==Y&&Math.max(he,Y)/Math.min(he,Y)>1.5&&(j=!0)}j&&(c.canvasWidth=T.vertical?v.height:v.width),m._textDivProperties.set(b,c),m._isReadableStream&&m._layoutText(b)}function h(m){const{div:v,scale:A,properties:b,ctx:c,prevFontSize:s,prevFontFamily:x}=m,{style:T}=v;let S="";if(b.canvasWidth!==0&&b.hasText){const{fontFamily:D}=T,{canvasWidth:I,fontSize:_}=b;(s!==_||x!==D)&&(c.font=`${_*A}px ${D}`,m.prevFontSize=_,m.prevFontFamily=D);const{width:Q}=c.measureText(v.textContent);Q>0&&(S=`scaleX(${I*A/Q})`)}b.angle!==0&&(S=`rotate(${b.angle}deg) ${S}`),S.length>0&&(T.transform=S)}function f(m){if(m._canceled)return;const v=m._textDivs,A=m._capability;if(v.length>k){A.resolve();return}if(!m._isReadableStream)for(const c of v)m._layoutText(c);A.resolve()}class a{constructor(v){var W;let{textContentSource:A,container:b,viewport:c,textDivs:s,textDivProperties:x,textContentItemsStr:T,isOffscreenCanvasSupported:S}=v;this._textContentSource=A,this._isReadableStream=A instanceof ReadableStream,this._container=this._rootContainer=b,this._textDivs=s||[],this._textContentItemsStr=T||[],this._isOffscreenCanvasSupported=S,this._fontInspectorEnabled=!!((W=globalThis.FontInspector)!=null&&W.enabled),this._reader=null,this._textDivProperties=x||new WeakMap,this._canceled=!1,this._capability=new p.PromiseCapability,this._layoutTextParams={prevFontSize:null,prevFontFamily:null,div:null,scale:c.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:i(0,S)};const{pageWidth:D,pageHeight:I,pageX:_,pageY:Q}=c.rawDims;this._transform=[1,0,0,-1,-_,Q+I],this._pageWidth=D,this._pageHeight=I,(0,y.setLayerDimensions)(b,c),this._capability.promise.finally(()=>{this._layoutTextParams=null}).catch(()=>{})}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new p.AbortException("TextLayer task cancelled.")).catch(()=>{}),this._reader=null),this._capability.reject(new p.AbortException("TextLayer task cancelled."))}_processItems(v,A){for(const b of v){if(b.str===void 0){if(b.type==="beginMarkedContentProps"||b.type==="beginMarkedContent"){const c=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),b.id!==null&&this._container.setAttribute("id",`${b.id}`),c.append(this._container)}else b.type==="endMarkedContent"&&(this._container=this._container.parentNode);continue}this._textContentItemsStr.push(b.str),d(this,b,A)}}_layoutText(v){const A=this._layoutTextParams.properties=this._textDivProperties.get(v);if(this._layoutTextParams.div=v,h(this._layoutTextParams),A.hasText&&this._container.append(v),A.hasEOL){const b=document.createElement("br");b.setAttribute("role","presentation"),this._container.append(b)}}_render(){const v=new p.PromiseCapability;let A=Object.create(null);if(this._isReadableStream){const b=()=>{this._reader.read().then(c=>{let{value:s,done:x}=c;if(x){v.resolve();return}Object.assign(A,s.styles),this._processItems(s.items,A),b()},v.reject)};this._reader=this._textContentSource.getReader(),b()}else if(this._textContentSource){const{items:b,styles:c}=this._textContentSource;this._processItems(b,c),v.resolve()}else throw new Error('No "textContentSource" parameter specified.');v.promise.then(()=>{A=null,f(this)},this._capability.reject)}}w.TextLayerRenderTask=a;function r(m){!m.textContentSource&&(m.textContent||m.textContentStream)&&((0,y.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),m.textContentSource=m.textContent||m.textContentStream);const{container:v,viewport:A}=m,b=getComputedStyle(v),c=b.getPropertyValue("visibility"),s=parseFloat(b.getPropertyValue("--scale-factor"));c==="visible"&&(!s||Math.abs(s-A.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 x=new a(m);return x._render(),x}function o(m){let{container:v,viewport:A,textDivs:b,textDivProperties:c,isOffscreenCanvasSupported:s,mustRotate:x=!0,mustRescale:T=!0}=m;if(x&&(0,y.setLayerDimensions)(v,{rotation:A.rotation}),T){const S=i(0,s),I={prevFontSize:null,prevFontFamily:null,div:null,scale:A.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:S};for(const _ of b)I.properties=c.get(_),I.div=_,h(I)}}},(N,w,t)=>{var n,d,h,f,a,r,o,m,v,A,b,pn,s,Ft,T,gn,D,mn;Object.defineProperty(w,"__esModule",{value:!0}),w.AnnotationEditorLayer=void 0,t(125),t(136),t(138),t(141),t(143),t(145),t(147);var p=t(1),y=t(164),k=t(197),u=t(202),g=t(168),e=t(203);const _=class _{constructor(W){$(this,b);$(this,s);$(this,T);$(this,D);$(this,n,void 0);$(this,d,!1);$(this,h,null);$(this,f,this.pointerup.bind(this));$(this,a,this.pointerdown.bind(this));$(this,r,new Map);$(this,o,!1);$(this,m,!1);$(this,v,!1);$(this,A,void 0);let{uiManager:j,pageIndex:he,div:Y,accessibilityManager:z,annotationLayer:ee,viewport:oe,l10n:ye}=W;const Pe=[k.FreeTextEditor,u.InkEditor,e.StampEditor];if(!_._initialized){_._initialized=!0;for(const L of Pe)L.initialize(ye)}j.registerEditorTypes(Pe),le(this,A,j),this.pageIndex=he,this.div=Y,le(this,n,z),le(this,h,ee),this.viewport=oe,l(this,A).addLayer(this)}get isEmpty(){return l(this,r).size===0}updateToolbar(W){l(this,A).updateToolbar(W)}updateMode(){let W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:l(this,A).getMode();J(this,D,mn).call(this),W===p.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),W!==p.AnnotationEditorType.NONE&&(this.div.classList.toggle("freeTextEditing",W===p.AnnotationEditorType.FREETEXT),this.div.classList.toggle("inkEditing",W===p.AnnotationEditorType.INK),this.div.classList.toggle("stampEditing",W===p.AnnotationEditorType.STAMP),this.div.hidden=!1)}addInkEditorIfNeeded(W){if(!W&&l(this,A).getMode()!==p.AnnotationEditorType.INK)return;if(!W){for(const he of l(this,r).values())if(he.isEmpty()){he.setInBackground();return}}J(this,s,Ft).call(this,{offsetX:0,offsetY:0},!1).setInBackground()}setEditingState(W){l(this,A).setEditingState(W)}addCommands(W){l(this,A).addCommands(W)}enable(){this.div.style.pointerEvents="auto";const W=new Set;for(const he of l(this,r).values())he.enableEditing(),he.annotationElementId&&W.add(he.annotationElementId);if(!l(this,h))return;const j=l(this,h).getEditableAnnotations();for(const he of j){if(he.hide(),l(this,A).isDeletedAnnotationElement(he.data.id)||W.has(he.data.id))continue;const Y=this.deserialize(he);Y&&(this.addOrRebuild(Y),Y.enableEditing())}}disable(){var j;le(this,v,!0),this.div.style.pointerEvents="none";const W=new Set;for(const he of l(this,r).values()){if(he.disableEditing(),!he.annotationElementId||he.serialize()!==null){W.add(he.annotationElementId);continue}(j=this.getEditableAnnotation(he.annotationElementId))==null||j.show(),he.remove()}if(l(this,h)){const he=l(this,h).getEditableAnnotations();for(const Y of he){const{id:z}=Y.data;W.has(z)||l(this,A).isDeletedAnnotationElement(z)||Y.show()}}J(this,D,mn).call(this),this.isEmpty&&(this.div.hidden=!0),le(this,v,!1)}getEditableAnnotation(W){var j;return((j=l(this,h))==null?void 0:j.getEditableAnnotation(W))||null}setActiveEditor(W){l(this,A).getActive()!==W&&l(this,A).setActiveEditor(W)}enableClick(){this.div.addEventListener("pointerdown",l(this,a)),this.div.addEventListener("pointerup",l(this,f))}disableClick(){this.div.removeEventListener("pointerdown",l(this,a)),this.div.removeEventListener("pointerup",l(this,f))}attach(W){l(this,r).set(W.id,W);const{annotationElementId:j}=W;j&&l(this,A).isDeletedAnnotationElement(j)&&l(this,A).removeDeletedAnnotationElement(W)}detach(W){var j;l(this,r).delete(W.id),(j=l(this,n))==null||j.removePointerInTextLayer(W.contentDiv),!l(this,v)&&W.annotationElementId&&l(this,A).addDeletedAnnotationElement(W)}remove(W){this.detach(W),l(this,A).removeEditor(W),W.div.contains(document.activeElement)&&setTimeout(()=>{l(this,A).focusMainContainer()},0),W.div.remove(),W.isAttachedToDOM=!1,l(this,m)||this.addInkEditorIfNeeded(!1)}changeParent(W){var j;W.parent!==this&&(W.annotationElementId&&(l(this,A).addDeletedAnnotationElement(W.annotationElementId),y.AnnotationEditor.deleteAnnotationElement(W),W.annotationElementId=null),this.attach(W),(j=W.parent)==null||j.detach(W),W.setParent(this),W.div&&W.isAttachedToDOM&&(W.div.remove(),this.div.append(W.div)))}add(W){if(this.changeParent(W),l(this,A).addEditor(W),this.attach(W),!W.isAttachedToDOM){const j=W.render();this.div.append(j),W.isAttachedToDOM=!0}W.fixAndSetPosition(),W.onceAdded(),l(this,A).addToAnnotationStorage(W)}moveEditorInDOM(W){var he;if(!W.isAttachedToDOM)return;const{activeElement:j}=document;W.div.contains(j)&&(W._focusEventsAllowed=!1,setTimeout(()=>{W.div.contains(document.activeElement)?W._focusEventsAllowed=!0:(W.div.addEventListener("focusin",()=>{W._focusEventsAllowed=!0},{once:!0}),j.focus())},0)),W._structTreeParentId=(he=l(this,n))==null?void 0:he.moveElementInDOM(this.div,W.div,W.contentDiv,!0)}addOrRebuild(W){W.needsToBeRebuilt()?W.rebuild():this.add(W)}addUndoableEditor(W){const j=()=>W._uiManager.rebuild(W),he=()=>{W.remove()};this.addCommands({cmd:j,undo:he,mustExec:!1})}getNextId(){return l(this,A).getId()}pasteEditor(W,j){l(this,A).updateToolbar(W),l(this,A).updateMode(W);const{offsetX:he,offsetY:Y}=J(this,T,gn).call(this),z=this.getNextId(),ee=J(this,b,pn).call(this,{parent:this,id:z,x:he,y:Y,uiManager:l(this,A),isCentered:!0,...j});ee&&this.add(ee)}deserialize(W){switch(W.annotationType??W.annotationEditorType){case p.AnnotationEditorType.FREETEXT:return k.FreeTextEditor.deserialize(W,this,l(this,A));case p.AnnotationEditorType.INK:return u.InkEditor.deserialize(W,this,l(this,A));case p.AnnotationEditorType.STAMP:return e.StampEditor.deserialize(W,this,l(this,A))}return null}addNewEditor(){J(this,s,Ft).call(this,J(this,T,gn).call(this),!0)}setSelected(W){l(this,A).setSelected(W)}toggleSelected(W){l(this,A).toggleSelected(W)}isSelected(W){return l(this,A).isSelected(W)}unselect(W){l(this,A).unselect(W)}pointerup(W){const{isMac:j}=p.FeatureTest.platform;if(!(W.button!==0||W.ctrlKey&&j)&&W.target===this.div&&l(this,o)){if(le(this,o,!1),!l(this,d)){le(this,d,!0);return}if(l(this,A).getMode()===p.AnnotationEditorType.STAMP){l(this,A).unselectAll();return}J(this,s,Ft).call(this,W,!1)}}pointerdown(W){if(l(this,o)){le(this,o,!1);return}const{isMac:j}=p.FeatureTest.platform;if(W.button!==0||W.ctrlKey&&j||W.target!==this.div)return;le(this,o,!0);const he=l(this,A).getActive();le(this,d,!he||he.isEmpty())}findNewParent(W,j,he){const Y=l(this,A).findParent(j,he);return Y===null||Y===this?!1:(Y.changeParent(W),!0)}destroy(){var W,j;((W=l(this,A).getActive())==null?void 0:W.parent)===this&&(l(this,A).commitOrRemove(),l(this,A).setActiveEditor(null));for(const he of l(this,r).values())(j=l(this,n))==null||j.removePointerInTextLayer(he.contentDiv),he.setParent(null),he.isAttachedToDOM=!1,he.div.remove();this.div=null,l(this,r).clear(),l(this,A).removeLayer(this)}render(W){let{viewport:j}=W;this.viewport=j,(0,g.setLayerDimensions)(this.div,j);for(const he of l(this,A).getEditors(this.pageIndex))this.add(he);this.updateMode()}update(W){let{viewport:j}=W;l(this,A).commitOrRemove(),this.viewport=j,(0,g.setLayerDimensions)(this.div,{rotation:j.rotation}),this.updateMode()}get pageDimensions(){const{pageWidth:W,pageHeight:j}=this.viewport.rawDims;return[W,j]}};n=new WeakMap,d=new WeakMap,h=new WeakMap,f=new WeakMap,a=new WeakMap,r=new WeakMap,o=new WeakMap,m=new WeakMap,v=new WeakMap,A=new WeakMap,b=new WeakSet,pn=function(W){switch(l(this,A).getMode()){case p.AnnotationEditorType.FREETEXT:return new k.FreeTextEditor(W);case p.AnnotationEditorType.INK:return new u.InkEditor(W);case p.AnnotationEditorType.STAMP:return new e.StampEditor(W)}return null},s=new WeakSet,Ft=function(W,j){const he=this.getNextId(),Y=J(this,b,pn).call(this,{parent:this,id:he,x:W.offsetX,y:W.offsetY,uiManager:l(this,A),isCentered:j});return Y&&this.add(Y),Y},T=new WeakSet,gn=function(){const{x:W,y:j,width:he,height:Y}=this.div.getBoundingClientRect(),z=Math.max(0,W),ee=Math.max(0,j),oe=Math.min(window.innerWidth,W+he),ye=Math.min(window.innerHeight,j+Y),Pe=(z+oe)/2-W,L=(ee+ye)/2-j,[P,M]=this.viewport.rotation%180===0?[Pe,L]:[L,Pe];return{offsetX:P,offsetY:M}},D=new WeakSet,mn=function(){le(this,m,!0);for(const W of l(this,r).values())W.isEmpty()&&W.remove();le(this,m,!1)},tt(_,"_initialized",!1);let i=_;w.AnnotationEditorLayer=i},(N,w,t)=>{var e,i,n,d,h,f,a,r,o,m,ur,A,dr,c,fr,x,Et,S,vn,I,pr,Q,bn;Object.defineProperty(w,"__esModule",{value:!0}),w.FreeTextEditor=void 0,t(89);var p=t(1),y=t(165),k=t(164),u=t(198);const j=class j extends k.AnnotationEditor{constructor(z){super({...z,name:"freeTextEditor"});$(this,m);$(this,A);$(this,c);$(this,x);$(this,S);$(this,I);$(this,Q);$(this,e,this.editorDivBlur.bind(this));$(this,i,this.editorDivFocus.bind(this));$(this,n,this.editorDivInput.bind(this));$(this,d,this.editorDivKeydown.bind(this));$(this,h,void 0);$(this,f,"");$(this,a,`${this.id}-editor`);$(this,r,void 0);$(this,o,null);le(this,h,z.color||j._defaultColor||k.AnnotationEditor._defaultLineColor),le(this,r,z.fontSize||j._defaultFontSize)}static get _keyboardManager(){const z=j.prototype,ee=Pe=>Pe.isEmpty(),oe=y.AnnotationEditorUIManager.TRANSLATE_SMALL,ye=y.AnnotationEditorUIManager.TRANSLATE_BIG;return(0,p.shadow)(this,"_keyboardManager",new y.KeyboardManager([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],z.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],z.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],z._translateEmpty,{args:[-oe,0],checker:ee}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],z._translateEmpty,{args:[-ye,0],checker:ee}],[["ArrowRight","mac+ArrowRight"],z._translateEmpty,{args:[oe,0],checker:ee}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],z._translateEmpty,{args:[ye,0],checker:ee}],[["ArrowUp","mac+ArrowUp"],z._translateEmpty,{args:[0,-oe],checker:ee}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],z._translateEmpty,{args:[0,-ye],checker:ee}],[["ArrowDown","mac+ArrowDown"],z._translateEmpty,{args:[0,oe],checker:ee}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],z._translateEmpty,{args:[0,ye],checker:ee}]]))}static initialize(z){k.AnnotationEditor.initialize(z,{strings:["free_text2_default_content","editor_free_text2_aria_label"]});const ee=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(ee.getPropertyValue("--freetext-padding"))}static updateDefaultParams(z,ee){switch(z){case p.AnnotationEditorParamsType.FREETEXT_SIZE:j._defaultFontSize=ee;break;case p.AnnotationEditorParamsType.FREETEXT_COLOR:j._defaultColor=ee;break}}updateParams(z,ee){switch(z){case p.AnnotationEditorParamsType.FREETEXT_SIZE:J(this,m,ur).call(this,ee);break;case p.AnnotationEditorParamsType.FREETEXT_COLOR:J(this,A,dr).call(this,ee);break}}static get defaultPropertiesToUpdate(){return[[p.AnnotationEditorParamsType.FREETEXT_SIZE,j._defaultFontSize],[p.AnnotationEditorParamsType.FREETEXT_COLOR,j._defaultColor||k.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[p.AnnotationEditorParamsType.FREETEXT_SIZE,l(this,r)],[p.AnnotationEditorParamsType.FREETEXT_COLOR,l(this,h)]]}_translateEmpty(z,ee){this._uiManager.translateSelectedEditors(z,ee,!0)}getInitialTranslation(){const z=this.parentScale;return[-j._internalPadding*z,-(j._internalPadding+l(this,r))*z]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(p.AnnotationEditorType.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.editorDiv.addEventListener("keydown",l(this,d)),this.editorDiv.addEventListener("focus",l(this,i)),this.editorDiv.addEventListener("blur",l(this,e)),this.editorDiv.addEventListener("input",l(this,n)))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",l(this,a)),this._isDraggable=!0,this.editorDiv.removeEventListener("keydown",l(this,d)),this.editorDiv.removeEventListener("focus",l(this,i)),this.editorDiv.removeEventListener("blur",l(this,e)),this.editorDiv.removeEventListener("input",l(this,n)),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freeTextEditing"))}focusin(z){this._focusEventsAllowed&&(super.focusin(z),z.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){var z;if(this.width){J(this,Q,bn).call(this);return}this.enableEditMode(),this.editorDiv.focus(),(z=this._initialOptions)!=null&&z.isCentered&&this.center(),this._initialOptions=null}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freeTextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const z=l(this,f),ee=le(this,f,J(this,c,fr).call(this).trimEnd());if(z===ee)return;const oe=ye=>{if(le(this,f,ye),!ye){this.remove();return}J(this,S,vn).call(this),this._uiManager.rebuild(this),J(this,x,Et).call(this)};this.addCommands({cmd:()=>{oe(ee)},undo:()=>{oe(z)},mustExec:!1}),J(this,x,Et).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(z){this.enterInEditMode()}keydown(z){z.target===this.div&&z.key==="Enter"&&(this.enterInEditMode(),z.preventDefault())}editorDivKeydown(z){j._keyboardManager.exec(this,z)}editorDivFocus(z){this.isEditing=!0}editorDivBlur(z){this.isEditing=!1}editorDivInput(z){this.parent.div.classList.toggle("freeTextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let z,ee;this.width&&(z=this.x,ee=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",l(this,a)),this.enableEditing(),k.AnnotationEditor._l10nPromise.get("editor_free_text2_aria_label").then(ye=>{var Pe;return(Pe=this.editorDiv)==null?void 0:Pe.setAttribute("aria-label",ye)}),k.AnnotationEditor._l10nPromise.get("free_text2_default_content").then(ye=>{var Pe;return(Pe=this.editorDiv)==null?void 0:Pe.setAttribute("default-content",ye)}),this.editorDiv.contentEditable=!0;const{style:oe}=this.editorDiv;if(oe.fontSize=`calc(${l(this,r)}px * var(--scale-factor))`,oe.color=l(this,h),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,y.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){const[ye,Pe]=this.parentDimensions;if(this.annotationElementId){const{position:L}=l(this,o);let[P,M]=this.getInitialTranslation();[P,M]=this.pageTranslationToScreen(P,M);const[E,R]=this.pageDimensions,[O,B]=this.pageTranslation;let F,Z;switch(this.rotation){case 0:F=z+(L[0]-O)/E,Z=ee+this.height-(L[1]-B)/R;break;case 90:F=z+(L[0]-O)/E,Z=ee-(L[1]-B)/R,[P,M]=[M,-P];break;case 180:F=z-this.width+(L[0]-O)/E,Z=ee-(L[1]-B)/R,[P,M]=[-P,-M];break;case 270:F=z+(L[0]-O-this.height*R)/E,Z=ee+(L[1]-B-this.width*E)/R,[P,M]=[-M,P];break}this.setAt(F*ye,Z*Pe,P,M)}else this.setAt(z*ye,ee*Pe,this.width*ye,this.height*Pe);J(this,S,vn).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}get contentDiv(){return this.editorDiv}static deserialize(z,ee,oe){let ye=null;if(z instanceof u.FreeTextAnnotationElement){const{data:{defaultAppearanceData:{fontSize:L,fontColor:P},rect:M,rotation:E,id:R},textContent:O,textPosition:B,parent:{page:{pageNumber:F}}}=z;if(!O||O.length===0)return null;ye=z={annotationType:p.AnnotationEditorType.FREETEXT,color:Array.from(P),fontSize:L,value:O.join(` +`),position:B,pageIndex:F-1,rect:M,rotation:E,id:R,deleted:!1}}const Pe=super.deserialize(z,ee,oe);return le(Pe,r,z.fontSize),le(Pe,h,p.Util.makeHexColor(...z.color)),le(Pe,f,z.value),Pe.annotationElementId=z.id||null,le(Pe,o,ye),Pe}serialize(){let z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};const ee=j._internalPadding*this.parentScale,oe=this.getRect(ee,ee),ye=k.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:l(this,h)),Pe={annotationType:p.AnnotationEditorType.FREETEXT,color:ye,fontSize:l(this,r),value:l(this,f),pageIndex:this.pageIndex,rect:oe,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return z?Pe:this.annotationElementId&&!J(this,I,pr).call(this,Pe)?null:(Pe.id=this.annotationElementId,Pe)}};e=new WeakMap,i=new WeakMap,n=new WeakMap,d=new WeakMap,h=new WeakMap,f=new WeakMap,a=new WeakMap,r=new WeakMap,o=new WeakMap,m=new WeakSet,ur=function(z){const ee=ye=>{this.editorDiv.style.fontSize=`calc(${ye}px * var(--scale-factor))`,this.translate(0,-(ye-l(this,r))*this.parentScale),le(this,r,ye),J(this,x,Et).call(this)},oe=l(this,r);this.addCommands({cmd:()=>{ee(z)},undo:()=>{ee(oe)},mustExec:!0,type:p.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},A=new WeakSet,dr=function(z){const ee=l(this,h);this.addCommands({cmd:()=>{le(this,h,this.editorDiv.style.color=z)},undo:()=>{le(this,h,this.editorDiv.style.color=ee)},mustExec:!0,type:p.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},c=new WeakSet,fr=function(){const z=this.editorDiv.getElementsByTagName("div");if(z.length===0)return this.editorDiv.innerText;const ee=[];for(const oe of z)ee.push(oe.innerText.replace(/\r\n?|\n/,""));return ee.join(` +`)},x=new WeakSet,Et=function(){const[z,ee]=this.parentDimensions;let oe;if(this.isAttachedToDOM)oe=this.div.getBoundingClientRect();else{const{currentLayer:ye,div:Pe}=this,L=Pe.style.display;Pe.style.display="hidden",ye.div.append(this.div),oe=Pe.getBoundingClientRect(),Pe.remove(),Pe.style.display=L}this.rotation%180===this.parentRotation%180?(this.width=oe.width/z,this.height=oe.height/ee):(this.width=oe.height/z,this.height=oe.width/ee),this.fixAndSetPosition()},S=new WeakSet,vn=function(){if(this.editorDiv.replaceChildren(),!!l(this,f))for(const z of l(this,f).split(` +`)){const ee=document.createElement("div");ee.append(z?document.createTextNode(z):document.createElement("br")),this.editorDiv.append(ee)}},I=new WeakSet,pr=function(z){const{value:ee,fontSize:oe,color:ye,rect:Pe,pageIndex:L}=l(this,o);return z.value!==ee||z.fontSize!==oe||z.rect.some((P,M)=>Math.abs(P-Pe[M])>=1)||z.color.some((P,M)=>P!==ye[M])||z.pageIndex!==L},Q=new WeakSet,bn=function(){let z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!this.annotationElementId)return;if(J(this,x,Et).call(this),!z&&(this.width===0||this.height===0)){setTimeout(()=>J(this,Q,bn).call(this,!0),0);return}const ee=j._internalPadding*this.parentScale;l(this,o).rect=this.getRect(ee,ee)},tt(j,"_freeTextDefaultContent",""),tt(j,"_internalPadding",0),tt(j,"_defaultColor",null),tt(j,"_defaultFontSize",10),tt(j,"_type","freetext");let g=j;w.FreeTextEditor=g},(N,w,t)=>{var M,R,ht,B,gr,Z,se,q,pe,te,me,ve,Re,Oe,Ie,Le,ue,ne,ce,ge,Ce,Me,Ve,mr,_e,Nt,Ke,yn,je,An,V,H,X,de,Ee,K,U,Sn,Ae,Se,we,Te,vr,ke,En;Object.defineProperty(w,"__esModule",{value:!0}),w.StampAnnotationElement=w.InkAnnotationElement=w.FreeTextAnnotationElement=w.AnnotationLayer=void 0,t(89),t(125),t(136),t(138),t(141),t(143),t(145),t(147);var p=t(1),y=t(168),k=t(163),u=t(199),g=t(200),e=t(201);const i=1e3,n=9,d=new WeakSet;function h(Be){return{width:Be[2]-Be[0],height:Be[3]-Be[1]}}class f{static create(re){switch(re.data.annotationType){case p.AnnotationType.LINK:return new r(re);case p.AnnotationType.TEXT:return new o(re);case p.AnnotationType.WIDGET:switch(re.data.fieldType){case"Tx":return new v(re);case"Btn":return re.data.radioButton?new c(re):re.data.checkBox?new b(re):new s(re);case"Ch":return new x(re);case"Sig":return new A(re)}return new m(re);case p.AnnotationType.POPUP:return new T(re);case p.AnnotationType.FREETEXT:return new D(re);case p.AnnotationType.LINE:return new I(re);case p.AnnotationType.SQUARE:return new _(re);case p.AnnotationType.CIRCLE:return new Q(re);case p.AnnotationType.POLYLINE:return new W(re);case p.AnnotationType.CARET:return new he(re);case p.AnnotationType.INK:return new Y(re);case p.AnnotationType.POLYGON:return new j(re);case p.AnnotationType.HIGHLIGHT:return new z(re);case p.AnnotationType.UNDERLINE:return new ee(re);case p.AnnotationType.SQUIGGLY:return new oe(re);case p.AnnotationType.STRIKEOUT:return new ye(re);case p.AnnotationType.STAMP:return new Pe(re);case p.AnnotationType.FILEATTACHMENT:return new L(re);default:return new a(re)}}}const E=class E{constructor(re){$(this,M,!1);let{isRenderable:C=!1,ignoreBorder:G=!1,createQuadrilaterals:ae=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.isRenderable=C,this.data=re.data,this.layer=re.layer,this.linkService=re.linkService,this.downloadManager=re.downloadManager,this.imageResourcesPath=re.imageResourcesPath,this.renderForms=re.renderForms,this.svgFactory=re.svgFactory,this.annotationStorage=re.annotationStorage,this.enableScripting=re.enableScripting,this.hasJSActions=re.hasJSActions,this._fieldObjects=re.fieldObjects,this.parent=re.parent,C&&(this.container=this._createContainer(G)),ae&&this._createQuadrilaterals()}static _hasPopupData(re){let{titleObj:C,contentsObj:G,richText:ae}=re;return!!(C!=null&&C.str||G!=null&&G.str||ae!=null&&ae.str)}get hasPopupData(){return E._hasPopupData(this.data)}_createContainer(re){const{data:C,parent:{page:G,viewport:ae}}=this,fe=document.createElement("section");fe.setAttribute("data-annotation-id",C.id),this instanceof m||(fe.tabIndex=i),fe.style.zIndex=this.parent.zIndex++,this.data.popupRef&&fe.setAttribute("aria-haspopup","dialog"),C.noRotate&&fe.classList.add("norotate");const{pageWidth:be,pageHeight:xe,pageX:De,pageY:We}=ae.rawDims;if(!C.rect||this instanceof T){const{rotation:Ye}=C;return!C.hasOwnCanvas&&Ye!==0&&this.setRotation(Ye,fe),fe}const{width:Fe,height:Ze}=h(C.rect),Ge=p.Util.normalizeRect([C.rect[0],G.view[3]-C.rect[1]+G.view[1],C.rect[2],G.view[3]-C.rect[3]+G.view[1]]);if(!re&&C.borderStyle.width>0){fe.style.borderWidth=`${C.borderStyle.width}px`;const Ye=C.borderStyle.horizontalCornerRadius,Qe=C.borderStyle.verticalCornerRadius;if(Ye>0||Qe>0){const et=`calc(${Ye}px * var(--scale-factor)) / calc(${Qe}px * var(--scale-factor))`;fe.style.borderRadius=et}else if(this instanceof c){const et=`calc(${Fe}px * var(--scale-factor)) / calc(${Ze}px * var(--scale-factor))`;fe.style.borderRadius=et}switch(C.borderStyle.style){case p.AnnotationBorderStyleType.SOLID:fe.style.borderStyle="solid";break;case p.AnnotationBorderStyleType.DASHED:fe.style.borderStyle="dashed";break;case p.AnnotationBorderStyleType.BEVELED:(0,p.warn)("Unimplemented border style: beveled");break;case p.AnnotationBorderStyleType.INSET:(0,p.warn)("Unimplemented border style: inset");break;case p.AnnotationBorderStyleType.UNDERLINE:fe.style.borderBottomStyle="solid";break}const qe=C.borderColor||null;qe?(le(this,M,!0),fe.style.borderColor=p.Util.makeHexColor(qe[0]|0,qe[1]|0,qe[2]|0)):fe.style.borderWidth=0}fe.style.left=`${100*(Ge[0]-De)/be}%`,fe.style.top=`${100*(Ge[1]-We)/xe}%`;const{rotation:$e}=C;return C.hasOwnCanvas||$e===0?(fe.style.width=`${100*Fe/be}%`,fe.style.height=`${100*Ze/xe}%`):this.setRotation($e,fe),fe}setRotation(re){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.container;if(!this.data.rect)return;const{pageWidth:G,pageHeight:ae}=this.parent.viewport.rawDims,{width:fe,height:be}=h(this.data.rect);let xe,De;re%180===0?(xe=100*fe/G,De=100*be/ae):(xe=100*be/G,De=100*fe/ae),C.style.width=`${xe}%`,C.style.height=`${De}%`,C.setAttribute("data-main-rotation",(360-re)%360)}get _commonActions(){const re=(C,G,ae)=>{const fe=ae.detail[C],be=fe[0],xe=fe.slice(1);ae.target.style[G]=u.ColorConverters[`${be}_HTML`](xe),this.annotationStorage.setValue(this.data.id,{[G]:u.ColorConverters[`${be}_rgb`](xe)})};return(0,p.shadow)(this,"_commonActions",{display:C=>{const{display:G}=C.detail,ae=G%2===1;this.container.style.visibility=ae?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:ae,noPrint:G===1||G===2})},print:C=>{this.annotationStorage.setValue(this.data.id,{noPrint:!C.detail.print})},hidden:C=>{const{hidden:G}=C.detail;this.container.style.visibility=G?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:G,noView:G})},focus:C=>{setTimeout(()=>C.target.focus({preventScroll:!1}),0)},userName:C=>{C.target.title=C.detail.userName},readonly:C=>{C.target.disabled=C.detail.readonly},required:C=>{this._setRequired(C.target,C.detail.required)},bgColor:C=>{re("bgColor","backgroundColor",C)},fillColor:C=>{re("fillColor","backgroundColor",C)},fgColor:C=>{re("fgColor","color",C)},textColor:C=>{re("textColor","color",C)},borderColor:C=>{re("borderColor","borderColor",C)},strokeColor:C=>{re("strokeColor","borderColor",C)},rotation:C=>{const G=C.detail.rotation;this.setRotation(G),this.annotationStorage.setValue(this.data.id,{rotation:G})}})}_dispatchEventFromSandbox(re,C){const G=this._commonActions;for(const ae of Object.keys(C.detail)){const fe=re[ae]||G[ae];fe==null||fe(C)}}_setDefaultPropertiesFromJS(re){if(!this.enableScripting)return;const C=this.annotationStorage.getRawValue(this.data.id);if(!C)return;const G=this._commonActions;for(const[ae,fe]of Object.entries(C)){const be=G[ae];if(be){const xe={detail:{[ae]:fe},target:re};be(xe),delete C[ae]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:re}=this.data;if(!re)return;const[C,G,ae,fe]=this.data.rect;if(re.length===1){const[,{x:Qe,y:qe},{x:et,y:rt}]=re[0];if(ae===Qe&&fe===qe&&C===et&&G===rt)return}const{style:be}=this.container;let xe;if(l(this,M)){const{borderColor:Qe,borderWidth:qe}=be;be.borderWidth=0,xe=["url('data:image/svg+xml;utf8,",'',``],this.container.classList.add("hasBorder")}const De=ae-C,We=fe-G,{svgFactory:Fe}=this,Ze=Fe.createElement("svg");Ze.classList.add("quadrilateralsContainer"),Ze.setAttribute("width",0),Ze.setAttribute("height",0);const Ge=Fe.createElement("defs");Ze.append(Ge);const $e=Fe.createElement("clipPath"),Ye=`clippath_${this.data.id}`;$e.setAttribute("id",Ye),$e.setAttribute("clipPathUnits","objectBoundingBox"),Ge.append($e);for(const[,{x:Qe,y:qe},{x:et,y:rt}]of re){const nt=Fe.createElement("rect"),it=(et-C)/De,lt=(fe-qe)/We,ct=(Qe-et)/De,qn=(qe-rt)/We;nt.setAttribute("x",it),nt.setAttribute("y",lt),nt.setAttribute("width",ct),nt.setAttribute("height",qn),$e.append(nt),xe==null||xe.push(``)}l(this,M)&&(xe.push("')"),be.backgroundImage=xe.join("")),this.container.append(Ze),this.container.style.clipPath=`url(#${Ye})`}_createPopup(){const{container:re,data:C}=this;re.setAttribute("aria-haspopup","dialog");const G=new T({data:{color:C.color,titleObj:C.titleObj,modificationDate:C.modificationDate,contentsObj:C.contentsObj,richText:C.richText,parentRect:C.rect,borderStyle:0,id:`popup_${C.id}`,rotation:C.rotation},parent:this.parent,elements:[this]});this.parent.div.append(G.render())}render(){(0,p.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(re){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const G=[];if(this._fieldObjects){const ae=this._fieldObjects[re];if(ae)for(const{page:fe,id:be,exportValues:xe}of ae){if(fe===-1||be===C)continue;const De=typeof xe=="string"?xe:null,We=document.querySelector(`[data-element-id="${be}"]`);if(We&&!d.has(We)){(0,p.warn)(`_getElementsByName - element not allowed: ${be}`);continue}G.push({id:be,exportValue:De,domElement:We})}return G}for(const ae of document.getElementsByName(re)){const{exportValue:fe}=ae,be=ae.getAttribute("data-element-id");be!==C&&d.has(ae)&&G.push({id:be,exportValue:fe,domElement:ae})}return G}show(){var re;this.container&&(this.container.hidden=!1),(re=this.popup)==null||re.maybeShow()}hide(){var re;this.container&&(this.container.hidden=!0),(re=this.popup)==null||re.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const re=this.getElementsToTriggerPopup();if(Array.isArray(re))for(const C of re)C.classList.add("highlightArea");else re.classList.add("highlightArea")}_editOnDoubleClick(){const{annotationEditorType:re,data:{id:C}}=this;this.container.addEventListener("dblclick",()=>{var G;(G=this.linkService.eventBus)==null||G.dispatch("switchannotationeditormode",{source:this,mode:re,editId:C})})}};M=new WeakMap;let a=E;class r extends a{constructor(C){let G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;super(C,{isRenderable:!0,ignoreBorder:!!(G!=null&&G.ignoreBorder),createQuadrilaterals:!0});$(this,R);$(this,B);this.isTooltipOnly=C.data.isTooltipOnly}render(){const{data:C,linkService:G}=this,ae=document.createElement("a");ae.setAttribute("data-element-id",C.id);let fe=!1;return C.url?(G.addLinkAttributes(ae,C.url,C.newWindow),fe=!0):C.action?(this._bindNamedAction(ae,C.action),fe=!0):C.attachment?(this._bindAttachment(ae,C.attachment),fe=!0):C.setOCGState?(J(this,B,gr).call(this,ae,C.setOCGState),fe=!0):C.dest?(this._bindLink(ae,C.dest),fe=!0):(C.actions&&(C.actions.Action||C.actions["Mouse Up"]||C.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(ae,C),fe=!0),C.resetForm?(this._bindResetFormAction(ae,C.resetForm),fe=!0):this.isTooltipOnly&&!fe&&(this._bindLink(ae,""),fe=!0)),this.container.classList.add("linkAnnotation"),fe&&this.container.append(ae),this.container}_bindLink(C,G){C.href=this.linkService.getDestinationHash(G),C.onclick=()=>(G&&this.linkService.goToDestination(G),!1),(G||G==="")&&J(this,R,ht).call(this)}_bindNamedAction(C,G){C.href=this.linkService.getAnchorUrl(""),C.onclick=()=>(this.linkService.executeNamedAction(G),!1),J(this,R,ht).call(this)}_bindAttachment(C,G){C.href=this.linkService.getAnchorUrl(""),C.onclick=()=>{var ae;return(ae=this.downloadManager)==null||ae.openOrDownloadData(this.container,G.content,G.filename),!1},J(this,R,ht).call(this)}_bindJSAction(C,G){C.href=this.linkService.getAnchorUrl("");const ae=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const fe of Object.keys(G.actions)){const be=ae.get(fe);be&&(C[be]=()=>{var xe;return(xe=this.linkService.eventBus)==null||xe.dispatch("dispatcheventinsandbox",{source:this,detail:{id:G.id,name:fe}}),!1})}C.onclick||(C.onclick=()=>!1),J(this,R,ht).call(this)}_bindResetFormAction(C,G){const ae=C.onclick;if(ae||(C.href=this.linkService.getAnchorUrl("")),J(this,R,ht).call(this),!this._fieldObjects){(0,p.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),ae||(C.onclick=()=>!1);return}C.onclick=()=>{var Ze;ae==null||ae();const{fields:fe,refs:be,include:xe}=G,De=[];if(fe.length!==0||be.length!==0){const Ge=new Set(be);for(const $e of fe){const Ye=this._fieldObjects[$e]||[];for(const{id:Qe}of Ye)Ge.add(Qe)}for(const $e of Object.values(this._fieldObjects))for(const Ye of $e)Ge.has(Ye.id)===xe&&De.push(Ye)}else for(const Ge of Object.values(this._fieldObjects))De.push(...Ge);const We=this.annotationStorage,Fe=[];for(const Ge of De){const{id:$e}=Ge;switch(Fe.push($e),Ge.type){case"text":{const Qe=Ge.defaultValue||"";We.setValue($e,{value:Qe});break}case"checkbox":case"radiobutton":{const Qe=Ge.defaultValue===Ge.exportValues;We.setValue($e,{value:Qe});break}case"combobox":case"listbox":{const Qe=Ge.defaultValue||"";We.setValue($e,{value:Qe});break}default:continue}const Ye=document.querySelector(`[data-element-id="${$e}"]`);if(Ye){if(!d.has(Ye)){(0,p.warn)(`_bindResetFormAction - element not allowed: ${$e}`);continue}}else continue;Ye.dispatchEvent(new Event("resetform"))}return this.enableScripting&&((Ze=this.linkService.eventBus)==null||Ze.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:Fe,name:"ResetForm"}})),!1}}}R=new WeakSet,ht=function(){this.container.setAttribute("data-internal-link","")},B=new WeakSet,gr=function(C,G){C.href=this.linkService.getAnchorUrl(""),C.onclick=()=>(this.linkService.executeSetOCGState(G),!1),J(this,R,ht).call(this)};class o extends a{constructor(re){super(re,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const re=document.createElement("img");return re.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",re.alt="[{{type}} Annotation]",re.dataset.l10nId="text_annotation_type",re.dataset.l10nArgs=JSON.stringify({type:this.data.name}),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(re),this.container}}class m extends a{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}showElementAndHideCanvas(re){var C;this.data.hasOwnCanvas&&(((C=re.previousSibling)==null?void 0:C.nodeName)==="CANVAS"&&(re.previousSibling.hidden=!0),re.hidden=!1)}_getKeyModifier(re){const{isWin:C,isMac:G}=p.FeatureTest.platform;return C&&re.ctrlKey||G&&re.metaKey}_setEventListener(re,C,G,ae,fe){G.includes("mouse")?re.addEventListener(G,be=>{var xe;(xe=this.linkService.eventBus)==null||xe.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:ae,value:fe(be),shift:be.shiftKey,modifier:this._getKeyModifier(be)}})}):re.addEventListener(G,be=>{var xe;if(G==="blur"){if(!C.focused||!be.relatedTarget)return;C.focused=!1}else if(G==="focus"){if(C.focused)return;C.focused=!0}fe&&((xe=this.linkService.eventBus)==null||xe.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:ae,value:fe(be)}}))})}_setEventListeners(re,C,G,ae){var fe,be,xe;for(const[De,We]of G)(We==="Action"||(fe=this.data.actions)!=null&&fe[We])&&((We==="Focus"||We==="Blur")&&(C||(C={focused:!1})),this._setEventListener(re,C,De,We,ae),We==="Focus"&&!((be=this.data.actions)!=null&&be.Blur)?this._setEventListener(re,C,"blur","Blur",null):We==="Blur"&&!((xe=this.data.actions)!=null&&xe.Focus)&&this._setEventListener(re,C,"focus","Focus",null))}_setBackgroundColor(re){const C=this.data.backgroundColor||null;re.style.backgroundColor=C===null?"transparent":p.Util.makeHexColor(C[0],C[1],C[2])}_setTextStyle(re){const C=["left","center","right"],{fontColor:G}=this.data.defaultAppearanceData,ae=this.data.defaultAppearanceData.fontSize||n,fe=re.style;let be;const xe=2,De=We=>Math.round(10*We)/10;if(this.data.multiLine){const We=Math.abs(this.data.rect[3]-this.data.rect[1]-xe),Fe=Math.round(We/(p.LINE_FACTOR*ae))||1,Ze=We/Fe;be=Math.min(ae,De(Ze/p.LINE_FACTOR))}else{const We=Math.abs(this.data.rect[3]-this.data.rect[1]-xe);be=Math.min(ae,De(We/p.LINE_FACTOR))}fe.fontSize=`calc(${be}px * var(--scale-factor))`,fe.color=p.Util.makeHexColor(G[0],G[1],G[2]),this.data.textAlignment!==null&&(fe.textAlign=C[this.data.textAlignment])}_setRequired(re,C){C?re.setAttribute("required",!0):re.removeAttribute("required"),re.setAttribute("aria-required",C)}}class v extends m{constructor(re){const C=re.renderForms||!re.data.hasAppearance&&!!re.data.fieldValue;super(re,{isRenderable:C})}setPropertyOnSiblings(re,C,G,ae){const fe=this.annotationStorage;for(const be of this._getElementsByName(re.name,re.id))be.domElement&&(be.domElement[C]=G),fe.setValue(be.id,{[ae]:G})}render(){var ae,fe;const re=this.annotationStorage,C=this.data.id;this.container.classList.add("textWidgetAnnotation");let G=null;if(this.renderForms){const be=re.getValue(C,{value:this.data.fieldValue});let xe=be.value||"";const De=re.getValue(C,{charLimit:this.data.maxLen}).charLimit;De&&xe.length>De&&(xe=xe.slice(0,De));let We=be.formattedValue||((ae=this.data.textContent)==null?void 0:ae.join(` +`))||null;We&&this.data.comb&&(We=We.replaceAll(/\s+/g,""));const Fe={userValue:xe,formattedValue:We,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(G=document.createElement("textarea"),G.textContent=We??xe,this.data.doNotScroll&&(G.style.overflowY="hidden")):(G=document.createElement("input"),G.type="text",G.setAttribute("value",We??xe),this.data.doNotScroll&&(G.style.overflowX="hidden")),this.data.hasOwnCanvas&&(G.hidden=!0),d.add(G),G.setAttribute("data-element-id",C),G.disabled=this.data.readOnly,G.name=this.data.fieldName,G.tabIndex=i,this._setRequired(G,this.data.required),De&&(G.maxLength=De),G.addEventListener("input",Ge=>{re.setValue(C,{value:Ge.target.value}),this.setPropertyOnSiblings(G,"value",Ge.target.value,"value"),Fe.formattedValue=null}),G.addEventListener("resetform",Ge=>{const $e=this.data.defaultFieldValue??"";G.value=Fe.userValue=$e,Fe.formattedValue=null});let Ze=Ge=>{const{formattedValue:$e}=Fe;$e!=null&&(Ge.target.value=$e),Ge.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){G.addEventListener("focus",$e=>{if(Fe.focused)return;const{target:Ye}=$e;Fe.userValue&&(Ye.value=Fe.userValue),Fe.lastCommittedValue=Ye.value,Fe.commitKey=1,Fe.focused=!0}),G.addEventListener("updatefromsandbox",$e=>{this.showElementAndHideCanvas($e.target);const Ye={value(Qe){Fe.userValue=Qe.detail.value??"",re.setValue(C,{value:Fe.userValue.toString()}),Qe.target.value=Fe.userValue},formattedValue(Qe){const{formattedValue:qe}=Qe.detail;Fe.formattedValue=qe,qe!=null&&Qe.target!==document.activeElement&&(Qe.target.value=qe),re.setValue(C,{formattedValue:qe})},selRange(Qe){Qe.target.setSelectionRange(...Qe.detail.selRange)},charLimit:Qe=>{var nt;const{charLimit:qe}=Qe.detail,{target:et}=Qe;if(qe===0){et.removeAttribute("maxLength");return}et.setAttribute("maxLength",qe);let rt=Fe.userValue;!rt||rt.length<=qe||(rt=rt.slice(0,qe),et.value=Fe.userValue=rt,re.setValue(C,{value:rt}),(nt=this.linkService.eventBus)==null||nt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:C,name:"Keystroke",value:rt,willCommit:!0,commitKey:1,selStart:et.selectionStart,selEnd:et.selectionEnd}}))}};this._dispatchEventFromSandbox(Ye,$e)}),G.addEventListener("keydown",$e=>{var qe;Fe.commitKey=1;let Ye=-1;if($e.key==="Escape"?Ye=0:$e.key==="Enter"&&!this.data.multiLine?Ye=2:$e.key==="Tab"&&(Fe.commitKey=3),Ye===-1)return;const{value:Qe}=$e.target;Fe.lastCommittedValue!==Qe&&(Fe.lastCommittedValue=Qe,Fe.userValue=Qe,(qe=this.linkService.eventBus)==null||qe.dispatch("dispatcheventinsandbox",{source:this,detail:{id:C,name:"Keystroke",value:Qe,willCommit:!0,commitKey:Ye,selStart:$e.target.selectionStart,selEnd:$e.target.selectionEnd}}))});const Ge=Ze;Ze=null,G.addEventListener("blur",$e=>{var Qe;if(!Fe.focused||!$e.relatedTarget)return;Fe.focused=!1;const{value:Ye}=$e.target;Fe.userValue=Ye,Fe.lastCommittedValue!==Ye&&((Qe=this.linkService.eventBus)==null||Qe.dispatch("dispatcheventinsandbox",{source:this,detail:{id:C,name:"Keystroke",value:Ye,willCommit:!0,commitKey:Fe.commitKey,selStart:$e.target.selectionStart,selEnd:$e.target.selectionEnd}})),Ge($e)}),(fe=this.data.actions)!=null&&fe.Keystroke&&G.addEventListener("beforeinput",$e=>{var lt;Fe.lastCommittedValue=null;const{data:Ye,target:Qe}=$e,{value:qe,selectionStart:et,selectionEnd:rt}=Qe;let nt=et,it=rt;switch($e.inputType){case"deleteWordBackward":{const ct=qe.substring(0,et).match(/\w*[^\w]*$/);ct&&(nt-=ct[0].length);break}case"deleteWordForward":{const ct=qe.substring(et).match(/^[^\w]*\w*/);ct&&(it+=ct[0].length);break}case"deleteContentBackward":et===rt&&(nt-=1);break;case"deleteContentForward":et===rt&&(it+=1);break}$e.preventDefault(),(lt=this.linkService.eventBus)==null||lt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:C,name:"Keystroke",value:qe,change:Ye||"",willCommit:!1,selStart:nt,selEnd:it}})}),this._setEventListeners(G,Fe,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],$e=>$e.target.value)}if(Ze&&G.addEventListener("blur",Ze),this.data.comb){const $e=(this.data.rect[2]-this.data.rect[0])/De;G.classList.add("comb"),G.style.letterSpacing=`calc(${$e}px * var(--scale-factor) - 1ch)`}}else G=document.createElement("div"),G.textContent=this.data.fieldValue,G.style.verticalAlign="middle",G.style.display="table-cell";return this._setTextStyle(G),this._setBackgroundColor(G),this._setDefaultPropertiesFromJS(G),this.container.append(G),this.container}}class A extends m{constructor(re){super(re,{isRenderable:!!re.data.hasOwnCanvas})}}class b extends m{constructor(re){super(re,{isRenderable:re.renderForms})}render(){const re=this.annotationStorage,C=this.data,G=C.id;let ae=re.getValue(G,{value:C.exportValue===C.fieldValue}).value;typeof ae=="string"&&(ae=ae!=="Off",re.setValue(G,{value:ae})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const fe=document.createElement("input");return d.add(fe),fe.setAttribute("data-element-id",G),fe.disabled=C.readOnly,this._setRequired(fe,this.data.required),fe.type="checkbox",fe.name=C.fieldName,ae&&fe.setAttribute("checked",!0),fe.setAttribute("exportValue",C.exportValue),fe.tabIndex=i,fe.addEventListener("change",be=>{const{name:xe,checked:De}=be.target;for(const We of this._getElementsByName(xe,G)){const Fe=De&&We.exportValue===C.exportValue;We.domElement&&(We.domElement.checked=Fe),re.setValue(We.id,{value:Fe})}re.setValue(G,{value:De})}),fe.addEventListener("resetform",be=>{const xe=C.defaultFieldValue||"Off";be.target.checked=xe===C.exportValue}),this.enableScripting&&this.hasJSActions&&(fe.addEventListener("updatefromsandbox",be=>{const xe={value(De){De.target.checked=De.detail.value!=="Off",re.setValue(G,{value:De.target.checked})}};this._dispatchEventFromSandbox(xe,be)}),this._setEventListeners(fe,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],be=>be.target.checked)),this._setBackgroundColor(fe),this._setDefaultPropertiesFromJS(fe),this.container.append(fe),this.container}}class c extends m{constructor(re){super(re,{isRenderable:re.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const re=this.annotationStorage,C=this.data,G=C.id;let ae=re.getValue(G,{value:C.fieldValue===C.buttonValue}).value;typeof ae=="string"&&(ae=ae!==C.buttonValue,re.setValue(G,{value:ae}));const fe=document.createElement("input");if(d.add(fe),fe.setAttribute("data-element-id",G),fe.disabled=C.readOnly,this._setRequired(fe,this.data.required),fe.type="radio",fe.name=C.fieldName,ae&&fe.setAttribute("checked",!0),fe.tabIndex=i,fe.addEventListener("change",be=>{const{name:xe,checked:De}=be.target;for(const We of this._getElementsByName(xe,G))re.setValue(We.id,{value:!1});re.setValue(G,{value:De})}),fe.addEventListener("resetform",be=>{const xe=C.defaultFieldValue;be.target.checked=xe!=null&&xe===C.buttonValue}),this.enableScripting&&this.hasJSActions){const be=C.buttonValue;fe.addEventListener("updatefromsandbox",xe=>{const De={value:We=>{const Fe=be===We.detail.value;for(const Ze of this._getElementsByName(We.target.name)){const Ge=Fe&&Ze.id===G;Ze.domElement&&(Ze.domElement.checked=Ge),re.setValue(Ze.id,{value:Ge})}}};this._dispatchEventFromSandbox(De,xe)}),this._setEventListeners(fe,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],xe=>xe.target.checked)}return this._setBackgroundColor(fe),this._setDefaultPropertiesFromJS(fe),this.container.append(fe),this.container}}class s extends r{constructor(re){super(re,{ignoreBorder:re.data.hasAppearance})}render(){const re=super.render();re.classList.add("buttonWidgetAnnotation","pushButton"),this.data.alternativeText&&(re.title=this.data.alternativeText);const C=re.lastChild;return this.enableScripting&&this.hasJSActions&&C&&(this._setDefaultPropertiesFromJS(C),C.addEventListener("updatefromsandbox",G=>{this._dispatchEventFromSandbox({},G)})),re}}class x extends m{constructor(re){super(re,{isRenderable:re.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const re=this.annotationStorage,C=this.data.id,G=re.getValue(C,{value:this.data.fieldValue}),ae=document.createElement("select");d.add(ae),ae.setAttribute("data-element-id",C),ae.disabled=this.data.readOnly,this._setRequired(ae,this.data.required),ae.name=this.data.fieldName,ae.tabIndex=i;let fe=this.data.combo&&this.data.options.length>0;this.data.combo||(ae.size=this.data.options.length,this.data.multiSelect&&(ae.multiple=!0)),ae.addEventListener("resetform",Fe=>{const Ze=this.data.defaultFieldValue;for(const Ge of ae.options)Ge.selected=Ge.value===Ze});for(const Fe of this.data.options){const Ze=document.createElement("option");Ze.textContent=Fe.displayValue,Ze.value=Fe.exportValue,G.value.includes(Fe.exportValue)&&(Ze.setAttribute("selected",!0),fe=!1),ae.append(Ze)}let be=null;if(fe){const Fe=document.createElement("option");Fe.value=" ",Fe.setAttribute("hidden",!0),Fe.setAttribute("selected",!0),ae.prepend(Fe),be=()=>{Fe.remove(),ae.removeEventListener("input",be),be=null},ae.addEventListener("input",be)}const xe=Fe=>{const Ze=Fe?"value":"textContent",{options:Ge,multiple:$e}=ae;return $e?Array.prototype.filter.call(Ge,Ye=>Ye.selected).map(Ye=>Ye[Ze]):Ge.selectedIndex===-1?null:Ge[Ge.selectedIndex][Ze]};let De=xe(!1);const We=Fe=>{const Ze=Fe.target.options;return Array.prototype.map.call(Ze,Ge=>({displayValue:Ge.textContent,exportValue:Ge.value}))};return this.enableScripting&&this.hasJSActions?(ae.addEventListener("updatefromsandbox",Fe=>{const Ze={value(Ge){be==null||be();const $e=Ge.detail.value,Ye=new Set(Array.isArray($e)?$e:[$e]);for(const Qe of ae.options)Qe.selected=Ye.has(Qe.value);re.setValue(C,{value:xe(!0)}),De=xe(!1)},multipleSelection(Ge){ae.multiple=!0},remove(Ge){const $e=ae.options,Ye=Ge.detail.remove;$e[Ye].selected=!1,ae.remove(Ye),$e.length>0&&Array.prototype.findIndex.call($e,qe=>qe.selected)===-1&&($e[0].selected=!0),re.setValue(C,{value:xe(!0),items:We(Ge)}),De=xe(!1)},clear(Ge){for(;ae.length!==0;)ae.remove(0);re.setValue(C,{value:null,items:[]}),De=xe(!1)},insert(Ge){const{index:$e,displayValue:Ye,exportValue:Qe}=Ge.detail.insert,qe=ae.children[$e],et=document.createElement("option");et.textContent=Ye,et.value=Qe,qe?qe.before(et):ae.append(et),re.setValue(C,{value:xe(!0),items:We(Ge)}),De=xe(!1)},items(Ge){const{items:$e}=Ge.detail;for(;ae.length!==0;)ae.remove(0);for(const Ye of $e){const{displayValue:Qe,exportValue:qe}=Ye,et=document.createElement("option");et.textContent=Qe,et.value=qe,ae.append(et)}ae.options.length>0&&(ae.options[0].selected=!0),re.setValue(C,{value:xe(!0),items:We(Ge)}),De=xe(!1)},indices(Ge){const $e=new Set(Ge.detail.indices);for(const Ye of Ge.target.options)Ye.selected=$e.has(Ye.index);re.setValue(C,{value:xe(!0)}),De=xe(!1)},editable(Ge){Ge.target.disabled=!Ge.detail.editable}};this._dispatchEventFromSandbox(Ze,Fe)}),ae.addEventListener("input",Fe=>{var Ge;const Ze=xe(!0);re.setValue(C,{value:Ze}),Fe.preventDefault(),(Ge=this.linkService.eventBus)==null||Ge.dispatch("dispatcheventinsandbox",{source:this,detail:{id:C,name:"Keystroke",value:De,changeEx:Ze,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(ae,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],Fe=>Fe.target.value)):ae.addEventListener("input",function(Fe){re.setValue(C,{value:xe(!0)})}),this.data.combo&&this._setTextStyle(ae),this._setBackgroundColor(ae),this._setDefaultPropertiesFromJS(ae),this.container.append(ae),this.container}}class T extends a{constructor(re){const{data:C,elements:G}=re;super(re,{isRenderable:a._hasPopupData(C)}),this.elements=G}render(){this.container.classList.add("popupAnnotation");const re=new S({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),C=[];for(const G of this.elements)G.popup=re,C.push(G.data.id),G.addHighlightArea();return this.container.setAttribute("aria-controls",C.map(G=>`${p.AnnotationPrefix}${G}`).join(",")),this.container}}class S{constructor(re){$(this,Ve);$(this,_e);$(this,Ke);$(this,je);$(this,Z,null);$(this,se,J(this,Ve,mr).bind(this));$(this,q,J(this,je,An).bind(this));$(this,pe,J(this,Ke,yn).bind(this));$(this,te,J(this,_e,Nt).bind(this));$(this,me,null);$(this,ve,null);$(this,Re,null);$(this,Oe,null);$(this,Ie,null);$(this,Le,null);$(this,ue,!1);$(this,ne,null);$(this,ce,null);$(this,ge,null);$(this,Ce,null);$(this,Me,!1);var Ye;let{container:C,color:G,elements:ae,titleObj:fe,modificationDate:be,contentsObj:xe,richText:De,parent:We,rect:Fe,parentRect:Ze,open:Ge}=re;le(this,ve,C),le(this,Ce,fe),le(this,Re,xe),le(this,ge,De),le(this,Ie,We),le(this,me,G),le(this,ce,Fe),le(this,Le,Ze),le(this,Oe,ae);const $e=y.PDFDateString.toDateObject(be);$e&&le(this,Z,We.l10n.get("annotation_date_string",{date:$e.toLocaleDateString(),time:$e.toLocaleTimeString()})),this.trigger=ae.flatMap(Qe=>Qe.getElementsToTriggerPopup());for(const Qe of this.trigger)Qe.addEventListener("click",l(this,te)),Qe.addEventListener("mouseenter",l(this,pe)),Qe.addEventListener("mouseleave",l(this,q)),Qe.classList.add("popupTriggerArea");for(const Qe of ae)(Ye=Qe.container)==null||Ye.addEventListener("keydown",l(this,se));l(this,ve).hidden=!0,Ge&&J(this,_e,Nt).call(this)}render(){if(l(this,ne))return;const{page:{view:re},viewport:{rawDims:{pageWidth:C,pageHeight:G,pageX:ae,pageY:fe}}}=l(this,Ie),be=le(this,ne,document.createElement("div"));if(be.className="popup",l(this,me)){const nt=be.style.outlineColor=p.Util.makeHexColor(...l(this,me));CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?be.style.backgroundColor=`color-mix(in srgb, ${nt} 30%, white)`:be.style.backgroundColor=p.Util.makeHexColor(...l(this,me).map(lt=>Math.floor(.7*(255-lt)+lt)))}const xe=document.createElement("span");xe.className="header";const De=document.createElement("h1");if(xe.append(De),{dir:De.dir,str:De.textContent}=l(this,Ce),be.append(xe),l(this,Z)){const nt=document.createElement("span");nt.classList.add("popupDate"),l(this,Z).then(it=>{nt.textContent=it}),xe.append(nt)}const We=l(this,Re),Fe=l(this,ge);if(Fe!=null&&Fe.str&&(!(We!=null&&We.str)||We.str===Fe.str))e.XfaLayer.render({xfaHtml:Fe.html,intent:"richText",div:be}),be.lastChild.classList.add("richText","popupContent");else{const nt=this._formatContents(We);be.append(nt)}let Ze=!!l(this,Le),Ge=Ze?l(this,Le):l(this,ce);for(const nt of l(this,Oe))if(!Ge||p.Util.intersect(nt.data.rect,Ge)!==null){Ge=nt.data.rect,Ze=!0;break}const $e=p.Util.normalizeRect([Ge[0],re[3]-Ge[1]+re[1],Ge[2],re[3]-Ge[3]+re[1]]),Ye=5,Qe=Ze?Ge[2]-Ge[0]+Ye:0,qe=$e[0]+Qe,et=$e[1],{style:rt}=l(this,ve);rt.left=`${100*(qe-ae)/C}%`,rt.top=`${100*(et-fe)/G}%`,l(this,ve).append(be)}_formatContents(re){let{str:C,dir:G}=re;const ae=document.createElement("p");ae.classList.add("popupContent"),ae.dir=G;const fe=C.split(/(?:\r\n?|\n)/);for(let be=0,xe=fe.length;be{be.key==="Enter"&&(fe?be.metaKey:be.ctrlKey)&&J(this,U,Sn).call(this)}),!G.popupRef&&this.hasPopupData?this._createPopup():ae.classList.add("popupTriggerArea"),C.append(ae),C}getElementsToTriggerPopup(){return l(this,K)}addHighlightArea(){this.container.classList.add("highlightArea")}}K=new WeakMap,U=new WeakSet,Sn=function(){var C;(C=this.downloadManager)==null||C.openOrDownloadData(this.container,this.content,this.filename)};class P{constructor(re){$(this,Te);$(this,ke);$(this,Ae,null);$(this,Se,null);$(this,we,new Map);let{div:C,accessibilityManager:G,annotationCanvasMap:ae,l10n:fe,page:be,viewport:xe}=re;this.div=C,le(this,Ae,G),le(this,Se,ae),this.l10n=fe,this.page=be,this.viewport=xe,this.zIndex=0,this.l10n||(this.l10n=g.NullL10n)}async render(re){const{annotations:C}=re,G=this.div;(0,y.setLayerDimensions)(G,this.viewport);const ae=new Map,fe={data:null,layer:G,linkService:re.linkService,downloadManager:re.downloadManager,imageResourcesPath:re.imageResourcesPath||"",renderForms:re.renderForms!==!1,svgFactory:new y.DOMSVGFactory,annotationStorage:re.annotationStorage||new k.AnnotationStorage,enableScripting:re.enableScripting===!0,hasJSActions:re.hasJSActions,fieldObjects:re.fieldObjects,parent:this,elements:null};for(const be of C){if(be.noHTML)continue;const xe=be.annotationType===p.AnnotationType.POPUP;if(xe){const Fe=ae.get(be.id);if(!Fe)continue;fe.elements=Fe}else{const{width:Fe,height:Ze}=h(be.rect);if(Fe<=0||Ze<=0)continue}fe.data=be;const De=f.create(fe);if(!De.isRenderable)continue;if(!xe&&be.popupRef){const Fe=ae.get(be.popupRef);Fe?Fe.push(De):ae.set(be.popupRef,[De])}De.annotationEditorType>0&&l(this,we).set(De.data.id,De);const We=De.render();be.hidden&&(We.style.visibility="hidden"),J(this,Te,vr).call(this,We,be.id)}J(this,ke,En).call(this),await this.l10n.translate(G)}update(re){let{viewport:C}=re;const G=this.div;this.viewport=C,(0,y.setLayerDimensions)(G,{rotation:C.rotation}),J(this,ke,En).call(this),G.hidden=!1}getEditableAnnotations(){return Array.from(l(this,we).values())}getEditableAnnotation(re){return l(this,we).get(re)}}Ae=new WeakMap,Se=new WeakMap,we=new WeakMap,Te=new WeakSet,vr=function(re,C){var ae;const G=re.firstChild||re;G.id=`${p.AnnotationPrefix}${C}`,this.div.append(re),(ae=l(this,Ae))==null||ae.moveElementInDOM(this.div,re,G,!1)},ke=new WeakSet,En=function(){if(!l(this,Se))return;const re=this.div;for(const[C,G]of l(this,Se)){const ae=re.querySelector(`[data-annotation-id="${C}"]`);if(!ae)continue;const{firstChild:fe}=ae;fe?fe.nodeName==="CANVAS"?fe.replaceWith(G):fe.before(G):ae.append(G)}l(this,Se).clear()},w.AnnotationLayer=P},(N,w)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.ColorConverters=void 0;function t(k){return Math.floor(Math.max(0,Math.min(1,k))*255).toString(16).padStart(2,"0")}function p(k){return Math.max(0,Math.min(255,255*k))}class y{static CMYK_G(u){let[g,e,i,n]=u;return["G",1-Math.min(1,.3*g+.59*i+.11*e+n)]}static G_CMYK(u){let[g]=u;return["CMYK",0,0,0,1-g]}static G_RGB(u){let[g]=u;return["RGB",g,g,g]}static G_rgb(u){let[g]=u;return g=p(g),[g,g,g]}static G_HTML(u){let[g]=u;const e=t(g);return`#${e}${e}${e}`}static RGB_G(u){let[g,e,i]=u;return["G",.3*g+.59*e+.11*i]}static RGB_rgb(u){return u.map(p)}static RGB_HTML(u){return`#${u.map(t).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB(u){let[g,e,i,n]=u;return["RGB",1-Math.min(1,g+n),1-Math.min(1,i+n),1-Math.min(1,e+n)]}static CMYK_rgb(u){let[g,e,i,n]=u;return[p(1-Math.min(1,g+n)),p(1-Math.min(1,i+n)),p(1-Math.min(1,e+n))]}static CMYK_HTML(u){const g=this.CMYK_RGB(u).slice(1);return this.RGB_HTML(g)}static RGB_CMYK(u){let[g,e,i]=u;const n=1-g,d=1-e,h=1-i,f=Math.min(n,d,h);return["CMYK",n,d,h,f]}}w.ColorConverters=y},(N,w)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.NullL10n=void 0,w.getL10nFallback=p;const t={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}} × {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} × {{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…",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"};t.print_progress_percent="{{progress}}%";function p(u,g){switch(u){case"find_match_count":u=`find_match_count[${g.total===1?"one":"other"}]`;break;case"find_match_count_limit":u=`find_match_count_limit[${g.limit===1?"one":"other"}]`;break}return t[u]||""}function y(u,g){return g?u.replaceAll(/\{\{\s*(\w+)\s*\}\}/g,(e,i)=>i in g?g[i]:"{{"+i+"}}"):u}const k={async getLanguage(){return"en-us"},async getDirection(){return"ltr"},async get(u){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p(u,g);return y(e,g)},async translate(u){}};w.NullL10n=k},(N,w,t)=>{Object.defineProperty(w,"__esModule",{value:!0}),w.XfaLayer=void 0,t(89);var p=t(194);class y{static setupStorage(u,g,e,i,n){const d=i.getValue(g,{value:null});switch(e.name){case"textarea":if(d.value!==null&&(u.textContent=d.value),n==="print")break;u.addEventListener("input",h=>{i.setValue(g,{value:h.target.value})});break;case"input":if(e.attributes.type==="radio"||e.attributes.type==="checkbox"){if(d.value===e.attributes.xfaOn?u.setAttribute("checked",!0):d.value===e.attributes.xfaOff&&u.removeAttribute("checked"),n==="print")break;u.addEventListener("change",h=>{i.setValue(g,{value:h.target.checked?h.target.getAttribute("xfaOn"):h.target.getAttribute("xfaOff")})})}else{if(d.value!==null&&u.setAttribute("value",d.value),n==="print")break;u.addEventListener("input",h=>{i.setValue(g,{value:h.target.value})})}break;case"select":if(d.value!==null){u.setAttribute("value",d.value);for(const h of e.children)h.attributes.value===d.value?h.attributes.selected=!0:h.attributes.hasOwnProperty("selected")&&delete h.attributes.selected}u.addEventListener("input",h=>{const f=h.target.options,a=f.selectedIndex===-1?"":f[f.selectedIndex].value;i.setValue(g,{value:a})});break}}static setAttributes(u){let{html:g,element:e,storage:i=null,intent:n,linkService:d}=u;const{attributes:h}=e,f=g instanceof HTMLAnchorElement;h.type==="radio"&&(h.name=`${h.name}-${n}`);for(const[a,r]of Object.entries(h))if(r!=null)switch(a){case"class":r.length&&g.setAttribute(a,r.join(" "));break;case"dataId":break;case"id":g.setAttribute("data-element-id",r);break;case"style":Object.assign(g.style,r);break;case"textContent":g.textContent=r;break;default:(!f||a!=="href"&&a!=="newWindow")&&g.setAttribute(a,r)}f&&d.addLinkAttributes(g,h.href,h.newWindow),i&&h.dataId&&this.setupStorage(g,h.dataId,e,i)}static render(u){var r;const g=u.annotationStorage,e=u.linkService,i=u.xfaHtml,n=u.intent||"display",d=document.createElement(i.name);i.attributes&&this.setAttributes({html:d,element:i,intent:n,linkService:e});const h=[[i,-1,d]],f=u.div;if(f.append(d),u.viewport){const o=`matrix(${u.viewport.transform.join(",")})`;f.style.transform=o}n!=="richText"&&f.setAttribute("class","xfaLayer xfaFont");const a=[];for(;h.length>0;){const[o,m,v]=h.at(-1);if(m+1===o.children.length){h.pop();continue}const A=o.children[++h.at(-1)[1]];if(A===null)continue;const{name:b}=A;if(b==="#text"){const s=document.createTextNode(A.value);a.push(s),v.append(s);continue}const c=(r=A==null?void 0:A.attributes)!=null&&r.xmlns?document.createElementNS(A.attributes.xmlns,b):document.createElement(b);if(v.append(c),A.attributes&&this.setAttributes({html:c,element:A,storage:g,intent:n,linkService:e}),A.children&&A.children.length>0)h.push([A,-1,c]);else if(A.value){const s=document.createTextNode(A.value);p.XfaText.shouldBuildText(b)&&a.push(s),c.append(s)}}for(const o of f.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))o.setAttribute("readOnly",!0);return{textDivs:a}}static update(u){const g=`matrix(${u.viewport.transform.join(",")})`;u.div.style.transform=g,u.div.hidden=!1}}w.XfaLayer=y},(N,w,t)=>{var i,n,d,h,f,a,r,o,m,v,A,b,c,s,x,br,S,yr,I,Ar,Q,Sr,j,Pn,Y,Er,ee,xn,ye,Pr,L,xr,M,Tr,R,Cr,B,wr,Z,at,q,Tn,te,Bt,ve,Ut,Oe,gt,Le,Cn,ne,Vt,ge,kr,Me,wn,ze,Rr,He,Mr,Xe,kn,Je,Ht,H,mt;Object.defineProperty(w,"__esModule",{value:!0}),w.InkEditor=void 0,t(89),t(2);var p=t(1),y=t(164),k=t(198),u=t(168),g=t(165);const de=class de extends y.AnnotationEditor{constructor(U){super({...U,name:"inkEditor"});$(this,x);$(this,S);$(this,I);$(this,Q);$(this,j);$(this,Y);$(this,ee);$(this,ye);$(this,L);$(this,M);$(this,R);$(this,B);$(this,Z);$(this,q);$(this,te);$(this,ve);$(this,Oe);$(this,Le);$(this,ne);$(this,He);$(this,Xe);$(this,Je);$(this,H);$(this,i,0);$(this,n,0);$(this,d,this.canvasPointermove.bind(this));$(this,h,this.canvasPointerleave.bind(this));$(this,f,this.canvasPointerup.bind(this));$(this,a,this.canvasPointerdown.bind(this));$(this,r,new Path2D);$(this,o,!1);$(this,m,!1);$(this,v,!1);$(this,A,null);$(this,b,0);$(this,c,0);$(this,s,null);this.color=U.color||null,this.thickness=U.thickness||null,this.opacity=U.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(U){y.AnnotationEditor.initialize(U,{strings:["editor_ink_canvas_aria_label","editor_ink2_aria_label"]})}static updateDefaultParams(U,ie){switch(U){case p.AnnotationEditorParamsType.INK_THICKNESS:de._defaultThickness=ie;break;case p.AnnotationEditorParamsType.INK_COLOR:de._defaultColor=ie;break;case p.AnnotationEditorParamsType.INK_OPACITY:de._defaultOpacity=ie/100;break}}updateParams(U,ie){switch(U){case p.AnnotationEditorParamsType.INK_THICKNESS:J(this,x,br).call(this,ie);break;case p.AnnotationEditorParamsType.INK_COLOR:J(this,S,yr).call(this,ie);break;case p.AnnotationEditorParamsType.INK_OPACITY:J(this,I,Ar).call(this,ie);break}}static get defaultPropertiesToUpdate(){return[[p.AnnotationEditorParamsType.INK_THICKNESS,de._defaultThickness],[p.AnnotationEditorParamsType.INK_COLOR,de._defaultColor||y.AnnotationEditor._defaultLineColor],[p.AnnotationEditorParamsType.INK_OPACITY,Math.round(de._defaultOpacity*100)]]}get propertiesToUpdate(){return[[p.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||de._defaultThickness],[p.AnnotationEditorParamsType.INK_COLOR,this.color||de._defaultColor||y.AnnotationEditor._defaultLineColor],[p.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(this.opacity??de._defaultOpacity))]]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.canvas||(J(this,te,Bt).call(this),J(this,ve,Ut).call(this)),this.isAttachedToDOM||(this.parent.add(this),J(this,Oe,gt).call(this)),J(this,H,mt).call(this)))}remove(){this.canvas!==null&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,l(this,A).disconnect(),le(this,A,null),super.remove())}setParent(U){!this.parent&&U?this._uiManager.removeShouldRescale(this):this.parent&&U===null&&this._uiManager.addShouldRescale(this),super.setParent(U)}onScaleChanging(){const[U,ie]=this.parentDimensions,Ae=this.width*U,Se=this.height*ie;this.setDimensions(Ae,Se)}enableEditMode(){l(this,o)||this.canvas===null||(super.enableEditMode(),this._isDraggable=!1,this.canvas.addEventListener("pointerdown",l(this,a)))}disableEditMode(){!this.isInEditMode()||this.canvas===null||(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",l(this,a)))}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return this.paths.length===0||this.paths.length===1&&this.paths[0].length===0}commit(){l(this,o)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),le(this,o,!0),this.div.classList.add("disabled"),J(this,H,mt).call(this,!0),this.makeResizable(),this.parent.addInkEditorIfNeeded(!0),this.moveInDOM(),this.div.focus({preventScroll:!0}))}focusin(U){this._focusEventsAllowed&&(super.focusin(U),this.enableEditMode())}canvasPointerdown(U){U.button!==0||!this.isInEditMode()||l(this,o)||(this.setInForeground(),U.preventDefault(),U.type!=="mouse"&&this.div.focus(),J(this,Y,Er).call(this,U.offsetX,U.offsetY))}canvasPointermove(U){U.preventDefault(),J(this,ee,xn).call(this,U.offsetX,U.offsetY)}canvasPointerup(U){U.preventDefault(),J(this,q,Tn).call(this,U)}canvasPointerleave(U){J(this,q,Tn).call(this,U)}get isResizable(){return!this.isEmpty()&&l(this,o)}render(){if(this.div)return this.div;let U,ie;this.width&&(U=this.x,ie=this.y),super.render(),y.AnnotationEditor._l10nPromise.get("editor_ink2_aria_label").then(Ne=>{var ke;return(ke=this.div)==null?void 0:ke.setAttribute("aria-label",Ne)});const[Ae,Se,we,Te]=J(this,Q,Sr).call(this);if(this.setAt(Ae,Se,0,0),this.setDims(we,Te),J(this,te,Bt).call(this),this.width){const[Ne,ke]=this.parentDimensions;this.setAspectRatio(this.width*Ne,this.height*ke),this.setAt(U*Ne,ie*ke,this.width*Ne,this.height*ke),le(this,v,!0),J(this,Oe,gt).call(this),this.setDims(this.width*Ne,this.height*ke),J(this,Z,at).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return J(this,ve,Ut).call(this),this.div}setDimensions(U,ie){const Ae=Math.round(U),Se=Math.round(ie);if(l(this,b)===Ae&&l(this,c)===Se)return;le(this,b,Ae),le(this,c,Se),this.canvas.style.visibility="hidden";const[we,Te]=this.parentDimensions;this.width=U/we,this.height=ie/Te,this.fixAndSetPosition(),l(this,o)&&J(this,Le,Cn).call(this,U,ie),J(this,Oe,gt).call(this),J(this,Z,at).call(this),this.canvas.style.visibility="visible",this.fixDims()}static deserialize(U,ie,Ae){var fe,be,xe;if(U instanceof k.InkAnnotationElement)return null;const Se=super.deserialize(U,ie,Ae);Se.thickness=U.thickness,Se.color=p.Util.makeHexColor(...U.color),Se.opacity=U.opacity;const[we,Te]=Se.pageDimensions,Ne=Se.width*we,ke=Se.height*Te,Ue=Se.parentScale,Be=U.thickness/2;le(Se,o,!0),le(Se,b,Math.round(Ne)),le(Se,c,Math.round(ke));const{paths:re,rect:C,rotation:G}=U;for(let{bezier:De}of re){De=J(fe=de,ze,Rr).call(fe,De,C,G);const We=[];Se.paths.push(We);let Fe=Ue*(De[0]-Be),Ze=Ue*(De[1]-Be);for(let $e=2,Ye=De.length;$e{this.thickness=U,J(this,H,mt).call(this)},undo:()=>{this.thickness=ie,J(this,H,mt).call(this)},mustExec:!0,type:p.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})},S=new WeakSet,yr=function(U){const ie=this.color;this.addCommands({cmd:()=>{this.color=U,J(this,Z,at).call(this)},undo:()=>{this.color=ie,J(this,Z,at).call(this)},mustExec:!0,type:p.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})},I=new WeakSet,Ar=function(U){U/=100;const ie=this.opacity;this.addCommands({cmd:()=>{this.opacity=U,J(this,Z,at).call(this)},undo:()=>{this.opacity=ie,J(this,Z,at).call(this)},mustExec:!0,type:p.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})},Q=new WeakSet,Sr=function(){const{parentRotation:U,parentDimensions:[ie,Ae]}=this;switch(U){case 90:return[0,Ae,Ae,ie];case 180:return[ie,Ae,ie,Ae];case 270:return[ie,0,Ae,ie];default:return[0,0,ie,Ae]}},j=new WeakSet,Pn=function(){const{ctx:U,color:ie,opacity:Ae,thickness:Se,parentScale:we,scaleFactor:Te}=this;U.lineWidth=Se*we/Te,U.lineCap="round",U.lineJoin="round",U.miterLimit=10,U.strokeStyle=`${ie}${(0,g.opacityToHex)(Ae)}`},Y=new WeakSet,Er=function(U,ie){this.canvas.addEventListener("contextmenu",u.noContextMenu),this.canvas.addEventListener("pointerleave",l(this,h)),this.canvas.addEventListener("pointermove",l(this,d)),this.canvas.addEventListener("pointerup",l(this,f)),this.canvas.removeEventListener("pointerdown",l(this,a)),this.isEditing=!0,l(this,v)||(le(this,v,!0),J(this,Oe,gt).call(this),this.thickness||(this.thickness=de._defaultThickness),this.color||(this.color=de._defaultColor||y.AnnotationEditor._defaultLineColor),this.opacity??(this.opacity=de._defaultOpacity)),this.currentPath.push([U,ie]),le(this,m,!1),J(this,j,Pn).call(this),le(this,s,()=>{J(this,M,Tr).call(this),l(this,s)&&window.requestAnimationFrame(l(this,s))}),window.requestAnimationFrame(l(this,s))},ee=new WeakSet,xn=function(U,ie){const[Ae,Se]=this.currentPath.at(-1);if(this.currentPath.length>1&&U===Ae&&ie===Se)return;const we=this.currentPath;let Te=l(this,r);if(we.push([U,ie]),le(this,m,!0),we.length<=2){Te.moveTo(...we[0]),Te.lineTo(U,ie);return}we.length===3&&(le(this,r,Te=new Path2D),Te.moveTo(...we[0])),J(this,R,Cr).call(this,Te,...we.at(-3),...we.at(-2),U,ie)},ye=new WeakSet,Pr=function(){if(this.currentPath.length===0)return;const U=this.currentPath.at(-1);l(this,r).lineTo(...U)},L=new WeakSet,xr=function(U,ie){le(this,s,null),U=Math.min(Math.max(U,0),this.canvas.width),ie=Math.min(Math.max(ie,0),this.canvas.height),J(this,ee,xn).call(this,U,ie),J(this,ye,Pr).call(this);let Ae;if(this.currentPath.length!==1)Ae=J(this,B,wr).call(this);else{const ke=[U,ie];Ae=[[ke,ke.slice(),ke.slice(),ke]]}const Se=l(this,r),we=this.currentPath;this.currentPath=[],le(this,r,new Path2D);const Te=()=>{this.allRawPaths.push(we),this.paths.push(Ae),this.bezierPath2D.push(Se),this.rebuild()},Ne=()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),this.paths.length===0?this.remove():(this.canvas||(J(this,te,Bt).call(this),J(this,ve,Ut).call(this)),J(this,H,mt).call(this))};this.addCommands({cmd:Te,undo:Ne,mustExec:!0})},M=new WeakSet,Tr=function(){if(!l(this,m))return;le(this,m,!1);const U=Math.ceil(this.thickness*this.parentScale),ie=this.currentPath.slice(-3),Ae=ie.map(Te=>Te[0]),Se=ie.map(Te=>Te[1]);Math.min(...Ae)-U,Math.max(...Ae)+U,Math.min(...Se)-U,Math.max(...Se)+U;const{ctx:we}=this;we.save(),we.clearRect(0,0,this.canvas.width,this.canvas.height);for(const Te of this.bezierPath2D)we.stroke(Te);we.stroke(l(this,r)),we.restore()},R=new WeakSet,Cr=function(U,ie,Ae,Se,we,Te,Ne){const ke=(ie+Se)/2,Ue=(Ae+we)/2,Be=(Se+Te)/2,re=(we+Ne)/2;U.bezierCurveTo(ke+2*(Se-ke)/3,Ue+2*(we-Ue)/3,Be+2*(Se-Be)/3,re+2*(we-re)/3,Be,re)},B=new WeakSet,wr=function(){const U=this.currentPath;if(U.length<=2)return[[U[0],U[0],U.at(-1),U.at(-1)]];const ie=[];let Ae,[Se,we]=U[0];for(Ae=1;Ae{this.canvas.removeEventListener("contextmenu",u.noContextMenu)},10),J(this,L,xr).call(this,U.offsetX,U.offsetY),this.addToAnnotationStorage(),this.setInBackground()},te=new WeakSet,Bt=function(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",y.AnnotationEditor._l10nPromise.get("editor_ink_canvas_aria_label").then(U=>{var ie;return(ie=this.canvas)==null?void 0:ie.setAttribute("aria-label",U)}),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")},ve=new WeakSet,Ut=function(){le(this,A,new ResizeObserver(U=>{const ie=U[0].contentRect;ie.width&&ie.height&&this.setDimensions(ie.width,ie.height)})),l(this,A).observe(this.div)},Oe=new WeakSet,gt=function(){if(!l(this,v))return;const[U,ie]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*U),this.canvas.height=Math.ceil(this.height*ie),J(this,ne,Vt).call(this)},Le=new WeakSet,Cn=function(U,ie){const Ae=J(this,Je,Ht).call(this),Se=(U-Ae)/l(this,n),we=(ie-Ae)/l(this,i);this.scaleFactor=Math.min(Se,we)},ne=new WeakSet,Vt=function(){const U=J(this,Je,Ht).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+U,this.translationY*this.scaleFactor+U)},ge=new WeakSet,kr=function(U){const ie=new Path2D;for(let Ae=0,Se=U.length;Ae0&&arguments[0]!==void 0?arguments[0]:!1;if(this.isEmpty())return;if(!l(this,o)){J(this,Z,at).call(this);return}const ie=J(this,Xe,kn).call(this),Ae=J(this,Je,Ht).call(this);le(this,n,Math.max(y.AnnotationEditor.MIN_SIZE,ie[2]-ie[0])),le(this,i,Math.max(y.AnnotationEditor.MIN_SIZE,ie[3]-ie[1]));const Se=Math.ceil(Ae+l(this,n)*this.scaleFactor),we=Math.ceil(Ae+l(this,i)*this.scaleFactor),[Te,Ne]=this.parentDimensions;this.width=Se/Te,this.height=we/Ne,this.setAspectRatio(Se,we);const ke=this.translationX,Ue=this.translationY;this.translationX=-ie[0],this.translationY=-ie[1],J(this,Oe,gt).call(this),J(this,Z,at).call(this),le(this,b,Se),le(this,c,we),this.setDims(Se,we);const Be=U?Ae/this.scaleFactor/2:0;this.translate(ke-this.translationX-Be,Ue-this.translationY-Be)},$(de,ge),$(de,Me),$(de,ze),tt(de,"_defaultColor",null),tt(de,"_defaultOpacity",1),tt(de,"_defaultThickness",1),tt(de,"_type","ink");let e=de;w.InkEditor=e},(N,w,t)=>{var e,i,n,d,h,f,a,r,o,m,v,Pt,b,xt,s,Wt,T,Rn,D,Ir,_,Lr,W,Mn,he,zt,z,Or;Object.defineProperty(w,"__esModule",{value:!0}),w.StampEditor=void 0,t(149),t(152);var p=t(1),y=t(164),k=t(168),u=t(198);const oe=class oe extends y.AnnotationEditor{constructor(L){super({...L,name:"stampEditor"});$(this,v);$(this,b);$(this,s);$(this,T);$(this,D);$(this,_);$(this,W);$(this,he);$(this,z);$(this,e,null);$(this,i,null);$(this,n,null);$(this,d,null);$(this,h,null);$(this,f,null);$(this,a,null);$(this,r,null);$(this,o,!1);$(this,m,!1);le(this,d,L.bitmapUrl),le(this,h,L.bitmapFile)}static initialize(L){y.AnnotationEditor.initialize(L)}static get supportedTypes(){const L=["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"];return(0,p.shadow)(this,"supportedTypes",L.map(P=>`image/${P}`))}static get supportedTypesStr(){return(0,p.shadow)(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(L){return this.supportedTypes.includes(L)}static paste(L,P){P.pasteEditor(p.AnnotationEditorType.STAMP,{bitmapFile:L.getAsFile()})}remove(){var L,P;l(this,i)&&(le(this,e,null),this._uiManager.imageManager.deleteId(l(this,i)),(L=l(this,f))==null||L.remove(),le(this,f,null),(P=l(this,a))==null||P.disconnect(),le(this,a,null)),super.remove()}rebuild(){if(!this.parent){l(this,i)&&J(this,s,Wt).call(this);return}super.rebuild(),this.div!==null&&(l(this,i)&&J(this,s,Wt).call(this),this.isAttachedToDOM||this.parent.add(this))}onceAdded(){this._isDraggable=!0,this.div.focus()}isEmpty(){return!(l(this,n)||l(this,e)||l(this,d)||l(this,h))}get isResizable(){return!0}render(){if(this.div)return this.div;let L,P;if(this.width&&(L=this.x,P=this.y),super.render(),this.div.hidden=!0,l(this,e)?J(this,T,Rn).call(this):J(this,s,Wt).call(this),this.width){const[M,E]=this.parentDimensions;this.setAt(L*M,P*E,this.width*M,this.height*E)}return this.div}static deserialize(L,P,M){if(L instanceof u.StampAnnotationElement)return null;const E=super.deserialize(L,P,M),{rect:R,bitmapUrl:O,bitmapId:B,isSvg:F,accessibilityData:Z}=L;B&&M.imageManager.isValidId(B)?le(E,i,B):le(E,d,O),le(E,o,F);const[se,q]=E.pageDimensions;return E.width=(R[2]-R[0])/se,E.height=(R[3]-R[1])/q,Z&&(E.altTextData=Z),E}serialize(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.isEmpty())return null;const M={annotationType:p.AnnotationEditorType.STAMP,bitmapId:l(this,i),pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:l(this,o),structTreeParentId:this._structTreeParentId};if(L)return M.bitmapUrl=J(this,he,zt).call(this,!0),M.accessibilityData=this.altTextData,M;const{decorative:E,altText:R}=this.altTextData;if(!E&&R&&(M.accessibilityData={type:"Figure",alt:R}),P===null)return M;P.stamps||(P.stamps=new Map);const O=l(this,o)?(M.rect[2]-M.rect[0])*(M.rect[3]-M.rect[1]):null;if(!P.stamps.has(l(this,i)))P.stamps.set(l(this,i),{area:O,serialized:M}),M.bitmap=J(this,he,zt).call(this,!1);else if(l(this,o)){const B=P.stamps.get(l(this,i));O>B.area&&(B.area=O,B.serialized.bitmap.close(),B.serialized.bitmap=J(this,he,zt).call(this,!1))}return M}};e=new WeakMap,i=new WeakMap,n=new WeakMap,d=new WeakMap,h=new WeakMap,f=new WeakMap,a=new WeakMap,r=new WeakMap,o=new WeakMap,m=new WeakMap,v=new WeakSet,Pt=function(L){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!L){this.remove();return}le(this,e,L.bitmap),P||(le(this,i,L.id),le(this,o,L.isSvg)),J(this,T,Rn).call(this)},b=new WeakSet,xt=function(){le(this,n,null),this._uiManager.enableWaiting(!1),l(this,f)&&this.div.focus()},s=new WeakSet,Wt=function(){if(l(this,i)){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(l(this,i)).then(P=>J(this,v,Pt).call(this,P,!0)).finally(()=>J(this,b,xt).call(this));return}if(l(this,d)){const P=l(this,d);le(this,d,null),this._uiManager.enableWaiting(!0),le(this,n,this._uiManager.imageManager.getFromUrl(P).then(M=>J(this,v,Pt).call(this,M)).finally(()=>J(this,b,xt).call(this)));return}if(l(this,h)){const P=l(this,h);le(this,h,null),this._uiManager.enableWaiting(!0),le(this,n,this._uiManager.imageManager.getFromFile(P).then(M=>J(this,v,Pt).call(this,M)).finally(()=>J(this,b,xt).call(this)));return}const L=document.createElement("input");L.type="file",L.accept=oe.supportedTypesStr,le(this,n,new Promise(P=>{L.addEventListener("change",async()=>{if(!L.files||L.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);const M=await this._uiManager.imageManager.getFromFile(L.files[0]);J(this,v,Pt).call(this,M)}P()}),L.addEventListener("cancel",()=>{this.remove(),P()})}).finally(()=>J(this,b,xt).call(this))),L.click()},T=new WeakSet,Rn=function(){const{div:L}=this;let{width:P,height:M}=l(this,e);const[E,R]=this.pageDimensions,O=.75;if(this.width)P=this.width*E,M=this.height*R;else if(P>O*E||M>O*R){const se=Math.min(O*E/P,O*R/M);P*=se,M*=se}const[B,F]=this.parentDimensions;this.setDims(P*B/E,M*F/R),this._uiManager.enableWaiting(!1);const Z=le(this,f,document.createElement("canvas"));L.append(Z),L.hidden=!1,J(this,W,Mn).call(this,P,M),J(this,z,Or).call(this),l(this,m)||(this.parent.addUndoableEditor(this),le(this,m,!0)),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"inserted_image"}}}),this.addAltTextButton()},D=new WeakSet,Ir=function(L,P){var O;const[M,E]=this.parentDimensions;this.width=L/M,this.height=P/E,this.setDims(L,P),(O=this._initialOptions)!=null&&O.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,l(this,r)!==null&&clearTimeout(l(this,r)),le(this,r,setTimeout(()=>{le(this,r,null),J(this,W,Mn).call(this,L,P)},200))},_=new WeakSet,Lr=function(L,P){const{width:M,height:E}=l(this,e);let R=M,O=E,B=l(this,e);for(;R>2*L||O>2*P;){const F=R,Z=O;R>2*L&&(R=R>=16384?Math.floor(R/2)-1:Math.ceil(R/2)),O>2*P&&(O=O>=16384?Math.floor(O/2)-1:Math.ceil(O/2));const se=new OffscreenCanvas(R,O);se.getContext("2d").drawImage(B,0,0,F,Z,0,0,R,O),B=se.transferToImageBitmap()}return B},W=new WeakSet,Mn=function(L,P){L=Math.ceil(L),P=Math.ceil(P);const M=l(this,f);if(!M||M.width===L&&M.height===P)return;M.width=L,M.height=P;const E=l(this,o)?l(this,e):J(this,_,Lr).call(this,L,P),R=M.getContext("2d");R.filter=this._uiManager.hcmFilter,R.drawImage(E,0,0,E.width,E.height,0,0,L,P)},he=new WeakSet,zt=function(L){if(L){if(l(this,o)){const E=this._uiManager.imageManager.getSvgUrl(l(this,i));if(E)return E}const P=document.createElement("canvas");return{width:P.width,height:P.height}=l(this,e),P.getContext("2d").drawImage(l(this,e),0,0),P.toDataURL()}if(l(this,o)){const[P,M]=this.pageDimensions,E=Math.round(this.width*P*k.PixelsPerInch.PDF_TO_CSS_UNITS),R=Math.round(this.height*M*k.PixelsPerInch.PDF_TO_CSS_UNITS),O=new OffscreenCanvas(E,R);return O.getContext("2d").drawImage(l(this,e),0,0,l(this,e).width,l(this,e).height,0,0,E,R),O.transferToImageBitmap()}return structuredClone(l(this,e))},z=new WeakSet,Or=function(){le(this,a,new ResizeObserver(L=>{const P=L[0].contentRect;P.width&&P.height&&J(this,D,Ir).call(this,P.width,P.height)})),l(this,a).observe(this.div)},tt(oe,"_type","stamp");let g=oe;w.StampEditor=g}],__webpack_module_cache__={};function __w_pdfjs_require__(N){var w=__webpack_module_cache__[N];if(w!==void 0)return w.exports;var t=__webpack_module_cache__[N]={exports:{}};return __webpack_modules__[N].call(t.exports,t,t.exports,__w_pdfjs_require__),t.exports}var __webpack_exports__={};return(()=>{var N=__webpack_exports__;Object.defineProperty(N,"__esModule",{value:!0}),Object.defineProperty(N,"AbortException",{enumerable:!0,get:function(){return w.AbortException}}),Object.defineProperty(N,"AnnotationEditorLayer",{enumerable:!0,get:function(){return k.AnnotationEditorLayer}}),Object.defineProperty(N,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return w.AnnotationEditorParamsType}}),Object.defineProperty(N,"AnnotationEditorType",{enumerable:!0,get:function(){return w.AnnotationEditorType}}),Object.defineProperty(N,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return u.AnnotationEditorUIManager}}),Object.defineProperty(N,"AnnotationLayer",{enumerable:!0,get:function(){return g.AnnotationLayer}}),Object.defineProperty(N,"AnnotationMode",{enumerable:!0,get:function(){return w.AnnotationMode}}),Object.defineProperty(N,"CMapCompressionType",{enumerable:!0,get:function(){return w.CMapCompressionType}}),Object.defineProperty(N,"DOMSVGFactory",{enumerable:!0,get:function(){return p.DOMSVGFactory}}),Object.defineProperty(N,"FeatureTest",{enumerable:!0,get:function(){return w.FeatureTest}}),Object.defineProperty(N,"GlobalWorkerOptions",{enumerable:!0,get:function(){return e.GlobalWorkerOptions}}),Object.defineProperty(N,"ImageKind",{enumerable:!0,get:function(){return w.ImageKind}}),Object.defineProperty(N,"InvalidPDFException",{enumerable:!0,get:function(){return w.InvalidPDFException}}),Object.defineProperty(N,"MissingPDFException",{enumerable:!0,get:function(){return w.MissingPDFException}}),Object.defineProperty(N,"OPS",{enumerable:!0,get:function(){return w.OPS}}),Object.defineProperty(N,"PDFDataRangeTransport",{enumerable:!0,get:function(){return t.PDFDataRangeTransport}}),Object.defineProperty(N,"PDFDateString",{enumerable:!0,get:function(){return p.PDFDateString}}),Object.defineProperty(N,"PDFWorker",{enumerable:!0,get:function(){return t.PDFWorker}}),Object.defineProperty(N,"PasswordResponses",{enumerable:!0,get:function(){return w.PasswordResponses}}),Object.defineProperty(N,"PermissionFlag",{enumerable:!0,get:function(){return w.PermissionFlag}}),Object.defineProperty(N,"PixelsPerInch",{enumerable:!0,get:function(){return p.PixelsPerInch}}),Object.defineProperty(N,"PromiseCapability",{enumerable:!0,get:function(){return w.PromiseCapability}}),Object.defineProperty(N,"RenderingCancelledException",{enumerable:!0,get:function(){return p.RenderingCancelledException}}),Object.defineProperty(N,"SVGGraphics",{enumerable:!0,get:function(){return t.SVGGraphics}}),Object.defineProperty(N,"UnexpectedResponseException",{enumerable:!0,get:function(){return w.UnexpectedResponseException}}),Object.defineProperty(N,"Util",{enumerable:!0,get:function(){return w.Util}}),Object.defineProperty(N,"VerbosityLevel",{enumerable:!0,get:function(){return w.VerbosityLevel}}),Object.defineProperty(N,"XfaLayer",{enumerable:!0,get:function(){return i.XfaLayer}}),Object.defineProperty(N,"build",{enumerable:!0,get:function(){return t.build}}),Object.defineProperty(N,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return w.createValidAbsoluteUrl}}),Object.defineProperty(N,"getDocument",{enumerable:!0,get:function(){return t.getDocument}}),Object.defineProperty(N,"getFilenameFromUrl",{enumerable:!0,get:function(){return p.getFilenameFromUrl}}),Object.defineProperty(N,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return p.getPdfFilenameFromUrl}}),Object.defineProperty(N,"getXfaPageViewport",{enumerable:!0,get:function(){return p.getXfaPageViewport}}),Object.defineProperty(N,"isDataScheme",{enumerable:!0,get:function(){return p.isDataScheme}}),Object.defineProperty(N,"isPdfFile",{enumerable:!0,get:function(){return p.isPdfFile}}),Object.defineProperty(N,"loadScript",{enumerable:!0,get:function(){return p.loadScript}}),Object.defineProperty(N,"noContextMenu",{enumerable:!0,get:function(){return p.noContextMenu}}),Object.defineProperty(N,"normalizeUnicode",{enumerable:!0,get:function(){return w.normalizeUnicode}}),Object.defineProperty(N,"renderTextLayer",{enumerable:!0,get:function(){return y.renderTextLayer}}),Object.defineProperty(N,"setLayerDimensions",{enumerable:!0,get:function(){return p.setLayerDimensions}}),Object.defineProperty(N,"shadow",{enumerable:!0,get:function(){return w.shadow}}),Object.defineProperty(N,"updateTextLayer",{enumerable:!0,get:function(){return y.updateTextLayer}}),Object.defineProperty(N,"version",{enumerable:!0,get:function(){return t.version}});var w=__w_pdfjs_require__(1),t=__w_pdfjs_require__(124),p=__w_pdfjs_require__(168),y=__w_pdfjs_require__(195),k=__w_pdfjs_require__(196),u=__w_pdfjs_require__(165),g=__w_pdfjs_require__(198),e=__w_pdfjs_require__(176),i=__w_pdfjs_require__(201)})(),__webpack_exports__})())})(pdf$1);var pdfExports=pdf$1.exports,pdf_viewer={exports:{}};(function(N,w){(function(p,y){N.exports=p.pdfjsViewer=y()})(globalThis,()=>(()=>{var t=[,(u,g,e)=>{var he,Y,z,ee,Dr,ye,In,L,Ln,M,Fr,R,Nr,B,Br,Z,On,q,Ur,te,Vr,ve,$t,Oe,Tt,Le,vt,ne,Hr,ge,Dn,Me,Fn,ze,_t,He,Wr,Xe,Nn,Je,Bn,H,Ct;Object.defineProperty(g,"__esModule",{value:!0}),g.PDFFindController=g.FindState=void 0,e(2),e(80),e(82),e(85),e(87),e(89),e(91),e(93);var i=e(97),n=e(106),d=e(107);const h={FOUND:0,NOT_FOUND:1,WRAPPED:2,PENDING:3};g.FindState=h;const f=250,a=-50,r=-400,o={"‐":"-","‘":"'","’":"'","‚":"'","‛":"'","“":'"',"”":'"',"„":'"',"‟":'"',"¼":"1/4","½":"1/2","¾":"3/4"},m=new Set([12441,12442,2381,2509,2637,2765,2893,3021,3149,3277,3387,3388,3405,3530,3642,3770,3972,4153,4154,5908,5940,6098,6752,6980,7082,7083,7154,7155,11647,43014,43052,43204,43347,43456,43766,44013,3158,3953,3954,3962,3963,3964,3965,3968,3956]);let v;const A=/\p{M}+/gu,b=/([.*+?^${}()|[\]\\])|(\p{P})|(\s+)|(\p{M})|(\p{L})/gu,c=/([^\p{M}])\p{M}*$/u,s=/^\p{M}*([^\p{M}])/u,x=/[\uAC00-\uD7AF\uFA6C\uFACF-\uFAD1\uFAD5-\uFAD7]+/g,T=new Map,S="[\\u1100-\\u1112\\ud7a4-\\ud7af\\ud84a\\ud84c\\ud850\\ud854\\ud857\\ud85f]",D=new Map;let I=null,_=null;function Q(de){const Ee=[];let K;for(;(K=x.exec(de))!==null;){let{index:re}=K;for(const C of K[0]){let G=T.get(C);G||(G=C.normalize("NFD").length,T.set(C,G)),Ee.push([G,re++])}}let U;if(Ee.length===0&&I)U=I;else if(Ee.length>0&&_)U=_;else{const re=Object.keys(o).join(""),C=(0,n.getNormalizeWithNFKC)(),fe=`([${re}])|([${C}])|((?:゙|゚)\\n)|(\\p{M}+(?:-\\n)?)|(\\S-\\n)|((?:\\p{Ideographic}|[぀-ヿ])\\n)|(\\n)`;Ee.length===0?U=I=new RegExp(fe+"|(\\u0000)","gum"):U=_=new RegExp(fe+`|(${S})`,"gum")}const ie=[];for(;(K=A.exec(de))!==null;)ie.push([K[0].length,K.index]);let Ae=de.normalize("NFD");const Se=[[0,0]];let we=0,Te=0,Ne=0,ke=0,Ue=0,Be=!1;return Ae=Ae.replace(U,(re,C,G,ae,fe,be,xe,De,We,Fe)=>{var Ze,Ge,$e;if(Fe-=ke,C){const Ye=o[C],Qe=Ye.length;for(let qe=1;qeke[0]>=U);de[Ae][0]>U&&--Ae;let Se=(0,i.binarySearchFirstItem)(de,ke=>ke[0]>=ie,Ae);de[Se][0]>ie&&--Se;const we=U+de[Ae][1],Ne=ie+de[Se][1]+1-we;return[we,Ne]}class j{constructor(Ee){$(this,ee);$(this,ye);$(this,L);$(this,M);$(this,R);$(this,B);$(this,Z);$(this,q);$(this,te);$(this,ve);$(this,Oe);$(this,Le);$(this,ne);$(this,ge);$(this,Me);$(this,ze);$(this,He);$(this,Xe);$(this,Je);$(this,H);$(this,he,null);$(this,Y,!0);$(this,z,0);let{linkService:K,eventBus:U,updateMatchesCountOnProgress:ie=!0}=Ee;this._linkService=K,this._eventBus=U,le(this,Y,ie),this.onIsPageVisible=null,J(this,ye,In).call(this),U._on("find",J(this,ee,Dr).bind(this)),U._on("findbarclose",J(this,He,Wr).bind(this))}get highlightMatches(){return this._highlightMatches}get pageMatches(){return this._pageMatches}get pageMatchesLength(){return this._pageMatchesLength}get selected(){return this._selected}get state(){return l(this,he)}setDocument(Ee){this._pdfDocument&&J(this,ye,In).call(this),Ee&&(this._pdfDocument=Ee,this._firstPageCapability.resolve())}scrollMatchIntoView(Ee){let{element:K=null,selectedLeft:U=0,pageIndex:ie=-1,matchIndex:Ae=-1}=Ee;if(!this._scrollMatches||!K)return;if(Ae===-1||Ae!==this._selected.matchIdx)return;if(ie===-1||ie!==this._selected.pageIdx)return;this._scrollMatches=!1;const Se={top:a,left:U+r};(0,i.scrollIntoView)(K,Se,!0)}}he=new WeakMap,Y=new WeakMap,z=new WeakMap,ee=new WeakSet,Dr=function(Ee){if(!Ee)return;Ee.phraseSearch===!1&&(console.error("The `phraseSearch`-parameter was removed, please provide an Array of strings in the `query`-parameter instead."),typeof Ee.query=="string"&&(Ee.query=Ee.query.match(/\S+/g)));const K=this._pdfDocument,{type:U}=Ee;(l(this,he)===null||J(this,M,Fr).call(this,Ee))&&(this._dirtyMatch=!0),le(this,he,Ee),U!=="highlightallchange"&&J(this,H,Ct).call(this,h.PENDING),this._firstPageCapability.promise.then(()=>{if(!this._pdfDocument||K&&this._pdfDocument!==K)return;J(this,te,Vr).call(this);const ie=!this._highlightMatches,Ae=!!this._findTimeout;this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),U?this._dirtyMatch?J(this,Le,vt).call(this):U==="again"?(J(this,Le,vt).call(this),ie&&l(this,he).highlightAll&&J(this,Oe,Tt).call(this)):U==="highlightallchange"?(Ae?J(this,Le,vt).call(this):this._highlightMatches=!0,J(this,Oe,Tt).call(this)):J(this,Le,vt).call(this):this._findTimeout=setTimeout(()=>{J(this,Le,vt).call(this),this._findTimeout=null},f)})},ye=new WeakSet,In=function(){this._highlightMatches=!1,this._scrollMatches=!1,this._pdfDocument=null,this._pageMatches=[],this._pageMatchesLength=[],le(this,z,0),le(this,he,null),this._selected={pageIdx:-1,matchIdx:-1},this._offset={pageIdx:null,matchIdx:null,wrapped:!1},this._extractTextPromises=[],this._pageContents=[],this._pageDiffs=[],this._hasDiacritics=[],this._matchesCountTotal=0,this._pagesToSearch=null,this._pendingFindMatches=new Set,this._resumePageIdx=null,this._dirtyMatch=!1,clearTimeout(this._findTimeout),this._findTimeout=null,this._firstPageCapability=new d.PromiseCapability},L=new WeakSet,Ln=function(){const{query:Ee}=l(this,he);return typeof Ee=="string"?(Ee!==this._rawQuery&&(this._rawQuery=Ee,[this._normalizedQuery]=Q(Ee)),this._normalizedQuery):(Ee||[]).filter(K=>!!K).map(K=>Q(K)[0])},M=new WeakSet,Fr=function(Ee){var Se;const K=Ee.query,U=l(this,he).query,ie=typeof K;if(ie!==typeof U)return!0;if(ie==="string"){if(K!==U)return!0}else if(JSON.stringify(K)!==JSON.stringify(U))return!0;switch(Ee.type){case"again":const we=this._selected.pageIdx+1,Te=this._linkService;return we>=1&&we<=Te.pagesCount&&we!==Te.page&&!(((Se=this.onIsPageVisible)==null?void 0:Se.call(this,we))??!0);case"highlightallchange":return!1}return!0},R=new WeakSet,Nr=function(Ee,K,U){let ie=Ee.slice(0,K).match(c);if(ie){const Ae=Ee.charCodeAt(K),Se=ie[1].charCodeAt(0);if((0,n.getCharacterType)(Ae)===(0,n.getCharacterType)(Se))return!1}if(ie=Ee.slice(K+U).match(s),ie){const Ae=Ee.charCodeAt(K+U-1),Se=ie[1].charCodeAt(0);if((0,n.getCharacterType)(Ae)===(0,n.getCharacterType)(Se))return!1}return!0},B=new WeakSet,Br=function(Ee,K,U,ie){const Ae=this._pageMatches[U]=[],Se=this._pageMatchesLength[U]=[];if(!Ee)return;const we=this._pageDiffs[U];let Te;for(;(Te=Ee.exec(ie))!==null;){if(K&&!J(this,R,Nr).call(this,ie,Te.index,Te[0].length))continue;const[Ne,ke]=W(we,Te.index,Te[0].length);ke&&(Ae.push(Ne),Se.push(ke))}},Z=new WeakSet,On=function(Ee,K){const{matchDiacritics:U}=l(this,he);let ie=!1;Ee=Ee.replaceAll(b,(Se,we,Te,Ne,ke,Ue)=>we?`[ ]*\\${we}[ ]*`:Te?`[ ]*${Te}[ ]*`:Ne?"[ ]+":U?ke||Ue:ke?m.has(ke.charCodeAt(0))?ke:"":K?(ie=!0,`${Ue}\\p{M}*`):Ue);const Ae="[ ]*";return Ee.endsWith(Ae)&&(Ee=Ee.slice(0,Ee.length-Ae.length)),U&&K&&(v||(v=String.fromCharCode(...m)),ie=!0,Ee=`${Ee}(?=[${v}]|[^\\p{M}]|$)`),[ie,Ee]},q=new WeakSet,Ur=function(Ee){let K=l(this,L,Ln);if(K.length===0)return;const{caseSensitive:U,entireWord:ie}=l(this,he),Ae=this._pageContents[Ee],Se=this._hasDiacritics[Ee];let we=!1;typeof K=="string"?[we,K]=J(this,Z,On).call(this,K,Se):K=K.sort().reverse().map(ke=>{const[Ue,Be]=J(this,Z,On).call(this,ke,Se);return we||(we=Ue),`(${Be})`}).join("|");const Te=`g${we?"u":""}${U?"":"i"}`;K=K?new RegExp(K,Te):null,J(this,B,Br).call(this,K,ie,Ee,Ae),l(this,he).highlightAll&&J(this,ve,$t).call(this,Ee),this._resumePageIdx===Ee&&(this._resumePageIdx=null,J(this,ge,Dn).call(this));const Ne=this._pageMatches[Ee].length;this._matchesCountTotal+=Ne,l(this,Y)?Ne>0&&J(this,Je,Bn).call(this):++ut(this,z)._===this._linkService.pagesCount&&J(this,Je,Bn).call(this)},te=new WeakSet,Vr=function(){if(this._extractTextPromises.length>0)return;let Ee=Promise.resolve();const K={disableNormalization:!0};for(let U=0,ie=this._linkService.pagesCount;Uthis._pdfDocument.getPage(U+1).then(Se=>Se.getTextContent(K)).then(Se=>{const we=[];for(const Te of Se.items)we.push(Te.str),Te.hasEOL&&we.push(` +`);[this._pageContents[U],this._pageDiffs[U],this._hasDiacritics[U]]=Q(we.join("")),Ae.resolve()},Se=>{console.error(`Unable to get text content for page ${U+1}`,Se),this._pageContents[U]="",this._pageDiffs[U]=null,this._hasDiacritics[U]=!1,Ae.resolve()}))}},ve=new WeakSet,$t=function(Ee){this._scrollMatches&&this._selected.pageIdx===Ee&&(this._linkService.page=Ee+1),this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:Ee})},Oe=new WeakSet,Tt=function(){this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:-1})},Le=new WeakSet,vt=function(){const Ee=l(this,he).findPrevious,K=this._linkService.page-1,U=this._linkService.pagesCount;if(this._highlightMatches=!0,this._dirtyMatch){this._dirtyMatch=!1,this._selected.pageIdx=this._selected.matchIdx=-1,this._offset.pageIdx=K,this._offset.matchIdx=null,this._offset.wrapped=!1,this._resumePageIdx=null,this._pageMatches.length=0,this._pageMatchesLength.length=0,le(this,z,0),this._matchesCountTotal=0,J(this,Oe,Tt).call(this);for(let Se=0;Se{this._pendingFindMatches.delete(Se),J(this,q,Ur).call(this,Se)}))}if(l(this,L,Ln).length===0){J(this,H,Ct).call(this,h.FOUND);return}if(this._resumePageIdx)return;const Ae=this._offset;if(this._pagesToSearch=U,Ae.matchIdx!==null){const Se=this._pageMatches[Ae.pageIdx].length;if(!Ee&&Ae.matchIdx+10){Ae.matchIdx=Ee?Ae.matchIdx-1:Ae.matchIdx+1,J(this,ze,_t).call(this,!0);return}J(this,Me,Fn).call(this,Ee)}J(this,ge,Dn).call(this)},ne=new WeakSet,Hr=function(Ee){const K=this._offset,U=Ee.length,ie=l(this,he).findPrevious;return U?(K.matchIdx=ie?U-1:0,J(this,ze,_t).call(this,!0),!0):(J(this,Me,Fn).call(this,ie),K.wrapped&&(K.matchIdx=null,this._pagesToSearch<0)?(J(this,ze,_t).call(this,!1),!0):!1)},ge=new WeakSet,Dn=function(){this._resumePageIdx!==null&&console.error("There can only be one pending page.");let Ee=null;do{const K=this._offset.pageIdx;if(Ee=this._pageMatches[K],!Ee){this._resumePageIdx=K;break}}while(!J(this,ne,Hr).call(this,Ee))},Me=new WeakSet,Fn=function(Ee){const K=this._offset,U=this._linkService.pagesCount;K.pageIdx=Ee?K.pageIdx-1:K.pageIdx+1,K.matchIdx=null,this._pagesToSearch--,(K.pageIdx>=U||K.pageIdx<0)&&(K.pageIdx=Ee?U-1:0,K.wrapped=!0)},ze=new WeakSet,_t=function(){let Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,K=h.NOT_FOUND;const U=this._offset.wrapped;if(this._offset.wrapped=!1,Ee){const ie=this._selected.pageIdx;this._selected.pageIdx=this._offset.pageIdx,this._selected.matchIdx=this._offset.matchIdx,K=U?h.WRAPPED:h.FOUND,ie!==-1&&ie!==this._selected.pageIdx&&J(this,ve,$t).call(this,ie)}J(this,H,Ct).call(this,K,l(this,he).findPrevious),this._selected.pageIdx!==-1&&(this._scrollMatches=!0,J(this,ve,$t).call(this,this._selected.pageIdx))},He=new WeakSet,Wr=function(Ee){const K=this._pdfDocument;this._firstPageCapability.promise.then(()=>{!this._pdfDocument||K&&this._pdfDocument!==K||(this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),this._resumePageIdx&&(this._resumePageIdx=null,this._dirtyMatch=!0),J(this,H,Ct).call(this,h.FOUND),this._highlightMatches=!1,J(this,Oe,Tt).call(this))})},Xe=new WeakSet,Nn=function(){var Ae;const{pageIdx:Ee,matchIdx:K}=this._selected;let U=0,ie=this._matchesCountTotal;if(K!==-1){for(let Se=0;Seie)&&(U=ie=0),{current:U,total:ie}},Je=new WeakSet,Bn=function(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:J(this,Xe,Nn).call(this)})},H=new WeakSet,Ct=function(Ee){var U;let K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;!l(this,Y)&&(l(this,z)!==this._linkService.pagesCount||Ee===h.PENDING)||this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:Ee,previous:K,matchesCount:J(this,Xe,Nn).call(this),rawQuery:((U=l(this,he))==null?void 0:U.query)??null})},g.PDFFindController=j},(u,g,e)=>{var i=e(3),n=e(69),d=e(79);i({target:"Set",proto:!0,real:!0,forced:!d("difference")},{difference:n})},(u,g,e)=>{var i=e(4),n=e(5).f,d=e(44),h=e(48),f=e(38),a=e(56),r=e(68);u.exports=function(o,m){var v=o.target,A=o.global,b=o.stat,c,s,x,T,S,D;if(A?s=i:b?s=i[v]||f(v,{}):s=(i[v]||{}).prototype,s)for(x in m){if(S=m[x],o.dontCallGetSet?(D=n(s,x),T=D&&D.value):T=s[x],c=r(A?x:v+(b?".":"#")+x,o.forced),!c&&T!==void 0){if(typeof S==typeof T)continue;a(S,T)}(o.sham||T&&T.sham)&&d(S,"sham",!0),h(s,x,S,o)}}},function(u){var g=function(e){return e&&e.Math===Math&&e};u.exports=g(typeof globalThis=="object"&&globalThis)||g(typeof window=="object"&&window)||g(typeof self=="object"&&self)||g(typeof commonjsGlobal=="object"&&commonjsGlobal)||function(){return this}()||this||Function("return this")()},(u,g,e)=>{var i=e(6),n=e(8),d=e(10),h=e(11),f=e(12),a=e(18),r=e(39),o=e(42),m=Object.getOwnPropertyDescriptor;g.f=i?m:function(A,b){if(A=f(A),b=a(b),o)try{return m(A,b)}catch{}if(r(A,b))return h(!n(d.f,A,b),A[b])}},(u,g,e)=>{var i=e(7);u.exports=!i(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},u=>{u.exports=function(g){try{return!!g()}catch{return!0}}},(u,g,e)=>{var i=e(9),n=Function.prototype.call;u.exports=i?n.bind(n):function(){return n.apply(n,arguments)}},(u,g,e)=>{var i=e(7);u.exports=!i(function(){var n=(function(){}).bind();return typeof n!="function"||n.hasOwnProperty("prototype")})},(u,g)=>{var e={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,n=i&&!e.call({1:2},1);g.f=n?function(h){var f=i(this,h);return!!f&&f.enumerable}:e},u=>{u.exports=function(g,e){return{enumerable:!(g&1),configurable:!(g&2),writable:!(g&4),value:e}}},(u,g,e)=>{var i=e(13),n=e(16);u.exports=function(d){return i(n(d))}},(u,g,e)=>{var i=e(14),n=e(7),d=e(15),h=Object,f=i("".split);u.exports=n(function(){return!h("z").propertyIsEnumerable(0)})?function(a){return d(a)==="String"?f(a,""):h(a)}:h},(u,g,e)=>{var i=e(9),n=Function.prototype,d=n.call,h=i&&n.bind.bind(d,d);u.exports=i?h:function(f){return function(){return d.apply(f,arguments)}}},(u,g,e)=>{var i=e(14),n=i({}.toString),d=i("".slice);u.exports=function(h){return d(n(h),8,-1)}},(u,g,e)=>{var i=e(17),n=TypeError;u.exports=function(d){if(i(d))throw n("Can't call method on "+d);return d}},u=>{u.exports=function(g){return g==null}},(u,g,e)=>{var i=e(19),n=e(23);u.exports=function(d){var h=i(d,"string");return n(h)?h:h+""}},(u,g,e)=>{var i=e(8),n=e(20),d=e(23),h=e(30),f=e(33),a=e(34),r=TypeError,o=a("toPrimitive");u.exports=function(m,v){if(!n(m)||d(m))return m;var A=h(m,o),b;if(A){if(v===void 0&&(v="default"),b=i(A,m,v),!n(b)||d(b))return b;throw r("Can't convert object to primitive value")}return v===void 0&&(v="number"),f(m,v)}},(u,g,e)=>{var i=e(21),n=e(22),d=n.all;u.exports=n.IS_HTMLDDA?function(h){return typeof h=="object"?h!==null:i(h)||h===d}:function(h){return typeof h=="object"?h!==null:i(h)}},(u,g,e)=>{var i=e(22),n=i.all;u.exports=i.IS_HTMLDDA?function(d){return typeof d=="function"||d===n}:function(d){return typeof d=="function"}},u=>{var g=typeof document=="object"&&document.all,e=typeof g>"u"&&g!==void 0;u.exports={all:g,IS_HTMLDDA:e}},(u,g,e)=>{var i=e(24),n=e(21),d=e(25),h=e(26),f=Object;u.exports=h?function(a){return typeof a=="symbol"}:function(a){var r=i("Symbol");return n(r)&&d(r.prototype,f(a))}},(u,g,e)=>{var i=e(4),n=e(21),d=function(h){return n(h)?h:void 0};u.exports=function(h,f){return arguments.length<2?d(i[h]):i[h]&&i[h][f]}},(u,g,e)=>{var i=e(14);u.exports=i({}.isPrototypeOf)},(u,g,e)=>{var i=e(27);u.exports=i&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},(u,g,e)=>{var i=e(28),n=e(7),d=e(4),h=d.String;u.exports=!!Object.getOwnPropertySymbols&&!n(function(){var f=Symbol("symbol detection");return!h(f)||!(Object(f)instanceof Symbol)||!Symbol.sham&&i&&i<41})},(u,g,e)=>{var i=e(4),n=e(29),d=i.process,h=i.Deno,f=d&&d.versions||h&&h.version,a=f&&f.v8,r,o;a&&(r=a.split("."),o=r[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&n&&(r=n.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=n.match(/Chrome\/(\d+)/),r&&(o=+r[1]))),u.exports=o},u=>{u.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},(u,g,e)=>{var i=e(31),n=e(17);u.exports=function(d,h){var f=d[h];return n(f)?void 0:i(f)}},(u,g,e)=>{var i=e(21),n=e(32),d=TypeError;u.exports=function(h){if(i(h))return h;throw d(n(h)+" is not a function")}},u=>{var g=String;u.exports=function(e){try{return g(e)}catch{return"Object"}}},(u,g,e)=>{var i=e(8),n=e(21),d=e(20),h=TypeError;u.exports=function(f,a){var r,o;if(a==="string"&&n(r=f.toString)&&!d(o=i(r,f))||n(r=f.valueOf)&&!d(o=i(r,f))||a!=="string"&&n(r=f.toString)&&!d(o=i(r,f)))return o;throw h("Can't convert object to primitive value")}},(u,g,e)=>{var i=e(4),n=e(35),d=e(39),h=e(41),f=e(27),a=e(26),r=i.Symbol,o=n("wks"),m=a?r.for||r:r&&r.withoutSetter||h;u.exports=function(v){return d(o,v)||(o[v]=f&&d(r,v)?r[v]:m("Symbol."+v)),o[v]}},(u,g,e)=>{var i=e(36),n=e(37);(u.exports=function(d,h){return n[d]||(n[d]=h!==void 0?h:{})})("versions",[]).push({version:"3.32.2",mode:i?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.2/LICENSE",source:"https://github.com/zloirock/core-js"})},u=>{u.exports=!1},(u,g,e)=>{var i=e(4),n=e(38),d="__core-js_shared__",h=i[d]||n(d,{});u.exports=h},(u,g,e)=>{var i=e(4),n=Object.defineProperty;u.exports=function(d,h){try{n(i,d,{value:h,configurable:!0,writable:!0})}catch{i[d]=h}return h}},(u,g,e)=>{var i=e(14),n=e(40),d=i({}.hasOwnProperty);u.exports=Object.hasOwn||function(f,a){return d(n(f),a)}},(u,g,e)=>{var i=e(16),n=Object;u.exports=function(d){return n(i(d))}},(u,g,e)=>{var i=e(14),n=0,d=Math.random(),h=i(1 .toString);u.exports=function(f){return"Symbol("+(f===void 0?"":f)+")_"+h(++n+d,36)}},(u,g,e)=>{var i=e(6),n=e(7),d=e(43);u.exports=!i&&!n(function(){return Object.defineProperty(d("div"),"a",{get:function(){return 7}}).a!==7})},(u,g,e)=>{var i=e(4),n=e(20),d=i.document,h=n(d)&&n(d.createElement);u.exports=function(f){return h?d.createElement(f):{}}},(u,g,e)=>{var i=e(6),n=e(45),d=e(11);u.exports=i?function(h,f,a){return n.f(h,f,d(1,a))}:function(h,f,a){return h[f]=a,h}},(u,g,e)=>{var i=e(6),n=e(42),d=e(46),h=e(47),f=e(18),a=TypeError,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,m="enumerable",v="configurable",A="writable";g.f=i?d?function(c,s,x){if(h(c),s=f(s),h(x),typeof c=="function"&&s==="prototype"&&"value"in x&&A in x&&!x[A]){var T=o(c,s);T&&T[A]&&(c[s]=x.value,x={configurable:v in x?x[v]:T[v],enumerable:m in x?x[m]:T[m],writable:!1})}return r(c,s,x)}:r:function(c,s,x){if(h(c),s=f(s),h(x),n)try{return r(c,s,x)}catch{}if("get"in x||"set"in x)throw a("Accessors not supported");return"value"in x&&(c[s]=x.value),c}},(u,g,e)=>{var i=e(6),n=e(7);u.exports=i&&n(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},(u,g,e)=>{var i=e(20),n=String,d=TypeError;u.exports=function(h){if(i(h))return h;throw d(n(h)+" is not an object")}},(u,g,e)=>{var i=e(21),n=e(45),d=e(49),h=e(38);u.exports=function(f,a,r,o){o||(o={});var m=o.enumerable,v=o.name!==void 0?o.name:a;if(i(r)&&d(r,v,o),o.global)m?f[a]=r:h(a,r);else{try{o.unsafe?f[a]&&(m=!0):delete f[a]}catch{}m?f[a]=r:n.f(f,a,{value:r,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return f}},(u,g,e)=>{var i=e(14),n=e(7),d=e(21),h=e(39),f=e(6),a=e(50).CONFIGURABLE,r=e(51),o=e(52),m=o.enforce,v=o.get,A=String,b=Object.defineProperty,c=i("".slice),s=i("".replace),x=i([].join),T=f&&!n(function(){return b(function(){},"length",{value:8}).length!==8}),S=String(String).split("String"),D=u.exports=function(I,_,Q){c(A(_),0,7)==="Symbol("&&(_="["+s(A(_),/^Symbol\(([^)]*)\)/,"$1")+"]"),Q&&Q.getter&&(_="get "+_),Q&&Q.setter&&(_="set "+_),(!h(I,"name")||a&&I.name!==_)&&(f?b(I,"name",{value:_,configurable:!0}):I.name=_),T&&Q&&h(Q,"arity")&&I.length!==Q.arity&&b(I,"length",{value:Q.arity});try{Q&&h(Q,"constructor")&&Q.constructor?f&&b(I,"prototype",{writable:!1}):I.prototype&&(I.prototype=void 0)}catch{}var W=m(I);return h(W,"source")||(W.source=x(S,typeof _=="string"?_:"")),I};Function.prototype.toString=D(function(){return d(this)&&v(this).source||r(this)},"toString")},(u,g,e)=>{var i=e(6),n=e(39),d=Function.prototype,h=i&&Object.getOwnPropertyDescriptor,f=n(d,"name"),a=f&&(function(){}).name==="something",r=f&&(!i||i&&h(d,"name").configurable);u.exports={EXISTS:f,PROPER:a,CONFIGURABLE:r}},(u,g,e)=>{var i=e(14),n=e(21),d=e(37),h=i(Function.toString);n(d.inspectSource)||(d.inspectSource=function(f){return h(f)}),u.exports=d.inspectSource},(u,g,e)=>{var i=e(53),n=e(4),d=e(20),h=e(44),f=e(39),a=e(37),r=e(54),o=e(55),m="Object already initialized",v=n.TypeError,A=n.WeakMap,b,c,s,x=function(I){return s(I)?c(I):b(I,{})},T=function(I){return function(_){var Q;if(!d(_)||(Q=c(_)).type!==I)throw v("Incompatible receiver, "+I+" required");return Q}};if(i||a.state){var S=a.state||(a.state=new A);S.get=S.get,S.has=S.has,S.set=S.set,b=function(I,_){if(S.has(I))throw v(m);return _.facade=I,S.set(I,_),_},c=function(I){return S.get(I)||{}},s=function(I){return S.has(I)}}else{var D=r("state");o[D]=!0,b=function(I,_){if(f(I,D))throw v(m);return _.facade=I,h(I,D,_),_},c=function(I){return f(I,D)?I[D]:{}},s=function(I){return f(I,D)}}u.exports={set:b,get:c,has:s,enforce:x,getterFor:T}},(u,g,e)=>{var i=e(4),n=e(21),d=i.WeakMap;u.exports=n(d)&&/native code/.test(String(d))},(u,g,e)=>{var i=e(35),n=e(41),d=i("keys");u.exports=function(h){return d[h]||(d[h]=n(h))}},u=>{u.exports={}},(u,g,e)=>{var i=e(39),n=e(57),d=e(5),h=e(45);u.exports=function(f,a,r){for(var o=n(a),m=h.f,v=d.f,A=0;A{var i=e(24),n=e(14),d=e(58),h=e(67),f=e(47),a=n([].concat);u.exports=i("Reflect","ownKeys")||function(o){var m=d.f(f(o)),v=h.f;return v?a(m,v(o)):m}},(u,g,e)=>{var i=e(59),n=e(66),d=n.concat("length","prototype");g.f=Object.getOwnPropertyNames||function(f){return i(f,d)}},(u,g,e)=>{var i=e(14),n=e(39),d=e(12),h=e(60).indexOf,f=e(55),a=i([].push);u.exports=function(r,o){var m=d(r),v=0,A=[],b;for(b in m)!n(f,b)&&n(m,b)&&a(A,b);for(;o.length>v;)n(m,b=o[v++])&&(~h(A,b)||a(A,b));return A}},(u,g,e)=>{var i=e(12),n=e(61),d=e(64),h=function(f){return function(a,r,o){var m=i(a),v=d(m),A=n(o,v),b;if(f&&r!==r){for(;v>A;)if(b=m[A++],b!==b)return!0}else for(;v>A;A++)if((f||A in m)&&m[A]===r)return f||A||0;return!f&&-1}};u.exports={includes:h(!0),indexOf:h(!1)}},(u,g,e)=>{var i=e(62),n=Math.max,d=Math.min;u.exports=function(h,f){var a=i(h);return a<0?n(a+f,0):d(a,f)}},(u,g,e)=>{var i=e(63);u.exports=function(n){var d=+n;return d!==d||d===0?0:i(d)}},u=>{var g=Math.ceil,e=Math.floor;u.exports=Math.trunc||function(n){var d=+n;return(d>0?e:g)(d)}},(u,g,e)=>{var i=e(65);u.exports=function(n){return i(n.length)}},(u,g,e)=>{var i=e(62),n=Math.min;u.exports=function(d){return d>0?n(i(d),9007199254740991):0}},u=>{u.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(u,g)=>{g.f=Object.getOwnPropertySymbols},(u,g,e)=>{var i=e(7),n=e(21),d=/#|\.prototype\./,h=function(m,v){var A=a[f(m)];return A===o?!0:A===r?!1:n(v)?i(v):!!v},f=h.normalize=function(m){return String(m).replace(d,".").toLowerCase()},a=h.data={},r=h.NATIVE="N",o=h.POLYFILL="P";u.exports=h},(u,g,e)=>{var i=e(70),n=e(71),d=e(72),h=e(75),f=e(77),a=e(73),r=e(74),o=n.has,m=n.remove;u.exports=function(A){var b=i(this),c=f(A),s=d(b);return h(b)<=c.size?a(b,function(x){c.includes(x)&&m(s,x)}):r(c.getIterator(),function(x){o(b,x)&&m(s,x)}),s}},(u,g,e)=>{var i=e(71).has;u.exports=function(n){return i(n),n}},(u,g,e)=>{var i=e(14),n=Set.prototype;u.exports={Set,add:i(n.add),has:i(n.has),remove:i(n.delete),proto:n}},(u,g,e)=>{var i=e(71),n=e(73),d=i.Set,h=i.add;u.exports=function(f){var a=new d;return n(f,function(r){h(a,r)}),a}},(u,g,e)=>{var i=e(14),n=e(74),d=e(71),h=d.Set,f=d.proto,a=i(f.forEach),r=i(f.keys),o=r(new h).next;u.exports=function(m,v,A){return A?n({iterator:r(m),next:o},v):a(m,v)}},(u,g,e)=>{var i=e(8);u.exports=function(n,d,h){for(var f=h?n:n.iterator,a=n.next,r,o;!(r=i(a,f)).done;)if(o=d(r.value),o!==void 0)return o}},(u,g,e)=>{var i=e(76),n=e(71);u.exports=i(n.proto,"size","get")||function(d){return d.size}},(u,g,e)=>{var i=e(14),n=e(31);u.exports=function(d,h,f){try{return i(n(Object.getOwnPropertyDescriptor(d,h)[f]))}catch{}}},(u,g,e)=>{var i=e(31),n=e(47),d=e(8),h=e(62),f=e(78),a="Invalid size",r=RangeError,o=TypeError,m=Math.max,v=function(A,b,c,s){this.set=A,this.size=b,this.has=c,this.keys=s};v.prototype={getIterator:function(){return f(n(d(this.keys,this.set)))},includes:function(A){return d(this.has,this.set,A)}},u.exports=function(A){n(A);var b=+A.size;if(b!==b)throw o(a);var c=h(b);if(c<0)throw r(a);return new v(A,m(c,0),i(A.has),i(A.keys))}},u=>{u.exports=function(g){return{iterator:g,next:g.next,done:!1}}},(u,g,e)=>{var i=e(24),n=function(d){return{size:d,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};u.exports=function(d){var h=i("Set");try{new h()[d](n(0));try{return new h()[d](n(-1)),!1}catch{return!0}}catch{return!1}}},(u,g,e)=>{var i=e(3),n=e(7),d=e(81),h=e(79),f=!h("intersection")||n(function(){return Array.from(new Set([1,2,3]).intersection(new Set([3,2])))!=="3,2"});i({target:"Set",proto:!0,real:!0,forced:f},{intersection:d})},(u,g,e)=>{var i=e(70),n=e(71),d=e(75),h=e(77),f=e(73),a=e(74),r=n.Set,o=n.add,m=n.has;u.exports=function(A){var b=i(this),c=h(A),s=new r;return d(b)>c.size?a(c.getIterator(),function(x){m(b,x)&&o(s,x)}):f(b,function(x){c.includes(x)&&o(s,x)}),s}},(u,g,e)=>{var i=e(3),n=e(83),d=e(79);i({target:"Set",proto:!0,real:!0,forced:!d("isDisjointFrom")},{isDisjointFrom:n})},(u,g,e)=>{var i=e(70),n=e(71).has,d=e(75),h=e(77),f=e(73),a=e(74),r=e(84);u.exports=function(m){var v=i(this),A=h(m);if(d(v)<=A.size)return f(v,function(c){if(A.includes(c))return!1},!0)!==!1;var b=A.getIterator();return a(b,function(c){if(n(v,c))return r(b,"normal",!1)})!==!1}},(u,g,e)=>{var i=e(8),n=e(47),d=e(30);u.exports=function(h,f,a){var r,o;n(h);try{if(r=d(h,"return"),!r){if(f==="throw")throw a;return a}r=i(r,h)}catch(m){o=!0,r=m}if(f==="throw")throw a;if(o)throw r;return n(r),a}},(u,g,e)=>{var i=e(3),n=e(86),d=e(79);i({target:"Set",proto:!0,real:!0,forced:!d("isSubsetOf")},{isSubsetOf:n})},(u,g,e)=>{var i=e(70),n=e(75),d=e(73),h=e(77);u.exports=function(a){var r=i(this),o=h(a);return n(r)>o.size?!1:d(r,function(m){if(!o.includes(m))return!1},!0)!==!1}},(u,g,e)=>{var i=e(3),n=e(88),d=e(79);i({target:"Set",proto:!0,real:!0,forced:!d("isSupersetOf")},{isSupersetOf:n})},(u,g,e)=>{var i=e(70),n=e(71).has,d=e(75),h=e(77),f=e(74),a=e(84);u.exports=function(o){var m=i(this),v=h(o);if(d(m){var i=e(3),n=e(90),d=e(79);i({target:"Set",proto:!0,real:!0,forced:!d("symmetricDifference")},{symmetricDifference:n})},(u,g,e)=>{var i=e(70),n=e(71),d=e(72),h=e(77),f=e(74),a=n.add,r=n.has,o=n.remove;u.exports=function(v){var A=i(this),b=h(v).getIterator(),c=d(A);return f(b,function(s){r(A,s)?o(c,s):a(c,s)}),c}},(u,g,e)=>{var i=e(3),n=e(92),d=e(79);i({target:"Set",proto:!0,real:!0,forced:!d("union")},{union:n})},(u,g,e)=>{var i=e(70),n=e(71).add,d=e(72),h=e(77),f=e(74);u.exports=function(r){var o=i(this),m=h(r).getIterator(),v=d(o);return f(m,function(A){n(v,A)}),v}},(u,g,e)=>{var i=e(3),n=e(40),d=e(64),h=e(94),f=e(96),a=e(7),r=a(function(){return[].push.call({length:4294967296},1)!==4294967297}),o=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(v){return v instanceof TypeError}},m=r||!o();i({target:"Array",proto:!0,arity:1,forced:m},{push:function(A){var b=n(this),c=d(b),s=arguments.length;f(c+s);for(var x=0;x{var i=e(6),n=e(95),d=TypeError,h=Object.getOwnPropertyDescriptor,f=i&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(a){return a instanceof TypeError}}();u.exports=f?function(a,r){if(n(a)&&!h(a,"length").writable)throw d("Cannot set read only .length");return a.length=r}:function(a,r){return a.length=r}},(u,g,e)=>{var i=e(15);u.exports=Array.isArray||function(d){return i(d)==="Array"}},u=>{var g=TypeError,e=9007199254740991;u.exports=function(i){if(i>e)throw g("Maximum allowed index exceeded");return i}},(u,g,e)=>{var ve,Re,Oe,Ie,Le;Object.defineProperty(g,"__esModule",{value:!0}),g.animationStarted=g.VERTICAL_PADDING=g.UNKNOWN_SCALE=g.TextLayerMode=g.SpreadMode=g.SidebarView=g.ScrollMode=g.SCROLLBAR_PADDING=g.RenderingStates=g.ProgressBar=g.PresentationModeState=g.OutputScale=g.MIN_SCALE=g.MAX_SCALE=g.MAX_AUTO_SCALE=g.DEFAULT_SCALE_VALUE=g.DEFAULT_SCALE_DELTA=g.DEFAULT_SCALE=g.CursorTool=g.AutoPrintRegExp=void 0,g.apiPageLayoutToViewerModes=q,g.apiPageModeToSidebarView=pe,g.approximateFraction=Y,g.backtrackBeforeAllVisibleElements=oe,g.binarySearchFirstItem=he,g.docStyle=void 0,g.getActiveOrFocusedElement=se,g.getPageSizeInches=ee,g.getVisibleElements=ye,g.isPortraitOrientation=R,g.isValidRotation=P,g.isValidScrollMode=M,g.isValidSpreadMode=E,g.normalizeWheelEventDelta=L,g.normalizeWheelEventDirection=Pe,g.parseQueryString=Q,g.removeNullCharacters=j,g.roundToDivide=z,g.scrollIntoView=I,g.toggleCheckedBtn=te,g.toggleExpandedBtn=me,g.watchScroll=_,e(98),e(103),e(104),e(2),e(80),e(82),e(85),e(87),e(89),e(91),e(93);const i="auto";g.DEFAULT_SCALE_VALUE=i;const n=1;g.DEFAULT_SCALE=n;const d=1.1;g.DEFAULT_SCALE_DELTA=d;const h=.1;g.MIN_SCALE=h;const f=10;g.MAX_SCALE=f;const a=0;g.UNKNOWN_SCALE=a;const r=1.25;g.MAX_AUTO_SCALE=r;const o=40;g.SCROLLBAR_PADDING=o;const m=5;g.VERTICAL_PADDING=m;const v={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3};g.RenderingStates=v;const A={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3};g.PresentationModeState=A;const b={UNKNOWN:-1,NONE:0,THUMBS:1,OUTLINE:2,ATTACHMENTS:3,LAYERS:4};g.SidebarView=b;const c={DISABLE:0,ENABLE:1,ENABLE_PERMISSIONS:2};g.TextLayerMode=c;const s={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2,PAGE:3};g.ScrollMode=s;const x={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2};g.SpreadMode=x;const T={SELECT:0,HAND:1,ZOOM:2};g.CursorTool=T;const S=/\bprint\s*\(/;g.AutoPrintRegExp=S;class D{constructor(){const ne=window.devicePixelRatio||1;this.sx=ne,this.sy=ne}get scaled(){return this.sx!==1||this.sy!==1}}g.OutputScale=D;function I(ue,ne){let ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ge=ue.offsetParent;if(!ge){console.error("offsetParent is not set -- cannot scroll");return}let Ce=ue.offsetTop+ue.clientTop,Me=ue.offsetLeft+ue.clientLeft;for(;ge.clientHeight===ge.scrollHeight&&ge.clientWidth===ge.scrollWidth||ce&&(ge.classList.contains("markedContent")||getComputedStyle(ge).overflow==="hidden");)if(Ce+=ge.offsetTop,Me+=ge.offsetLeft,ge=ge.offsetParent,!ge)return;ne&&(ne.top!==void 0&&(Ce+=ne.top),ne.left!==void 0&&(Me+=ne.left,ge.scrollLeft=Me)),ge.scrollTop=Ce}function _(ue,ne){const ce=function(Me){Ce||(Ce=window.requestAnimationFrame(function(){Ce=null;const ze=ue.scrollLeft,_e=ge.lastX;ze!==_e&&(ge.right=ze>_e),ge.lastX=ze;const He=ue.scrollTop,Ke=ge.lastY;He!==Ke&&(ge.down=He>Ke),ge.lastY=He,ne(ge)}))},ge={right:!0,down:!0,lastX:ue.scrollLeft,lastY:ue.scrollTop,_eventHandler:ce};let Ce=null;return ue.addEventListener("scroll",ce,!0),ge}function Q(ue){const ne=new Map;for(const[ce,ge]of new URLSearchParams(ue))ne.set(ce.toLowerCase(),ge);return ne}const W=/[\x01-\x1F]/g;function j(ue){let ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return typeof ue!="string"?(console.error("The argument must be a string."),ue):(ne&&(ue=ue.replaceAll(W," ")),ue.replaceAll("\0",""))}function he(ue,ne){let ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,Ce=ue.length-1;if(Ce<0||!ne(ue[Ce]))return ue.length;if(ne(ue[ge]))return ge;for(;ge>1,Ve=ue[Me];ne(Ve)?Ce=Me:ge=Me+1}return ge}function Y(ue){if(Math.floor(ue)===ue)return[ue,1];const ne=1/ue,ce=8;if(ne>ce)return[1,ce];if(Math.floor(ne)===ne)return[1,ne];const ge=ue>1?ne:ue;let Ce=0,Me=1,Ve=1,ze=1;for(;;){const He=Ce+Ve,Ke=Me+ze;if(Ke>ce)break;ge<=He/Ke?(Ve=He,ze=Ke):(Ce=He,Me=Ke)}let _e;return ge-Ce/Me=ce&&(ge=ne[ue-1].div,Ce=ge.offsetTop+ge.clientTop);for(let Me=ue-2;Me>=0&&(ge=ne[Me].div,!(ge.offsetTop+ge.clientTop+ge.clientHeight<=Ce));--Me)ue=Me;return ue}function ye(ue){let{scrollEl:ne,views:ce,sortByVisibility:ge=!1,horizontal:Ce=!1,rtl:Me=!1}=ue;const Ve=ne.scrollTop,ze=Ve+ne.clientHeight,_e=ne.scrollLeft,He=_e+ne.clientWidth;function Ke(K){const U=K.div;return U.offsetTop+U.clientTop+U.clientHeight>Ve}function Xe(K){const U=K.div,ie=U.offsetLeft+U.clientLeft,Ae=ie+U.clientWidth;return Me?ie_e}const je=[],Je=new Set,V=ce.length;let H=he(ce,Ce?Xe:Ke);H>0&&H=ze&&(X=ke);else if((Ce?Ae:Se)>X)break;if(ke<=Ve||Se>=ze||Ne<=_e||Ae>=He)continue;const Ue=Math.max(0,Ve-Se)+Math.max(0,ke-ze),Be=Math.max(0,_e-Ae)+Math.max(0,Ne-He),re=(Te-Ue)/Te,C=(we-Be)/we,G=re*C*100|0;je.push({id:U.id,x:Ae,y:Se,view:U,percent:G,widthPercent:C*100|0}),Je.add(U.id)}const de=je[0],Ee=je.at(-1);return ge&&je.sort(function(K,U){const ie=K.percent-U.percent;return Math.abs(ie)>.001?-ie:K.id-U.id}),{first:de,last:Ee,views:je,ids:Je}}function Pe(ue){let ne=Math.hypot(ue.deltaX,ue.deltaY);const ce=Math.atan2(ue.deltaY,ue.deltaX);return-.25*Math.PI0&&l(this,Ie).setProperty("--progressBar-end-offset",`${ge}px`)}setDisableAutoFetch(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:5e3;isNaN(l(this,Oe))||(l(this,Re)&&clearTimeout(l(this,Re)),this.show(),le(this,Re,setTimeout(()=>{le(this,Re,null),this.hide()},ne)))}hide(){l(this,Le)&&(le(this,Le,!1),l(this,ve).add("hidden"))}show(){l(this,Le)||(le(this,Le,!0),l(this,ve).remove("hidden"))}}ve=new WeakMap,Re=new WeakMap,Oe=new WeakMap,Ie=new WeakMap,Le=new WeakMap,g.ProgressBar=Z;function se(){let ue=document,ne=ue.activeElement||ue.querySelector(":focus");for(;ne!=null&&ne.shadowRoot;)ue=ne.shadowRoot,ne=ue.activeElement||ue.querySelector(":focus");return ne}function q(ue){let ne=s.VERTICAL,ce=x.NONE;switch(ue){case"SinglePage":ne=s.PAGE;break;case"OneColumn":break;case"TwoPageLeft":ne=s.PAGE;case"TwoColumnLeft":ce=x.ODD;break;case"TwoPageRight":ne=s.PAGE;case"TwoColumnRight":ce=x.EVEN;break}return{scrollMode:ne,spreadMode:ce}}function pe(ue){switch(ue){case"UseNone":return b.NONE;case"UseThumbs":return b.THUMBS;case"UseOutlines":return b.OUTLINE;case"UseAttachments":return b.ATTACHMENTS;case"UseOC":return b.LAYERS}return b.NONE}function te(ue,ne){let ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;ue.classList.toggle("toggled",ne),ue.setAttribute("aria-checked",ne),ce==null||ce.classList.toggle("hidden",!ne)}function me(ue,ne){let ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;ue.classList.toggle("toggled",ne),ue.setAttribute("aria-expanded",ne),ce==null||ce.classList.toggle("hidden",!ne)}},(u,g,e)=>{var i=e(48),n=e(14),d=e(99),h=e(102),f=URLSearchParams,a=f.prototype,r=n(a.append),o=n(a.delete),m=n(a.forEach),v=n([].push),A=new f("a=1&a=2&b=3");A.delete("a",1),A.delete("b",void 0),A+""!="a=2"&&i(a,"delete",function(b){var c=arguments.length,s=c<2?void 0:arguments[1];if(c&&s===void 0)return o(this,b);var x=[];m(this,function(j,he){v(x,{key:he,value:j})}),h(c,1);for(var T=d(b),S=d(s),D=0,I=0,_=!1,Q=x.length,W;D{var i=e(100),n=String;u.exports=function(d){if(i(d)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return n(d)}},(u,g,e)=>{var i=e(101),n=e(21),d=e(15),h=e(34),f=h("toStringTag"),a=Object,r=d(function(){return arguments}())==="Arguments",o=function(m,v){try{return m[v]}catch{}};u.exports=i?d:function(m){var v,A,b;return m===void 0?"Undefined":m===null?"Null":typeof(A=o(v=a(m),f))=="string"?A:r?d(v):(b=d(v))==="Object"&&n(v.callee)?"Arguments":b}},(u,g,e)=>{var i=e(34),n=i("toStringTag"),d={};d[n]="z",u.exports=String(d)==="[object z]"},u=>{var g=TypeError;u.exports=function(e,i){if(e{var i=e(48),n=e(14),d=e(99),h=e(102),f=URLSearchParams,a=f.prototype,r=n(a.getAll),o=n(a.has),m=new f("a=1");(m.has("a",2)||!m.has("a",void 0))&&i(a,"has",function(A){var b=arguments.length,c=b<2?void 0:arguments[1];if(b&&c===void 0)return o(this,A);var s=r(this,A);h(b,1);for(var x=d(c),T=0;T{var i=e(6),n=e(14),d=e(105),h=URLSearchParams.prototype,f=n(h.forEach);i&&!("size"in h)&&d(h,"size",{get:function(){var r=0;return f(this,function(){r++}),r},configurable:!0,enumerable:!0})},(u,g,e)=>{var i=e(49),n=e(45);u.exports=function(d,h,f){return f.get&&i(f.get,h,{getter:!0}),f.set&&i(f.set,h,{setter:!0}),n.f(d,h,f)}},(u,g)=>{Object.defineProperty(g,"__esModule",{value:!0}),g.CharacterType=void 0,g.getCharacterType=A,g.getNormalizeWithNFKC=c;const e={SPACE:0,ALPHA_LETTER:1,PUNCT:2,HAN_LETTER:3,KATAKANA_LETTER:4,HIRAGANA_LETTER:5,HALFWIDTH_KATAKANA_LETTER:6,THAI_LETTER:7};g.CharacterType=e;function i(s){return s<11904}function n(s){return(s&65408)===0}function d(s){return s>=97&&s<=122||s>=65&&s<=90}function h(s){return s>=48&&s<=57}function f(s){return s===32||s===9||s===13||s===10}function a(s){return s>=13312&&s<=40959||s>=63744&&s<=64255}function r(s){return s>=12448&&s<=12543}function o(s){return s>=12352&&s<=12447}function m(s){return s>=65376&&s<=65439}function v(s){return(s&65408)===3584}function A(s){return i(s)?n(s)?f(s)?e.SPACE:d(s)||h(s)||s===95?e.ALPHA_LETTER:e.PUNCT:v(s)?e.THAI_LETTER:s===160?e.SPACE:e.ALPHA_LETTER:a(s)?e.HAN_LETTER:r(s)?e.KATAKANA_LETTER:o(s)?e.HIRAGANA_LETTER:m(s)?e.HALFWIDTH_KATAKANA_LETTER:e.ALPHA_LETTER}let b;function c(){return b||(b=" ¨ª¯²-µ¸-º¼-¾IJ-ijĿ-ŀʼnſDŽ-njDZ-dzʰ-ʸ˘-˝ˠ-ˤʹͺ;΄-΅·ϐ-ϖϰ-ϲϴ-ϵϹևٵ-ٸक़-य़ড়-ঢ়য়ਲ਼ਸ਼ਖ਼-ਜ਼ਫ਼ଡ଼-ଢ଼ำຳໜ-ໝ༌གྷཌྷདྷབྷཛྷཀྵჼᴬ-ᴮᴰ-ᴺᴼ-ᵍᵏ-ᵪᵸᶛ-ᶿẚ-ẛάέήίόύώΆ᾽-῁ΈΉ῍-῏ΐΊ῝-῟ΰΎ῭-`ΌΏ´-῾ - ‑‗․-… ″-‴‶-‷‼‾⁇-⁉⁗ ⁰-ⁱ⁴-₎ₐ-ₜ₨℀-℃℅-ℇ℉-ℓℕ-№ℙ-ℝ℠-™ℤΩℨK-ℭℯ-ℱℳ-ℹ℻-⅀ⅅ-ⅉ⅐-ⅿ↉∬-∭∯-∰〈-〉①-⓪⨌⩴-⩶⫝̸ⱼ-ⱽⵯ⺟⻳⼀-⿕ 〶〸-〺゛-゜ゟヿㄱ-ㆎ㆒-㆟㈀-㈞㈠-㉇㉐-㉾㊀-㏿ꚜ-ꚝꝰꟲ-ꟴꟸ-ꟹꭜ-ꭟꭩ豈-嗀塚晴凞-羽蘒諸逸-都飯-舘並-龎ff-stﬓ-ﬗיִײַ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-﷼︐-︙︰-﹄﹇-﹒﹔-﹦﹨-﹫ﹰ-ﹲﹴﹶ-ﻼ!-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ¢-₩"),b}},u=>{u.exports=globalThis.pdfjsLib},(u,g,e)=>{var r,o,Un,v,zr;Object.defineProperty(g,"__esModule",{value:!0}),g.SimpleLinkService=g.PDFLinkService=g.LinkTarget=void 0,e(109),e(93),e(121);var i=e(97);const n="noopener noreferrer nofollow",d={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};g.LinkTarget=d;function h(c){let{url:s,target:x,rel:T,enabled:S=!0}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!s||typeof s!="string")throw new Error('A valid "url" parameter must provided.');S?c.href=c.title=s:(c.href="",c.title=`Disabled: ${s}`,c.onclick=()=>!1);let D="";switch(x){case d.NONE:break;case d.SELF:D="_self";break;case d.BLANK:D="_blank";break;case d.PARENT:D="_parent";break;case d.TOP:D="_top";break}c.target=D,c.rel=typeof T=="string"?T:n}const b=class b{constructor(){$(this,o);$(this,r,new Map);let{eventBus:s,externalLinkTarget:x=null,externalLinkRel:T=null,ignoreDestinationZoom:S=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.eventBus=s,this.externalLinkTarget=x,this.externalLinkRel=T,this.externalLinkEnabled=!0,this._ignoreDestinationZoom=S,this.baseUrl=null,this.pdfDocument=null,this.pdfViewer=null,this.pdfHistory=null}setDocument(s){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.baseUrl=x,this.pdfDocument=s,l(this,r).clear()}setViewer(s){this.pdfViewer=s}setHistory(s){this.pdfHistory=s}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return this.pdfViewer.currentPageNumber}set page(s){this.pdfViewer.currentPageNumber=s}get rotation(){return this.pdfViewer.pagesRotation}set rotation(s){this.pdfViewer.pagesRotation=s}get isInPresentationMode(){return this.pdfViewer.isInPresentationMode}async goToDestination(s){if(!this.pdfDocument)return;let x,T;if(typeof s=="string"?(x=s,T=await this.pdfDocument.getDestination(s)):(x=null,T=await s),!Array.isArray(T)){console.error(`PDFLinkService.goToDestination: "${T}" is not a valid destination array, for dest="${s}".`);return}J(this,o,Un).call(this,s,x,T)}goToPage(s){if(!this.pdfDocument)return;const x=typeof s=="string"&&this.pdfViewer.pageLabelToPageNumber(s)||s|0;if(!(Number.isInteger(x)&&x>0&&x<=this.pagesCount)){console.error(`PDFLinkService.goToPage: "${s}" is not a valid page.`);return}this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.pushPage(x)),this.pdfViewer.scrollPageIntoView({pageNumber:x})}addLinkAttributes(s,x){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;h(s,{url:x,target:T?d.BLANK:this.externalLinkTarget,rel:this.externalLinkRel,enabled:this.externalLinkEnabled})}getDestinationHash(s){if(typeof s=="string"){if(s.length>0)return this.getAnchorUrl("#"+escape(s))}else if(Array.isArray(s)){const x=JSON.stringify(s);if(x.length>0)return this.getAnchorUrl("#"+escape(x))}return this.getAnchorUrl("")}getAnchorUrl(s){return this.baseUrl?this.baseUrl+s:s}setHash(s){var S;if(!this.pdfDocument)return;let x,T;if(s.includes("=")){const D=(0,i.parseQueryString)(s);if(D.has("search")){const I=D.get("search").replaceAll('"',""),_=D.get("phrase")==="true";this.eventBus.dispatch("findfromurlhash",{source:this,query:_?I:I.match(/\S+/g)})}if(D.has("page")&&(x=D.get("page")|0||1),D.has("zoom")){const I=D.get("zoom").split(","),_=I[0],Q=parseFloat(_);_.includes("Fit")?_==="Fit"||_==="FitB"?T=[null,{name:_}]:_==="FitH"||_==="FitBH"||_==="FitV"||_==="FitBV"?T=[null,{name:_},I.length>1?I[1]|0:null]:_==="FitR"?I.length!==5?console.error('PDFLinkService.setHash: Not enough parameters for "FitR".'):T=[null,{name:_},I[1]|0,I[2]|0,I[3]|0,I[4]|0]:console.error(`PDFLinkService.setHash: "${_}" is not a valid zoom value.`):T=[null,{name:"XYZ"},I.length>1?I[1]|0:null,I.length>2?I[2]|0:null,Q?Q/100:_]}T?this.pdfViewer.scrollPageIntoView({pageNumber:x||this.page,destArray:T,allowNegativeOffset:!0}):x&&(this.page=x),D.has("pagemode")&&this.eventBus.dispatch("pagemode",{source:this,mode:D.get("pagemode")}),D.has("nameddest")&&this.goToDestination(D.get("nameddest"))}else{T=unescape(s);try{T=JSON.parse(T),Array.isArray(T)||(T=T.toString())}catch{}if(typeof T=="string"||J(S=b,v,zr).call(S,T)){this.goToDestination(T);return}console.error(`PDFLinkService.setHash: "${unescape(s)}" is not a valid destination.`)}}executeNamedAction(s){var x,T;switch(s){case"GoBack":(x=this.pdfHistory)==null||x.back();break;case"GoForward":(T=this.pdfHistory)==null||T.forward();break;case"NextPage":this.pdfViewer.nextPage();break;case"PrevPage":this.pdfViewer.previousPage();break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1;break}this.eventBus.dispatch("namedaction",{source:this,action:s})}async executeSetOCGState(s){const x=this.pdfDocument,T=await this.pdfViewer.optionalContentConfigPromise;if(x!==this.pdfDocument)return;let S;for(const D of s.state){switch(D){case"ON":case"OFF":case"Toggle":S=D;continue}switch(S){case"ON":T.setVisibility(D,!0);break;case"OFF":T.setVisibility(D,!1);break;case"Toggle":const I=T.getGroup(D);I&&T.setVisibility(D,!I.visible);break}}this.pdfViewer.optionalContentConfigPromise=Promise.resolve(T)}cachePageRef(s,x){if(!x)return;const T=x.gen===0?`${x.num}R`:`${x.num}R${x.gen}`;l(this,r).set(T,s)}_cachedPageNumber(s){if(!s)return null;const x=s.gen===0?`${s.num}R`:`${s.num}R${s.gen}`;return l(this,r).get(x)||null}};r=new WeakMap,o=new WeakSet,Un=function(s){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,T=arguments.length>2?arguments[2]:void 0;const S=T[0];let D;if(typeof S=="object"&&S!==null){if(D=this._cachedPageNumber(S),!D){this.pdfDocument.getPageIndex(S).then(I=>{this.cachePageRef(I+1,S),J(this,o,Un).call(this,s,x,T)}).catch(()=>{console.error(`PDFLinkService.#goToDestinationHelper: "${S}" is not a valid page reference, for dest="${s}".`)});return}}else if(Number.isInteger(S))D=S+1;else{console.error(`PDFLinkService.#goToDestinationHelper: "${S}" is not a valid destination reference, for dest="${s}".`);return}if(!D||D<1||D>this.pagesCount){console.error(`PDFLinkService.#goToDestinationHelper: "${D}" is not a valid page number, for dest="${s}".`);return}this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.push({namedDest:x,explicitDest:T,pageNumber:D})),this.pdfViewer.scrollPageIntoView({pageNumber:D,destArray:T,ignoreDestinationZoom:this._ignoreDestinationZoom})},v=new WeakSet,zr=function(s){if(!Array.isArray(s))return!1;const x=s.length;if(x<2)return!1;const T=s[0];if(!(typeof T=="object"&&Number.isInteger(T.num)&&Number.isInteger(T.gen))&&!(Number.isInteger(T)&&T>=0))return!1;const S=s[1];if(!(typeof S=="object"&&typeof S.name=="string"))return!1;let D=!0;switch(S.name){case"XYZ":if(x!==5)return!1;break;case"Fit":case"FitB":return x===2;case"FitH":case"FitBH":case"FitV":case"FitBV":if(x!==3)return!1;break;case"FitR":if(x!==6)return!1;D=!1;break;default:return!1}for(let I=2;I{var i=e(3),n=e(4),d=e(110),h=e(111),f="WebAssembly",a=n[f],r=Error("e",{cause:7}).cause!==7,o=function(v,A){var b={};b[v]=h(v,A,r),i({global:!0,constructor:!0,arity:1,forced:r},b)},m=function(v,A){if(a&&a[v]){var b={};b[v]=h(f+"."+v,A,r),i({target:f,stat:!0,constructor:!0,arity:1,forced:r},b)}};o("Error",function(v){return function(b){return d(v,this,arguments)}}),o("EvalError",function(v){return function(b){return d(v,this,arguments)}}),o("RangeError",function(v){return function(b){return d(v,this,arguments)}}),o("ReferenceError",function(v){return function(b){return d(v,this,arguments)}}),o("SyntaxError",function(v){return function(b){return d(v,this,arguments)}}),o("TypeError",function(v){return function(b){return d(v,this,arguments)}}),o("URIError",function(v){return function(b){return d(v,this,arguments)}}),m("CompileError",function(v){return function(b){return d(v,this,arguments)}}),m("LinkError",function(v){return function(b){return d(v,this,arguments)}}),m("RuntimeError",function(v){return function(b){return d(v,this,arguments)}})},(u,g,e)=>{var i=e(9),n=Function.prototype,d=n.apply,h=n.call;u.exports=typeof Reflect=="object"&&Reflect.apply||(i?h.bind(d):function(){return h.apply(d,arguments)})},(u,g,e)=>{var i=e(24),n=e(39),d=e(44),h=e(25),f=e(112),a=e(56),r=e(114),o=e(115),m=e(116),v=e(117),A=e(118),b=e(6),c=e(36);u.exports=function(s,x,T,S){var D="stackTraceLimit",I=S?2:1,_=s.split("."),Q=_[_.length-1],W=i.apply(null,_);if(W){var j=W.prototype;if(!c&&n(j,"cause")&&delete j.cause,!T)return W;var he=i("Error"),Y=x(function(z,ee){var oe=m(S?ee:z,void 0),ye=S?new W(z):new W;return oe!==void 0&&d(ye,"message",oe),A(ye,Y,ye.stack,2),this&&h(j,this)&&o(ye,this,Y),arguments.length>I&&v(ye,arguments[I]),ye});if(Y.prototype=j,Q!=="Error"?f?f(Y,he):a(Y,he,{name:!0}):b&&D in W&&(r(Y,W,D),r(Y,W,"prepareStackTrace")),a(Y,W),!c)try{j.name!==Q&&d(j,"name",Q),j.constructor=Y}catch{}return Y}}},(u,g,e)=>{var i=e(76),n=e(47),d=e(113);u.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var h=!1,f={},a;try{a=i(Object.prototype,"__proto__","set"),a(f,[]),h=f instanceof Array}catch{}return function(o,m){return n(o),d(m),h?a(o,m):o.__proto__=m,o}}():void 0)},(u,g,e)=>{var i=e(21),n=String,d=TypeError;u.exports=function(h){if(typeof h=="object"||i(h))return h;throw d("Can't set "+n(h)+" as a prototype")}},(u,g,e)=>{var i=e(45).f;u.exports=function(n,d,h){h in n||i(n,h,{configurable:!0,get:function(){return d[h]},set:function(f){d[h]=f}})}},(u,g,e)=>{var i=e(21),n=e(20),d=e(112);u.exports=function(h,f,a){var r,o;return d&&i(r=f.constructor)&&r!==a&&n(o=r.prototype)&&o!==a.prototype&&d(h,o),h}},(u,g,e)=>{var i=e(99);u.exports=function(n,d){return n===void 0?arguments.length<2?"":d:i(n)}},(u,g,e)=>{var i=e(20),n=e(44);u.exports=function(d,h){i(h)&&"cause"in h&&n(d,"cause",h.cause)}},(u,g,e)=>{var i=e(44),n=e(119),d=e(120),h=Error.captureStackTrace;u.exports=function(f,a,r,o){d&&(h?h(f,a):i(f,"stack",n(r,o)))}},(u,g,e)=>{var i=e(14),n=Error,d=i("".replace),h=function(r){return String(n(r).stack)}("zxcasd"),f=/\n\s*at [^:]*:[^\n]*/,a=f.test(h);u.exports=function(r,o){if(a&&typeof r=="string"&&!n.prepareStackTrace)for(;o--;)r=d(r,f,"");return r}},(u,g,e)=>{var i=e(7),n=e(11);u.exports=!i(function(){var d=Error("a");return"stack"in d?(Object.defineProperty(d,"stack",n(1,7)),d.stack!==7):!0})},(u,g,e)=>{var i=e(3),n=e(6),d=e(4),h=e(24),f=e(14),a=e(8),r=e(21),o=e(20),m=e(95),v=e(39),A=e(99),b=e(64),c=e(122),s=e(7),x=e(123),T=e(27),S=d.JSON,D=d.Number,I=d.SyntaxError,_=S&&S.parse,Q=h("Object","keys"),W=Object.getOwnPropertyDescriptor,j=f("".charAt),he=f("".slice),Y=f(/./.exec),z=f([].push),ee=/^\d$/,oe=/^[1-9]$/,ye=/^(?:-|\d)$/,Pe=/^[\t\n\r ]$/,L=0,P=1,M=function(se,q){se=A(se);var pe=new B(se,0),te=pe.parse(),me=te.value,ve=pe.skip(Pe,te.end);if(ve{var i=e(18),n=e(45),d=e(11);u.exports=function(h,f,a){var r=i(f);r in h?n.f(h,r,d(0,a)):h[r]=a}},(u,g,e)=>{var i=e(14),n=e(39),d=SyntaxError,h=parseInt,f=String.fromCharCode,a=i("".charAt),r=i("".slice),o=i(/./.exec),m={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":` +`,"\\r":"\r","\\t":" "},v=/^[\da-f]{4}$/i,A=/^[\u0000-\u001F]$/;u.exports=function(b,c){for(var s=!0,x="";c{var f,a,Vn;Object.defineProperty(g,"__esModule",{value:!0}),g.AnnotationLayerBuilder=void 0;var i=e(107),n=e(125),d=e(97);class h{constructor(m){$(this,a);$(this,f,null);let{pageDiv:v,pdfPage:A,linkService:b,downloadManager:c,annotationStorage:s=null,imageResourcesPath:x="",renderForms:T=!0,l10n:S=n.NullL10n,enableScripting:D=!1,hasJSActionsPromise:I=null,fieldObjectsPromise:_=null,annotationCanvasMap:Q=null,accessibilityManager:W=null}=m;this.pageDiv=v,this.pdfPage=A,this.linkService=b,this.downloadManager=c,this.imageResourcesPath=x,this.renderForms=T,this.l10n=S,this.annotationStorage=s,this.enableScripting=D,this._hasJSActionsPromise=I||Promise.resolve(!1),this._fieldObjectsPromise=_||Promise.resolve(null),this._annotationCanvasMap=Q,this._accessibilityManager=W,this.annotationLayer=null,this.div=null,this._cancelled=!1,this._eventBus=b.eventBus}async render(m){var x;let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"display";if(this.div){if(this._cancelled||!this.annotationLayer)return;this.annotationLayer.update({viewport:m.clone({dontFlip:!0})});return}const[A,b,c]=await Promise.all([this.pdfPage.getAnnotations({intent:v}),this._hasJSActionsPromise,this._fieldObjectsPromise]);if(this._cancelled)return;const s=this.div=document.createElement("div");if(s.className="annotationLayer",this.pageDiv.append(s),A.length===0){this.hide();return}this.annotationLayer=new i.AnnotationLayer({div:s,accessibilityManager:this._accessibilityManager,annotationCanvasMap:this._annotationCanvasMap,l10n:this.l10n,page:this.pdfPage,viewport:m.clone({dontFlip:!0})}),await this.annotationLayer.render({annotations:A,imageResourcesPath:this.imageResourcesPath,renderForms:this.renderForms,linkService:this.linkService,downloadManager:this.downloadManager,annotationStorage:this.annotationStorage,enableScripting:this.enableScripting,hasJSActions:b,fieldObjects:c}),this.linkService.isInPresentationMode&&J(this,a,Vn).call(this,d.PresentationModeState.FULLSCREEN),l(this,f)||(le(this,f,T=>{J(this,a,Vn).call(this,T.state)}),(x=this._eventBus)==null||x._on("presentationmodechanged",l(this,f)))}cancel(){var m;this._cancelled=!0,l(this,f)&&((m=this._eventBus)==null||m._off("presentationmodechanged",l(this,f)),le(this,f,null))}hide(){this.div&&(this.div.hidden=!0)}}f=new WeakMap,a=new WeakSet,Vn=function(m){if(!this.div)return;let v=!1;switch(m){case d.PresentationModeState.FULLSCREEN:v=!0;break;case d.PresentationModeState.NORMAL:break;default:return}for(const A of this.div.childNodes)A.hasAttribute("data-internal-link")||(A.inert=v)},g.AnnotationLayerBuilder=h},(u,g)=>{Object.defineProperty(g,"__esModule",{value:!0}),g.NullL10n=void 0,g.getL10nFallback=i;const e={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}} × {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} × {{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…",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"};e.print_progress_percent="{{progress}}%";function i(h,f){switch(h){case"find_match_count":h=`find_match_count[${f.total===1?"one":"other"}]`;break;case"find_match_count_limit":h=`find_match_count_limit[${f.limit===1?"one":"other"}]`;break}return e[h]||""}function n(h,f){return f?h.replaceAll(/\{\{\s*(\w+)\s*\}\}/g,(a,r)=>r in f?f[r]:"{{"+r+"}}"):h}const d={async getLanguage(){return"en-us"},async getDirection(){return"ltr"},async get(h){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:i(h,f);return n(a,f)},async translate(h){}};g.NullL10n=d},(u,g,e)=>{var h;Object.defineProperty(g,"__esModule",{value:!0}),g.DownloadManager=void 0,e(109),e(98),e(103),e(104);var i=e(107);function n(f,a){const r=document.createElement("a");if(!r.click)throw new Error('DownloadManager: "a.click()" is not supported.');r.href=f,r.target="_parent","download"in r&&(r.download=a),(document.body||document.documentElement).append(r),r.click(),r.remove()}class d{constructor(){$(this,h,new WeakMap)}downloadUrl(a,r,o){if(!(0,i.createValidAbsoluteUrl)(a,"http://example.com")){console.error(`downloadUrl - not a valid URL: ${a}`);return}n(a+"#pdfjs.action=download",r)}downloadData(a,r,o){const m=URL.createObjectURL(new Blob([a],{type:o}));n(m,r)}openOrDownloadData(a,r,o){const v=(0,i.isPdfFile)(o)?"application/pdf":"";return this.downloadData(r,o,v),!1}download(a,r,o,m){const v=URL.createObjectURL(a);n(v,o)}}h=new WeakMap,g.DownloadManager=d},(u,g,e)=>{var f;Object.defineProperty(g,"__esModule",{value:!0}),g.WaitOnType=g.EventBus=g.AutomationEventBus=void 0,g.waitOnEventOrTimeout=n,e(109),e(93);const i={EVENT:"event",TIMEOUT:"timeout"};g.WaitOnType=i;function n(a){let{target:r,name:o,delay:m=0}=a;return new Promise(function(v,A){if(typeof r!="object"||!(o&&typeof o=="string")||!(Number.isInteger(m)&&m>=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");function b(T){r instanceof d?r._off(o,c):r.removeEventListener(o,c),x&&clearTimeout(x),v(T)}const c=b.bind(null,i.EVENT);r instanceof d?r._on(o,c):r.addEventListener(o,c);const s=b.bind(null,i.TIMEOUT),x=setTimeout(s,m)})}class d{constructor(){$(this,f,Object.create(null))}on(r,o){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;this._on(r,o,{external:!0,once:m==null?void 0:m.once})}off(r,o){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;this._off(r,o,{external:!0,once:m==null?void 0:m.once})}dispatch(r,o){const m=l(this,f)[r];if(!m||m.length===0)return;let v;for(const{listener:A,external:b,once:c}of m.slice(0)){if(c&&this._off(r,A),b){(v||(v=[])).push(A);continue}A(o)}if(v){for(const A of v)A(o);v=null}}_on(r,o){var A;let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;((A=l(this,f))[r]||(A[r]=[])).push({listener:o,external:(m==null?void 0:m.external)===!0,once:(m==null?void 0:m.once)===!0})}_off(r,o){const m=l(this,f)[r];if(m){for(let v=0,A=m.length;v{Object.defineProperty(g,"__esModule",{value:!0}),g.GenericL10n=void 0,e(129);var i=e(125);const n={en:"en-US",es:"es-ES",fy:"fy-NL",ga:"ga-IE",gu:"gu-IN",hi:"hi-IN",hy:"hy-AM",nb:"nb-NO",ne:"ne-NP",nn:"nn-NO",pa:"pa-IN",pt:"pt-PT",sv:"sv-SE",zh:"zh-CN"};function d(f){return n[f==null?void 0:f.toLowerCase()]||f}class h{constructor(a){const{webL10n:r}=document;this._lang=a,this._ready=new Promise((o,m)=>{r.setLanguage(d(a),()=>{o(r)})})}async getLanguage(){return(await this._ready).getLanguage()}async getDirection(){return(await this._ready).getDirection()}async get(a){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:(0,i.getL10nFallback)(a,r);return(await this._ready).get(a,r,o)}async translate(a){return(await this._ready).translate(a)}}g.GenericL10n=h},(u,g,e)=>{e(121),document.webL10n=function(i,n){var d={},h="",f="textContent",a="",r={},o="loading",m=!0;function v(){return n.querySelectorAll('link[type="application/l10n"]')}function A(){var Y=n.querySelector('script[type="application/l10n"]');return Y?JSON.parse(Y.innerHTML):null}function b(Y){return Y?Y.querySelectorAll("*[data-l10n-id]"):[]}function c(Y){if(!Y)return{};var z=Y.getAttribute("data-l10n-id"),ee=Y.getAttribute("data-l10n-args"),oe={};if(ee)try{oe=JSON.parse(ee)}catch{console.warn("could not parse arguments for #"+z)}return{id:z,args:oe}}function s(Y,z,ee){z=z||function(Pe){},ee=ee||function(){};var oe=new XMLHttpRequest;oe.open("GET",Y,m),oe.overrideMimeType&&oe.overrideMimeType("text/plain; charset=utf-8"),oe.onreadystatechange=function(){oe.readyState==4&&(oe.status==200||oe.status===0?z(oe.responseText):ee())},oe.onerror=ee,oe.ontimeout=ee;try{oe.send(null)}catch{ee()}}function x(Y,z,ee,oe){var ye=Y.replace(/[^\/]*$/,"")||"./";function Pe(P){return P.lastIndexOf("\\")<0?P:P.replace(/\\\\/g,"\\").replace(/\\n/g,` +`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\{/g,"{").replace(/\\}/g,"}").replace(/\\"/g,'"').replace(/\\'/g,"'")}function L(P,M){var E={},R=/^\s*|\s*$/,O=/^\s*#|^\s*$/,B=/^\s*\[(.*)\]\s*$/,F=/^\s*@import\s+url\((.*)\)\s*$/i,Z=/^([^=\s]*)\s*=\s*(.+)$/;function se(pe,te,me){var ve=pe.replace(R,"").split(/[\r\n]+/),Re="*",Oe=z.split("-",1)[0],Ie=!1,Le="";function ue(){for(;;){if(!ve.length){me();return}var ne=ve.shift();if(!O.test(ne)){if(te){if(Le=B.exec(ne),Le){Re=Le[1].toLowerCase(),Ie=Re!=="*"&&Re!==z&&Re!==Oe;continue}else if(Ie)continue;if(Le=F.exec(ne),Le){q(ye+Le[1],ue);return}}var ce=ne.match(Z);ce&&ce.length==3&&(E[ce[1]]=Pe(ce[2]))}}}ue()}function q(pe,te){s(pe,function(me){se(me,!1,te)},function(){console.warn(pe+" not found."),te()})}se(P,!0,function(){M(E)})}s(Y,function(P){h+=P,L(P,function(M){for(var E in M){var R,O,B=E.lastIndexOf(".");B>0?(R=E.substring(0,B),O=E.substring(B+1)):(R=E,O=f),d[R]||(d[R]={}),d[R][O]=M[E]}ee&&ee()})},oe)}function T(Y,z){Y&&(Y=Y.toLowerCase()),z=z||function(){},S(),a=Y;var ee=v(),oe=ee.length;if(oe===0){var ye=A();if(ye&&ye.locales&&ye.default_locale){if(console.log("using the embedded JSON directory, early way out"),d=ye.locales[Y],!d){var Pe=ye.default_locale.toLowerCase();for(var L in ye.locales)if(L=L.toLowerCase(),L===Y){d=ye.locales[Y];break}else L===Pe&&(d=ye.locales[Pe])}z()}else console.log("no resource to load, early way out");o="complete";return}var P=null,M=0;P=function(){M++,M>=oe&&(z(),o="complete")};function E(B){var F=B.href;this.load=function(Z,se){x(F,Z,se,function(){console.warn(F+" not found."),console.warn('"'+Z+'" resource not found'),a="",se()})}}for(var R=0;R0&&(ye=Y.substring(oe+1),Y=Y.substring(0,oe));var Pe;ee&&(Pe={},Pe[ye]=ee);var L=I(Y,z,Pe);return L&&ye in L?L[ye]:"{{"+Y+"}}"},getData:function(){return d},getText:function(){return h},getLanguage:function(){return a},setLanguage:function(Y,z){T(Y,function(){z&&z()})},getDirection:function(){var Y=["ar","he","fa","ps","ur"],z=a.split("-",1)[0];return Y.indexOf(z)>=0?"rtl":"ltr"},translate:he,getReadyState:function(){return o},ready:function(Y){if(Y)o=="complete"||o=="interactive"?i.setTimeout(function(){Y()}):n.addEventListener&&n.addEventListener("localized",function z(){n.removeEventListener("localized",z),Y()});else return}}}(window,document)},(u,g,e)=>{Object.defineProperty(g,"__esModule",{value:!0}),g.PDFHistory=void 0,g.isDestArraysEqual=m,g.isDestHashesEqual=o;var i=e(97),n=e(127);const d=1e3,h=50,f=1e3;function a(){return document.location.hash}class r{constructor(A){let{linkService:b,eventBus:c}=A;this.linkService=b,this.eventBus=c,this._initialized=!1,this._fingerprint="",this.reset(),this._boundEvents=null,this.eventBus._on("pagesinit",()=>{this._isPagesLoaded=!1,this.eventBus._on("pagesloaded",s=>{this._isPagesLoaded=!!s.pagesCount},{once:!0})})}initialize(A){let{fingerprint:b,resetHistory:c=!1,updateUrl:s=!1}=A;if(!b||typeof b!="string"){console.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.');return}this._initialized&&this.reset();const x=this._fingerprint!==""&&this._fingerprint!==b;this._fingerprint=b,this._updateUrl=s===!0,this._initialized=!0,this._bindEvents();const T=window.history.state;if(this._popStateInProgress=!1,this._blockHashChange=0,this._currentHash=a(),this._numPositionUpdates=0,this._uid=this._maxUid=0,this._destination=null,this._position=null,!this._isValidState(T,!0)||c){const{hash:D,page:I,rotation:_}=this._parseCurrentHash(!0);if(!D||x||c){this._pushOrReplaceState(null,!0);return}this._pushOrReplaceState({hash:D,page:I,rotation:_},!0);return}const S=T.destination;this._updateInternalState(S,T.uid,!0),S.rotation!==void 0&&(this._initialRotation=S.rotation),S.dest?(this._initialBookmark=JSON.stringify(S.dest),this._destination.page=null):S.hash?this._initialBookmark=S.hash:S.page&&(this._initialBookmark=`page=${S.page}`)}reset(){this._initialized&&(this._pageHide(),this._initialized=!1,this._unbindEvents()),this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._initialBookmark=null,this._initialRotation=null}push(A){let{namedDest:b=null,explicitDest:c,pageNumber:s}=A;if(!this._initialized)return;if(b&&typeof b!="string"){console.error(`PDFHistory.push: "${b}" is not a valid namedDest parameter.`);return}else if(Array.isArray(c)){if(!this._isValidPage(s)&&(s!==null||this._destination)){console.error(`PDFHistory.push: "${s}" is not a valid pageNumber parameter.`);return}}else{console.error(`PDFHistory.push: "${c}" is not a valid explicitDest parameter.`);return}const x=b||JSON.stringify(c);if(!x)return;let T=!1;if(this._destination&&(o(this._destination.hash,x)||m(this._destination.dest,c))){if(this._destination.page)return;T=!0}this._popStateInProgress&&!T||(this._pushOrReplaceState({dest:c,hash:x,page:s,rotation:this.linkService.rotation},T),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then(()=>{this._popStateInProgress=!1})))}pushPage(A){var b;if(this._initialized){if(!this._isValidPage(A)){console.error(`PDFHistory.pushPage: "${A}" is not a valid page number.`);return}((b=this._destination)==null?void 0:b.page)!==A&&(this._popStateInProgress||(this._pushOrReplaceState({dest:null,hash:`page=${A}`,page:A,rotation:this.linkService.rotation}),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then(()=>{this._popStateInProgress=!1}))))}}pushCurrentPosition(){!this._initialized||this._popStateInProgress||this._tryPushCurrentPosition()}back(){if(!this._initialized||this._popStateInProgress)return;const A=window.history.state;this._isValidState(A)&&A.uid>0&&window.history.back()}forward(){if(!this._initialized||this._popStateInProgress)return;const A=window.history.state;this._isValidState(A)&&A.uid0)}get initialBookmark(){return this._initialized?this._initialBookmark:null}get initialRotation(){return this._initialized?this._initialRotation:null}_pushOrReplaceState(A){const c=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1)||!this._destination,s={fingerprint:this._fingerprint,uid:c?this._uid:this._uid+1,destination:A};this._updateInternalState(A,s.uid);let x;if(this._updateUrl&&(A!=null&&A.hash)){const T=document.location.href.split("#")[0];T.startsWith("file://")||(x=`${T}#${A.hash}`)}c?window.history.replaceState(s,"",x):window.history.pushState(s,"",x)}_tryPushCurrentPosition(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!this._position)return;let b=this._position;if(A&&(b=Object.assign(Object.create(null),this._position),b.temporary=!0),!this._destination){this._pushOrReplaceState(b);return}if(this._destination.temporary){this._pushOrReplaceState(b,!0);return}if(this._destination.hash===b.hash||!this._destination.page&&this._numPositionUpdates<=h)return;let c=!1;if(this._destination.page>=b.first&&this._destination.page<=b.page){if(this._destination.dest!==void 0||!this._destination.first)return;c=!0}this._pushOrReplaceState(b,c)}_isValidPage(A){return Number.isInteger(A)&&A>0&&A<=this.linkService.pagesCount}_isValidState(A){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!A)return!1;if(A.fingerprint!==this._fingerprint)if(b){if(typeof A.fingerprint!="string"||A.fingerprint.length!==this._fingerprint.length)return!1;const[c]=performance.getEntriesByType("navigation");if((c==null?void 0:c.type)!=="reload")return!1}else return!1;return!(!Number.isInteger(A.uid)||A.uid<0||A.destination===null||typeof A.destination!="object")}_updateInternalState(A,b){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),c&&(A!=null&&A.temporary)&&delete A.temporary,this._destination=A,this._uid=b,this._maxUid=Math.max(this._maxUid,b),this._numPositionUpdates=0}_parseCurrentHash(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const b=unescape(a()).substring(1),c=(0,i.parseQueryString)(b),s=c.get("nameddest")||"";let x=c.get("page")|0;return(!this._isValidPage(x)||A&&s.length>0)&&(x=null),{hash:b,page:x,rotation:this.linkService.rotation}}_updateViewarea(A){let{location:b}=A;this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._position={hash:b.pdfOpenParams.substring(1),page:this.linkService.page,first:b.pageNumber,rotation:b.rotation},!this._popStateInProgress&&(this._isPagesLoaded&&this._destination&&!this._destination.page&&this._numPositionUpdates++,this._updateViewareaTimeout=setTimeout(()=>{this._popStateInProgress||this._tryPushCurrentPosition(!0),this._updateViewareaTimeout=null},f))}_popState(A){let{state:b}=A;const c=a(),s=this._currentHash!==c;if(this._currentHash=c,!b){this._uid++;const{hash:T,page:S,rotation:D}=this._parseCurrentHash();this._pushOrReplaceState({hash:T,page:S,rotation:D},!0);return}if(!this._isValidState(b))return;this._popStateInProgress=!0,s&&(this._blockHashChange++,(0,n.waitOnEventOrTimeout)({target:window,name:"hashchange",delay:d}).then(()=>{this._blockHashChange--}));const x=b.destination;this._updateInternalState(x,b.uid,!0),(0,i.isValidRotation)(x.rotation)&&(this.linkService.rotation=x.rotation),x.dest?this.linkService.goToDestination(x.dest):x.hash?this.linkService.setHash(x.hash):x.page&&(this.linkService.page=x.page),Promise.resolve().then(()=>{this._popStateInProgress=!1})}_pageHide(){(!this._destination||this._destination.temporary)&&this._tryPushCurrentPosition()}_bindEvents(){this._boundEvents||(this._boundEvents={updateViewarea:this._updateViewarea.bind(this),popState:this._popState.bind(this),pageHide:this._pageHide.bind(this)},this.eventBus._on("updateviewarea",this._boundEvents.updateViewarea),window.addEventListener("popstate",this._boundEvents.popState),window.addEventListener("pagehide",this._boundEvents.pageHide))}_unbindEvents(){this._boundEvents&&(this.eventBus._off("updateviewarea",this._boundEvents.updateViewarea),window.removeEventListener("popstate",this._boundEvents.popState),window.removeEventListener("pagehide",this._boundEvents.pageHide),this._boundEvents=null)}}g.PDFHistory=r;function o(v,A){return typeof v!="string"||typeof A!="string"?!1:v===A||(0,i.parseQueryString)(v).get("nameddest")===A}function m(v,A){function b(c,s){if(typeof c!=typeof s||Array.isArray(c)||Array.isArray(s))return!1;if(c!==null&&typeof c=="object"&&s!==null){if(Object.keys(c).length!==Object.keys(s).length)return!1;for(const x in c)if(!b(c[x],s[x]))return!1;return!0}return c===s||Number.isNaN(c)&&Number.isNaN(s)}if(!(Array.isArray(v)&&Array.isArray(A))||v.length!==A.length)return!1;for(let c=0,s=v.length;c{var T,S,D,I,_,Q,W,j,he,Y,z,Gt,oe,Hn,Pe,Wn,P,zn,E,$n,O,$r,F,_r,se,_n;Object.defineProperty(g,"__esModule",{value:!0}),g.PDFPageView=void 0,e(93),e(109);var i=e(107),n=e(97),d=e(132),h=e(124),f=e(133),a=e(125),r=e(108),o=e(134),m=e(135),v=e(136),A=e(137),b=e(138);const c=f.compatibilityParams.maxCanvasPixels||16777216,s=()=>({annotationEditorUIManager:null,annotationStorage:null,downloadManager:null,enableScripting:!1,fieldObjectsPromise:null,findController:null,hasJSActionsPromise:null,get linkService(){return new r.SimpleLinkService}});class x{constructor(te){$(this,z);$(this,oe);$(this,Pe);$(this,P);$(this,E);$(this,O);$(this,F);$(this,se);$(this,T,i.AnnotationMode.ENABLE_FORMS);$(this,S,!1);$(this,D,null);$(this,I,null);$(this,_,null);$(this,Q,null);$(this,W,n.RenderingStates.INITIAL);$(this,j,n.TextLayerMode.ENABLE);$(this,he,{directDrawing:!0,initialOptionalContent:!0,regularAnnotations:!0});$(this,Y,new WeakMap);var Oe;const me=te.container,ve=te.defaultViewport;this.id=te.id,this.renderingId="page"+this.id,le(this,D,te.layerProperties||s),this.pdfPage=null,this.pageLabel=null,this.rotation=0,this.scale=te.scale||n.DEFAULT_SCALE,this.viewport=ve,this.pdfPageRotate=ve.rotation,this._optionalContentConfigPromise=te.optionalContentConfigPromise||null,le(this,j,te.textLayerMode??n.TextLayerMode.ENABLE),le(this,T,te.annotationMode??i.AnnotationMode.ENABLE_FORMS),this.imageResourcesPath=te.imageResourcesPath||"",this.isOffscreenCanvasSupported=te.isOffscreenCanvasSupported??!0,this.maxCanvasPixels=te.maxCanvasPixels??c,this.pageColors=te.pageColors||null,this.eventBus=te.eventBus,this.renderingQueue=te.renderingQueue,this.l10n=te.l10n||a.NullL10n,this.renderTask=null,this.resume=null,this._isStandalone=!((Oe=this.renderingQueue)!=null&&Oe.hasViewer()),this._container=me,te.useOnlyCssZoom&&(console.error("useOnlyCssZoom was removed, please use `maxCanvasPixels = 0` instead."),this.maxCanvasPixels=0),this._annotationCanvasMap=null,this.annotationLayer=null,this.annotationEditorLayer=null,this.textLayer=null,this.zoomLayer=null,this.xfaLayer=null,this.structTreeLayer=null;const Re=document.createElement("div");if(Re.className="page",Re.setAttribute("data-page-number",this.id),Re.setAttribute("role","region"),this.l10n.get("page_landmark",{page:this.id}).then(Ie=>{Re.setAttribute("aria-label",Ie)}),this.div=Re,J(this,z,Gt).call(this),me==null||me.append(Re),this._isStandalone){me==null||me.style.setProperty("--scale-factor",this.scale*i.PixelsPerInch.PDF_TO_CSS_UNITS);const{optionalContentConfigPromise:Ie}=te;Ie&&Ie.then(Le=>{Ie===this._optionalContentConfigPromise&&(l(this,he).initialOptionalContent=Le.hasInitialVisibility)})}}get renderingState(){return l(this,W)}set renderingState(te){if(te!==l(this,W))switch(le(this,W,te),l(this,I)&&(clearTimeout(l(this,I)),le(this,I,null)),te){case n.RenderingStates.PAUSED:this.div.classList.remove("loading");break;case n.RenderingStates.RUNNING:this.div.classList.add("loadingIcon"),le(this,I,setTimeout(()=>{this.div.classList.add("loading"),le(this,I,null)},0));break;case n.RenderingStates.INITIAL:case n.RenderingStates.FINISHED:this.div.classList.remove("loadingIcon","loading");break}}setPdfPage(te){var ve,Re,Oe;this._isStandalone&&(((ve=this.pageColors)==null?void 0:ve.foreground)==="CanvasText"||((Re=this.pageColors)==null?void 0:Re.background)==="Canvas")&&((Oe=this._container)==null||Oe.style.setProperty("--hcm-highligh-filter",te.filterFactory.addHighlightHCMFilter("CanvasText","Canvas","HighlightText","Highlight"))),this.pdfPage=te,this.pdfPageRotate=te.rotate;const me=(this.rotation+this.pdfPageRotate)%360;this.viewport=te.getViewport({scale:this.scale*i.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:me}),J(this,z,Gt).call(this),this.reset()}destroy(){var te;this.reset(),(te=this.pdfPage)==null||te.cleanup()}get _textHighlighter(){return(0,i.shadow)(this,"_textHighlighter",new v.TextHighlighter({pageIndex:this.id-1,eventBus:this.eventBus,findController:l(this,D).call(this).findController}))}_resetZoomLayer(){let te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!this.zoomLayer)return;const me=this.zoomLayer.firstChild;l(this,Y).delete(me),me.width=0,me.height=0,te&&this.zoomLayer.remove(),this.zoomLayer=null}reset(){var Me,Ve,ze,_e,He;let{keepZoomLayer:te=!1,keepAnnotationLayer:me=!1,keepAnnotationEditorLayer:ve=!1,keepXfaLayer:Re=!1,keepTextLayer:Oe=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.cancelRendering({keepAnnotationLayer:me,keepAnnotationEditorLayer:ve,keepXfaLayer:Re,keepTextLayer:Oe}),this.renderingState=n.RenderingStates.INITIAL;const Ie=this.div,Le=Ie.childNodes,ue=te&&this.zoomLayer||null,ne=me&&((Me=this.annotationLayer)==null?void 0:Me.div)||null,ce=ve&&((Ve=this.annotationEditorLayer)==null?void 0:Ve.div)||null,ge=Re&&((ze=this.xfaLayer)==null?void 0:ze.div)||null,Ce=Oe&&((_e=this.textLayer)==null?void 0:_e.div)||null;for(let Ke=Le.length-1;Ke>=0;Ke--){const Xe=Le[Ke];switch(Xe){case ue:case ne:case ce:case ge:case Ce:continue}Xe.remove()}Ie.removeAttribute("data-loaded"),ne&&this.annotationLayer.hide(),ce&&this.annotationEditorLayer.hide(),ge&&this.xfaLayer.hide(),Ce&&this.textLayer.hide(),(He=this.structTreeLayer)==null||He.hide(),ue||(this.canvas&&(l(this,Y).delete(this.canvas),this.canvas.width=0,this.canvas.height=0,delete this.canvas),this._resetZoomLayer())}update(te){var Le;let{scale:me=0,rotation:ve=null,optionalContentConfigPromise:Re=null,drawingDelay:Oe=-1}=te;this.scale=me||this.scale,typeof ve=="number"&&(this.rotation=ve),Re instanceof Promise&&(this._optionalContentConfigPromise=Re,Re.then(ue=>{Re===this._optionalContentConfigPromise&&(l(this,he).initialOptionalContent=ue.hasInitialVisibility)})),l(this,he).directDrawing=!0;const Ie=(this.rotation+this.pdfPageRotate)%360;if(this.viewport=this.viewport.clone({scale:this.scale*i.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:Ie}),J(this,z,Gt).call(this),this._isStandalone&&((Le=this._container)==null||Le.style.setProperty("--scale-factor",this.viewport.scale)),this.canvas){let ue=!1;if(l(this,S)){if(this.maxCanvasPixels===0)ue=!0;else if(this.maxCanvasPixels>0){const{width:ce,height:ge}=this.viewport,{sx:Ce,sy:Me}=this.outputScale;ue=(Math.floor(ce)*Ce|0)*(Math.floor(ge)*Me|0)>this.maxCanvasPixels}}const ne=!ue&&Oe>=0&&Oe<1e3;if(ne||ue){if(ne&&this.renderingState!==n.RenderingStates.FINISHED&&(this.cancelRendering({keepZoomLayer:!0,keepAnnotationLayer:!0,keepAnnotationEditorLayer:!0,keepXfaLayer:!0,keepTextLayer:!0,cancelExtraDelay:Oe}),this.renderingState=n.RenderingStates.FINISHED,l(this,he).directDrawing=!1),this.cssTransform({target:this.canvas,redrawAnnotationLayer:!0,redrawAnnotationEditorLayer:!0,redrawXfaLayer:!0,redrawTextLayer:!ne,hideTextLayer:ne}),ne)return;this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now(),error:l(this,Q)});return}!this.zoomLayer&&!this.canvas.hidden&&(this.zoomLayer=this.canvas.parentNode,this.zoomLayer.style.position="absolute")}this.zoomLayer&&this.cssTransform({target:this.zoomLayer.firstChild}),this.reset({keepZoomLayer:!0,keepAnnotationLayer:!0,keepAnnotationEditorLayer:!0,keepXfaLayer:!0,keepTextLayer:!0})}cancelRendering(){var Ie;let{keepAnnotationLayer:te=!1,keepAnnotationEditorLayer:me=!1,keepXfaLayer:ve=!1,keepTextLayer:Re=!1,cancelExtraDelay:Oe=0}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.renderTask&&(this.renderTask.cancel(Oe),this.renderTask=null),this.resume=null,this.textLayer&&(!Re||!this.textLayer.div)&&(this.textLayer.cancel(),this.textLayer=null),this.structTreeLayer&&!this.textLayer&&(this.structTreeLayer=null),this.annotationLayer&&(!te||!this.annotationLayer.div)&&(this.annotationLayer.cancel(),this.annotationLayer=null,this._annotationCanvasMap=null),this.annotationEditorLayer&&(!me||!this.annotationEditorLayer.div)&&(this.annotationEditorLayer.cancel(),this.annotationEditorLayer=null),this.xfaLayer&&(!ve||!this.xfaLayer.div)&&(this.xfaLayer.cancel(),this.xfaLayer=null,(Ie=this._textHighlighter)==null||Ie.disable())}cssTransform(te){var ne;let{target:me,redrawAnnotationLayer:ve=!1,redrawAnnotationEditorLayer:Re=!1,redrawXfaLayer:Oe=!1,redrawTextLayer:Ie=!1,hideTextLayer:Le=!1}=te;if(!me.hasAttribute("zooming")){me.setAttribute("zooming",!0);const{style:ce}=me;ce.width=ce.height=""}const ue=l(this,Y).get(me);if(this.viewport!==ue){const ce=this.viewport.rotation-ue.rotation,ge=Math.abs(ce);let Ce=1,Me=1;if(ge===90||ge===270){const{width:Ve,height:ze}=this.viewport;Ce=ze/Ve,Me=Ve/ze}me.style.transform=`rotate(${ce}deg) scale(${Ce}, ${Me})`}ve&&this.annotationLayer&&J(this,oe,Hn).call(this),Re&&this.annotationEditorLayer&&J(this,Pe,Wn).call(this),Oe&&this.xfaLayer&&J(this,P,zn).call(this),this.textLayer&&(Le?(this.textLayer.hide(),(ne=this.structTreeLayer)==null||ne.hide()):Ie&&J(this,E,$n).call(this))}get width(){return this.viewport.width}get height(){return this.viewport.height}getPagePoint(te,me){return this.viewport.convertToPdfPoint(te,me)}async draw(){this.renderingState!==n.RenderingStates.INITIAL&&(console.error("Must be in new state before drawing"),this.reset());const{div:te,l10n:me,pageColors:ve,pdfPage:Re,viewport:Oe}=this;if(!Re)throw this.renderingState=n.RenderingStates.FINISHED,new Error("pdfPage is not loaded");this.renderingState=n.RenderingStates.RUNNING;const Ie=document.createElement("div");if(Ie.classList.add("canvasWrapper"),te.append(Ie),!this.textLayer&&l(this,j)!==n.TextLayerMode.DISABLE&&!Re.isPureXfa&&(this._accessibilityManager||(this._accessibilityManager=new m.TextAccessibilityManager),this.textLayer=new A.TextLayerBuilder({highlighter:this._textHighlighter,accessibilityManager:this._accessibilityManager,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported,enablePermissions:l(this,j)===n.TextLayerMode.ENABLE_PERMISSIONS}),te.append(this.textLayer.div)),!this.annotationLayer&&l(this,T)!==i.AnnotationMode.DISABLE){const{annotationStorage:V,downloadManager:H,enableScripting:X,fieldObjectsPromise:de,hasJSActionsPromise:Ee,linkService:K}=l(this,D).call(this);this._annotationCanvasMap||(this._annotationCanvasMap=new Map),this.annotationLayer=new h.AnnotationLayerBuilder({pageDiv:te,pdfPage:Re,annotationStorage:V,imageResourcesPath:this.imageResourcesPath,renderForms:l(this,T)===i.AnnotationMode.ENABLE_FORMS,linkService:K,downloadManager:H,l10n:me,enableScripting:X,hasJSActionsPromise:Ee,fieldObjectsPromise:de,annotationCanvasMap:this._annotationCanvasMap,accessibilityManager:this._accessibilityManager})}const Le=V=>{if(Ce==null||Ce(!1),this.renderingQueue&&!this.renderingQueue.isHighestPriority(this)){this.renderingState=n.RenderingStates.PAUSED,this.resume=()=>{this.renderingState=n.RenderingStates.RUNNING,V()};return}V()},{width:ue,height:ne}=Oe,ce=document.createElement("canvas");ce.setAttribute("role","presentation"),ce.hidden=!0;const ge=!!(ve!=null&&ve.background&&(ve!=null&&ve.foreground));let Ce=V=>{(!ge||V)&&(ce.hidden=!1,Ce=null)};Ie.append(ce),this.canvas=ce;const Me=ce.getContext("2d",{alpha:!1}),Ve=this.outputScale=new n.OutputScale;if(this.maxCanvasPixels===0){const V=1/this.scale;Ve.sx*=V,Ve.sy*=V,le(this,S,!0)}else if(this.maxCanvasPixels>0){const V=ue*ne,H=Math.sqrt(this.maxCanvasPixels/V);Ve.sx>H||Ve.sy>H?(Ve.sx=H,Ve.sy=H,le(this,S,!0)):le(this,S,!1)}const ze=(0,n.approximateFraction)(Ve.sx),_e=(0,n.approximateFraction)(Ve.sy);ce.width=(0,n.roundToDivide)(ue*Ve.sx,ze[0]),ce.height=(0,n.roundToDivide)(ne*Ve.sy,_e[0]);const{style:He}=ce;He.width=(0,n.roundToDivide)(ue,ze[1])+"px",He.height=(0,n.roundToDivide)(ne,_e[1])+"px",l(this,Y).set(ce,Oe);const Ke=Ve.scaled?[Ve.sx,0,0,Ve.sy,0,0]:null,Xe={canvasContext:Me,transform:Ke,viewport:Oe,annotationMode:l(this,T),optionalContentConfigPromise:this._optionalContentConfigPromise,annotationCanvasMap:this._annotationCanvasMap,pageColors:ve},je=this.renderTask=this.pdfPage.render(Xe);je.onContinue=Le;const Je=je.promise.then(async()=>{var V;if(Ce==null||Ce(!0),await J(this,se,_n).call(this,je),J(this,E,$n).call(this),this.annotationLayer&&await J(this,oe,Hn).call(this),!this.annotationEditorLayer){const{annotationEditorUIManager:H}=l(this,D).call(this);if(!H)return;this.annotationEditorLayer=new d.AnnotationEditorLayerBuilder({uiManager:H,pageDiv:te,pdfPage:Re,l10n:me,accessibilityManager:this._accessibilityManager,annotationLayer:(V=this.annotationLayer)==null?void 0:V.annotationLayer})}J(this,Pe,Wn).call(this)},V=>(V instanceof i.RenderingCancelledException||Ce==null||Ce(!0),J(this,se,_n).call(this,je,V)));if(Re.isPureXfa){if(this.xfaLayer)this.xfaLayer.div&&te.append(this.xfaLayer.div);else{const{annotationStorage:V,linkService:H}=l(this,D).call(this);this.xfaLayer=new b.XfaLayerBuilder({pageDiv:te,pdfPage:Re,annotationStorage:V,linkService:H})}J(this,P,zn).call(this)}return te.setAttribute("data-loaded",!0),this.eventBus.dispatch("pagerender",{source:this,pageNumber:this.id}),Je}setPageLabel(te){this.pageLabel=typeof te=="string"?te:null,this.pageLabel!==null?this.div.setAttribute("data-page-label",this.pageLabel):this.div.removeAttribute("data-page-label")}get thumbnailCanvas(){const{directDrawing:te,initialOptionalContent:me,regularAnnotations:ve}=l(this,he);return te&&me&&ve?this.canvas:null}}T=new WeakMap,S=new WeakMap,D=new WeakMap,I=new WeakMap,_=new WeakMap,Q=new WeakMap,W=new WeakMap,j=new WeakMap,he=new WeakMap,Y=new WeakMap,z=new WeakSet,Gt=function(){const{viewport:te}=this;if(this.pdfPage){if(l(this,_)===te.rotation)return;le(this,_,te.rotation)}(0,i.setLayerDimensions)(this.div,te,!0,!1)},oe=new WeakSet,Hn=async function(){let te=null;try{await this.annotationLayer.render(this.viewport,"display")}catch(me){console.error(`#renderAnnotationLayer: "${me}".`),te=me}finally{this.eventBus.dispatch("annotationlayerrendered",{source:this,pageNumber:this.id,error:te})}},Pe=new WeakSet,Wn=async function(){let te=null;try{await this.annotationEditorLayer.render(this.viewport,"display")}catch(me){console.error(`#renderAnnotationEditorLayer: "${me}".`),te=me}finally{this.eventBus.dispatch("annotationeditorlayerrendered",{source:this,pageNumber:this.id,error:te})}},P=new WeakSet,zn=async function(){let te=null;try{const me=await this.xfaLayer.render(this.viewport,"display");me!=null&&me.textDivs&&this._textHighlighter&&J(this,F,_r).call(this,me.textDivs)}catch(me){console.error(`#renderXfaLayer: "${me}".`),te=me}finally{this.eventBus.dispatch("xfalayerrendered",{source:this,pageNumber:this.id,error:te})}},E=new WeakSet,$n=async function(){const{pdfPage:te,textLayer:me,viewport:ve}=this;if(!me)return;let Re=null;try{if(!me.renderingDone){const Oe=te.streamTextContent({includeMarkedContent:!0,disableNormalization:!0});me.setTextContentSource(Oe)}await me.render(ve)}catch(Oe){if(Oe instanceof i.AbortException)return;console.error(`#renderTextLayer: "${Oe}".`),Re=Oe}this.eventBus.dispatch("textlayerrendered",{source:this,pageNumber:this.id,numTextDivs:me.numTextDivs,error:Re}),J(this,O,$r).call(this)},O=new WeakSet,$r=async function(){var ve,Re,Oe;if(!this.textLayer)return;this.structTreeLayer||(this.structTreeLayer=new o.StructTreeLayerBuilder);const te=await(this.structTreeLayer.renderingDone?null:this.pdfPage.getStructTree()),me=(ve=this.structTreeLayer)==null?void 0:ve.render(te);me&&((Re=this.canvas)==null||Re.append(me)),(Oe=this.structTreeLayer)==null||Oe.show()},F=new WeakSet,_r=async function(te){const me=await this.pdfPage.getTextContent(),ve=[];for(const Re of me.items)ve.push(Re.str);this._textHighlighter.setTextMapping(te,ve),this._textHighlighter.enable()},se=new WeakSet,_n=async function(te){let me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(te===this.renderTask&&(this.renderTask=null),me instanceof i.RenderingCancelledException){le(this,Q,null);return}if(le(this,Q,me),this.renderingState=n.RenderingStates.FINISHED,this._resetZoomLayer(!0),l(this,he).regularAnnotations=!te.separateAnnots,this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!1,timestamp:performance.now(),error:l(this,Q)}),me)throw me},g.PDFPageView=x},(u,g,e)=>{var h,f;Object.defineProperty(g,"__esModule",{value:!0}),g.AnnotationEditorLayerBuilder=void 0;var i=e(107),n=e(125);class d{constructor(r){$(this,h,null);$(this,f,void 0);this.pageDiv=r.pageDiv,this.pdfPage=r.pdfPage,this.accessibilityManager=r.accessibilityManager,this.l10n=r.l10n||n.NullL10n,this.annotationEditorLayer=null,this.div=null,this._cancelled=!1,le(this,f,r.uiManager),le(this,h,r.annotationLayer||null)}async render(r){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"display";if(o!=="display"||this._cancelled)return;const m=r.clone({dontFlip:!0});if(this.div){this.annotationEditorLayer.update({viewport:m}),this.show();return}const v=this.div=document.createElement("div");v.className="annotationEditorLayer",v.tabIndex=0,v.hidden=!0,v.dir=l(this,f).direction,this.pageDiv.append(v),this.annotationEditorLayer=new i.AnnotationEditorLayer({uiManager:l(this,f),div:v,accessibilityManager:this.accessibilityManager,pageIndex:this.pdfPage.pageNumber-1,l10n:this.l10n,viewport:m,annotationLayer:l(this,h)});const A={viewport:m,div:v,annotations:null,intent:o};this.annotationEditorLayer.render(A),this.show()}cancel(){this._cancelled=!0,this.div&&(this.pageDiv=null,this.annotationEditorLayer.destroy(),this.div.remove())}hide(){this.div&&(this.div.hidden=!0)}show(){!this.div||this.annotationEditorLayer.isEmpty||(this.div.hidden=!1)}}h=new WeakMap,f=new WeakMap,g.AnnotationEditorLayerBuilder=d},(u,g,e)=>{Object.defineProperty(g,"__esModule",{value:!0}),g.compatibilityParams=g.OptionKind=g.AppOptions=void 0,e(109);const i=Object.create(null);g.compatibilityParams=i;{const a=navigator.userAgent||"",r=navigator.platform||"",o=navigator.maxTouchPoints||1,m=/Android/.test(a),v=/\b(iPad|iPhone|iPod)(?=;)/.test(a)||r==="MacIntel"&&o>1;(function(){(v||m)&&(i.maxCanvasPixels=5242880)})()}const n={VIEWER:2,API:4,WORKER:8,PREFERENCE:128};g.OptionKind=n;const d={annotationEditorMode:{value:0,kind:n.VIEWER+n.PREFERENCE},annotationMode:{value:2,kind:n.VIEWER+n.PREFERENCE},cursorToolOnLoad:{value:0,kind:n.VIEWER+n.PREFERENCE},defaultZoomDelay:{value:400,kind:n.VIEWER+n.PREFERENCE},defaultZoomValue:{value:"",kind:n.VIEWER+n.PREFERENCE},disableHistory:{value:!1,kind:n.VIEWER},disablePageLabels:{value:!1,kind:n.VIEWER+n.PREFERENCE},enablePermissions:{value:!1,kind:n.VIEWER+n.PREFERENCE},enablePrintAutoRotate:{value:!0,kind:n.VIEWER+n.PREFERENCE},enableScripting:{value:!0,kind:n.VIEWER+n.PREFERENCE},enableStampEditor:{value:!0,kind:n.VIEWER+n.PREFERENCE},externalLinkRel:{value:"noopener noreferrer nofollow",kind:n.VIEWER},externalLinkTarget:{value:0,kind:n.VIEWER+n.PREFERENCE},historyUpdateUrl:{value:!1,kind:n.VIEWER+n.PREFERENCE},ignoreDestinationZoom:{value:!1,kind:n.VIEWER+n.PREFERENCE},imageResourcesPath:{value:"./images/",kind:n.VIEWER},maxCanvasPixels:{value:16777216,kind:n.VIEWER},forcePageColors:{value:!1,kind:n.VIEWER+n.PREFERENCE},pageColorsBackground:{value:"Canvas",kind:n.VIEWER+n.PREFERENCE},pageColorsForeground:{value:"CanvasText",kind:n.VIEWER+n.PREFERENCE},pdfBugEnabled:{value:!1,kind:n.VIEWER+n.PREFERENCE},printResolution:{value:150,kind:n.VIEWER},sidebarViewOnLoad:{value:-1,kind:n.VIEWER+n.PREFERENCE},scrollModeOnLoad:{value:-1,kind:n.VIEWER+n.PREFERENCE},spreadModeOnLoad:{value:-1,kind:n.VIEWER+n.PREFERENCE},textLayerMode:{value:1,kind:n.VIEWER+n.PREFERENCE},viewerCssTheme:{value:0,kind:n.VIEWER+n.PREFERENCE},viewOnLoad:{value:0,kind:n.VIEWER+n.PREFERENCE},cMapPacked:{value:!0,kind:n.API},cMapUrl:{value:"../web/cmaps/",kind:n.API},disableAutoFetch:{value:!1,kind:n.API+n.PREFERENCE},disableFontFace:{value:!1,kind:n.API+n.PREFERENCE},disableRange:{value:!1,kind:n.API+n.PREFERENCE},disableStream:{value:!1,kind:n.API+n.PREFERENCE},docBaseUrl:{value:"",kind:n.API},enableXfa:{value:!0,kind:n.API+n.PREFERENCE},fontExtraProperties:{value:!1,kind:n.API},isEvalSupported:{value:!0,kind:n.API},isOffscreenCanvasSupported:{value:!0,kind:n.API},maxImageSize:{value:-1,kind:n.API},pdfBug:{value:!1,kind:n.API},standardFontDataUrl:{value:"../web/standard_fonts/",kind:n.API},verbosity:{value:1,kind:n.API},workerPort:{value:null,kind:n.WORKER},workerSrc:{value:"../build/pdf.worker.js",kind:n.WORKER}};d.defaultUrl={value:"compressed.tracemonkey-pldi-09.pdf",kind:n.VIEWER},d.disablePreferences={value:!1,kind:n.VIEWER},d.locale={value:navigator.language||"en-US",kind:n.VIEWER},d.sandboxBundleSrc={value:"../build/pdf.sandbox.js",kind:n.VIEWER};const h=Object.create(null);class f{constructor(){throw new Error("Cannot initialize AppOptions.")}static get(r){const o=h[r];if(o!==void 0)return o;const m=d[r];if(m!==void 0)return i[r]??m.value}static getAll(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;const o=Object.create(null);for(const m in d){const v=d[m];if(r){if(!(r&v.kind))continue;if(r===n.PREFERENCE){const b=v.value,c=typeof b;if(c==="boolean"||c==="string"||c==="number"&&Number.isInteger(b)){o[m]=b;continue}throw new Error(`Invalid type for preference: ${m}`)}}const A=h[m];o[m]=A!==void 0?A:i[m]??v.value}return o}static set(r,o){h[r]=o}static setAll(r){for(const o in r)h[o]=r[o]}static remove(r){delete h[r]}}g.AppOptions=f,f._hasUserOptions=function(){return Object.keys(h).length>0}},(u,g,e)=>{var f,a,Gn,o,Xn;Object.defineProperty(g,"__esModule",{value:!0}),g.StructTreeLayerBuilder=void 0;var i=e(97);const n={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},d=/^H(\d+)$/;class h{constructor(){$(this,a);$(this,o);$(this,f,void 0)}get renderingDone(){return l(this,f)!==void 0}render(A){if(l(this,f)!==void 0)return l(this,f);const b=J(this,o,Xn).call(this,A);return b==null||b.classList.add("structTree"),le(this,f,b)}hide(){l(this,f)&&!l(this,f).hidden&&(l(this,f).hidden=!0)}show(){var A;(A=l(this,f))!=null&&A.hidden&&(l(this,f).hidden=!1)}}f=new WeakMap,a=new WeakSet,Gn=function(A,b){const{alt:c,id:s,lang:x}=A;c!==void 0&&b.setAttribute("aria-label",(0,i.removeNullCharacters)(c)),s!==void 0&&b.setAttribute("aria-owns",s),x!==void 0&&b.setAttribute("lang",(0,i.removeNullCharacters)(x,!0))},o=new WeakSet,Xn=function(A){if(!A)return null;const b=document.createElement("span");if("role"in A){const{role:c}=A,s=c.match(d);s?(b.setAttribute("role","heading"),b.setAttribute("aria-level",s[1])):n[c]&&b.setAttribute("role",n[c])}if(J(this,a,Gn).call(this,A,b),A.children)if(A.children.length===1&&"id"in A.children[0])J(this,a,Gn).call(this,A.children[0],b);else for(const c of A.children)b.append(J(this,o,Xn).call(this,c));return b},g.StructTreeLayerBuilder=h},(u,g,e)=>{var d,h,f,a,r,Xt,m,Kn;Object.defineProperty(g,"__esModule",{value:!0}),g.TextAccessibilityManager=void 0,e(109);var i=e(97);const A=class A{constructor(){$(this,m);$(this,d,!1);$(this,h,null);$(this,f,new Map);$(this,a,new Map)}setTextMapping(c){le(this,h,c)}enable(){if(l(this,d))throw new Error("TextAccessibilityManager is already enabled.");if(!l(this,h))throw new Error("Text divs and strings have not been set.");if(le(this,d,!0),le(this,h,l(this,h).slice()),l(this,h).sort(J(A,r,Xt)),l(this,f).size>0){const c=l(this,h);for(const[s,x]of l(this,f)){if(!document.getElementById(s)){l(this,f).delete(s);continue}J(this,m,Kn).call(this,s,c[x])}}for(const[c,s]of l(this,a))this.addPointerInTextLayer(c,s);l(this,a).clear()}disable(){l(this,d)&&(l(this,a).clear(),le(this,h,null),le(this,d,!1))}removePointerInTextLayer(c){if(!l(this,d)){l(this,a).delete(c);return}const s=l(this,h);if(!s||s.length===0)return;const{id:x}=c,T=l(this,f).get(x);if(T===void 0)return;const S=s[T];l(this,f).delete(x);let D=S.getAttribute("aria-owns");D!=null&&D.includes(x)&&(D=D.split(" ").filter(I=>I!==x).join(" "),D?S.setAttribute("aria-owns",D):(S.removeAttribute("aria-owns"),S.setAttribute("role","presentation")))}addPointerInTextLayer(c,s){const{id:x}=c;if(!x)return null;if(!l(this,d))return l(this,a).set(c,s),null;s&&this.removePointerInTextLayer(c);const T=l(this,h);if(!T||T.length===0)return null;const S=(0,i.binarySearchFirstItem)(T,Q=>{var W;return J(W=A,r,Xt).call(W,c,Q)<0}),D=Math.max(0,S-1),I=T[D];J(this,m,Kn).call(this,x,I),l(this,f).set(x,D);const _=I.parentNode;return _!=null&&_.classList.contains("markedContent")?_.id:null}moveElementInDOM(c,s,x,T){const S=this.addPointerInTextLayer(x,T);if(!c.hasChildNodes())return c.append(s),S;const D=Array.from(c.childNodes).filter(Q=>Q!==s);if(D.length===0)return S;const I=x||s,_=(0,i.binarySearchFirstItem)(D,Q=>{var W;return J(W=A,r,Xt).call(W,I,Q)<0});return _===0?D[0].before(s):D[_-1].after(s),S}};d=new WeakMap,h=new WeakMap,f=new WeakMap,a=new WeakMap,r=new WeakSet,Xt=function(c,s){const x=c.getBoundingClientRect(),T=s.getBoundingClientRect();if(x.width===0&&x.height===0)return 1;if(T.width===0&&T.height===0)return-1;const S=x.y,D=x.y+x.height,I=x.y+x.height/2,_=T.y,Q=T.y+T.height,W=T.y+T.height/2;if(I<=_&&W>=D)return-1;if(W<=S&&I>=Q)return 1;const j=x.x+x.width/2,he=T.x+T.width/2;return j-he},m=new WeakSet,Kn=function(c,s){const x=s.getAttribute("aria-owns");x!=null&&x.includes(c)||s.setAttribute("aria-owns",x?`${x} ${c}`:c),s.removeAttribute("role")},$(A,r);let n=A;g.TextAccessibilityManager=n},(u,g,e)=>{Object.defineProperty(g,"__esModule",{value:!0}),g.TextHighlighter=void 0,e(109),e(93);class i{constructor(d){let{findController:h,eventBus:f,pageIndex:a}=d;this.findController=h,this.matches=[],this.eventBus=f,this.pageIdx=a,this._onUpdateTextLayerMatches=null,this.textDivs=null,this.textContentItemsStr=null,this.enabled=!1}setTextMapping(d,h){this.textDivs=d,this.textContentItemsStr=h}enable(){if(!this.textDivs||!this.textContentItemsStr)throw new Error("Text divs and strings have not been set.");if(this.enabled)throw new Error("TextHighlighter is already enabled.");this.enabled=!0,this._onUpdateTextLayerMatches||(this._onUpdateTextLayerMatches=d=>{(d.pageIndex===this.pageIdx||d.pageIndex===-1)&&this._updateMatches()},this.eventBus._on("updatetextlayermatches",this._onUpdateTextLayerMatches)),this._updateMatches()}disable(){this.enabled&&(this.enabled=!1,this._onUpdateTextLayerMatches&&(this.eventBus._off("updatetextlayermatches",this._onUpdateTextLayerMatches),this._onUpdateTextLayerMatches=null),this._updateMatches(!0))}_convertMatches(d,h){if(!d)return[];const{textContentItemsStr:f}=this;let a=0,r=0;const o=f.length-1,m=[];for(let v=0,A=d.length;v=r+f[a].length;)r+=f[a].length,a++;a===f.length&&console.error("Could not find a matching mapping");const c={begin:{divIdx:a,offset:b-r}};for(b+=h[v];a!==o&&b>r+f[a].length;)r+=f[a].length,a++;c.end={divIdx:a,offset:b-r},m.push(c)}return m}_renderMatches(d){if(d.length===0)return;const{findController:h,pageIdx:f}=this,{textContentItemsStr:a,textDivs:r}=this,o=f===h.selected.pageIdx,m=h.selected.matchIdx,v=h.state.highlightAll;let A=null;const b={divIdx:-1,offset:void 0};function c(I,_){const Q=I.divIdx;return r[Q].textContent="",s(Q,0,I.offset,_)}function s(I,_,Q,W){let j=r[I];if(j.nodeType===Node.TEXT_NODE){const z=document.createElement("span");j.before(z),z.append(j),r[I]=z,j=z}const he=a[I].substring(_,Q),Y=document.createTextNode(he);if(W){const z=document.createElement("span");return z.className=`${W} appended`,z.append(Y),j.append(z),W.includes("selected")?z.offsetLeft:0}return j.append(Y),0}let x=m,T=x+1;if(v)x=0,T=d.length;else if(!o)return;let S=-1,D=-1;for(let I=x;I0&&arguments[0]!==void 0?arguments[0]:!1;if(!this.enabled&&!d)return;const{findController:h,matches:f,pageIdx:a}=this,{textContentItemsStr:r,textDivs:o}=this;let m=-1;for(const b of f){const c=Math.max(m,b.begin.divIdx);for(let s=c,x=b.end.divIdx;s<=x;s++){const T=o[s];T.textContent=r[s],T.className=""}m=b.end.divIdx+1}if(!(h!=null&&h.highlightMatches)||d)return;const v=h.pageMatches[a]||null,A=h.pageMatchesLength[a]||null;this.matches=this._convertMatches(v,A),this._renderMatches(this.matches)}}g.TextHighlighter=i},(u,g,e)=>{var h,f,a,r,o,Gr,v,Xr;Object.defineProperty(g,"__esModule",{value:!0}),g.TextLayerBuilder=void 0,e(109);var i=e(107),n=e(97);class d{constructor(c){$(this,o);$(this,v);$(this,h,!1);$(this,f,0);$(this,a,0);$(this,r,null);let{highlighter:s=null,accessibilityManager:x=null,isOffscreenCanvasSupported:T=!0,enablePermissions:S=!1}=c;this.textContentItemsStr=[],this.renderingDone=!1,this.textDivs=[],this.textDivProperties=new WeakMap,this.textLayerRenderTask=null,this.highlighter=s,this.accessibilityManager=x,this.isOffscreenCanvasSupported=T,le(this,h,S===!0),this.div=document.createElement("div"),this.div.className="textLayer",this.hide()}get numTextDivs(){return this.textDivs.length}async render(c){var T,S,D;if(!l(this,r))throw new Error('No "textContentSource" parameter specified.');const s=c.scale*(globalThis.devicePixelRatio||1),{rotation:x}=c;if(this.renderingDone){const I=x!==l(this,f),_=s!==l(this,a);(I||_)&&(this.hide(),(0,i.updateTextLayer)({container:this.div,viewport:c,textDivs:this.textDivs,textDivProperties:this.textDivProperties,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported,mustRescale:_,mustRotate:I}),le(this,a,s),le(this,f,x)),this.show();return}this.cancel(),(T=this.highlighter)==null||T.setTextMapping(this.textDivs,this.textContentItemsStr),(S=this.accessibilityManager)==null||S.setTextMapping(this.textDivs),this.textLayerRenderTask=(0,i.renderTextLayer)({textContentSource:l(this,r),container:this.div,viewport:c,textDivs:this.textDivs,textDivProperties:this.textDivProperties,textContentItemsStr:this.textContentItemsStr,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported}),await this.textLayerRenderTask.promise,J(this,o,Gr).call(this),le(this,a,s),le(this,f,x),this.show(),(D=this.accessibilityManager)==null||D.enable()}hide(){var c;this.div.hidden||((c=this.highlighter)==null||c.disable(),this.div.hidden=!0)}show(){var c;this.div.hidden&&this.renderingDone&&(this.div.hidden=!1,(c=this.highlighter)==null||c.enable())}cancel(){var c,s;this.textLayerRenderTask&&(this.textLayerRenderTask.cancel(),this.textLayerRenderTask=null),(c=this.highlighter)==null||c.disable(),(s=this.accessibilityManager)==null||s.disable(),this.textContentItemsStr.length=0,this.textDivs.length=0,this.textDivProperties=new WeakMap}setTextContentSource(c){this.cancel(),le(this,r,c)}}h=new WeakMap,f=new WeakMap,a=new WeakMap,r=new WeakMap,o=new WeakSet,Gr=function(){this.renderingDone=!0;const c=document.createElement("div");c.className="endOfContent",this.div.append(c),J(this,v,Xr).call(this)},v=new WeakSet,Xr=function(){const{div:c}=this;c.addEventListener("mousedown",s=>{const x=c.querySelector(".endOfContent");if(!x)return;let T=s.target!==c;if(T&&(T=getComputedStyle(x).getPropertyValue("-moz-user-select")!=="none"),T){const S=c.getBoundingClientRect(),D=Math.max(0,(s.pageY-S.top)/S.height);x.style.top=(D*100).toFixed(2)+"%"}x.classList.add("active")}),c.addEventListener("mouseup",()=>{const s=c.querySelector(".endOfContent");s&&(s.style.top="",s.classList.remove("active"))}),c.addEventListener("copy",s=>{if(!l(this,h)){const x=document.getSelection();s.clipboardData.setData("text/plain",(0,n.removeNullCharacters)((0,i.normalizeUnicode)(x.toString())))}s.preventDefault(),s.stopPropagation()})},g.TextLayerBuilder=d},(u,g,e)=>{Object.defineProperty(g,"__esModule",{value:!0}),g.XfaLayerBuilder=void 0;var i=e(107);class n{constructor(h){let{pageDiv:f,pdfPage:a,annotationStorage:r=null,linkService:o,xfaHtml:m=null}=h;this.pageDiv=f,this.pdfPage=a,this.annotationStorage=r,this.linkService=o,this.xfaHtml=m,this.div=null,this._cancelled=!1}async render(h){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"display";if(f==="print"){const o={viewport:h.clone({dontFlip:!0}),div:this.div,xfaHtml:this.xfaHtml,annotationStorage:this.annotationStorage,linkService:this.linkService,intent:f},m=document.createElement("div");return this.pageDiv.append(m),o.div=m,i.XfaLayer.render(o)}const a=await this.pdfPage.getXfa();if(this._cancelled||!a)return{textDivs:[]};const r={viewport:h.clone({dontFlip:!0}),div:this.div,xfaHtml:a,annotationStorage:this.annotationStorage,linkService:this.linkService,intent:f};return this.div?i.XfaLayer.update(r):(this.div=document.createElement("div"),this.pageDiv.append(this.div),r.div=this.div,i.XfaLayer.render(r))}cancel(){this._cancelled=!0}hide(){this.div&&(this.div.hidden=!0)}}g.XfaLayerBuilder=n},(u,g,e)=>{Object.defineProperty(g,"__esModule",{value:!0}),g.PDFScriptingManager=void 0;var i=e(140),n=e(141);class d extends n.PDFScriptingManager{constructor(f){f.externalServices||window.addEventListener("updatefromsandbox",a=>{f.eventBus.dispatch("updatefromsandbox",{source:window,detail:a.detail})}),f.externalServices||(f.externalServices={createScripting:a=>{let{sandboxBundleSrc:r}=a;return new i.GenericScripting(r)}}),f.docProperties||(f.docProperties=a=>(0,i.docProperties)(a)),super(f)}}g.PDFScriptingManager=d},(u,g,e)=>{Object.defineProperty(g,"__esModule",{value:!0}),g.GenericScripting=void 0,g.docProperties=n;var i=e(107);async function n(h){const f="",a=f.split("#")[0];let{info:r,metadata:o,contentDispositionFilename:m,contentLength:v}=await h.getMetadata();if(!v){const{length:A}=await h.getDownloadInfo();v=A}return{...r,baseURL:a,filesize:v,filename:m||(0,i.getPdfFilenameFromUrl)(f),metadata:o==null?void 0:o.getRaw(),authors:o==null?void 0:o.get("dc:creator"),numPages:h.numPages,URL:f}}class d{constructor(f){this._ready=(0,i.loadScript)(f,!0).then(()=>window.pdfjsSandbox.QuickJSSandbox())}async createSandbox(f){(await this._ready).create(f)}async dispatchEventInSandbox(f){const a=await this._ready;setTimeout(()=>a.dispatchEvent(f),0)}async destroySandbox(){(await this._ready).nukeSandbox()}}g.GenericScripting=d},(u,g,e)=>{var h,f,a,r,o,m,v,A,b,c,s,x,Kr,S,Kt,I,Yn,Q,Yr,j,wt;Object.defineProperty(g,"__esModule",{value:!0}),g.PDFScriptingManager=void 0,e(2),e(80),e(82),e(85),e(87),e(89),e(91),e(109);var i=e(97),n=e(107);class d{constructor(z){$(this,x);$(this,S);$(this,I);$(this,Q);$(this,j);$(this,h,null);$(this,f,null);$(this,a,null);$(this,r,null);$(this,o,null);$(this,m,null);$(this,v,null);$(this,A,!1);$(this,b,null);$(this,c,null);$(this,s,null);let{eventBus:ee,sandboxBundleSrc:oe=null,externalServices:ye=null,docProperties:Pe=null}=z;le(this,r,ee),le(this,b,oe),le(this,o,ye),le(this,a,Pe)}setViewer(z){le(this,v,z)}async setDocument(z){var Pe;if(l(this,m)&&await J(this,j,wt).call(this),le(this,m,z),!z)return;const[ee,oe,ye]=await Promise.all([z.getFieldObjects(),z.getCalculationOrderIds(),z.getJSActions()]);if(!ee&&!ye){await J(this,j,wt).call(this);return}if(z===l(this,m)){try{le(this,c,J(this,Q,Yr).call(this))}catch(L){console.error(`setDocument: "${L.message}".`),await J(this,j,wt).call(this);return}this._internalEvents.set("updatefromsandbox",L=>{(L==null?void 0:L.source)===window&&J(this,x,Kr).call(this,L.detail)}),this._internalEvents.set("dispatcheventinsandbox",L=>{var P;(P=l(this,c))==null||P.dispatchEventInSandbox(L.detail)}),this._internalEvents.set("pagechanging",L=>{let{pageNumber:P,previous:M}=L;P!==M&&(J(this,I,Yn).call(this,M),J(this,S,Kt).call(this,P))}),this._internalEvents.set("pagerendered",L=>{let{pageNumber:P}=L;this._pageOpenPending.has(P)&&P===l(this,v).currentPageNumber&&J(this,S,Kt).call(this,P)}),this._internalEvents.set("pagesdestroy",async()=>{var L,P;await J(this,I,Yn).call(this,l(this,v).currentPageNumber),await((L=l(this,c))==null?void 0:L.dispatchEventInSandbox({id:"doc",name:"WillClose"})),(P=l(this,h))==null||P.resolve()});for(const[L,P]of this._internalEvents)l(this,r)._on(L,P);try{const L=await l(this,a).call(this,z);if(z!==l(this,m))return;await l(this,c).createSandbox({objects:ee,calculationOrder:oe,appInfo:{platform:navigator.platform,language:navigator.language},docInfo:{...L,actions:ye}}),l(this,r).dispatch("sandboxcreated",{source:this})}catch(L){console.error(`setDocument: "${L.message}".`),await J(this,j,wt).call(this);return}await((Pe=l(this,c))==null?void 0:Pe.dispatchEventInSandbox({id:"doc",name:"Open"})),await J(this,S,Kt).call(this,l(this,v).currentPageNumber,!0),Promise.resolve().then(()=>{z===l(this,m)&&le(this,A,!0)})}}async dispatchWillSave(){var z;return(z=l(this,c))==null?void 0:z.dispatchEventInSandbox({id:"doc",name:"WillSave"})}async dispatchDidSave(){var z;return(z=l(this,c))==null?void 0:z.dispatchEventInSandbox({id:"doc",name:"DidSave"})}async dispatchWillPrint(){var z;if(l(this,c)){await((z=l(this,s))==null?void 0:z.promise),le(this,s,new n.PromiseCapability);try{await l(this,c).dispatchEventInSandbox({id:"doc",name:"WillPrint"})}catch(ee){throw l(this,s).resolve(),le(this,s,null),ee}await l(this,s).promise}}async dispatchDidPrint(){var z;return(z=l(this,c))==null?void 0:z.dispatchEventInSandbox({id:"doc",name:"DidPrint"})}get destroyPromise(){var z;return((z=l(this,f))==null?void 0:z.promise)||null}get ready(){return l(this,A)}get _internalEvents(){return(0,n.shadow)(this,"_internalEvents",new Map)}get _pageOpenPending(){return(0,n.shadow)(this,"_pageOpenPending",new Set)}get _visitedPages(){return(0,n.shadow)(this,"_visitedPages",new Map)}}h=new WeakMap,f=new WeakMap,a=new WeakMap,r=new WeakMap,o=new WeakMap,m=new WeakMap,v=new WeakMap,A=new WeakMap,b=new WeakMap,c=new WeakMap,s=new WeakMap,x=new WeakSet,Kr=async function(z){var E,R;const ee=l(this,v),oe=ee.isInPresentationMode||ee.isChangingPresentationMode,{id:ye,siblings:Pe,command:L,value:P}=z;if(!ye){switch(L){case"clear":console.clear();break;case"error":console.error(P);break;case"layout":if(!oe){const O=(0,i.apiPageLayoutToViewerModes)(P);ee.spreadMode=O.spreadMode}break;case"page-num":ee.currentPageNumber=P+1;break;case"print":await ee.pagesPromise,l(this,r).dispatch("print",{source:this});break;case"println":console.log(P);break;case"zoom":oe||(ee.currentScaleValue=P);break;case"SaveAs":l(this,r).dispatch("download",{source:this});break;case"FirstPage":ee.currentPageNumber=1;break;case"LastPage":ee.currentPageNumber=ee.pagesCount;break;case"NextPage":ee.nextPage();break;case"PrevPage":ee.previousPage();break;case"ZoomViewIn":oe||ee.increaseScale();break;case"ZoomViewOut":oe||ee.decreaseScale();break;case"WillPrintFinished":(E=l(this,s))==null||E.resolve(),le(this,s,null);break}return}if(oe&&z.focus)return;delete z.id,delete z.siblings;const M=Pe?[ye,...Pe]:[ye];for(const O of M){const B=document.querySelector(`[data-element-id="${O}"]`);B?B.dispatchEvent(new CustomEvent("updatefromsandbox",{detail:z})):(R=l(this,m))==null||R.annotationStorage.setValue(O,z)}},S=new WeakSet,Kt=async function(z){let ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const oe=l(this,m),ye=this._visitedPages;if(ee&&le(this,h,new n.PromiseCapability),!l(this,h))return;const Pe=l(this,v).getPageView(z-1);if((Pe==null?void 0:Pe.renderingState)!==i.RenderingStates.FINISHED){this._pageOpenPending.add(z);return}this._pageOpenPending.delete(z);const L=(async()=>{var M,E;const P=await(ye.has(z)?null:(M=Pe.pdfPage)==null?void 0:M.getJSActions());oe===l(this,m)&&await((E=l(this,c))==null?void 0:E.dispatchEventInSandbox({id:"page",name:"PageOpen",pageNumber:z,actions:P}))})();ye.set(z,L)},I=new WeakSet,Yn=async function(z){var Pe;const ee=l(this,m),oe=this._visitedPages;if(!l(this,h)||this._pageOpenPending.has(z))return;const ye=oe.get(z);ye&&(oe.set(z,null),await ye,ee===l(this,m)&&await((Pe=l(this,c))==null?void 0:Pe.dispatchEventInSandbox({id:"page",name:"PageClose",pageNumber:z})))},Q=new WeakSet,Yr=function(){if(le(this,f,new n.PromiseCapability),l(this,c))throw new Error("#initScripting: Scripting already exists.");return l(this,o).createScripting({sandboxBundleSrc:l(this,b)})},j=new WeakSet,wt=async function(){var z,ee,oe;if(!l(this,c)){le(this,m,null),(z=l(this,f))==null||z.resolve();return}l(this,h)&&(await Promise.race([l(this,h).promise,new Promise(ye=>{setTimeout(ye,1e3)})]).catch(()=>{}),le(this,h,null)),le(this,m,null);try{await l(this,c).destroySandbox()}catch{}(ee=l(this,s))==null||ee.reject(new Error("Scripting destroyed.")),le(this,s,null);for(const[ye,Pe]of this._internalEvents)l(this,r)._off(ye,Pe);this._internalEvents.clear(),this._pageOpenPending.clear(),this._visitedPages.clear(),le(this,c,null),le(this,A,!1),(oe=l(this,f))==null||oe.resolve()},g.PDFScriptingManager=d},(u,g,e)=>{Object.defineProperty(g,"__esModule",{value:!0}),g.PDFSinglePageViewer=void 0;var i=e(97),n=e(143);class d extends n.PDFViewer{_resetView(){super._resetView(),this._scrollMode=i.ScrollMode.PAGE,this._spreadMode=i.SpreadMode.NONE}set scrollMode(f){}_updateScrollMode(){}set spreadMode(f){}_updateSpreadMode(){}}g.PDFSinglePageViewer=d},(u,g,e)=>{var b,c,s,Jn,T,S,D,I,_,Q,W,j,he,Y,z,ee,oe,ye,Pe,L,P,M,Jr,R,Qr,B,Zr,Z,jr,q,kt,te,Yt,ve,qr,Oe,Qn,Le,ei,ne,ot,ge,Zn,Me,ti,ze,ni,He,jn,Xe,ri;Object.defineProperty(g,"__esModule",{value:!0}),g.PagesCountLimit=g.PDFViewer=g.PDFPageViewBuffer=void 0,e(2),e(80),e(82),e(85),e(87),e(89),e(91),e(109),e(93);var i=e(107),n=e(97),d=e(125),h=e(131),f=e(144),a=e(108);const r=10,o={FORCE_SCROLL_MODE_PAGE:15e3,FORCE_LAZY_PAGE_INIT:7500,PAUSE_EAGER_PAGE_INIT:250};g.PagesCountLimit=o;function m(Je){return Object.values(i.AnnotationEditorType).includes(Je)&&Je!==i.AnnotationEditorType.DISABLE}class v{constructor(V){$(this,s);$(this,b,new Set);$(this,c,0);le(this,c,V)}push(V){const H=l(this,b);H.has(V)&&H.delete(V),H.add(V),H.size>l(this,c)&&J(this,s,Jn).call(this)}resize(V){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;le(this,c,V);const X=l(this,b);if(H){const de=X.size;let Ee=1;for(const K of X)if(H.has(K.id)&&(X.delete(K),X.add(K)),++Ee>de)break}for(;X.size>l(this,c);)J(this,s,Jn).call(this)}has(V){return l(this,b).has(V)}[Symbol.iterator](){return l(this,b).keys()}}b=new WeakMap,c=new WeakMap,s=new WeakSet,Jn=function(){const V=l(this,b).keys().next().value;V==null||V.destroy(),l(this,b).delete(V)},g.PDFPageViewBuffer=v;class A{constructor(V){$(this,M);$(this,R);$(this,B);$(this,Z);$(this,q);$(this,te);$(this,ve);$(this,Oe);$(this,Le);$(this,ne);$(this,ge);$(this,Me);$(this,ze);$(this,He);$(this,Xe);$(this,T,null);$(this,S,null);$(this,D,i.AnnotationEditorType.NONE);$(this,I,null);$(this,_,i.AnnotationMode.ENABLE_FORMS);$(this,Q,null);$(this,W,null);$(this,j,!1);$(this,he,!1);$(this,Y,null);$(this,z,!1);$(this,ee,0);$(this,oe,new ResizeObserver(J(this,Xe,ri).bind(this)));$(this,ye,null);$(this,Pe,null);$(this,L,null);$(this,P,n.TextLayerMode.ENABLE);var X,de;const H="3.11.174";if(i.version!==H)throw new Error(`The API version "${i.version}" does not match the Viewer version "${H}".`);if(this.container=V.container,this.viewer=V.viewer||V.container.firstElementChild,((X=this.container)==null?void 0:X.tagName)!=="DIV"||((de=this.viewer)==null?void 0:de.tagName)!=="DIV")throw new Error("Invalid `container` and/or `viewer` option.");if(this.container.offsetParent&&getComputedStyle(this.container).position!=="absolute")throw new Error("The `container` must be absolutely positioned.");l(this,oe).observe(this.container),this.eventBus=V.eventBus,this.linkService=V.linkService||new a.SimpleLinkService,this.downloadManager=V.downloadManager||null,this.findController=V.findController||null,le(this,S,V.altTextManager||null),this.findController&&(this.findController.onIsPageVisible=Ee=>this._getVisiblePages().ids.has(Ee)),this._scriptingManager=V.scriptingManager||null,le(this,P,V.textLayerMode??n.TextLayerMode.ENABLE),le(this,_,V.annotationMode??i.AnnotationMode.ENABLE_FORMS),le(this,D,V.annotationEditorMode??i.AnnotationEditorType.NONE),this.imageResourcesPath=V.imageResourcesPath||"",this.enablePrintAutoRotate=V.enablePrintAutoRotate||!1,this.removePageBorders=V.removePageBorders||!1,V.useOnlyCssZoom&&(console.error("useOnlyCssZoom was removed, please use `maxCanvasPixels = 0` instead."),V.maxCanvasPixels=0),this.isOffscreenCanvasSupported=V.isOffscreenCanvasSupported??!0,this.maxCanvasPixels=V.maxCanvasPixels,this.l10n=V.l10n||d.NullL10n,le(this,j,V.enablePermissions||!1),this.pageColors=V.pageColors||null,this.defaultRenderingQueue=!V.renderingQueue,this.defaultRenderingQueue?(this.renderingQueue=new f.PDFRenderingQueue,this.renderingQueue.setViewer(this)):this.renderingQueue=V.renderingQueue,this.scroll=(0,n.watchScroll)(this.container,this._scrollUpdate.bind(this)),this.presentationModeState=n.PresentationModeState.UNKNOWN,this._onBeforeDraw=this._onAfterDraw=null,this._resetView(),this.removePageBorders&&this.viewer.classList.add("removePageBorders"),J(this,He,jn).call(this),this.eventBus._on("thumbnailrendered",Ee=>{let{pageNumber:K,pdfPage:U}=Ee;const ie=this._pages[K-1];l(this,T).has(ie)||U==null||U.cleanup()})}get pagesCount(){return this._pages.length}getPageView(V){return this._pages[V]}getCachedPageViews(){return new Set(l(this,T))}get pageViewsReady(){return this._pagesCapability.settled&&this._pages.every(V=>V==null?void 0:V.pdfPage)}get renderForms(){return l(this,_)===i.AnnotationMode.ENABLE_FORMS}get enableScripting(){return!!this._scriptingManager}get currentPageNumber(){return this._currentPageNumber}set currentPageNumber(V){if(!Number.isInteger(V))throw new Error("Invalid page number.");this.pdfDocument&&(this._setCurrentPageNumber(V,!0)||console.error(`currentPageNumber: "${V}" is not a valid page.`))}_setCurrentPageNumber(V){var de;let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this._currentPageNumber===V)return H&&J(this,ge,Zn).call(this),!0;if(!(0=0&&(H=X+1)}this._setCurrentPageNumber(H,!0)||console.error(`currentPageLabel: "${V}" is not a valid page.`)}get currentScale(){return this._currentScale!==n.UNKNOWN_SCALE?this._currentScale:n.DEFAULT_SCALE}set currentScale(V){if(isNaN(V))throw new Error("Invalid numeric scale.");this.pdfDocument&&J(this,ne,ot).call(this,V,{noScroll:!1})}get currentScaleValue(){return this._currentScaleValue}set currentScaleValue(V){this.pdfDocument&&J(this,ne,ot).call(this,V,{noScroll:!1})}get pagesRotation(){return this._pagesRotation}set pagesRotation(V){if(!(0,n.isValidRotation)(V))throw new Error("Invalid pages rotation angle.");if(!this.pdfDocument||(V%=360,V<0&&(V+=360),this._pagesRotation===V))return;this._pagesRotation=V;const H=this._currentPageNumber;this.refresh(!0,{rotation:V}),this._currentScaleValue&&J(this,ne,ot).call(this,this._currentScaleValue,{noScroll:!0}),this.eventBus.dispatch("rotationchanging",{source:this,pagesRotation:V,pageNumber:H}),this.defaultRenderingQueue&&this.update()}get firstPagePromise(){return this.pdfDocument?this._firstPageCapability.promise:null}get onePageRendered(){return this.pdfDocument?this._onePageRenderedCapability.promise:null}get pagesPromise(){return this.pdfDocument?this._pagesCapability.promise:null}async getAllText(){const V=[],H=[];for(let X=1,de=this.pdfDocument.numPages;X<=de;++X){if(l(this,z))return null;H.length=0;const Ee=await this.pdfDocument.getPage(X),{items:K}=await Ee.getTextContent();for(const U of K)U.str&&H.push(U.str),U.hasEOL&&H.push(` +`);V.push((0,n.removeNullCharacters)(H.join("")))}return V.join(` +`)}setDocument(V){var K,U;if(this.pdfDocument&&(this.eventBus.dispatch("pagesdestroy",{source:this}),this._cancelRendering(),this._resetView(),(K=this.findController)==null||K.setDocument(null),(U=this._scriptingManager)==null||U.setDocument(null),l(this,I)&&(l(this,I).destroy(),le(this,I,null))),this.pdfDocument=V,!V)return;const H=V.numPages,X=V.getPage(1),de=V.getOptionalContentConfig(),Ee=l(this,j)?V.getPermissions():Promise.resolve();if(H>o.FORCE_SCROLL_MODE_PAGE){console.warn("Forcing PAGE-scrolling for performance reasons, given the length of the document.");const ie=this._scrollMode=n.ScrollMode.PAGE;this.eventBus.dispatch("scrollmodechanged",{source:this,mode:ie})}this._pagesCapability.promise.then(()=>{this.eventBus.dispatch("pagesloaded",{source:this,pagesCount:H})},()=>{}),this._onBeforeDraw=ie=>{const Ae=this._pages[ie.pageNumber-1];Ae&&l(this,T).push(Ae)},this.eventBus._on("pagerender",this._onBeforeDraw),this._onAfterDraw=ie=>{ie.cssTransform||this._onePageRenderedCapability.settled||(this._onePageRenderedCapability.resolve({timestamp:ie.timestamp}),this.eventBus._off("pagerendered",this._onAfterDraw),this._onAfterDraw=null,l(this,Pe)&&(document.removeEventListener("visibilitychange",l(this,Pe)),le(this,Pe,null)))},this.eventBus._on("pagerendered",this._onAfterDraw),Promise.all([X,Ee]).then(ie=>{var G,ae;let[Ae,Se]=ie;if(V!==this.pdfDocument)return;this._firstPageCapability.resolve(Ae),this._optionalContentConfigPromise=de;const{annotationEditorMode:we,annotationMode:Te,textLayerMode:Ne}=J(this,R,Qr).call(this,Se);if(Ne!==n.TextLayerMode.DISABLE){const fe=le(this,Y,document.createElement("div"));fe.id="hiddenCopyElement",this.viewer.before(fe)}if(we!==i.AnnotationEditorType.DISABLE){const fe=we;V.isPureXfa?console.warn("Warning: XFA-editing is not implemented."):m(fe)?(le(this,I,new i.AnnotationEditorUIManager(this.container,this.viewer,l(this,S),this.eventBus,V,this.pageColors)),fe!==i.AnnotationEditorType.NONE&&l(this,I).updateMode(fe)):console.error(`Invalid AnnotationEditor mode: ${fe}`)}const ke=J(this,M,Jr).bind(this),Ue=this._scrollMode===n.ScrollMode.PAGE?null:this.viewer,Be=this.currentScale,re=Ae.getViewport({scale:Be*i.PixelsPerInch.PDF_TO_CSS_UNITS});this.viewer.style.setProperty("--scale-factor",re.scale),(((G=this.pageColors)==null?void 0:G.foreground)==="CanvasText"||((ae=this.pageColors)==null?void 0:ae.background)==="Canvas")&&this.viewer.style.setProperty("--hcm-highligh-filter",V.filterFactory.addHighlightHCMFilter("CanvasText","Canvas","HighlightText","Highlight"));for(let fe=1;fe<=H;++fe){const be=new h.PDFPageView({container:Ue,eventBus:this.eventBus,id:fe,scale:Be,defaultViewport:re.clone(),optionalContentConfigPromise:de,renderingQueue:this.renderingQueue,textLayerMode:Ne,annotationMode:Te,imageResourcesPath:this.imageResourcesPath,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported,maxCanvasPixels:this.maxCanvasPixels,pageColors:this.pageColors,l10n:this.l10n,layerProperties:ke});this._pages.push(be)}const C=this._pages[0];C&&(C.setPdfPage(Ae),this.linkService.cachePageRef(1,Ae.ref)),this._scrollMode===n.ScrollMode.PAGE?J(this,q,kt).call(this):this._spreadMode!==n.SpreadMode.NONE&&this._updateSpreadMode(),J(this,B,Zr).call(this).then(async()=>{var be,xe;if((be=this.findController)==null||be.setDocument(V),(xe=this._scriptingManager)==null||xe.setDocument(V),l(this,Y)&&(le(this,W,J(this,Z,jr).bind(this,Ne)),document.addEventListener("copy",l(this,W))),l(this,I)&&this.eventBus.dispatch("annotationeditormodechanged",{source:this,mode:l(this,D)}),V.loadingParams.disableAutoFetch||H>o.FORCE_LAZY_PAGE_INIT){this._pagesCapability.resolve();return}let fe=H-1;if(fe<=0){this._pagesCapability.resolve();return}for(let De=2;De<=H;++De){const We=V.getPage(De).then(Fe=>{const Ze=this._pages[De-1];Ze.pdfPage||Ze.setPdfPage(Fe),this.linkService.cachePageRef(De,Fe.ref),--fe===0&&this._pagesCapability.resolve()},Fe=>{console.error(`Unable to get page ${De} to initialize viewer`,Fe),--fe===0&&this._pagesCapability.resolve()});De%o.PAUSE_EAGER_PAGE_INIT===0&&await We}}),this.eventBus.dispatch("pagesinit",{source:this}),V.getMetadata().then(fe=>{let{info:be}=fe;V===this.pdfDocument&&be.Language&&(this.viewer.lang=be.Language)}),this.defaultRenderingQueue&&this.update()}).catch(ie=>{console.error("Unable to initialize viewer",ie),this._pagesCapability.reject(ie)})}setPageLabels(V){var H;if(this.pdfDocument){V?Array.isArray(V)&&this.pdfDocument.numPages===V.length?this._pageLabels=V:(this._pageLabels=null,console.error("setPageLabels: Invalid page labels.")):this._pageLabels=null;for(let X=0,de=this._pages.length;Xthis.container.clientWidth}get isVerticalScrollbarEnabled(){return this.isInPresentationMode?!1:this.container.scrollHeight>this.container.clientHeight}_getVisiblePages(){const V=this._scrollMode===n.ScrollMode.PAGE?l(this,ye).pages:this._pages,H=this._scrollMode===n.ScrollMode.HORIZONTAL,X=H&&this._isContainerRtl;return(0,n.getVisibleElements)({scrollEl:this.container,views:V,sortByVisibility:!0,horizontal:H,rtl:X})}cleanup(){for(const V of this._pages)V.renderingState!==n.RenderingStates.FINISHED&&V.reset()}_cancelRendering(){for(const V of this._pages)V.cancelRendering()}forceRendering(V){const H=V||this._getVisiblePages(),X=J(this,ze,ni).call(this,H),de=this._spreadMode!==n.SpreadMode.NONE&&this._scrollMode!==n.ScrollMode.HORIZONTAL,Ee=this.renderingQueue.getHighestPriority(H,this._pages,X,de);return Ee?(J(this,Me,ti).call(this,Ee).then(()=>{this.renderingQueue.renderView(Ee)}),!0):!1}get hasEqualPageSizes(){const V=this._pages[0];for(let H=1,X=this._pages.length;H{const X=H.pdfPage.getViewport({scale:1}),de=(0,n.isPortraitOrientation)(X);if(V===void 0)V=de;else if(this.enablePrintAutoRotate&&de!==V)return{width:X.height,height:X.width,rotation:(X.rotation-90)%360};return{width:X.width,height:X.height,rotation:X.rotation}})}get optionalContentConfigPromise(){return this.pdfDocument?this._optionalContentConfigPromise?this._optionalContentConfigPromise:(console.error("optionalContentConfigPromise: Not initialized yet."),this.pdfDocument.getOptionalContentConfig()):Promise.resolve(null)}set optionalContentConfigPromise(V){if(!(V instanceof Promise))throw new Error(`Invalid optionalContentConfigPromise: ${V}`);this.pdfDocument&&this._optionalContentConfigPromise&&(this._optionalContentConfigPromise=V,this.refresh(!1,{optionalContentConfigPromise:V}),this.eventBus.dispatch("optionalcontentconfigchanged",{source:this,promise:V}))}get scrollMode(){return this._scrollMode}set scrollMode(V){if(this._scrollMode!==V){if(!(0,n.isValidScrollMode)(V))throw new Error(`Invalid scroll mode: ${V}`);this.pagesCount>o.FORCE_SCROLL_MODE_PAGE||(this._previousScrollMode=this._scrollMode,this._scrollMode=V,this.eventBus.dispatch("scrollmodechanged",{source:this,mode:V}),this._updateScrollMode(this._currentPageNumber))}}_updateScrollMode(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;const H=this._scrollMode,X=this.viewer;X.classList.toggle("scrollHorizontal",H===n.ScrollMode.HORIZONTAL),X.classList.toggle("scrollWrapped",H===n.ScrollMode.WRAPPED),!(!this.pdfDocument||!V)&&(H===n.ScrollMode.PAGE?J(this,q,kt).call(this):this._previousScrollMode===n.ScrollMode.PAGE&&this._updateSpreadMode(),this._currentScaleValue&&isNaN(this._currentScaleValue)&&J(this,ne,ot).call(this,this._currentScaleValue,{noScroll:!0}),this._setCurrentPageNumber(V,!0),this.update())}get spreadMode(){return this._spreadMode}set spreadMode(V){if(this._spreadMode!==V){if(!(0,n.isValidSpreadMode)(V))throw new Error(`Invalid spread mode: ${V}`);this._spreadMode=V,this.eventBus.dispatch("spreadmodechanged",{source:this,mode:V}),this._updateSpreadMode(this._currentPageNumber)}}_updateSpreadMode(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(!this.pdfDocument)return;const H=this.viewer,X=this._pages;if(this._scrollMode===n.ScrollMode.PAGE)J(this,q,kt).call(this);else if(H.textContent="",this._spreadMode===n.SpreadMode.NONE)for(const de of this._pages)H.append(de.div);else{const de=this._spreadMode-1;let Ee=null;for(let K=0,U=X.length;K1&&arguments[1]!==void 0?arguments[1]:!1;switch(this._scrollMode){case n.ScrollMode.WRAPPED:{const{views:X}=this._getVisiblePages(),de=new Map;for(const{id:Ee,y:K,percent:U,widthPercent:ie}of X){if(U===0||ie<100)continue;let Ae=de.get(K);Ae||de.set(K,Ae||(Ae=[])),Ae.push(Ee)}for(const Ee of de.values()){const K=Ee.indexOf(V);if(K===-1)continue;const U=Ee.length;if(U===1)break;if(H)for(let ie=K-1,Ae=0;ie>=Ae;ie--){const Se=Ee[ie],we=Ee[ie+1]-1;if(Sewe)return we-V}if(H){const ie=Ee[0];if(ieV)return ie-V+1}break}break}case n.ScrollMode.HORIZONTAL:break;case n.ScrollMode.PAGE:case n.ScrollMode.VERTICAL:{if(this._spreadMode===n.SpreadMode.NONE)break;const X=this._spreadMode-1;if(H&&V%2!==X)break;if(!H&&V%2===X)break;const{views:de}=this._getVisiblePages(),Ee=H?V-1:V+1;for(const{id:K,percent:U,widthPercent:ie}of de)if(K===Ee){if(U>0&&ie===100)return 2;break}break}}return 1}nextPage(){const V=this._currentPageNumber,H=this.pagesCount;if(V>=H)return!1;const X=this._getPageAdvance(V,!1)||1;return this.currentPageNumber=Math.min(V+X,H),!0}previousPage(){const V=this._currentPageNumber;if(V<=1)return!1;const H=this._getPageAdvance(V,!0)||1;return this.currentPageNumber=Math.max(V-H,1),!0}increaseScale(){let{drawingDelay:V,scaleFactor:H,steps:X}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.pdfDocument)return;let de=this._currentScale;if(H>1)de=Math.round(de*H*100)/100;else{X??(X=1);do de=Math.ceil((de*n.DEFAULT_SCALE_DELTA).toFixed(2)*10)/10;while(--X>0&&de0&&arguments[0]!==void 0?arguments[0]:{};if(!this.pdfDocument)return;let de=this._currentScale;if(H>0&&H<1)de=Math.round(de*H*100)/100;else{X??(X=1);do de=Math.floor((de/n.DEFAULT_SCALE_DELTA).toFixed(2)*10)/10;while(--X>0&&de>n.MIN_SCALE)}J(this,ne,ot).call(this,Math.max(n.MIN_SCALE,de),{noScroll:!1,drawingDelay:V})}get containerTopLeft(){return l(this,Q)||le(this,Q,[this.container.offsetTop,this.container.offsetLeft])}get annotationEditorMode(){return l(this,I)?l(this,D):i.AnnotationEditorType.DISABLE}set annotationEditorMode(V){let{mode:H,editId:X=null}=V;if(!l(this,I))throw new Error("The AnnotationEditor is not enabled.");if(l(this,D)!==H){if(!m(H))throw new Error(`Invalid AnnotationEditor mode: ${H}`);this.pdfDocument&&(le(this,D,H),this.eventBus.dispatch("annotationeditormodechanged",{source:this,mode:H}),l(this,I).updateMode(H,X))}}set annotationEditorParams(V){let{type:H,value:X}=V;if(!l(this,I))throw new Error("The AnnotationEditor is not enabled.");l(this,I).updateParams(H,X)}refresh(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Object.create(null);if(this.pdfDocument){for(const X of this._pages)X.update(H);l(this,L)!==null&&(clearTimeout(l(this,L)),le(this,L,null)),V||this.update()}}}T=new WeakMap,S=new WeakMap,D=new WeakMap,I=new WeakMap,_=new WeakMap,Q=new WeakMap,W=new WeakMap,j=new WeakMap,he=new WeakMap,Y=new WeakMap,z=new WeakMap,ee=new WeakMap,oe=new WeakMap,ye=new WeakMap,Pe=new WeakMap,L=new WeakMap,P=new WeakMap,M=new WeakSet,Jr=function(){const V=this;return{get annotationEditorUIManager(){return l(V,I)},get annotationStorage(){var H;return(H=V.pdfDocument)==null?void 0:H.annotationStorage},get downloadManager(){return V.downloadManager},get enableScripting(){return!!V._scriptingManager},get fieldObjectsPromise(){var H;return(H=V.pdfDocument)==null?void 0:H.getFieldObjects()},get findController(){return V.findController},get hasJSActionsPromise(){var H;return(H=V.pdfDocument)==null?void 0:H.hasJSActions()},get linkService(){return V.linkService}}},R=new WeakSet,Qr=function(V){const H={annotationEditorMode:l(this,D),annotationMode:l(this,_),textLayerMode:l(this,P)};return V&&(!V.includes(i.PermissionFlag.COPY)&&l(this,P)===n.TextLayerMode.ENABLE&&(H.textLayerMode=n.TextLayerMode.ENABLE_PERMISSIONS),V.includes(i.PermissionFlag.MODIFY_CONTENTS)||(H.annotationEditorMode=i.AnnotationEditorType.DISABLE),!V.includes(i.PermissionFlag.MODIFY_ANNOTATIONS)&&!V.includes(i.PermissionFlag.FILL_INTERACTIVE_FORMS)&&l(this,_)===i.AnnotationMode.ENABLE_FORMS&&(H.annotationMode=i.AnnotationMode.ENABLE)),H},B=new WeakSet,Zr=function(){if(document.visibilityState==="hidden"||!this.container.offsetParent||this._getVisiblePages().views.length===0)return Promise.resolve();const V=new Promise(H=>{le(this,Pe,()=>{document.visibilityState==="hidden"&&(H(),document.removeEventListener("visibilitychange",l(this,Pe)),le(this,Pe,null))}),document.addEventListener("visibilitychange",l(this,Pe))});return Promise.race([this._onePageRenderedCapability.promise,V])},Z=new WeakSet,jr=function(V,H){const X=document.getSelection(),{focusNode:de,anchorNode:Ee}=X;if(Ee&&de&&X.containsNode(l(this,Y))){if(l(this,he)||V===n.TextLayerMode.ENABLE_PERMISSIONS){H.preventDefault(),H.stopPropagation();return}le(this,he,!0);const K=this.container.style.cursor;this.container.style.cursor="wait";const U=ie=>le(this,z,ie.key==="Escape");window.addEventListener("keydown",U),this.getAllText().then(async ie=>{ie!==null&&await navigator.clipboard.writeText(ie)}).catch(ie=>{console.warn(`Something goes wrong when extracting the text: ${ie.message}`)}).finally(()=>{le(this,he,!1),le(this,z,!1),window.removeEventListener("keydown",U),this.container.style.cursor=K}),H.preventDefault(),H.stopPropagation()}},q=new WeakSet,kt=function(){if(this._scrollMode!==n.ScrollMode.PAGE)throw new Error("#ensurePageViewVisible: Invalid scrollMode value.");const V=this._currentPageNumber,H=l(this,ye),X=this.viewer;if(X.textContent="",H.pages.length=0,this._spreadMode===n.SpreadMode.NONE&&!this.isInPresentationMode){const de=this._pages[V-1];X.append(de.div),H.pages.push(de)}else{const de=new Set,Ee=this._spreadMode-1;Ee===-1?de.add(V-1):V%2!==Ee?(de.add(V-1),de.add(V)):(de.add(V-2),de.add(V-1));const K=document.createElement("div");if(K.className="spread",this.isInPresentationMode){const U=document.createElement("div");U.className="dummyPage",K.append(U)}for(const U of de){const ie=this._pages[U];ie&&(K.append(ie.div),H.pages.push(ie))}X.append(K)}H.scrollDown=V>=H.previousPageNumber,H.previousPageNumber=V},te=new WeakSet,Yt=function(V){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const{div:X,id:de}=V;if(this._currentPageNumber!==de&&this._setCurrentPageNumber(de),this._scrollMode===n.ScrollMode.PAGE&&(J(this,q,kt).call(this),this.update()),!H&&!this.isInPresentationMode){const Ee=X.offsetLeft+X.clientLeft,K=Ee+X.clientWidth,{scrollLeft:U,clientWidth:ie}=this.container;(this._scrollMode===n.ScrollMode.HORIZONTAL||EeU+ie)&&(H={left:0,top:0})}(0,n.scrollIntoView)(X,H),!this._currentScaleValue&&this._location&&(this._location=null)},ve=new WeakSet,qr=function(V){return V===this._currentScale||Math.abs(V-this._currentScale)<1e-15},Oe=new WeakSet,Qn=function(V,H,X){let{noScroll:de=!1,preset:Ee=!1,drawingDelay:K=-1}=X;if(this._currentScaleValue=H.toString(),J(this,ve,qr).call(this,V)){Ee&&this.eventBus.dispatch("scalechanging",{source:this,scale:V,presetValue:H});return}this.viewer.style.setProperty("--scale-factor",V*i.PixelsPerInch.PDF_TO_CSS_UNITS);const U=K>=0&&K<1e3;if(this.refresh(!0,{scale:V,drawingDelay:U?K:-1}),U&&le(this,L,setTimeout(()=>{le(this,L,null),this.refresh()},K)),this._currentScale=V,!de){let ie=this._currentPageNumber,Ae;this._location&&!(this.isInPresentationMode||this.isChangingPresentationMode)&&(ie=this._location.pageNumber,Ae=[null,{name:"XYZ"},this._location.left,this._location.top,null]),this.scrollPageIntoView({pageNumber:ie,destArray:Ae,allowNegativeOffset:!0})}this.eventBus.dispatch("scalechanging",{source:this,scale:V,presetValue:Ee?H:void 0}),this.defaultRenderingQueue&&this.update()},Le=new WeakSet,ei=function(){return this._spreadMode!==n.SpreadMode.NONE&&this._scrollMode!==n.ScrollMode.HORIZONTAL?2:1},ne=new WeakSet,ot=function(V,H){let X=parseFloat(V);if(X>0)H.preset=!1,J(this,Oe,Qn).call(this,X,V,H);else{const de=this._pages[this._currentPageNumber-1];if(!de)return;let Ee=n.SCROLLBAR_PADDING,K=n.VERTICAL_PADDING;this.isInPresentationMode?(Ee=K=4,this._spreadMode!==n.SpreadMode.NONE&&(Ee*=2)):this.removePageBorders?Ee=K=0:this._scrollMode===n.ScrollMode.HORIZONTAL&&([Ee,K]=[K,Ee]);const U=(this.container.clientWidth-Ee)/de.width*de.scale/l(this,Le,ei),ie=(this.container.clientHeight-K)/de.height*de.scale;switch(V){case"page-actual":X=1;break;case"page-width":X=U;break;case"page-height":X=ie;break;case"page-fit":X=Math.min(U,ie);break;case"auto":const Ae=(0,n.isPortraitOrientation)(de)?U:Math.min(ie,U);X=Math.min(n.MAX_AUTO_SCALE,Ae);break;default:console.error(`#setScale: "${V}" is an unknown zoom value.`);return}H.preset=!0,J(this,Oe,Qn).call(this,X,V,H)}},ge=new WeakSet,Zn=function(){const V=this._pages[this._currentPageNumber-1];this.isInPresentationMode&&J(this,ne,ot).call(this,this._currentScaleValue,{noScroll:!0}),J(this,te,Yt).call(this,V)},Me=new WeakSet,ti=async function(V){var H,X;if(V.pdfPage)return V.pdfPage;try{const de=await this.pdfDocument.getPage(V.id);return V.pdfPage||V.setPdfPage(de),(X=(H=this.linkService)._cachedPageNumber)!=null&&X.call(H,de.ref)||this.linkService.cachePageRef(V.id,de.ref),de}catch(de){return console.error("Unable to get page for page view",de),null}},ze=new WeakSet,ni=function(V){var H,X;if(((H=V.first)==null?void 0:H.id)===1)return!0;if(((X=V.last)==null?void 0:X.id)===this.pagesCount)return!1;switch(this._scrollMode){case n.ScrollMode.PAGE:return l(this,ye).scrollDown;case n.ScrollMode.HORIZONTAL:return this.scroll.right}return this.scroll.down},He=new WeakSet,jn=function(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.container.clientHeight;V!==l(this,ee)&&(le(this,ee,V),n.docStyle.setProperty("--viewer-container-height",`${V}px`))},Xe=new WeakSet,ri=function(V){for(const H of V)if(H.target===this.container){J(this,He,jn).call(this,Math.floor(H.borderBoxSize[0].blockSize)),le(this,Q,null);break}},g.PDFViewer=A},(u,g,e)=>{Object.defineProperty(g,"__esModule",{value:!0}),g.PDFRenderingQueue=void 0;var i=e(107),n=e(97);const d=3e4;class h{constructor(){this.pdfViewer=null,this.pdfThumbnailViewer=null,this.onIdle=null,this.highestPriorityPage=null,this.idleTimeout=null,this.printing=!1,this.isThumbnailViewEnabled=!1,Object.defineProperty(this,"hasViewer",{value:()=>!!this.pdfViewer})}setViewer(a){this.pdfViewer=a}setThumbnailViewer(a){this.pdfThumbnailViewer=a}isHighestPriority(a){return this.highestPriorityPage===a.renderingId}renderHighestPriority(a){var r;this.idleTimeout&&(clearTimeout(this.idleTimeout),this.idleTimeout=null),!this.pdfViewer.forceRendering(a)&&(this.isThumbnailViewEnabled&&((r=this.pdfThumbnailViewer)!=null&&r.forceRendering())||this.printing||this.onIdle&&(this.idleTimeout=setTimeout(this.onIdle.bind(this),d)))}getHighestPriority(a,r,o){let m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;const v=a.views,A=v.length;if(A===0)return null;for(let T=0;TA){const T=a.ids;for(let S=1,D=c-b;S{this.renderHighestPriority()}).catch(r=>{r instanceof i.RenderingCancelledException||console.error(`renderView: "${r}"`)});break}return!0}}g.PDFRenderingQueue=h}],p={};function y(u){var g=p[u];if(g!==void 0)return g.exports;var e=p[u]={exports:{}};return t[u].call(e.exports,e,e.exports,y),e.exports}var k={};return(()=>{var u=k;Object.defineProperty(u,"__esModule",{value:!0}),Object.defineProperty(u,"AnnotationLayerBuilder",{enumerable:!0,get:function(){return n.AnnotationLayerBuilder}}),Object.defineProperty(u,"DownloadManager",{enumerable:!0,get:function(){return d.DownloadManager}}),Object.defineProperty(u,"EventBus",{enumerable:!0,get:function(){return h.EventBus}}),Object.defineProperty(u,"FindState",{enumerable:!0,get:function(){return g.FindState}}),Object.defineProperty(u,"GenericL10n",{enumerable:!0,get:function(){return f.GenericL10n}}),Object.defineProperty(u,"LinkTarget",{enumerable:!0,get:function(){return e.LinkTarget}}),Object.defineProperty(u,"NullL10n",{enumerable:!0,get:function(){return a.NullL10n}}),Object.defineProperty(u,"PDFFindController",{enumerable:!0,get:function(){return g.PDFFindController}}),Object.defineProperty(u,"PDFHistory",{enumerable:!0,get:function(){return r.PDFHistory}}),Object.defineProperty(u,"PDFLinkService",{enumerable:!0,get:function(){return e.PDFLinkService}}),Object.defineProperty(u,"PDFPageView",{enumerable:!0,get:function(){return o.PDFPageView}}),Object.defineProperty(u,"PDFScriptingManager",{enumerable:!0,get:function(){return m.PDFScriptingManager}}),Object.defineProperty(u,"PDFSinglePageViewer",{enumerable:!0,get:function(){return v.PDFSinglePageViewer}}),Object.defineProperty(u,"PDFViewer",{enumerable:!0,get:function(){return A.PDFViewer}}),Object.defineProperty(u,"ProgressBar",{enumerable:!0,get:function(){return i.ProgressBar}}),Object.defineProperty(u,"RenderingStates",{enumerable:!0,get:function(){return i.RenderingStates}}),Object.defineProperty(u,"ScrollMode",{enumerable:!0,get:function(){return i.ScrollMode}}),Object.defineProperty(u,"SimpleLinkService",{enumerable:!0,get:function(){return e.SimpleLinkService}}),Object.defineProperty(u,"SpreadMode",{enumerable:!0,get:function(){return i.SpreadMode}}),Object.defineProperty(u,"StructTreeLayerBuilder",{enumerable:!0,get:function(){return b.StructTreeLayerBuilder}}),Object.defineProperty(u,"TextLayerBuilder",{enumerable:!0,get:function(){return c.TextLayerBuilder}}),Object.defineProperty(u,"XfaLayerBuilder",{enumerable:!0,get:function(){return s.XfaLayerBuilder}}),Object.defineProperty(u,"parseQueryString",{enumerable:!0,get:function(){return i.parseQueryString}});var g=y(1),e=y(108),i=y(97),n=y(124),d=y(126),h=y(127),f=y(128),a=y(125),r=y(130),o=y(131),m=y(139),v=y(142),A=y(143),b=y(134),c=y(137),s=y(138)})(),k})())})(pdf_viewer);var pdf_viewerExports=pdf_viewer.exports;const pdf="",PDFWorker={create(){return refWorker("pdf.worker.js").defaults(()=>new Worker(new URL(""+new URL("pdf.worker-2ce04d0b.js",import.meta.url).href,self.location),{type:"module"}))}},_withScopeId=N=>(pushScopeId("data-v-9bad3887"),N=N(),popScopeId(),N),_hoisted_1={class:"container"},_hoisted_2={class:"pdf_down"},_hoisted_3=_withScopeId(()=>createBaseVNode("div",{id:"viewer",class:"pdfViewer"},null,-1)),_hoisted_4=[_hoisted_3],_sfc_main=defineComponent({__name:"PdfView",props:{data:{}},setup(N){const w=N,t=ref(null),p={viewer:null,search:"",pdf_scale:1};!pdfExports.GlobalWorkerOptions.workerPort&&typeof window<"u"&&"Worker"in window&&(pdfExports.GlobalWorkerOptions.workerPort=PDFWorker.create()),(()=>{async function u(){if(!t.value)return;const g=new pdf_viewerExports.EventBus,e=new pdf_viewerExports.PDFLinkService({eventBus:g}),i=new pdf_viewerExports.PDFFindController({eventBus:g,linkService:e,updateMatchesCountOnProgress:!0}),n=new pdf_viewerExports.PDFViewer({container:t.value,eventBus:g,linkService:e,findController:i,l10n:new pdf_viewerExports.GenericL10n("zh-CN")});e.setViewer(n),g.on("pagesinit",()=>{var a;const f=(a=n.getPageView(0))==null?void 0:a.viewport;(f==null?void 0:f.width)>window.innerWidth?n.currentScaleValue="0.5":n.currentScaleValue="1"});const h=await pdfExports.getDocument({data:w.data,cMapUrl:`https://npm.onmicrosoft.cn/pdfjs-dist@${pdfExports.version}/cmaps/`,useWorkerFetch:!0,cMapPacked:!0,enableXfa:!0}).promise;n.setDocument(h),e.setDocument(h,null),p.viewer=n}onMounted(u)})();function y(){if(!p.viewer)return;const u=p.viewer.currentScale;let g=0;window.screen.width>1440?g=1.4:g=1.2,!(u>=g)&&(p.viewer.currentScale=u+.1)}function k(){if(!p.viewer)return;const u=p.viewer.currentScale;u<=.5||(p.viewer.currentScale=u-.1)}return(u,g)=>(openBlock(),createElementBlock("div",_hoisted_1,[createBaseVNode("div",_hoisted_2,[createBaseVNode("div",{class:"pdf_set_left",onClick:g[0]||(g[0]=e=>y())},"➕"),createBaseVNode("div",{class:"pdf_set_middle",onClick:g[1]||(g[1]=e=>k())},"➖")]),createBaseVNode("div",{ref_key:"container",ref:t,class:"pdf-wrapper"},_hoisted_4,512)]))}}),PdfView_vue_vue_type_style_index_0_scoped_9bad3887_lang="",PdfView=_export_sfc(_sfc_main,[["__scopeId","data-v-9bad3887"]]);export{PdfView as default}; diff --git a/public/dist/assets/PdfView-89e0fbd8.css b/public/dist/assets/PdfView-89e0fbd8.css new file mode 100644 index 0000000..5c75e80 --- /dev/null +++ b/public/dist/assets/PdfView-89e0fbd8.css @@ -0,0 +1 @@ +.textLayer{position:absolute;text-align:initial;left:0;top:0;right:0;bottom:0;overflow:hidden;opacity:.2;line-height:1;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;text-size-adjust:none;forced-color-adjust:none}.textLayer span,.textLayer br{color:transparent;position:absolute;white-space:pre;cursor:text;transform-origin:0% 0%}.textLayer span.markedContent{top:0;height:0}.textLayer .highlight{margin:-1px;padding:1px;background-color:#b400aa;border-radius:4px}.textLayer .highlight.appended{position:initial}.textLayer .highlight.begin{border-radius:4px 0 0 4px}.textLayer .highlight.end{border-radius:0 4px 4px 0}.textLayer .highlight.middle{border-radius:0}.textLayer .highlight.selected{background-color:#006400}.textLayer ::-moz-selection{background:rgba(0,0,255,1)}.textLayer ::selection{background:rgba(0,0,255,1)}.textLayer br::-moz-selection{background:transparent}.textLayer br::selection{background:transparent}.textLayer .endOfContent{display:block;position:absolute;left:0;top:100%;right:0;bottom:0;z-index:-1;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}.textLayer .endOfContent.active{top:0}:root{--annotation-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,")}@media (forced-colors: active){.annotationLayer .textWidgetAnnotation input:required,.annotationLayer .textWidgetAnnotation textarea:required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .buttonWidgetAnnotation.checkBox input:required,.annotationLayer .buttonWidgetAnnotation.radioButton input:required{outline:1.5px solid selectedItem}}.annotationLayer{position:absolute;top:0;left:0;pointer-events:none;transform-origin:0 0}.annotationLayer section{position:absolute;text-align:initial;pointer-events:auto;box-sizing:border-box;transform-origin:0 0}.annotationLayer .linkAnnotation>a,.annotationLayer .buttonWidgetAnnotation.pushButton>a{position:absolute;font-size:1em;top:0;left:0;width:100%;height:100%}.annotationLayer .buttonWidgetAnnotation.pushButton>canvas{width:100%;height:100%}.annotationLayer .linkAnnotation>a:hover,.annotationLayer .buttonWidgetAnnotation.pushButton>a:hover{opacity:.2;background:rgba(255,255,0,1);box-shadow:0 2px 10px #ff0}.annotationLayer .textAnnotation img{position:absolute;cursor:pointer;width:100%;height:100%}.annotationLayer .textWidgetAnnotation input,.annotationLayer .textWidgetAnnotation textarea,.annotationLayer .choiceWidgetAnnotation select,.annotationLayer .buttonWidgetAnnotation.checkBox input,.annotationLayer .buttonWidgetAnnotation.radioButton input{background-image:var(--annotation-unfocused-field-background);border:1px solid transparent;box-sizing:border-box;font:calc(9px * var(--scale-factor)) sans-serif;height:100%;margin:0;vertical-align:top;width:100%}.annotationLayer .textWidgetAnnotation input:required,.annotationLayer .textWidgetAnnotation textarea:required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .buttonWidgetAnnotation.checkBox input:required,.annotationLayer .buttonWidgetAnnotation.radioButton input:required{outline:1.5px solid red}.annotationLayer .choiceWidgetAnnotation select option{padding:0}.annotationLayer .buttonWidgetAnnotation.radioButton input{border-radius:50%}.annotationLayer .textWidgetAnnotation textarea{resize:none}.annotationLayer .textWidgetAnnotation input[disabled],.annotationLayer .textWidgetAnnotation textarea[disabled],.annotationLayer .choiceWidgetAnnotation select[disabled],.annotationLayer .buttonWidgetAnnotation.checkBox input[disabled],.annotationLayer .buttonWidgetAnnotation.radioButton input[disabled]{background:none;border:1px solid transparent;cursor:not-allowed}.annotationLayer .textWidgetAnnotation input:hover,.annotationLayer .textWidgetAnnotation textarea:hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .buttonWidgetAnnotation.checkBox input:hover,.annotationLayer .buttonWidgetAnnotation.radioButton input:hover{border:1px solid rgba(0,0,0,1)}.annotationLayer .textWidgetAnnotation input:focus,.annotationLayer .textWidgetAnnotation textarea:focus,.annotationLayer .choiceWidgetAnnotation select:focus{background:none;border:1px solid transparent}.annotationLayer .textWidgetAnnotation input :focus,.annotationLayer .textWidgetAnnotation textarea :focus,.annotationLayer .choiceWidgetAnnotation select :focus,.annotationLayer .buttonWidgetAnnotation.checkBox :focus,.annotationLayer .buttonWidgetAnnotation.radioButton :focus{background-image:none;background-color:transparent;outline:auto}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{background-color:CanvasText;content:"";display:block;position:absolute}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{height:80%;left:45%;width:1px}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{transform:rotate(45deg)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{transform:rotate(-45deg)}.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{border-radius:50%;height:50%;left:30%;top:20%;width:50%}.annotationLayer .textWidgetAnnotation input.comb{font-family:monospace;padding-left:2px;padding-right:0}.annotationLayer .textWidgetAnnotation input.comb:focus{width:103%}.annotationLayer .buttonWidgetAnnotation.checkBox input,.annotationLayer .buttonWidgetAnnotation.radioButton input{-webkit-appearance:none;-moz-appearance:none;appearance:none}.annotationLayer .popupTriggerArea{height:100%;width:100%}.annotationLayer .popupWrapper{position:absolute;font-size:calc(9px * var(--scale-factor));width:100%;min-width:calc(180px * var(--scale-factor));pointer-events:none}.annotationLayer .popup{position:absolute;z-index:200;max-width:calc(180px * var(--scale-factor));background-color:#ff9;box-shadow:0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor)) #888;border-radius:calc(2px * var(--scale-factor));padding:calc(6px * var(--scale-factor));margin-left:calc(5px * var(--scale-factor));cursor:pointer;font:message-box;white-space:normal;word-wrap:break-word;pointer-events:auto}.annotationLayer .popup>*{font-size:calc(9px * var(--scale-factor))}.annotationLayer .popup h1{display:inline-block}.annotationLayer .popupDate{display:inline-block;margin-left:calc(5px * var(--scale-factor))}.annotationLayer .popupContent{border-top:1px solid rgba(51,51,51,1);margin-top:calc(2px * var(--scale-factor));padding-top:calc(2px * var(--scale-factor))}.annotationLayer .richText>*{white-space:pre-wrap;font-size:calc(9px * var(--scale-factor))}.annotationLayer .highlightAnnotation,.annotationLayer .underlineAnnotation,.annotationLayer .squigglyAnnotation,.annotationLayer .strikeoutAnnotation,.annotationLayer .freeTextAnnotation,.annotationLayer .lineAnnotation svg line,.annotationLayer .squareAnnotation svg rect,.annotationLayer .circleAnnotation svg ellipse,.annotationLayer .polylineAnnotation svg polyline,.annotationLayer .polygonAnnotation svg polygon,.annotationLayer .caretAnnotation,.annotationLayer .inkAnnotation svg polyline,.annotationLayer .stampAnnotation,.annotationLayer .fileAttachmentAnnotation{cursor:pointer}.annotationLayer section svg{position:absolute;width:100%;height:100%}:root{--xfa-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,")}@media (forced-colors: active){.xfaLayer *:required{outline:1.5px solid selectedItem}}.xfaLayer .highlight{margin:-1px;padding:1px;background-color:#efcbed;border-radius:4px}.xfaLayer .highlight.appended{position:initial}.xfaLayer .highlight.begin{border-radius:4px 0 0 4px}.xfaLayer .highlight.end{border-radius:0 4px 4px 0}.xfaLayer .highlight.middle{border-radius:0}.xfaLayer .highlight.selected{background-color:#cbdfcb}.xfaLayer ::-moz-selection{background:rgba(0,0,255,1)}.xfaLayer ::selection{background:rgba(0,0,255,1)}.xfaPage{overflow:hidden;position:relative}.xfaContentarea{position:absolute}.xfaPrintOnly{display:none}.xfaLayer{position:absolute;text-align:initial;top:0;left:0;transform-origin:0 0;line-height:1.2}.xfaLayer *{color:inherit;font:inherit;font-style:inherit;font-weight:inherit;font-kerning:inherit;letter-spacing:-.01px;text-align:inherit;text-decoration:inherit;box-sizing:border-box;background-color:transparent;padding:0;margin:0;pointer-events:auto;line-height:inherit}.xfaLayer *:required{outline:1.5px solid red}.xfaLayer div{pointer-events:none}.xfaLayer svg{pointer-events:none}.xfaLayer svg *{pointer-events:none}.xfaLayer a{color:#00f}.xfaRich li{margin-left:3em}.xfaFont{color:#000;font-weight:400;font-kerning:none;font-size:10px;font-style:normal;letter-spacing:0;text-decoration:none;vertical-align:0}.xfaCaption{overflow:hidden;flex:0 0 auto}.xfaCaptionForCheckButton{overflow:hidden;flex:1 1 auto}.xfaLabel{height:100%;width:100%}.xfaLeft{display:flex;flex-direction:row;align-items:center}.xfaRight{display:flex;flex-direction:row-reverse;align-items:center}.xfaLeft>.xfaCaption,.xfaLeft>.xfaCaptionForCheckButton,.xfaRight>.xfaCaption,.xfaRight>.xfaCaptionForCheckButton{max-height:100%}.xfaTop{display:flex;flex-direction:column;align-items:flex-start}.xfaBottom{display:flex;flex-direction:column-reverse;align-items:flex-start}.xfaTop>.xfaCaption,.xfaTop>.xfaCaptionForCheckButton,.xfaBottom>.xfaCaption,.xfaBottom>.xfaCaptionForCheckButton{width:100%}.xfaBorder{background-color:transparent;position:absolute;pointer-events:none}.xfaWrapped{width:100%;height:100%}.xfaTextfield:focus,.xfaSelect:focus{background-image:none;background-color:transparent;outline:auto;outline-offset:-1px}.xfaCheckbox:focus,.xfaRadio:focus{outline:auto}.xfaTextfield,.xfaSelect{height:100%;width:100%;flex:1 1 auto;border:none;resize:none;background-image:var(--xfa-unfocused-field-background)}.xfaTop>.xfaTextfield,.xfaTop>.xfaSelect,.xfaBottom>.xfaTextfield,.xfaBottom>.xfaSelect{flex:0 1 auto}.xfaButton{cursor:pointer;width:100%;height:100%;border:none;text-align:center}.xfaLink{width:100%;height:100%;position:absolute;top:0;left:0}.xfaCheckbox,.xfaRadio{width:100%;height:100%;flex:0 0 auto;border:none}.xfaRich{white-space:pre-wrap;width:100%;height:100%}.xfaImage{-o-object-position:left top;object-position:left top;-o-object-fit:contain;object-fit:contain;width:100%;height:100%}.xfaLrTb,.xfaRlTb,.xfaTb{display:flex;flex-direction:column;align-items:stretch}.xfaLr{display:flex;flex-direction:row;align-items:stretch}.xfaRl{display:flex;flex-direction:row-reverse;align-items:stretch}.xfaTb>div{justify-content:left}.xfaPosition,.xfaArea{position:relative}.xfaValignMiddle{display:flex;align-items:center}.xfaTable{display:flex;flex-direction:column;align-items:stretch}.xfaTable .xfaRow{display:flex;flex-direction:row;align-items:stretch}.xfaTable .xfaRlRow{display:flex;flex-direction:row-reverse;align-items:stretch;flex:1}.xfaTable .xfaRlRow>div{flex:1}.xfaNonInteractive input,.xfaNonInteractive textarea,.xfaDisabled input,.xfaDisabled textarea,.xfaReadOnly input,.xfaReadOnly textarea{background:initial}@media print{.xfaTextfield,.xfaSelect{background:transparent}.xfaSelect{-webkit-appearance:none;-moz-appearance:none;appearance:none;text-indent:1px;text-overflow:""}}:root{--focus-outline: solid 2px red;--hover-outline: dashed 2px blue;--freetext-line-height: 1.35;--freetext-padding: 2px}@media (forced-colors: active){:root{--focus-outline: solid 3px ButtonText;--hover-outline: dashed 3px ButtonText}}[data-editor-rotation="90"]{transform:rotate(90deg)}[data-editor-rotation="180"]{transform:rotate(180deg)}[data-editor-rotation="270"]{transform:rotate(270deg)}.annotationEditorLayer{background:transparent;position:absolute;top:0;left:0;font-size:calc(100px * var(--scale-factor));transform-origin:0 0}.annotationEditorLayer .selectedEditor{outline:var(--focus-outline);resize:none}.annotationEditorLayer .freeTextEditor{position:absolute;background:transparent;border-radius:3px;padding:calc(var(--freetext-padding) * var(--scale-factor));resize:none;width:auto;height:auto;z-index:1;transform-origin:0 0;touch-action:none}.annotationEditorLayer .freeTextEditor .internal{background:transparent;border:none;top:0;left:0;overflow:visible;white-space:nowrap;resize:none;font:10px sans-serif;line-height:var(--freetext-line-height)}.annotationEditorLayer .freeTextEditor .overlay{position:absolute;display:none;background:transparent;top:0;left:0;width:100%;height:100%}.annotationEditorLayer .freeTextEditor .overlay.enabled{display:block}.annotationEditorLayer .freeTextEditor .internal:empty:before{content:attr(default-content);color:gray}.annotationEditorLayer .freeTextEditor .internal:focus{outline:none}.annotationEditorLayer .inkEditor.disabled{resize:none}.annotationEditorLayer .inkEditor.disabled.selectedEditor{resize:horizontal}.annotationEditorLayer .freeTextEditor:hover:not(.selectedEditor),.annotationEditorLayer .inkEditor:hover:not(.selectedEditor){outline:var(--hover-outline)}.annotationEditorLayer .inkEditor{position:absolute;background:transparent;border-radius:3px;overflow:auto;width:100%;height:100%;z-index:1;transform-origin:0 0;cursor:auto}.annotationEditorLayer .inkEditor.editing{resize:none;cursor:var(--editorInk-editing-cursor),pointer}.annotationEditorLayer .inkEditor .inkEditorCanvas{position:absolute;top:0;left:0;width:100%;height:100%;touch-action:none}:root{--viewer-container-height: 0;--pdfViewer-padding-bottom: 0;--page-margin: 1px auto -8px;--page-border: 9px solid transparent;--page-border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAA1ElEQVQ4jbWUWw6EIAxFy2NFs/8NzR4UJhpqLsdi5mOmSSMUOfYWqv3S0gMr4XlYH/64gZa/gN3ANYA7KAXALt4ktoQ5MI9YxqaG8bWmsIysMuT6piSQCa4whZThCu8CM4zP9YJaKci9jicPq3NcBWYoPMGUlhG7ivtkB+gVyFY75wXghOvh8t5mto1Mdim6e+MBqH6XsY+YAwjpq3vGF7weTWQptLEDVCZvPTMl5JZZsdh47FHW6qFMyvLYqjcnmdFfY9Xk/KDOlzCusX2mi/ofM7MPkzBcSp4Q1/wAAAAASUVORK5CYII=) 9 9 repeat;--spreadHorizontalWrapped-margin-LR: -3.5px;--scale-factor: 1}@media screen and (forced-colors: active){:root{--pdfViewer-padding-bottom: 9px;--page-margin: 8px auto -1px;--page-border: 1px solid CanvasText;--page-border-image: none;--spreadHorizontalWrapped-margin-LR: 3.5px}}[data-main-rotation="90"]{transform:rotate(90deg) translateY(-100%)}[data-main-rotation="180"]{transform:rotate(180deg) translate(-100%,-100%)}[data-main-rotation="270"]{transform:rotate(270deg) translate(-100%)}.pdfViewer{padding-bottom:var(--pdfViewer-padding-bottom)}.pdfViewer .canvasWrapper{overflow:hidden}.pdfViewer .page{direction:ltr;width:816px;height:1056px;margin:var(--page-margin);position:relative;overflow:visible;border:var(--page-border);-o-border-image:var(--page-border-image);border-image:var(--page-border-image);background-clip:content-box;background-color:#fff}.pdfViewer .dummyPage{position:relative;width:0;height:var(--viewer-container-height)}.pdfViewer.removePageBorders .page{margin:0 auto 10px;border:none}.pdfViewer.singlePageView{display:inline-block}.pdfViewer.singlePageView .page{margin:0;border:none}.pdfViewer.scrollHorizontal,.pdfViewer.scrollWrapped,.spread{margin-left:3.5px;margin-right:3.5px;text-align:center}.pdfViewer.scrollHorizontal,.spread{white-space:nowrap}.pdfViewer.removePageBorders,.pdfViewer.scrollHorizontal .spread,.pdfViewer.scrollWrapped .spread{margin-left:0;margin-right:0}.spread .page,.spread .dummyPage,.pdfViewer.scrollHorizontal .page,.pdfViewer.scrollWrapped .page,.pdfViewer.scrollHorizontal .spread,.pdfViewer.scrollWrapped .spread{display:inline-block;vertical-align:middle}.spread .page,.pdfViewer.scrollHorizontal .page,.pdfViewer.scrollWrapped .page{margin-left:var(--spreadHorizontalWrapped-margin-LR);margin-right:var(--spreadHorizontalWrapped-margin-LR)}.pdfViewer.removePageBorders .spread .page,.pdfViewer.removePageBorders.scrollHorizontal .page,.pdfViewer.removePageBorders.scrollWrapped .page{margin-left:5px;margin-right:5px}.pdfViewer .page canvas{margin:0;display:block}.pdfViewer .page canvas[hidden]{display:none}.pdfViewer .page .loadingIcon{position:absolute;display:block;left:0;top:0;right:0;bottom:0;background:url(data:image/gif;base64,R0lGODlhGAAYAPQAAP///wAAAM7Ozvr6+uDg4LCwsOjo6I6OjsjIyJycnNjY2KioqMDAwPLy8nZ2doaGhri4uGhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJBwAAACwAAAAAGAAYAAAFriAgjiQAQWVaDgr5POSgkoTDjFE0NoQ8iw8HQZQTDQjDn4jhSABhAAOhoTqSDg7qSUQwxEaEwwFhXHhHgzOA1xshxAnfTzotGRaHglJqkJcaVEqCgyoCBQkJBQKDDXQGDYaIioyOgYSXA36XIgYMBWRzXZoKBQUMmil0lgalLSIClgBpO0g+s26nUWddXyoEDIsACq5SsTMMDIECwUdJPw0Mzsu0qHYkw72bBmozIQAh+QQJBwAAACwAAAAAGAAYAAAFsCAgjiTAMGVaDgR5HKQwqKNxIKPjjFCk0KNXC6ATKSI7oAhxWIhezwhENTCQEoeGCdWIPEgzESGxEIgGBWstEW4QCGGAIJEoxGmGt5ZkgCRQQHkGd2CESoeIIwoMBQUMP4cNeQQGDYuNj4iSb5WJnmeGng0CDGaBlIQEJziHk3sABidDAHBgagButSKvAAoyuHuUYHgCkAZqebw0AgLBQyyzNKO3byNuoSS8x8OfwIchACH5BAkHAAAALAAAAAAYABgAAAW4ICCOJIAgZVoOBJkkpDKoo5EI43GMjNPSokXCINKJCI4HcCRIQEQvqIOhGhBHhUTDhGo4diOZyFAoKEQDxra2mAEgjghOpCgz3LTBIxJ5kgwMBShACREHZ1V4Kg1rS44pBAgMDAg/Sw0GBAQGDZGTlY+YmpyPpSQDiqYiDQoCliqZBqkGAgKIS5kEjQ21VwCyp76dBHiNvz+MR74AqSOdVwbQuo+abppo10ssjdkAnc0rf8vgl8YqIQAh+QQJBwAAACwAAAAAGAAYAAAFrCAgjiQgCGVaDgZZFCQxqKNRKGOSjMjR0qLXTyciHA7AkaLACMIAiwOC1iAxCrMToHHYjWQiA4NBEA0Q1RpWxHg4cMXxNDk4OBxNUkPAQAEXDgllKgMzQA1pSYopBgonCj9JEA8REQ8QjY+RQJOVl4ugoYssBJuMpYYjDQSliwasiQOwNakALKqsqbWvIohFm7V6rQAGP6+JQLlFg7KDQLKJrLjBKbvAor3IKiEAIfkECQcAAAAsAAAAABgAGAAABbUgII4koChlmhokw5DEoI4NQ4xFMQoJO4uuhignMiQWvxGBIQC+AJBEUyUcIRiyE6CR0CllW4HABxBURTUw4nC4FcWo5CDBRpQaCoF7VjgsyCUDYDMNZ0mHdwYEBAaGMwwHDg4HDA2KjI4qkJKUiJ6faJkiA4qAKQkRB3E0i6YpAw8RERAjA4tnBoMApCMQDhFTuySKoSKMJAq6rD4GzASiJYtgi6PUcs9Kew0xh7rNJMqIhYchACH5BAkHAAAALAAAAAAYABgAAAW0ICCOJEAQZZo2JIKQxqCOjWCMDDMqxT2LAgELkBMZCoXfyCBQiFwiRsGpku0EshNgUNAtrYPT0GQVNRBWwSKBMp98P24iISgNDAS4ipGA6JUpA2WAhDR4eWM/CAkHBwkIDYcGiTOLjY+FmZkNlCN3eUoLDmwlDW+AAwcODl5bYl8wCVYMDw5UWzBtnAANEQ8kBIM0oAAGPgcREIQnVloAChEOqARjzgAQEbczg8YkWJq8nSUhACH5BAkHAAAALAAAAAAYABgAAAWtICCOJGAYZZoOpKKQqDoORDMKwkgwtiwSBBYAJ2owGL5RgxBziQQMgkwoMkhNqAEDARPSaiMDFdDIiRSFQowMXE8Z6RdpYHWnEAWGPVkajPmARVZMPUkCBQkJBQINgwaFPoeJi4GVlQ2Qc3VJBQcLV0ptfAMJBwdcIl+FYjALQgimoGNWIhAQZA4HXSpLMQ8PIgkOSHxAQhERPw7ASTSFyCMMDqBTJL8tf3y2fCEAIfkECQcAAAAsAAAAABgAGAAABa8gII4k0DRlmg6kYZCoOg5EDBDEaAi2jLO3nEkgkMEIL4BLpBAkVy3hCTAQKGAznM0AFNFGBAbj2cA9jQixcGZAGgECBu/9HnTp+FGjjezJFAwFBQwKe2Z+KoCChHmNjVMqA21nKQwJEJRlbnUFCQlFXlpeCWcGBUACCwlrdw8RKGImBwktdyMQEQciB7oACwcIeA4RVwAODiIGvHQKERAjxyMIB5QlVSTLYLZ0sW8hACH5BAkHAAAALAAAAAAYABgAAAW0ICCOJNA0ZZoOpGGQrDoOBCoSxNgQsQzgMZyIlvOJdi+AS2SoyXrK4umWPM5wNiV0UDUIBNkdoepTfMkA7thIECiyRtUAGq8fm2O4jIBgMBA1eAZ6Knx+gHaJR4QwdCMKBxEJRggFDGgQEREPjjAMBQUKIwIRDhBDC2QNDDEKoEkDoiMHDigICGkJBS2dDA6TAAnAEAkCdQ8ORQcHTAkLcQQODLPMIgIJaCWxJMIkPIoAt3EhACH5BAkHAAAALAAAAAAYABgAAAWtICCOJNA0ZZoOpGGQrDoOBCoSxNgQsQzgMZyIlvOJdi+AS2SoyXrK4umWHM5wNiV0UN3xdLiqr+mENcWpM9TIbrsBkEck8oC0DQqBQGGIz+t3eXtob0ZTPgNrIwQJDgtGAgwCWSIMDg4HiiUIDAxFAAoODwxDBWINCEGdSTQkCQcoegADBaQ6MggHjwAFBZUFCm0HB0kJCUy9bAYHCCPGIwqmRq0jySMGmj6yRiEAIfkECQcAAAAsAAAAABgAGAAABbIgII4k0DRlmg6kYZCsOg4EKhLE2BCxDOAxnIiW84l2L4BLZKipBopW8XRLDkeCiAMyMvQAA+uON4JEIo+vqukkKQ6RhLHplVGN+LyKcXA4Dgx5DWwGDXx+gIKENnqNdzIDaiMECwcFRgQCCowiCAcHCZIlCgICVgSfCEMMnA0CXaU2YSQFoQAKUQMMqjoyAglcAAyBAAIMRUYLCUkFlybDeAYJryLNk6xGNCTQXY0juHghACH5BAkHAAAALAAAAAAYABgAAAWzICCOJNA0ZVoOAmkY5KCSSgSNBDE2hDyLjohClBMNij8RJHIQvZwEVOpIekRQJyJs5AMoHA+GMbE1lnm9EcPhOHRnhpwUl3AsknHDm5RN+v8qCAkHBwkIfw1xBAYNgoSGiIqMgJQifZUjBhAJYj95ewIJCQV7KYpzBAkLLQADCHOtOpY5PgNlAAykAEUsQ1wzCgWdCIdeArczBQVbDJ0NAqyeBb64nQAGArBTt8R8mLuyPyEAOwAAAAAAAAAAAA==) center no-repeat}.pdfViewer .page .loadingIcon.notVisible{background:none}.pdfViewer.enablePermissions .textLayer span{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important;cursor:not-allowed}.pdfPresentationMode .pdfViewer{padding-bottom:0}.pdfPresentationMode .spread{margin:0}.pdfPresentationMode .pdfViewer .page{margin:0 auto;border:2px solid transparent}.container[data-v-9bad3887]{position:relative;width:100%;height:100%}.pdfViewer[data-v-9bad3887]{margin:0 auto}.pdf-wrapper[data-v-9bad3887]{position:absolute;width:100%;height:100%;overflow-y:auto}.container .pdf_down[data-v-9bad3887]{position:fixed;display:flex;z-index:20;right:26px;bottom:7%}.container .pdf_down .pdf_set_left[data-v-9bad3887],.container .pdf_down .pdf_set_middle[data-v-9bad3887]{width:30px;height:40px;color:#408fff;font-size:15px;padding-top:25px;text-align:center;margin-right:5px;cursor:pointer} diff --git a/public/dist/assets/PptxRender-5a3debe6.js b/public/dist/assets/PptxRender-5a3debe6.js new file mode 100644 index 0000000..7dc1634 --- /dev/null +++ b/public/dist/assets/PptxRender-5a3debe6.js @@ -0,0 +1,47 @@ +import{c as cf,g as lf,d as uf,r as ff,o as df,a as hf,b as gf,_ as pf}from"./index-be50c070.js";import{r as vf}from"./worker-ref-b3abaee8.js";var Rc={exports:{}};/*! + * jQuery JavaScript Library v3.7.1 + * https://jquery.com/ + * + * Copyright OpenJS Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2023-08-28T13:37Z + */(function(t){(function(e,n){t.exports=e.document?n(e,!0):function(i){if(!i.document)throw new Error("jQuery requires a window with a document");return n(i)}})(typeof window<"u"?window:cf,function(e,n){var i=[],r=Object.getPrototypeOf,a=i.slice,o=i.flat?function(c){return i.flat.call(c)}:function(c){return i.concat.apply([],c)},s=i.push,l=i.indexOf,u={},d=u.toString,h=u.hasOwnProperty,g=h.toString,x=g.call(Object),_={},T=function(f){return typeof f=="function"&&typeof f.nodeType!="number"&&typeof f.item!="function"},A=function(f){return f!=null&&f===f.window},$=e.document,S={type:!0,src:!0,nonce:!0,noModule:!0};function M(c,f,v){v=v||$;var y,m,b=v.createElement("script");if(b.text=c,f)for(y in S)m=f[y]||f.getAttribute&&f.getAttribute(y),m&&b.setAttribute(y,m);v.head.appendChild(b).parentNode.removeChild(b)}function k(c){return c==null?c+"":typeof c=="object"||typeof c=="function"?u[d.call(c)]||"object":typeof c}var P="3.7.1",D=/HTML$/i,p=function(c,f){return new p.fn.init(c,f)};p.fn=p.prototype={jquery:P,constructor:p,length:0,toArray:function(){return a.call(this)},get:function(c){return c==null?a.call(this):c<0?this[c+this.length]:this[c]},pushStack:function(c){var f=p.merge(this.constructor(),c);return f.prevObject=this,f},each:function(c){return p.each(this,c)},map:function(c){return this.pushStack(p.map(this,function(f,v){return c.call(f,v,f)}))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(p.grep(this,function(c,f){return(f+1)%2}))},odd:function(){return this.pushStack(p.grep(this,function(c,f){return f%2}))},eq:function(c){var f=this.length,v=+c+(c<0?f:0);return this.pushStack(v>=0&&v0&&f-1 in c}function U(c,f){return c.nodeName&&c.nodeName.toLowerCase()===f.toLowerCase()}var G=i.pop,X=i.sort,Q=i.splice,z="[\\x20\\t\\r\\n\\f]",q=new RegExp("^"+z+"+|((?:^|[^\\\\])(?:\\\\.)*)"+z+"+$","g");p.contains=function(c,f){var v=f&&f.parentNode;return c===v||!!(v&&v.nodeType===1&&(c.contains?c.contains(v):c.compareDocumentPosition&&c.compareDocumentPosition(v)&16))};var Mt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function it(c,f){return f?c==="\0"?"�":c.slice(0,-1)+"\\"+c.charCodeAt(c.length-1).toString(16)+" ":"\\"+c}p.escapeSelector=function(c){return(c+"").replace(Mt,it)};var K=$,ft=s;(function(){var c,f,v,y,m,b=ft,w,R,E,I,B,Y=p.expando,O=0,W=0,ut=qi(),wt=qi(),gt=qi(),se=qi(),Kt=function(C,L){return C===L&&(m=!0),0},ze="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",He="(?:\\\\[\\da-fA-F]{1,6}"+z+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",bt="\\["+z+"*("+He+")(?:"+z+"*([*^$|!~]?=)"+z+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+He+"))|)"+z+"*\\]",An=":("+He+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+bt+")*)|.*)\\)|)",At=new RegExp(z+"+","g"),Vt=new RegExp("^"+z+"*,"+z+"*"),_i=new RegExp("^"+z+"*([>+~]|"+z+")"+z+"*"),ca=new RegExp(z+"|>"),Ye=new RegExp(An),mi=new RegExp("^"+He+"$"),Ue={ID:new RegExp("^#("+He+")"),CLASS:new RegExp("^\\.("+He+")"),TAG:new RegExp("^("+He+"|[*])"),ATTR:new RegExp("^"+bt),PSEUDO:new RegExp("^"+An),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+z+"*(even|odd|(([+-]|)(\\d*)n|)"+z+"*(?:([+-]|)"+z+"*(\\d+)|))"+z+"*\\)|)","i"),bool:new RegExp("^(?:"+ze+")$","i"),needsContext:new RegExp("^"+z+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+z+"*((?:-\\d)?\\d*)"+z+"*\\)|)(?=[^-]|$)","i")},gn=/^(?:input|select|textarea|button)$/i,pn=/^h\d$/i,ke=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,la=/[+~]/,nn=new RegExp("\\\\[\\da-fA-F]{1,6}"+z+"?|\\\\([^\\r\\n\\f])","g"),rn=function(C,L){var N="0x"+C.slice(1)-65536;return L||(N<0?String.fromCharCode(N+65536):String.fromCharCode(N>>10|55296,N&1023|56320))},tf=function(){vn()},ef=Ki(function(C){return C.disabled===!0&&U(C,"fieldset")},{dir:"parentNode",next:"legend"});function nf(){try{return w.activeElement}catch{}}try{b.apply(i=a.call(K.childNodes),K.childNodes),i[K.childNodes.length].nodeType}catch{b={apply:function(L,N){ft.apply(L,a.call(N))},call:function(L){ft.apply(L,a.call(arguments,1))}}}function Rt(C,L,N,F){var H,Z,tt,nt,et,xt,ct,dt=L&&L.ownerDocument,yt=L?L.nodeType:9;if(N=N||[],typeof C!="string"||!C||yt!==1&&yt!==9&&yt!==11)return N;if(!F&&(vn(L),L=L||w,E)){if(yt!==11&&(et=ke.exec(C)))if(H=et[1]){if(yt===9)if(tt=L.getElementById(H)){if(tt.id===H)return b.call(N,tt),N}else return N;else if(dt&&(tt=dt.getElementById(H))&&Rt.contains(L,tt)&&tt.id===H)return b.call(N,tt),N}else{if(et[2])return b.apply(N,L.getElementsByTagName(C)),N;if((H=et[3])&&L.getElementsByClassName)return b.apply(N,L.getElementsByClassName(H)),N}if(!se[C+" "]&&(!I||!I.test(C))){if(ct=C,dt=L,yt===1&&(ca.test(C)||_i.test(C))){for(dt=la.test(C)&&ua(L.parentNode)||L,(dt!=L||!_.scope)&&((nt=L.getAttribute("id"))?nt=p.escapeSelector(nt):L.setAttribute("id",nt=Y)),xt=bi(C),Z=xt.length;Z--;)xt[Z]=(nt?"#"+nt:":scope")+" "+Zi(xt[Z]);ct=xt.join(",")}try{return b.apply(N,dt.querySelectorAll(ct)),N}catch{se(C,!0)}finally{nt===Y&&L.removeAttribute("id")}}}return xs(C.replace(q,"$1"),L,N,F)}function qi(){var C=[];function L(N,F){return C.push(N+" ")>f.cacheLength&&delete L[C.shift()],L[N+" "]=F}return L}function De(C){return C[Y]=!0,C}function Vn(C){var L=w.createElement("fieldset");try{return!!C(L)}catch{return!1}finally{L.parentNode&&L.parentNode.removeChild(L),L=null}}function rf(C){return function(L){return U(L,"input")&&L.type===C}}function af(C){return function(L){return(U(L,"input")||U(L,"button"))&&L.type===C}}function ps(C){return function(L){return"form"in L?L.parentNode&&L.disabled===!1?"label"in L?"label"in L.parentNode?L.parentNode.disabled===C:L.disabled===C:L.isDisabled===C||L.isDisabled!==!C&&ef(L)===C:L.disabled===C:"label"in L?L.disabled===C:!1}}function Cn(C){return De(function(L){return L=+L,De(function(N,F){for(var H,Z=C([],N.length,L),tt=Z.length;tt--;)N[H=Z[tt]]&&(N[H]=!(F[H]=N[H]))})})}function ua(C){return C&&typeof C.getElementsByTagName<"u"&&C}function vn(C){var L,N=C?C.ownerDocument||C:K;return N==w||N.nodeType!==9||!N.documentElement||(w=N,R=w.documentElement,E=!p.isXMLDoc(w),B=R.matches||R.webkitMatchesSelector||R.msMatchesSelector,R.msMatchesSelector&&K!=w&&(L=w.defaultView)&&L.top!==L&&L.addEventListener("unload",tf),_.getById=Vn(function(F){return R.appendChild(F).id=p.expando,!w.getElementsByName||!w.getElementsByName(p.expando).length}),_.disconnectedMatch=Vn(function(F){return B.call(F,"*")}),_.scope=Vn(function(){return w.querySelectorAll(":scope")}),_.cssHas=Vn(function(){try{return w.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),_.getById?(f.filter.ID=function(F){var H=F.replace(nn,rn);return function(Z){return Z.getAttribute("id")===H}},f.find.ID=function(F,H){if(typeof H.getElementById<"u"&&E){var Z=H.getElementById(F);return Z?[Z]:[]}}):(f.filter.ID=function(F){var H=F.replace(nn,rn);return function(Z){var tt=typeof Z.getAttributeNode<"u"&&Z.getAttributeNode("id");return tt&&tt.value===H}},f.find.ID=function(F,H){if(typeof H.getElementById<"u"&&E){var Z,tt,nt,et=H.getElementById(F);if(et){if(Z=et.getAttributeNode("id"),Z&&Z.value===F)return[et];for(nt=H.getElementsByName(F),tt=0;et=nt[tt++];)if(Z=et.getAttributeNode("id"),Z&&Z.value===F)return[et]}return[]}}),f.find.TAG=function(F,H){return typeof H.getElementsByTagName<"u"?H.getElementsByTagName(F):H.querySelectorAll(F)},f.find.CLASS=function(F,H){if(typeof H.getElementsByClassName<"u"&&E)return H.getElementsByClassName(F)},I=[],Vn(function(F){var H;R.appendChild(F).innerHTML="
    ",F.querySelectorAll("[selected]").length||I.push("\\["+z+"*(?:value|"+ze+")"),F.querySelectorAll("[id~="+Y+"-]").length||I.push("~="),F.querySelectorAll("a#"+Y+"+*").length||I.push(".#.+[+~]"),F.querySelectorAll(":checked").length||I.push(":checked"),H=w.createElement("input"),H.setAttribute("type","hidden"),F.appendChild(H).setAttribute("name","D"),R.appendChild(F).disabled=!0,F.querySelectorAll(":disabled").length!==2&&I.push(":enabled",":disabled"),H=w.createElement("input"),H.setAttribute("name",""),F.appendChild(H),F.querySelectorAll("[name='']").length||I.push("\\["+z+"*name"+z+"*="+z+`*(?:''|"")`)}),_.cssHas||I.push(":has"),I=I.length&&new RegExp(I.join("|")),Kt=function(F,H){if(F===H)return m=!0,0;var Z=!F.compareDocumentPosition-!H.compareDocumentPosition;return Z||(Z=(F.ownerDocument||F)==(H.ownerDocument||H)?F.compareDocumentPosition(H):1,Z&1||!_.sortDetached&&H.compareDocumentPosition(F)===Z?F===w||F.ownerDocument==K&&Rt.contains(K,F)?-1:H===w||H.ownerDocument==K&&Rt.contains(K,H)?1:y?l.call(y,F)-l.call(y,H):0:Z&4?-1:1)}),w}Rt.matches=function(C,L){return Rt(C,null,null,L)},Rt.matchesSelector=function(C,L){if(vn(C),E&&!se[L+" "]&&(!I||!I.test(L)))try{var N=B.call(C,L);if(N||_.disconnectedMatch||C.document&&C.document.nodeType!==11)return N}catch{se(L,!0)}return Rt(L,w,null,[C]).length>0},Rt.contains=function(C,L){return(C.ownerDocument||C)!=w&&vn(C),p.contains(C,L)},Rt.attr=function(C,L){(C.ownerDocument||C)!=w&&vn(C);var N=f.attrHandle[L.toLowerCase()],F=N&&h.call(f.attrHandle,L.toLowerCase())?N(C,L,!E):void 0;return F!==void 0?F:C.getAttribute(L)},Rt.error=function(C){throw new Error("Syntax error, unrecognized expression: "+C)},p.uniqueSort=function(C){var L,N=[],F=0,H=0;if(m=!_.sortStable,y=!_.sortStable&&a.call(C,0),X.call(C,Kt),m){for(;L=C[H++];)L===C[H]&&(F=N.push(H));for(;F--;)Q.call(C,N[F],1)}return y=null,C},p.fn.uniqueSort=function(){return this.pushStack(p.uniqueSort(a.apply(this)))},f=p.expr={cacheLength:50,createPseudo:De,match:Ue,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(C){return C[1]=C[1].replace(nn,rn),C[3]=(C[3]||C[4]||C[5]||"").replace(nn,rn),C[2]==="~="&&(C[3]=" "+C[3]+" "),C.slice(0,4)},CHILD:function(C){return C[1]=C[1].toLowerCase(),C[1].slice(0,3)==="nth"?(C[3]||Rt.error(C[0]),C[4]=+(C[4]?C[5]+(C[6]||1):2*(C[3]==="even"||C[3]==="odd")),C[5]=+(C[7]+C[8]||C[3]==="odd")):C[3]&&Rt.error(C[0]),C},PSEUDO:function(C){var L,N=!C[6]&&C[2];return Ue.CHILD.test(C[0])?null:(C[3]?C[2]=C[4]||C[5]||"":N&&Ye.test(N)&&(L=bi(N,!0))&&(L=N.indexOf(")",N.length-L)-N.length)&&(C[0]=C[0].slice(0,L),C[2]=N.slice(0,L)),C.slice(0,3))}},filter:{TAG:function(C){var L=C.replace(nn,rn).toLowerCase();return C==="*"?function(){return!0}:function(N){return U(N,L)}},CLASS:function(C){var L=ut[C+" "];return L||(L=new RegExp("(^|"+z+")"+C+"("+z+"|$)"))&&ut(C,function(N){return L.test(typeof N.className=="string"&&N.className||typeof N.getAttribute<"u"&&N.getAttribute("class")||"")})},ATTR:function(C,L,N){return function(F){var H=Rt.attr(F,C);return H==null?L==="!=":L?(H+="",L==="="?H===N:L==="!="?H!==N:L==="^="?N&&H.indexOf(N)===0:L==="*="?N&&H.indexOf(N)>-1:L==="$="?N&&H.slice(-N.length)===N:L==="~="?(" "+H.replace(At," ")+" ").indexOf(N)>-1:L==="|="?H===N||H.slice(0,N.length+1)===N+"-":!1):!0}},CHILD:function(C,L,N,F,H){var Z=C.slice(0,3)!=="nth",tt=C.slice(-4)!=="last",nt=L==="of-type";return F===1&&H===0?function(et){return!!et.parentNode}:function(et,xt,ct){var dt,yt,st,Ot,be,ue=Z!==tt?"nextSibling":"previousSibling",Ee=et.parentNode,Ve=nt&&et.nodeName.toLowerCase(),jn=!ct&&!nt,pe=!1;if(Ee){if(Z){for(;ue;){for(st=et;st=st[ue];)if(nt?U(st,Ve):st.nodeType===1)return!1;be=ue=C==="only"&&!be&&"nextSibling"}return!0}if(be=[tt?Ee.firstChild:Ee.lastChild],tt&&jn){for(yt=Ee[Y]||(Ee[Y]={}),dt=yt[C]||[],Ot=dt[0]===O&&dt[1],pe=Ot&&dt[2],st=Ot&&Ee.childNodes[Ot];st=++Ot&&st&&st[ue]||(pe=Ot=0)||be.pop();)if(st.nodeType===1&&++pe&&st===et){yt[C]=[O,Ot,pe];break}}else if(jn&&(yt=et[Y]||(et[Y]={}),dt=yt[C]||[],Ot=dt[0]===O&&dt[1],pe=Ot),pe===!1)for(;(st=++Ot&&st&&st[ue]||(pe=Ot=0)||be.pop())&&!((nt?U(st,Ve):st.nodeType===1)&&++pe&&(jn&&(yt=st[Y]||(st[Y]={}),yt[C]=[O,pe]),st===et)););return pe-=H,pe===F||pe%F===0&&pe/F>=0}}},PSEUDO:function(C,L){var N,F=f.pseudos[C]||f.setFilters[C.toLowerCase()]||Rt.error("unsupported pseudo: "+C);return F[Y]?F(L):F.length>1?(N=[C,C,"",L],f.setFilters.hasOwnProperty(C.toLowerCase())?De(function(H,Z){for(var tt,nt=F(H,L),et=nt.length;et--;)tt=l.call(H,nt[et]),H[tt]=!(Z[tt]=nt[et])}):function(H){return F(H,0,N)}):F}},pseudos:{not:De(function(C){var L=[],N=[],F=ga(C.replace(q,"$1"));return F[Y]?De(function(H,Z,tt,nt){for(var et,xt=F(H,null,nt,[]),ct=H.length;ct--;)(et=xt[ct])&&(H[ct]=!(Z[ct]=et))}):function(H,Z,tt){return L[0]=H,F(L,null,tt,N),L[0]=null,!N.pop()}}),has:De(function(C){return function(L){return Rt(C,L).length>0}}),contains:De(function(C){return C=C.replace(nn,rn),function(L){return(L.textContent||p.text(L)).indexOf(C)>-1}}),lang:De(function(C){return mi.test(C||"")||Rt.error("unsupported lang: "+C),C=C.replace(nn,rn).toLowerCase(),function(L){var N;do if(N=E?L.lang:L.getAttribute("xml:lang")||L.getAttribute("lang"))return N=N.toLowerCase(),N===C||N.indexOf(C+"-")===0;while((L=L.parentNode)&&L.nodeType===1);return!1}}),target:function(C){var L=e.location&&e.location.hash;return L&&L.slice(1)===C.id},root:function(C){return C===R},focus:function(C){return C===nf()&&w.hasFocus()&&!!(C.type||C.href||~C.tabIndex)},enabled:ps(!1),disabled:ps(!0),checked:function(C){return U(C,"input")&&!!C.checked||U(C,"option")&&!!C.selected},selected:function(C){return C.parentNode&&C.parentNode.selectedIndex,C.selected===!0},empty:function(C){for(C=C.firstChild;C;C=C.nextSibling)if(C.nodeType<6)return!1;return!0},parent:function(C){return!f.pseudos.empty(C)},header:function(C){return pn.test(C.nodeName)},input:function(C){return gn.test(C.nodeName)},button:function(C){return U(C,"input")&&C.type==="button"||U(C,"button")},text:function(C){var L;return U(C,"input")&&C.type==="text"&&((L=C.getAttribute("type"))==null||L.toLowerCase()==="text")},first:Cn(function(){return[0]}),last:Cn(function(C,L){return[L-1]}),eq:Cn(function(C,L,N){return[N<0?N+L:N]}),even:Cn(function(C,L){for(var N=0;NL?F=L:F=N;--F>=0;)C.push(F);return C}),gt:Cn(function(C,L,N){for(var F=N<0?N+L:N;++F1?function(L,N,F){for(var H=C.length;H--;)if(!C[H](L,N,F))return!1;return!0}:C[0]}function of(C,L,N){for(var F=0,H=L.length;F-1&&(tt[ct]=!(nt[ct]=yt))}}else st=Qi(st===nt?st.splice(ue,st.length):st),H?H(null,nt,st,xt):b.apply(nt,st)})}function ha(C){for(var L,N,F,H=C.length,Z=f.relative[C[0].type],tt=Z||f.relative[" "],nt=Z?1:0,et=Ki(function(dt){return dt===L},tt,!0),xt=Ki(function(dt){return l.call(L,dt)>-1},tt,!0),ct=[function(dt,yt,st){var Ot=!Z&&(st||yt!=v)||((L=yt).nodeType?et(dt,yt,st):xt(dt,yt,st));return L=null,Ot}];nt1&&fa(ct),nt>1&&Zi(C.slice(0,nt-1).concat({value:C[nt-2].type===" "?"*":""})).replace(q,"$1"),N,nt0,F=C.length>0,H=function(Z,tt,nt,et,xt){var ct,dt,yt,st=0,Ot="0",be=Z&&[],ue=[],Ee=v,Ve=Z||F&&f.find.TAG("*",xt),jn=O+=Ee==null?1:Math.random()||.1,pe=Ve.length;for(xt&&(v=tt==w||tt||xt);Ot!==pe&&(ct=Ve[Ot])!=null;Ot++){if(F&&ct){for(dt=0,!tt&&ct.ownerDocument!=w&&(vn(ct),nt=!E);yt=C[dt++];)if(yt(ct,tt||w,nt)){b.call(et,ct);break}xt&&(O=jn)}N&&((ct=!yt&&ct)&&st--,Z&&be.push(ct))}if(st+=Ot,N&&Ot!==st){for(dt=0;yt=L[dt++];)yt(be,ue,tt,nt);if(Z){if(st>0)for(;Ot--;)be[Ot]||ue[Ot]||(ue[Ot]=G.call(et));ue=Qi(ue)}b.apply(et,ue),xt&&!Z&&ue.length>0&&st+L.length>1&&p.uniqueSort(et)}return xt&&(O=jn,v=Ee),be};return N?De(H):H}function ga(C,L){var N,F=[],H=[],Z=gt[C+" "];if(!Z){for(L||(L=bi(C)),N=L.length;N--;)Z=ha(L[N]),Z[Y]?F.push(Z):H.push(Z);Z=gt(C,sf(H,F)),Z.selector=C}return Z}function xs(C,L,N,F){var H,Z,tt,nt,et,xt=typeof C=="function"&&C,ct=!F&&bi(C=xt.selector||C);if(N=N||[],ct.length===1){if(Z=ct[0]=ct[0].slice(0),Z.length>2&&(tt=Z[0]).type==="ID"&&L.nodeType===9&&E&&f.relative[Z[1].type]){if(L=(f.find.ID(tt.matches[0].replace(nn,rn),L)||[])[0],L)xt&&(L=L.parentNode);else return N;C=C.slice(Z.shift().value.length)}for(H=Ue.needsContext.test(C)?0:Z.length;H--&&(tt=Z[H],!f.relative[nt=tt.type]);)if((et=f.find[nt])&&(F=et(tt.matches[0].replace(nn,rn),la.test(Z[0].type)&&ua(L.parentNode)||L))){if(Z.splice(H,1),C=F.length&&Zi(Z),!C)return b.apply(N,F),N;break}}return(xt||ga(C,ct))(F,L,!E,N,!L||la.test(C)&&ua(L.parentNode)||L),N}_.sortStable=Y.split("").sort(Kt).join("")===Y,vn(),_.sortDetached=Vn(function(C){return C.compareDocumentPosition(w.createElement("fieldset"))&1}),p.find=Rt,p.expr[":"]=p.expr.pseudos,p.unique=p.uniqueSort,Rt.compile=ga,Rt.select=xs,Rt.setDocument=vn,Rt.tokenize=bi,Rt.escape=p.escapeSelector,Rt.getText=p.text,Rt.isXML=p.isXMLDoc,Rt.selectors=p.expr,Rt.support=p.support,Rt.uniqueSort=p.uniqueSort})();var rt=function(c,f,v){for(var y=[],m=v!==void 0;(c=c[f])&&c.nodeType!==9;)if(c.nodeType===1){if(m&&p(c).is(v))break;y.push(c)}return y},Lt=function(c,f){for(var v=[];c;c=c.nextSibling)c.nodeType===1&&c!==f&&v.push(c);return v},Ht=p.expr.match.needsContext,ie=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function le(c,f,v){return T(f)?p.grep(c,function(y,m){return!!f.call(y,m,y)!==v}):f.nodeType?p.grep(c,function(y){return y===f!==v}):typeof f!="string"?p.grep(c,function(y){return l.call(f,y)>-1!==v}):p.filter(f,c,v)}p.filter=function(c,f,v){var y=f[0];return v&&(c=":not("+c+")"),f.length===1&&y.nodeType===1?p.find.matchesSelector(y,c)?[y]:[]:p.find.matches(c,p.grep(f,function(m){return m.nodeType===1}))},p.fn.extend({find:function(c){var f,v,y=this.length,m=this;if(typeof c!="string")return this.pushStack(p(c).filter(function(){for(f=0;f1?p.uniqueSort(v):v},filter:function(c){return this.pushStack(le(this,c||[],!1))},not:function(c){return this.pushStack(le(this,c||[],!0))},is:function(c){return!!le(this,typeof c=="string"&&Ht.test(c)?p(c):c||[],!1).length}});var Tt,Ut=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,ge=p.fn.init=function(c,f,v){var y,m;if(!c)return this;if(v=v||Tt,typeof c=="string")if(c[0]==="<"&&c[c.length-1]===">"&&c.length>=3?y=[null,c,null]:y=Ut.exec(c),y&&(y[1]||!f))if(y[1]){if(f=f instanceof p?f[0]:f,p.merge(this,p.parseHTML(y[1],f&&f.nodeType?f.ownerDocument||f:$,!0)),ie.test(y[1])&&p.isPlainObject(f))for(y in f)T(this[y])?this[y](f[y]):this.attr(y,f[y]);return this}else return m=$.getElementById(y[2]),m&&(this[0]=m,this.length=1),this;else return!f||f.jquery?(f||v).find(c):this.constructor(f).find(c);else{if(c.nodeType)return this[0]=c,this.length=1,this;if(T(c))return v.ready!==void 0?v.ready(c):c(p)}return p.makeArray(c,this)};ge.prototype=p.fn,Tt=p($);var re=/^(?:parents|prev(?:Until|All))/,tn={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({has:function(c){var f=p(c,this),v=f.length;return this.filter(function(){for(var y=0;y-1:v.nodeType===1&&p.find.matchesSelector(v,c))){b.push(v);break}}return this.pushStack(b.length>1?p.uniqueSort(b):b)},index:function(c){return c?typeof c=="string"?l.call(p(c),this[0]):l.call(this,c.jquery?c[0]:c):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(c,f){return this.pushStack(p.uniqueSort(p.merge(this.get(),p(c,f))))},addBack:function(c){return this.add(c==null?this.prevObject:this.prevObject.filter(c))}});function J(c,f){for(;(c=c[f])&&c.nodeType!==1;);return c}p.each({parent:function(c){var f=c.parentNode;return f&&f.nodeType!==11?f:null},parents:function(c){return rt(c,"parentNode")},parentsUntil:function(c,f,v){return rt(c,"parentNode",v)},next:function(c){return J(c,"nextSibling")},prev:function(c){return J(c,"previousSibling")},nextAll:function(c){return rt(c,"nextSibling")},prevAll:function(c){return rt(c,"previousSibling")},nextUntil:function(c,f,v){return rt(c,"nextSibling",v)},prevUntil:function(c,f,v){return rt(c,"previousSibling",v)},siblings:function(c){return Lt((c.parentNode||{}).firstChild,c)},children:function(c){return Lt(c.firstChild)},contents:function(c){return c.contentDocument!=null&&r(c.contentDocument)?c.contentDocument:(U(c,"template")&&(c=c.content||c),p.merge([],c.childNodes))}},function(c,f){p.fn[c]=function(v,y){var m=p.map(this,f,v);return c.slice(-5)!=="Until"&&(y=v),y&&typeof y=="string"&&(m=p.filter(y,m)),this.length>1&&(tn[c]||p.uniqueSort(m),re.test(c)&&m.reverse()),this.pushStack(m)}});var ot=/[^\x20\t\r\n\f]+/g;function vt(c){var f={};return p.each(c.match(ot)||[],function(v,y){f[y]=!0}),f}p.Callbacks=function(c){c=typeof c=="string"?vt(c):p.extend({},c);var f,v,y,m,b=[],w=[],R=-1,E=function(){for(m=m||c.once,y=f=!0;w.length;R=-1)for(v=w.shift();++R-1;)b.splice(O,1),O<=R&&R--}),this},has:function(B){return B?p.inArray(B,b)>-1:b.length>0},empty:function(){return b&&(b=[]),this},disable:function(){return m=w=[],b=v="",this},disabled:function(){return!b},lock:function(){return m=w=[],!v&&!f&&(b=v=""),this},locked:function(){return!!m},fireWith:function(B,Y){return m||(Y=Y||[],Y=[B,Y.slice?Y.slice():Y],w.push(Y),f||E()),this},fire:function(){return I.fireWith(this,arguments),this},fired:function(){return!!y}};return I};function V(c){return c}function Zt(c){throw c}function St(c,f,v,y){var m;try{c&&T(m=c.promise)?m.call(c).done(f).fail(v):c&&T(m=c.then)?m.call(c,f,v):f.apply(void 0,[c].slice(y))}catch(b){v.apply(void 0,[b])}}p.extend({Deferred:function(c){var f=[["notify","progress",p.Callbacks("memory"),p.Callbacks("memory"),2],["resolve","done",p.Callbacks("once memory"),p.Callbacks("once memory"),0,"resolved"],["reject","fail",p.Callbacks("once memory"),p.Callbacks("once memory"),1,"rejected"]],v="pending",y={state:function(){return v},always:function(){return m.done(arguments).fail(arguments),this},catch:function(b){return y.then(null,b)},pipe:function(){var b=arguments;return p.Deferred(function(w){p.each(f,function(R,E){var I=T(b[E[4]])&&b[E[4]];m[E[1]](function(){var B=I&&I.apply(this,arguments);B&&T(B.promise)?B.promise().progress(w.notify).done(w.resolve).fail(w.reject):w[E[0]+"With"](this,I?[B]:arguments)})}),b=null}).promise()},then:function(b,w,R){var E=0;function I(B,Y,O,W){return function(){var ut=this,wt=arguments,gt=function(){var Kt,ze;if(!(B=E&&(O!==Zt&&(ut=void 0,wt=[Kt]),Y.rejectWith(ut,wt))}};B?se():(p.Deferred.getErrorHook?se.error=p.Deferred.getErrorHook():p.Deferred.getStackHook&&(se.error=p.Deferred.getStackHook()),e.setTimeout(se))}}return p.Deferred(function(B){f[0][3].add(I(0,B,T(R)?R:V,B.notifyWith)),f[1][3].add(I(0,B,T(b)?b:V)),f[2][3].add(I(0,B,T(w)?w:Zt))}).promise()},promise:function(b){return b!=null?p.extend(b,y):y}},m={};return p.each(f,function(b,w){var R=w[2],E=w[5];y[w[1]]=R.add,E&&R.add(function(){v=E},f[3-b][2].disable,f[3-b][3].disable,f[0][2].lock,f[0][3].lock),R.add(w[3].fire),m[w[0]]=function(){return m[w[0]+"With"](this===m?void 0:this,arguments),this},m[w[0]+"With"]=R.fireWith}),y.promise(m),c&&c.call(m,m),m},when:function(c){var f=arguments.length,v=f,y=Array(v),m=a.call(arguments),b=p.Deferred(),w=function(R){return function(E){y[R]=this,m[R]=arguments.length>1?a.call(arguments):E,--f||b.resolveWith(y,m)}};if(f<=1&&(St(c,b.done(w(v)).resolve,b.reject,!f),b.state()==="pending"||T(m[v]&&m[v].then)))return b.then();for(;v--;)St(m[v],w(v),b.reject);return b.promise()}});var ae=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;p.Deferred.exceptionHook=function(c,f){e.console&&e.console.warn&&c&&ae.test(c.name)&&e.console.warn("jQuery.Deferred exception: "+c.message,c.stack,f)},p.readyException=function(c){e.setTimeout(function(){throw c})};var oe=p.Deferred();p.fn.ready=function(c){return oe.then(c).catch(function(f){p.readyException(f)}),this},p.extend({isReady:!1,readyWait:1,ready:function(c){(c===!0?--p.readyWait:p.isReady)||(p.isReady=!0,!(c!==!0&&--p.readyWait>0)&&oe.resolveWith($,[p]))}}),p.ready.then=oe.then;function Ae(){$.removeEventListener("DOMContentLoaded",Ae),e.removeEventListener("load",Ae),p.ready()}$.readyState==="complete"||$.readyState!=="loading"&&!$.documentElement.doScroll?e.setTimeout(p.ready):($.addEventListener("DOMContentLoaded",Ae),e.addEventListener("load",Ae));var Ce=function(c,f,v,y,m,b,w){var R=0,E=c.length,I=v==null;if(k(v)==="object"){m=!0;for(R in v)Ce(c,f,R,v[R],!0,b,w)}else if(y!==void 0&&(m=!0,T(y)||(w=!0),I&&(w?(f.call(c,y),f=null):(I=f,f=function(B,Y,O){return I.call(p(B),O)})),f))for(;R1,null,!0)},removeData:function(c){return this.each(function(){ye.remove(this,c)})}}),p.extend({queue:function(c,f,v){var y;if(c)return f=(f||"fx")+"queue",y=at.get(c,f),v&&(!y||Array.isArray(v)?y=at.access(c,f,p.makeArray(v)):y.push(v)),y||[]},dequeue:function(c,f){f=f||"fx";var v=p.queue(c,f),y=v.length,m=v.shift(),b=p._queueHooks(c,f),w=function(){p.dequeue(c,f)};m==="inprogress"&&(m=v.shift(),y--),m&&(f==="fx"&&v.unshift("inprogress"),delete b.stop,m.call(c,w,b)),!y&&b&&b.empty.fire()},_queueHooks:function(c,f){var v=f+"queueHooks";return at.get(c,v)||at.access(c,v,{empty:p.Callbacks("once memory").add(function(){at.remove(c,[f+"queue",v])})})}}),p.fn.extend({queue:function(c,f){var v=2;return typeof c!="string"&&(f=c,c="fx",v--),arguments.length\x20\t\r\n\f]*)/i,Yo=/^$|^module$|\/(?:java|ecma)script/i;(function(){var c=$.createDocumentFragment(),f=c.appendChild($.createElement("div")),v=$.createElement("input");v.setAttribute("type","radio"),v.setAttribute("checked","checked"),v.setAttribute("name","t"),f.appendChild(v),_.checkClone=f.cloneNode(!0).cloneNode(!0).lastChild.checked,f.innerHTML="",_.noCloneChecked=!!f.cloneNode(!0).lastChild.defaultValue,f.innerHTML="",_.option=!!f.lastChild})();var Se={thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};Se.tbody=Se.tfoot=Se.colgroup=Se.caption=Se.thead,Se.th=Se.td,_.option||(Se.optgroup=Se.option=[1,""]);function _e(c,f){var v;return typeof c.getElementsByTagName<"u"?v=c.getElementsByTagName(f||"*"):typeof c.querySelectorAll<"u"?v=c.querySelectorAll(f||"*"):v=[],f===void 0||f&&U(c,f)?p.merge([c],v):v}function Wr(c,f){for(var v=0,y=c.length;v-1){m&&m.push(b);continue}if(I=Bn(b),w=_e(Y.appendChild(b),"script"),I&&Wr(w),v)for(B=0;b=w[B++];)Yo.test(b.type||"")&&v.push(b)}return Y}var Vo=/^([^.]*)(?:\.(.+)|)/;function zn(){return!0}function Hn(){return!1}function qr(c,f,v,y,m,b){var w,R;if(typeof f=="object"){typeof v!="string"&&(y=y||v,v=void 0);for(R in f)qr(c,R,v,y,f[R],b);return c}if(y==null&&m==null?(m=v,y=v=void 0):m==null&&(typeof v=="string"?(m=y,y=void 0):(m=y,y=v,v=void 0)),m===!1)m=Hn;else if(!m)return c;return b===1&&(w=m,m=function(E){return p().off(E),w.apply(this,arguments)},m.guid=w.guid||(w.guid=p.guid++)),c.each(function(){p.event.add(this,f,m,y,v)})}p.event={global:{},add:function(c,f,v,y,m){var b,w,R,E,I,B,Y,O,W,ut,wt,gt=at.get(c);if(fi(c))for(v.handler&&(b=v,v=b.handler,m=b.selector),m&&p.find.matchesSelector(Tn,m),v.guid||(v.guid=p.guid++),(E=gt.events)||(E=gt.events=Object.create(null)),(w=gt.handle)||(w=gt.handle=function(se){return typeof p<"u"&&p.event.triggered!==se.type?p.event.dispatch.apply(c,arguments):void 0}),f=(f||"").match(ot)||[""],I=f.length;I--;)R=Vo.exec(f[I])||[],W=wt=R[1],ut=(R[2]||"").split(".").sort(),W&&(Y=p.event.special[W]||{},W=(m?Y.delegateType:Y.bindType)||W,Y=p.event.special[W]||{},B=p.extend({type:W,origType:wt,data:y,handler:v,guid:v.guid,selector:m,needsContext:m&&p.expr.match.needsContext.test(m),namespace:ut.join(".")},b),(O=E[W])||(O=E[W]=[],O.delegateCount=0,(!Y.setup||Y.setup.call(c,y,ut,w)===!1)&&c.addEventListener&&c.addEventListener(W,w)),Y.add&&(Y.add.call(c,B),B.handler.guid||(B.handler.guid=v.guid)),m?O.splice(O.delegateCount++,0,B):O.push(B),p.event.global[W]=!0)},remove:function(c,f,v,y,m){var b,w,R,E,I,B,Y,O,W,ut,wt,gt=at.hasData(c)&&at.get(c);if(!(!gt||!(E=gt.events))){for(f=(f||"").match(ot)||[""],I=f.length;I--;){if(R=Vo.exec(f[I])||[],W=wt=R[1],ut=(R[2]||"").split(".").sort(),!W){for(W in E)p.event.remove(c,W+f[I],v,y,!0);continue}for(Y=p.event.special[W]||{},W=(y?Y.delegateType:Y.bindType)||W,O=E[W]||[],R=R[2]&&new RegExp("(^|\\.)"+ut.join("\\.(?:.*\\.|)")+"(\\.|$)"),w=b=O.length;b--;)B=O[b],(m||wt===B.origType)&&(!v||v.guid===B.guid)&&(!R||R.test(B.namespace))&&(!y||y===B.selector||y==="**"&&B.selector)&&(O.splice(b,1),B.selector&&O.delegateCount--,Y.remove&&Y.remove.call(c,B));w&&!O.length&&((!Y.teardown||Y.teardown.call(c,ut,gt.handle)===!1)&&p.removeEvent(c,W,gt.handle),delete E[W])}p.isEmptyObject(E)&&at.remove(c,"handle events")}},dispatch:function(c){var f,v,y,m,b,w,R=new Array(arguments.length),E=p.event.fix(c),I=(at.get(this,"events")||Object.create(null))[E.type]||[],B=p.event.special[E.type]||{};for(R[0]=E,f=1;f=1)){for(;I!==this;I=I.parentNode||this)if(I.nodeType===1&&!(c.type==="click"&&I.disabled===!0)){for(b=[],w={},v=0;v-1:p.find(m,this,null,[I]).length),w[m]&&b.push(y);b.length&&R.push({elem:I,handlers:b})}}return I=this,E\s*$/g;function jo(c,f){return U(c,"table")&&U(f.nodeType!==11?f:f.firstChild,"tr")&&p(c).children("tbody")[0]||c}function $u(c){return c.type=(c.getAttribute("type")!==null)+"/"+c.type,c}function Au(c){return(c.type||"").slice(0,5)==="true/"?c.type=c.type.slice(5):c.removeAttribute("type"),c}function Go(c,f){var v,y,m,b,w,R,E;if(f.nodeType===1){if(at.hasData(c)&&(b=at.get(c),E=b.events,E)){at.remove(f,"handle events");for(m in E)for(v=0,y=E[m].length;v1&&typeof W=="string"&&!_.checkClone&&Tu.test(W))return c.each(function(wt){var gt=c.eq(wt);ut&&(f[0]=W.call(this,wt,gt.html())),Yn(gt,f,v,y)});if(Y&&(m=Uo(f,c[0].ownerDocument,!1,c,y),b=m.firstChild,m.childNodes.length===1&&(m=b),b||y)){for(w=p.map(_e(m,"script"),$u),R=w.length;B0&&Wr(w,!E&&_e(c,"script")),R},cleanData:function(c){for(var f,v,y,m=p.event.special,b=0;(v=c[b])!==void 0;b++)if(fi(v)){if(f=v[at.expando]){if(f.events)for(y in f.events)m[y]?p.event.remove(v,y):p.removeEvent(v,y,f.handle);v[at.expando]=void 0}v[ye.expando]&&(v[ye.expando]=void 0)}}}),p.fn.extend({detach:function(c){return Wo(this,c,!0)},remove:function(c){return Wo(this,c)},text:function(c){return Ce(this,function(f){return f===void 0?p.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=f)})},null,c,arguments.length)},append:function(){return Yn(this,arguments,function(c){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var f=jo(this,c);f.appendChild(c)}})},prepend:function(){return Yn(this,arguments,function(c){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var f=jo(this,c);f.insertBefore(c,f.firstChild)}})},before:function(){return Yn(this,arguments,function(c){this.parentNode&&this.parentNode.insertBefore(c,this)})},after:function(){return Yn(this,arguments,function(c){this.parentNode&&this.parentNode.insertBefore(c,this.nextSibling)})},empty:function(){for(var c,f=0;(c=this[f])!=null;f++)c.nodeType===1&&(p.cleanData(_e(c,!1)),c.textContent="");return this},clone:function(c,f){return c=c??!1,f=f??c,this.map(function(){return p.clone(this,c,f)})},html:function(c){return Ce(this,function(f){var v=this[0]||{},y=0,m=this.length;if(f===void 0&&v.nodeType===1)return v.innerHTML;if(typeof f=="string"&&!bu.test(f)&&!Se[(Ho.exec(f)||["",""])[1].toLowerCase()]){f=p.htmlPrefilter(f);try{for(;y=0&&(E+=Math.max(0,Math.ceil(c["offset"+f[0].toUpperCase()+f.slice(1)]-b-E-R-.5))||0),E+I}function ns(c,f,v){var y=ji(c),m=!_.boxSizingReliable()||v,b=m&&p.css(c,"boxSizing",!1,y)==="border-box",w=b,R=pi(c,f,y),E="offset"+f[0].toUpperCase()+f.slice(1);if(Zr.test(R)){if(!v)return R;R="auto"}return(!_.boxSizingReliable()&&b||!_.reliableTrDimensions()&&U(c,"tr")||R==="auto"||!parseFloat(R)&&p.css(c,"display",!1,y)==="inline")&&c.getClientRects().length&&(b=p.css(c,"boxSizing",!1,y)==="border-box",w=E in c,w&&(R=c[E])),R=parseFloat(R)||0,R+Jr(c,f,v||(b?"border":"content"),w,y,R)+"px"}p.extend({cssHooks:{opacity:{get:function(c,f){if(f){var v=pi(c,"opacity");return v===""?"1":v}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(c,f,v,y){if(!(!c||c.nodeType===3||c.nodeType===8||!c.style)){var m,b,w,R=Xe(f),E=Kr.test(f),I=c.style;if(E||(f=Qr(R)),w=p.cssHooks[f]||p.cssHooks[R],v!==void 0){if(b=typeof v,b==="string"&&(m=hi.exec(v))&&m[1]&&(v=Xo(c,f,m),b="number"),v==null||v!==v)return;b==="number"&&!E&&(v+=m&&m[3]||(p.cssNumber[R]?"":"px")),!_.clearCloneStyle&&v===""&&f.indexOf("background")===0&&(I[f]="inherit"),(!w||!("set"in w)||(v=w.set(c,v,y))!==void 0)&&(E?I.setProperty(f,v):I[f]=v)}else return w&&"get"in w&&(m=w.get(c,!1,y))!==void 0?m:I[f]}},css:function(c,f,v,y){var m,b,w,R=Xe(f),E=Kr.test(f);return E||(f=Qr(R)),w=p.cssHooks[f]||p.cssHooks[R],w&&"get"in w&&(m=w.get(c,!0,v)),m===void 0&&(m=pi(c,f,y)),m==="normal"&&f in ts&&(m=ts[f]),v===""||v?(b=parseFloat(m),v===!0||isFinite(b)?b||0:m):m}}),p.each(["height","width"],function(c,f){p.cssHooks[f]={get:function(v,y,m){if(y)return Eu.test(p.css(v,"display"))&&(!v.getClientRects().length||!v.getBoundingClientRect().width)?qo(v,Ru,function(){return ns(v,f,m)}):ns(v,f,m)},set:function(v,y,m){var b,w=ji(v),R=!_.scrollboxSize()&&w.position==="absolute",E=R||m,I=E&&p.css(v,"boxSizing",!1,w)==="border-box",B=m?Jr(v,f,m,I,w):0;return I&&R&&(B-=Math.ceil(v["offset"+f[0].toUpperCase()+f.slice(1)]-parseFloat(w[f])-Jr(v,f,"border",!1,w)-.5)),B&&(b=hi.exec(y))&&(b[3]||"px")!=="px"&&(v.style[f]=y,y=p.css(v,f)),es(v,y,B)}}}),p.cssHooks.marginLeft=Zo(_.reliableMarginLeft,function(c,f){if(f)return(parseFloat(pi(c,"marginLeft"))||c.getBoundingClientRect().left-qo(c,{marginLeft:0},function(){return c.getBoundingClientRect().left}))+"px"}),p.each({margin:"",padding:"",border:"Width"},function(c,f){p.cssHooks[c+f]={expand:function(v){for(var y=0,m={},b=typeof v=="string"?v.split(" "):[v];y<4;y++)m[c+en[y]+f]=b[y]||b[y-2]||b[0];return m}},c!=="margin"&&(p.cssHooks[c+f].set=es)}),p.fn.extend({css:function(c,f){return Ce(this,function(v,y,m){var b,w,R={},E=0;if(Array.isArray(y)){for(b=ji(v),w=y.length;E1)}});function me(c,f,v,y,m){return new me.prototype.init(c,f,v,y,m)}p.Tween=me,me.prototype={constructor:me,init:function(c,f,v,y,m,b){this.elem=c,this.prop=v,this.easing=m||p.easing._default,this.options=f,this.start=this.now=this.cur(),this.end=y,this.unit=b||(p.cssNumber[v]?"":"px")},cur:function(){var c=me.propHooks[this.prop];return c&&c.get?c.get(this):me.propHooks._default.get(this)},run:function(c){var f,v=me.propHooks[this.prop];return this.options.duration?this.pos=f=p.easing[this.easing](c,this.options.duration*c,0,1,this.options.duration):this.pos=f=c,this.now=(this.end-this.start)*f+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),v&&v.set?v.set(this):me.propHooks._default.set(this),this}},me.prototype.init.prototype=me.prototype,me.propHooks={_default:{get:function(c){var f;return c.elem.nodeType!==1||c.elem[c.prop]!=null&&c.elem.style[c.prop]==null?c.elem[c.prop]:(f=p.css(c.elem,c.prop,""),!f||f==="auto"?0:f)},set:function(c){p.fx.step[c.prop]?p.fx.step[c.prop](c):c.elem.nodeType===1&&(p.cssHooks[c.prop]||c.elem.style[Qr(c.prop)]!=null)?p.style(c.elem,c.prop,c.now+c.unit):c.elem[c.prop]=c.now}}},me.propHooks.scrollTop=me.propHooks.scrollLeft={set:function(c){c.elem.nodeType&&c.elem.parentNode&&(c.elem[c.prop]=c.now)}},p.easing={linear:function(c){return c},swing:function(c){return .5-Math.cos(c*Math.PI)/2},_default:"swing"},p.fx=me.prototype.init,p.fx.step={};var Un,Gi,Mu=/^(?:toggle|show|hide)$/,Lu=/queueHooks$/;function ta(){Gi&&($.hidden===!1&&e.requestAnimationFrame?e.requestAnimationFrame(ta):e.setTimeout(ta,p.fx.interval),p.fx.tick())}function is(){return e.setTimeout(function(){Un=void 0}),Un=Date.now()}function Wi(c,f){var v,y=0,m={height:c};for(f=f?1:0;y<4;y+=2-f)v=en[y],m["margin"+v]=m["padding"+v]=c;return f&&(m.opacity=m.width=c),m}function rs(c,f,v){for(var y,m=(Le.tweeners[f]||[]).concat(Le.tweeners["*"]),b=0,w=m.length;b1)},removeAttr:function(c){return this.each(function(){p.removeAttr(this,c)})}}),p.extend({attr:function(c,f,v){var y,m,b=c.nodeType;if(!(b===3||b===8||b===2)){if(typeof c.getAttribute>"u")return p.prop(c,f,v);if((b!==1||!p.isXMLDoc(c))&&(m=p.attrHooks[f.toLowerCase()]||(p.expr.match.bool.test(f)?as:void 0)),v!==void 0){if(v===null){p.removeAttr(c,f);return}return m&&"set"in m&&(y=m.set(c,v,f))!==void 0?y:(c.setAttribute(f,v+""),v)}return m&&"get"in m&&(y=m.get(c,f))!==null?y:(y=p.find.attr(c,f),y??void 0)}},attrHooks:{type:{set:function(c,f){if(!_.radioValue&&f==="radio"&&U(c,"input")){var v=c.value;return c.setAttribute("type",f),v&&(c.value=v),f}}}},removeAttr:function(c,f){var v,y=0,m=f&&f.match(ot);if(m&&c.nodeType===1)for(;v=m[y++];)c.removeAttribute(v)}}),as={set:function(c,f,v){return f===!1?p.removeAttr(c,v):c.setAttribute(v,v),v}},p.each(p.expr.match.bool.source.match(/\w+/g),function(c,f){var v=vi[f]||p.find.attr;vi[f]=function(y,m,b){var w,R,E=m.toLowerCase();return b||(R=vi[E],vi[E]=w,w=v(y,m,b)!=null?E:null,vi[E]=R),w}});var Nu=/^(?:input|select|textarea|button)$/i,Pu=/^(?:a|area)$/i;p.fn.extend({prop:function(c,f){return Ce(this,p.prop,c,f,arguments.length>1)},removeProp:function(c){return this.each(function(){delete this[p.propFix[c]||c]})}}),p.extend({prop:function(c,f,v){var y,m,b=c.nodeType;if(!(b===3||b===8||b===2))return(b!==1||!p.isXMLDoc(c))&&(f=p.propFix[f]||f,m=p.propHooks[f]),v!==void 0?m&&"set"in m&&(y=m.set(c,v,f))!==void 0?y:c[f]=v:m&&"get"in m&&(y=m.get(c,f))!==null?y:c[f]},propHooks:{tabIndex:{get:function(c){var f=p.find.attr(c,"tabindex");return f?parseInt(f,10):Nu.test(c.nodeName)||Pu.test(c.nodeName)&&c.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),_.optSelected||(p.propHooks.selected={get:function(c){var f=c.parentNode;return f&&f.parentNode&&f.parentNode.selectedIndex,null},set:function(c){var f=c.parentNode;f&&(f.selectedIndex,f.parentNode&&f.parentNode.selectedIndex)}}),p.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){p.propFix[this.toLowerCase()]=this});function wn(c){var f=c.match(ot)||[];return f.join(" ")}function $n(c){return c.getAttribute&&c.getAttribute("class")||""}function ea(c){return Array.isArray(c)?c:typeof c=="string"?c.match(ot)||[]:[]}p.fn.extend({addClass:function(c){var f,v,y,m,b,w;return T(c)?this.each(function(R){p(this).addClass(c.call(this,R,$n(this)))}):(f=ea(c),f.length?this.each(function(){if(y=$n(this),v=this.nodeType===1&&" "+wn(y)+" ",v){for(b=0;b-1;)v=v.replace(" "+m+" "," ");w=wn(v),y!==w&&this.setAttribute("class",w)}}):this):this.attr("class","")},toggleClass:function(c,f){var v,y,m,b,w=typeof c,R=w==="string"||Array.isArray(c);return T(c)?this.each(function(E){p(this).toggleClass(c.call(this,E,$n(this),f),f)}):typeof f=="boolean"&&R?f?this.addClass(c):this.removeClass(c):(v=ea(c),this.each(function(){if(R)for(b=p(this),m=0;m-1)return!0;return!1}});var Ou=/\r/g;p.fn.extend({val:function(c){var f,v,y,m=this[0];return arguments.length?(y=T(c),this.each(function(b){var w;this.nodeType===1&&(y?w=c.call(this,b,p(this).val()):w=c,w==null?w="":typeof w=="number"?w+="":Array.isArray(w)&&(w=p.map(w,function(R){return R==null?"":R+""})),f=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()],(!f||!("set"in f)||f.set(this,w,"value")===void 0)&&(this.value=w))})):m?(f=p.valHooks[m.type]||p.valHooks[m.nodeName.toLowerCase()],f&&"get"in f&&(v=f.get(m,"value"))!==void 0?v:(v=m.value,typeof v=="string"?v.replace(Ou,""):v??"")):void 0}}),p.extend({valHooks:{option:{get:function(c){var f=p.find.attr(c,"value");return f??wn(p.text(c))}},select:{get:function(c){var f,v,y,m=c.options,b=c.selectedIndex,w=c.type==="select-one",R=w?null:[],E=w?b+1:m.length;for(b<0?y=E:y=w?b:0;y-1)&&(v=!0);return v||(c.selectedIndex=-1),b}}}}),p.each(["radio","checkbox"],function(){p.valHooks[this]={set:function(c,f){if(Array.isArray(f))return c.checked=p.inArray(p(c).val(),f)>-1}},_.checkOn||(p.valHooks[this].get=function(c){return c.getAttribute("value")===null?"on":c.value})});var xi=e.location,os={guid:Date.now()},na=/\?/;p.parseXML=function(c){var f,v;if(!c||typeof c!="string")return null;try{f=new e.DOMParser().parseFromString(c,"text/xml")}catch{}return v=f&&f.getElementsByTagName("parsererror")[0],(!f||v)&&p.error("Invalid XML: "+(v?p.map(v.childNodes,function(y){return y.textContent}).join(` +`):c)),f};var ss=/^(?:focusinfocus|focusoutblur)$/,cs=function(c){c.stopPropagation()};p.extend(p.event,{trigger:function(c,f,v,y){var m,b,w,R,E,I,B,Y,O=[v||$],W=h.call(c,"type")?c.type:c,ut=h.call(c,"namespace")?c.namespace.split("."):[];if(b=Y=w=v=v||$,!(v.nodeType===3||v.nodeType===8)&&!ss.test(W+p.event.triggered)&&(W.indexOf(".")>-1&&(ut=W.split("."),W=ut.shift(),ut.sort()),E=W.indexOf(":")<0&&"on"+W,c=c[p.expando]?c:new p.Event(W,typeof c=="object"&&c),c.isTrigger=y?2:3,c.namespace=ut.join("."),c.rnamespace=c.namespace?new RegExp("(^|\\.)"+ut.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c.result=void 0,c.target||(c.target=v),f=f==null?[c]:p.makeArray(f,[c]),B=p.event.special[W]||{},!(!y&&B.trigger&&B.trigger.apply(v,f)===!1))){if(!y&&!B.noBubble&&!A(v)){for(R=B.delegateType||W,ss.test(R+W)||(b=b.parentNode);b;b=b.parentNode)O.push(b),w=b;w===(v.ownerDocument||$)&&O.push(w.defaultView||w.parentWindow||e)}for(m=0;(b=O[m++])&&!c.isPropagationStopped();)Y=b,c.type=m>1?R:B.bindType||W,I=(at.get(b,"events")||Object.create(null))[c.type]&&at.get(b,"handle"),I&&I.apply(b,f),I=E&&b[E],I&&I.apply&&fi(b)&&(c.result=I.apply(b,f),c.result===!1&&c.preventDefault());return c.type=W,!y&&!c.isDefaultPrevented()&&(!B._default||B._default.apply(O.pop(),f)===!1)&&fi(v)&&E&&T(v[W])&&!A(v)&&(w=v[E],w&&(v[E]=null),p.event.triggered=W,c.isPropagationStopped()&&Y.addEventListener(W,cs),v[W](),c.isPropagationStopped()&&Y.removeEventListener(W,cs),p.event.triggered=void 0,w&&(v[E]=w)),c.result}},simulate:function(c,f,v){var y=p.extend(new p.Event,v,{type:c,isSimulated:!0});p.event.trigger(y,null,f)}}),p.fn.extend({trigger:function(c,f){return this.each(function(){p.event.trigger(c,f,this)})},triggerHandler:function(c,f){var v=this[0];if(v)return p.event.trigger(c,f,v,!0)}});var Fu=/\[\]$/,ls=/\r?\n/g,Bu=/^(?:submit|button|image|reset|file)$/i,Xu=/^(?:input|select|textarea|keygen)/i;function ia(c,f,v,y){var m;if(Array.isArray(f))p.each(f,function(b,w){v||Fu.test(c)?y(c,w):ia(c+"["+(typeof w=="object"&&w!=null?b:"")+"]",w,v,y)});else if(!v&&k(f)==="object")for(m in f)ia(c+"["+m+"]",f[m],v,y);else y(c,f)}p.param=function(c,f){var v,y=[],m=function(b,w){var R=T(w)?w():w;y[y.length]=encodeURIComponent(b)+"="+encodeURIComponent(R??"")};if(c==null)return"";if(Array.isArray(c)||c.jquery&&!p.isPlainObject(c))p.each(c,function(){m(this.name,this.value)});else for(v in c)ia(v,c[v],f,m);return y.join("&")},p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var c=p.prop(this,"elements");return c?p.makeArray(c):this}).filter(function(){var c=this.type;return this.name&&!p(this).is(":disabled")&&Xu.test(this.nodeName)&&!Bu.test(c)&&(this.checked||!gi.test(c))}).map(function(c,f){var v=p(this).val();return v==null?null:Array.isArray(v)?p.map(v,function(y){return{name:f.name,value:y.replace(ls,`\r +`)}}):{name:f.name,value:v.replace(ls,`\r +`)}}).get()}});var zu=/%20/g,Hu=/#.*$/,Yu=/([?&])_=[^&]*/,Uu=/^(.*?):[ \t]*([^\r\n]*)$/mg,Vu=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ju=/^(?:GET|HEAD)$/,Gu=/^\/\//,us={},ra={},fs="*/".concat("*"),aa=$.createElement("a");aa.href=xi.href;function ds(c){return function(f,v){typeof f!="string"&&(v=f,f="*");var y,m=0,b=f.toLowerCase().match(ot)||[];if(T(v))for(;y=b[m++];)y[0]==="+"?(y=y.slice(1)||"*",(c[y]=c[y]||[]).unshift(v)):(c[y]=c[y]||[]).push(v)}}function hs(c,f,v,y){var m={},b=c===ra;function w(R){var E;return m[R]=!0,p.each(c[R]||[],function(I,B){var Y=B(f,v,y);if(typeof Y=="string"&&!b&&!m[Y])return f.dataTypes.unshift(Y),w(Y),!1;if(b)return!(E=Y)}),E}return w(f.dataTypes[0])||!m["*"]&&w("*")}function oa(c,f){var v,y,m=p.ajaxSettings.flatOptions||{};for(v in f)f[v]!==void 0&&((m[v]?c:y||(y={}))[v]=f[v]);return y&&p.extend(!0,c,y),c}function Wu(c,f,v){for(var y,m,b,w,R=c.contents,E=c.dataTypes;E[0]==="*";)E.shift(),y===void 0&&(y=c.mimeType||f.getResponseHeader("Content-Type"));if(y){for(m in R)if(R[m]&&R[m].test(y)){E.unshift(m);break}}if(E[0]in v)b=E[0];else{for(m in v){if(!E[0]||c.converters[m+" "+E[0]]){b=m;break}w||(w=m)}b=b||w}if(b)return b!==E[0]&&E.unshift(b),v[b]}function qu(c,f,v,y){var m,b,w,R,E,I={},B=c.dataTypes.slice();if(B[1])for(w in c.converters)I[w.toLowerCase()]=c.converters[w];for(b=B.shift();b;)if(c.responseFields[b]&&(v[c.responseFields[b]]=f),!E&&y&&c.dataFilter&&(f=c.dataFilter(f,c.dataType)),E=b,b=B.shift(),b){if(b==="*")b=E;else if(E!=="*"&&E!==b){if(w=I[E+" "+b]||I["* "+b],!w){for(m in I)if(R=m.split(" "),R[1]===b&&(w=I[E+" "+R[0]]||I["* "+R[0]],w)){w===!0?w=I[m]:I[m]!==!0&&(b=R[0],B.unshift(R[1]));break}}if(w!==!0)if(w&&c.throws)f=w(f);else try{f=w(f)}catch(Y){return{state:"parsererror",error:w?Y:"No conversion from "+E+" to "+b}}}}return{state:"success",data:f}}p.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xi.href,type:"GET",isLocal:Vu.test(xi.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":fs,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":p.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(c,f){return f?oa(oa(c,p.ajaxSettings),f):oa(p.ajaxSettings,c)},ajaxPrefilter:ds(us),ajaxTransport:ds(ra),ajax:function(c,f){typeof c=="object"&&(f=c,c=void 0),f=f||{};var v,y,m,b,w,R,E,I,B,Y,O=p.ajaxSetup({},f),W=O.context||O,ut=O.context&&(W.nodeType||W.jquery)?p(W):p.event,wt=p.Deferred(),gt=p.Callbacks("once memory"),se=O.statusCode||{},Kt={},ze={},He="canceled",bt={readyState:0,getResponseHeader:function(At){var Vt;if(E){if(!b)for(b={};Vt=Uu.exec(m);)b[Vt[1].toLowerCase()+" "]=(b[Vt[1].toLowerCase()+" "]||[]).concat(Vt[2]);Vt=b[At.toLowerCase()+" "]}return Vt==null?null:Vt.join(", ")},getAllResponseHeaders:function(){return E?m:null},setRequestHeader:function(At,Vt){return E==null&&(At=ze[At.toLowerCase()]=ze[At.toLowerCase()]||At,Kt[At]=Vt),this},overrideMimeType:function(At){return E==null&&(O.mimeType=At),this},statusCode:function(At){var Vt;if(At)if(E)bt.always(At[bt.status]);else for(Vt in At)se[Vt]=[se[Vt],At[Vt]];return this},abort:function(At){var Vt=At||He;return v&&v.abort(Vt),An(0,Vt),this}};if(wt.promise(bt),O.url=((c||O.url||xi.href)+"").replace(Gu,xi.protocol+"//"),O.type=f.method||f.type||O.method||O.type,O.dataTypes=(O.dataType||"*").toLowerCase().match(ot)||[""],O.crossDomain==null){R=$.createElement("a");try{R.href=O.url,R.href=R.href,O.crossDomain=aa.protocol+"//"+aa.host!=R.protocol+"//"+R.host}catch{O.crossDomain=!0}}if(O.data&&O.processData&&typeof O.data!="string"&&(O.data=p.param(O.data,O.traditional)),hs(us,O,f,bt),E)return bt;I=p.event&&O.global,I&&p.active++===0&&p.event.trigger("ajaxStart"),O.type=O.type.toUpperCase(),O.hasContent=!ju.test(O.type),y=O.url.replace(Hu,""),O.hasContent?O.data&&O.processData&&(O.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(O.data=O.data.replace(zu,"+")):(Y=O.url.slice(y.length),O.data&&(O.processData||typeof O.data=="string")&&(y+=(na.test(y)?"&":"?")+O.data,delete O.data),O.cache===!1&&(y=y.replace(Yu,"$1"),Y=(na.test(y)?"&":"?")+"_="+os.guid+++Y),O.url=y+Y),O.ifModified&&(p.lastModified[y]&&bt.setRequestHeader("If-Modified-Since",p.lastModified[y]),p.etag[y]&&bt.setRequestHeader("If-None-Match",p.etag[y])),(O.data&&O.hasContent&&O.contentType!==!1||f.contentType)&&bt.setRequestHeader("Content-Type",O.contentType),bt.setRequestHeader("Accept",O.dataTypes[0]&&O.accepts[O.dataTypes[0]]?O.accepts[O.dataTypes[0]]+(O.dataTypes[0]!=="*"?", "+fs+"; q=0.01":""):O.accepts["*"]);for(B in O.headers)bt.setRequestHeader(B,O.headers[B]);if(O.beforeSend&&(O.beforeSend.call(W,bt,O)===!1||E))return bt.abort();if(He="abort",gt.add(O.complete),bt.done(O.success),bt.fail(O.error),v=hs(ra,O,f,bt),!v)An(-1,"No Transport");else{if(bt.readyState=1,I&&ut.trigger("ajaxSend",[bt,O]),E)return bt;O.async&&O.timeout>0&&(w=e.setTimeout(function(){bt.abort("timeout")},O.timeout));try{E=!1,v.send(Kt,An)}catch(At){if(E)throw At;An(-1,At)}}function An(At,Vt,_i,ca){var Ye,mi,Ue,gn,pn,ke=Vt;E||(E=!0,w&&e.clearTimeout(w),v=void 0,m=ca||"",bt.readyState=At>0?4:0,Ye=At>=200&&At<300||At===304,_i&&(gn=Wu(O,bt,_i)),!Ye&&p.inArray("script",O.dataTypes)>-1&&p.inArray("json",O.dataTypes)<0&&(O.converters["text script"]=function(){}),gn=qu(O,gn,bt,Ye),Ye?(O.ifModified&&(pn=bt.getResponseHeader("Last-Modified"),pn&&(p.lastModified[y]=pn),pn=bt.getResponseHeader("etag"),pn&&(p.etag[y]=pn)),At===204||O.type==="HEAD"?ke="nocontent":At===304?ke="notmodified":(ke=gn.state,mi=gn.data,Ue=gn.error,Ye=!Ue)):(Ue=ke,(At||!ke)&&(ke="error",At<0&&(At=0))),bt.status=At,bt.statusText=(Vt||ke)+"",Ye?wt.resolveWith(W,[mi,ke,bt]):wt.rejectWith(W,[bt,ke,Ue]),bt.statusCode(se),se=void 0,I&&ut.trigger(Ye?"ajaxSuccess":"ajaxError",[bt,O,Ye?mi:Ue]),gt.fireWith(W,[bt,ke]),I&&(ut.trigger("ajaxComplete",[bt,O]),--p.active||p.event.trigger("ajaxStop")))}return bt},getJSON:function(c,f,v){return p.get(c,f,v,"json")},getScript:function(c,f){return p.get(c,void 0,f,"script")}}),p.each(["get","post"],function(c,f){p[f]=function(v,y,m,b){return T(y)&&(b=b||m,m=y,y=void 0),p.ajax(p.extend({url:v,type:f,dataType:b,data:y,success:m},p.isPlainObject(v)&&v))}}),p.ajaxPrefilter(function(c){var f;for(f in c.headers)f.toLowerCase()==="content-type"&&(c.contentType=c.headers[f]||"")}),p._evalUrl=function(c,f,v){return p.ajax({url:c,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(y){p.globalEval(y,f,v)}})},p.fn.extend({wrapAll:function(c){var f;return this[0]&&(T(c)&&(c=c.call(this[0])),f=p(c,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&f.insertBefore(this[0]),f.map(function(){for(var v=this;v.firstElementChild;)v=v.firstElementChild;return v}).append(this)),this},wrapInner:function(c){return T(c)?this.each(function(f){p(this).wrapInner(c.call(this,f))}):this.each(function(){var f=p(this),v=f.contents();v.length?v.wrapAll(c):f.append(c)})},wrap:function(c){var f=T(c);return this.each(function(v){p(this).wrapAll(f?c.call(this,v):c)})},unwrap:function(c){return this.parent(c).not("body").each(function(){p(this).replaceWith(this.childNodes)}),this}}),p.expr.pseudos.hidden=function(c){return!p.expr.pseudos.visible(c)},p.expr.pseudos.visible=function(c){return!!(c.offsetWidth||c.offsetHeight||c.getClientRects().length)},p.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch{}};var Zu={0:200,1223:204},yi=p.ajaxSettings.xhr();_.cors=!!yi&&"withCredentials"in yi,_.ajax=yi=!!yi,p.ajaxTransport(function(c){var f,v;if(_.cors||yi&&!c.crossDomain)return{send:function(y,m){var b,w=c.xhr();if(w.open(c.type,c.url,c.async,c.username,c.password),c.xhrFields)for(b in c.xhrFields)w[b]=c.xhrFields[b];c.mimeType&&w.overrideMimeType&&w.overrideMimeType(c.mimeType),!c.crossDomain&&!y["X-Requested-With"]&&(y["X-Requested-With"]="XMLHttpRequest");for(b in y)w.setRequestHeader(b,y[b]);f=function(R){return function(){f&&(f=v=w.onload=w.onerror=w.onabort=w.ontimeout=w.onreadystatechange=null,R==="abort"?w.abort():R==="error"?typeof w.status!="number"?m(0,"error"):m(w.status,w.statusText):m(Zu[w.status]||w.status,w.statusText,(w.responseType||"text")!=="text"||typeof w.responseText!="string"?{binary:w.response}:{text:w.responseText},w.getAllResponseHeaders()))}},w.onload=f(),v=w.onerror=w.ontimeout=f("error"),w.onabort!==void 0?w.onabort=v:w.onreadystatechange=function(){w.readyState===4&&e.setTimeout(function(){f&&v()})},f=f("abort");try{w.send(c.hasContent&&c.data||null)}catch(R){if(f)throw R}},abort:function(){f&&f()}}}),p.ajaxPrefilter(function(c){c.crossDomain&&(c.contents.script=!1)}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(c){return p.globalEval(c),c}}}),p.ajaxPrefilter("script",function(c){c.cache===void 0&&(c.cache=!1),c.crossDomain&&(c.type="GET")}),p.ajaxTransport("script",function(c){if(c.crossDomain||c.scriptAttrs){var f,v;return{send:function(y,m){f=p(" + + + +
    + + +