@win2win/shared-ui 0.3.30 → 0.3.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -61,10 +61,10 @@ Facilidad de instalación, se fija a la pared con tornillos de forma sencilla. M
61
61
  Facilidad de instalación, se fija a la pared con tornillos de forma sencilla. Mantenimiento práctico. La gestión de contenido remoto simplifica la actualización de tus mensajes, campañas y promociones en tiempo real.`,PROPS:{gob:null,sku:"BAN-P3076-OUT",alto:"510",gama:"banderola",ancho:"670",pitch:"3_076_mm",subgama:"led",material:"estructura_de_aluminio_ligero_robusto_resistente_a_la_corrosion",ubicacion:"exterior",profundidad:"180",proteccion_ip:"ip_56_protegido_contra_polvo_y_chorros_potentes_de_agua",tasa_refresco:"3840_hz",tipo_servicio:"front_back",usos_habituales:["tiendas_recepciones_hall_salas_de_espera_showrooms_galerias","entornos_con_mucho_transito_como_centros_comerciales_aeropuertos_o_vestibulos"],tipo_instalacion:"facil_fijacion_a_pared_con_tornillos",unidad_de_medida:"mm",propositos_generales:["publicidad_exterior_fachadas_contenido_comercial_videowall_exterior","publicidad_senaletica_informativo_decorativo_corporativo_contenido_comercial"],controladoras_compatibles:["integrado"]},PAQUETE:!1,UBICACION:null}}],UBICACION:{CIUDAD:"La serena"}}},{ID_CAPTACION:819,COD_CAPTACION:"000460",TIPO:"5",FECHA_CAPTADO:"2025-06-26",ESTADO:"1",ID_ESTADO:"c4eeb4f3-e9e1-4f1e-93af-98f55b359d16",R_ESTADO:{ID_ESTADO:"c4eeb4f3-e9e1-4f1e-93af-98f55b359d16",NAME:"Pagado",COLOR:"#298fc2",CODE:"pagado"},CAPTADOR:null,DELEGACION:null,CONTACTO:{RAZON_SOCIAL:"SIMO TEST",NOMBRE:"SIMO",APELLIDO:null,APELLIDO2:null,FOTO:null,NUMERO_DOC:"57750039Y",EMAIL:"xobaxa4395@iridales.com",UBICACION:null,TELEFONO:{NUMERO:"999999"},USUARIO:null},DOCUMENTOS_PENDIENTES:[],PEDIDO:{ID_PEDIDO:699,PROPS:{},IMP_BRUTO_PED:"531065.500",IMP_TOTAL_PED:"531868.750",R_PRODUCTOS_PEDIDO:[{ID_PRODUCTO_PEDIDO:651,PROPS:{},R_PRODUCTO:{ID_PRODUCTO:128,COD_ART_MVX:"00000051",NOMBRE:"Tótem LED P2.0 Interior con GOB",DESCRIPCION:"Impacta con el Tótem LED P2.0 Interior con GOB (Glass On Board), una solución de señalización digital que combina una excelente calidad de imagen con una resistencia superior. Su pixel pitch de 2.0mm garantiza un contenido visual nítido y atractivo, ideal para entornos con mucho tránsito como centros comerciales, aeropuertos o vestíbulos. La tecnología GOB proporciona una capa protectora sobre los LEDS, aumentando la durabilidad y facilitando la limpieza, mientras que su brillo de 800 nits asegura una visibilidad óptima. Diseñado para un rendimiento eficiente y una operación continua. Una inversión inteligente para una comunicación visual impactante y duradera en interiores. ",PROPS:{gob:"si",sku:"TOT-LED-P20",alto:"1920",gama:"totems",ancho:"640",pitch:"2_0_mm",brillo:"800_nits",peso_kg:">50",subgama:"led",material:"acero_aluminio_para_la_carcasa_exterior",ubicacion:"interior",tipo_montaje:"standalone",proteccion_ip:"ip_20_productos_de_interior",tasa_refresco:"3840",tipo_servicio:"front_back",usos_habituales:["tiendas_recepciones_hall_salas_de_espera_showrooms_galerias"],tipo_instalacion:"autoportante_de_suelo",unidad_de_medida:"mm",sistema_operativo:"android",colores_disponibles:["negro"],propositos_generales:["publicidad_senaletica_informativo_decorativo_corporativo_contenido_comercial"],controladoras_compatibles:["integrado"]},PAQUETE:!1,UBICACION:null}},{ID_PRODUCTO_PEDIDO:652,PROPS:{alto:3,ancho:2},R_PRODUCTO:{ID_PRODUCTO:151,COD_ART_MVX:"00000073",NOMBRE:"Pantalla LED 3x2 P2.9 Escaparate",DESCRIPCION:"Potente solución para escaparates grandes o interiores espaciosos. Con su formato cuadrado y gran superficie, es perfecta para videowalls que transmitan una imagen de marca sólida y profesional. La controladora Novastar Taurus TB50 garantiza un rendimiento óptimo y una gestión avanzada de contenidos complejos y en tiempo real.",PROPS:{sku:"LED-P29-FS",alto:"50",gama:"pantallas_led_modulares",ancho:"50",pitch:"2_9_mm",brillo:"4000_nits",peso_kg:"7",subgama:"led",a_medida:!0,material:"aluminio_fundido",ubicacion:"exterior",tipo_montaje:"matriz",proteccion_ip:"ip_65_ip_43",tasa_refresco:"3840",tipo_servicio:"full_front",consumo_maximo:"160W",consumo_medio_w:"80",usos_habituales:["eventos_estadios_mobiliario_urbano"],consumo_maximo_w:"160",tipo_instalacion:"estructura_exterior_soporte_metalico",unidad_de_medida:"cm",colores_disponibles:[],compatible_videowall:!0,propositos_generales:["publicidad_exterior_fachadas_contenido_comercial_videowall_exterior"],controladoras_compatibles:["novastar_vx_600","novastar_vx_1000","taurus_tb_40"]},PAQUETE:!1,UBICACION:null}},{ID_PRODUCTO_PEDIDO:653,PROPS:{},R_PRODUCTO:{ID_PRODUCTO:154,COD_ART_MVX:"00000076",NOMBRE:"Banderola LED P3.076 Exterior Doble Cara",DESCRIPCION:`Diseñada para captar la atención desde cualquier ángulo, esta innovadora 'Blade Sign' ofrece una comunicación visual dinámica y vibrante. Con un pixel pitch de 3.076mm, proporciona una claridad de imagen excepcional ideal para vallas publicitarias urbanas, entradas de negocios, centros comerciales al aire libre o zonas peatonales, asegurando que tu mensaje sea legible y atractivo a distancias medias. Su diseño de doble cara multiplica tu exposición, permitiendo que tu contenido sea visible para el tráfico en ambas direcciones. Fabricada con una estructura de aluminio ligero pero robusto, garantiza durabilidad y resistencia a la corrosión, soportando las inclemencias del tiempo gracias a su clasificación IP56. Esto significa una protección superior contra el polvo y chorros de agua, ideal para un uso continuo en exteriores.
62
62
  Facilidad de instalación, se fija a la pared con tornillos de forma sencilla. Mantenimiento práctico. La gestión de contenido remoto simplifica la actualización de tus mensajes, campañas y promociones en tiempo real.`,PROPS:{gob:null,sku:"BAN-P3076-OUT",alto:"510",gama:"banderola",ancho:"670",pitch:"3_076_mm",subgama:"led",material:"estructura_de_aluminio_ligero_robusto_resistente_a_la_corrosion",ubicacion:"exterior",profundidad:"180",proteccion_ip:"ip_56_protegido_contra_polvo_y_chorros_potentes_de_agua",tasa_refresco:"3840_hz",tipo_servicio:"front_back",usos_habituales:["tiendas_recepciones_hall_salas_de_espera_showrooms_galerias","entornos_con_mucho_transito_como_centros_comerciales_aeropuertos_o_vestibulos"],tipo_instalacion:"facil_fijacion_a_pared_con_tornillos",unidad_de_medida:"mm",propositos_generales:["publicidad_exterior_fachadas_contenido_comercial_videowall_exterior","publicidad_senaletica_informativo_decorativo_corporativo_contenido_comercial"],controladoras_compatibles:["integrado"]},PAQUETE:!1,UBICACION:null}}],UBICACION:{CIUDAD:""}}}]),LINVERMEDIA_SOLICITUD_CARD_MOCK_PROPS={data:{},fetching:!1,scale:1},LinvermediaSolicitudCardPropsSchema=WidgetPropsSchema.extend({}),_hoisted_1$1=["id","draggable"],_hoisted_2$1=["onClick"],_hoisted_3$1={key:0,class:"row items-center justify-center bg-grey-2 media-card",style:{"border-radius":"8px",border:"1px dashed #c9c9c9"}},_hoisted_4$1={key:2,class:"media-card"},_hoisted_5$1=["src"],_hoisted_6$1={class:"video-icon"},_sfc_main$1=vue.defineComponent({__name:"ImagesMiniature",setup(s){const{images:M,slide:o,isPrivate:u}=useContext(),{emitEvent:z}=useWidgetEvent(),{handler:W,onDragLeave:O,onDragOver:N,onDragStart:X,onDrop:y,idKey:G}=useDragAndDrop(M,".image-miniature",V=>z("update_images_position",{images:V}));return(V,g)=>vue.unref(M).length?vue.withDirectives((vue.openBlock(),vue.createElementBlock("div",{key:0,class:"images-miniature",onDragleave:g[1]||(g[1]=(...R)=>vue.unref(O)&&vue.unref(O)(...R)),onDragover:g[2]||(g[2]=(...R)=>vue.unref(N)&&vue.unref(N)(...R)),onDrop:g[3]||(g[3]=(...R)=>vue.unref(y)&&vue.unref(y)(...R))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(M),(R,S)=>(vue.openBlock(),vue.createElementBlock("div",{class:"q-mb-md image-miniature q-px-sm",key:S,id:R[vue.unref(G)],onDragstart:g[0]||(g[0]=(...C)=>vue.unref(X)&&vue.unref(X)(...C)),draggable:vue.unref(u)},[R?(vue.openBlock(),vue.createElementBlock("div",{key:0,onClick:C=>o.value=S+1,style:vue.normalizeStyle({cursor:"pointer",borderWidth:"0.7px",borderStyle:"solid",borderRadius:"0.5rem",borderColor:S===vue.unref(o)-1?"#015979 ":"transparent"}),class:"q-pb-sm win-card"},[R!=null&&R.location?R.filetype==="image"?(vue.openBlock(),vue.createBlock(QImg,{key:1,src:R.location,fit:"cover",class:"media-card"},null,8,["src"])):R.filetype==="video"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$1,[vue.createElementVNode("video",{src:R.location,style:{width:"100%",height:"100%",background:"black"}},null,8,_hoisted_5$1),vue.createElementVNode("div",_hoisted_6$1,[vue.createVNode(QIcon,{size:"lg",name:"o_play_circle",color:"white"})])])):vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$1,[vue.createVNode(QIcon,{name:"upload_file",color:"grey-5",size:"33px"})]))],12,_hoisted_2$1)):vue.createCommentVNode("",!0)],40,_hoisted_1$1))),128))],32)),[[Mutation,vue.unref(W)]]):vue.createCommentVNode("",!0)}}),ImagesMiniature=_export_sfc(_sfc_main$1,[["__scopeId","data-v-3cb5e4b3"]]),_hoisted_1={class:"row justify-end"},_hoisted_2={class:"grid"},_hoisted_3={class:"images-container"},_hoisted_4={class:"carousel-container"},_hoisted_5={class:"text-h5 text-bold text-main"},_hoisted_6={class:"row items-center q-mt-xs"},_hoisted_7={class:"q-ml-xs"},_hoisted_8={class:"row justify-end"},_hoisted_9={style:{"font-size":"15px"},class:"q-my-md text-black"},_hoisted_10={class:"q-mb-md",style:{opacity:"0.85"}},_hoisted_11={key:1},_sfc_main=vue.defineComponent({__name:"BrokerDetail",props:{isPublic:{type:Boolean},fetching:{type:Boolean},scale:{},count:{},descriptionLines:{default:100},hiddenProps:{default:()=>[]},data:{},gamaProps:{}},emits:["on-event"],setup(s,{emit:M}){const o=vue.computed(()=>Screen.lt.md),u=M,z=s,W=vue.ref(1),O=vue.computed(()=>{var K;return(((K=V.value)==null?void 0:K.R_IMG)||[]).map(j=>lodashExports.mapKeys(j,(U,E)=>lodashExports.snakeCase(E)))}),{data:N,isPublic:X,gamaProps:y,count:G}=vue.toRefs(z),V=vue.computed(()=>N.value);vue.computed(()=>!X.value);const g=vue.computed(()=>{var K,j,U;return lodashExports.upperFirst((U=(j=(K=V.value)==null?void 0:K.NOMBRE)==null?void 0:j.trim())==null?void 0:U.split(/\s+/)[0])}),R=vue.computed(()=>{var K,j,U,E;return`${lodashExports.upperFirst((j=(K=V.value)==null?void 0:K.UBICACION)==null?void 0:j.PROVINCIA)}, ${lodashExports.upperFirst((E=(U=V.value)==null?void 0:U.UBICACION)==null?void 0:E.CIUDAD)}`}),S=vue.computed(()=>{var K;return(((K=V.value)==null?void 0:K.DESCRIPCION)||"").trim()}),C={broker:V,slide:W,isPublic:X,images:O,count:G,gamaProps:y};vue.provide("context",C);const F=()=>{var K;return u("on-event",{code:"edit",payload:{id:(K=N.value)==null?void 0:K.id}})};return(K,j)=>{var U,E;return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",_hoisted_1,[vue.unref(X)?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(IconButton,{key:0,icon:"edit",sm:"",onClick:F}))]),vue.createElementVNode("div",_hoisted_2,[vue.createElementVNode("div",_hoisted_3,[vue.createVNode(ImagesMiniature,{class:"gt-sm"}),vue.createElementVNode("div",_hoisted_4,[vue.createVNode(_sfc_main$A,{style:{"border-radius":"8px"},items:O.value,modelValue:W.value,"onUpdate:modelValue":j[0]||(j[0]=D=>W.value=D),height:o.value?"450px":"600px"},null,8,["items","modelValue","height"]),vue.createVNode(PublicImageButton)]),vue.createVNode(ImagesMiniature,{class:"lt-md"})]),vue.createElementVNode("div",null,[vue.createElementVNode("div",_hoisted_5,vue.toDisplayString(g.value),1),vue.createElementVNode("div",_hoisted_6,[vue.createVNode(QIcon,{name:"sym_o_location_on"}),vue.createElementVNode("div",_hoisted_7,vue.toDisplayString(R.value),1)]),vue.createElementVNode("div",_hoisted_8,[!vue.unref(X)&&((U=V.value)!=null&&U.estado)?(vue.openBlock(),vue.createBlock(StateIndicator,{key:0,label:V.value.estado.name,color:V.value.estado.color},null,8,["label","color"])):vue.createCommentVNode("",!0)]),vue.createElementVNode("div",_hoisted_9,[vue.createElementVNode("div",_hoisted_10,[S.value?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:"description",style:vue.normalizeStyle({lineClamp:K.descriptionLines,WebkitLineClamp:K.descriptionLines})},vue.toDisplayString(S.value||"~"),5)):(vue.openBlock(),vue.createElementBlock("span",_hoisted_11,j[1]||(j[1]=[vue.createElementVNode("i",null,"Sin descripción",-1)])))]),vue.createVNode(BrokerProps,{gamaProps:vue.unref(y),data:(E=vue.unref(N))==null?void 0:E.PROPS},null,8,["gamaProps","data"])])])])],64)}}}),BrokerDetail=_export_sfc(_sfc_main,[["__scopeId","data-v-9090397b"]]),BROKER_DETAIL_MOCK_DATA=Object.freeze([{ID_BROKER:155,NOMBRE:"Banderola LED P2.5 Señalización Digital de Alta Claridad",DESCRIPCION:`Versatilidad e impacto visual con nuestra Banderola LED P2.5 para Señalización Digital de Alta Claridad. Este formato de 'Blade Sign' es una herramienta excepcional para captar la atención, ofreciendo una resolución fina gracias a su pixel pitch de 2.5mm. Esto asegura que las imágenes y los videos sean nítidos y detallados, ideales para comunicar mensajes complejos o mostrar promociones atractivas desde distancias cercanas a medias.
63
63
  Su estructura de aluminio la hace ligera y resistente, facilitando su instalación en diversos entornos. El diseño sin cubierta de vidrio (glassless cover design) realza la calidad visual y reduce los reflejos. Adecuada tanto para uso interior como exterior (con una distancia de visión óptima desde 2 metros para interior y 1 metro para exterior), lo que la convierte en una opción increíblemente flexible para tiendas, vestíbulos, centros comerciales o incluso en áreas semi-cubiertas al aire libre.
64
- La instalación es sencilla y directa, permite fijarla a una base en la pared con mantenimiento sin complicaciones, asegurando un rendimiento continuo. La gestión de contenido remoto permite actualizar tus mensajes al instante, manteniendo tu comunicación siempre fresca y relevante.`,ID_GAMA:23,TAGS:null,CONTACTO:{UBICACION:{PROVINCIA:"Madrid",CIUDAD:"Madrid"}},PROPS:{idiomas:["spanish","catalan","english"],especializacion:["jovenes_profesionales","mayores_de_55","para_familias_numerosas"],especializacion_de_residencia:["zonas_rurales","segunda_residencia_casa_vacacional"],fecha_de_inicio:"1999"},PACK:!1,GRUPO:null,PAQUETE:!1,ID_PRODUCTOS_PAQUETE:null,PRECIO:"1.00",PRECIOS:null,FECHA_ALTA:"2025-06-10",R_ARCHIVOS:[{ID_ARCHIVO:932,LOCATION:"https://w2w-files.s3.amazonaws.com/linvermedia/efc54a4719e9ebc4_Banderola%20670.png",FILETYPE:"image"},{ID_ARCHIVO:936,LOCATION:"https://w2w-files.s3.amazonaws.com/linvermedia/a9f8ce2a718e4aaf_Pantalla%20LED%20P5.7%20Exterior%20de%20Gran%20Brillo%20y%20Visibilidad%20%2811%29.png",FILETYPE:"image"},{ID_ARCHIVO:943,LOCATION:"https://w2w-files.s3.amazonaws.com/linvermedia/c7365d0fafef1188_Banderola%20LED%20Linvermedia.png",FILETYPE:"image"}]}]),BROKER_DETAIL_MOCK_PROPS={isPublic:!0,data:{},gamaProps:[],fetching:!1,descriptionLines:4,scale:1},BrokerDetailPropsSchema=WidgetPropsSchema.extend({descriptionLines:numberType().optional(),hiddenProps:arrayType(stringType()).optional(),gamaProps:arrayType(recordType(stringType(),anyType()))}),LocalWidgetsIndex={linvermedia_product_card:{description:"Card de producto para Linvermedia",component:LinvermediaProductCard,group:"linvermedia",schema:LinvermediaProductCardPropsSchema,mock:{props:LINVERMEDIA_PRODUCT_CARD_MOCK_PROPS,data:LINVERMEDIA_PRODUCT_CARD_MOCK_DATA,idKey:"ID_PRODUCTO",labelKey:"NOMBRE"}},linvermedia_product_detail:{description:"Detalle de producto para Linvermedia",component:LinvermediaProductDetail,group:"linvermedia",schema:LinvermediaProductDetailPropsSchema,mock:{props:LINVERMEDIA_PRODUCT_DETAIL_MOCK_PROPS,data:LINVERMEDIA_PRODUCT_DETAIL_MOCK_DATA,idKey:"id",labelKey:"nombre"}},linvermedia_solicitud_card:{description:"Card de solicitud para Linvermedia",component:LinvermediaSolicitudCard,group:"linvermedia",schema:LinvermediaSolicitudCardPropsSchema,mock:{props:LINVERMEDIA_SOLICITUD_CARD_MOCK_PROPS,data:LINVERMEDIA_SOLICITUD_CARD_MOCK_DATA,idKey:"ID_CAPTACION",labelKey:"COD_CAPTACION"}},broker_card:{description:"Card de Brokers",component:BrokerCard,group:"myhipoteca",schema:BrokerCardPropsSchema,mock:{props:BROKER_CARD_MOCK_PROPS,data:BROKER_CARD_MOCK_DATA,idKey:"ID_BROKER",labelKey:"NOMBRE"}},broker_detail:{description:"Detail de Brokers",component:BrokerDetail,group:"myhipoteca",schema:BrokerDetailPropsSchema,mock:{props:BROKER_DETAIL_MOCK_PROPS,data:BROKER_DETAIL_MOCK_DATA,idKey:"ID_BROKER",labelKey:"NOMBRE"}}},WidgetsIndex=lodashExports.mapValues(LocalWidgetsIndex,s=>lodashExports.omit(s,"mock")),W2WSharedUi={install(s,M){if(M!=null&&M.pinia)s.use(M.pinia);else throw new Error("No se ha encontrado una instancia de pinia");s.component("SectionsContainer",SectionsContainer),s.component("Card",Card$1),s.component("DynamicCarousel",_sfc_main$A),s.component("IndicatorColor",IndicatorColor),s.component("SectionSpinner",SectionSpinner),s.component("StateIndicator",StateIndicator),s.component("IconButton",IconButton),s.component("Button",_sfc_main$F),s.component("MenuButton",_sfc_main$x),s.component("ProductPrice",ProductPrice),s.component("ProductProps",_sfc_main$f),s.component("ProductTag",ProductTag),Object.entries(WidgetsIndex).forEach(([o,u])=>{s.component(o,u.component)})}};var vr=Object.defineProperty,br=(s,M,o)=>M in s?vr(s,M,{enumerable:!0,configurable:!0,writable:!0,value:o}):s[M]=o,It=(s,M,o)=>(br(s,typeof M!="symbol"?M+"":M,o),o),ye=(s,M,o)=>{if(!M.has(s))throw TypeError("Cannot "+o)},T=(s,M,o)=>(ye(s,M,"read from private field"),o?o.call(s):M.get(s)),et=(s,M,o)=>{if(M.has(s))throw TypeError("Cannot add the same private member more than once");M instanceof WeakSet?M.add(s):M.set(s,o)},ut=(s,M,o,u)=>(ye(s,M,"write to private field"),M.set(s,o),o),ue=(s,M,o,u)=>({set _(z){ut(s,M,z)},get _(){return T(s,M,u)}}),nt=(s,M,o)=>(ye(s,M,"access private method"),o),commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function getAugmentedNamespace(s){if(s.__esModule)return s;var M=s.default;if(typeof M=="function"){var o=function u(){if(this instanceof u){var z=[null];z.push.apply(z,arguments);var W=Function.bind.apply(M,z);return new W}return M.apply(this,arguments)};o.prototype=M.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(s).forEach(function(u){var z=Object.getOwnPropertyDescriptor(s,u);Object.defineProperty(o,u,z.get?z:{enumerable:!0,get:function(){return s[u]}})}),o}function commonjsRequire(s){throw new Error('Could not dynamically require "'+s+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pdf_min$2={exports:{}};const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$6=getAugmentedNamespace(__viteBrowserExternal$1);var path2dPolyfill_min={},hasRequiredPath2dPolyfill_min;function requirePath2dPolyfill_min(){return hasRequiredPath2dPolyfill_min||(hasRequiredPath2dPolyfill_min=1,function(){function s(G,V,g){for(var R,S=0,C=V.length;S<C;S++)!R&&S in V||(R||(R=Array.prototype.slice.call(V,0,S)),R[S]=V[S]);return G.concat(R||Array.prototype.slice.call(V))}var M={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},o=/([astvzqmhlc])([^astvzqmhlc]*)/gi,u=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function z(G){var V=[],g=String(G).trim();return g[0]!=="M"&&g[0]!=="m"||g.replace(o,function(R,S,C){var F=function(U){var E=U.match(u);return E?E.map(Number):[]}(C),K=S.toLowerCase(),j=S;if(K==="m"&&F.length>2&&(V.push(s([j],F.splice(0,2))),K="l",j=j==="m"?"l":"L"),F.length<M[K])return"";for(V.push(s([j],F.splice(0,M[K])));F.length>=M[K]&&F.length&&M[K];)V.push(s([j],F.splice(0,M[K])));return""}),V}function W(G,V){var g=G.x*Math.cos(V)-G.y*Math.sin(V),R=G.y*Math.cos(V)+G.x*Math.sin(V);G.x=g,G.y=R}function O(G,V){G.x*=V,G.y*=V}var N=function(){function G(V){var g;this.commands=[],V&&V instanceof G?(g=this.commands).push.apply(g,V.commands):V&&(this.commands=z(V))}return G.prototype.addPath=function(V){var g;V&&V instanceof G&&(g=this.commands).push.apply(g,V.commands)},G.prototype.moveTo=function(V,g){this.commands.push(["M",V,g])},G.prototype.lineTo=function(V,g){this.commands.push(["L",V,g])},G.prototype.arc=function(V,g,R,S,C,F){this.commands.push(["AC",V,g,R,S,C,!!F])},G.prototype.arcTo=function(V,g,R,S,C){this.commands.push(["AT",V,g,R,S,C])},G.prototype.ellipse=function(V,g,R,S,C,F,K,j){this.commands.push(["E",V,g,R,S,C,F,K,!!j])},G.prototype.closePath=function(){this.commands.push(["Z"])},G.prototype.bezierCurveTo=function(V,g,R,S,C,F){this.commands.push(["C",V,g,R,S,C,F])},G.prototype.quadraticCurveTo=function(V,g,R,S){this.commands.push(["Q",V,g,R,S])},G.prototype.rect=function(V,g,R,S){this.commands.push(["R",V,g,R,S])},G.prototype.roundRect=function(V,g,R,S,C){C===void 0?this.commands.push(["RR",V,g,R,S,0]):this.commands.push(["RR",V,g,R,S,C])},G}();function X(G,V){var g,R,S,C,F,K,j,U,E,D,v,q,i0,t0,P,c0,s0,W0,M0,X0,B,Q,$,l0,_=0,H=0,d0=null,p0=null,m0=null,r0=null,O0=null,h0=null;G.beginPath();for(var G0=0;G0<V.length;++G0){(W0=V[G0][0])!=="S"&&W0!=="s"&&W0!=="C"&&W0!=="c"&&(d0=null,p0=null),W0!=="T"&&W0!=="t"&&W0!=="Q"&&W0!=="q"&&(m0=null,r0=null);var z0=void 0;switch(W0){case"m":case"M":z0=V[G0],W0==="m"?(_+=z0[1],H+=z0[2]):(_=z0[1],H=z0[2]),W0!=="M"&&O0||(O0={x:_,y:H}),G.moveTo(_,H);break;case"l":_+=(z0=V[G0])[1],H+=z0[2],G.lineTo(_,H);break;case"L":_=(z0=V[G0])[1],H=z0[2],G.lineTo(_,H);break;case"H":_=(z0=V[G0])[1],G.lineTo(_,H);break;case"h":_+=(z0=V[G0])[1],G.lineTo(_,H);break;case"V":H=(z0=V[G0])[1],G.lineTo(_,H);break;case"v":H+=(z0=V[G0])[1],G.lineTo(_,H);break;case"a":case"A":if(z0=V[G0],h0===null)throw new Error("This should never happen");W0==="a"?(_+=z0[6],H+=z0[7]):(_=z0[6],H=z0[7]),t0=z0[1],P=z0[2],j=z0[3]*Math.PI/180,S=!!z0[4],C=!!z0[5],F={x:_,y:H},W(K={x:(h0.x-F.x)/2,y:(h0.y-F.y)/2},-j),(U=K.x*K.x/(t0*t0)+K.y*K.y/(P*P))>1&&(t0*=U=Math.sqrt(U),P*=U),E=t0*t0*P*P,D=t0*t0*K.y*K.y+P*P*K.x*K.x,O(M0={x:t0*K.y/P,y:-P*K.x/t0},C!==S?Math.sqrt((E-D)/D)||0:-Math.sqrt((E-D)/D)||0),R=Math.atan2((K.y-M0.y)/P,(K.x-M0.x)/t0),g=Math.atan2(-(K.y+M0.y)/P,-(K.x+M0.x)/t0),W(M0,j),Q=M0,$=(F.x+h0.x)/2,l0=(F.y+h0.y)/2,Q.x+=$,Q.y+=l0,G.save(),G.translate(M0.x,M0.y),G.rotate(j),G.scale(t0,P),G.arc(0,0,1,R,g,!C),G.restore();break;case"C":d0=(z0=V[G0])[3],p0=z0[4],_=z0[5],H=z0[6],G.bezierCurveTo(z0[1],z0[2],d0,p0,_,H);break;case"c":z0=V[G0],G.bezierCurveTo(z0[1]+_,z0[2]+H,z0[3]+_,z0[4]+H,z0[5]+_,z0[6]+H),d0=z0[3]+_,p0=z0[4]+H,_+=z0[5],H+=z0[6];break;case"S":z0=V[G0],d0!==null&&p0!==null||(d0=_,p0=H),G.bezierCurveTo(2*_-d0,2*H-p0,z0[1],z0[2],z0[3],z0[4]),d0=z0[1],p0=z0[2],_=z0[3],H=z0[4];break;case"s":z0=V[G0],d0!==null&&p0!==null||(d0=_,p0=H),G.bezierCurveTo(2*_-d0,2*H-p0,z0[1]+_,z0[2]+H,z0[3]+_,z0[4]+H),d0=z0[1]+_,p0=z0[2]+H,_+=z0[3],H+=z0[4];break;case"Q":m0=(z0=V[G0])[1],r0=z0[2],_=z0[3],H=z0[4],G.quadraticCurveTo(m0,r0,_,H);break;case"q":m0=(z0=V[G0])[1]+_,r0=z0[2]+H,_+=z0[3],H+=z0[4],G.quadraticCurveTo(m0,r0,_,H);break;case"T":m0!==null&&r0!==null||(m0=_,r0=H),m0=2*_-m0,r0=2*H-r0,_=(z0=V[G0])[1],H=z0[2],G.quadraticCurveTo(m0,r0,_,H);break;case"t":m0!==null&&r0!==null||(m0=_,r0=H),m0=2*_-m0,r0=2*H-r0,_+=(z0=V[G0])[1],H+=z0[2],G.quadraticCurveTo(m0,r0,_,H);break;case"z":case"Z":O0&&(_=O0.x,H=O0.y),O0=null,G.closePath();break;case"AC":_=(z0=V[G0])[1],H=z0[2],i0=z0[3],R=z0[4],g=z0[5],X0=z0[6],G.arc(_,H,i0,R,g,X0);break;case"AT":v=(z0=V[G0])[1],q=z0[2],_=z0[3],H=z0[4],i0=z0[5],G.arcTo(v,q,_,H,i0);break;case"E":_=(z0=V[G0])[1],H=z0[2],t0=z0[3],P=z0[4],j=z0[5],R=z0[6],g=z0[7],X0=z0[8],G.save(),G.translate(_,H),G.rotate(j),G.scale(t0,P),G.arc(0,0,1,R,g,X0),G.restore();break;case"R":_=(z0=V[G0])[1],H=z0[2],c0=z0[3],s0=z0[4],O0={x:_,y:H},G.rect(_,H,c0,s0);break;case"RR":_=(z0=V[G0])[1],H=z0[2],c0=z0[3],s0=z0[4],B=z0[5],O0={x:_,y:H},G.roundRect(_,H,c0,s0,B)}h0?(h0.x=_,h0.y=H):h0={x:_,y:H}}}function y(G,V,g,R,S){var C=this;if(S===void 0&&(S=0),typeof S=="number"&&(S=[S]),Array.isArray(S)){if(S.length===0||S.length>4)throw new RangeError("Failed to execute 'roundRect' on '".concat(this.constructor.name,"': ").concat(S.length," radii provided. Between one and four radii are necessary."));if(S.forEach(function(D){if(D<0)throw new RangeError("Failed to execute 'roundRect' on '".concat(C.constructor.name,"': Radius value ").concat(D," is negative."))}),S.length===1&&S[0]===0)return this.rect(G,V,g,R);var F,K,j,U=Math.min(g,R)/2,E=F=K=j=Math.min(U,S[0]);S.length===2&&(F=j=Math.min(U,S[1])),S.length===3&&(F=j=Math.min(U,S[1]),K=Math.min(U,S[2])),S.length===4&&(F=Math.min(U,S[1]),K=Math.min(U,S[2]),j=Math.min(U,S[3])),this.moveTo(G,V+R-j),this.arcTo(G,V,G+E,V,E),this.arcTo(G+g,V,G+g,V+F,F),this.arcTo(G+g,V+R,G+g-K,V+R,K),this.arcTo(G,V+R,G,V+R-j,j),this.moveTo(G,V)}}(function(G){if(G&&G.CanvasRenderingContext2D&&!G.Path2D){var V=G.CanvasRenderingContext2D,g=V.prototype.fill,R=V.prototype.stroke,S=V.prototype.isPointInPath;V.prototype.fill=function(){for(var C=[],F=0;F<arguments.length;F++)C[F]=arguments[F];if(!(C[0]instanceof N))return j=C[0]||"nonzero",g.apply(this,[j]);var K=C[0],j=C[1]||"nonzero";X(this,K.commands),g.apply(this,[j])},V.prototype.stroke=function(C){C&&X(this,C.commands),R.apply(this)},V.prototype.isPointInPath=function(){for(var C=[],F=0;F<arguments.length;F++)C[F]=arguments[F];if(C[0]instanceof N){var K=C[0],j=C[1],U=C[2],E=C[3]||"nonzero";return X(this,K.commands),S.apply(this,[j,U,E])}return S.apply(this,C)},G.Path2D=N}})(window),function(G){if(G&&G.CanvasRenderingContext2D){var V=G.CanvasRenderingContext2D,g=G.Path2D;V&&!V.prototype.roundRect&&(V.prototype.roundRect=y),g&&!g.prototype.roundRect&&(g.prototype.roundRect=y)}}(window)}()),path2dPolyfill_min}(function(module,exports){(function(s,M){module.exports=M()})(globalThis,()=>(()=>{var __webpack_modules__=[,(s,M,o)=>{var u,z;Object.defineProperty(M,"__esModule",{value:!0}),M.VerbosityLevel=M.Util=M.UnknownErrorException=M.UnexpectedResponseException=M.TextRenderingMode=M.RenderingIntentFlag=M.PromiseCapability=M.PermissionFlag=M.PasswordResponses=M.PasswordException=M.PageActionEventType=M.OPS=M.MissingPDFException=M.MAX_IMAGE_SIZE_TO_CACHE=M.LINE_FACTOR=M.LINE_DESCENT_FACTOR=M.InvalidPDFException=M.ImageKind=M.IDENTITY_MATRIX=M.FormatError=M.FeatureTest=M.FONT_IDENTITY_MATRIX=M.DocumentActionEventType=M.CMapCompressionType=M.BaseException=M.BASELINE_FACTOR=M.AnnotationType=M.AnnotationStateModelType=M.AnnotationReviewState=M.AnnotationReplyType=M.AnnotationMode=M.AnnotationMarkedState=M.AnnotationFlag=M.AnnotationFieldFlag=M.AnnotationEditorType=M.AnnotationEditorPrefix=M.AnnotationEditorParamsType=M.AnnotationBorderStyleType=M.AnnotationActionEventType=M.AbortException=void 0,M.assert=function(j,U){j||X(U)},M.bytesToString=function(j){typeof j=="object"&&(j==null?void 0:j.length)!==void 0||X("Invalid argument for bytesToString");const U=j.length,E=8192;if(U<E)return String.fromCharCode.apply(null,j);const D=[];for(let v=0;v<U;v+=E){const q=Math.min(v+E,U),i0=j.subarray(v,q);D.push(String.fromCharCode.apply(null,i0))}return D.join("")},M.createValidAbsoluteUrl=function(j){let U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!j)return null;try{if(E&&typeof j=="string"){if(E.addDefaultProtocol&&j.startsWith("www.")){const v=j.match(/\./g);(v==null?void 0:v.length)>=2&&(j=`http://${j}`)}if(E.tryConvertEncoding)try{j=C(j)}catch{}}const D=U?new URL(j,U):new URL(j);if(function(v){switch(v==null?void 0:v.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(D))return D}catch{}return null},M.getModificationDate=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Date;return[j.getUTCFullYear().toString(),(j.getUTCMonth()+1).toString().padStart(2,"0"),j.getUTCDate().toString().padStart(2,"0"),j.getUTCHours().toString().padStart(2,"0"),j.getUTCMinutes().toString().padStart(2,"0"),j.getUTCSeconds().toString().padStart(2,"0")].join("")},M.getVerbosityLevel=function(){return O},M.info=function(j){O>=W.INFOS&&console.log(`Info: ${j}`)},M.isArrayBuffer=function(j){return typeof j=="object"&&(j==null?void 0:j.byteLength)!==void 0},M.isArrayEqual=function(j,U){if(j.length!==U.length)return!1;for(let E=0,D=j.length;E<D;E++)if(j[E]!==U[E])return!1;return!0},M.normalizeUnicode=function(j){return F||(F=/([\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,K=new Map([["ſt","ſt"]])),j.replaceAll(F,(U,E,D)=>E?E.normalize("NFKC"):K.get(D))},M.objectFromMap=function(j){const U=Object.create(null);for(const[E,D]of j)U[E]=D;return U},M.objectSize=function(j){return Object.keys(j).length},M.setVerbosityLevel=function(j){Number.isInteger(j)&&(O=j)},M.shadow=y,M.string32=function(j){return String.fromCharCode(j>>24&255,j>>16&255,j>>8&255,255&j)},M.stringToBytes=V,M.stringToPDFString=function(j){if(j[0]>="ï"){let E;if(j[0]==="þ"&&j[1]==="ÿ"?E="utf-16be":j[0]==="ÿ"&&j[1]==="þ"?E="utf-16le":j[0]==="ï"&&j[1]==="»"&&j[2]==="¿"&&(E="utf-8"),E)try{const D=new TextDecoder(E,{fatal:!0}),v=V(j);return D.decode(v)}catch(D){N(`stringToPDFString: "${D}".`)}}const U=[];for(let E=0,D=j.length;E<D;E++){const v=S[j.charCodeAt(E)];U.push(v?String.fromCharCode(v):j.charAt(E))}return U.join("")},M.stringToUTF8String=C,M.unreachable=X,M.utf8StringToString=function(j){return unescape(encodeURIComponent(j))},M.warn=N,globalThis._pdfjsCompatibilityChecked||(globalThis._pdfjsCompatibilityChecked=!0,o(2)),M.IDENTITY_MATRIX=[1,0,0,1,0,0],M.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],M.MAX_IMAGE_SIZE_TO_CACHE=1e7,M.LINE_FACTOR=1.35,M.LINE_DESCENT_FACTOR=.35,M.BASELINE_FACTOR=.25925925925925924,M.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},M.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},M.AnnotationEditorPrefix="pdfjs_internal_editor_",M.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,INK:15},M.AnnotationEditorParamsType={FREETEXT_SIZE:1,FREETEXT_COLOR:2,FREETEXT_OPACITY:3,INK_COLOR:11,INK_THICKNESS:12,INK_OPACITY:13},M.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},M.TextRenderingMode={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},M.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},M.AnnotationType={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},M.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},M.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},M.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},M.AnnotationReplyType={GROUP:"Group",REPLY:"R"},M.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},M.AnnotationFieldFlag={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},M.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},M.AnnotationActionEventType={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"},M.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},M.PageActionEventType={O:"PageOpen",C:"PageClose"};const W={ERRORS:0,WARNINGS:1,INFOS:5};M.VerbosityLevel=W,M.CMapCompressionType={NONE:0,BINARY:1},M.OPS={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},M.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let O=W.WARNINGS;function N(j){O>=W.WARNINGS&&console.log(`Warning: ${j}`)}function X(j){throw new Error(j)}function y(j,U,E){let D=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return Object.defineProperty(j,U,{value:E,enumerable:!D,configurable:!0,writable:!1}),E}const G=function(){function j(U,E){this.constructor===j&&X("Cannot initialize BaseException."),this.message=U,this.name=E}return j.prototype=new Error,j.constructor=j,j}();M.BaseException=G,M.PasswordException=class extends G{constructor(j,U){super(j,"PasswordException"),this.code=U}},M.UnknownErrorException=class extends G{constructor(j,U){super(j,"UnknownErrorException"),this.details=U}},M.InvalidPDFException=class extends G{constructor(j){super(j,"InvalidPDFException")}},M.MissingPDFException=class extends G{constructor(j){super(j,"MissingPDFException")}},M.UnexpectedResponseException=class extends G{constructor(j,U){super(j,"UnexpectedResponseException"),this.status=U}},M.FormatError=class extends G{constructor(j){super(j,"FormatError")}},M.AbortException=class extends G{constructor(j){super(j,"AbortException")}};function V(j){typeof j!="string"&&X("Invalid argument for stringToBytes");const U=j.length,E=new Uint8Array(U);for(let D=0;D<U;++D)E[D]=255&j.charCodeAt(D);return E}M.FeatureTest=class{static get isLittleEndian(){return y(this,"isLittleEndian",function(){const j=new Uint8Array(4);return j[0]=1,new Uint32Array(j.buffer,0,1)[0]===1}())}static get isEvalSupported(){return y(this,"isEvalSupported",function(){try{return new Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return y(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator>"u"?y(this,"platform",{isWin:!1,isMac:!1}):y(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}};const g=[...Array(256).keys()].map(j=>j.toString(16).padStart(2,"0"));class R{static makeHexColor(U,E,D){return`#${g[U]}${g[E]}${g[D]}`}static scaleMinMax(U,E){let D;U[0]?(U[0]<0&&(D=E[0],E[0]=E[1],E[1]=D),E[0]*=U[0],E[1]*=U[0],U[3]<0&&(D=E[2],E[2]=E[3],E[3]=D),E[2]*=U[3],E[3]*=U[3]):(D=E[0],E[0]=E[2],E[2]=D,D=E[1],E[1]=E[3],E[3]=D,U[1]<0&&(D=E[2],E[2]=E[3],E[3]=D),E[2]*=U[1],E[3]*=U[1],U[2]<0&&(D=E[0],E[0]=E[1],E[1]=D),E[0]*=U[2],E[1]*=U[2]),E[0]+=U[4],E[1]+=U[4],E[2]+=U[5],E[3]+=U[5]}static transform(U,E){return[U[0]*E[0]+U[2]*E[1],U[1]*E[0]+U[3]*E[1],U[0]*E[2]+U[2]*E[3],U[1]*E[2]+U[3]*E[3],U[0]*E[4]+U[2]*E[5]+U[4],U[1]*E[4]+U[3]*E[5]+U[5]]}static applyTransform(U,E){return[U[0]*E[0]+U[1]*E[2]+E[4],U[0]*E[1]+U[1]*E[3]+E[5]]}static applyInverseTransform(U,E){const D=E[0]*E[3]-E[1]*E[2];return[(U[0]*E[3]-U[1]*E[2]+E[2]*E[5]-E[4]*E[3])/D,(-U[0]*E[1]+U[1]*E[0]+E[4]*E[1]-E[5]*E[0])/D]}static getAxialAlignedBoundingBox(U,E){const D=R.applyTransform(U,E),v=R.applyTransform(U.slice(2,4),E),q=R.applyTransform([U[0],U[3]],E),i0=R.applyTransform([U[2],U[1]],E);return[Math.min(D[0],v[0],q[0],i0[0]),Math.min(D[1],v[1],q[1],i0[1]),Math.max(D[0],v[0],q[0],i0[0]),Math.max(D[1],v[1],q[1],i0[1])]}static inverseTransform(U){const E=U[0]*U[3]-U[1]*U[2];return[U[3]/E,-U[1]/E,-U[2]/E,U[0]/E,(U[2]*U[5]-U[4]*U[3])/E,(U[4]*U[1]-U[5]*U[0])/E]}static singularValueDecompose2dScale(U){const E=[U[0],U[2],U[1],U[3]],D=U[0]*E[0]+U[1]*E[2],v=U[0]*E[1]+U[1]*E[3],q=U[2]*E[0]+U[3]*E[2],i0=U[2]*E[1]+U[3]*E[3],t0=(D+i0)/2,P=Math.sqrt((D+i0)**2-4*(D*i0-q*v))/2,c0=t0+P||1,s0=t0-P||1;return[Math.sqrt(c0),Math.sqrt(s0)]}static normalizeRect(U){const E=U.slice(0);return U[0]>U[2]&&(E[0]=U[2],E[2]=U[0]),U[1]>U[3]&&(E[1]=U[3],E[3]=U[1]),E}static intersect(U,E){const D=Math.max(Math.min(U[0],U[2]),Math.min(E[0],E[2])),v=Math.min(Math.max(U[0],U[2]),Math.max(E[0],E[2]));if(D>v)return null;const q=Math.max(Math.min(U[1],U[3]),Math.min(E[1],E[3])),i0=Math.min(Math.max(U[1],U[3]),Math.max(E[1],E[3]));return q>i0?null:[D,q,v,i0]}static bezierBoundingBox(U,E,D,v,q,i0,t0,P){const c0=[],s0=[[],[]];let W0,M0,X0,B,Q,$,l0,_;for(let m0=0;m0<2;++m0)if(m0===0?(M0=6*U-12*D+6*q,W0=-3*U+9*D-9*q+3*t0,X0=3*D-3*U):(M0=6*E-12*v+6*i0,W0=-3*E+9*v-9*i0+3*P,X0=3*v-3*E),Math.abs(W0)<1e-12){if(Math.abs(M0)<1e-12)continue;B=-X0/M0,0<B&&B<1&&c0.push(B)}else l0=M0*M0-4*X0*W0,_=Math.sqrt(l0),l0<0||(Q=(-M0+_)/(2*W0),0<Q&&Q<1&&c0.push(Q),$=(-M0-_)/(2*W0),0<$&&$<1&&c0.push($));let H,d0=c0.length;const p0=d0;for(;d0--;)B=c0[d0],H=1-B,s0[0][d0]=H*H*H*U+3*H*H*B*D+3*H*B*B*q+B*B*B*t0,s0[1][d0]=H*H*H*E+3*H*H*B*v+3*H*B*B*i0+B*B*B*P;return s0[0][p0]=U,s0[1][p0]=E,s0[0][p0+1]=t0,s0[1][p0+1]=P,s0[0].length=s0[1].length=p0+2,[Math.min(...s0[0]),Math.min(...s0[1]),Math.max(...s0[0]),Math.max(...s0[1])]}}M.Util=R;const S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function C(j){return decodeURIComponent(escape(j))}M.PromiseCapability=(z=class{constructor(){et(this,u,!1),this.promise=new Promise((j,U)=>{this.resolve=E=>{ut(this,u,!0),j(E)},this.reject=E=>{ut(this,u,!0),U(E)}})}get settled(){return T(this,u)}},u=new WeakMap,z);let F=null,K=null},(s,M,o)=>{var u=o(3);(function(){!globalThis.DOMMatrix&&u.isNodeJS&&(globalThis.DOMMatrix=require$$6.DOMMatrix)})(),function(){if(globalThis.Path2D||!u.isNodeJS)return;const{CanvasRenderingContext2D:z}=require$$6,{polyfillPath2D:W}=requirePath2dPolyfill_min();globalThis.CanvasRenderingContext2D=z,W(globalThis)}(),function(){Array.prototype.at||o(4)}(),function(){Uint8Array.prototype.at||o(78)}(),function(){globalThis.structuredClone||o(90)}()},(s,M)=>{Object.defineProperty(M,"__esModule",{value:!0}),M.isNodeJS=void 0;const o=!(typeof process!="object"||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&process.type!=="browser");M.isNodeJS=o},(s,M,o)=>{o(5);var u=o(77);s.exports=u("Array","at")},(s,M,o)=>{var u=o(6),z=o(43),W=o(67),O=o(65),N=o(72);u({target:"Array",proto:!0},{at:function(X){var y=z(this),G=W(y),V=O(X),g=V>=0?V:G+V;return g<0||g>=G?void 0:y[g]}}),N("at")},(s,M,o)=>{var u=o(7),z=o(8).f,W=o(47),O=o(51),N=o(41),X=o(59),y=o(71);s.exports=function(G,V){var g,R,S,C,F,K=G.target,j=G.global,U=G.stat;if(g=j?u:U?u[K]||N(K,{}):(u[K]||{}).prototype)for(R in V){if(C=V[R],S=G.dontCallGetSet?(F=z(g,R))&&F.value:g[R],!y(j?R:K+(U?".":"#")+R,G.forced)&&S!==void 0){if(typeof C==typeof S)continue;X(C,S)}(G.sham||S&&S.sham)&&W(C,"sham",!0),O(g,R,C,G)}}},function(s){var M=function(o){return o&&o.Math==Math&&o};s.exports=M(typeof globalThis=="object"&&globalThis)||M(typeof window=="object"&&window)||M(typeof self=="object"&&self)||M(typeof commonjsGlobal=="object"&&commonjsGlobal)||function(){return this}()||this||Function("return this")()},(s,M,o)=>{var u=o(9),z=o(11),W=o(13),O=o(14),N=o(15),X=o(21),y=o(42),G=o(45),V=Object.getOwnPropertyDescriptor;M.f=u?V:function(g,R){if(g=N(g),R=X(R),G)try{return V(g,R)}catch{}if(y(g,R))return O(!z(W.f,g,R),g[R])}},(s,M,o)=>{var u=o(10);s.exports=!u(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},s=>{s.exports=function(M){try{return!!M()}catch{return!0}}},(s,M,o)=>{var u=o(12),z=Function.prototype.call;s.exports=u?z.bind(z):function(){return z.apply(z,arguments)}},(s,M,o)=>{var u=o(10);s.exports=!u(function(){var z=(function(){}).bind();return typeof z!="function"||z.hasOwnProperty("prototype")})},(s,M)=>{var o={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,z=u&&!o.call({1:2},1);M.f=z?function(W){var O=u(this,W);return!!O&&O.enumerable}:o},s=>{s.exports=function(M,o){return{enumerable:!(1&M),configurable:!(2&M),writable:!(4&M),value:o}}},(s,M,o)=>{var u=o(16),z=o(19);s.exports=function(W){return u(z(W))}},(s,M,o)=>{var u=o(17),z=o(10),W=o(18),O=Object,N=u("".split);s.exports=z(function(){return!O("z").propertyIsEnumerable(0)})?function(X){return W(X)=="String"?N(X,""):O(X)}:O},(s,M,o)=>{var u=o(12),z=Function.prototype,W=z.call,O=u&&z.bind.bind(W,W);s.exports=u?O:function(N){return function(){return W.apply(N,arguments)}}},(s,M,o)=>{var u=o(17),z=u({}.toString),W=u("".slice);s.exports=function(O){return W(z(O),8,-1)}},(s,M,o)=>{var u=o(20),z=TypeError;s.exports=function(W){if(u(W))throw z("Can't call method on "+W);return W}},s=>{s.exports=function(M){return M==null}},(s,M,o)=>{var u=o(22),z=o(26);s.exports=function(W){var O=u(W,"string");return z(O)?O:O+""}},(s,M,o)=>{var u=o(11),z=o(23),W=o(26),O=o(33),N=o(36),X=o(37),y=TypeError,G=X("toPrimitive");s.exports=function(V,g){if(!z(V)||W(V))return V;var R,S=O(V,G);if(S){if(g===void 0&&(g="default"),R=u(S,V,g),!z(R)||W(R))return R;throw y("Can't convert object to primitive value")}return g===void 0&&(g="number"),N(V,g)}},(s,M,o)=>{var u=o(24),z=o(25),W=z.all;s.exports=z.IS_HTMLDDA?function(O){return typeof O=="object"?O!==null:u(O)||O===W}:function(O){return typeof O=="object"?O!==null:u(O)}},(s,M,o)=>{var u=o(25),z=u.all;s.exports=u.IS_HTMLDDA?function(W){return typeof W=="function"||W===z}:function(W){return typeof W=="function"}},s=>{var M=typeof document=="object"&&document.all,o=M===void 0&&M!==void 0;s.exports={all:M,IS_HTMLDDA:o}},(s,M,o)=>{var u=o(27),z=o(24),W=o(28),O=o(29),N=Object;s.exports=O?function(X){return typeof X=="symbol"}:function(X){var y=u("Symbol");return z(y)&&W(y.prototype,N(X))}},(s,M,o)=>{var u=o(7),z=o(24);s.exports=function(W,O){return arguments.length<2?(N=u[W],z(N)?N:void 0):u[W]&&u[W][O];var N}},(s,M,o)=>{var u=o(17);s.exports=u({}.isPrototypeOf)},(s,M,o)=>{var u=o(30);s.exports=u&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},(s,M,o)=>{var u=o(31),z=o(10),W=o(7).String;s.exports=!!Object.getOwnPropertySymbols&&!z(function(){var O=Symbol();return!W(O)||!(Object(O)instanceof Symbol)||!Symbol.sham&&u&&u<41})},(s,M,o)=>{var u,z,W=o(7),O=o(32),N=W.process,X=W.Deno,y=N&&N.versions||X&&X.version,G=y&&y.v8;G&&(z=(u=G.split("."))[0]>0&&u[0]<4?1:+(u[0]+u[1])),!z&&O&&(!(u=O.match(/Edge\/(\d+)/))||u[1]>=74)&&(u=O.match(/Chrome\/(\d+)/))&&(z=+u[1]),s.exports=z},s=>{s.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},(s,M,o)=>{var u=o(34),z=o(20);s.exports=function(W,O){var N=W[O];return z(N)?void 0:u(N)}},(s,M,o)=>{var u=o(24),z=o(35),W=TypeError;s.exports=function(O){if(u(O))return O;throw W(z(O)+" is not a function")}},s=>{var M=String;s.exports=function(o){try{return M(o)}catch{return"Object"}}},(s,M,o)=>{var u=o(11),z=o(24),W=o(23),O=TypeError;s.exports=function(N,X){var y,G;if(X==="string"&&z(y=N.toString)&&!W(G=u(y,N))||z(y=N.valueOf)&&!W(G=u(y,N))||X!=="string"&&z(y=N.toString)&&!W(G=u(y,N)))return G;throw O("Can't convert object to primitive value")}},(s,M,o)=>{var u=o(7),z=o(38),W=o(42),O=o(44),N=o(30),X=o(29),y=u.Symbol,G=z("wks"),V=X?y.for||y:y&&y.withoutSetter||O;s.exports=function(g){return W(G,g)||(G[g]=N&&W(y,g)?y[g]:V("Symbol."+g)),G[g]}},(s,M,o)=>{var u=o(39),z=o(40);(s.exports=function(W,O){return z[W]||(z[W]=O!==void 0?O:{})})("versions",[]).push({version:"3.30.2",mode:u?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"})},s=>{s.exports=!1},(s,M,o)=>{var u=o(7),z=o(41),W="__core-js_shared__",O=u[W]||z(W,{});s.exports=O},(s,M,o)=>{var u=o(7),z=Object.defineProperty;s.exports=function(W,O){try{z(u,W,{value:O,configurable:!0,writable:!0})}catch{u[W]=O}return O}},(s,M,o)=>{var u=o(17),z=o(43),W=u({}.hasOwnProperty);s.exports=Object.hasOwn||function(O,N){return W(z(O),N)}},(s,M,o)=>{var u=o(19),z=Object;s.exports=function(W){return z(u(W))}},(s,M,o)=>{var u=o(17),z=0,W=Math.random(),O=u(1 .toString);s.exports=function(N){return"Symbol("+(N===void 0?"":N)+")_"+O(++z+W,36)}},(s,M,o)=>{var u=o(9),z=o(10),W=o(46);s.exports=!u&&!z(function(){return Object.defineProperty(W("div"),"a",{get:function(){return 7}}).a!=7})},(s,M,o)=>{var u=o(7),z=o(23),W=u.document,O=z(W)&&z(W.createElement);s.exports=function(N){return O?W.createElement(N):{}}},(s,M,o)=>{var u=o(9),z=o(48),W=o(14);s.exports=u?function(O,N,X){return z.f(O,N,W(1,X))}:function(O,N,X){return O[N]=X,O}},(s,M,o)=>{var u=o(9),z=o(45),W=o(49),O=o(50),N=o(21),X=TypeError,y=Object.defineProperty,G=Object.getOwnPropertyDescriptor,V="enumerable",g="configurable",R="writable";M.f=u?W?function(S,C,F){if(O(S),C=N(C),O(F),typeof S=="function"&&C==="prototype"&&"value"in F&&R in F&&!F[R]){var K=G(S,C);K&&K[R]&&(S[C]=F.value,F={configurable:g in F?F[g]:K[g],enumerable:V in F?F[V]:K[V],writable:!1})}return y(S,C,F)}:y:function(S,C,F){if(O(S),C=N(C),O(F),z)try{return y(S,C,F)}catch{}if("get"in F||"set"in F)throw X("Accessors not supported");return"value"in F&&(S[C]=F.value),S}},(s,M,o)=>{var u=o(9),z=o(10);s.exports=u&&z(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},(s,M,o)=>{var u=o(23),z=String,W=TypeError;s.exports=function(O){if(u(O))return O;throw W(z(O)+" is not an object")}},(s,M,o)=>{var u=o(24),z=o(48),W=o(52),O=o(41);s.exports=function(N,X,y,G){G||(G={});var V=G.enumerable,g=G.name!==void 0?G.name:X;if(u(y)&&W(y,g,G),G.global)V?N[X]=y:O(X,y);else{try{G.unsafe?N[X]&&(V=!0):delete N[X]}catch{}V?N[X]=y:z.f(N,X,{value:y,enumerable:!1,configurable:!G.nonConfigurable,writable:!G.nonWritable})}return N}},(s,M,o)=>{var u=o(17),z=o(10),W=o(24),O=o(42),N=o(9),X=o(53).CONFIGURABLE,y=o(54),G=o(55),V=G.enforce,g=G.get,R=String,S=Object.defineProperty,C=u("".slice),F=u("".replace),K=u([].join),j=N&&!z(function(){return S(function(){},"length",{value:8}).length!==8}),U=String(String).split("String"),E=s.exports=function(D,v,q){C(R(v),0,7)==="Symbol("&&(v="["+F(R(v),/^Symbol\(([^)]*)\)/,"$1")+"]"),q&&q.getter&&(v="get "+v),q&&q.setter&&(v="set "+v),(!O(D,"name")||X&&D.name!==v)&&(N?S(D,"name",{value:v,configurable:!0}):D.name=v),j&&q&&O(q,"arity")&&D.length!==q.arity&&S(D,"length",{value:q.arity});try{q&&O(q,"constructor")&&q.constructor?N&&S(D,"prototype",{writable:!1}):D.prototype&&(D.prototype=void 0)}catch{}var i0=V(D);return O(i0,"source")||(i0.source=K(U,typeof v=="string"?v:"")),D};Function.prototype.toString=E(function(){return W(this)&&g(this).source||y(this)},"toString")},(s,M,o)=>{var u=o(9),z=o(42),W=Function.prototype,O=u&&Object.getOwnPropertyDescriptor,N=z(W,"name"),X=N&&(function(){}).name==="something",y=N&&(!u||u&&O(W,"name").configurable);s.exports={EXISTS:N,PROPER:X,CONFIGURABLE:y}},(s,M,o)=>{var u=o(17),z=o(24),W=o(40),O=u(Function.toString);z(W.inspectSource)||(W.inspectSource=function(N){return O(N)}),s.exports=W.inspectSource},(s,M,o)=>{var u,z,W,O=o(56),N=o(7),X=o(23),y=o(47),G=o(42),V=o(40),g=o(57),R=o(58),S="Object already initialized",C=N.TypeError,F=N.WeakMap;if(O||V.state){var K=V.state||(V.state=new F);K.get=K.get,K.has=K.has,K.set=K.set,u=function(U,E){if(K.has(U))throw C(S);return E.facade=U,K.set(U,E),E},z=function(U){return K.get(U)||{}},W=function(U){return K.has(U)}}else{var j=g("state");R[j]=!0,u=function(U,E){if(G(U,j))throw C(S);return E.facade=U,y(U,j,E),E},z=function(U){return G(U,j)?U[j]:{}},W=function(U){return G(U,j)}}s.exports={set:u,get:z,has:W,enforce:function(U){return W(U)?z(U):u(U,{})},getterFor:function(U){return function(E){var D;if(!X(E)||(D=z(E)).type!==U)throw C("Incompatible receiver, "+U+" required");return D}}}},(s,M,o)=>{var u=o(7),z=o(24),W=u.WeakMap;s.exports=z(W)&&/native code/.test(String(W))},(s,M,o)=>{var u=o(38),z=o(44),W=u("keys");s.exports=function(O){return W[O]||(W[O]=z(O))}},s=>{s.exports={}},(s,M,o)=>{var u=o(42),z=o(60),W=o(8),O=o(48);s.exports=function(N,X,y){for(var G=z(X),V=O.f,g=W.f,R=0;R<G.length;R++){var S=G[R];u(N,S)||y&&u(y,S)||V(N,S,g(X,S))}}},(s,M,o)=>{var u=o(27),z=o(17),W=o(61),O=o(70),N=o(50),X=z([].concat);s.exports=u("Reflect","ownKeys")||function(y){var G=W.f(N(y)),V=O.f;return V?X(G,V(y)):G}},(s,M,o)=>{var u=o(62),z=o(69).concat("length","prototype");M.f=Object.getOwnPropertyNames||function(W){return u(W,z)}},(s,M,o)=>{var u=o(17),z=o(42),W=o(15),O=o(63).indexOf,N=o(58),X=u([].push);s.exports=function(y,G){var V,g=W(y),R=0,S=[];for(V in g)!z(N,V)&&z(g,V)&&X(S,V);for(;G.length>R;)z(g,V=G[R++])&&(~O(S,V)||X(S,V));return S}},(s,M,o)=>{var u=o(15),z=o(64),W=o(67),O=function(N){return function(X,y,G){var V,g=u(X),R=W(g),S=z(G,R);if(N&&y!=y){for(;R>S;)if((V=g[S++])!=V)return!0}else for(;R>S;S++)if((N||S in g)&&g[S]===y)return N||S||0;return!N&&-1}};s.exports={includes:O(!0),indexOf:O(!1)}},(s,M,o)=>{var u=o(65),z=Math.max,W=Math.min;s.exports=function(O,N){var X=u(O);return X<0?z(X+N,0):W(X,N)}},(s,M,o)=>{var u=o(66);s.exports=function(z){var W=+z;return W!=W||W===0?0:u(W)}},s=>{var M=Math.ceil,o=Math.floor;s.exports=Math.trunc||function(u){var z=+u;return(z>0?o:M)(z)}},(s,M,o)=>{var u=o(68);s.exports=function(z){return u(z.length)}},(s,M,o)=>{var u=o(65),z=Math.min;s.exports=function(W){return W>0?z(u(W),9007199254740991):0}},s=>{s.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(s,M)=>{M.f=Object.getOwnPropertySymbols},(s,M,o)=>{var u=o(10),z=o(24),W=/#|\.prototype\./,O=function(V,g){var R=X[N(V)];return R==G||R!=y&&(z(g)?u(g):!!g)},N=O.normalize=function(V){return String(V).replace(W,".").toLowerCase()},X=O.data={},y=O.NATIVE="N",G=O.POLYFILL="P";s.exports=O},(s,M,o)=>{var u=o(37),z=o(73),W=o(48).f,O=u("unscopables"),N=Array.prototype;N[O]==null&&W(N,O,{configurable:!0,value:z(null)}),s.exports=function(X){N[O][X]=!0}},(s,M,o)=>{var u,z=o(50),W=o(74),O=o(69),N=o(58),X=o(76),y=o(46),G=o(57),V="prototype",g="script",R=G("IE_PROTO"),S=function(){},C=function(j){return"<"+g+">"+j+"</"+g+">"},F=function(j){j.write(C("")),j.close();var U=j.parentWindow.Object;return j=null,U},K=function(){try{u=new ActiveXObject("htmlfile")}catch{}K=typeof document<"u"?document.domain&&u?F(u):function(){var U,E=y("iframe"),D="java"+g+":";return E.style.display="none",X.appendChild(E),E.src=String(D),(U=E.contentWindow.document).open(),U.write(C("document.F=Object")),U.close(),U.F}():F(u);for(var j=O.length;j--;)delete K[V][O[j]];return K()};N[R]=!0,s.exports=Object.create||function(j,U){var E;return j!==null?(S[V]=z(j),E=new S,S[V]=null,E[R]=j):E=K(),U===void 0?E:W.f(E,U)}},(s,M,o)=>{var u=o(9),z=o(49),W=o(48),O=o(50),N=o(15),X=o(75);M.f=u&&!z?Object.defineProperties:function(y,G){O(y);for(var V,g=N(G),R=X(G),S=R.length,C=0;S>C;)W.f(y,V=R[C++],g[V]);return y}},(s,M,o)=>{var u=o(62),z=o(69);s.exports=Object.keys||function(W){return u(W,z)}},(s,M,o)=>{var u=o(27);s.exports=u("document","documentElement")},(s,M,o)=>{var u=o(7),z=o(17);s.exports=function(W,O){return z(u[W].prototype[O])}},(s,M,o)=>{o(79)},(s,M,o)=>{var u=o(80),z=o(67),W=o(65),O=u.aTypedArray;(0,u.exportTypedArrayMethod)("at",function(N){var X=O(this),y=z(X),G=W(N),V=G>=0?G:y+G;return V<0||V>=y?void 0:X[V]})},(s,M,o)=>{var u,z,W,O=o(81),N=o(9),X=o(7),y=o(24),G=o(23),V=o(42),g=o(82),R=o(35),S=o(47),C=o(51),F=o(84),K=o(28),j=o(85),U=o(87),E=o(37),D=o(44),v=o(55),q=v.enforce,i0=v.get,t0=X.Int8Array,P=t0&&t0.prototype,c0=X.Uint8ClampedArray,s0=c0&&c0.prototype,W0=t0&&j(t0),M0=P&&j(P),X0=Object.prototype,B=X.TypeError,Q=E("toStringTag"),$=D("TYPED_ARRAY_TAG"),l0="TypedArrayConstructor",_=O&&!!U&&g(X.opera)!=="Opera",H=!1,d0={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},p0={BigInt64Array:8,BigUint64Array:8},m0=function(O0){var h0=j(O0);if(G(h0)){var G0=i0(h0);return G0&&V(G0,l0)?G0[l0]:m0(h0)}},r0=function(O0){if(!G(O0))return!1;var h0=g(O0);return V(d0,h0)||V(p0,h0)};for(u in d0)(W=(z=X[u])&&z.prototype)?q(W)[l0]=z:_=!1;for(u in p0)(W=(z=X[u])&&z.prototype)&&(q(W)[l0]=z);if((!_||!y(W0)||W0===Function.prototype)&&(W0=function(){throw B("Incorrect invocation")},_))for(u in d0)X[u]&&U(X[u],W0);if((!_||!M0||M0===X0)&&(M0=W0.prototype,_))for(u in d0)X[u]&&U(X[u].prototype,M0);if(_&&j(s0)!==M0&&U(s0,M0),N&&!V(M0,Q)){H=!0,F(M0,Q,{configurable:!0,get:function(){return G(this)?this[$]:void 0}});for(u in d0)X[u]&&S(X[u],$,u)}s.exports={NATIVE_ARRAY_BUFFER_VIEWS:_,TYPED_ARRAY_TAG:H&&$,aTypedArray:function(O0){if(r0(O0))return O0;throw B("Target is not a typed array")},aTypedArrayConstructor:function(O0){if(y(O0)&&(!U||K(W0,O0)))return O0;throw B(R(O0)+" is not a typed array constructor")},exportTypedArrayMethod:function(O0,h0,G0,z0){if(N){if(G0)for(var g0 in d0){var f0=X[g0];if(f0&&V(f0.prototype,O0))try{delete f0.prototype[O0]}catch{try{f0.prototype[O0]=h0}catch{}}}M0[O0]&&!G0||C(M0,O0,G0?h0:_&&P[O0]||h0,z0)}},exportTypedArrayStaticMethod:function(O0,h0,G0){var z0,g0;if(N){if(U){if(G0){for(z0 in d0)if((g0=X[z0])&&V(g0,O0))try{delete g0[O0]}catch{}}if(W0[O0]&&!G0)return;try{return C(W0,O0,G0?h0:_&&W0[O0]||h0)}catch{}}for(z0 in d0)!(g0=X[z0])||g0[O0]&&!G0||C(g0,O0,h0)}},getTypedArrayConstructor:m0,isView:function(O0){if(!G(O0))return!1;var h0=g(O0);return h0==="DataView"||V(d0,h0)||V(p0,h0)},isTypedArray:r0,TypedArray:W0,TypedArrayPrototype:M0}},s=>{s.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"},(s,M,o)=>{var u=o(83),z=o(24),W=o(18),O=o(37)("toStringTag"),N=Object,X=W(function(){return arguments}())=="Arguments";s.exports=u?W:function(y){var G,V,g;return y===void 0?"Undefined":y===null?"Null":typeof(V=function(R,S){try{return R[S]}catch{}}(G=N(y),O))=="string"?V:X?W(G):(g=W(G))=="Object"&&z(G.callee)?"Arguments":g}},(s,M,o)=>{var u={};u[o(37)("toStringTag")]="z",s.exports=String(u)==="[object z]"},(s,M,o)=>{var u=o(52),z=o(48);s.exports=function(W,O,N){return N.get&&u(N.get,O,{getter:!0}),N.set&&u(N.set,O,{setter:!0}),z.f(W,O,N)}},(s,M,o)=>{var u=o(42),z=o(24),W=o(43),O=o(57),N=o(86),X=O("IE_PROTO"),y=Object,G=y.prototype;s.exports=N?y.getPrototypeOf:function(V){var g=W(V);if(u(g,X))return g[X];var R=g.constructor;return z(R)&&g instanceof R?R.prototype:g instanceof y?G:null}},(s,M,o)=>{var u=o(10);s.exports=!u(function(){function z(){}return z.prototype.constructor=null,Object.getPrototypeOf(new z)!==z.prototype})},(s,M,o)=>{var u=o(88),z=o(50),W=o(89);s.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var O,N=!1,X={};try{(O=u(Object.prototype,"__proto__","set"))(X,[]),N=X instanceof Array}catch{}return function(y,G){return z(y),W(G),N?O(y,G):y.__proto__=G,y}}():void 0)},(s,M,o)=>{var u=o(17),z=o(34);s.exports=function(W,O,N){try{return u(z(Object.getOwnPropertyDescriptor(W,O)[N]))}catch{}}},(s,M,o)=>{var u=o(24),z=String,W=TypeError;s.exports=function(O){if(typeof O=="object"||u(O))return O;throw W("Can't set "+z(O)+" as a prototype")}},(s,M,o)=>{o(91),o(98),o(100),o(123),o(125);var u=o(137);s.exports=u.structuredClone},(s,M,o)=>{var u=o(15),z=o(72),W=o(92),O=o(55),N=o(48).f,X=o(93),y=o(97),G=o(39),V=o(9),g="Array Iterator",R=O.set,S=O.getterFor(g);s.exports=X(Array,"Array",function(F,K){R(this,{type:g,target:u(F),index:0,kind:K})},function(){var F=S(this),K=F.target,j=F.kind,U=F.index++;return!K||U>=K.length?(F.target=void 0,y(void 0,!0)):y(j=="keys"?U:j=="values"?K[U]:[U,K[U]],!1)},"values");var C=W.Arguments=W.Array;if(z("keys"),z("values"),z("entries"),!G&&V&&C.name!=="values")try{N(C,"name",{value:"values"})}catch{}},s=>{s.exports={}},(s,M,o)=>{var u=o(6),z=o(11),W=o(39),O=o(53),N=o(24),X=o(94),y=o(85),G=o(87),V=o(96),g=o(47),R=o(51),S=o(37),C=o(92),F=o(95),K=O.PROPER,j=O.CONFIGURABLE,U=F.IteratorPrototype,E=F.BUGGY_SAFARI_ITERATORS,D=S("iterator"),v="keys",q="values",i0="entries",t0=function(){return this};s.exports=function(P,c0,s0,W0,M0,X0,B){X(s0,c0,W0);var Q,$,l0,_=function(h0){if(h0===M0&&r0)return r0;if(!E&&h0 in p0)return p0[h0];switch(h0){case v:return function(){return new s0(this,h0)};case q:return function(){return new s0(this,h0)};case i0:return function(){return new s0(this,h0)}}return function(){return new s0(this)}},H=c0+" Iterator",d0=!1,p0=P.prototype,m0=p0[D]||p0["@@iterator"]||M0&&p0[M0],r0=!E&&m0||_(M0),O0=c0=="Array"&&p0.entries||m0;if(O0&&(Q=y(O0.call(new P)))!==Object.prototype&&Q.next&&(W||y(Q)===U||(G?G(Q,U):N(Q[D])||R(Q,D,t0)),V(Q,H,!0,!0),W&&(C[H]=t0)),K&&M0==q&&m0&&m0.name!==q&&(!W&&j?g(p0,"name",q):(d0=!0,r0=function(){return z(m0,this)})),M0)if($={values:_(q),keys:X0?r0:_(v),entries:_(i0)},B)for(l0 in $)(E||d0||!(l0 in p0))&&R(p0,l0,$[l0]);else u({target:c0,proto:!0,forced:E||d0},$);return W&&!B||p0[D]===r0||R(p0,D,r0,{name:M0}),C[c0]=r0,$}},(s,M,o)=>{var u=o(95).IteratorPrototype,z=o(73),W=o(14),O=o(96),N=o(92),X=function(){return this};s.exports=function(y,G,V,g){var R=G+" Iterator";return y.prototype=z(u,{next:W(+!g,V)}),O(y,R,!1,!0),N[R]=X,y}},(s,M,o)=>{var u,z,W,O=o(10),N=o(24),X=o(23),y=o(73),G=o(85),V=o(51),g=o(37),R=o(39),S=g("iterator"),C=!1;[].keys&&("next"in(W=[].keys())?(z=G(G(W)))!==Object.prototype&&(u=z):C=!0),!X(u)||O(function(){var F={};return u[S].call(F)!==F})?u={}:R&&(u=y(u)),N(u[S])||V(u,S,function(){return this}),s.exports={IteratorPrototype:u,BUGGY_SAFARI_ITERATORS:C}},(s,M,o)=>{var u=o(48).f,z=o(42),W=o(37)("toStringTag");s.exports=function(O,N,X){O&&!X&&(O=O.prototype),O&&!z(O,W)&&u(O,W,{configurable:!0,value:N})}},s=>{s.exports=function(M,o){return{value:M,done:o}}},(s,M,o)=>{var u=o(83),z=o(51),W=o(99);u||z(Object.prototype,"toString",W,{unsafe:!0})},(s,M,o)=>{var u=o(83),z=o(82);s.exports=u?{}.toString:function(){return"[object "+z(this)+"]"}},(s,M,o)=>{o(101)},(s,M,o)=>{o(102)("Map",function(u){return function(){return u(this,arguments.length?arguments[0]:void 0)}},o(120))},(s,M,o)=>{var u=o(6),z=o(7),W=o(17),O=o(71),N=o(51),X=o(103),y=o(110),G=o(117),V=o(24),g=o(20),R=o(23),S=o(10),C=o(118),F=o(96),K=o(119);s.exports=function(j,U,E){var D=j.indexOf("Map")!==-1,v=j.indexOf("Weak")!==-1,q=D?"set":"add",i0=z[j],t0=i0&&i0.prototype,P=i0,c0={},s0=function($){var l0=W(t0[$]);N(t0,$,$=="add"?function(_){return l0(this,_===0?0:_),this}:$=="delete"?function(_){return!(v&&!R(_))&&l0(this,_===0?0:_)}:$=="get"?function(_){return v&&!R(_)?void 0:l0(this,_===0?0:_)}:$=="has"?function(_){return!(v&&!R(_))&&l0(this,_===0?0:_)}:function(_,H){return l0(this,_===0?0:_,H),this})};if(O(j,!V(i0)||!(v||t0.forEach&&!S(function(){new i0().entries().next()}))))P=E.getConstructor(U,j,D,q),X.enable();else if(O(j,!0)){var W0=new P,M0=W0[q](v?{}:-0,1)!=W0,X0=S(function(){W0.has(1)}),B=C(function($){new i0($)}),Q=!v&&S(function(){for(var $=new i0,l0=5;l0--;)$[q](l0,l0);return!$.has(-0)});B||((P=U(function($,l0){G($,t0);var _=K(new i0,$,P);return g(l0)||y(l0,_[q],{that:_,AS_ENTRIES:D}),_})).prototype=t0,t0.constructor=P),(X0||Q)&&(s0("delete"),s0("has"),D&&s0("get")),(Q||M0)&&s0(q),v&&t0.clear&&delete t0.clear}return c0[j]=P,u({global:!0,constructor:!0,forced:P!=i0},c0),F(P,j),v||E.setStrong(P,j,D),P}},(s,M,o)=>{var u=o(6),z=o(17),W=o(58),O=o(23),N=o(42),X=o(48).f,y=o(61),G=o(104),V=o(107),g=o(44),R=o(109),S=!1,C=g("meta"),F=0,K=function(U){X(U,C,{value:{objectID:"O"+F++,weakData:{}}})},j=s.exports={enable:function(){j.enable=function(){},S=!0;var U=y.f,E=z([].splice),D={};D[C]=1,U(D).length&&(y.f=function(v){for(var q=U(v),i0=0,t0=q.length;i0<t0;i0++)if(q[i0]===C){E(q,i0,1);break}return q},u({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:G.f}))},fastKey:function(U,E){if(!O(U))return typeof U=="symbol"?U:(typeof U=="string"?"S":"P")+U;if(!N(U,C)){if(!V(U))return"F";if(!E)return"E";K(U)}return U[C].objectID},getWeakData:function(U,E){if(!N(U,C)){if(!V(U))return!0;if(!E)return!1;K(U)}return U[C].weakData},onFreeze:function(U){return R&&S&&V(U)&&!N(U,C)&&K(U),U}};W[C]=!0},(s,M,o)=>{var u=o(18),z=o(15),W=o(61).f,O=o(105),N=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];s.exports.f=function(X){return N&&u(X)=="Window"?function(y){try{return W(y)}catch{return O(N)}}(X):W(z(X))}},(s,M,o)=>{var u=o(64),z=o(67),W=o(106),O=Array,N=Math.max;s.exports=function(X,y,G){for(var V=z(X),g=u(y,V),R=u(G===void 0?V:G,V),S=O(N(R-g,0)),C=0;g<R;g++,C++)W(S,C,X[g]);return S.length=C,S}},(s,M,o)=>{var u=o(21),z=o(48),W=o(14);s.exports=function(O,N,X){var y=u(N);y in O?z.f(O,y,W(0,X)):O[y]=X}},(s,M,o)=>{var u=o(10),z=o(23),W=o(18),O=o(108),N=Object.isExtensible,X=u(function(){});s.exports=X||O?function(y){return!!z(y)&&(!O||W(y)!="ArrayBuffer")&&(!N||N(y))}:N},(s,M,o)=>{var u=o(10);s.exports=u(function(){if(typeof ArrayBuffer=="function"){var z=new ArrayBuffer(8);Object.isExtensible(z)&&Object.defineProperty(z,"a",{value:8})}})},(s,M,o)=>{var u=o(10);s.exports=!u(function(){return Object.isExtensible(Object.preventExtensions({}))})},(s,M,o)=>{var u=o(111),z=o(11),W=o(50),O=o(35),N=o(113),X=o(67),y=o(28),G=o(114),V=o(115),g=o(116),R=TypeError,S=function(F,K){this.stopped=F,this.result=K},C=S.prototype;s.exports=function(F,K,j){var U,E,D,v,q,i0,t0,P=j&&j.that,c0=!(!j||!j.AS_ENTRIES),s0=!(!j||!j.IS_RECORD),W0=!(!j||!j.IS_ITERATOR),M0=!(!j||!j.INTERRUPTED),X0=u(K,P),B=function($){return U&&g(U,"normal",$),new S(!0,$)},Q=function($){return c0?(W($),M0?X0($[0],$[1],B):X0($[0],$[1])):M0?X0($,B):X0($)};if(s0)U=F.iterator;else if(W0)U=F;else{if(!(E=V(F)))throw R(O(F)+" is not iterable");if(N(E)){for(D=0,v=X(F);v>D;D++)if((q=Q(F[D]))&&y(C,q))return q;return new S(!1)}U=G(F,E)}for(i0=s0?F.next:U.next;!(t0=z(i0,U)).done;){try{q=Q(t0.value)}catch($){g(U,"throw",$)}if(typeof q=="object"&&q&&y(C,q))return q}return new S(!1)}},(s,M,o)=>{var u=o(112),z=o(34),W=o(12),O=u(u.bind);s.exports=function(N,X){return z(N),X===void 0?N:W?O(N,X):function(){return N.apply(X,arguments)}}},(s,M,o)=>{var u=o(18),z=o(17);s.exports=function(W){if(u(W)==="Function")return z(W)}},(s,M,o)=>{var u=o(37),z=o(92),W=u("iterator"),O=Array.prototype;s.exports=function(N){return N!==void 0&&(z.Array===N||O[W]===N)}},(s,M,o)=>{var u=o(11),z=o(34),W=o(50),O=o(35),N=o(115),X=TypeError;s.exports=function(y,G){var V=arguments.length<2?N(y):G;if(z(V))return W(u(V,y));throw X(O(y)+" is not iterable")}},(s,M,o)=>{var u=o(82),z=o(33),W=o(20),O=o(92),N=o(37)("iterator");s.exports=function(X){if(!W(X))return z(X,N)||z(X,"@@iterator")||O[u(X)]}},(s,M,o)=>{var u=o(11),z=o(50),W=o(33);s.exports=function(O,N,X){var y,G;z(O);try{if(!(y=W(O,"return"))){if(N==="throw")throw X;return X}y=u(y,O)}catch(V){G=!0,y=V}if(N==="throw")throw X;if(G)throw y;return z(y),X}},(s,M,o)=>{var u=o(28),z=TypeError;s.exports=function(W,O){if(u(O,W))return W;throw z("Incorrect invocation")}},(s,M,o)=>{var u=o(37)("iterator"),z=!1;try{var W=0,O={next:function(){return{done:!!W++}},return:function(){z=!0}};O[u]=function(){return this},Array.from(O,function(){throw 2})}catch{}s.exports=function(N,X){if(!X&&!z)return!1;var y=!1;try{var G={};G[u]=function(){return{next:function(){return{done:y=!0}}}},N(G)}catch{}return y}},(s,M,o)=>{var u=o(24),z=o(23),W=o(87);s.exports=function(O,N,X){var y,G;return W&&u(y=N.constructor)&&y!==X&&z(G=y.prototype)&&G!==X.prototype&&W(O,G),O}},(s,M,o)=>{var u=o(73),z=o(84),W=o(121),O=o(111),N=o(117),X=o(20),y=o(110),G=o(93),V=o(97),g=o(122),R=o(9),S=o(103).fastKey,C=o(55),F=C.set,K=C.getterFor;s.exports={getConstructor:function(j,U,E,D){var v=j(function(c0,s0){N(c0,q),F(c0,{type:U,index:u(null),first:void 0,last:void 0,size:0}),R||(c0.size=0),X(s0)||y(s0,c0[D],{that:c0,AS_ENTRIES:E})}),q=v.prototype,i0=K(U),t0=function(c0,s0,W0){var M0,X0,B=i0(c0),Q=P(c0,s0);return Q?Q.value=W0:(B.last=Q={index:X0=S(s0,!0),key:s0,value:W0,previous:M0=B.last,next:void 0,removed:!1},B.first||(B.first=Q),M0&&(M0.next=Q),R?B.size++:c0.size++,X0!=="F"&&(B.index[X0]=Q)),c0},P=function(c0,s0){var W0,M0=i0(c0),X0=S(s0);if(X0!=="F")return M0.index[X0];for(W0=M0.first;W0;W0=W0.next)if(W0.key==s0)return W0};return W(q,{clear:function(){for(var c0=i0(this),s0=c0.index,W0=c0.first;W0;)W0.removed=!0,W0.previous&&(W0.previous=W0.previous.next=void 0),delete s0[W0.index],W0=W0.next;c0.first=c0.last=void 0,R?c0.size=0:this.size=0},delete:function(c0){var s0=this,W0=i0(s0),M0=P(s0,c0);if(M0){var X0=M0.next,B=M0.previous;delete W0.index[M0.index],M0.removed=!0,B&&(B.next=X0),X0&&(X0.previous=B),W0.first==M0&&(W0.first=X0),W0.last==M0&&(W0.last=B),R?W0.size--:s0.size--}return!!M0},forEach:function(c0){for(var s0,W0=i0(this),M0=O(c0,arguments.length>1?arguments[1]:void 0);s0=s0?s0.next:W0.first;)for(M0(s0.value,s0.key,this);s0&&s0.removed;)s0=s0.previous},has:function(c0){return!!P(this,c0)}}),W(q,E?{get:function(c0){var s0=P(this,c0);return s0&&s0.value},set:function(c0,s0){return t0(this,c0===0?0:c0,s0)}}:{add:function(c0){return t0(this,c0=c0===0?0:c0,c0)}}),R&&z(q,"size",{configurable:!0,get:function(){return i0(this).size}}),v},setStrong:function(j,U,E){var D=U+" Iterator",v=K(U),q=K(D);G(j,U,function(i0,t0){F(this,{type:D,target:i0,state:v(i0),kind:t0,last:void 0})},function(){for(var i0=q(this),t0=i0.kind,P=i0.last;P&&P.removed;)P=P.previous;return!i0.target||!(i0.last=P=P?P.next:i0.state.first)?(i0.target=void 0,V(void 0,!0)):V(t0=="keys"?P.key:t0=="values"?P.value:[P.key,P.value],!1)},E?"entries":"values",!E,!0),g(U)}}},(s,M,o)=>{var u=o(51);s.exports=function(z,W,O){for(var N in W)u(z,N,W[N],O);return z}},(s,M,o)=>{var u=o(27),z=o(84),W=o(37),O=o(9),N=W("species");s.exports=function(X){var y=u(X);O&&y&&!y[N]&&z(y,N,{configurable:!0,get:function(){return this}})}},(s,M,o)=>{o(124)},(s,M,o)=>{o(102)("Set",function(u){return function(){return u(this,arguments.length?arguments[0]:void 0)}},o(120))},(s,M,o)=>{var u,z=o(39),W=o(6),O=o(7),N=o(27),X=o(17),y=o(10),G=o(44),V=o(24),g=o(126),R=o(20),S=o(23),C=o(26),F=o(110),K=o(50),j=o(82),U=o(42),E=o(106),D=o(47),v=o(67),q=o(127),i0=o(128),t0=o(130),P=o(131),c0=o(132),s0=o(133),W0=O.Object,M0=O.Array,X0=O.Date,B=O.Error,Q=O.EvalError,$=O.RangeError,l0=O.ReferenceError,_=O.SyntaxError,H=O.TypeError,d0=O.URIError,p0=O.PerformanceMark,m0=O.WebAssembly,r0=m0&&m0.CompileError||B,O0=m0&&m0.LinkError||B,h0=m0&&m0.RuntimeError||B,G0=N("DOMException"),z0=t0.Map,g0=t0.has,f0=t0.get,S0=t0.set,J=P.Set,e0=P.add,a0=N("Object","keys"),o0=X([].push),Z0=X((!0).valueOf),T0=X(1 .valueOf),I0=X("".valueOf),A0=X(X0.prototype.getTime),F0=G("structuredClone"),J0="DataCloneError",K0="Transferring",E0=function(x0){return!y(function(){var o1=new O.Set([7]),Z1=x0(o1),m1=x0(W0(7));return Z1==o1||!Z1.has(7)||typeof m1!="object"||m1!=7})&&x0},H0=function(x0,o1){return!y(function(){var Z1=new o1,m1=x0({a:Z1,b:Z1});return!(m1&&m1.a===m1.b&&m1.a instanceof o1&&m1.a.stack===Z1.stack)})},q0=O.structuredClone,a1=z||!H0(q0,B)||!H0(q0,G0)||(u=q0,!!y(function(){var x0=u(new O.AggregateError([1],F0,{cause:3}));return x0.name!="AggregateError"||x0.errors[0]!=1||x0.message!=F0||x0.cause!=3})),Y0=!q0&&E0(function(x0){return new p0(F0,{detail:x0}).detail}),U0=E0(q0)||Y0,i1=function(x0){throw new G0("Uncloneable type: "+x0,J0)},b1=function(x0,o1){throw new G0((o1||"Cloning")+" of "+x0+" cannot be properly polyfilled in this engine",J0)},U1=function(x0,o1){return U0||b1(o1),U0(x0)},p1=function(x0,o1){if(C(x0)&&i1("Symbol"),!S(x0))return x0;if(o1){if(g0(o1,x0))return f0(o1,x0)}else o1=new z0;var Z1,m1,t1,Ul,w1,r1,B1,R0,j0,Q0,e1,P0=j(x0),_0=!1;switch(P0){case"Array":t1=M0(v(x0)),_0=!0;break;case"Object":t1={},_0=!0;break;case"Map":t1=new z0,_0=!0;break;case"Set":t1=new J,_0=!0;break;case"RegExp":t1=new RegExp(x0.source,i0(x0));break;case"Error":switch(m1=x0.name){case"AggregateError":t1=N("AggregateError")([]);break;case"EvalError":t1=Q();break;case"RangeError":t1=$();break;case"ReferenceError":t1=l0();break;case"SyntaxError":t1=_();break;case"TypeError":t1=H();break;case"URIError":t1=d0();break;case"CompileError":t1=r0();break;case"LinkError":t1=O0();break;case"RuntimeError":t1=h0();break;default:t1=B()}_0=!0;break;case"DOMException":t1=new G0(x0.message,x0.name),_0=!0;break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":Z1=O[P0],S(Z1)||b1(P0),t1=new Z1(p1(x0.buffer,o1),x0.byteOffset,P0==="DataView"?x0.byteLength:x0.length);break;case"DOMQuad":try{t1=new DOMQuad(p1(x0.p1,o1),p1(x0.p2,o1),p1(x0.p3,o1),p1(x0.p4,o1))}catch{t1=U1(x0,P0)}break;case"File":if(U0)try{t1=U0(x0),j(t1)!==P0&&(t1=void 0)}catch{}if(!t1)try{t1=new File([x0],x0.name,x0)}catch{}t1||b1(P0);break;case"FileList":if(Ul=function(){var n1;try{n1=new O.DataTransfer}catch{try{n1=new O.ClipboardEvent("").clipboardData}catch{}}return n1&&n1.items&&n1.files?n1:null}()){for(w1=0,r1=v(x0);w1<r1;w1++)Ul.items.add(p1(x0[w1],o1));t1=Ul.files}else t1=U1(x0,P0);break;case"ImageData":try{t1=new ImageData(p1(x0.data,o1),x0.width,x0.height,{colorSpace:x0.colorSpace})}catch{t1=U1(x0,P0)}break;default:if(U0)t1=U0(x0);else switch(P0){case"BigInt":t1=W0(x0.valueOf());break;case"Boolean":t1=W0(Z0(x0));break;case"Number":t1=W0(T0(x0));break;case"String":t1=W0(I0(x0));break;case"Date":t1=new X0(A0(x0));break;case"ArrayBuffer":(Z1=O.DataView)||typeof x0.slice=="function"||b1(P0);try{if(typeof x0.slice!="function"||x0.resizable)for(r1=x0.byteLength,e1=("maxByteLength"in x0)?{maxByteLength:x0.maxByteLength}:void 0,t1=new ArrayBuffer(r1,e1),j0=new Z1(x0),Q0=new Z1(t1),w1=0;w1<r1;w1++)Q0.setUint8(w1,j0.getUint8(w1));else t1=x0.slice(0)}catch{throw new G0("ArrayBuffer is detached",J0)}break;case"SharedArrayBuffer":t1=x0;break;case"Blob":try{t1=x0.slice(0,x0.size,x0.type)}catch{b1(P0)}break;case"DOMPoint":case"DOMPointReadOnly":Z1=O[P0];try{t1=Z1.fromPoint?Z1.fromPoint(x0):new Z1(x0.x,x0.y,x0.z,x0.w)}catch{b1(P0)}break;case"DOMRect":case"DOMRectReadOnly":Z1=O[P0];try{t1=Z1.fromRect?Z1.fromRect(x0):new Z1(x0.x,x0.y,x0.width,x0.height)}catch{b1(P0)}break;case"DOMMatrix":case"DOMMatrixReadOnly":Z1=O[P0];try{t1=Z1.fromMatrix?Z1.fromMatrix(x0):new Z1(x0)}catch{b1(P0)}break;case"AudioData":case"VideoFrame":V(x0.clone)||b1(P0);try{t1=x0.clone()}catch{i1(P0)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":b1(P0);default:i1(P0)}}if(S0(o1,x0,t1),_0)switch(P0){case"Array":case"Object":for(B1=a0(x0),w1=0,r1=v(B1);w1<r1;w1++)R0=B1[w1],E(t1,R0,p1(x0[R0],o1));break;case"Map":x0.forEach(function(n1,O1){S0(t1,p1(O1,o1),p1(n1,o1))});break;case"Set":x0.forEach(function(n1){e0(t1,p1(n1,o1))});break;case"Error":D(t1,"message",p1(x0.message,o1)),U(x0,"cause")&&D(t1,"cause",p1(x0.cause,o1)),m1=="AggregateError"&&(t1.errors=p1(x0.errors,o1));case"DOMException":c0&&D(t1,"stack",p1(x0.stack,o1))}return t1};W({global:!0,enumerable:!0,sham:!s0,forced:a1},{structuredClone:function(x0){var o1,Z1=q(arguments.length,1)>1&&!R(arguments[1])?K(arguments[1]):void 0,m1=Z1?Z1.transfer:void 0;return m1!==void 0&&function(t1,Ul){if(!S(t1))throw H("Transfer option cannot be converted to a sequence");var w1=[];F(t1,function(n1){o0(w1,K(n1))});var r1,B1,R0,j0,Q0,e1,P0=0,_0=v(w1);if(s0)for(j0=q0(w1,{transfer:w1});P0<_0;)S0(Ul,w1[P0],j0[P0++]);else for(;P0<_0;){if(r1=w1[P0++],g0(Ul,r1))throw new G0("Duplicate transferable",J0);switch(B1=j(r1)){case"ImageBitmap":R0=O.OffscreenCanvas,g(R0)||b1(B1,K0);try{(e1=new R0(r1.width,r1.height)).getContext("bitmaprenderer").transferFromImageBitmap(r1),Q0=e1.transferToImageBitmap()}catch{}break;case"AudioData":case"VideoFrame":V(r1.clone)&&V(r1.close)||b1(B1,K0);try{Q0=r1.clone(),r1.close()}catch{}break;case"ArrayBuffer":V(r1.transfer)||b1(B1,K0),Q0=r1.transfer();break;case"MediaSourceHandle":case"MessagePort":case"OffscreenCanvas":case"ReadableStream":case"TransformStream":case"WritableStream":b1(B1,K0)}if(Q0===void 0)throw new G0("This object cannot be transferred: "+B1,J0);S0(Ul,r1,Q0)}}(m1,o1=new z0),p1(x0,o1)}})},(s,M,o)=>{var u=o(17),z=o(10),W=o(24),O=o(82),N=o(27),X=o(54),y=function(){},G=[],V=N("Reflect","construct"),g=/^\s*(?:class|function)\b/,R=u(g.exec),S=!g.exec(y),C=function(K){if(!W(K))return!1;try{return V(y,G,K),!0}catch{return!1}},F=function(K){if(!W(K))return!1;switch(O(K)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return S||!!R(g,X(K))}catch{return!0}};F.sham=!0,s.exports=!V||z(function(){var K;return C(C.call)||!C(Object)||!C(function(){K=!0})||K})?F:C},s=>{var M=TypeError;s.exports=function(o,u){if(o<u)throw M("Not enough arguments");return o}},(s,M,o)=>{var u=o(11),z=o(42),W=o(28),O=o(129),N=RegExp.prototype;s.exports=function(X){var y=X.flags;return y!==void 0||"flags"in N||z(X,"flags")||!W(N,X)?y:u(O,X)}},(s,M,o)=>{var u=o(50);s.exports=function(){var z=u(this),W="";return z.hasIndices&&(W+="d"),z.global&&(W+="g"),z.ignoreCase&&(W+="i"),z.multiline&&(W+="m"),z.dotAll&&(W+="s"),z.unicode&&(W+="u"),z.unicodeSets&&(W+="v"),z.sticky&&(W+="y"),W}},(s,M,o)=>{var u=o(17),z=Map.prototype;s.exports={Map,set:u(z.set),get:u(z.get),has:u(z.has),remove:u(z.delete),proto:z}},(s,M,o)=>{var u=o(17),z=Set.prototype;s.exports={Set,add:u(z.add),has:u(z.has),remove:u(z.delete),proto:z}},(s,M,o)=>{var u=o(10),z=o(14);s.exports=!u(function(){var W=Error("a");return"stack"in W?(Object.defineProperty(W,"stack",z(1,7)),W.stack!==7):!0})},(s,M,o)=>{var u=o(7),z=o(10),W=o(31),O=o(134),N=o(135),X=o(136),y=u.structuredClone;s.exports=!!y&&!z(function(){if(N&&W>92||X&&W>94||O&&W>97)return!1;var G=new ArrayBuffer(8),V=y(G,{transfer:[G]});return G.byteLength!=0||V.byteLength!=8})},(s,M,o)=>{var u=o(135),z=o(136);s.exports=!u&&!z&&typeof window=="object"&&typeof document=="object"},s=>{s.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},(s,M,o)=>{var u=o(18);s.exports=typeof process<"u"&&u(process)=="process"},(s,M,o)=>{var u=o(7);s.exports=u},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{var k,t,e,a,re,w,pe,p,h,l,c,b,L,m,Ae,x,I,_e,i,A;Object.defineProperty(exports,"__esModule",{value:!0}),exports.build=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,exports.getDocument=getDocument,exports.version=void 0;var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(139),_display_utils=__w_pdfjs_require__(142),_font_loader=__w_pdfjs_require__(145),_canvas=__w_pdfjs_require__(146),_worker_options=__w_pdfjs_require__(149),_is_node=__w_pdfjs_require__(3),_message_handler=__w_pdfjs_require__(150),_metadata=__w_pdfjs_require__(151),_optional_content_config=__w_pdfjs_require__(152),_transport_stream=__w_pdfjs_require__(153),_xfa_text=__w_pdfjs_require__(154);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3;let DefaultCanvasFactory=_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;let DefaultCMapReaderFactory=_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;let DefaultFilterFactory=_display_utils.DOMFilterFactory;exports.DefaultFilterFactory=DefaultFilterFactory;let DefaultStandardFontDataFactory=_display_utils.DOMStandardFontDataFactory,createPDFNetworkStream;if(exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory,_is_node.isNodeJS){const{NodeCanvasFactory:s,NodeCMapReaderFactory:M,NodeFilterFactory:o,NodeStandardFontDataFactory:u}=__w_pdfjs_require__(155);exports.DefaultCanvasFactory=DefaultCanvasFactory=s,exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory=M,exports.DefaultFilterFactory=DefaultFilterFactory=o,exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory=u}if(_is_node.isNodeJS){const{PDFNodeStream:s}=__w_pdfjs_require__(156);createPDFNetworkStream=M=>new s(M)}else{const{PDFNetworkStream:s}=__w_pdfjs_require__(159),{PDFFetchStream:M}=__w_pdfjs_require__(160);createPDFNetworkStream=o=>(0,_display_utils.isValidFetchUrl)(o.url)?new M(o):new s(o)}function getDocument(s){if(typeof s=="string"||s instanceof URL?s={url:s}:(0,_util.isArrayBuffer)(s)&&(s={data:s}),typeof s!="object")throw new Error("Invalid parameter in getDocument, need parameter object.");if(!s.url&&!s.data&&!s.range)throw new Error("Invalid parameter object: need either .data, .range or .url");const M=new PDFDocumentLoadingTask,{docId:o}=M,u=s.url?getUrlProp(s.url):null,z=s.data?getDataProp(s.data):null,W=s.httpHeaders||null,O=s.withCredentials===!0,N=s.password??null,X=s.range instanceof PDFDataRangeTransport?s.range:null,y=Number.isInteger(s.rangeChunkSize)&&s.rangeChunkSize>0?s.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let G=s.worker instanceof PDFWorker?s.worker:null;const V=s.verbosity,g=typeof s.docBaseUrl!="string"||(0,_display_utils.isDataScheme)(s.docBaseUrl)?null:s.docBaseUrl,R=typeof s.cMapUrl=="string"?s.cMapUrl:null,S=s.cMapPacked!==!1,C=s.CMapReaderFactory||DefaultCMapReaderFactory,F=typeof s.standardFontDataUrl=="string"?s.standardFontDataUrl:null,K=s.StandardFontDataFactory||DefaultStandardFontDataFactory,j=s.stopAtErrors!==!0,U=Number.isInteger(s.maxImageSize)&&s.maxImageSize>-1?s.maxImageSize:-1,E=s.isEvalSupported!==!1,D=typeof s.isOffscreenCanvasSupported=="boolean"?s.isOffscreenCanvasSupported:!_is_node.isNodeJS,v=Number.isInteger(s.canvasMaxAreaInBytes)?s.canvasMaxAreaInBytes:-1,q=typeof s.disableFontFace=="boolean"?s.disableFontFace:_is_node.isNodeJS,i0=s.fontExtraProperties===!0,t0=s.enableXfa===!0,P=s.ownerDocument||globalThis.document,c0=s.disableRange===!0,s0=s.disableStream===!0,W0=s.disableAutoFetch===!0,M0=s.pdfBug===!0,X0=X?X.length:s.length??NaN,B=typeof s.useSystemFonts=="boolean"?s.useSystemFonts:!_is_node.isNodeJS&&!q,Q=typeof s.useWorkerFetch=="boolean"?s.useWorkerFetch:C===_display_utils.DOMCMapReaderFactory&&K===_display_utils.DOMStandardFontDataFactory&&(0,_display_utils.isValidFetchUrl)(R,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(F,document.baseURI),$=s.canvasFactory||new DefaultCanvasFactory({ownerDocument:P}),l0=s.filterFactory||new DefaultFilterFactory({docId:o,ownerDocument:P});(0,_util.setVerbosityLevel)(V);const _={canvasFactory:$,filterFactory:l0};if(Q||(_.cMapReaderFactory=new C({baseUrl:R,isCompressed:S}),_.standardFontDataFactory=new K({baseUrl:F})),!G){const p0={verbosity:V,port:_worker_options.GlobalWorkerOptions.workerPort};G=p0.port?PDFWorker.fromPort(p0):new PDFWorker(p0),M._worker=G}const H={docId:o,apiVersion:"3.7.107",data:z,password:N,disableAutoFetch:W0,rangeChunkSize:y,length:X0,docBaseUrl:g,enableXfa:t0,evaluatorOptions:{maxImageSize:U,disableFontFace:q,ignoreErrors:j,isEvalSupported:E,isOffscreenCanvasSupported:D,canvasMaxAreaInBytes:v,fontExtraProperties:i0,useSystemFonts:B,cMapUrl:Q?R:null,standardFontDataUrl:Q?F:null}},d0={ignoreErrors:j,isEvalSupported:E,disableFontFace:q,fontExtraProperties:i0,enableXfa:t0,ownerDocument:P,disableAutoFetch:W0,pdfBug:M0,styleElement:null};return G.promise.then(function(){if(M.destroyed)throw new Error("Loading aborted");const p0=_fetchDocument(G,H),m0=new Promise(function(r0){let O0;X?O0=new _transport_stream.PDFDataTransportStream({length:X0,initialData:X.initialData,progressiveDone:X.progressiveDone,contentDispositionFilename:X.contentDispositionFilename,disableRange:c0,disableStream:s0},X):z||(O0=createPDFNetworkStream({url:u,length:X0,httpHeaders:W,withCredentials:O,rangeChunkSize:y,disableRange:c0,disableStream:s0})),r0(O0)});return Promise.all([p0,m0]).then(function(r0){let[O0,h0]=r0;if(M.destroyed)throw new Error("Loading aborted");const G0=new _message_handler.MessageHandler(o,O0,G.port),z0=new WorkerTransport(G0,M,h0,d0,_);M._transport=z0,G0.send("Ready",null)})}).catch(M._capability.reject),M}async function _fetchDocument(s,M){if(s.destroyed)throw new Error("Worker was destroyed");const o=await s.messageHandler.sendWithPromise("GetDocRequest",M,M.data?[M.data.buffer]:null);if(s.destroyed)throw new Error("Worker was destroyed");return o}function getUrlProp(s){if(s instanceof URL)return s.href;try{return new URL(s,window.location).href}catch{if(_is_node.isNodeJS&&typeof s=="string")return s}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(s){if(_is_node.isNodeJS&&typeof Buffer<"u"&&s instanceof Buffer)return(0,_display_utils.deprecated)("Please provide binary data as `Uint8Array`, rather than `Buffer`."),new Uint8Array(s);if(s instanceof Uint8Array&&s.byteLength===s.buffer.byteLength)return s;if(typeof s=="string")return(0,_util.stringToBytes)(s);if(typeof s=="object"&&!isNaN(s==null?void 0:s.length)||(0,_util.isArrayBuffer)(s))return new Uint8Array(s);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}const d=class{constructor(){this._capability=new _util.PromiseCapability,this._transport=null,this._worker=null,this.docId="d"+ue(d,k)._++,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){var s;this.destroyed=!0,await((s=this._transport)===null||s===void 0?void 0:s.destroy()),this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}};let PDFDocumentLoadingTask=d;k=new WeakMap,et(PDFDocumentLoadingTask,k,0),exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;class PDFDataRangeTransport{constructor(M,o){let u=arguments.length>2&&arguments[2]!==void 0&&arguments[2],z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;this.length=M,this.initialData=o,this.progressiveDone=u,this.contentDispositionFilename=z,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=new _util.PromiseCapability}addRangeListener(M){this._rangeListeners.push(M)}addProgressListener(M){this._progressListeners.push(M)}addProgressiveReadListener(M){this._progressiveReadListeners.push(M)}addProgressiveDoneListener(M){this._progressiveDoneListeners.push(M)}onDataRange(M,o){for(const u of this._rangeListeners)u(M,o)}onDataProgress(M,o){this._readyCapability.promise.then(()=>{for(const u of this._progressListeners)u(M,o)})}onDataProgressiveRead(M){this._readyCapability.promise.then(()=>{for(const o of this._progressiveReadListeners)o(M)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const M of this._progressiveDoneListeners)M()})}transportReady(){this._readyCapability.resolve()}requestDataRange(M,o){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(M,o){this._pdfInfo=M,this._transport=o}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(M){return this._transport.getPage(M)}getPageIndex(M){return this._transport.getPageIndex(M)}getDestinations(){return this._transport.getDestinations()}getDestination(M){return this._transport.getDestination(M)}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()}getJavaScript(){return this._transport.getJavaScript()}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 M=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return this._transport.startCleanup(M||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(M,o,u){et(this,a),et(this,w),et(this,t,null),et(this,e,!1);let z=arguments.length>3&&arguments[3]!==void 0&&arguments[3];this._pageIndex=M,this._pageInfo=o,this._transport=u,this._stats=z?new _display_utils.StatTimer:null,this._pdfBug=z,this.commonObjs=u.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:M,rotation:o=this.rotate,offsetX:u=0,offsetY:z=0,dontFlip:W=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new _display_utils.PageViewport({viewBox:this.view,scale:M,rotation:o,offsetX:u,offsetY:z,dontFlip:W})}getAnnotations(){let{intent:M="display"}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const o=this._transport.getRenderingIntent(M);return this._transport.getAnnotations(this._pageIndex,o.renderingIntent)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var M;return((M=this._transport._htmlForXfa)===null||M===void 0?void 0:M.children[this._pageIndex])||null}render(M){var o,u;let{canvasContext:z,viewport:W,intent:O="display",annotationMode:N=_util.AnnotationMode.ENABLE,transform:X=null,background:y=null,optionalContentConfigPromise:G=null,annotationCanvasMap:V=null,pageColors:g=null,printAnnotationStorage:R=null}=M;if((o=arguments[0])!==null&&o!==void 0&&o.canvasFactory)throw new Error("render no longer accepts the `canvasFactory`-option, please pass it to the `getDocument`-function instead.");(u=this._stats)===null||u===void 0||u.time("Overall");const S=this._transport.getRenderingIntent(O,N,R);ut(this,e,!1),nt(this,w,pe).call(this),G||(G=this._transport.getOptionalContentConfig());let C=this._intentStates.get(S.cacheKey);C||(C=Object.create(null),this._intentStates.set(S.cacheKey,C)),C.streamReaderCancelTimeout&&(clearTimeout(C.streamReaderCancelTimeout),C.streamReaderCancelTimeout=null);const F=!!(S.renderingIntent&_util.RenderingIntentFlag.PRINT);if(!C.displayReadyCapability){var K;C.displayReadyCapability=new _util.PromiseCapability,C.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(K=this._stats)===null||K===void 0||K.time("Page Request"),this._pumpOperatorList(S)}const j=D=>{var v,q;C.renderTasks.delete(U),(this._maybeCleanupAfterRender||F)&&ut(this,e,!0),nt(this,a,re).call(this,!F),D?(U.capability.reject(D),this._abortOperatorList({intentState:C,reason:D instanceof Error?D:new Error(D)})):U.capability.resolve(),(v=this._stats)===null||v===void 0||v.timeEnd("Rendering"),(q=this._stats)===null||q===void 0||q.timeEnd("Overall")},U=new InternalRenderTask({callback:j,params:{canvasContext:z,viewport:W,transform:X,background:y},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:V,operatorList:C.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!F,pdfBug:this._pdfBug,pageColors:g});(C.renderTasks||(C.renderTasks=new Set)).add(U);const E=U.task;return Promise.all([C.displayReadyCapability.promise,G]).then(D=>{var v;let[q,i0]=D;T(this,e)?j():((v=this._stats)===null||v===void 0||v.time("Rendering"),U.initializeGraphics({transparency:q,optionalContentConfig:i0}),U.operatorListChanged())}).catch(j),E}getOperatorList(){let{intent:M="display",annotationMode:o=_util.AnnotationMode.ENABLE,printAnnotationStorage:u=null}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const z=this._transport.getRenderingIntent(M,o,u,!0);let W,O=this._intentStates.get(z.cacheKey);if(O||(O=Object.create(null),this._intentStates.set(z.cacheKey,O)),!O.opListReadCapability){var N;W=Object.create(null),W.operatorListChanged=function(){O.operatorList.lastChunk&&(O.opListReadCapability.resolve(O.operatorList),O.renderTasks.delete(W))},O.opListReadCapability=new _util.PromiseCapability,(O.renderTasks||(O.renderTasks=new Set)).add(W),O.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(N=this._stats)===null||N===void 0||N.time("Page Request"),this._pumpOperatorList(z)}return O.opListReadCapability.promise}streamTextContent(){let{includeMarkedContent:M=!1,disableNormalization:o=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:M===!0,disableNormalization:o===!0},{highWaterMark:100,size:u=>u.items.length})}getTextContent(){let M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then(u=>_xfa_text.XfaText.textContent(u));const o=this.streamTextContent(M);return new Promise(function(u,z){const W=o.getReader(),O={items:[],styles:Object.create(null)};(function N(){W.read().then(function(X){let{value:y,done:G}=X;G?u(O):(Object.assign(O.styles,y.styles),O.items.push(...y.items),N())},z)})()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const M=[];for(const o of this._intentStates.values())if(this._abortOperatorList({intentState:o,reason:new Error("Page was destroyed."),force:!0}),!o.opListReadCapability)for(const u of o.renderTasks)M.push(u.completed),u.cancel();return this.objs.clear(),ut(this,e,!1),nt(this,w,pe).call(this),Promise.all(M)}cleanup(){let M=arguments.length>0&&arguments[0]!==void 0&&arguments[0];ut(this,e,!0);const o=nt(this,a,re).call(this,!1);return M&&o&&this._stats&&(this._stats=new _display_utils.StatTimer),o}_startRenderPage(M,o){var u,z;const W=this._intentStates.get(o);W&&((u=this._stats)===null||u===void 0||u.timeEnd("Page Request"),(z=W.displayReadyCapability)===null||z===void 0||z.resolve(M))}_renderPageChunk(M,o){for(let u=0,z=M.length;u<z;u++)o.operatorList.fnArray.push(M.fnArray[u]),o.operatorList.argsArray.push(M.argsArray[u]);o.operatorList.lastChunk=M.lastChunk,o.operatorList.separateAnnots=M.separateAnnots;for(const u of o.renderTasks)u.operatorListChanged();M.lastChunk&&nt(this,a,re).call(this,!0)}_pumpOperatorList(M){let{renderingIntent:o,cacheKey:u,annotationStorageMap:z}=M;const W=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:o,cacheKey:u,annotationStorage:z}).getReader(),O=this._intentStates.get(u);O.streamReader=W;const N=()=>{W.read().then(X=>{let{value:y,done:G}=X;G?O.streamReader=null:this._transport.destroyed||(this._renderPageChunk(y,O),N())},X=>{if(O.streamReader=null,!this._transport.destroyed){if(O.operatorList){O.operatorList.lastChunk=!0;for(const y of O.renderTasks)y.operatorListChanged();nt(this,a,re).call(this,!0)}if(O.displayReadyCapability)O.displayReadyCapability.reject(X);else{if(!O.opListReadCapability)throw X;O.opListReadCapability.reject(X)}}})};N()}_abortOperatorList(M){let{intentState:o,reason:u,force:z=!1}=M;if(o.streamReader){if(o.streamReaderCancelTimeout&&(clearTimeout(o.streamReaderCancelTimeout),o.streamReaderCancelTimeout=null),!z){if(o.renderTasks.size>0)return;if(u instanceof _display_utils.RenderingCancelledException){let W=RENDERING_CANCELLED_TIMEOUT;u.extraDelay>0&&u.extraDelay<1e3&&(W+=u.extraDelay),o.streamReaderCancelTimeout=setTimeout(()=>{o.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:o,reason:u,force:!0})},W);return}}if(o.streamReader.cancel(new _util.AbortException(u.message)).catch(()=>{}),o.streamReader=null,!this._transport.destroyed){for(const[W,O]of this._intentStates)if(O===o){this._intentStates.delete(W);break}this.cleanup()}}}get stats(){return this._stats}}t=new WeakMap,e=new WeakMap,a=new WeakSet,re=function(){let s=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(nt(this,w,pe).call(this),!T(this,e))return!1;if(s)return ut(this,t,setTimeout(()=>{ut(this,t,null),nt(this,a,re).call(this,!1)},DELAYED_CLEANUP_TIMEOUT)),!1;for(const{renderTasks:M,operatorList:o}of this._intentStates.values())if(M.size>0||!o.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),ut(this,e,!1),!0},w=new WeakSet,pe=function(){T(this,t)&&(clearTimeout(T(this,t)),ut(this,t,null))},exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{constructor(){et(this,p,new Set),et(this,h,Promise.resolve())}postMessage(M,o){const u={data:structuredClone(M,null)};T(this,h).then(()=>{for(const z of T(this,p))z.call(this,u)})}addEventListener(M,o){T(this,p).add(o)}removeEventListener(M,o){T(this,p).delete(o)}terminate(){T(this,p).clear()}}p=new WeakMap,h=new WeakMap,exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};if(exports.PDFWorkerUtil=PDFWorkerUtil,_is_node.isNodeJS&&typeof commonjsRequire=="function")PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if(typeof document=="object"){var _document,_document$currentScri;const s=(_document=document)===null||_document===void 0||(_document$currentScri=_document.currentScript)===null||_document$currentScri===void 0?void 0:_document$currentScri.src;s&&(PDFWorkerUtil.fallbackWorkerSrc=s.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(s,M){let o;try{if(o=new URL(s),!o.origin||o.origin==="null")return!1}catch{return!1}const u=new URL(M,o);return o.origin===u.origin},PDFWorkerUtil.createCDNWrapper=function(s){const M=`importScripts("${s}");`;return URL.createObjectURL(new Blob([M]))};const _PDFWorker=class{constructor(){let{name:s=null,port:M=null,verbosity:o=(0,_util.getVerbosityLevel)()}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(M&&T(_PDFWorker,l).has(M))throw new Error("Cannot use more than one PDFWorker per port.");this.name=s,this.destroyed=!1,this.verbosity=o,this._readyCapability=new _util.PromiseCapability,this._port=null,this._webWorker=null,this._messageHandler=null,M?(T(_PDFWorker,l).set(M,this),this._initializeFromPort(M)):this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(s){this._port=s,this._messageHandler=new _message_handler.MessageHandler("main","worker",s),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}_initialize(){if(!PDFWorkerUtil.isWorkerDisabled&&!_PDFWorker._mainThreadWorkerMessageHandler){let{workerSrc:s}=_PDFWorker;try{PDFWorkerUtil.isSameOrigin(window.location.href,s)||(s=PDFWorkerUtil.createCDNWrapper(new URL(s,window.location).href));const M=new Worker(s),o=new _message_handler.MessageHandler("main","worker",M),u=()=>{M.removeEventListener("error",z),o.destroy(),M.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},z=()=>{this._webWorker||u()};M.addEventListener("error",z),o.on("test",O=>{M.removeEventListener("error",z),this.destroyed?u():O?(this._messageHandler=o,this._port=M,this._webWorker=M,this._readyCapability.resolve(),o.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),o.destroy(),M.terminate())}),o.on("ready",O=>{if(M.removeEventListener("error",z),this.destroyed)u();else try{W()}catch{this._setupFakeWorker()}});const W=()=>{const O=new Uint8Array;o.send("test",O,[O.buffer])};W();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(s=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const M=new LoopbackPort;this._port=M;const o="fake"+PDFWorkerUtil.fakeWorkerId++,u=new _message_handler.MessageHandler(o+"_worker",o,M);s.setup(u,M);const z=new _message_handler.MessageHandler(o,o+"_worker",M);this._messageHandler=z,this._readyCapability.resolve(),z.send("configure",{verbosity:this.verbosity})}).catch(s=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${s.message}".`))})}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),T(_PDFWorker,l).delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(s){if(s==null||!s.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return T(this,l).has(s.port)?T(this,l).get(s.port):new _PDFWorker(s)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(PDFWorkerUtil.fallbackWorkerSrc!==null)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){try{var s;return((s=globalThis.pdfjsWorker)===null||s===void 0?void 0:s.WorkerMessageHandler)||null}catch{return null}}static get _setupFakeWorkerGlobal(){const loader=async()=>{const mainWorkerMessageHandler=this._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_is_node.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())}};let PDFWorker=_PDFWorker;l=new WeakMap,et(PDFWorker,l,new WeakMap),exports.PDFWorker=PDFWorker;class WorkerTransport{constructor(M,o,u,z,W){et(this,m),et(this,c,new Map),et(this,b,new Map),et(this,L,new Map),this.messageHandler=M,this.loadingTask=o,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({ownerDocument:z.ownerDocument,styleElement:z.styleElement}),this._params=z,this.canvasFactory=W.canvasFactory,this.filterFactory=W.filterFactory,this.cMapReaderFactory=W.cMapReaderFactory,this.standardFontDataFactory=W.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=u,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(M){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_util.AnnotationMode.ENABLE,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,z=arguments.length>3&&arguments[3]!==void 0&&arguments[3],W=_util.RenderingIntentFlag.DISPLAY,O=null;switch(M){case"any":W=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":W=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${M}`)}switch(o){case _util.AnnotationMode.DISABLE:W+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:W+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:W+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,O=(W&_util.RenderingIntentFlag.PRINT&&u instanceof _annotation_storage.PrintAnnotationStorage?u:this.annotationStorage).serializable;break;default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${o}`)}return z&&(W+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:W,cacheKey:`${W}_${_annotation_storage.AnnotationStorage.getHash(O)}`,annotationStorageMap:O}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=new _util.PromiseCapability,this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));const M=[];for(const u of T(this,b).values())M.push(u._destroy());T(this,b).clear(),T(this,L).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const o=this.messageHandler.sendWithPromise("Terminate",null);return M.push(o),Promise.all(M).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),T(this,c).clear(),this.filterFactory.destroy(),this._networkStream&&this._networkStream.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:M,loadingTask:o}=this;M.on("GetReader",(u,z)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=W=>{this._lastProgress={loaded:W.loaded,total:W.total}},z.onPull=()=>{this._fullReader.read().then(function(W){let{value:O,done:N}=W;N?z.close():((0,_util.assert)(O instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),z.enqueue(new Uint8Array(O),1,[O]))}).catch(W=>{z.error(W)})},z.onCancel=W=>{this._fullReader.cancel(W),z.ready.catch(O=>{if(!this.destroyed)throw O})}}),M.on("ReaderHeadersReady",u=>{const z=new _util.PromiseCapability,W=this._fullReader;return W.headersReady.then(()=>{if(!W.isStreamingSupported||!W.isRangeSupported){if(this._lastProgress){var O;(O=o.onProgress)===null||O===void 0||O.call(o,this._lastProgress)}W.onProgress=N=>{var X;(X=o.onProgress)===null||X===void 0||X.call(o,{loaded:N.loaded,total:N.total})}}z.resolve({isStreamingSupported:W.isStreamingSupported,isRangeSupported:W.isRangeSupported,contentLength:W.contentLength})},z.reject),z.promise}),M.on("GetRangeReader",(u,z)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const W=this._networkStream.getRangeReader(u.begin,u.end);W?(z.onPull=()=>{W.read().then(function(O){let{value:N,done:X}=O;X?z.close():((0,_util.assert)(N instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),z.enqueue(new Uint8Array(N),1,[N]))}).catch(O=>{z.error(O)})},z.onCancel=O=>{W.cancel(O),z.ready.catch(N=>{if(!this.destroyed)throw N})}):z.close()}),M.on("GetDoc",u=>{let{pdfInfo:z}=u;this._numPages=z.numPages,this._htmlForXfa=z.htmlForXfa,delete z.htmlForXfa,o._capability.resolve(new PDFDocumentProxy(z,this))}),M.on("DocException",function(u){let z;switch(u.name){case"PasswordException":z=new _util.PasswordException(u.message,u.code);break;case"InvalidPDFException":z=new _util.InvalidPDFException(u.message);break;case"MissingPDFException":z=new _util.MissingPDFException(u.message);break;case"UnexpectedResponseException":z=new _util.UnexpectedResponseException(u.message,u.status);break;case"UnknownErrorException":z=new _util.UnknownErrorException(u.message,u.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}o._capability.reject(z)}),M.on("PasswordRequest",u=>{if(this._passwordCapability=new _util.PromiseCapability,o.onPassword){const z=W=>{W instanceof Error?this._passwordCapability.reject(W):this._passwordCapability.resolve({password:W})};try{o.onPassword(z,u.code)}catch(W){this._passwordCapability.reject(W)}}else this._passwordCapability.reject(new _util.PasswordException(u.message,u.code));return this._passwordCapability.promise}),M.on("DataLoaded",u=>{var z;(z=o.onProgress)===null||z===void 0||z.call(o,{loaded:u.length,total:u.length}),this.downloadInfoCapability.resolve(u)}),M.on("StartRenderPage",u=>{this.destroyed||T(this,b).get(u.pageIndex)._startRenderPage(u.transparency,u.cacheKey)}),M.on("commonobj",u=>{var z;let[W,O,N]=u;if(!this.destroyed&&!this.commonObjs.has(W))switch(O){case"Font":const X=this._params;if("error"in N){const V=N.error;(0,_util.warn)(`Error during font loading: ${V}`),this.commonObjs.resolve(W,V);break}const y=X.pdfBug&&(z=globalThis.FontInspector)!==null&&z!==void 0&&z.enabled?(V,g)=>globalThis.FontInspector.fontAdded(V,g):null,G=new _font_loader.FontFaceObject(N,{isEvalSupported:X.isEvalSupported,disableFontFace:X.disableFontFace,ignoreErrors:X.ignoreErrors,inspectFont:y});this.fontLoader.bind(G).catch(V=>M.sendWithPromise("FontFallback",{id:W})).finally(()=>{!X.fontExtraProperties&&G.data&&(G.data=null),this.commonObjs.resolve(W,G)});break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(W,N);break;default:throw new Error(`Got unknown common object type ${O}`)}}),M.on("obj",u=>{let[z,W,O,N]=u;if(this.destroyed)return;const X=T(this,b).get(W);if(!X.objs.has(z))switch(O){case"Image":if(X.objs.resolve(z,N),N){let G;if(N.bitmap){const{width:V,height:g}=N;G=V*g*4}else{var y;G=((y=N.data)===null||y===void 0?void 0:y.length)||0}G>_util.MAX_IMAGE_SIZE_TO_CACHE&&(X._maybeCleanupAfterRender=!0)}break;case"Pattern":X.objs.resolve(z,N);break;default:throw new Error(`Got unknown object type ${O}`)}}),M.on("DocProgress",u=>{var z;this.destroyed||(z=o.onProgress)===null||z===void 0||z.call(o,{loaded:u.loaded,total:u.total})}),M.on("FetchBuiltInCMap",u=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(u):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),M.on("FetchStandardFontData",u=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(u):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var M;return this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead."),this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:this.annotationStorage.serializable,filename:((M=this._fullReader)===null||M===void 0?void 0:M.filename)??null}).finally(()=>{this.annotationStorage.resetModified()})}getPage(M){if(!Number.isInteger(M)||M<=0||M>this._numPages)return Promise.reject(new Error("Invalid page request."));const o=M-1,u=T(this,L).get(o);if(u)return u;const z=this.messageHandler.sendWithPromise("GetPage",{pageIndex:o}).then(W=>{if(this.destroyed)throw new Error("Transport destroyed");const O=new PDFPageProxy(o,W,this,this._params.pdfBug);return T(this,b).set(o,O),O});return T(this,L).set(o,z),z}getPageIndex(M){return typeof M!="object"||M===null||!Number.isInteger(M.num)||M.num<0||!Number.isInteger(M.gen)||M.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:M.num,gen:M.gen})}getAnnotations(M,o){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:M,intent:o})}getFieldObjects(){return nt(this,m,Ae).call(this,"GetFieldObjects")}hasJSActions(){return nt(this,m,Ae).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(M){return typeof M!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:M})}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)}getJavaScript(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}getDocJSActions(){return this.messageHandler.sendWithPromise("GetDocJSActions",null)}getPageJSActions(M){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:M})}getStructTree(M){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:M})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(M=>new _optional_content_config.OptionalContentConfig(M))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const M="GetMetadata",o=T(this,c).get(M);if(o)return o;const u=this.messageHandler.sendWithPromise(M,null).then(z=>{var W,O;return{info:z[0],metadata:z[1]?new _metadata.Metadata(z[1]):null,contentDispositionFilename:((W=this._fullReader)===null||W===void 0?void 0:W.filename)??null,contentLength:((O=this._fullReader)===null||O===void 0?void 0:O.contentLength)??null}});return T(this,c).set(M,u),u}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(){let M=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const o of T(this,b).values())if(!o.cleanup())throw new Error(`startCleanup: Page ${o.pageNumber} is currently rendering.`);this.commonObjs.clear(),M||this.fontLoader.clear(),T(this,c).clear(),this.filterFactory.destroy(!0)}}get loadingParams(){const{disableAutoFetch:M,enableXfa:o}=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:M,enableXfa:o})}}c=new WeakMap,b=new WeakMap,L=new WeakMap,m=new WeakSet,Ae=function(s){let M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const o=T(this,c).get(s);if(o)return o;const u=this.messageHandler.sendWithPromise(s,M);return T(this,c).set(s,u),u};class PDFObjects{constructor(){et(this,I),et(this,x,Object.create(null))}get(M){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(o){const z=nt(this,I,_e).call(this,M);return z.capability.promise.then(()=>o(z.data)),null}const u=T(this,x)[M];if(u==null||!u.capability.settled)throw new Error(`Requesting object that isn't resolved yet ${M}.`);return u.data}has(M){const o=T(this,x)[M];return(o==null?void 0:o.capability.settled)||!1}resolve(M){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const u=nt(this,I,_e).call(this,M);u.data=o,u.capability.resolve()}clear(){for(const o in T(this,x)){var M;const{data:u}=T(this,x)[o];u==null||(M=u.bitmap)===null||M===void 0||M.close()}ut(this,x,Object.create(null))}}x=new WeakMap,I=new WeakSet,_e=function(s){return T(this,x)[s]||(T(this,x)[s]={capability:new _util.PromiseCapability,data:null})};class RenderTask{constructor(M){et(this,i,null),ut(this,i,M),this.onContinue=null}get promise(){return T(this,i).capability.promise}cancel(){let M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;T(this,i).cancel(null,M)}get separateAnnots(){const{separateAnnots:M}=T(this,i).operatorList;if(!M)return!1;const{annotationCanvasMap:o}=T(this,i);return M.form||M.canvas&&(o==null?void 0:o.size)>0}}i=new WeakMap,exports.RenderTask=RenderTask;const n=class{constructor(s){let{callback:M,params:o,objs:u,commonObjs:z,annotationCanvasMap:W,operatorList:O,pageIndex:N,canvasFactory:X,filterFactory:y,useRequestAnimationFrame:G=!1,pdfBug:V=!1,pageColors:g=null}=s;this.callback=M,this.params=o,this.objs=u,this.commonObjs=z,this.annotationCanvasMap=W,this.operatorListIdx=null,this.operatorList=O,this._pageIndex=N,this.canvasFactory=X,this.filterFactory=y,this._pdfBug=V,this.pageColors=g,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=G===!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=o.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics(s){var M,o;let{transparency:u=!1,optionalContentConfig:z}=s;if(this.cancelled)return;if(this._canvas){if(T(n,A).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.");T(n,A).add(this._canvas)}this._pdfBug&&(M=globalThis.StepperManager)!==null&&M!==void 0&&M.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:W,viewport:O,transform:N,background:X}=this.params;this.gfx=new _canvas.CanvasGraphics(W,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:z},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:N,viewport:O,transparency:u,background:X}),this.operatorListIdx=0,this.graphicsReady=!0,(o=this.graphicsReadyCallback)===null||o===void 0||o.call(this)}cancel(){var s;let M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.running=!1,this.cancelled=!0,(s=this.gfx)===null||s===void 0||s.endDrawing(),this._canvas&&T(n,A).delete(this._canvas),this.callback(M||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,"canvas",o))}operatorListChanged(){var s;this.graphicsReady?((s=this.stepper)===null||s===void 0||s.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}_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(this.pageColors),this._canvas&&T(n,A).delete(this._canvas),this.callback())))}};let InternalRenderTask=n;A=new WeakMap,et(InternalRenderTask,A,new WeakSet);const version="3.7.107";exports.version=version;const build="036f855dc";exports.build=build},(s,M,o)=>{var u,z,W,O,N;Object.defineProperty(M,"__esModule",{value:!0}),M.PrintAnnotationStorage=M.AnnotationStorage=void 0;var X=o(1),y=o(140),G=o(144);class V{constructor(){et(this,W),et(this,u,!1),et(this,z,new Map),this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(S,C){const F=T(this,z).get(S);return F===void 0?C:Object.assign(C,F)}getRawValue(S){return T(this,z).get(S)}remove(S){if(T(this,z).delete(S),T(this,z).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const C of T(this,z).values())if(C instanceof y.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(S,C){const F=T(this,z).get(S);let K=!1;if(F!==void 0)for(const[j,U]of Object.entries(C))F[j]!==U&&(K=!0,F[j]=U);else K=!0,T(this,z).set(S,C);K&&nt(this,W,O).call(this),C instanceof y.AnnotationEditor&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(C.constructor._type)}has(S){return T(this,z).has(S)}getAll(){return T(this,z).size>0?(0,X.objectFromMap)(T(this,z)):null}setAll(S){for(const[C,F]of Object.entries(S))this.setValue(C,F)}get size(){return T(this,z).size}resetModified(){T(this,u)&&(ut(this,u,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new g(this)}get serializable(){if(T(this,z).size===0)return null;const S=new Map;for(const[C,F]of T(this,z)){const K=F instanceof y.AnnotationEditor?F.serialize():F;K&&S.set(C,K)}return S}static getHash(S){if(!S)return"";const C=new G.MurmurHash3_64;for(const[F,K]of S)C.update(`${F}:${JSON.stringify(K)}`);return C.hexdigest()}}u=new WeakMap,z=new WeakMap,W=new WeakSet,O=function(){T(this,u)||(ut(this,u,!0),typeof this.onSetModified=="function"&&this.onSetModified())},M.AnnotationStorage=V;class g extends V{constructor(S){super(),et(this,N,null),ut(this,N,structuredClone(S.serializable))}get print(){(0,X.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return T(this,N)}}N=new WeakMap,M.PrintAnnotationStorage=g},(s,M,o)=>{var u,z,W,O,N,X;Object.defineProperty(M,"__esModule",{value:!0}),M.AnnotationEditor=void 0;var y=o(141),G=o(1);const V=class{constructor(R){et(this,u,this.focusin.bind(this)),et(this,z,this.focusout.bind(this)),et(this,W,!1),et(this,O,!1),et(this,N,!1),It(this,"_uiManager",null),et(this,X,V._zIndex++),this.constructor===V&&(0,G.unreachable)("Cannot initialize AnnotationEditor."),this.parent=R.parent,this.id=R.id,this.width=this.height=null,this.pageIndex=R.parent.pageIndex,this.name=R.name,this.div=null,this._uiManager=R.uiManager;const{rotation:S,rawDims:{pageWidth:C,pageHeight:F,pageX:K,pageY:j}}=this.parent.viewport;this.rotation=S,this.pageRotation=(360+S-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[C,F],this.pageTranslation=[K,j];const[U,E]=this.parentDimensions;this.x=R.x/U,this.y=R.y/E,this.isAttachedToDOM=!1}static get _defaultLineColor(){return(0,G.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}addCommands(R){this._uiManager.addCommands(R)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=T(this,X)}setParent(R){R!==null&&(this.pageIndex=R.pageIndex,this.pageDimensions=R.pageDimensions),this.parent=R}focusin(R){T(this,W)?ut(this,W,!1):this.parent.setSelected(this)}focusout(R){var S;if(!this.isAttachedToDOM)return;const C=R.relatedTarget;(C==null||!C.closest(`#${this.id}`))&&(R.preventDefault(),(S=this.parent)!==null&&S!==void 0&&S.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}dragstart(R){const S=this.parent.div.getBoundingClientRect();this.startX=R.clientX-S.x,this.startY=R.clientY-S.y,R.dataTransfer.setData("text/plain",this.id),R.dataTransfer.effectAllowed="move"}setAt(R,S,C,F){const[K,j]=this.parentDimensions;[C,F]=this.screenToPageTranslation(C,F),this.x=(R+C)/K,this.y=(S+F)/j,this.div.style.left=100*this.x+"%",this.div.style.top=100*this.y+"%"}translate(R,S){const[C,F]=this.parentDimensions;[R,S]=this.screenToPageTranslation(R,S),this.x+=R/C,this.y+=S/F,this.div.style.left=100*this.x+"%",this.div.style.top=100*this.y+"%"}screenToPageTranslation(R,S){switch(this.parentRotation){case 90:return[S,-R];case 180:return[-R,-S];case 270:return[-S,R];default:return[R,S]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{realScale:R}=this._uiManager.viewParameters,[S,C]=this.pageDimensions;return[S*R,C*R]}setDims(R,S){const[C,F]=this.parentDimensions;this.div.style.width=100*R/C+"%",this.div.style.height=100*S/F+"%"}fixDims(){const{style:R}=this.div,{height:S,width:C}=R,F=C.endsWith("%"),K=S.endsWith("%");if(F&&K)return;const[j,U]=this.parentDimensions;F||(R.width=100*parseFloat(C)/j+"%"),K||(R.height=100*parseFloat(S)/U+"%")}getInitialTranslation(){return[0,0]}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",T(this,u)),this.div.addEventListener("focusout",T(this,z));const[R,S]=this.getInitialTranslation();return this.translate(R,S),(0,y.bindEvents)(this,this.div,["dragstart","pointerdown"]),this.div}pointerdown(R){const{isMac:S}=G.FeatureTest.platform;R.button!==0||R.ctrlKey&&S?R.preventDefault():(R.ctrlKey&&!S||R.shiftKey||R.metaKey&&S?this.parent.toggleSelected(this):this.parent.setSelected(this),ut(this,W,!0))}getRect(R,S){const C=this.parentScale,[F,K]=this.pageDimensions,[j,U]=this.pageTranslation,E=R/C,D=S/C,v=this.x*F,q=this.y*K,i0=this.width*F,t0=this.height*K;switch(this.rotation){case 0:return[v+E+j,K-q-D-t0+U,v+E+i0+j,K-q-D+U];case 90:return[v+D+j,K-q+E+U,v+D+t0+j,K-q+E+i0+U];case 180:return[v-E-i0+j,K-q+D+U,v-E+j,K-q+D+t0+U];case 270:return[v-D-t0+j,K-q-E-i0+U,v-D+j,K-q-E+U];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(R,S){const[C,F,K,j]=R,U=K-C,E=j-F;switch(this.rotation){case 0:return[C,S-j,U,E];case 90:return[C,S-F,E,U];case 180:return[K,S-F,U,E];case 270:return[K,S-j,E,U];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){ut(this,N,!0)}disableEditMode(){ut(this,N,!1)}isInEditMode(){return T(this,N)}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){var R;(R=this.div)===null||R===void 0||R.addEventListener("focusin",T(this,u))}serialize(){(0,G.unreachable)("An editor must be serializable")}static deserialize(R,S,C){const F=new this.prototype.constructor({parent:S,id:S.getNextId(),uiManager:C});F.rotation=R.rotation;const[K,j]=F.pageDimensions,[U,E,D,v]=F.getRectInCurrentCoords(R.rect,j);return F.x=U/K,F.y=E/j,F.width=D/K,F.height=v/j,F}remove(){this.div.removeEventListener("focusin",T(this,u)),this.div.removeEventListener("focusout",T(this,z)),this.isEmpty()||this.commit(),this.parent.remove(this)}select(){var R;(R=this.div)===null||R===void 0||R.classList.add("selectedEditor")}unselect(){var R;(R=this.div)===null||R===void 0||R.classList.remove("selectedEditor")}updateParams(R,S){}disableEditing(){}enableEditing(){}get propertiesToUpdate(){return{}}get contentDiv(){return this.div}get isEditing(){return T(this,O)}set isEditing(R){ut(this,O,R),R?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null)}};let g=V;u=new WeakMap,z=new WeakMap,W=new WeakMap,O=new WeakMap,N=new WeakMap,X=new WeakMap,It(g,"_colorManager",new y.ColorManager),It(g,"_zIndex",1),M.AnnotationEditor=g},(s,M,o)=>{var u,z,W,O,N,X,y,G,V,g,R,S,C,F,K,j,U,E,D,v,q,i0,t0,P,c0,s0,W0,M0,X0,B,Q,$,l0,_,H,d0,p0,m0,r0,O0,h0,G0,z0,g0,f0,S0,J,e0,a0,o0,Z0,T0;Object.defineProperty(M,"__esModule",{value:!0}),M.KeyboardManager=M.CommandManager=M.ColorManager=M.AnnotationEditorUIManager=void 0,M.bindEvents=function(Y0,U0,i1){for(const b1 of i1)U0.addEventListener(b1,Y0[b1].bind(Y0))},M.opacityToHex=function(Y0){return Math.round(Math.min(255,Math.max(1,255*Y0))).toString(16).padStart(2,"0")};var I0=o(1),A0=o(142);class F0{constructor(){et(this,u,0)}getId(){return`${I0.AnnotationEditorPrefix}${ue(this,u)._++}`}}u=new WeakMap;class J0{constructor(){et(this,z,[]),et(this,W,!1),et(this,O,void 0),et(this,N,-1);let U0=arguments.length>0&&arguments[0]!==void 0?arguments[0]:128;ut(this,O,U0)}add(U0){let{cmd:i1,undo:b1,mustExec:U1,type:p1=NaN,overwriteIfSameType:x0=!1,keepUndo:o1=!1}=U0;if(U1&&i1(),T(this,W))return;const Z1={cmd:i1,undo:b1,type:p1};if(T(this,N)===-1){T(this,z).length>0&&(T(this,z).length=0),ut(this,N,0),T(this,z).push(Z1);return}if(x0&&T(this,z)[T(this,N)].type===p1){o1&&(Z1.undo=T(this,z)[T(this,N)].undo),T(this,z)[T(this,N)]=Z1;return}const m1=T(this,N)+1;m1===T(this,O)?T(this,z).splice(0,1):(ut(this,N,m1),m1<T(this,z).length&&T(this,z).splice(m1)),T(this,z).push(Z1)}undo(){T(this,N)!==-1&&(ut(this,W,!0),T(this,z)[T(this,N)].undo(),ut(this,W,!1),ut(this,N,T(this,N)-1))}redo(){T(this,N)<T(this,z).length-1&&(ut(this,N,T(this,N)+1),ut(this,W,!0),T(this,z)[T(this,N)].cmd(),ut(this,W,!1))}hasSomethingToUndo(){return T(this,N)!==-1}hasSomethingToRedo(){return T(this,N)<T(this,z).length-1}destroy(){ut(this,z,null)}}z=new WeakMap,W=new WeakMap,O=new WeakMap,N=new WeakMap,M.CommandManager=J0;class K0{constructor(U0){et(this,X),this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:i1}=I0.FeatureTest.platform;for(const[b1,U1]of U0)for(const p1 of b1){const x0=p1.startsWith("mac+");i1&&x0?(this.callbacks.set(p1.slice(4),U1),this.allKeys.add(p1.split("+").at(-1))):!i1&&!x0&&(this.callbacks.set(p1,U1),this.allKeys.add(p1.split("+").at(-1)))}}exec(U0,i1){if(!this.allKeys.has(i1.key))return;const b1=this.callbacks.get(nt(this,X,y).call(this,i1));b1&&(b1.bind(U0)(),i1.stopPropagation(),i1.preventDefault())}}X=new WeakSet,y=function(Y0){Y0.altKey&&this.buffer.push("alt"),Y0.ctrlKey&&this.buffer.push("ctrl"),Y0.metaKey&&this.buffer.push("meta"),Y0.shiftKey&&this.buffer.push("shift"),this.buffer.push(Y0.key);const U0=this.buffer.join("+");return this.buffer.length=0,U0},M.KeyboardManager=K0;const E0=class{get _colors(){const Y0=new Map([["CanvasText",null],["Canvas",null]]);return(0,A0.getColorValues)(Y0),(0,I0.shadow)(this,"_colors",Y0)}convert(Y0){const U0=(0,A0.getRGB)(Y0);if(!window.matchMedia("(forced-colors: active)").matches)return U0;for(const[i1,b1]of this._colors)if(b1.every((U1,p1)=>U1===U0[p1]))return E0._colorsMapping.get(i1);return U0}getHexCode(Y0){const U0=this._colors.get(Y0);return U0?I0.Util.makeHexColor(...U0):Y0}};let H0=E0;It(H0,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]])),M.ColorManager=H0;const q0=class{constructor(Y0,U0,i1){et(this,Q),et(this,l0),et(this,H),et(this,p0),et(this,r0),et(this,h0),et(this,z0),et(this,f0),et(this,J),et(this,a0),et(this,Z0),et(this,G,null),et(this,V,new Map),et(this,g,new Map),et(this,R,null),et(this,S,new J0),et(this,C,0),et(this,F,null),et(this,K,new Set),et(this,j,null),et(this,U,new F0),et(this,E,!1),et(this,D,I0.AnnotationEditorType.NONE),et(this,v,new Set),et(this,q,this.copy.bind(this)),et(this,i0,this.cut.bind(this)),et(this,t0,this.paste.bind(this)),et(this,P,this.keydown.bind(this)),et(this,c0,this.onEditingAction.bind(this)),et(this,s0,this.onPageChanging.bind(this)),et(this,W0,this.onScaleChanging.bind(this)),et(this,M0,this.onRotationChanging.bind(this)),et(this,X0,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1}),et(this,B,null),ut(this,B,Y0),ut(this,j,U0),T(this,j)._on("editingaction",T(this,c0)),T(this,j)._on("pagechanging",T(this,s0)),T(this,j)._on("scalechanging",T(this,W0)),T(this,j)._on("rotationchanging",T(this,M0)),ut(this,R,i1),this.viewParameters={realScale:A0.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}destroy(){nt(this,l0,_).call(this),T(this,j)._off("editingaction",T(this,c0)),T(this,j)._off("pagechanging",T(this,s0)),T(this,j)._off("scalechanging",T(this,W0)),T(this,j)._off("rotationchanging",T(this,M0));for(const Y0 of T(this,g).values())Y0.destroy();T(this,g).clear(),T(this,V).clear(),T(this,K).clear(),ut(this,G,null),T(this,v).clear(),T(this,S).destroy()}onPageChanging(Y0){let{pageNumber:U0}=Y0;ut(this,C,U0-1)}focusMainContainer(){T(this,B).focus()}addShouldRescale(Y0){T(this,K).add(Y0)}removeShouldRescale(Y0){T(this,K).delete(Y0)}onScaleChanging(Y0){let{scale:U0}=Y0;this.commitOrRemove(),this.viewParameters.realScale=U0*A0.PixelsPerInch.PDF_TO_CSS_UNITS;for(const i1 of T(this,K))i1.onScaleChanging()}onRotationChanging(Y0){let{pagesRotation:U0}=Y0;this.commitOrRemove(),this.viewParameters.rotation=U0}addToAnnotationStorage(Y0){Y0.isEmpty()||!T(this,R)||T(this,R).has(Y0.id)||T(this,R).setValue(Y0.id,Y0)}copy(Y0){if(Y0.preventDefault(),T(this,G)&&T(this,G).commitOrRemove(),!this.hasSelection)return;const U0=[];for(const i1 of T(this,v))i1.isEmpty()||U0.push(i1.serialize());U0.length!==0&&Y0.clipboardData.setData("application/pdfjs",JSON.stringify(U0))}cut(Y0){this.copy(Y0),this.delete()}paste(Y0){Y0.preventDefault();let U0=Y0.clipboardData.getData("application/pdfjs");if(!U0)return;try{U0=JSON.parse(U0)}catch(b1){(0,I0.warn)(`paste: "${b1.message}".`);return}if(!Array.isArray(U0))return;this.unselectAll();const i1=T(this,g).get(T(this,C));try{const b1=[];for(const x0 of U0){const o1=i1.deserialize(x0);if(!o1)return;b1.push(o1)}const U1=()=>{for(const x0 of b1)nt(this,J,e0).call(this,x0);nt(this,Z0,T0).call(this,b1)},p1=()=>{for(const x0 of b1)x0.remove()};this.addCommands({cmd:U1,undo:p1,mustExec:!0})}catch(b1){(0,I0.warn)(`paste: "${b1.message}".`)}}keydown(Y0){var U0;(U0=this.getActive())!==null&&U0!==void 0&&U0.shouldGetKeyboardEvents()||q0._keyboardManager.exec(this,Y0)}onEditingAction(Y0){["undo","redo","delete","selectAll"].includes(Y0.name)&&this[Y0.name]()}setEditingState(Y0){Y0?(nt(this,Q,$).call(this),nt(this,H,d0).call(this),nt(this,r0,O0).call(this,{isEditing:T(this,D)!==I0.AnnotationEditorType.NONE,isEmpty:nt(this,a0,o0).call(this),hasSomethingToUndo:T(this,S).hasSomethingToUndo(),hasSomethingToRedo:T(this,S).hasSomethingToRedo(),hasSelectedEditor:!1})):(nt(this,l0,_).call(this),nt(this,p0,m0).call(this),nt(this,r0,O0).call(this,{isEditing:!1}))}registerEditorTypes(Y0){if(!T(this,F)){ut(this,F,Y0);for(const U0 of T(this,F))nt(this,h0,G0).call(this,U0.defaultPropertiesToUpdate)}}getId(){return T(this,U).getId()}get currentLayer(){return T(this,g).get(T(this,C))}get currentPageIndex(){return T(this,C)}addLayer(Y0){T(this,g).set(Y0.pageIndex,Y0),T(this,E)?Y0.enable():Y0.disable()}removeLayer(Y0){T(this,g).delete(Y0.pageIndex)}updateMode(Y0){if(ut(this,D,Y0),Y0===I0.AnnotationEditorType.NONE)this.setEditingState(!1),nt(this,f0,S0).call(this);else{this.setEditingState(!0),nt(this,z0,g0).call(this);for(const U0 of T(this,g).values())U0.updateMode(Y0)}}updateToolbar(Y0){Y0!==T(this,D)&&T(this,j).dispatch("switchannotationeditormode",{source:this,mode:Y0})}updateParams(Y0,U0){if(T(this,F)){for(const i1 of T(this,v))i1.updateParams(Y0,U0);for(const i1 of T(this,F))i1.updateDefaultParams(Y0,U0)}}getEditors(Y0){const U0=[];for(const i1 of T(this,V).values())i1.pageIndex===Y0&&U0.push(i1);return U0}getEditor(Y0){return T(this,V).get(Y0)}addEditor(Y0){T(this,V).set(Y0.id,Y0)}removeEditor(Y0){var U0;T(this,V).delete(Y0.id),this.unselect(Y0),(U0=T(this,R))===null||U0===void 0||U0.remove(Y0.id)}setActiveEditor(Y0){T(this,G)!==Y0&&(ut(this,G,Y0),Y0&&nt(this,h0,G0).call(this,Y0.propertiesToUpdate))}toggleSelected(Y0){T(this,v).has(Y0)?(T(this,v).delete(Y0),Y0.unselect(),nt(this,r0,O0).call(this,{hasSelectedEditor:this.hasSelection})):(T(this,v).add(Y0),Y0.select(),nt(this,h0,G0).call(this,Y0.propertiesToUpdate),nt(this,r0,O0).call(this,{hasSelectedEditor:!0}))}setSelected(Y0){for(const U0 of T(this,v))U0!==Y0&&U0.unselect();T(this,v).clear(),T(this,v).add(Y0),Y0.select(),nt(this,h0,G0).call(this,Y0.propertiesToUpdate),nt(this,r0,O0).call(this,{hasSelectedEditor:!0})}isSelected(Y0){return T(this,v).has(Y0)}unselect(Y0){Y0.unselect(),T(this,v).delete(Y0),nt(this,r0,O0).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return T(this,v).size!==0}undo(){T(this,S).undo(),nt(this,r0,O0).call(this,{hasSomethingToUndo:T(this,S).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:nt(this,a0,o0).call(this)})}redo(){T(this,S).redo(),nt(this,r0,O0).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:T(this,S).hasSomethingToRedo(),isEmpty:nt(this,a0,o0).call(this)})}addCommands(Y0){T(this,S).add(Y0),nt(this,r0,O0).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:nt(this,a0,o0).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const Y0=[...T(this,v)];this.addCommands({cmd:()=>{for(const U0 of Y0)U0.remove()},undo:()=>{for(const U0 of Y0)nt(this,J,e0).call(this,U0)},mustExec:!0})}commitOrRemove(){var Y0;(Y0=T(this,G))===null||Y0===void 0||Y0.commitOrRemove()}selectAll(){for(const Y0 of T(this,v))Y0.commit();nt(this,Z0,T0).call(this,T(this,V).values())}unselectAll(){if(T(this,G))T(this,G).commitOrRemove();else if(T(this,v).size!==0){for(const Y0 of T(this,v))Y0.unselect();T(this,v).clear(),nt(this,r0,O0).call(this,{hasSelectedEditor:!1})}}isActive(Y0){return T(this,G)===Y0}getActive(){return T(this,G)}getMode(){return T(this,D)}};let a1=q0;G=new WeakMap,V=new WeakMap,g=new WeakMap,R=new WeakMap,S=new WeakMap,C=new WeakMap,F=new WeakMap,K=new WeakMap,j=new WeakMap,U=new WeakMap,E=new WeakMap,D=new WeakMap,v=new WeakMap,q=new WeakMap,i0=new WeakMap,t0=new WeakMap,P=new WeakMap,c0=new WeakMap,s0=new WeakMap,W0=new WeakMap,M0=new WeakMap,X0=new WeakMap,B=new WeakMap,Q=new WeakSet,$=function(){T(this,B).addEventListener("keydown",T(this,P))},l0=new WeakSet,_=function(){T(this,B).removeEventListener("keydown",T(this,P))},H=new WeakSet,d0=function(){document.addEventListener("copy",T(this,q)),document.addEventListener("cut",T(this,i0)),document.addEventListener("paste",T(this,t0))},p0=new WeakSet,m0=function(){document.removeEventListener("copy",T(this,q)),document.removeEventListener("cut",T(this,i0)),document.removeEventListener("paste",T(this,t0))},r0=new WeakSet,O0=function(Y0){Object.entries(Y0).some(U0=>{let[i1,b1]=U0;return T(this,X0)[i1]!==b1})&&T(this,j).dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(T(this,X0),Y0)})},h0=new WeakSet,G0=function(Y0){T(this,j).dispatch("annotationeditorparamschanged",{source:this,details:Y0})},z0=new WeakSet,g0=function(){if(!T(this,E)){ut(this,E,!0);for(const Y0 of T(this,g).values())Y0.enable()}},f0=new WeakSet,S0=function(){if(this.unselectAll(),T(this,E)){ut(this,E,!1);for(const Y0 of T(this,g).values())Y0.disable()}},J=new WeakSet,e0=function(Y0){const U0=T(this,g).get(Y0.pageIndex);U0?U0.addOrRebuild(Y0):this.addEditor(Y0)},a0=new WeakSet,o0=function(){if(T(this,V).size===0)return!0;if(T(this,V).size===1)for(const Y0 of T(this,V).values())return Y0.isEmpty();return!1},Z0=new WeakSet,T0=function(Y0){T(this,v).clear();for(const U0 of Y0)U0.isEmpty()||(T(this,v).add(U0),U0.select());nt(this,r0,O0).call(this,{hasSelectedEditor:!0})},It(a1,"_keyboardManager",new K0([[["ctrl+a","mac+meta+a"],q0.prototype.selectAll],[["ctrl+z","mac+meta+z"],q0.prototype.undo],[["ctrl+y","ctrl+shift+Z","mac+meta+shift+Z"],q0.prototype.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete"],q0.prototype.delete],[["Escape","mac+Escape"],q0.prototype.unselectAll]])),M.AnnotationEditorUIManager=a1},(s,M,o)=>{var u,z,W,O,N,X,y,G,V,g,R,S,C,F;Object.defineProperty(M,"__esModule",{value:!0}),M.StatTimer=M.RenderingCancelledException=M.PixelsPerInch=M.PageViewport=M.PDFDateString=M.DOMStandardFontDataFactory=M.DOMSVGFactory=M.DOMFilterFactory=M.DOMCanvasFactory=M.DOMCMapReaderFactory=M.AnnotationPrefix=void 0,M.deprecated=function($){console.log("Deprecated API usage: "+$)},M.getColorValues=function($){const l0=document.createElement("span");l0.style.visibility="hidden",document.body.append(l0);for(const _ of $.keys()){l0.style.color=_;const H=window.getComputedStyle(l0).color;$.set(_,Q(H))}l0.remove()},M.getCurrentTransform=function($){const{a:l0,b:_,c:H,d:d0,e:p0,f:m0}=$.getTransform();return[l0,_,H,d0,p0,m0]},M.getCurrentTransformInverse=function($){const{a:l0,b:_,c:H,d:d0,e:p0,f:m0}=$.getTransform().invertSelf();return[l0,_,H,d0,p0,m0]},M.getFilenameFromUrl=function($){return arguments.length>1&&arguments[1]!==void 0&&arguments[1]||([$]=$.split(/[#?]/,1)),$.substring($.lastIndexOf("/")+1)},M.getPdfFilenameFromUrl=function($){let l0=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"document.pdf";if(typeof $!="string")return l0;if(M0($))return(0,j.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),l0;const _=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,H=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec($);let d0=_.exec(H[1])||_.exec(H[2])||_.exec(H[3]);if(d0&&(d0=d0[0],d0.includes("%")))try{d0=_.exec(decodeURIComponent(d0))[0]}catch{}return d0||l0},M.getRGB=Q,M.getXfaPageViewport=function($,l0){let{scale:_=1,rotation:H=0}=l0;const{width:d0,height:p0}=$.attributes.style,m0=[0,0,parseInt(d0),parseInt(p0)];return new s0({viewBox:m0,scale:_,rotation:H})},M.isDataScheme=M0,M.isPdfFile=function($){return typeof $=="string"&&/\.pdf$/i.test($)},M.isValidFetchUrl=X0,M.loadScript=function($){let l0=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return new Promise((_,H)=>{const d0=document.createElement("script");d0.src=$,d0.onload=function(p0){l0&&d0.remove(),_(p0)},d0.onerror=function(){H(new Error(`Cannot load script at: ${d0.src}`))},(document.head||document.documentElement).append(d0)})},M.setLayerDimensions=function($,l0){let _=arguments.length>2&&arguments[2]!==void 0&&arguments[2],H=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];if(l0 instanceof s0){const{pageWidth:d0,pageHeight:p0}=l0.rawDims,{style:m0}=$,r0=`calc(var(--scale-factor) * ${d0}px)`,O0=`calc(var(--scale-factor) * ${p0}px)`;_&&l0.rotation%180!=0?(m0.width=O0,m0.height=r0):(m0.width=r0,m0.height=O0)}H&&$.setAttribute("data-main-rotation",l0.rotation)};var K=o(143),j=o(1);const U="http://www.w3.org/2000/svg";M.AnnotationPrefix="pdfjs_internal_id_";const E=class{};let D=E;It(D,"CSS",96),It(D,"PDF",72),It(D,"PDF_TO_CSS_UNITS",E.CSS/E.PDF),M.PixelsPerInch=D;class v extends K.BaseFilterFactory{constructor(){let{docId:l0,ownerDocument:_=globalThis.document}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),et(this,V),et(this,R),et(this,C),et(this,u,void 0),et(this,z,void 0),et(this,W,void 0),et(this,O,void 0),et(this,N,void 0),et(this,X,void 0),et(this,y,void 0),et(this,G,0),ut(this,W,l0),ut(this,O,_)}addFilter(l0){if(!l0)return"none";let _,H,d0,p0,m0=T(this,V,g).get(l0);if(m0)return m0;if(l0.length===1){const z0=l0[0],g0=new Array(256);for(let f0=0;f0<256;f0++)g0[f0]=z0[f0]/255;p0=_=H=d0=g0.join(",")}else{const[z0,g0,f0]=l0,S0=new Array(256),J=new Array(256),e0=new Array(256);for(let a0=0;a0<256;a0++)S0[a0]=z0[a0]/255,J[a0]=g0[a0]/255,e0[a0]=f0[a0]/255;_=S0.join(","),H=J.join(","),d0=e0.join(","),p0=`${_}${H}${d0}`}if(m0=T(this,V,g).get(p0),m0)return T(this,V,g).set(l0,m0),m0;const r0=`g_${T(this,W)}_transfer_map_${ue(this,G)._++}`,O0=`url(#${r0})`;T(this,V,g).set(l0,O0),T(this,V,g).set(p0,O0);const h0=T(this,O).createElementNS(U,"filter",U);h0.setAttribute("id",r0),h0.setAttribute("color-interpolation-filters","sRGB");const G0=T(this,O).createElementNS(U,"feComponentTransfer");return h0.append(G0),nt(this,C,F).call(this,G0,"feFuncR",_),nt(this,C,F).call(this,G0,"feFuncG",H),nt(this,C,F).call(this,G0,"feFuncB",d0),T(this,R,S).append(h0),O0}addHCMFilter(l0,_){var H;const d0=`${l0}-${_}`;if(T(this,X)===d0)return T(this,y);if(ut(this,X,d0),ut(this,y,"none"),(H=T(this,N))===null||H===void 0||H.remove(),!l0||!_)return T(this,y);T(this,R,S).style.color=l0;const p0=Q(l0=getComputedStyle(T(this,R,S)).getPropertyValue("color"));l0=j.Util.makeHexColor(...p0),T(this,R,S).style.color=_;const m0=Q(_=getComputedStyle(T(this,R,S)).getPropertyValue("color"));if(_=j.Util.makeHexColor(...m0),T(this,R,S).style.color="",l0==="#000000"&&_==="#ffffff"||l0===_)return T(this,y);const r0=new Array(256);for(let S0=0;S0<=255;S0++){const J=S0/255;r0[S0]=J<=.03928?J/12.92:((J+.055)/1.055)**2.4}const O0=r0.join(","),h0=`g_${T(this,W)}_hcm_filter`,G0=ut(this,N,T(this,O).createElementNS(U,"filter",U));G0.setAttribute("id",h0),G0.setAttribute("color-interpolation-filters","sRGB");let z0=T(this,O).createElementNS(U,"feComponentTransfer");G0.append(z0),nt(this,C,F).call(this,z0,"feFuncR",O0),nt(this,C,F).call(this,z0,"feFuncG",O0),nt(this,C,F).call(this,z0,"feFuncB",O0);const g0=T(this,O).createElementNS(U,"feColorMatrix");g0.setAttribute("type","matrix"),g0.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"),G0.append(g0),z0=T(this,O).createElementNS(U,"feComponentTransfer"),G0.append(z0);const f0=(S0,J)=>{const e0=p0[S0]/255,a0=m0[S0]/255,o0=new Array(J+1);for(let Z0=0;Z0<=J;Z0++)o0[Z0]=e0+Z0/J*(a0-e0);return o0.join(",")};return nt(this,C,F).call(this,z0,"feFuncR",f0(0,5)),nt(this,C,F).call(this,z0,"feFuncG",f0(1,5)),nt(this,C,F).call(this,z0,"feFuncB",f0(2,5)),T(this,R,S).append(G0),ut(this,y,`url(#${h0})`),T(this,y)}destroy(){(!(arguments.length>0&&arguments[0]!==void 0&&arguments[0])||!T(this,y))&&(T(this,z)&&(T(this,z).parentNode.parentNode.remove(),ut(this,z,null)),T(this,u)&&(T(this,u).clear(),ut(this,u,null)),ut(this,G,0))}}u=new WeakMap,z=new WeakMap,W=new WeakMap,O=new WeakMap,N=new WeakMap,X=new WeakMap,y=new WeakMap,G=new WeakMap,V=new WeakSet,g=function(){return T(this,u)||ut(this,u,new Map)},R=new WeakSet,S=function(){if(!T(this,z)){const $=T(this,O).createElement("div"),{style:l0}=$;l0.visibility="hidden",l0.contain="strict",l0.width=l0.height=0,l0.position="absolute",l0.top=l0.left=0,l0.zIndex=-1;const _=T(this,O).createElementNS(U,"svg");_.setAttribute("width",0),_.setAttribute("height",0),ut(this,z,T(this,O).createElementNS(U,"defs")),$.append(_),_.append(T(this,z)),T(this,O).body.append($)}return T(this,z)},C=new WeakSet,F=function($,l0,_){const H=T(this,O).createElementNS(U,l0);H.setAttribute("type","discrete"),H.setAttribute("tableValues",_),$.append(H)},M.DOMFilterFactory=v;class q extends K.BaseCanvasFactory{constructor(){let{ownerDocument:l0=globalThis.document}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),this._document=l0}_createCanvas(l0,_){const H=this._document.createElement("canvas");return H.width=l0,H.height=_,H}}M.DOMCanvasFactory=q;async function i0($){let l0=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(X0($,document.baseURI)){const _=await fetch($);if(!_.ok)throw new Error(_.statusText);return l0?new Uint8Array(await _.arrayBuffer()):(0,j.stringToBytes)(await _.text())}return new Promise((_,H)=>{const d0=new XMLHttpRequest;d0.open("GET",$,!0),l0&&(d0.responseType="arraybuffer"),d0.onreadystatechange=()=>{if(d0.readyState===XMLHttpRequest.DONE){if(d0.status===200||d0.status===0){let p0;if(l0&&d0.response?p0=new Uint8Array(d0.response):!l0&&d0.responseText&&(p0=(0,j.stringToBytes)(d0.responseText)),p0){_(p0);return}}H(new Error(d0.statusText))}},d0.send(null)})}class t0 extends K.BaseCMapReaderFactory{_fetchData(l0,_){return i0(l0,this.isCompressed).then(H=>({cMapData:H,compressionType:_}))}}M.DOMCMapReaderFactory=t0;class P extends K.BaseStandardFontDataFactory{_fetchData(l0){return i0(l0,!0)}}M.DOMStandardFontDataFactory=P;class c0 extends K.BaseSVGFactory{_createSVG(l0){return document.createElementNS(U,l0)}}M.DOMSVGFactory=c0;class s0{constructor(l0){let{viewBox:_,scale:H,rotation:d0,offsetX:p0=0,offsetY:m0=0,dontFlip:r0=!1}=l0;this.viewBox=_,this.scale=H,this.rotation=d0,this.offsetX=p0,this.offsetY=m0;const O0=(_[2]+_[0])/2,h0=(_[3]+_[1])/2;let G0,z0,g0,f0,S0,J,e0,a0;switch(d0%=360,d0<0&&(d0+=360),d0){case 180:G0=-1,z0=0,g0=0,f0=1;break;case 90:G0=0,z0=1,g0=1,f0=0;break;case 270:G0=0,z0=-1,g0=-1,f0=0;break;case 0:G0=1,z0=0,g0=0,f0=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}r0&&(g0=-g0,f0=-f0),G0===0?(S0=Math.abs(h0-_[1])*H+p0,J=Math.abs(O0-_[0])*H+m0,e0=(_[3]-_[1])*H,a0=(_[2]-_[0])*H):(S0=Math.abs(O0-_[0])*H+p0,J=Math.abs(h0-_[1])*H+m0,e0=(_[2]-_[0])*H,a0=(_[3]-_[1])*H),this.transform=[G0*H,z0*H,g0*H,f0*H,S0-G0*H*O0-g0*H*h0,J-z0*H*O0-f0*H*h0],this.width=e0,this.height=a0}get rawDims(){const{viewBox:l0}=this;return(0,j.shadow)(this,"rawDims",{pageWidth:l0[2]-l0[0],pageHeight:l0[3]-l0[1],pageX:l0[0],pageY:l0[1]})}clone(){let{scale:l0=this.scale,rotation:_=this.rotation,offsetX:H=this.offsetX,offsetY:d0=this.offsetY,dontFlip:p0=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new s0({viewBox:this.viewBox.slice(),scale:l0,rotation:_,offsetX:H,offsetY:d0,dontFlip:p0})}convertToViewportPoint(l0,_){return j.Util.applyTransform([l0,_],this.transform)}convertToViewportRectangle(l0){const _=j.Util.applyTransform([l0[0],l0[1]],this.transform),H=j.Util.applyTransform([l0[2],l0[3]],this.transform);return[_[0],_[1],H[0],H[1]]}convertToPdfPoint(l0,_){return j.Util.applyInverseTransform([l0,_],this.transform)}}M.PageViewport=s0;class W0 extends j.BaseException{constructor(l0,_){let H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;super(l0,"RenderingCancelledException"),this.type=_,this.extraDelay=H}}M.RenderingCancelledException=W0;function M0($){const l0=$.length;let _=0;for(;_<l0&&$[_].trim()==="";)_++;return $.substring(_,_+5).toLowerCase()==="data:"}M.StatTimer=class{constructor(){It(this,"started",Object.create(null)),It(this,"times",[])}time($){$ in this.started&&(0,j.warn)(`Timer is already running for ${$}`),this.started[$]=Date.now()}timeEnd($){$ in this.started||(0,j.warn)(`Timer has not been started for ${$}`),this.times.push({name:$,start:this.started[$],end:Date.now()}),delete this.started[$]}toString(){const $=[];let l0=0;for(const{name:_}of this.times)l0=Math.max(_.length,l0);for(const{name:_,start:H,end:d0}of this.times)$.push(`${_.padEnd(l0)} ${d0-H}ms
64
+ La instalación es sencilla y directa, permite fijarla a una base en la pared con mantenimiento sin complicaciones, asegurando un rendimiento continuo. La gestión de contenido remoto permite actualizar tus mensajes al instante, manteniendo tu comunicación siempre fresca y relevante.`,ID_GAMA:23,TAGS:null,CONTACTO:{UBICACION:{PROVINCIA:"Madrid",CIUDAD:"Madrid"}},PROPS:{idiomas:["spanish","catalan","english"],especializacion:["jovenes_profesionales","mayores_de_55","para_familias_numerosas"],especializacion_de_residencia:["zonas_rurales","segunda_residencia_casa_vacacional"],fecha_de_inicio:"1999"},PACK:!1,GRUPO:null,PAQUETE:!1,ID_PRODUCTOS_PAQUETE:null,PRECIO:"1.00",PRECIOS:null,FECHA_ALTA:"2025-06-10",R_ARCHIVOS:[{ID_ARCHIVO:932,LOCATION:"https://w2w-files.s3.amazonaws.com/linvermedia/efc54a4719e9ebc4_Banderola%20670.png",FILETYPE:"image"},{ID_ARCHIVO:936,LOCATION:"https://w2w-files.s3.amazonaws.com/linvermedia/a9f8ce2a718e4aaf_Pantalla%20LED%20P5.7%20Exterior%20de%20Gran%20Brillo%20y%20Visibilidad%20%2811%29.png",FILETYPE:"image"},{ID_ARCHIVO:943,LOCATION:"https://w2w-files.s3.amazonaws.com/linvermedia/c7365d0fafef1188_Banderola%20LED%20Linvermedia.png",FILETYPE:"image"}]}]),BROKER_DETAIL_MOCK_PROPS={isPublic:!0,data:{},gamaProps:[],fetching:!1,descriptionLines:4,scale:1},BrokerDetailPropsSchema=WidgetPropsSchema.extend({descriptionLines:numberType().optional(),hiddenProps:arrayType(stringType()).optional(),gamaProps:arrayType(recordType(stringType(),anyType()))}),LocalWidgetsIndex={linvermedia_product_card:{description:"Card de producto para Linvermedia",component:LinvermediaProductCard,group:"linvermedia",schema:LinvermediaProductCardPropsSchema,mock:{props:LINVERMEDIA_PRODUCT_CARD_MOCK_PROPS,data:LINVERMEDIA_PRODUCT_CARD_MOCK_DATA,idKey:"ID_PRODUCTO",labelKey:"NOMBRE"}},linvermedia_product_detail:{description:"Detalle de producto para Linvermedia",component:LinvermediaProductDetail,group:"linvermedia",schema:LinvermediaProductDetailPropsSchema,mock:{props:LINVERMEDIA_PRODUCT_DETAIL_MOCK_PROPS,data:LINVERMEDIA_PRODUCT_DETAIL_MOCK_DATA,idKey:"id",labelKey:"nombre"}},linvermedia_solicitud_card:{description:"Card de solicitud para Linvermedia",component:LinvermediaSolicitudCard,group:"linvermedia",schema:LinvermediaSolicitudCardPropsSchema,mock:{props:LINVERMEDIA_SOLICITUD_CARD_MOCK_PROPS,data:LINVERMEDIA_SOLICITUD_CARD_MOCK_DATA,idKey:"ID_CAPTACION",labelKey:"COD_CAPTACION"}},broker_card:{description:"Card de Brokers",component:BrokerCard,group:"myhipoteca",schema:BrokerCardPropsSchema,mock:{props:BROKER_CARD_MOCK_PROPS,data:BROKER_CARD_MOCK_DATA,idKey:"ID_BROKER",labelKey:"NOMBRE"}},broker_detail:{description:"Detail de Brokers",component:BrokerDetail,group:"myhipoteca",schema:BrokerDetailPropsSchema,mock:{props:BROKER_DETAIL_MOCK_PROPS,data:BROKER_DETAIL_MOCK_DATA,idKey:"ID_BROKER",labelKey:"NOMBRE"}}},WidgetsIndex=lodashExports.mapValues(LocalWidgetsIndex,s=>lodashExports.omit(s,"mock")),W2WSharedUi={install(s,M){if(M!=null&&M.pinia)s.use(M.pinia);else throw new Error("No se ha encontrado una instancia de pinia");s.component("SectionsContainer",SectionsContainer),s.component("Card",Card$1),s.component("DynamicCarousel",_sfc_main$A),s.component("IndicatorColor",IndicatorColor),s.component("SectionSpinner",SectionSpinner),s.component("StateIndicator",StateIndicator),s.component("IconButton",IconButton),s.component("Button",_sfc_main$F),s.component("MenuButton",_sfc_main$x),s.component("ProductPrice",ProductPrice),s.component("ProductProps",_sfc_main$f),s.component("ProductTag",ProductTag),s.component("BrokerCard",BrokerCard),s.component("BrokerDetail",BrokerDetail),Object.entries(WidgetsIndex).forEach(([o,u])=>{s.component(o,u.component)})}};var vr=Object.defineProperty,br=(s,M,o)=>M in s?vr(s,M,{enumerable:!0,configurable:!0,writable:!0,value:o}):s[M]=o,It=(s,M,o)=>(br(s,typeof M!="symbol"?M+"":M,o),o),ye=(s,M,o)=>{if(!M.has(s))throw TypeError("Cannot "+o)},T=(s,M,o)=>(ye(s,M,"read from private field"),o?o.call(s):M.get(s)),et=(s,M,o)=>{if(M.has(s))throw TypeError("Cannot add the same private member more than once");M instanceof WeakSet?M.add(s):M.set(s,o)},ut=(s,M,o,u)=>(ye(s,M,"write to private field"),M.set(s,o),o),ue=(s,M,o,u)=>({set _(z){ut(s,M,z)},get _(){return T(s,M,u)}}),nt=(s,M,o)=>(ye(s,M,"access private method"),o),commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function getAugmentedNamespace(s){if(s.__esModule)return s;var M=s.default;if(typeof M=="function"){var o=function u(){if(this instanceof u){var z=[null];z.push.apply(z,arguments);var W=Function.bind.apply(M,z);return new W}return M.apply(this,arguments)};o.prototype=M.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(s).forEach(function(u){var z=Object.getOwnPropertyDescriptor(s,u);Object.defineProperty(o,u,z.get?z:{enumerable:!0,get:function(){return s[u]}})}),o}function commonjsRequire(s){throw new Error('Could not dynamically require "'+s+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pdf_min$2={exports:{}};const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$6=getAugmentedNamespace(__viteBrowserExternal$1);var path2dPolyfill_min={},hasRequiredPath2dPolyfill_min;function requirePath2dPolyfill_min(){return hasRequiredPath2dPolyfill_min||(hasRequiredPath2dPolyfill_min=1,function(){function s(G,V,g){for(var R,S=0,C=V.length;S<C;S++)!R&&S in V||(R||(R=Array.prototype.slice.call(V,0,S)),R[S]=V[S]);return G.concat(R||Array.prototype.slice.call(V))}var M={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},o=/([astvzqmhlc])([^astvzqmhlc]*)/gi,u=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function z(G){var V=[],g=String(G).trim();return g[0]!=="M"&&g[0]!=="m"||g.replace(o,function(R,S,C){var F=function(U){var E=U.match(u);return E?E.map(Number):[]}(C),K=S.toLowerCase(),j=S;if(K==="m"&&F.length>2&&(V.push(s([j],F.splice(0,2))),K="l",j=j==="m"?"l":"L"),F.length<M[K])return"";for(V.push(s([j],F.splice(0,M[K])));F.length>=M[K]&&F.length&&M[K];)V.push(s([j],F.splice(0,M[K])));return""}),V}function W(G,V){var g=G.x*Math.cos(V)-G.y*Math.sin(V),R=G.y*Math.cos(V)+G.x*Math.sin(V);G.x=g,G.y=R}function O(G,V){G.x*=V,G.y*=V}var N=function(){function G(V){var g;this.commands=[],V&&V instanceof G?(g=this.commands).push.apply(g,V.commands):V&&(this.commands=z(V))}return G.prototype.addPath=function(V){var g;V&&V instanceof G&&(g=this.commands).push.apply(g,V.commands)},G.prototype.moveTo=function(V,g){this.commands.push(["M",V,g])},G.prototype.lineTo=function(V,g){this.commands.push(["L",V,g])},G.prototype.arc=function(V,g,R,S,C,F){this.commands.push(["AC",V,g,R,S,C,!!F])},G.prototype.arcTo=function(V,g,R,S,C){this.commands.push(["AT",V,g,R,S,C])},G.prototype.ellipse=function(V,g,R,S,C,F,K,j){this.commands.push(["E",V,g,R,S,C,F,K,!!j])},G.prototype.closePath=function(){this.commands.push(["Z"])},G.prototype.bezierCurveTo=function(V,g,R,S,C,F){this.commands.push(["C",V,g,R,S,C,F])},G.prototype.quadraticCurveTo=function(V,g,R,S){this.commands.push(["Q",V,g,R,S])},G.prototype.rect=function(V,g,R,S){this.commands.push(["R",V,g,R,S])},G.prototype.roundRect=function(V,g,R,S,C){C===void 0?this.commands.push(["RR",V,g,R,S,0]):this.commands.push(["RR",V,g,R,S,C])},G}();function X(G,V){var g,R,S,C,F,K,j,U,E,D,v,q,i0,t0,P,c0,s0,W0,M0,X0,B,Q,$,l0,_=0,H=0,d0=null,p0=null,m0=null,r0=null,O0=null,h0=null;G.beginPath();for(var G0=0;G0<V.length;++G0){(W0=V[G0][0])!=="S"&&W0!=="s"&&W0!=="C"&&W0!=="c"&&(d0=null,p0=null),W0!=="T"&&W0!=="t"&&W0!=="Q"&&W0!=="q"&&(m0=null,r0=null);var z0=void 0;switch(W0){case"m":case"M":z0=V[G0],W0==="m"?(_+=z0[1],H+=z0[2]):(_=z0[1],H=z0[2]),W0!=="M"&&O0||(O0={x:_,y:H}),G.moveTo(_,H);break;case"l":_+=(z0=V[G0])[1],H+=z0[2],G.lineTo(_,H);break;case"L":_=(z0=V[G0])[1],H=z0[2],G.lineTo(_,H);break;case"H":_=(z0=V[G0])[1],G.lineTo(_,H);break;case"h":_+=(z0=V[G0])[1],G.lineTo(_,H);break;case"V":H=(z0=V[G0])[1],G.lineTo(_,H);break;case"v":H+=(z0=V[G0])[1],G.lineTo(_,H);break;case"a":case"A":if(z0=V[G0],h0===null)throw new Error("This should never happen");W0==="a"?(_+=z0[6],H+=z0[7]):(_=z0[6],H=z0[7]),t0=z0[1],P=z0[2],j=z0[3]*Math.PI/180,S=!!z0[4],C=!!z0[5],F={x:_,y:H},W(K={x:(h0.x-F.x)/2,y:(h0.y-F.y)/2},-j),(U=K.x*K.x/(t0*t0)+K.y*K.y/(P*P))>1&&(t0*=U=Math.sqrt(U),P*=U),E=t0*t0*P*P,D=t0*t0*K.y*K.y+P*P*K.x*K.x,O(M0={x:t0*K.y/P,y:-P*K.x/t0},C!==S?Math.sqrt((E-D)/D)||0:-Math.sqrt((E-D)/D)||0),R=Math.atan2((K.y-M0.y)/P,(K.x-M0.x)/t0),g=Math.atan2(-(K.y+M0.y)/P,-(K.x+M0.x)/t0),W(M0,j),Q=M0,$=(F.x+h0.x)/2,l0=(F.y+h0.y)/2,Q.x+=$,Q.y+=l0,G.save(),G.translate(M0.x,M0.y),G.rotate(j),G.scale(t0,P),G.arc(0,0,1,R,g,!C),G.restore();break;case"C":d0=(z0=V[G0])[3],p0=z0[4],_=z0[5],H=z0[6],G.bezierCurveTo(z0[1],z0[2],d0,p0,_,H);break;case"c":z0=V[G0],G.bezierCurveTo(z0[1]+_,z0[2]+H,z0[3]+_,z0[4]+H,z0[5]+_,z0[6]+H),d0=z0[3]+_,p0=z0[4]+H,_+=z0[5],H+=z0[6];break;case"S":z0=V[G0],d0!==null&&p0!==null||(d0=_,p0=H),G.bezierCurveTo(2*_-d0,2*H-p0,z0[1],z0[2],z0[3],z0[4]),d0=z0[1],p0=z0[2],_=z0[3],H=z0[4];break;case"s":z0=V[G0],d0!==null&&p0!==null||(d0=_,p0=H),G.bezierCurveTo(2*_-d0,2*H-p0,z0[1]+_,z0[2]+H,z0[3]+_,z0[4]+H),d0=z0[1]+_,p0=z0[2]+H,_+=z0[3],H+=z0[4];break;case"Q":m0=(z0=V[G0])[1],r0=z0[2],_=z0[3],H=z0[4],G.quadraticCurveTo(m0,r0,_,H);break;case"q":m0=(z0=V[G0])[1]+_,r0=z0[2]+H,_+=z0[3],H+=z0[4],G.quadraticCurveTo(m0,r0,_,H);break;case"T":m0!==null&&r0!==null||(m0=_,r0=H),m0=2*_-m0,r0=2*H-r0,_=(z0=V[G0])[1],H=z0[2],G.quadraticCurveTo(m0,r0,_,H);break;case"t":m0!==null&&r0!==null||(m0=_,r0=H),m0=2*_-m0,r0=2*H-r0,_+=(z0=V[G0])[1],H+=z0[2],G.quadraticCurveTo(m0,r0,_,H);break;case"z":case"Z":O0&&(_=O0.x,H=O0.y),O0=null,G.closePath();break;case"AC":_=(z0=V[G0])[1],H=z0[2],i0=z0[3],R=z0[4],g=z0[5],X0=z0[6],G.arc(_,H,i0,R,g,X0);break;case"AT":v=(z0=V[G0])[1],q=z0[2],_=z0[3],H=z0[4],i0=z0[5],G.arcTo(v,q,_,H,i0);break;case"E":_=(z0=V[G0])[1],H=z0[2],t0=z0[3],P=z0[4],j=z0[5],R=z0[6],g=z0[7],X0=z0[8],G.save(),G.translate(_,H),G.rotate(j),G.scale(t0,P),G.arc(0,0,1,R,g,X0),G.restore();break;case"R":_=(z0=V[G0])[1],H=z0[2],c0=z0[3],s0=z0[4],O0={x:_,y:H},G.rect(_,H,c0,s0);break;case"RR":_=(z0=V[G0])[1],H=z0[2],c0=z0[3],s0=z0[4],B=z0[5],O0={x:_,y:H},G.roundRect(_,H,c0,s0,B)}h0?(h0.x=_,h0.y=H):h0={x:_,y:H}}}function y(G,V,g,R,S){var C=this;if(S===void 0&&(S=0),typeof S=="number"&&(S=[S]),Array.isArray(S)){if(S.length===0||S.length>4)throw new RangeError("Failed to execute 'roundRect' on '".concat(this.constructor.name,"': ").concat(S.length," radii provided. Between one and four radii are necessary."));if(S.forEach(function(D){if(D<0)throw new RangeError("Failed to execute 'roundRect' on '".concat(C.constructor.name,"': Radius value ").concat(D," is negative."))}),S.length===1&&S[0]===0)return this.rect(G,V,g,R);var F,K,j,U=Math.min(g,R)/2,E=F=K=j=Math.min(U,S[0]);S.length===2&&(F=j=Math.min(U,S[1])),S.length===3&&(F=j=Math.min(U,S[1]),K=Math.min(U,S[2])),S.length===4&&(F=Math.min(U,S[1]),K=Math.min(U,S[2]),j=Math.min(U,S[3])),this.moveTo(G,V+R-j),this.arcTo(G,V,G+E,V,E),this.arcTo(G+g,V,G+g,V+F,F),this.arcTo(G+g,V+R,G+g-K,V+R,K),this.arcTo(G,V+R,G,V+R-j,j),this.moveTo(G,V)}}(function(G){if(G&&G.CanvasRenderingContext2D&&!G.Path2D){var V=G.CanvasRenderingContext2D,g=V.prototype.fill,R=V.prototype.stroke,S=V.prototype.isPointInPath;V.prototype.fill=function(){for(var C=[],F=0;F<arguments.length;F++)C[F]=arguments[F];if(!(C[0]instanceof N))return j=C[0]||"nonzero",g.apply(this,[j]);var K=C[0],j=C[1]||"nonzero";X(this,K.commands),g.apply(this,[j])},V.prototype.stroke=function(C){C&&X(this,C.commands),R.apply(this)},V.prototype.isPointInPath=function(){for(var C=[],F=0;F<arguments.length;F++)C[F]=arguments[F];if(C[0]instanceof N){var K=C[0],j=C[1],U=C[2],E=C[3]||"nonzero";return X(this,K.commands),S.apply(this,[j,U,E])}return S.apply(this,C)},G.Path2D=N}})(window),function(G){if(G&&G.CanvasRenderingContext2D){var V=G.CanvasRenderingContext2D,g=G.Path2D;V&&!V.prototype.roundRect&&(V.prototype.roundRect=y),g&&!g.prototype.roundRect&&(g.prototype.roundRect=y)}}(window)}()),path2dPolyfill_min}(function(module,exports){(function(s,M){module.exports=M()})(globalThis,()=>(()=>{var __webpack_modules__=[,(s,M,o)=>{var u,z;Object.defineProperty(M,"__esModule",{value:!0}),M.VerbosityLevel=M.Util=M.UnknownErrorException=M.UnexpectedResponseException=M.TextRenderingMode=M.RenderingIntentFlag=M.PromiseCapability=M.PermissionFlag=M.PasswordResponses=M.PasswordException=M.PageActionEventType=M.OPS=M.MissingPDFException=M.MAX_IMAGE_SIZE_TO_CACHE=M.LINE_FACTOR=M.LINE_DESCENT_FACTOR=M.InvalidPDFException=M.ImageKind=M.IDENTITY_MATRIX=M.FormatError=M.FeatureTest=M.FONT_IDENTITY_MATRIX=M.DocumentActionEventType=M.CMapCompressionType=M.BaseException=M.BASELINE_FACTOR=M.AnnotationType=M.AnnotationStateModelType=M.AnnotationReviewState=M.AnnotationReplyType=M.AnnotationMode=M.AnnotationMarkedState=M.AnnotationFlag=M.AnnotationFieldFlag=M.AnnotationEditorType=M.AnnotationEditorPrefix=M.AnnotationEditorParamsType=M.AnnotationBorderStyleType=M.AnnotationActionEventType=M.AbortException=void 0,M.assert=function(j,U){j||X(U)},M.bytesToString=function(j){typeof j=="object"&&(j==null?void 0:j.length)!==void 0||X("Invalid argument for bytesToString");const U=j.length,E=8192;if(U<E)return String.fromCharCode.apply(null,j);const D=[];for(let v=0;v<U;v+=E){const q=Math.min(v+E,U),i0=j.subarray(v,q);D.push(String.fromCharCode.apply(null,i0))}return D.join("")},M.createValidAbsoluteUrl=function(j){let U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!j)return null;try{if(E&&typeof j=="string"){if(E.addDefaultProtocol&&j.startsWith("www.")){const v=j.match(/\./g);(v==null?void 0:v.length)>=2&&(j=`http://${j}`)}if(E.tryConvertEncoding)try{j=C(j)}catch{}}const D=U?new URL(j,U):new URL(j);if(function(v){switch(v==null?void 0:v.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(D))return D}catch{}return null},M.getModificationDate=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Date;return[j.getUTCFullYear().toString(),(j.getUTCMonth()+1).toString().padStart(2,"0"),j.getUTCDate().toString().padStart(2,"0"),j.getUTCHours().toString().padStart(2,"0"),j.getUTCMinutes().toString().padStart(2,"0"),j.getUTCSeconds().toString().padStart(2,"0")].join("")},M.getVerbosityLevel=function(){return O},M.info=function(j){O>=W.INFOS&&console.log(`Info: ${j}`)},M.isArrayBuffer=function(j){return typeof j=="object"&&(j==null?void 0:j.byteLength)!==void 0},M.isArrayEqual=function(j,U){if(j.length!==U.length)return!1;for(let E=0,D=j.length;E<D;E++)if(j[E]!==U[E])return!1;return!0},M.normalizeUnicode=function(j){return F||(F=/([\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,K=new Map([["ſt","ſt"]])),j.replaceAll(F,(U,E,D)=>E?E.normalize("NFKC"):K.get(D))},M.objectFromMap=function(j){const U=Object.create(null);for(const[E,D]of j)U[E]=D;return U},M.objectSize=function(j){return Object.keys(j).length},M.setVerbosityLevel=function(j){Number.isInteger(j)&&(O=j)},M.shadow=y,M.string32=function(j){return String.fromCharCode(j>>24&255,j>>16&255,j>>8&255,255&j)},M.stringToBytes=V,M.stringToPDFString=function(j){if(j[0]>="ï"){let E;if(j[0]==="þ"&&j[1]==="ÿ"?E="utf-16be":j[0]==="ÿ"&&j[1]==="þ"?E="utf-16le":j[0]==="ï"&&j[1]==="»"&&j[2]==="¿"&&(E="utf-8"),E)try{const D=new TextDecoder(E,{fatal:!0}),v=V(j);return D.decode(v)}catch(D){N(`stringToPDFString: "${D}".`)}}const U=[];for(let E=0,D=j.length;E<D;E++){const v=S[j.charCodeAt(E)];U.push(v?String.fromCharCode(v):j.charAt(E))}return U.join("")},M.stringToUTF8String=C,M.unreachable=X,M.utf8StringToString=function(j){return unescape(encodeURIComponent(j))},M.warn=N,globalThis._pdfjsCompatibilityChecked||(globalThis._pdfjsCompatibilityChecked=!0,o(2)),M.IDENTITY_MATRIX=[1,0,0,1,0,0],M.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],M.MAX_IMAGE_SIZE_TO_CACHE=1e7,M.LINE_FACTOR=1.35,M.LINE_DESCENT_FACTOR=.35,M.BASELINE_FACTOR=.25925925925925924,M.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},M.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},M.AnnotationEditorPrefix="pdfjs_internal_editor_",M.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,INK:15},M.AnnotationEditorParamsType={FREETEXT_SIZE:1,FREETEXT_COLOR:2,FREETEXT_OPACITY:3,INK_COLOR:11,INK_THICKNESS:12,INK_OPACITY:13},M.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},M.TextRenderingMode={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},M.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},M.AnnotationType={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},M.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},M.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},M.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},M.AnnotationReplyType={GROUP:"Group",REPLY:"R"},M.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},M.AnnotationFieldFlag={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},M.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},M.AnnotationActionEventType={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"},M.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},M.PageActionEventType={O:"PageOpen",C:"PageClose"};const W={ERRORS:0,WARNINGS:1,INFOS:5};M.VerbosityLevel=W,M.CMapCompressionType={NONE:0,BINARY:1},M.OPS={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},M.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let O=W.WARNINGS;function N(j){O>=W.WARNINGS&&console.log(`Warning: ${j}`)}function X(j){throw new Error(j)}function y(j,U,E){let D=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return Object.defineProperty(j,U,{value:E,enumerable:!D,configurable:!0,writable:!1}),E}const G=function(){function j(U,E){this.constructor===j&&X("Cannot initialize BaseException."),this.message=U,this.name=E}return j.prototype=new Error,j.constructor=j,j}();M.BaseException=G,M.PasswordException=class extends G{constructor(j,U){super(j,"PasswordException"),this.code=U}},M.UnknownErrorException=class extends G{constructor(j,U){super(j,"UnknownErrorException"),this.details=U}},M.InvalidPDFException=class extends G{constructor(j){super(j,"InvalidPDFException")}},M.MissingPDFException=class extends G{constructor(j){super(j,"MissingPDFException")}},M.UnexpectedResponseException=class extends G{constructor(j,U){super(j,"UnexpectedResponseException"),this.status=U}},M.FormatError=class extends G{constructor(j){super(j,"FormatError")}},M.AbortException=class extends G{constructor(j){super(j,"AbortException")}};function V(j){typeof j!="string"&&X("Invalid argument for stringToBytes");const U=j.length,E=new Uint8Array(U);for(let D=0;D<U;++D)E[D]=255&j.charCodeAt(D);return E}M.FeatureTest=class{static get isLittleEndian(){return y(this,"isLittleEndian",function(){const j=new Uint8Array(4);return j[0]=1,new Uint32Array(j.buffer,0,1)[0]===1}())}static get isEvalSupported(){return y(this,"isEvalSupported",function(){try{return new Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return y(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator>"u"?y(this,"platform",{isWin:!1,isMac:!1}):y(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}};const g=[...Array(256).keys()].map(j=>j.toString(16).padStart(2,"0"));class R{static makeHexColor(U,E,D){return`#${g[U]}${g[E]}${g[D]}`}static scaleMinMax(U,E){let D;U[0]?(U[0]<0&&(D=E[0],E[0]=E[1],E[1]=D),E[0]*=U[0],E[1]*=U[0],U[3]<0&&(D=E[2],E[2]=E[3],E[3]=D),E[2]*=U[3],E[3]*=U[3]):(D=E[0],E[0]=E[2],E[2]=D,D=E[1],E[1]=E[3],E[3]=D,U[1]<0&&(D=E[2],E[2]=E[3],E[3]=D),E[2]*=U[1],E[3]*=U[1],U[2]<0&&(D=E[0],E[0]=E[1],E[1]=D),E[0]*=U[2],E[1]*=U[2]),E[0]+=U[4],E[1]+=U[4],E[2]+=U[5],E[3]+=U[5]}static transform(U,E){return[U[0]*E[0]+U[2]*E[1],U[1]*E[0]+U[3]*E[1],U[0]*E[2]+U[2]*E[3],U[1]*E[2]+U[3]*E[3],U[0]*E[4]+U[2]*E[5]+U[4],U[1]*E[4]+U[3]*E[5]+U[5]]}static applyTransform(U,E){return[U[0]*E[0]+U[1]*E[2]+E[4],U[0]*E[1]+U[1]*E[3]+E[5]]}static applyInverseTransform(U,E){const D=E[0]*E[3]-E[1]*E[2];return[(U[0]*E[3]-U[1]*E[2]+E[2]*E[5]-E[4]*E[3])/D,(-U[0]*E[1]+U[1]*E[0]+E[4]*E[1]-E[5]*E[0])/D]}static getAxialAlignedBoundingBox(U,E){const D=R.applyTransform(U,E),v=R.applyTransform(U.slice(2,4),E),q=R.applyTransform([U[0],U[3]],E),i0=R.applyTransform([U[2],U[1]],E);return[Math.min(D[0],v[0],q[0],i0[0]),Math.min(D[1],v[1],q[1],i0[1]),Math.max(D[0],v[0],q[0],i0[0]),Math.max(D[1],v[1],q[1],i0[1])]}static inverseTransform(U){const E=U[0]*U[3]-U[1]*U[2];return[U[3]/E,-U[1]/E,-U[2]/E,U[0]/E,(U[2]*U[5]-U[4]*U[3])/E,(U[4]*U[1]-U[5]*U[0])/E]}static singularValueDecompose2dScale(U){const E=[U[0],U[2],U[1],U[3]],D=U[0]*E[0]+U[1]*E[2],v=U[0]*E[1]+U[1]*E[3],q=U[2]*E[0]+U[3]*E[2],i0=U[2]*E[1]+U[3]*E[3],t0=(D+i0)/2,P=Math.sqrt((D+i0)**2-4*(D*i0-q*v))/2,c0=t0+P||1,s0=t0-P||1;return[Math.sqrt(c0),Math.sqrt(s0)]}static normalizeRect(U){const E=U.slice(0);return U[0]>U[2]&&(E[0]=U[2],E[2]=U[0]),U[1]>U[3]&&(E[1]=U[3],E[3]=U[1]),E}static intersect(U,E){const D=Math.max(Math.min(U[0],U[2]),Math.min(E[0],E[2])),v=Math.min(Math.max(U[0],U[2]),Math.max(E[0],E[2]));if(D>v)return null;const q=Math.max(Math.min(U[1],U[3]),Math.min(E[1],E[3])),i0=Math.min(Math.max(U[1],U[3]),Math.max(E[1],E[3]));return q>i0?null:[D,q,v,i0]}static bezierBoundingBox(U,E,D,v,q,i0,t0,P){const c0=[],s0=[[],[]];let W0,M0,X0,B,Q,$,l0,_;for(let m0=0;m0<2;++m0)if(m0===0?(M0=6*U-12*D+6*q,W0=-3*U+9*D-9*q+3*t0,X0=3*D-3*U):(M0=6*E-12*v+6*i0,W0=-3*E+9*v-9*i0+3*P,X0=3*v-3*E),Math.abs(W0)<1e-12){if(Math.abs(M0)<1e-12)continue;B=-X0/M0,0<B&&B<1&&c0.push(B)}else l0=M0*M0-4*X0*W0,_=Math.sqrt(l0),l0<0||(Q=(-M0+_)/(2*W0),0<Q&&Q<1&&c0.push(Q),$=(-M0-_)/(2*W0),0<$&&$<1&&c0.push($));let H,d0=c0.length;const p0=d0;for(;d0--;)B=c0[d0],H=1-B,s0[0][d0]=H*H*H*U+3*H*H*B*D+3*H*B*B*q+B*B*B*t0,s0[1][d0]=H*H*H*E+3*H*H*B*v+3*H*B*B*i0+B*B*B*P;return s0[0][p0]=U,s0[1][p0]=E,s0[0][p0+1]=t0,s0[1][p0+1]=P,s0[0].length=s0[1].length=p0+2,[Math.min(...s0[0]),Math.min(...s0[1]),Math.max(...s0[0]),Math.max(...s0[1])]}}M.Util=R;const S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function C(j){return decodeURIComponent(escape(j))}M.PromiseCapability=(z=class{constructor(){et(this,u,!1),this.promise=new Promise((j,U)=>{this.resolve=E=>{ut(this,u,!0),j(E)},this.reject=E=>{ut(this,u,!0),U(E)}})}get settled(){return T(this,u)}},u=new WeakMap,z);let F=null,K=null},(s,M,o)=>{var u=o(3);(function(){!globalThis.DOMMatrix&&u.isNodeJS&&(globalThis.DOMMatrix=require$$6.DOMMatrix)})(),function(){if(globalThis.Path2D||!u.isNodeJS)return;const{CanvasRenderingContext2D:z}=require$$6,{polyfillPath2D:W}=requirePath2dPolyfill_min();globalThis.CanvasRenderingContext2D=z,W(globalThis)}(),function(){Array.prototype.at||o(4)}(),function(){Uint8Array.prototype.at||o(78)}(),function(){globalThis.structuredClone||o(90)}()},(s,M)=>{Object.defineProperty(M,"__esModule",{value:!0}),M.isNodeJS=void 0;const o=!(typeof process!="object"||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&process.type!=="browser");M.isNodeJS=o},(s,M,o)=>{o(5);var u=o(77);s.exports=u("Array","at")},(s,M,o)=>{var u=o(6),z=o(43),W=o(67),O=o(65),N=o(72);u({target:"Array",proto:!0},{at:function(X){var y=z(this),G=W(y),V=O(X),g=V>=0?V:G+V;return g<0||g>=G?void 0:y[g]}}),N("at")},(s,M,o)=>{var u=o(7),z=o(8).f,W=o(47),O=o(51),N=o(41),X=o(59),y=o(71);s.exports=function(G,V){var g,R,S,C,F,K=G.target,j=G.global,U=G.stat;if(g=j?u:U?u[K]||N(K,{}):(u[K]||{}).prototype)for(R in V){if(C=V[R],S=G.dontCallGetSet?(F=z(g,R))&&F.value:g[R],!y(j?R:K+(U?".":"#")+R,G.forced)&&S!==void 0){if(typeof C==typeof S)continue;X(C,S)}(G.sham||S&&S.sham)&&W(C,"sham",!0),O(g,R,C,G)}}},function(s){var M=function(o){return o&&o.Math==Math&&o};s.exports=M(typeof globalThis=="object"&&globalThis)||M(typeof window=="object"&&window)||M(typeof self=="object"&&self)||M(typeof commonjsGlobal=="object"&&commonjsGlobal)||function(){return this}()||this||Function("return this")()},(s,M,o)=>{var u=o(9),z=o(11),W=o(13),O=o(14),N=o(15),X=o(21),y=o(42),G=o(45),V=Object.getOwnPropertyDescriptor;M.f=u?V:function(g,R){if(g=N(g),R=X(R),G)try{return V(g,R)}catch{}if(y(g,R))return O(!z(W.f,g,R),g[R])}},(s,M,o)=>{var u=o(10);s.exports=!u(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},s=>{s.exports=function(M){try{return!!M()}catch{return!0}}},(s,M,o)=>{var u=o(12),z=Function.prototype.call;s.exports=u?z.bind(z):function(){return z.apply(z,arguments)}},(s,M,o)=>{var u=o(10);s.exports=!u(function(){var z=(function(){}).bind();return typeof z!="function"||z.hasOwnProperty("prototype")})},(s,M)=>{var o={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,z=u&&!o.call({1:2},1);M.f=z?function(W){var O=u(this,W);return!!O&&O.enumerable}:o},s=>{s.exports=function(M,o){return{enumerable:!(1&M),configurable:!(2&M),writable:!(4&M),value:o}}},(s,M,o)=>{var u=o(16),z=o(19);s.exports=function(W){return u(z(W))}},(s,M,o)=>{var u=o(17),z=o(10),W=o(18),O=Object,N=u("".split);s.exports=z(function(){return!O("z").propertyIsEnumerable(0)})?function(X){return W(X)=="String"?N(X,""):O(X)}:O},(s,M,o)=>{var u=o(12),z=Function.prototype,W=z.call,O=u&&z.bind.bind(W,W);s.exports=u?O:function(N){return function(){return W.apply(N,arguments)}}},(s,M,o)=>{var u=o(17),z=u({}.toString),W=u("".slice);s.exports=function(O){return W(z(O),8,-1)}},(s,M,o)=>{var u=o(20),z=TypeError;s.exports=function(W){if(u(W))throw z("Can't call method on "+W);return W}},s=>{s.exports=function(M){return M==null}},(s,M,o)=>{var u=o(22),z=o(26);s.exports=function(W){var O=u(W,"string");return z(O)?O:O+""}},(s,M,o)=>{var u=o(11),z=o(23),W=o(26),O=o(33),N=o(36),X=o(37),y=TypeError,G=X("toPrimitive");s.exports=function(V,g){if(!z(V)||W(V))return V;var R,S=O(V,G);if(S){if(g===void 0&&(g="default"),R=u(S,V,g),!z(R)||W(R))return R;throw y("Can't convert object to primitive value")}return g===void 0&&(g="number"),N(V,g)}},(s,M,o)=>{var u=o(24),z=o(25),W=z.all;s.exports=z.IS_HTMLDDA?function(O){return typeof O=="object"?O!==null:u(O)||O===W}:function(O){return typeof O=="object"?O!==null:u(O)}},(s,M,o)=>{var u=o(25),z=u.all;s.exports=u.IS_HTMLDDA?function(W){return typeof W=="function"||W===z}:function(W){return typeof W=="function"}},s=>{var M=typeof document=="object"&&document.all,o=M===void 0&&M!==void 0;s.exports={all:M,IS_HTMLDDA:o}},(s,M,o)=>{var u=o(27),z=o(24),W=o(28),O=o(29),N=Object;s.exports=O?function(X){return typeof X=="symbol"}:function(X){var y=u("Symbol");return z(y)&&W(y.prototype,N(X))}},(s,M,o)=>{var u=o(7),z=o(24);s.exports=function(W,O){return arguments.length<2?(N=u[W],z(N)?N:void 0):u[W]&&u[W][O];var N}},(s,M,o)=>{var u=o(17);s.exports=u({}.isPrototypeOf)},(s,M,o)=>{var u=o(30);s.exports=u&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},(s,M,o)=>{var u=o(31),z=o(10),W=o(7).String;s.exports=!!Object.getOwnPropertySymbols&&!z(function(){var O=Symbol();return!W(O)||!(Object(O)instanceof Symbol)||!Symbol.sham&&u&&u<41})},(s,M,o)=>{var u,z,W=o(7),O=o(32),N=W.process,X=W.Deno,y=N&&N.versions||X&&X.version,G=y&&y.v8;G&&(z=(u=G.split("."))[0]>0&&u[0]<4?1:+(u[0]+u[1])),!z&&O&&(!(u=O.match(/Edge\/(\d+)/))||u[1]>=74)&&(u=O.match(/Chrome\/(\d+)/))&&(z=+u[1]),s.exports=z},s=>{s.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},(s,M,o)=>{var u=o(34),z=o(20);s.exports=function(W,O){var N=W[O];return z(N)?void 0:u(N)}},(s,M,o)=>{var u=o(24),z=o(35),W=TypeError;s.exports=function(O){if(u(O))return O;throw W(z(O)+" is not a function")}},s=>{var M=String;s.exports=function(o){try{return M(o)}catch{return"Object"}}},(s,M,o)=>{var u=o(11),z=o(24),W=o(23),O=TypeError;s.exports=function(N,X){var y,G;if(X==="string"&&z(y=N.toString)&&!W(G=u(y,N))||z(y=N.valueOf)&&!W(G=u(y,N))||X!=="string"&&z(y=N.toString)&&!W(G=u(y,N)))return G;throw O("Can't convert object to primitive value")}},(s,M,o)=>{var u=o(7),z=o(38),W=o(42),O=o(44),N=o(30),X=o(29),y=u.Symbol,G=z("wks"),V=X?y.for||y:y&&y.withoutSetter||O;s.exports=function(g){return W(G,g)||(G[g]=N&&W(y,g)?y[g]:V("Symbol."+g)),G[g]}},(s,M,o)=>{var u=o(39),z=o(40);(s.exports=function(W,O){return z[W]||(z[W]=O!==void 0?O:{})})("versions",[]).push({version:"3.30.2",mode:u?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"})},s=>{s.exports=!1},(s,M,o)=>{var u=o(7),z=o(41),W="__core-js_shared__",O=u[W]||z(W,{});s.exports=O},(s,M,o)=>{var u=o(7),z=Object.defineProperty;s.exports=function(W,O){try{z(u,W,{value:O,configurable:!0,writable:!0})}catch{u[W]=O}return O}},(s,M,o)=>{var u=o(17),z=o(43),W=u({}.hasOwnProperty);s.exports=Object.hasOwn||function(O,N){return W(z(O),N)}},(s,M,o)=>{var u=o(19),z=Object;s.exports=function(W){return z(u(W))}},(s,M,o)=>{var u=o(17),z=0,W=Math.random(),O=u(1 .toString);s.exports=function(N){return"Symbol("+(N===void 0?"":N)+")_"+O(++z+W,36)}},(s,M,o)=>{var u=o(9),z=o(10),W=o(46);s.exports=!u&&!z(function(){return Object.defineProperty(W("div"),"a",{get:function(){return 7}}).a!=7})},(s,M,o)=>{var u=o(7),z=o(23),W=u.document,O=z(W)&&z(W.createElement);s.exports=function(N){return O?W.createElement(N):{}}},(s,M,o)=>{var u=o(9),z=o(48),W=o(14);s.exports=u?function(O,N,X){return z.f(O,N,W(1,X))}:function(O,N,X){return O[N]=X,O}},(s,M,o)=>{var u=o(9),z=o(45),W=o(49),O=o(50),N=o(21),X=TypeError,y=Object.defineProperty,G=Object.getOwnPropertyDescriptor,V="enumerable",g="configurable",R="writable";M.f=u?W?function(S,C,F){if(O(S),C=N(C),O(F),typeof S=="function"&&C==="prototype"&&"value"in F&&R in F&&!F[R]){var K=G(S,C);K&&K[R]&&(S[C]=F.value,F={configurable:g in F?F[g]:K[g],enumerable:V in F?F[V]:K[V],writable:!1})}return y(S,C,F)}:y:function(S,C,F){if(O(S),C=N(C),O(F),z)try{return y(S,C,F)}catch{}if("get"in F||"set"in F)throw X("Accessors not supported");return"value"in F&&(S[C]=F.value),S}},(s,M,o)=>{var u=o(9),z=o(10);s.exports=u&&z(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},(s,M,o)=>{var u=o(23),z=String,W=TypeError;s.exports=function(O){if(u(O))return O;throw W(z(O)+" is not an object")}},(s,M,o)=>{var u=o(24),z=o(48),W=o(52),O=o(41);s.exports=function(N,X,y,G){G||(G={});var V=G.enumerable,g=G.name!==void 0?G.name:X;if(u(y)&&W(y,g,G),G.global)V?N[X]=y:O(X,y);else{try{G.unsafe?N[X]&&(V=!0):delete N[X]}catch{}V?N[X]=y:z.f(N,X,{value:y,enumerable:!1,configurable:!G.nonConfigurable,writable:!G.nonWritable})}return N}},(s,M,o)=>{var u=o(17),z=o(10),W=o(24),O=o(42),N=o(9),X=o(53).CONFIGURABLE,y=o(54),G=o(55),V=G.enforce,g=G.get,R=String,S=Object.defineProperty,C=u("".slice),F=u("".replace),K=u([].join),j=N&&!z(function(){return S(function(){},"length",{value:8}).length!==8}),U=String(String).split("String"),E=s.exports=function(D,v,q){C(R(v),0,7)==="Symbol("&&(v="["+F(R(v),/^Symbol\(([^)]*)\)/,"$1")+"]"),q&&q.getter&&(v="get "+v),q&&q.setter&&(v="set "+v),(!O(D,"name")||X&&D.name!==v)&&(N?S(D,"name",{value:v,configurable:!0}):D.name=v),j&&q&&O(q,"arity")&&D.length!==q.arity&&S(D,"length",{value:q.arity});try{q&&O(q,"constructor")&&q.constructor?N&&S(D,"prototype",{writable:!1}):D.prototype&&(D.prototype=void 0)}catch{}var i0=V(D);return O(i0,"source")||(i0.source=K(U,typeof v=="string"?v:"")),D};Function.prototype.toString=E(function(){return W(this)&&g(this).source||y(this)},"toString")},(s,M,o)=>{var u=o(9),z=o(42),W=Function.prototype,O=u&&Object.getOwnPropertyDescriptor,N=z(W,"name"),X=N&&(function(){}).name==="something",y=N&&(!u||u&&O(W,"name").configurable);s.exports={EXISTS:N,PROPER:X,CONFIGURABLE:y}},(s,M,o)=>{var u=o(17),z=o(24),W=o(40),O=u(Function.toString);z(W.inspectSource)||(W.inspectSource=function(N){return O(N)}),s.exports=W.inspectSource},(s,M,o)=>{var u,z,W,O=o(56),N=o(7),X=o(23),y=o(47),G=o(42),V=o(40),g=o(57),R=o(58),S="Object already initialized",C=N.TypeError,F=N.WeakMap;if(O||V.state){var K=V.state||(V.state=new F);K.get=K.get,K.has=K.has,K.set=K.set,u=function(U,E){if(K.has(U))throw C(S);return E.facade=U,K.set(U,E),E},z=function(U){return K.get(U)||{}},W=function(U){return K.has(U)}}else{var j=g("state");R[j]=!0,u=function(U,E){if(G(U,j))throw C(S);return E.facade=U,y(U,j,E),E},z=function(U){return G(U,j)?U[j]:{}},W=function(U){return G(U,j)}}s.exports={set:u,get:z,has:W,enforce:function(U){return W(U)?z(U):u(U,{})},getterFor:function(U){return function(E){var D;if(!X(E)||(D=z(E)).type!==U)throw C("Incompatible receiver, "+U+" required");return D}}}},(s,M,o)=>{var u=o(7),z=o(24),W=u.WeakMap;s.exports=z(W)&&/native code/.test(String(W))},(s,M,o)=>{var u=o(38),z=o(44),W=u("keys");s.exports=function(O){return W[O]||(W[O]=z(O))}},s=>{s.exports={}},(s,M,o)=>{var u=o(42),z=o(60),W=o(8),O=o(48);s.exports=function(N,X,y){for(var G=z(X),V=O.f,g=W.f,R=0;R<G.length;R++){var S=G[R];u(N,S)||y&&u(y,S)||V(N,S,g(X,S))}}},(s,M,o)=>{var u=o(27),z=o(17),W=o(61),O=o(70),N=o(50),X=z([].concat);s.exports=u("Reflect","ownKeys")||function(y){var G=W.f(N(y)),V=O.f;return V?X(G,V(y)):G}},(s,M,o)=>{var u=o(62),z=o(69).concat("length","prototype");M.f=Object.getOwnPropertyNames||function(W){return u(W,z)}},(s,M,o)=>{var u=o(17),z=o(42),W=o(15),O=o(63).indexOf,N=o(58),X=u([].push);s.exports=function(y,G){var V,g=W(y),R=0,S=[];for(V in g)!z(N,V)&&z(g,V)&&X(S,V);for(;G.length>R;)z(g,V=G[R++])&&(~O(S,V)||X(S,V));return S}},(s,M,o)=>{var u=o(15),z=o(64),W=o(67),O=function(N){return function(X,y,G){var V,g=u(X),R=W(g),S=z(G,R);if(N&&y!=y){for(;R>S;)if((V=g[S++])!=V)return!0}else for(;R>S;S++)if((N||S in g)&&g[S]===y)return N||S||0;return!N&&-1}};s.exports={includes:O(!0),indexOf:O(!1)}},(s,M,o)=>{var u=o(65),z=Math.max,W=Math.min;s.exports=function(O,N){var X=u(O);return X<0?z(X+N,0):W(X,N)}},(s,M,o)=>{var u=o(66);s.exports=function(z){var W=+z;return W!=W||W===0?0:u(W)}},s=>{var M=Math.ceil,o=Math.floor;s.exports=Math.trunc||function(u){var z=+u;return(z>0?o:M)(z)}},(s,M,o)=>{var u=o(68);s.exports=function(z){return u(z.length)}},(s,M,o)=>{var u=o(65),z=Math.min;s.exports=function(W){return W>0?z(u(W),9007199254740991):0}},s=>{s.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(s,M)=>{M.f=Object.getOwnPropertySymbols},(s,M,o)=>{var u=o(10),z=o(24),W=/#|\.prototype\./,O=function(V,g){var R=X[N(V)];return R==G||R!=y&&(z(g)?u(g):!!g)},N=O.normalize=function(V){return String(V).replace(W,".").toLowerCase()},X=O.data={},y=O.NATIVE="N",G=O.POLYFILL="P";s.exports=O},(s,M,o)=>{var u=o(37),z=o(73),W=o(48).f,O=u("unscopables"),N=Array.prototype;N[O]==null&&W(N,O,{configurable:!0,value:z(null)}),s.exports=function(X){N[O][X]=!0}},(s,M,o)=>{var u,z=o(50),W=o(74),O=o(69),N=o(58),X=o(76),y=o(46),G=o(57),V="prototype",g="script",R=G("IE_PROTO"),S=function(){},C=function(j){return"<"+g+">"+j+"</"+g+">"},F=function(j){j.write(C("")),j.close();var U=j.parentWindow.Object;return j=null,U},K=function(){try{u=new ActiveXObject("htmlfile")}catch{}K=typeof document<"u"?document.domain&&u?F(u):function(){var U,E=y("iframe"),D="java"+g+":";return E.style.display="none",X.appendChild(E),E.src=String(D),(U=E.contentWindow.document).open(),U.write(C("document.F=Object")),U.close(),U.F}():F(u);for(var j=O.length;j--;)delete K[V][O[j]];return K()};N[R]=!0,s.exports=Object.create||function(j,U){var E;return j!==null?(S[V]=z(j),E=new S,S[V]=null,E[R]=j):E=K(),U===void 0?E:W.f(E,U)}},(s,M,o)=>{var u=o(9),z=o(49),W=o(48),O=o(50),N=o(15),X=o(75);M.f=u&&!z?Object.defineProperties:function(y,G){O(y);for(var V,g=N(G),R=X(G),S=R.length,C=0;S>C;)W.f(y,V=R[C++],g[V]);return y}},(s,M,o)=>{var u=o(62),z=o(69);s.exports=Object.keys||function(W){return u(W,z)}},(s,M,o)=>{var u=o(27);s.exports=u("document","documentElement")},(s,M,o)=>{var u=o(7),z=o(17);s.exports=function(W,O){return z(u[W].prototype[O])}},(s,M,o)=>{o(79)},(s,M,o)=>{var u=o(80),z=o(67),W=o(65),O=u.aTypedArray;(0,u.exportTypedArrayMethod)("at",function(N){var X=O(this),y=z(X),G=W(N),V=G>=0?G:y+G;return V<0||V>=y?void 0:X[V]})},(s,M,o)=>{var u,z,W,O=o(81),N=o(9),X=o(7),y=o(24),G=o(23),V=o(42),g=o(82),R=o(35),S=o(47),C=o(51),F=o(84),K=o(28),j=o(85),U=o(87),E=o(37),D=o(44),v=o(55),q=v.enforce,i0=v.get,t0=X.Int8Array,P=t0&&t0.prototype,c0=X.Uint8ClampedArray,s0=c0&&c0.prototype,W0=t0&&j(t0),M0=P&&j(P),X0=Object.prototype,B=X.TypeError,Q=E("toStringTag"),$=D("TYPED_ARRAY_TAG"),l0="TypedArrayConstructor",_=O&&!!U&&g(X.opera)!=="Opera",H=!1,d0={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},p0={BigInt64Array:8,BigUint64Array:8},m0=function(O0){var h0=j(O0);if(G(h0)){var G0=i0(h0);return G0&&V(G0,l0)?G0[l0]:m0(h0)}},r0=function(O0){if(!G(O0))return!1;var h0=g(O0);return V(d0,h0)||V(p0,h0)};for(u in d0)(W=(z=X[u])&&z.prototype)?q(W)[l0]=z:_=!1;for(u in p0)(W=(z=X[u])&&z.prototype)&&(q(W)[l0]=z);if((!_||!y(W0)||W0===Function.prototype)&&(W0=function(){throw B("Incorrect invocation")},_))for(u in d0)X[u]&&U(X[u],W0);if((!_||!M0||M0===X0)&&(M0=W0.prototype,_))for(u in d0)X[u]&&U(X[u].prototype,M0);if(_&&j(s0)!==M0&&U(s0,M0),N&&!V(M0,Q)){H=!0,F(M0,Q,{configurable:!0,get:function(){return G(this)?this[$]:void 0}});for(u in d0)X[u]&&S(X[u],$,u)}s.exports={NATIVE_ARRAY_BUFFER_VIEWS:_,TYPED_ARRAY_TAG:H&&$,aTypedArray:function(O0){if(r0(O0))return O0;throw B("Target is not a typed array")},aTypedArrayConstructor:function(O0){if(y(O0)&&(!U||K(W0,O0)))return O0;throw B(R(O0)+" is not a typed array constructor")},exportTypedArrayMethod:function(O0,h0,G0,z0){if(N){if(G0)for(var g0 in d0){var f0=X[g0];if(f0&&V(f0.prototype,O0))try{delete f0.prototype[O0]}catch{try{f0.prototype[O0]=h0}catch{}}}M0[O0]&&!G0||C(M0,O0,G0?h0:_&&P[O0]||h0,z0)}},exportTypedArrayStaticMethod:function(O0,h0,G0){var z0,g0;if(N){if(U){if(G0){for(z0 in d0)if((g0=X[z0])&&V(g0,O0))try{delete g0[O0]}catch{}}if(W0[O0]&&!G0)return;try{return C(W0,O0,G0?h0:_&&W0[O0]||h0)}catch{}}for(z0 in d0)!(g0=X[z0])||g0[O0]&&!G0||C(g0,O0,h0)}},getTypedArrayConstructor:m0,isView:function(O0){if(!G(O0))return!1;var h0=g(O0);return h0==="DataView"||V(d0,h0)||V(p0,h0)},isTypedArray:r0,TypedArray:W0,TypedArrayPrototype:M0}},s=>{s.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"},(s,M,o)=>{var u=o(83),z=o(24),W=o(18),O=o(37)("toStringTag"),N=Object,X=W(function(){return arguments}())=="Arguments";s.exports=u?W:function(y){var G,V,g;return y===void 0?"Undefined":y===null?"Null":typeof(V=function(R,S){try{return R[S]}catch{}}(G=N(y),O))=="string"?V:X?W(G):(g=W(G))=="Object"&&z(G.callee)?"Arguments":g}},(s,M,o)=>{var u={};u[o(37)("toStringTag")]="z",s.exports=String(u)==="[object z]"},(s,M,o)=>{var u=o(52),z=o(48);s.exports=function(W,O,N){return N.get&&u(N.get,O,{getter:!0}),N.set&&u(N.set,O,{setter:!0}),z.f(W,O,N)}},(s,M,o)=>{var u=o(42),z=o(24),W=o(43),O=o(57),N=o(86),X=O("IE_PROTO"),y=Object,G=y.prototype;s.exports=N?y.getPrototypeOf:function(V){var g=W(V);if(u(g,X))return g[X];var R=g.constructor;return z(R)&&g instanceof R?R.prototype:g instanceof y?G:null}},(s,M,o)=>{var u=o(10);s.exports=!u(function(){function z(){}return z.prototype.constructor=null,Object.getPrototypeOf(new z)!==z.prototype})},(s,M,o)=>{var u=o(88),z=o(50),W=o(89);s.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var O,N=!1,X={};try{(O=u(Object.prototype,"__proto__","set"))(X,[]),N=X instanceof Array}catch{}return function(y,G){return z(y),W(G),N?O(y,G):y.__proto__=G,y}}():void 0)},(s,M,o)=>{var u=o(17),z=o(34);s.exports=function(W,O,N){try{return u(z(Object.getOwnPropertyDescriptor(W,O)[N]))}catch{}}},(s,M,o)=>{var u=o(24),z=String,W=TypeError;s.exports=function(O){if(typeof O=="object"||u(O))return O;throw W("Can't set "+z(O)+" as a prototype")}},(s,M,o)=>{o(91),o(98),o(100),o(123),o(125);var u=o(137);s.exports=u.structuredClone},(s,M,o)=>{var u=o(15),z=o(72),W=o(92),O=o(55),N=o(48).f,X=o(93),y=o(97),G=o(39),V=o(9),g="Array Iterator",R=O.set,S=O.getterFor(g);s.exports=X(Array,"Array",function(F,K){R(this,{type:g,target:u(F),index:0,kind:K})},function(){var F=S(this),K=F.target,j=F.kind,U=F.index++;return!K||U>=K.length?(F.target=void 0,y(void 0,!0)):y(j=="keys"?U:j=="values"?K[U]:[U,K[U]],!1)},"values");var C=W.Arguments=W.Array;if(z("keys"),z("values"),z("entries"),!G&&V&&C.name!=="values")try{N(C,"name",{value:"values"})}catch{}},s=>{s.exports={}},(s,M,o)=>{var u=o(6),z=o(11),W=o(39),O=o(53),N=o(24),X=o(94),y=o(85),G=o(87),V=o(96),g=o(47),R=o(51),S=o(37),C=o(92),F=o(95),K=O.PROPER,j=O.CONFIGURABLE,U=F.IteratorPrototype,E=F.BUGGY_SAFARI_ITERATORS,D=S("iterator"),v="keys",q="values",i0="entries",t0=function(){return this};s.exports=function(P,c0,s0,W0,M0,X0,B){X(s0,c0,W0);var Q,$,l0,_=function(h0){if(h0===M0&&r0)return r0;if(!E&&h0 in p0)return p0[h0];switch(h0){case v:return function(){return new s0(this,h0)};case q:return function(){return new s0(this,h0)};case i0:return function(){return new s0(this,h0)}}return function(){return new s0(this)}},H=c0+" Iterator",d0=!1,p0=P.prototype,m0=p0[D]||p0["@@iterator"]||M0&&p0[M0],r0=!E&&m0||_(M0),O0=c0=="Array"&&p0.entries||m0;if(O0&&(Q=y(O0.call(new P)))!==Object.prototype&&Q.next&&(W||y(Q)===U||(G?G(Q,U):N(Q[D])||R(Q,D,t0)),V(Q,H,!0,!0),W&&(C[H]=t0)),K&&M0==q&&m0&&m0.name!==q&&(!W&&j?g(p0,"name",q):(d0=!0,r0=function(){return z(m0,this)})),M0)if($={values:_(q),keys:X0?r0:_(v),entries:_(i0)},B)for(l0 in $)(E||d0||!(l0 in p0))&&R(p0,l0,$[l0]);else u({target:c0,proto:!0,forced:E||d0},$);return W&&!B||p0[D]===r0||R(p0,D,r0,{name:M0}),C[c0]=r0,$}},(s,M,o)=>{var u=o(95).IteratorPrototype,z=o(73),W=o(14),O=o(96),N=o(92),X=function(){return this};s.exports=function(y,G,V,g){var R=G+" Iterator";return y.prototype=z(u,{next:W(+!g,V)}),O(y,R,!1,!0),N[R]=X,y}},(s,M,o)=>{var u,z,W,O=o(10),N=o(24),X=o(23),y=o(73),G=o(85),V=o(51),g=o(37),R=o(39),S=g("iterator"),C=!1;[].keys&&("next"in(W=[].keys())?(z=G(G(W)))!==Object.prototype&&(u=z):C=!0),!X(u)||O(function(){var F={};return u[S].call(F)!==F})?u={}:R&&(u=y(u)),N(u[S])||V(u,S,function(){return this}),s.exports={IteratorPrototype:u,BUGGY_SAFARI_ITERATORS:C}},(s,M,o)=>{var u=o(48).f,z=o(42),W=o(37)("toStringTag");s.exports=function(O,N,X){O&&!X&&(O=O.prototype),O&&!z(O,W)&&u(O,W,{configurable:!0,value:N})}},s=>{s.exports=function(M,o){return{value:M,done:o}}},(s,M,o)=>{var u=o(83),z=o(51),W=o(99);u||z(Object.prototype,"toString",W,{unsafe:!0})},(s,M,o)=>{var u=o(83),z=o(82);s.exports=u?{}.toString:function(){return"[object "+z(this)+"]"}},(s,M,o)=>{o(101)},(s,M,o)=>{o(102)("Map",function(u){return function(){return u(this,arguments.length?arguments[0]:void 0)}},o(120))},(s,M,o)=>{var u=o(6),z=o(7),W=o(17),O=o(71),N=o(51),X=o(103),y=o(110),G=o(117),V=o(24),g=o(20),R=o(23),S=o(10),C=o(118),F=o(96),K=o(119);s.exports=function(j,U,E){var D=j.indexOf("Map")!==-1,v=j.indexOf("Weak")!==-1,q=D?"set":"add",i0=z[j],t0=i0&&i0.prototype,P=i0,c0={},s0=function($){var l0=W(t0[$]);N(t0,$,$=="add"?function(_){return l0(this,_===0?0:_),this}:$=="delete"?function(_){return!(v&&!R(_))&&l0(this,_===0?0:_)}:$=="get"?function(_){return v&&!R(_)?void 0:l0(this,_===0?0:_)}:$=="has"?function(_){return!(v&&!R(_))&&l0(this,_===0?0:_)}:function(_,H){return l0(this,_===0?0:_,H),this})};if(O(j,!V(i0)||!(v||t0.forEach&&!S(function(){new i0().entries().next()}))))P=E.getConstructor(U,j,D,q),X.enable();else if(O(j,!0)){var W0=new P,M0=W0[q](v?{}:-0,1)!=W0,X0=S(function(){W0.has(1)}),B=C(function($){new i0($)}),Q=!v&&S(function(){for(var $=new i0,l0=5;l0--;)$[q](l0,l0);return!$.has(-0)});B||((P=U(function($,l0){G($,t0);var _=K(new i0,$,P);return g(l0)||y(l0,_[q],{that:_,AS_ENTRIES:D}),_})).prototype=t0,t0.constructor=P),(X0||Q)&&(s0("delete"),s0("has"),D&&s0("get")),(Q||M0)&&s0(q),v&&t0.clear&&delete t0.clear}return c0[j]=P,u({global:!0,constructor:!0,forced:P!=i0},c0),F(P,j),v||E.setStrong(P,j,D),P}},(s,M,o)=>{var u=o(6),z=o(17),W=o(58),O=o(23),N=o(42),X=o(48).f,y=o(61),G=o(104),V=o(107),g=o(44),R=o(109),S=!1,C=g("meta"),F=0,K=function(U){X(U,C,{value:{objectID:"O"+F++,weakData:{}}})},j=s.exports={enable:function(){j.enable=function(){},S=!0;var U=y.f,E=z([].splice),D={};D[C]=1,U(D).length&&(y.f=function(v){for(var q=U(v),i0=0,t0=q.length;i0<t0;i0++)if(q[i0]===C){E(q,i0,1);break}return q},u({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:G.f}))},fastKey:function(U,E){if(!O(U))return typeof U=="symbol"?U:(typeof U=="string"?"S":"P")+U;if(!N(U,C)){if(!V(U))return"F";if(!E)return"E";K(U)}return U[C].objectID},getWeakData:function(U,E){if(!N(U,C)){if(!V(U))return!0;if(!E)return!1;K(U)}return U[C].weakData},onFreeze:function(U){return R&&S&&V(U)&&!N(U,C)&&K(U),U}};W[C]=!0},(s,M,o)=>{var u=o(18),z=o(15),W=o(61).f,O=o(105),N=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];s.exports.f=function(X){return N&&u(X)=="Window"?function(y){try{return W(y)}catch{return O(N)}}(X):W(z(X))}},(s,M,o)=>{var u=o(64),z=o(67),W=o(106),O=Array,N=Math.max;s.exports=function(X,y,G){for(var V=z(X),g=u(y,V),R=u(G===void 0?V:G,V),S=O(N(R-g,0)),C=0;g<R;g++,C++)W(S,C,X[g]);return S.length=C,S}},(s,M,o)=>{var u=o(21),z=o(48),W=o(14);s.exports=function(O,N,X){var y=u(N);y in O?z.f(O,y,W(0,X)):O[y]=X}},(s,M,o)=>{var u=o(10),z=o(23),W=o(18),O=o(108),N=Object.isExtensible,X=u(function(){});s.exports=X||O?function(y){return!!z(y)&&(!O||W(y)!="ArrayBuffer")&&(!N||N(y))}:N},(s,M,o)=>{var u=o(10);s.exports=u(function(){if(typeof ArrayBuffer=="function"){var z=new ArrayBuffer(8);Object.isExtensible(z)&&Object.defineProperty(z,"a",{value:8})}})},(s,M,o)=>{var u=o(10);s.exports=!u(function(){return Object.isExtensible(Object.preventExtensions({}))})},(s,M,o)=>{var u=o(111),z=o(11),W=o(50),O=o(35),N=o(113),X=o(67),y=o(28),G=o(114),V=o(115),g=o(116),R=TypeError,S=function(F,K){this.stopped=F,this.result=K},C=S.prototype;s.exports=function(F,K,j){var U,E,D,v,q,i0,t0,P=j&&j.that,c0=!(!j||!j.AS_ENTRIES),s0=!(!j||!j.IS_RECORD),W0=!(!j||!j.IS_ITERATOR),M0=!(!j||!j.INTERRUPTED),X0=u(K,P),B=function($){return U&&g(U,"normal",$),new S(!0,$)},Q=function($){return c0?(W($),M0?X0($[0],$[1],B):X0($[0],$[1])):M0?X0($,B):X0($)};if(s0)U=F.iterator;else if(W0)U=F;else{if(!(E=V(F)))throw R(O(F)+" is not iterable");if(N(E)){for(D=0,v=X(F);v>D;D++)if((q=Q(F[D]))&&y(C,q))return q;return new S(!1)}U=G(F,E)}for(i0=s0?F.next:U.next;!(t0=z(i0,U)).done;){try{q=Q(t0.value)}catch($){g(U,"throw",$)}if(typeof q=="object"&&q&&y(C,q))return q}return new S(!1)}},(s,M,o)=>{var u=o(112),z=o(34),W=o(12),O=u(u.bind);s.exports=function(N,X){return z(N),X===void 0?N:W?O(N,X):function(){return N.apply(X,arguments)}}},(s,M,o)=>{var u=o(18),z=o(17);s.exports=function(W){if(u(W)==="Function")return z(W)}},(s,M,o)=>{var u=o(37),z=o(92),W=u("iterator"),O=Array.prototype;s.exports=function(N){return N!==void 0&&(z.Array===N||O[W]===N)}},(s,M,o)=>{var u=o(11),z=o(34),W=o(50),O=o(35),N=o(115),X=TypeError;s.exports=function(y,G){var V=arguments.length<2?N(y):G;if(z(V))return W(u(V,y));throw X(O(y)+" is not iterable")}},(s,M,o)=>{var u=o(82),z=o(33),W=o(20),O=o(92),N=o(37)("iterator");s.exports=function(X){if(!W(X))return z(X,N)||z(X,"@@iterator")||O[u(X)]}},(s,M,o)=>{var u=o(11),z=o(50),W=o(33);s.exports=function(O,N,X){var y,G;z(O);try{if(!(y=W(O,"return"))){if(N==="throw")throw X;return X}y=u(y,O)}catch(V){G=!0,y=V}if(N==="throw")throw X;if(G)throw y;return z(y),X}},(s,M,o)=>{var u=o(28),z=TypeError;s.exports=function(W,O){if(u(O,W))return W;throw z("Incorrect invocation")}},(s,M,o)=>{var u=o(37)("iterator"),z=!1;try{var W=0,O={next:function(){return{done:!!W++}},return:function(){z=!0}};O[u]=function(){return this},Array.from(O,function(){throw 2})}catch{}s.exports=function(N,X){if(!X&&!z)return!1;var y=!1;try{var G={};G[u]=function(){return{next:function(){return{done:y=!0}}}},N(G)}catch{}return y}},(s,M,o)=>{var u=o(24),z=o(23),W=o(87);s.exports=function(O,N,X){var y,G;return W&&u(y=N.constructor)&&y!==X&&z(G=y.prototype)&&G!==X.prototype&&W(O,G),O}},(s,M,o)=>{var u=o(73),z=o(84),W=o(121),O=o(111),N=o(117),X=o(20),y=o(110),G=o(93),V=o(97),g=o(122),R=o(9),S=o(103).fastKey,C=o(55),F=C.set,K=C.getterFor;s.exports={getConstructor:function(j,U,E,D){var v=j(function(c0,s0){N(c0,q),F(c0,{type:U,index:u(null),first:void 0,last:void 0,size:0}),R||(c0.size=0),X(s0)||y(s0,c0[D],{that:c0,AS_ENTRIES:E})}),q=v.prototype,i0=K(U),t0=function(c0,s0,W0){var M0,X0,B=i0(c0),Q=P(c0,s0);return Q?Q.value=W0:(B.last=Q={index:X0=S(s0,!0),key:s0,value:W0,previous:M0=B.last,next:void 0,removed:!1},B.first||(B.first=Q),M0&&(M0.next=Q),R?B.size++:c0.size++,X0!=="F"&&(B.index[X0]=Q)),c0},P=function(c0,s0){var W0,M0=i0(c0),X0=S(s0);if(X0!=="F")return M0.index[X0];for(W0=M0.first;W0;W0=W0.next)if(W0.key==s0)return W0};return W(q,{clear:function(){for(var c0=i0(this),s0=c0.index,W0=c0.first;W0;)W0.removed=!0,W0.previous&&(W0.previous=W0.previous.next=void 0),delete s0[W0.index],W0=W0.next;c0.first=c0.last=void 0,R?c0.size=0:this.size=0},delete:function(c0){var s0=this,W0=i0(s0),M0=P(s0,c0);if(M0){var X0=M0.next,B=M0.previous;delete W0.index[M0.index],M0.removed=!0,B&&(B.next=X0),X0&&(X0.previous=B),W0.first==M0&&(W0.first=X0),W0.last==M0&&(W0.last=B),R?W0.size--:s0.size--}return!!M0},forEach:function(c0){for(var s0,W0=i0(this),M0=O(c0,arguments.length>1?arguments[1]:void 0);s0=s0?s0.next:W0.first;)for(M0(s0.value,s0.key,this);s0&&s0.removed;)s0=s0.previous},has:function(c0){return!!P(this,c0)}}),W(q,E?{get:function(c0){var s0=P(this,c0);return s0&&s0.value},set:function(c0,s0){return t0(this,c0===0?0:c0,s0)}}:{add:function(c0){return t0(this,c0=c0===0?0:c0,c0)}}),R&&z(q,"size",{configurable:!0,get:function(){return i0(this).size}}),v},setStrong:function(j,U,E){var D=U+" Iterator",v=K(U),q=K(D);G(j,U,function(i0,t0){F(this,{type:D,target:i0,state:v(i0),kind:t0,last:void 0})},function(){for(var i0=q(this),t0=i0.kind,P=i0.last;P&&P.removed;)P=P.previous;return!i0.target||!(i0.last=P=P?P.next:i0.state.first)?(i0.target=void 0,V(void 0,!0)):V(t0=="keys"?P.key:t0=="values"?P.value:[P.key,P.value],!1)},E?"entries":"values",!E,!0),g(U)}}},(s,M,o)=>{var u=o(51);s.exports=function(z,W,O){for(var N in W)u(z,N,W[N],O);return z}},(s,M,o)=>{var u=o(27),z=o(84),W=o(37),O=o(9),N=W("species");s.exports=function(X){var y=u(X);O&&y&&!y[N]&&z(y,N,{configurable:!0,get:function(){return this}})}},(s,M,o)=>{o(124)},(s,M,o)=>{o(102)("Set",function(u){return function(){return u(this,arguments.length?arguments[0]:void 0)}},o(120))},(s,M,o)=>{var u,z=o(39),W=o(6),O=o(7),N=o(27),X=o(17),y=o(10),G=o(44),V=o(24),g=o(126),R=o(20),S=o(23),C=o(26),F=o(110),K=o(50),j=o(82),U=o(42),E=o(106),D=o(47),v=o(67),q=o(127),i0=o(128),t0=o(130),P=o(131),c0=o(132),s0=o(133),W0=O.Object,M0=O.Array,X0=O.Date,B=O.Error,Q=O.EvalError,$=O.RangeError,l0=O.ReferenceError,_=O.SyntaxError,H=O.TypeError,d0=O.URIError,p0=O.PerformanceMark,m0=O.WebAssembly,r0=m0&&m0.CompileError||B,O0=m0&&m0.LinkError||B,h0=m0&&m0.RuntimeError||B,G0=N("DOMException"),z0=t0.Map,g0=t0.has,f0=t0.get,S0=t0.set,J=P.Set,e0=P.add,a0=N("Object","keys"),o0=X([].push),Z0=X((!0).valueOf),T0=X(1 .valueOf),I0=X("".valueOf),A0=X(X0.prototype.getTime),F0=G("structuredClone"),J0="DataCloneError",K0="Transferring",E0=function(x0){return!y(function(){var o1=new O.Set([7]),Z1=x0(o1),m1=x0(W0(7));return Z1==o1||!Z1.has(7)||typeof m1!="object"||m1!=7})&&x0},H0=function(x0,o1){return!y(function(){var Z1=new o1,m1=x0({a:Z1,b:Z1});return!(m1&&m1.a===m1.b&&m1.a instanceof o1&&m1.a.stack===Z1.stack)})},q0=O.structuredClone,a1=z||!H0(q0,B)||!H0(q0,G0)||(u=q0,!!y(function(){var x0=u(new O.AggregateError([1],F0,{cause:3}));return x0.name!="AggregateError"||x0.errors[0]!=1||x0.message!=F0||x0.cause!=3})),Y0=!q0&&E0(function(x0){return new p0(F0,{detail:x0}).detail}),U0=E0(q0)||Y0,i1=function(x0){throw new G0("Uncloneable type: "+x0,J0)},b1=function(x0,o1){throw new G0((o1||"Cloning")+" of "+x0+" cannot be properly polyfilled in this engine",J0)},U1=function(x0,o1){return U0||b1(o1),U0(x0)},p1=function(x0,o1){if(C(x0)&&i1("Symbol"),!S(x0))return x0;if(o1){if(g0(o1,x0))return f0(o1,x0)}else o1=new z0;var Z1,m1,t1,Ul,w1,r1,B1,R0,j0,Q0,e1,P0=j(x0),_0=!1;switch(P0){case"Array":t1=M0(v(x0)),_0=!0;break;case"Object":t1={},_0=!0;break;case"Map":t1=new z0,_0=!0;break;case"Set":t1=new J,_0=!0;break;case"RegExp":t1=new RegExp(x0.source,i0(x0));break;case"Error":switch(m1=x0.name){case"AggregateError":t1=N("AggregateError")([]);break;case"EvalError":t1=Q();break;case"RangeError":t1=$();break;case"ReferenceError":t1=l0();break;case"SyntaxError":t1=_();break;case"TypeError":t1=H();break;case"URIError":t1=d0();break;case"CompileError":t1=r0();break;case"LinkError":t1=O0();break;case"RuntimeError":t1=h0();break;default:t1=B()}_0=!0;break;case"DOMException":t1=new G0(x0.message,x0.name),_0=!0;break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":Z1=O[P0],S(Z1)||b1(P0),t1=new Z1(p1(x0.buffer,o1),x0.byteOffset,P0==="DataView"?x0.byteLength:x0.length);break;case"DOMQuad":try{t1=new DOMQuad(p1(x0.p1,o1),p1(x0.p2,o1),p1(x0.p3,o1),p1(x0.p4,o1))}catch{t1=U1(x0,P0)}break;case"File":if(U0)try{t1=U0(x0),j(t1)!==P0&&(t1=void 0)}catch{}if(!t1)try{t1=new File([x0],x0.name,x0)}catch{}t1||b1(P0);break;case"FileList":if(Ul=function(){var n1;try{n1=new O.DataTransfer}catch{try{n1=new O.ClipboardEvent("").clipboardData}catch{}}return n1&&n1.items&&n1.files?n1:null}()){for(w1=0,r1=v(x0);w1<r1;w1++)Ul.items.add(p1(x0[w1],o1));t1=Ul.files}else t1=U1(x0,P0);break;case"ImageData":try{t1=new ImageData(p1(x0.data,o1),x0.width,x0.height,{colorSpace:x0.colorSpace})}catch{t1=U1(x0,P0)}break;default:if(U0)t1=U0(x0);else switch(P0){case"BigInt":t1=W0(x0.valueOf());break;case"Boolean":t1=W0(Z0(x0));break;case"Number":t1=W0(T0(x0));break;case"String":t1=W0(I0(x0));break;case"Date":t1=new X0(A0(x0));break;case"ArrayBuffer":(Z1=O.DataView)||typeof x0.slice=="function"||b1(P0);try{if(typeof x0.slice!="function"||x0.resizable)for(r1=x0.byteLength,e1=("maxByteLength"in x0)?{maxByteLength:x0.maxByteLength}:void 0,t1=new ArrayBuffer(r1,e1),j0=new Z1(x0),Q0=new Z1(t1),w1=0;w1<r1;w1++)Q0.setUint8(w1,j0.getUint8(w1));else t1=x0.slice(0)}catch{throw new G0("ArrayBuffer is detached",J0)}break;case"SharedArrayBuffer":t1=x0;break;case"Blob":try{t1=x0.slice(0,x0.size,x0.type)}catch{b1(P0)}break;case"DOMPoint":case"DOMPointReadOnly":Z1=O[P0];try{t1=Z1.fromPoint?Z1.fromPoint(x0):new Z1(x0.x,x0.y,x0.z,x0.w)}catch{b1(P0)}break;case"DOMRect":case"DOMRectReadOnly":Z1=O[P0];try{t1=Z1.fromRect?Z1.fromRect(x0):new Z1(x0.x,x0.y,x0.width,x0.height)}catch{b1(P0)}break;case"DOMMatrix":case"DOMMatrixReadOnly":Z1=O[P0];try{t1=Z1.fromMatrix?Z1.fromMatrix(x0):new Z1(x0)}catch{b1(P0)}break;case"AudioData":case"VideoFrame":V(x0.clone)||b1(P0);try{t1=x0.clone()}catch{i1(P0)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":b1(P0);default:i1(P0)}}if(S0(o1,x0,t1),_0)switch(P0){case"Array":case"Object":for(B1=a0(x0),w1=0,r1=v(B1);w1<r1;w1++)R0=B1[w1],E(t1,R0,p1(x0[R0],o1));break;case"Map":x0.forEach(function(n1,O1){S0(t1,p1(O1,o1),p1(n1,o1))});break;case"Set":x0.forEach(function(n1){e0(t1,p1(n1,o1))});break;case"Error":D(t1,"message",p1(x0.message,o1)),U(x0,"cause")&&D(t1,"cause",p1(x0.cause,o1)),m1=="AggregateError"&&(t1.errors=p1(x0.errors,o1));case"DOMException":c0&&D(t1,"stack",p1(x0.stack,o1))}return t1};W({global:!0,enumerable:!0,sham:!s0,forced:a1},{structuredClone:function(x0){var o1,Z1=q(arguments.length,1)>1&&!R(arguments[1])?K(arguments[1]):void 0,m1=Z1?Z1.transfer:void 0;return m1!==void 0&&function(t1,Ul){if(!S(t1))throw H("Transfer option cannot be converted to a sequence");var w1=[];F(t1,function(n1){o0(w1,K(n1))});var r1,B1,R0,j0,Q0,e1,P0=0,_0=v(w1);if(s0)for(j0=q0(w1,{transfer:w1});P0<_0;)S0(Ul,w1[P0],j0[P0++]);else for(;P0<_0;){if(r1=w1[P0++],g0(Ul,r1))throw new G0("Duplicate transferable",J0);switch(B1=j(r1)){case"ImageBitmap":R0=O.OffscreenCanvas,g(R0)||b1(B1,K0);try{(e1=new R0(r1.width,r1.height)).getContext("bitmaprenderer").transferFromImageBitmap(r1),Q0=e1.transferToImageBitmap()}catch{}break;case"AudioData":case"VideoFrame":V(r1.clone)&&V(r1.close)||b1(B1,K0);try{Q0=r1.clone(),r1.close()}catch{}break;case"ArrayBuffer":V(r1.transfer)||b1(B1,K0),Q0=r1.transfer();break;case"MediaSourceHandle":case"MessagePort":case"OffscreenCanvas":case"ReadableStream":case"TransformStream":case"WritableStream":b1(B1,K0)}if(Q0===void 0)throw new G0("This object cannot be transferred: "+B1,J0);S0(Ul,r1,Q0)}}(m1,o1=new z0),p1(x0,o1)}})},(s,M,o)=>{var u=o(17),z=o(10),W=o(24),O=o(82),N=o(27),X=o(54),y=function(){},G=[],V=N("Reflect","construct"),g=/^\s*(?:class|function)\b/,R=u(g.exec),S=!g.exec(y),C=function(K){if(!W(K))return!1;try{return V(y,G,K),!0}catch{return!1}},F=function(K){if(!W(K))return!1;switch(O(K)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return S||!!R(g,X(K))}catch{return!0}};F.sham=!0,s.exports=!V||z(function(){var K;return C(C.call)||!C(Object)||!C(function(){K=!0})||K})?F:C},s=>{var M=TypeError;s.exports=function(o,u){if(o<u)throw M("Not enough arguments");return o}},(s,M,o)=>{var u=o(11),z=o(42),W=o(28),O=o(129),N=RegExp.prototype;s.exports=function(X){var y=X.flags;return y!==void 0||"flags"in N||z(X,"flags")||!W(N,X)?y:u(O,X)}},(s,M,o)=>{var u=o(50);s.exports=function(){var z=u(this),W="";return z.hasIndices&&(W+="d"),z.global&&(W+="g"),z.ignoreCase&&(W+="i"),z.multiline&&(W+="m"),z.dotAll&&(W+="s"),z.unicode&&(W+="u"),z.unicodeSets&&(W+="v"),z.sticky&&(W+="y"),W}},(s,M,o)=>{var u=o(17),z=Map.prototype;s.exports={Map,set:u(z.set),get:u(z.get),has:u(z.has),remove:u(z.delete),proto:z}},(s,M,o)=>{var u=o(17),z=Set.prototype;s.exports={Set,add:u(z.add),has:u(z.has),remove:u(z.delete),proto:z}},(s,M,o)=>{var u=o(10),z=o(14);s.exports=!u(function(){var W=Error("a");return"stack"in W?(Object.defineProperty(W,"stack",z(1,7)),W.stack!==7):!0})},(s,M,o)=>{var u=o(7),z=o(10),W=o(31),O=o(134),N=o(135),X=o(136),y=u.structuredClone;s.exports=!!y&&!z(function(){if(N&&W>92||X&&W>94||O&&W>97)return!1;var G=new ArrayBuffer(8),V=y(G,{transfer:[G]});return G.byteLength!=0||V.byteLength!=8})},(s,M,o)=>{var u=o(135),z=o(136);s.exports=!u&&!z&&typeof window=="object"&&typeof document=="object"},s=>{s.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},(s,M,o)=>{var u=o(18);s.exports=typeof process<"u"&&u(process)=="process"},(s,M,o)=>{var u=o(7);s.exports=u},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{var k,t,e,a,re,w,pe,p,h,l,c,b,L,m,Ae,x,I,_e,i,A;Object.defineProperty(exports,"__esModule",{value:!0}),exports.build=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,exports.getDocument=getDocument,exports.version=void 0;var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(139),_display_utils=__w_pdfjs_require__(142),_font_loader=__w_pdfjs_require__(145),_canvas=__w_pdfjs_require__(146),_worker_options=__w_pdfjs_require__(149),_is_node=__w_pdfjs_require__(3),_message_handler=__w_pdfjs_require__(150),_metadata=__w_pdfjs_require__(151),_optional_content_config=__w_pdfjs_require__(152),_transport_stream=__w_pdfjs_require__(153),_xfa_text=__w_pdfjs_require__(154);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3;let DefaultCanvasFactory=_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;let DefaultCMapReaderFactory=_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;let DefaultFilterFactory=_display_utils.DOMFilterFactory;exports.DefaultFilterFactory=DefaultFilterFactory;let DefaultStandardFontDataFactory=_display_utils.DOMStandardFontDataFactory,createPDFNetworkStream;if(exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory,_is_node.isNodeJS){const{NodeCanvasFactory:s,NodeCMapReaderFactory:M,NodeFilterFactory:o,NodeStandardFontDataFactory:u}=__w_pdfjs_require__(155);exports.DefaultCanvasFactory=DefaultCanvasFactory=s,exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory=M,exports.DefaultFilterFactory=DefaultFilterFactory=o,exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory=u}if(_is_node.isNodeJS){const{PDFNodeStream:s}=__w_pdfjs_require__(156);createPDFNetworkStream=M=>new s(M)}else{const{PDFNetworkStream:s}=__w_pdfjs_require__(159),{PDFFetchStream:M}=__w_pdfjs_require__(160);createPDFNetworkStream=o=>(0,_display_utils.isValidFetchUrl)(o.url)?new M(o):new s(o)}function getDocument(s){if(typeof s=="string"||s instanceof URL?s={url:s}:(0,_util.isArrayBuffer)(s)&&(s={data:s}),typeof s!="object")throw new Error("Invalid parameter in getDocument, need parameter object.");if(!s.url&&!s.data&&!s.range)throw new Error("Invalid parameter object: need either .data, .range or .url");const M=new PDFDocumentLoadingTask,{docId:o}=M,u=s.url?getUrlProp(s.url):null,z=s.data?getDataProp(s.data):null,W=s.httpHeaders||null,O=s.withCredentials===!0,N=s.password??null,X=s.range instanceof PDFDataRangeTransport?s.range:null,y=Number.isInteger(s.rangeChunkSize)&&s.rangeChunkSize>0?s.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let G=s.worker instanceof PDFWorker?s.worker:null;const V=s.verbosity,g=typeof s.docBaseUrl!="string"||(0,_display_utils.isDataScheme)(s.docBaseUrl)?null:s.docBaseUrl,R=typeof s.cMapUrl=="string"?s.cMapUrl:null,S=s.cMapPacked!==!1,C=s.CMapReaderFactory||DefaultCMapReaderFactory,F=typeof s.standardFontDataUrl=="string"?s.standardFontDataUrl:null,K=s.StandardFontDataFactory||DefaultStandardFontDataFactory,j=s.stopAtErrors!==!0,U=Number.isInteger(s.maxImageSize)&&s.maxImageSize>-1?s.maxImageSize:-1,E=s.isEvalSupported!==!1,D=typeof s.isOffscreenCanvasSupported=="boolean"?s.isOffscreenCanvasSupported:!_is_node.isNodeJS,v=Number.isInteger(s.canvasMaxAreaInBytes)?s.canvasMaxAreaInBytes:-1,q=typeof s.disableFontFace=="boolean"?s.disableFontFace:_is_node.isNodeJS,i0=s.fontExtraProperties===!0,t0=s.enableXfa===!0,P=s.ownerDocument||globalThis.document,c0=s.disableRange===!0,s0=s.disableStream===!0,W0=s.disableAutoFetch===!0,M0=s.pdfBug===!0,X0=X?X.length:s.length??NaN,B=typeof s.useSystemFonts=="boolean"?s.useSystemFonts:!_is_node.isNodeJS&&!q,Q=typeof s.useWorkerFetch=="boolean"?s.useWorkerFetch:C===_display_utils.DOMCMapReaderFactory&&K===_display_utils.DOMStandardFontDataFactory&&(0,_display_utils.isValidFetchUrl)(R,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(F,document.baseURI),$=s.canvasFactory||new DefaultCanvasFactory({ownerDocument:P}),l0=s.filterFactory||new DefaultFilterFactory({docId:o,ownerDocument:P});(0,_util.setVerbosityLevel)(V);const _={canvasFactory:$,filterFactory:l0};if(Q||(_.cMapReaderFactory=new C({baseUrl:R,isCompressed:S}),_.standardFontDataFactory=new K({baseUrl:F})),!G){const p0={verbosity:V,port:_worker_options.GlobalWorkerOptions.workerPort};G=p0.port?PDFWorker.fromPort(p0):new PDFWorker(p0),M._worker=G}const H={docId:o,apiVersion:"3.7.107",data:z,password:N,disableAutoFetch:W0,rangeChunkSize:y,length:X0,docBaseUrl:g,enableXfa:t0,evaluatorOptions:{maxImageSize:U,disableFontFace:q,ignoreErrors:j,isEvalSupported:E,isOffscreenCanvasSupported:D,canvasMaxAreaInBytes:v,fontExtraProperties:i0,useSystemFonts:B,cMapUrl:Q?R:null,standardFontDataUrl:Q?F:null}},d0={ignoreErrors:j,isEvalSupported:E,disableFontFace:q,fontExtraProperties:i0,enableXfa:t0,ownerDocument:P,disableAutoFetch:W0,pdfBug:M0,styleElement:null};return G.promise.then(function(){if(M.destroyed)throw new Error("Loading aborted");const p0=_fetchDocument(G,H),m0=new Promise(function(r0){let O0;X?O0=new _transport_stream.PDFDataTransportStream({length:X0,initialData:X.initialData,progressiveDone:X.progressiveDone,contentDispositionFilename:X.contentDispositionFilename,disableRange:c0,disableStream:s0},X):z||(O0=createPDFNetworkStream({url:u,length:X0,httpHeaders:W,withCredentials:O,rangeChunkSize:y,disableRange:c0,disableStream:s0})),r0(O0)});return Promise.all([p0,m0]).then(function(r0){let[O0,h0]=r0;if(M.destroyed)throw new Error("Loading aborted");const G0=new _message_handler.MessageHandler(o,O0,G.port),z0=new WorkerTransport(G0,M,h0,d0,_);M._transport=z0,G0.send("Ready",null)})}).catch(M._capability.reject),M}async function _fetchDocument(s,M){if(s.destroyed)throw new Error("Worker was destroyed");const o=await s.messageHandler.sendWithPromise("GetDocRequest",M,M.data?[M.data.buffer]:null);if(s.destroyed)throw new Error("Worker was destroyed");return o}function getUrlProp(s){if(s instanceof URL)return s.href;try{return new URL(s,window.location).href}catch{if(_is_node.isNodeJS&&typeof s=="string")return s}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(s){if(_is_node.isNodeJS&&typeof Buffer<"u"&&s instanceof Buffer)return(0,_display_utils.deprecated)("Please provide binary data as `Uint8Array`, rather than `Buffer`."),new Uint8Array(s);if(s instanceof Uint8Array&&s.byteLength===s.buffer.byteLength)return s;if(typeof s=="string")return(0,_util.stringToBytes)(s);if(typeof s=="object"&&!isNaN(s==null?void 0:s.length)||(0,_util.isArrayBuffer)(s))return new Uint8Array(s);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}const d=class{constructor(){this._capability=new _util.PromiseCapability,this._transport=null,this._worker=null,this.docId="d"+ue(d,k)._++,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){var s;this.destroyed=!0,await((s=this._transport)===null||s===void 0?void 0:s.destroy()),this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}};let PDFDocumentLoadingTask=d;k=new WeakMap,et(PDFDocumentLoadingTask,k,0),exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;class PDFDataRangeTransport{constructor(M,o){let u=arguments.length>2&&arguments[2]!==void 0&&arguments[2],z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;this.length=M,this.initialData=o,this.progressiveDone=u,this.contentDispositionFilename=z,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=new _util.PromiseCapability}addRangeListener(M){this._rangeListeners.push(M)}addProgressListener(M){this._progressListeners.push(M)}addProgressiveReadListener(M){this._progressiveReadListeners.push(M)}addProgressiveDoneListener(M){this._progressiveDoneListeners.push(M)}onDataRange(M,o){for(const u of this._rangeListeners)u(M,o)}onDataProgress(M,o){this._readyCapability.promise.then(()=>{for(const u of this._progressListeners)u(M,o)})}onDataProgressiveRead(M){this._readyCapability.promise.then(()=>{for(const o of this._progressiveReadListeners)o(M)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const M of this._progressiveDoneListeners)M()})}transportReady(){this._readyCapability.resolve()}requestDataRange(M,o){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(M,o){this._pdfInfo=M,this._transport=o}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(M){return this._transport.getPage(M)}getPageIndex(M){return this._transport.getPageIndex(M)}getDestinations(){return this._transport.getDestinations()}getDestination(M){return this._transport.getDestination(M)}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()}getJavaScript(){return this._transport.getJavaScript()}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 M=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return this._transport.startCleanup(M||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(M,o,u){et(this,a),et(this,w),et(this,t,null),et(this,e,!1);let z=arguments.length>3&&arguments[3]!==void 0&&arguments[3];this._pageIndex=M,this._pageInfo=o,this._transport=u,this._stats=z?new _display_utils.StatTimer:null,this._pdfBug=z,this.commonObjs=u.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:M,rotation:o=this.rotate,offsetX:u=0,offsetY:z=0,dontFlip:W=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new _display_utils.PageViewport({viewBox:this.view,scale:M,rotation:o,offsetX:u,offsetY:z,dontFlip:W})}getAnnotations(){let{intent:M="display"}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const o=this._transport.getRenderingIntent(M);return this._transport.getAnnotations(this._pageIndex,o.renderingIntent)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var M;return((M=this._transport._htmlForXfa)===null||M===void 0?void 0:M.children[this._pageIndex])||null}render(M){var o,u;let{canvasContext:z,viewport:W,intent:O="display",annotationMode:N=_util.AnnotationMode.ENABLE,transform:X=null,background:y=null,optionalContentConfigPromise:G=null,annotationCanvasMap:V=null,pageColors:g=null,printAnnotationStorage:R=null}=M;if((o=arguments[0])!==null&&o!==void 0&&o.canvasFactory)throw new Error("render no longer accepts the `canvasFactory`-option, please pass it to the `getDocument`-function instead.");(u=this._stats)===null||u===void 0||u.time("Overall");const S=this._transport.getRenderingIntent(O,N,R);ut(this,e,!1),nt(this,w,pe).call(this),G||(G=this._transport.getOptionalContentConfig());let C=this._intentStates.get(S.cacheKey);C||(C=Object.create(null),this._intentStates.set(S.cacheKey,C)),C.streamReaderCancelTimeout&&(clearTimeout(C.streamReaderCancelTimeout),C.streamReaderCancelTimeout=null);const F=!!(S.renderingIntent&_util.RenderingIntentFlag.PRINT);if(!C.displayReadyCapability){var K;C.displayReadyCapability=new _util.PromiseCapability,C.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(K=this._stats)===null||K===void 0||K.time("Page Request"),this._pumpOperatorList(S)}const j=D=>{var v,q;C.renderTasks.delete(U),(this._maybeCleanupAfterRender||F)&&ut(this,e,!0),nt(this,a,re).call(this,!F),D?(U.capability.reject(D),this._abortOperatorList({intentState:C,reason:D instanceof Error?D:new Error(D)})):U.capability.resolve(),(v=this._stats)===null||v===void 0||v.timeEnd("Rendering"),(q=this._stats)===null||q===void 0||q.timeEnd("Overall")},U=new InternalRenderTask({callback:j,params:{canvasContext:z,viewport:W,transform:X,background:y},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:V,operatorList:C.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!F,pdfBug:this._pdfBug,pageColors:g});(C.renderTasks||(C.renderTasks=new Set)).add(U);const E=U.task;return Promise.all([C.displayReadyCapability.promise,G]).then(D=>{var v;let[q,i0]=D;T(this,e)?j():((v=this._stats)===null||v===void 0||v.time("Rendering"),U.initializeGraphics({transparency:q,optionalContentConfig:i0}),U.operatorListChanged())}).catch(j),E}getOperatorList(){let{intent:M="display",annotationMode:o=_util.AnnotationMode.ENABLE,printAnnotationStorage:u=null}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const z=this._transport.getRenderingIntent(M,o,u,!0);let W,O=this._intentStates.get(z.cacheKey);if(O||(O=Object.create(null),this._intentStates.set(z.cacheKey,O)),!O.opListReadCapability){var N;W=Object.create(null),W.operatorListChanged=function(){O.operatorList.lastChunk&&(O.opListReadCapability.resolve(O.operatorList),O.renderTasks.delete(W))},O.opListReadCapability=new _util.PromiseCapability,(O.renderTasks||(O.renderTasks=new Set)).add(W),O.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(N=this._stats)===null||N===void 0||N.time("Page Request"),this._pumpOperatorList(z)}return O.opListReadCapability.promise}streamTextContent(){let{includeMarkedContent:M=!1,disableNormalization:o=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:M===!0,disableNormalization:o===!0},{highWaterMark:100,size:u=>u.items.length})}getTextContent(){let M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then(u=>_xfa_text.XfaText.textContent(u));const o=this.streamTextContent(M);return new Promise(function(u,z){const W=o.getReader(),O={items:[],styles:Object.create(null)};(function N(){W.read().then(function(X){let{value:y,done:G}=X;G?u(O):(Object.assign(O.styles,y.styles),O.items.push(...y.items),N())},z)})()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const M=[];for(const o of this._intentStates.values())if(this._abortOperatorList({intentState:o,reason:new Error("Page was destroyed."),force:!0}),!o.opListReadCapability)for(const u of o.renderTasks)M.push(u.completed),u.cancel();return this.objs.clear(),ut(this,e,!1),nt(this,w,pe).call(this),Promise.all(M)}cleanup(){let M=arguments.length>0&&arguments[0]!==void 0&&arguments[0];ut(this,e,!0);const o=nt(this,a,re).call(this,!1);return M&&o&&this._stats&&(this._stats=new _display_utils.StatTimer),o}_startRenderPage(M,o){var u,z;const W=this._intentStates.get(o);W&&((u=this._stats)===null||u===void 0||u.timeEnd("Page Request"),(z=W.displayReadyCapability)===null||z===void 0||z.resolve(M))}_renderPageChunk(M,o){for(let u=0,z=M.length;u<z;u++)o.operatorList.fnArray.push(M.fnArray[u]),o.operatorList.argsArray.push(M.argsArray[u]);o.operatorList.lastChunk=M.lastChunk,o.operatorList.separateAnnots=M.separateAnnots;for(const u of o.renderTasks)u.operatorListChanged();M.lastChunk&&nt(this,a,re).call(this,!0)}_pumpOperatorList(M){let{renderingIntent:o,cacheKey:u,annotationStorageMap:z}=M;const W=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:o,cacheKey:u,annotationStorage:z}).getReader(),O=this._intentStates.get(u);O.streamReader=W;const N=()=>{W.read().then(X=>{let{value:y,done:G}=X;G?O.streamReader=null:this._transport.destroyed||(this._renderPageChunk(y,O),N())},X=>{if(O.streamReader=null,!this._transport.destroyed){if(O.operatorList){O.operatorList.lastChunk=!0;for(const y of O.renderTasks)y.operatorListChanged();nt(this,a,re).call(this,!0)}if(O.displayReadyCapability)O.displayReadyCapability.reject(X);else{if(!O.opListReadCapability)throw X;O.opListReadCapability.reject(X)}}})};N()}_abortOperatorList(M){let{intentState:o,reason:u,force:z=!1}=M;if(o.streamReader){if(o.streamReaderCancelTimeout&&(clearTimeout(o.streamReaderCancelTimeout),o.streamReaderCancelTimeout=null),!z){if(o.renderTasks.size>0)return;if(u instanceof _display_utils.RenderingCancelledException){let W=RENDERING_CANCELLED_TIMEOUT;u.extraDelay>0&&u.extraDelay<1e3&&(W+=u.extraDelay),o.streamReaderCancelTimeout=setTimeout(()=>{o.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:o,reason:u,force:!0})},W);return}}if(o.streamReader.cancel(new _util.AbortException(u.message)).catch(()=>{}),o.streamReader=null,!this._transport.destroyed){for(const[W,O]of this._intentStates)if(O===o){this._intentStates.delete(W);break}this.cleanup()}}}get stats(){return this._stats}}t=new WeakMap,e=new WeakMap,a=new WeakSet,re=function(){let s=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(nt(this,w,pe).call(this),!T(this,e))return!1;if(s)return ut(this,t,setTimeout(()=>{ut(this,t,null),nt(this,a,re).call(this,!1)},DELAYED_CLEANUP_TIMEOUT)),!1;for(const{renderTasks:M,operatorList:o}of this._intentStates.values())if(M.size>0||!o.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),ut(this,e,!1),!0},w=new WeakSet,pe=function(){T(this,t)&&(clearTimeout(T(this,t)),ut(this,t,null))},exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{constructor(){et(this,p,new Set),et(this,h,Promise.resolve())}postMessage(M,o){const u={data:structuredClone(M,null)};T(this,h).then(()=>{for(const z of T(this,p))z.call(this,u)})}addEventListener(M,o){T(this,p).add(o)}removeEventListener(M,o){T(this,p).delete(o)}terminate(){T(this,p).clear()}}p=new WeakMap,h=new WeakMap,exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};if(exports.PDFWorkerUtil=PDFWorkerUtil,_is_node.isNodeJS&&typeof commonjsRequire=="function")PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if(typeof document=="object"){var _document,_document$currentScri;const s=(_document=document)===null||_document===void 0||(_document$currentScri=_document.currentScript)===null||_document$currentScri===void 0?void 0:_document$currentScri.src;s&&(PDFWorkerUtil.fallbackWorkerSrc=s.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(s,M){let o;try{if(o=new URL(s),!o.origin||o.origin==="null")return!1}catch{return!1}const u=new URL(M,o);return o.origin===u.origin},PDFWorkerUtil.createCDNWrapper=function(s){const M=`importScripts("${s}");`;return URL.createObjectURL(new Blob([M]))};const _PDFWorker=class{constructor(){let{name:s=null,port:M=null,verbosity:o=(0,_util.getVerbosityLevel)()}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(M&&T(_PDFWorker,l).has(M))throw new Error("Cannot use more than one PDFWorker per port.");this.name=s,this.destroyed=!1,this.verbosity=o,this._readyCapability=new _util.PromiseCapability,this._port=null,this._webWorker=null,this._messageHandler=null,M?(T(_PDFWorker,l).set(M,this),this._initializeFromPort(M)):this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(s){this._port=s,this._messageHandler=new _message_handler.MessageHandler("main","worker",s),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}_initialize(){if(!PDFWorkerUtil.isWorkerDisabled&&!_PDFWorker._mainThreadWorkerMessageHandler){let{workerSrc:s}=_PDFWorker;try{PDFWorkerUtil.isSameOrigin(window.location.href,s)||(s=PDFWorkerUtil.createCDNWrapper(new URL(s,window.location).href));const M=new Worker(s),o=new _message_handler.MessageHandler("main","worker",M),u=()=>{M.removeEventListener("error",z),o.destroy(),M.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},z=()=>{this._webWorker||u()};M.addEventListener("error",z),o.on("test",O=>{M.removeEventListener("error",z),this.destroyed?u():O?(this._messageHandler=o,this._port=M,this._webWorker=M,this._readyCapability.resolve(),o.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),o.destroy(),M.terminate())}),o.on("ready",O=>{if(M.removeEventListener("error",z),this.destroyed)u();else try{W()}catch{this._setupFakeWorker()}});const W=()=>{const O=new Uint8Array;o.send("test",O,[O.buffer])};W();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(s=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const M=new LoopbackPort;this._port=M;const o="fake"+PDFWorkerUtil.fakeWorkerId++,u=new _message_handler.MessageHandler(o+"_worker",o,M);s.setup(u,M);const z=new _message_handler.MessageHandler(o,o+"_worker",M);this._messageHandler=z,this._readyCapability.resolve(),z.send("configure",{verbosity:this.verbosity})}).catch(s=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${s.message}".`))})}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),T(_PDFWorker,l).delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(s){if(s==null||!s.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return T(this,l).has(s.port)?T(this,l).get(s.port):new _PDFWorker(s)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(PDFWorkerUtil.fallbackWorkerSrc!==null)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){try{var s;return((s=globalThis.pdfjsWorker)===null||s===void 0?void 0:s.WorkerMessageHandler)||null}catch{return null}}static get _setupFakeWorkerGlobal(){const loader=async()=>{const mainWorkerMessageHandler=this._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_is_node.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())}};let PDFWorker=_PDFWorker;l=new WeakMap,et(PDFWorker,l,new WeakMap),exports.PDFWorker=PDFWorker;class WorkerTransport{constructor(M,o,u,z,W){et(this,m),et(this,c,new Map),et(this,b,new Map),et(this,L,new Map),this.messageHandler=M,this.loadingTask=o,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({ownerDocument:z.ownerDocument,styleElement:z.styleElement}),this._params=z,this.canvasFactory=W.canvasFactory,this.filterFactory=W.filterFactory,this.cMapReaderFactory=W.cMapReaderFactory,this.standardFontDataFactory=W.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=u,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(M){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_util.AnnotationMode.ENABLE,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,z=arguments.length>3&&arguments[3]!==void 0&&arguments[3],W=_util.RenderingIntentFlag.DISPLAY,O=null;switch(M){case"any":W=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":W=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${M}`)}switch(o){case _util.AnnotationMode.DISABLE:W+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:W+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:W+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,O=(W&_util.RenderingIntentFlag.PRINT&&u instanceof _annotation_storage.PrintAnnotationStorage?u:this.annotationStorage).serializable;break;default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${o}`)}return z&&(W+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:W,cacheKey:`${W}_${_annotation_storage.AnnotationStorage.getHash(O)}`,annotationStorageMap:O}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=new _util.PromiseCapability,this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));const M=[];for(const u of T(this,b).values())M.push(u._destroy());T(this,b).clear(),T(this,L).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const o=this.messageHandler.sendWithPromise("Terminate",null);return M.push(o),Promise.all(M).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),T(this,c).clear(),this.filterFactory.destroy(),this._networkStream&&this._networkStream.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:M,loadingTask:o}=this;M.on("GetReader",(u,z)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=W=>{this._lastProgress={loaded:W.loaded,total:W.total}},z.onPull=()=>{this._fullReader.read().then(function(W){let{value:O,done:N}=W;N?z.close():((0,_util.assert)(O instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),z.enqueue(new Uint8Array(O),1,[O]))}).catch(W=>{z.error(W)})},z.onCancel=W=>{this._fullReader.cancel(W),z.ready.catch(O=>{if(!this.destroyed)throw O})}}),M.on("ReaderHeadersReady",u=>{const z=new _util.PromiseCapability,W=this._fullReader;return W.headersReady.then(()=>{if(!W.isStreamingSupported||!W.isRangeSupported){if(this._lastProgress){var O;(O=o.onProgress)===null||O===void 0||O.call(o,this._lastProgress)}W.onProgress=N=>{var X;(X=o.onProgress)===null||X===void 0||X.call(o,{loaded:N.loaded,total:N.total})}}z.resolve({isStreamingSupported:W.isStreamingSupported,isRangeSupported:W.isRangeSupported,contentLength:W.contentLength})},z.reject),z.promise}),M.on("GetRangeReader",(u,z)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const W=this._networkStream.getRangeReader(u.begin,u.end);W?(z.onPull=()=>{W.read().then(function(O){let{value:N,done:X}=O;X?z.close():((0,_util.assert)(N instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),z.enqueue(new Uint8Array(N),1,[N]))}).catch(O=>{z.error(O)})},z.onCancel=O=>{W.cancel(O),z.ready.catch(N=>{if(!this.destroyed)throw N})}):z.close()}),M.on("GetDoc",u=>{let{pdfInfo:z}=u;this._numPages=z.numPages,this._htmlForXfa=z.htmlForXfa,delete z.htmlForXfa,o._capability.resolve(new PDFDocumentProxy(z,this))}),M.on("DocException",function(u){let z;switch(u.name){case"PasswordException":z=new _util.PasswordException(u.message,u.code);break;case"InvalidPDFException":z=new _util.InvalidPDFException(u.message);break;case"MissingPDFException":z=new _util.MissingPDFException(u.message);break;case"UnexpectedResponseException":z=new _util.UnexpectedResponseException(u.message,u.status);break;case"UnknownErrorException":z=new _util.UnknownErrorException(u.message,u.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}o._capability.reject(z)}),M.on("PasswordRequest",u=>{if(this._passwordCapability=new _util.PromiseCapability,o.onPassword){const z=W=>{W instanceof Error?this._passwordCapability.reject(W):this._passwordCapability.resolve({password:W})};try{o.onPassword(z,u.code)}catch(W){this._passwordCapability.reject(W)}}else this._passwordCapability.reject(new _util.PasswordException(u.message,u.code));return this._passwordCapability.promise}),M.on("DataLoaded",u=>{var z;(z=o.onProgress)===null||z===void 0||z.call(o,{loaded:u.length,total:u.length}),this.downloadInfoCapability.resolve(u)}),M.on("StartRenderPage",u=>{this.destroyed||T(this,b).get(u.pageIndex)._startRenderPage(u.transparency,u.cacheKey)}),M.on("commonobj",u=>{var z;let[W,O,N]=u;if(!this.destroyed&&!this.commonObjs.has(W))switch(O){case"Font":const X=this._params;if("error"in N){const V=N.error;(0,_util.warn)(`Error during font loading: ${V}`),this.commonObjs.resolve(W,V);break}const y=X.pdfBug&&(z=globalThis.FontInspector)!==null&&z!==void 0&&z.enabled?(V,g)=>globalThis.FontInspector.fontAdded(V,g):null,G=new _font_loader.FontFaceObject(N,{isEvalSupported:X.isEvalSupported,disableFontFace:X.disableFontFace,ignoreErrors:X.ignoreErrors,inspectFont:y});this.fontLoader.bind(G).catch(V=>M.sendWithPromise("FontFallback",{id:W})).finally(()=>{!X.fontExtraProperties&&G.data&&(G.data=null),this.commonObjs.resolve(W,G)});break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(W,N);break;default:throw new Error(`Got unknown common object type ${O}`)}}),M.on("obj",u=>{let[z,W,O,N]=u;if(this.destroyed)return;const X=T(this,b).get(W);if(!X.objs.has(z))switch(O){case"Image":if(X.objs.resolve(z,N),N){let G;if(N.bitmap){const{width:V,height:g}=N;G=V*g*4}else{var y;G=((y=N.data)===null||y===void 0?void 0:y.length)||0}G>_util.MAX_IMAGE_SIZE_TO_CACHE&&(X._maybeCleanupAfterRender=!0)}break;case"Pattern":X.objs.resolve(z,N);break;default:throw new Error(`Got unknown object type ${O}`)}}),M.on("DocProgress",u=>{var z;this.destroyed||(z=o.onProgress)===null||z===void 0||z.call(o,{loaded:u.loaded,total:u.total})}),M.on("FetchBuiltInCMap",u=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(u):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),M.on("FetchStandardFontData",u=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(u):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var M;return this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead."),this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:this.annotationStorage.serializable,filename:((M=this._fullReader)===null||M===void 0?void 0:M.filename)??null}).finally(()=>{this.annotationStorage.resetModified()})}getPage(M){if(!Number.isInteger(M)||M<=0||M>this._numPages)return Promise.reject(new Error("Invalid page request."));const o=M-1,u=T(this,L).get(o);if(u)return u;const z=this.messageHandler.sendWithPromise("GetPage",{pageIndex:o}).then(W=>{if(this.destroyed)throw new Error("Transport destroyed");const O=new PDFPageProxy(o,W,this,this._params.pdfBug);return T(this,b).set(o,O),O});return T(this,L).set(o,z),z}getPageIndex(M){return typeof M!="object"||M===null||!Number.isInteger(M.num)||M.num<0||!Number.isInteger(M.gen)||M.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:M.num,gen:M.gen})}getAnnotations(M,o){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:M,intent:o})}getFieldObjects(){return nt(this,m,Ae).call(this,"GetFieldObjects")}hasJSActions(){return nt(this,m,Ae).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(M){return typeof M!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:M})}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)}getJavaScript(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}getDocJSActions(){return this.messageHandler.sendWithPromise("GetDocJSActions",null)}getPageJSActions(M){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:M})}getStructTree(M){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:M})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(M=>new _optional_content_config.OptionalContentConfig(M))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const M="GetMetadata",o=T(this,c).get(M);if(o)return o;const u=this.messageHandler.sendWithPromise(M,null).then(z=>{var W,O;return{info:z[0],metadata:z[1]?new _metadata.Metadata(z[1]):null,contentDispositionFilename:((W=this._fullReader)===null||W===void 0?void 0:W.filename)??null,contentLength:((O=this._fullReader)===null||O===void 0?void 0:O.contentLength)??null}});return T(this,c).set(M,u),u}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(){let M=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const o of T(this,b).values())if(!o.cleanup())throw new Error(`startCleanup: Page ${o.pageNumber} is currently rendering.`);this.commonObjs.clear(),M||this.fontLoader.clear(),T(this,c).clear(),this.filterFactory.destroy(!0)}}get loadingParams(){const{disableAutoFetch:M,enableXfa:o}=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:M,enableXfa:o})}}c=new WeakMap,b=new WeakMap,L=new WeakMap,m=new WeakSet,Ae=function(s){let M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const o=T(this,c).get(s);if(o)return o;const u=this.messageHandler.sendWithPromise(s,M);return T(this,c).set(s,u),u};class PDFObjects{constructor(){et(this,I),et(this,x,Object.create(null))}get(M){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(o){const z=nt(this,I,_e).call(this,M);return z.capability.promise.then(()=>o(z.data)),null}const u=T(this,x)[M];if(u==null||!u.capability.settled)throw new Error(`Requesting object that isn't resolved yet ${M}.`);return u.data}has(M){const o=T(this,x)[M];return(o==null?void 0:o.capability.settled)||!1}resolve(M){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const u=nt(this,I,_e).call(this,M);u.data=o,u.capability.resolve()}clear(){for(const o in T(this,x)){var M;const{data:u}=T(this,x)[o];u==null||(M=u.bitmap)===null||M===void 0||M.close()}ut(this,x,Object.create(null))}}x=new WeakMap,I=new WeakSet,_e=function(s){return T(this,x)[s]||(T(this,x)[s]={capability:new _util.PromiseCapability,data:null})};class RenderTask{constructor(M){et(this,i,null),ut(this,i,M),this.onContinue=null}get promise(){return T(this,i).capability.promise}cancel(){let M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;T(this,i).cancel(null,M)}get separateAnnots(){const{separateAnnots:M}=T(this,i).operatorList;if(!M)return!1;const{annotationCanvasMap:o}=T(this,i);return M.form||M.canvas&&(o==null?void 0:o.size)>0}}i=new WeakMap,exports.RenderTask=RenderTask;const n=class{constructor(s){let{callback:M,params:o,objs:u,commonObjs:z,annotationCanvasMap:W,operatorList:O,pageIndex:N,canvasFactory:X,filterFactory:y,useRequestAnimationFrame:G=!1,pdfBug:V=!1,pageColors:g=null}=s;this.callback=M,this.params=o,this.objs=u,this.commonObjs=z,this.annotationCanvasMap=W,this.operatorListIdx=null,this.operatorList=O,this._pageIndex=N,this.canvasFactory=X,this.filterFactory=y,this._pdfBug=V,this.pageColors=g,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=G===!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=o.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics(s){var M,o;let{transparency:u=!1,optionalContentConfig:z}=s;if(this.cancelled)return;if(this._canvas){if(T(n,A).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.");T(n,A).add(this._canvas)}this._pdfBug&&(M=globalThis.StepperManager)!==null&&M!==void 0&&M.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:W,viewport:O,transform:N,background:X}=this.params;this.gfx=new _canvas.CanvasGraphics(W,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:z},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:N,viewport:O,transparency:u,background:X}),this.operatorListIdx=0,this.graphicsReady=!0,(o=this.graphicsReadyCallback)===null||o===void 0||o.call(this)}cancel(){var s;let M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.running=!1,this.cancelled=!0,(s=this.gfx)===null||s===void 0||s.endDrawing(),this._canvas&&T(n,A).delete(this._canvas),this.callback(M||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,"canvas",o))}operatorListChanged(){var s;this.graphicsReady?((s=this.stepper)===null||s===void 0||s.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}_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(this.pageColors),this._canvas&&T(n,A).delete(this._canvas),this.callback())))}};let InternalRenderTask=n;A=new WeakMap,et(InternalRenderTask,A,new WeakSet);const version="3.7.107";exports.version=version;const build="036f855dc";exports.build=build},(s,M,o)=>{var u,z,W,O,N;Object.defineProperty(M,"__esModule",{value:!0}),M.PrintAnnotationStorage=M.AnnotationStorage=void 0;var X=o(1),y=o(140),G=o(144);class V{constructor(){et(this,W),et(this,u,!1),et(this,z,new Map),this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(S,C){const F=T(this,z).get(S);return F===void 0?C:Object.assign(C,F)}getRawValue(S){return T(this,z).get(S)}remove(S){if(T(this,z).delete(S),T(this,z).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const C of T(this,z).values())if(C instanceof y.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(S,C){const F=T(this,z).get(S);let K=!1;if(F!==void 0)for(const[j,U]of Object.entries(C))F[j]!==U&&(K=!0,F[j]=U);else K=!0,T(this,z).set(S,C);K&&nt(this,W,O).call(this),C instanceof y.AnnotationEditor&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(C.constructor._type)}has(S){return T(this,z).has(S)}getAll(){return T(this,z).size>0?(0,X.objectFromMap)(T(this,z)):null}setAll(S){for(const[C,F]of Object.entries(S))this.setValue(C,F)}get size(){return T(this,z).size}resetModified(){T(this,u)&&(ut(this,u,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new g(this)}get serializable(){if(T(this,z).size===0)return null;const S=new Map;for(const[C,F]of T(this,z)){const K=F instanceof y.AnnotationEditor?F.serialize():F;K&&S.set(C,K)}return S}static getHash(S){if(!S)return"";const C=new G.MurmurHash3_64;for(const[F,K]of S)C.update(`${F}:${JSON.stringify(K)}`);return C.hexdigest()}}u=new WeakMap,z=new WeakMap,W=new WeakSet,O=function(){T(this,u)||(ut(this,u,!0),typeof this.onSetModified=="function"&&this.onSetModified())},M.AnnotationStorage=V;class g extends V{constructor(S){super(),et(this,N,null),ut(this,N,structuredClone(S.serializable))}get print(){(0,X.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return T(this,N)}}N=new WeakMap,M.PrintAnnotationStorage=g},(s,M,o)=>{var u,z,W,O,N,X;Object.defineProperty(M,"__esModule",{value:!0}),M.AnnotationEditor=void 0;var y=o(141),G=o(1);const V=class{constructor(R){et(this,u,this.focusin.bind(this)),et(this,z,this.focusout.bind(this)),et(this,W,!1),et(this,O,!1),et(this,N,!1),It(this,"_uiManager",null),et(this,X,V._zIndex++),this.constructor===V&&(0,G.unreachable)("Cannot initialize AnnotationEditor."),this.parent=R.parent,this.id=R.id,this.width=this.height=null,this.pageIndex=R.parent.pageIndex,this.name=R.name,this.div=null,this._uiManager=R.uiManager;const{rotation:S,rawDims:{pageWidth:C,pageHeight:F,pageX:K,pageY:j}}=this.parent.viewport;this.rotation=S,this.pageRotation=(360+S-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[C,F],this.pageTranslation=[K,j];const[U,E]=this.parentDimensions;this.x=R.x/U,this.y=R.y/E,this.isAttachedToDOM=!1}static get _defaultLineColor(){return(0,G.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}addCommands(R){this._uiManager.addCommands(R)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=T(this,X)}setParent(R){R!==null&&(this.pageIndex=R.pageIndex,this.pageDimensions=R.pageDimensions),this.parent=R}focusin(R){T(this,W)?ut(this,W,!1):this.parent.setSelected(this)}focusout(R){var S;if(!this.isAttachedToDOM)return;const C=R.relatedTarget;(C==null||!C.closest(`#${this.id}`))&&(R.preventDefault(),(S=this.parent)!==null&&S!==void 0&&S.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}dragstart(R){const S=this.parent.div.getBoundingClientRect();this.startX=R.clientX-S.x,this.startY=R.clientY-S.y,R.dataTransfer.setData("text/plain",this.id),R.dataTransfer.effectAllowed="move"}setAt(R,S,C,F){const[K,j]=this.parentDimensions;[C,F]=this.screenToPageTranslation(C,F),this.x=(R+C)/K,this.y=(S+F)/j,this.div.style.left=100*this.x+"%",this.div.style.top=100*this.y+"%"}translate(R,S){const[C,F]=this.parentDimensions;[R,S]=this.screenToPageTranslation(R,S),this.x+=R/C,this.y+=S/F,this.div.style.left=100*this.x+"%",this.div.style.top=100*this.y+"%"}screenToPageTranslation(R,S){switch(this.parentRotation){case 90:return[S,-R];case 180:return[-R,-S];case 270:return[-S,R];default:return[R,S]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{realScale:R}=this._uiManager.viewParameters,[S,C]=this.pageDimensions;return[S*R,C*R]}setDims(R,S){const[C,F]=this.parentDimensions;this.div.style.width=100*R/C+"%",this.div.style.height=100*S/F+"%"}fixDims(){const{style:R}=this.div,{height:S,width:C}=R,F=C.endsWith("%"),K=S.endsWith("%");if(F&&K)return;const[j,U]=this.parentDimensions;F||(R.width=100*parseFloat(C)/j+"%"),K||(R.height=100*parseFloat(S)/U+"%")}getInitialTranslation(){return[0,0]}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",T(this,u)),this.div.addEventListener("focusout",T(this,z));const[R,S]=this.getInitialTranslation();return this.translate(R,S),(0,y.bindEvents)(this,this.div,["dragstart","pointerdown"]),this.div}pointerdown(R){const{isMac:S}=G.FeatureTest.platform;R.button!==0||R.ctrlKey&&S?R.preventDefault():(R.ctrlKey&&!S||R.shiftKey||R.metaKey&&S?this.parent.toggleSelected(this):this.parent.setSelected(this),ut(this,W,!0))}getRect(R,S){const C=this.parentScale,[F,K]=this.pageDimensions,[j,U]=this.pageTranslation,E=R/C,D=S/C,v=this.x*F,q=this.y*K,i0=this.width*F,t0=this.height*K;switch(this.rotation){case 0:return[v+E+j,K-q-D-t0+U,v+E+i0+j,K-q-D+U];case 90:return[v+D+j,K-q+E+U,v+D+t0+j,K-q+E+i0+U];case 180:return[v-E-i0+j,K-q+D+U,v-E+j,K-q+D+t0+U];case 270:return[v-D-t0+j,K-q-E-i0+U,v-D+j,K-q-E+U];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(R,S){const[C,F,K,j]=R,U=K-C,E=j-F;switch(this.rotation){case 0:return[C,S-j,U,E];case 90:return[C,S-F,E,U];case 180:return[K,S-F,U,E];case 270:return[K,S-j,E,U];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){ut(this,N,!0)}disableEditMode(){ut(this,N,!1)}isInEditMode(){return T(this,N)}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){var R;(R=this.div)===null||R===void 0||R.addEventListener("focusin",T(this,u))}serialize(){(0,G.unreachable)("An editor must be serializable")}static deserialize(R,S,C){const F=new this.prototype.constructor({parent:S,id:S.getNextId(),uiManager:C});F.rotation=R.rotation;const[K,j]=F.pageDimensions,[U,E,D,v]=F.getRectInCurrentCoords(R.rect,j);return F.x=U/K,F.y=E/j,F.width=D/K,F.height=v/j,F}remove(){this.div.removeEventListener("focusin",T(this,u)),this.div.removeEventListener("focusout",T(this,z)),this.isEmpty()||this.commit(),this.parent.remove(this)}select(){var R;(R=this.div)===null||R===void 0||R.classList.add("selectedEditor")}unselect(){var R;(R=this.div)===null||R===void 0||R.classList.remove("selectedEditor")}updateParams(R,S){}disableEditing(){}enableEditing(){}get propertiesToUpdate(){return{}}get contentDiv(){return this.div}get isEditing(){return T(this,O)}set isEditing(R){ut(this,O,R),R?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null)}};let g=V;u=new WeakMap,z=new WeakMap,W=new WeakMap,O=new WeakMap,N=new WeakMap,X=new WeakMap,It(g,"_colorManager",new y.ColorManager),It(g,"_zIndex",1),M.AnnotationEditor=g},(s,M,o)=>{var u,z,W,O,N,X,y,G,V,g,R,S,C,F,K,j,U,E,D,v,q,i0,t0,P,c0,s0,W0,M0,X0,B,Q,$,l0,_,H,d0,p0,m0,r0,O0,h0,G0,z0,g0,f0,S0,J,e0,a0,o0,Z0,T0;Object.defineProperty(M,"__esModule",{value:!0}),M.KeyboardManager=M.CommandManager=M.ColorManager=M.AnnotationEditorUIManager=void 0,M.bindEvents=function(Y0,U0,i1){for(const b1 of i1)U0.addEventListener(b1,Y0[b1].bind(Y0))},M.opacityToHex=function(Y0){return Math.round(Math.min(255,Math.max(1,255*Y0))).toString(16).padStart(2,"0")};var I0=o(1),A0=o(142);class F0{constructor(){et(this,u,0)}getId(){return`${I0.AnnotationEditorPrefix}${ue(this,u)._++}`}}u=new WeakMap;class J0{constructor(){et(this,z,[]),et(this,W,!1),et(this,O,void 0),et(this,N,-1);let U0=arguments.length>0&&arguments[0]!==void 0?arguments[0]:128;ut(this,O,U0)}add(U0){let{cmd:i1,undo:b1,mustExec:U1,type:p1=NaN,overwriteIfSameType:x0=!1,keepUndo:o1=!1}=U0;if(U1&&i1(),T(this,W))return;const Z1={cmd:i1,undo:b1,type:p1};if(T(this,N)===-1){T(this,z).length>0&&(T(this,z).length=0),ut(this,N,0),T(this,z).push(Z1);return}if(x0&&T(this,z)[T(this,N)].type===p1){o1&&(Z1.undo=T(this,z)[T(this,N)].undo),T(this,z)[T(this,N)]=Z1;return}const m1=T(this,N)+1;m1===T(this,O)?T(this,z).splice(0,1):(ut(this,N,m1),m1<T(this,z).length&&T(this,z).splice(m1)),T(this,z).push(Z1)}undo(){T(this,N)!==-1&&(ut(this,W,!0),T(this,z)[T(this,N)].undo(),ut(this,W,!1),ut(this,N,T(this,N)-1))}redo(){T(this,N)<T(this,z).length-1&&(ut(this,N,T(this,N)+1),ut(this,W,!0),T(this,z)[T(this,N)].cmd(),ut(this,W,!1))}hasSomethingToUndo(){return T(this,N)!==-1}hasSomethingToRedo(){return T(this,N)<T(this,z).length-1}destroy(){ut(this,z,null)}}z=new WeakMap,W=new WeakMap,O=new WeakMap,N=new WeakMap,M.CommandManager=J0;class K0{constructor(U0){et(this,X),this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:i1}=I0.FeatureTest.platform;for(const[b1,U1]of U0)for(const p1 of b1){const x0=p1.startsWith("mac+");i1&&x0?(this.callbacks.set(p1.slice(4),U1),this.allKeys.add(p1.split("+").at(-1))):!i1&&!x0&&(this.callbacks.set(p1,U1),this.allKeys.add(p1.split("+").at(-1)))}}exec(U0,i1){if(!this.allKeys.has(i1.key))return;const b1=this.callbacks.get(nt(this,X,y).call(this,i1));b1&&(b1.bind(U0)(),i1.stopPropagation(),i1.preventDefault())}}X=new WeakSet,y=function(Y0){Y0.altKey&&this.buffer.push("alt"),Y0.ctrlKey&&this.buffer.push("ctrl"),Y0.metaKey&&this.buffer.push("meta"),Y0.shiftKey&&this.buffer.push("shift"),this.buffer.push(Y0.key);const U0=this.buffer.join("+");return this.buffer.length=0,U0},M.KeyboardManager=K0;const E0=class{get _colors(){const Y0=new Map([["CanvasText",null],["Canvas",null]]);return(0,A0.getColorValues)(Y0),(0,I0.shadow)(this,"_colors",Y0)}convert(Y0){const U0=(0,A0.getRGB)(Y0);if(!window.matchMedia("(forced-colors: active)").matches)return U0;for(const[i1,b1]of this._colors)if(b1.every((U1,p1)=>U1===U0[p1]))return E0._colorsMapping.get(i1);return U0}getHexCode(Y0){const U0=this._colors.get(Y0);return U0?I0.Util.makeHexColor(...U0):Y0}};let H0=E0;It(H0,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]])),M.ColorManager=H0;const q0=class{constructor(Y0,U0,i1){et(this,Q),et(this,l0),et(this,H),et(this,p0),et(this,r0),et(this,h0),et(this,z0),et(this,f0),et(this,J),et(this,a0),et(this,Z0),et(this,G,null),et(this,V,new Map),et(this,g,new Map),et(this,R,null),et(this,S,new J0),et(this,C,0),et(this,F,null),et(this,K,new Set),et(this,j,null),et(this,U,new F0),et(this,E,!1),et(this,D,I0.AnnotationEditorType.NONE),et(this,v,new Set),et(this,q,this.copy.bind(this)),et(this,i0,this.cut.bind(this)),et(this,t0,this.paste.bind(this)),et(this,P,this.keydown.bind(this)),et(this,c0,this.onEditingAction.bind(this)),et(this,s0,this.onPageChanging.bind(this)),et(this,W0,this.onScaleChanging.bind(this)),et(this,M0,this.onRotationChanging.bind(this)),et(this,X0,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1}),et(this,B,null),ut(this,B,Y0),ut(this,j,U0),T(this,j)._on("editingaction",T(this,c0)),T(this,j)._on("pagechanging",T(this,s0)),T(this,j)._on("scalechanging",T(this,W0)),T(this,j)._on("rotationchanging",T(this,M0)),ut(this,R,i1),this.viewParameters={realScale:A0.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}destroy(){nt(this,l0,_).call(this),T(this,j)._off("editingaction",T(this,c0)),T(this,j)._off("pagechanging",T(this,s0)),T(this,j)._off("scalechanging",T(this,W0)),T(this,j)._off("rotationchanging",T(this,M0));for(const Y0 of T(this,g).values())Y0.destroy();T(this,g).clear(),T(this,V).clear(),T(this,K).clear(),ut(this,G,null),T(this,v).clear(),T(this,S).destroy()}onPageChanging(Y0){let{pageNumber:U0}=Y0;ut(this,C,U0-1)}focusMainContainer(){T(this,B).focus()}addShouldRescale(Y0){T(this,K).add(Y0)}removeShouldRescale(Y0){T(this,K).delete(Y0)}onScaleChanging(Y0){let{scale:U0}=Y0;this.commitOrRemove(),this.viewParameters.realScale=U0*A0.PixelsPerInch.PDF_TO_CSS_UNITS;for(const i1 of T(this,K))i1.onScaleChanging()}onRotationChanging(Y0){let{pagesRotation:U0}=Y0;this.commitOrRemove(),this.viewParameters.rotation=U0}addToAnnotationStorage(Y0){Y0.isEmpty()||!T(this,R)||T(this,R).has(Y0.id)||T(this,R).setValue(Y0.id,Y0)}copy(Y0){if(Y0.preventDefault(),T(this,G)&&T(this,G).commitOrRemove(),!this.hasSelection)return;const U0=[];for(const i1 of T(this,v))i1.isEmpty()||U0.push(i1.serialize());U0.length!==0&&Y0.clipboardData.setData("application/pdfjs",JSON.stringify(U0))}cut(Y0){this.copy(Y0),this.delete()}paste(Y0){Y0.preventDefault();let U0=Y0.clipboardData.getData("application/pdfjs");if(!U0)return;try{U0=JSON.parse(U0)}catch(b1){(0,I0.warn)(`paste: "${b1.message}".`);return}if(!Array.isArray(U0))return;this.unselectAll();const i1=T(this,g).get(T(this,C));try{const b1=[];for(const x0 of U0){const o1=i1.deserialize(x0);if(!o1)return;b1.push(o1)}const U1=()=>{for(const x0 of b1)nt(this,J,e0).call(this,x0);nt(this,Z0,T0).call(this,b1)},p1=()=>{for(const x0 of b1)x0.remove()};this.addCommands({cmd:U1,undo:p1,mustExec:!0})}catch(b1){(0,I0.warn)(`paste: "${b1.message}".`)}}keydown(Y0){var U0;(U0=this.getActive())!==null&&U0!==void 0&&U0.shouldGetKeyboardEvents()||q0._keyboardManager.exec(this,Y0)}onEditingAction(Y0){["undo","redo","delete","selectAll"].includes(Y0.name)&&this[Y0.name]()}setEditingState(Y0){Y0?(nt(this,Q,$).call(this),nt(this,H,d0).call(this),nt(this,r0,O0).call(this,{isEditing:T(this,D)!==I0.AnnotationEditorType.NONE,isEmpty:nt(this,a0,o0).call(this),hasSomethingToUndo:T(this,S).hasSomethingToUndo(),hasSomethingToRedo:T(this,S).hasSomethingToRedo(),hasSelectedEditor:!1})):(nt(this,l0,_).call(this),nt(this,p0,m0).call(this),nt(this,r0,O0).call(this,{isEditing:!1}))}registerEditorTypes(Y0){if(!T(this,F)){ut(this,F,Y0);for(const U0 of T(this,F))nt(this,h0,G0).call(this,U0.defaultPropertiesToUpdate)}}getId(){return T(this,U).getId()}get currentLayer(){return T(this,g).get(T(this,C))}get currentPageIndex(){return T(this,C)}addLayer(Y0){T(this,g).set(Y0.pageIndex,Y0),T(this,E)?Y0.enable():Y0.disable()}removeLayer(Y0){T(this,g).delete(Y0.pageIndex)}updateMode(Y0){if(ut(this,D,Y0),Y0===I0.AnnotationEditorType.NONE)this.setEditingState(!1),nt(this,f0,S0).call(this);else{this.setEditingState(!0),nt(this,z0,g0).call(this);for(const U0 of T(this,g).values())U0.updateMode(Y0)}}updateToolbar(Y0){Y0!==T(this,D)&&T(this,j).dispatch("switchannotationeditormode",{source:this,mode:Y0})}updateParams(Y0,U0){if(T(this,F)){for(const i1 of T(this,v))i1.updateParams(Y0,U0);for(const i1 of T(this,F))i1.updateDefaultParams(Y0,U0)}}getEditors(Y0){const U0=[];for(const i1 of T(this,V).values())i1.pageIndex===Y0&&U0.push(i1);return U0}getEditor(Y0){return T(this,V).get(Y0)}addEditor(Y0){T(this,V).set(Y0.id,Y0)}removeEditor(Y0){var U0;T(this,V).delete(Y0.id),this.unselect(Y0),(U0=T(this,R))===null||U0===void 0||U0.remove(Y0.id)}setActiveEditor(Y0){T(this,G)!==Y0&&(ut(this,G,Y0),Y0&&nt(this,h0,G0).call(this,Y0.propertiesToUpdate))}toggleSelected(Y0){T(this,v).has(Y0)?(T(this,v).delete(Y0),Y0.unselect(),nt(this,r0,O0).call(this,{hasSelectedEditor:this.hasSelection})):(T(this,v).add(Y0),Y0.select(),nt(this,h0,G0).call(this,Y0.propertiesToUpdate),nt(this,r0,O0).call(this,{hasSelectedEditor:!0}))}setSelected(Y0){for(const U0 of T(this,v))U0!==Y0&&U0.unselect();T(this,v).clear(),T(this,v).add(Y0),Y0.select(),nt(this,h0,G0).call(this,Y0.propertiesToUpdate),nt(this,r0,O0).call(this,{hasSelectedEditor:!0})}isSelected(Y0){return T(this,v).has(Y0)}unselect(Y0){Y0.unselect(),T(this,v).delete(Y0),nt(this,r0,O0).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return T(this,v).size!==0}undo(){T(this,S).undo(),nt(this,r0,O0).call(this,{hasSomethingToUndo:T(this,S).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:nt(this,a0,o0).call(this)})}redo(){T(this,S).redo(),nt(this,r0,O0).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:T(this,S).hasSomethingToRedo(),isEmpty:nt(this,a0,o0).call(this)})}addCommands(Y0){T(this,S).add(Y0),nt(this,r0,O0).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:nt(this,a0,o0).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const Y0=[...T(this,v)];this.addCommands({cmd:()=>{for(const U0 of Y0)U0.remove()},undo:()=>{for(const U0 of Y0)nt(this,J,e0).call(this,U0)},mustExec:!0})}commitOrRemove(){var Y0;(Y0=T(this,G))===null||Y0===void 0||Y0.commitOrRemove()}selectAll(){for(const Y0 of T(this,v))Y0.commit();nt(this,Z0,T0).call(this,T(this,V).values())}unselectAll(){if(T(this,G))T(this,G).commitOrRemove();else if(T(this,v).size!==0){for(const Y0 of T(this,v))Y0.unselect();T(this,v).clear(),nt(this,r0,O0).call(this,{hasSelectedEditor:!1})}}isActive(Y0){return T(this,G)===Y0}getActive(){return T(this,G)}getMode(){return T(this,D)}};let a1=q0;G=new WeakMap,V=new WeakMap,g=new WeakMap,R=new WeakMap,S=new WeakMap,C=new WeakMap,F=new WeakMap,K=new WeakMap,j=new WeakMap,U=new WeakMap,E=new WeakMap,D=new WeakMap,v=new WeakMap,q=new WeakMap,i0=new WeakMap,t0=new WeakMap,P=new WeakMap,c0=new WeakMap,s0=new WeakMap,W0=new WeakMap,M0=new WeakMap,X0=new WeakMap,B=new WeakMap,Q=new WeakSet,$=function(){T(this,B).addEventListener("keydown",T(this,P))},l0=new WeakSet,_=function(){T(this,B).removeEventListener("keydown",T(this,P))},H=new WeakSet,d0=function(){document.addEventListener("copy",T(this,q)),document.addEventListener("cut",T(this,i0)),document.addEventListener("paste",T(this,t0))},p0=new WeakSet,m0=function(){document.removeEventListener("copy",T(this,q)),document.removeEventListener("cut",T(this,i0)),document.removeEventListener("paste",T(this,t0))},r0=new WeakSet,O0=function(Y0){Object.entries(Y0).some(U0=>{let[i1,b1]=U0;return T(this,X0)[i1]!==b1})&&T(this,j).dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(T(this,X0),Y0)})},h0=new WeakSet,G0=function(Y0){T(this,j).dispatch("annotationeditorparamschanged",{source:this,details:Y0})},z0=new WeakSet,g0=function(){if(!T(this,E)){ut(this,E,!0);for(const Y0 of T(this,g).values())Y0.enable()}},f0=new WeakSet,S0=function(){if(this.unselectAll(),T(this,E)){ut(this,E,!1);for(const Y0 of T(this,g).values())Y0.disable()}},J=new WeakSet,e0=function(Y0){const U0=T(this,g).get(Y0.pageIndex);U0?U0.addOrRebuild(Y0):this.addEditor(Y0)},a0=new WeakSet,o0=function(){if(T(this,V).size===0)return!0;if(T(this,V).size===1)for(const Y0 of T(this,V).values())return Y0.isEmpty();return!1},Z0=new WeakSet,T0=function(Y0){T(this,v).clear();for(const U0 of Y0)U0.isEmpty()||(T(this,v).add(U0),U0.select());nt(this,r0,O0).call(this,{hasSelectedEditor:!0})},It(a1,"_keyboardManager",new K0([[["ctrl+a","mac+meta+a"],q0.prototype.selectAll],[["ctrl+z","mac+meta+z"],q0.prototype.undo],[["ctrl+y","ctrl+shift+Z","mac+meta+shift+Z"],q0.prototype.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete"],q0.prototype.delete],[["Escape","mac+Escape"],q0.prototype.unselectAll]])),M.AnnotationEditorUIManager=a1},(s,M,o)=>{var u,z,W,O,N,X,y,G,V,g,R,S,C,F;Object.defineProperty(M,"__esModule",{value:!0}),M.StatTimer=M.RenderingCancelledException=M.PixelsPerInch=M.PageViewport=M.PDFDateString=M.DOMStandardFontDataFactory=M.DOMSVGFactory=M.DOMFilterFactory=M.DOMCanvasFactory=M.DOMCMapReaderFactory=M.AnnotationPrefix=void 0,M.deprecated=function($){console.log("Deprecated API usage: "+$)},M.getColorValues=function($){const l0=document.createElement("span");l0.style.visibility="hidden",document.body.append(l0);for(const _ of $.keys()){l0.style.color=_;const H=window.getComputedStyle(l0).color;$.set(_,Q(H))}l0.remove()},M.getCurrentTransform=function($){const{a:l0,b:_,c:H,d:d0,e:p0,f:m0}=$.getTransform();return[l0,_,H,d0,p0,m0]},M.getCurrentTransformInverse=function($){const{a:l0,b:_,c:H,d:d0,e:p0,f:m0}=$.getTransform().invertSelf();return[l0,_,H,d0,p0,m0]},M.getFilenameFromUrl=function($){return arguments.length>1&&arguments[1]!==void 0&&arguments[1]||([$]=$.split(/[#?]/,1)),$.substring($.lastIndexOf("/")+1)},M.getPdfFilenameFromUrl=function($){let l0=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"document.pdf";if(typeof $!="string")return l0;if(M0($))return(0,j.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),l0;const _=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,H=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec($);let d0=_.exec(H[1])||_.exec(H[2])||_.exec(H[3]);if(d0&&(d0=d0[0],d0.includes("%")))try{d0=_.exec(decodeURIComponent(d0))[0]}catch{}return d0||l0},M.getRGB=Q,M.getXfaPageViewport=function($,l0){let{scale:_=1,rotation:H=0}=l0;const{width:d0,height:p0}=$.attributes.style,m0=[0,0,parseInt(d0),parseInt(p0)];return new s0({viewBox:m0,scale:_,rotation:H})},M.isDataScheme=M0,M.isPdfFile=function($){return typeof $=="string"&&/\.pdf$/i.test($)},M.isValidFetchUrl=X0,M.loadScript=function($){let l0=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return new Promise((_,H)=>{const d0=document.createElement("script");d0.src=$,d0.onload=function(p0){l0&&d0.remove(),_(p0)},d0.onerror=function(){H(new Error(`Cannot load script at: ${d0.src}`))},(document.head||document.documentElement).append(d0)})},M.setLayerDimensions=function($,l0){let _=arguments.length>2&&arguments[2]!==void 0&&arguments[2],H=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];if(l0 instanceof s0){const{pageWidth:d0,pageHeight:p0}=l0.rawDims,{style:m0}=$,r0=`calc(var(--scale-factor) * ${d0}px)`,O0=`calc(var(--scale-factor) * ${p0}px)`;_&&l0.rotation%180!=0?(m0.width=O0,m0.height=r0):(m0.width=r0,m0.height=O0)}H&&$.setAttribute("data-main-rotation",l0.rotation)};var K=o(143),j=o(1);const U="http://www.w3.org/2000/svg";M.AnnotationPrefix="pdfjs_internal_id_";const E=class{};let D=E;It(D,"CSS",96),It(D,"PDF",72),It(D,"PDF_TO_CSS_UNITS",E.CSS/E.PDF),M.PixelsPerInch=D;class v extends K.BaseFilterFactory{constructor(){let{docId:l0,ownerDocument:_=globalThis.document}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),et(this,V),et(this,R),et(this,C),et(this,u,void 0),et(this,z,void 0),et(this,W,void 0),et(this,O,void 0),et(this,N,void 0),et(this,X,void 0),et(this,y,void 0),et(this,G,0),ut(this,W,l0),ut(this,O,_)}addFilter(l0){if(!l0)return"none";let _,H,d0,p0,m0=T(this,V,g).get(l0);if(m0)return m0;if(l0.length===1){const z0=l0[0],g0=new Array(256);for(let f0=0;f0<256;f0++)g0[f0]=z0[f0]/255;p0=_=H=d0=g0.join(",")}else{const[z0,g0,f0]=l0,S0=new Array(256),J=new Array(256),e0=new Array(256);for(let a0=0;a0<256;a0++)S0[a0]=z0[a0]/255,J[a0]=g0[a0]/255,e0[a0]=f0[a0]/255;_=S0.join(","),H=J.join(","),d0=e0.join(","),p0=`${_}${H}${d0}`}if(m0=T(this,V,g).get(p0),m0)return T(this,V,g).set(l0,m0),m0;const r0=`g_${T(this,W)}_transfer_map_${ue(this,G)._++}`,O0=`url(#${r0})`;T(this,V,g).set(l0,O0),T(this,V,g).set(p0,O0);const h0=T(this,O).createElementNS(U,"filter",U);h0.setAttribute("id",r0),h0.setAttribute("color-interpolation-filters","sRGB");const G0=T(this,O).createElementNS(U,"feComponentTransfer");return h0.append(G0),nt(this,C,F).call(this,G0,"feFuncR",_),nt(this,C,F).call(this,G0,"feFuncG",H),nt(this,C,F).call(this,G0,"feFuncB",d0),T(this,R,S).append(h0),O0}addHCMFilter(l0,_){var H;const d0=`${l0}-${_}`;if(T(this,X)===d0)return T(this,y);if(ut(this,X,d0),ut(this,y,"none"),(H=T(this,N))===null||H===void 0||H.remove(),!l0||!_)return T(this,y);T(this,R,S).style.color=l0;const p0=Q(l0=getComputedStyle(T(this,R,S)).getPropertyValue("color"));l0=j.Util.makeHexColor(...p0),T(this,R,S).style.color=_;const m0=Q(_=getComputedStyle(T(this,R,S)).getPropertyValue("color"));if(_=j.Util.makeHexColor(...m0),T(this,R,S).style.color="",l0==="#000000"&&_==="#ffffff"||l0===_)return T(this,y);const r0=new Array(256);for(let S0=0;S0<=255;S0++){const J=S0/255;r0[S0]=J<=.03928?J/12.92:((J+.055)/1.055)**2.4}const O0=r0.join(","),h0=`g_${T(this,W)}_hcm_filter`,G0=ut(this,N,T(this,O).createElementNS(U,"filter",U));G0.setAttribute("id",h0),G0.setAttribute("color-interpolation-filters","sRGB");let z0=T(this,O).createElementNS(U,"feComponentTransfer");G0.append(z0),nt(this,C,F).call(this,z0,"feFuncR",O0),nt(this,C,F).call(this,z0,"feFuncG",O0),nt(this,C,F).call(this,z0,"feFuncB",O0);const g0=T(this,O).createElementNS(U,"feColorMatrix");g0.setAttribute("type","matrix"),g0.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"),G0.append(g0),z0=T(this,O).createElementNS(U,"feComponentTransfer"),G0.append(z0);const f0=(S0,J)=>{const e0=p0[S0]/255,a0=m0[S0]/255,o0=new Array(J+1);for(let Z0=0;Z0<=J;Z0++)o0[Z0]=e0+Z0/J*(a0-e0);return o0.join(",")};return nt(this,C,F).call(this,z0,"feFuncR",f0(0,5)),nt(this,C,F).call(this,z0,"feFuncG",f0(1,5)),nt(this,C,F).call(this,z0,"feFuncB",f0(2,5)),T(this,R,S).append(G0),ut(this,y,`url(#${h0})`),T(this,y)}destroy(){(!(arguments.length>0&&arguments[0]!==void 0&&arguments[0])||!T(this,y))&&(T(this,z)&&(T(this,z).parentNode.parentNode.remove(),ut(this,z,null)),T(this,u)&&(T(this,u).clear(),ut(this,u,null)),ut(this,G,0))}}u=new WeakMap,z=new WeakMap,W=new WeakMap,O=new WeakMap,N=new WeakMap,X=new WeakMap,y=new WeakMap,G=new WeakMap,V=new WeakSet,g=function(){return T(this,u)||ut(this,u,new Map)},R=new WeakSet,S=function(){if(!T(this,z)){const $=T(this,O).createElement("div"),{style:l0}=$;l0.visibility="hidden",l0.contain="strict",l0.width=l0.height=0,l0.position="absolute",l0.top=l0.left=0,l0.zIndex=-1;const _=T(this,O).createElementNS(U,"svg");_.setAttribute("width",0),_.setAttribute("height",0),ut(this,z,T(this,O).createElementNS(U,"defs")),$.append(_),_.append(T(this,z)),T(this,O).body.append($)}return T(this,z)},C=new WeakSet,F=function($,l0,_){const H=T(this,O).createElementNS(U,l0);H.setAttribute("type","discrete"),H.setAttribute("tableValues",_),$.append(H)},M.DOMFilterFactory=v;class q extends K.BaseCanvasFactory{constructor(){let{ownerDocument:l0=globalThis.document}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),this._document=l0}_createCanvas(l0,_){const H=this._document.createElement("canvas");return H.width=l0,H.height=_,H}}M.DOMCanvasFactory=q;async function i0($){let l0=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(X0($,document.baseURI)){const _=await fetch($);if(!_.ok)throw new Error(_.statusText);return l0?new Uint8Array(await _.arrayBuffer()):(0,j.stringToBytes)(await _.text())}return new Promise((_,H)=>{const d0=new XMLHttpRequest;d0.open("GET",$,!0),l0&&(d0.responseType="arraybuffer"),d0.onreadystatechange=()=>{if(d0.readyState===XMLHttpRequest.DONE){if(d0.status===200||d0.status===0){let p0;if(l0&&d0.response?p0=new Uint8Array(d0.response):!l0&&d0.responseText&&(p0=(0,j.stringToBytes)(d0.responseText)),p0){_(p0);return}}H(new Error(d0.statusText))}},d0.send(null)})}class t0 extends K.BaseCMapReaderFactory{_fetchData(l0,_){return i0(l0,this.isCompressed).then(H=>({cMapData:H,compressionType:_}))}}M.DOMCMapReaderFactory=t0;class P extends K.BaseStandardFontDataFactory{_fetchData(l0){return i0(l0,!0)}}M.DOMStandardFontDataFactory=P;class c0 extends K.BaseSVGFactory{_createSVG(l0){return document.createElementNS(U,l0)}}M.DOMSVGFactory=c0;class s0{constructor(l0){let{viewBox:_,scale:H,rotation:d0,offsetX:p0=0,offsetY:m0=0,dontFlip:r0=!1}=l0;this.viewBox=_,this.scale=H,this.rotation=d0,this.offsetX=p0,this.offsetY=m0;const O0=(_[2]+_[0])/2,h0=(_[3]+_[1])/2;let G0,z0,g0,f0,S0,J,e0,a0;switch(d0%=360,d0<0&&(d0+=360),d0){case 180:G0=-1,z0=0,g0=0,f0=1;break;case 90:G0=0,z0=1,g0=1,f0=0;break;case 270:G0=0,z0=-1,g0=-1,f0=0;break;case 0:G0=1,z0=0,g0=0,f0=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}r0&&(g0=-g0,f0=-f0),G0===0?(S0=Math.abs(h0-_[1])*H+p0,J=Math.abs(O0-_[0])*H+m0,e0=(_[3]-_[1])*H,a0=(_[2]-_[0])*H):(S0=Math.abs(O0-_[0])*H+p0,J=Math.abs(h0-_[1])*H+m0,e0=(_[2]-_[0])*H,a0=(_[3]-_[1])*H),this.transform=[G0*H,z0*H,g0*H,f0*H,S0-G0*H*O0-g0*H*h0,J-z0*H*O0-f0*H*h0],this.width=e0,this.height=a0}get rawDims(){const{viewBox:l0}=this;return(0,j.shadow)(this,"rawDims",{pageWidth:l0[2]-l0[0],pageHeight:l0[3]-l0[1],pageX:l0[0],pageY:l0[1]})}clone(){let{scale:l0=this.scale,rotation:_=this.rotation,offsetX:H=this.offsetX,offsetY:d0=this.offsetY,dontFlip:p0=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new s0({viewBox:this.viewBox.slice(),scale:l0,rotation:_,offsetX:H,offsetY:d0,dontFlip:p0})}convertToViewportPoint(l0,_){return j.Util.applyTransform([l0,_],this.transform)}convertToViewportRectangle(l0){const _=j.Util.applyTransform([l0[0],l0[1]],this.transform),H=j.Util.applyTransform([l0[2],l0[3]],this.transform);return[_[0],_[1],H[0],H[1]]}convertToPdfPoint(l0,_){return j.Util.applyInverseTransform([l0,_],this.transform)}}M.PageViewport=s0;class W0 extends j.BaseException{constructor(l0,_){let H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;super(l0,"RenderingCancelledException"),this.type=_,this.extraDelay=H}}M.RenderingCancelledException=W0;function M0($){const l0=$.length;let _=0;for(;_<l0&&$[_].trim()==="";)_++;return $.substring(_,_+5).toLowerCase()==="data:"}M.StatTimer=class{constructor(){It(this,"started",Object.create(null)),It(this,"times",[])}time($){$ in this.started&&(0,j.warn)(`Timer is already running for ${$}`),this.started[$]=Date.now()}timeEnd($){$ in this.started||(0,j.warn)(`Timer has not been started for ${$}`),this.times.push({name:$,start:this.started[$],end:Date.now()}),delete this.started[$]}toString(){const $=[];let l0=0;for(const{name:_}of this.times)l0=Math.max(_.length,l0);for(const{name:_,start:H,end:d0}of this.times)$.push(`${_.padEnd(l0)} ${d0-H}ms
65
65
  `);return $.join("")}};function X0($,l0){try{const{protocol:_}=l0?new URL($,l0):new URL($);return _==="http:"||_==="https:"}catch{return!1}}let B;M.PDFDateString=class{static toDateObject($){if(!$||typeof $!="string")return null;B||(B=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const l0=B.exec($);if(!l0)return null;const _=parseInt(l0[1],10);let H=parseInt(l0[2],10);H=H>=1&&H<=12?H-1:0;let d0=parseInt(l0[3],10);d0=d0>=1&&d0<=31?d0:1;let p0=parseInt(l0[4],10);p0=p0>=0&&p0<=23?p0:0;let m0=parseInt(l0[5],10);m0=m0>=0&&m0<=59?m0:0;let r0=parseInt(l0[6],10);r0=r0>=0&&r0<=59?r0:0;const O0=l0[7]||"Z";let h0=parseInt(l0[8],10);h0=h0>=0&&h0<=23?h0:0;let G0=parseInt(l0[9],10)||0;return G0=G0>=0&&G0<=59?G0:0,O0==="-"?(p0+=h0,m0+=G0):O0==="+"&&(p0-=h0,m0-=G0),new Date(Date.UTC(_,H,d0,p0,m0,r0))}};function Q($){if($.startsWith("#")){const l0=parseInt($.slice(1),16);return[(16711680&l0)>>16,(65280&l0)>>8,255&l0]}return $.startsWith("rgb(")?$.slice(4,-1).split(",").map(l0=>parseInt(l0)):$.startsWith("rgba(")?$.slice(5,-1).split(",").map(l0=>parseInt(l0)).slice(0,3):((0,j.warn)(`Not a valid color format: "${$}"`),[0,0,0])}},(s,M,o)=>{Object.defineProperty(M,"__esModule",{value:!0}),M.BaseStandardFontDataFactory=M.BaseSVGFactory=M.BaseFilterFactory=M.BaseCanvasFactory=M.BaseCMapReaderFactory=void 0;var u=o(1);class z{constructor(){this.constructor===z&&(0,u.unreachable)("Cannot initialize BaseFilterFactory.")}addFilter(G){return"none"}addHCMFilter(G,V){return"none"}destroy(){}}M.BaseFilterFactory=z;class W{constructor(){this.constructor===W&&(0,u.unreachable)("Cannot initialize BaseCanvasFactory.")}create(G,V){if(G<=0||V<=0)throw new Error("Invalid canvas size");const g=this._createCanvas(G,V);return{canvas:g,context:g.getContext("2d")}}reset(G,V,g){if(!G.canvas)throw new Error("Canvas is not specified");if(V<=0||g<=0)throw new Error("Invalid canvas size");G.canvas.width=V,G.canvas.height=g}destroy(G){if(!G.canvas)throw new Error("Canvas is not specified");G.canvas.width=0,G.canvas.height=0,G.canvas=null,G.context=null}_createCanvas(G,V){(0,u.unreachable)("Abstract method `_createCanvas` called.")}}M.BaseCanvasFactory=W;class O{constructor(G){let{baseUrl:V=null,isCompressed:g=!0}=G;this.constructor===O&&(0,u.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=V,this.isCompressed=g}async fetch(G){let{name:V}=G;if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!V)throw new Error("CMap name must be specified.");const g=this.baseUrl+V+(this.isCompressed?".bcmap":""),R=this.isCompressed?u.CMapCompressionType.BINARY:u.CMapCompressionType.NONE;return this._fetchData(g,R).catch(S=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${g}`)})}_fetchData(G,V){(0,u.unreachable)("Abstract method `_fetchData` called.")}}M.BaseCMapReaderFactory=O;class N{constructor(G){let{baseUrl:V=null}=G;this.constructor===N&&(0,u.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=V}async fetch(G){let{filename:V}=G;if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!V)throw new Error("Font filename must be specified.");const g=`${this.baseUrl}${V}`;return this._fetchData(g).catch(R=>{throw new Error(`Unable to load font data at: ${g}`)})}_fetchData(G){(0,u.unreachable)("Abstract method `_fetchData` called.")}}M.BaseStandardFontDataFactory=N;class X{constructor(){this.constructor===X&&(0,u.unreachable)("Cannot initialize BaseSVGFactory.")}create(G,V){let g=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(G<=0||V<=0)throw new Error("Invalid SVG dimensions");const R=this._createSVG("svg:svg");return R.setAttribute("version","1.1"),g||(R.setAttribute("width",`${G}px`),R.setAttribute("height",`${V}px`)),R.setAttribute("preserveAspectRatio","none"),R.setAttribute("viewBox",`0 0 ${G} ${V}`),R}createElement(G){if(typeof G!="string")throw new Error("Invalid SVG element type");return this._createSVG(G)}_createSVG(G){(0,u.unreachable)("Abstract method `_createSVG` called.")}}M.BaseSVGFactory=X},(s,M,o)=>{Object.defineProperty(M,"__esModule",{value:!0}),M.MurmurHash3_64=void 0;var u=o(1);const z=3285377520,W=4294901760,O=65535;M.MurmurHash3_64=class{constructor(N){this.h1=N?4294967295&N:z,this.h2=N?4294967295&N:z}update(N){let X,y;if(typeof N=="string"){X=new Uint8Array(2*N.length),y=0;for(let D=0,v=N.length;D<v;D++){const q=N.charCodeAt(D);q<=255?X[y++]=q:(X[y++]=q>>>8,X[y++]=255&q)}}else{if(!(0,u.isArrayBuffer)(N))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");X=N.slice(),y=X.byteLength}const G=y>>2,V=y-4*G,g=new Uint32Array(X.buffer,0,G);let R=0,S=0,C=this.h1,F=this.h2;const K=3432918353,j=461845907,U=11601,E=13715;for(let D=0;D<G;D++)1&D?(R=g[D],R=R*K&W|R*U&O,R=R<<15|R>>>17,R=R*j&W|R*E&O,C^=R,C=C<<13|C>>>19,C=5*C+3864292196):(S=g[D],S=S*K&W|S*U&O,S=S<<15|S>>>17,S=S*j&W|S*E&O,F^=S,F=F<<13|F>>>19,F=5*F+3864292196);switch(R=0,V){case 3:R^=X[4*G+2]<<16;case 2:R^=X[4*G+1]<<8;case 1:R^=X[4*G],R=R*K&W|R*U&O,R=R<<15|R>>>17,R=R*j&W|R*E&O,1&G?C^=R:F^=R}this.h1=C,this.h2=F}hexdigest(){let N=this.h1,X=this.h2;return N^=X>>>1,N=3981806797*N&W|36045*N&O,X=4283543511*X&W|(2950163797*(X<<16|N>>>16)&W)>>>16,N^=X>>>1,N=444984403*N&W|60499*N&O,X=3301882366*X&W|(3120437893*(X<<16|N>>>16)&W)>>>16,N^=X>>>1,(N>>>0).toString(16).padStart(8,"0")+(X>>>0).toString(16).padStart(8,"0")}}},(s,M,o)=>{var u,z;Object.defineProperty(M,"__esModule",{value:!0}),M.FontLoader=M.FontFaceObject=void 0;var W=o(1),O=o(3);M.FontLoader=(z=class{constructor(N){et(this,u,new Set);let{ownerDocument:X=globalThis.document,styleElement:y=null}=N;this._document=X,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(N){this.nativeFontFaces.add(N),this._document.fonts.add(N)}removeNativeFontFace(N){this.nativeFontFaces.delete(N),this._document.fonts.delete(N)}insertRule(N){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const X=this.styleElement.sheet;X.insertRule(N,X.cssRules.length)}clear(){for(const N of this.nativeFontFaces)this._document.fonts.delete(N);this.nativeFontFaces.clear(),T(this,u).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont(N){if(N&&!T(this,u).has(N.loadedName))if((0,W.assert)(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:X,src:y,style:G}=N,V=new FontFace(X,y,G);this.addNativeFontFace(V);try{await V.load(),T(this,u).add(X)}catch{(0,W.warn)(`Cannot load system font: ${N.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(V)}}else(0,W.unreachable)("Not implemented: loadSystemFont without the Font Loading API.")}async bind(N){if(N.attached||N.missingFile&&!N.systemFontInfo)return;if(N.attached=!0,N.systemFontInfo){await this.loadSystemFont(N.systemFontInfo);return}if(this.isFontLoadingAPISupported){const y=N.createNativeFontFace();if(y){this.addNativeFontFace(y);try{await y.loaded}catch(G){throw(0,W.warn)(`Failed to load font '${y.family}': '${G}'.`),N.disableFontFace=!0,G}}return}const X=N.createFontFaceRule();if(X){if(this.insertRule(X),this.isSyncFontLoadingSupported)return;await new Promise(y=>{const G=this._queueLoadingCallback(y);this._prepareFontLoadEvent(N,G)})}}get isFontLoadingAPISupported(){var N;const X=!((N=this._document)===null||N===void 0||!N.fonts);return(0,W.shadow)(this,"isFontLoadingAPISupported",X)}get isSyncFontLoadingSupported(){let N=!1;return(O.isNodeJS||typeof navigator<"u"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(N=!0),(0,W.shadow)(this,"isSyncFontLoadingSupported",N)}_queueLoadingCallback(N){const{loadingRequests:X}=this,y={done:!1,complete:function(){for((0,W.assert)(!y.done,"completeRequest() cannot be called twice."),y.done=!0;X.length>0&&X[0].done;){const G=X.shift();setTimeout(G.callback,0)}},callback:N};return X.push(y),y}get _loadTestFont(){const N=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return(0,W.shadow)(this,"_loadTestFont",N)}_prepareFontLoadEvent(N,X){function y(v,q){return v.charCodeAt(q)<<24|v.charCodeAt(q+1)<<16|v.charCodeAt(q+2)<<8|255&v.charCodeAt(q+3)}function G(v,q,i0,t0){return v.substring(0,q)+t0+v.substring(q+i0)}let V,g;const R=this._document.createElement("canvas");R.width=1,R.height=1;const S=R.getContext("2d");let C=0;const F=`lt${Date.now()}${this.loadTestFontId++}`;let K=this._loadTestFont;K=G(K,976,F.length,F);const j=1482184792;let U=y(K,16);for(V=0,g=F.length-3;V<g;V+=4)U=U-j+y(F,V)|0;V<F.length&&(U=U-j+y(F+"XXX",V)|0),K=G(K,16,4,(0,W.string32)(U));const E=`@font-face {font-family:"${F}";src:${`url(data:font/opentype;base64,${btoa(K)});`}}`;this.insertRule(E);const D=this._document.createElement("div");D.style.visibility="hidden",D.style.width=D.style.height="10px",D.style.position="absolute",D.style.top=D.style.left="0px";for(const v of[N.loadedName,F]){const q=this._document.createElement("span");q.textContent="Hi",q.style.fontFamily=v,D.append(q)}this._document.body.append(D),function v(q,i0){if(++C>30){(0,W.warn)("Load test font never loaded."),i0();return}S.font="30px "+q,S.fillText(".",0,20),S.getImageData(0,0,1,1).data[3]>0?i0():setTimeout(v.bind(null,q,i0))}(F,()=>{D.remove(),X.complete()})}},u=new WeakMap,z),M.FontFaceObject=class{constructor(N,X){let{isEvalSupported:y=!0,disableFontFace:G=!1,ignoreErrors:V=!1,inspectFont:g=null}=X;this.compiledGlyphs=Object.create(null);for(const R in N)this[R]=N[R];this.isEvalSupported=y!==!1,this.disableFontFace=G===!0,this.ignoreErrors=V===!0,this._inspectFont=g}createNativeFontFace(){var N;if(!this.data||this.disableFontFace)return null;let X;if(this.cssFontInfo){const y={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(y.style=`oblique ${this.cssFontInfo.italicAngle}deg`),X=new FontFace(this.cssFontInfo.fontFamily,this.data,y)}else X=new FontFace(this.loadedName,this.data,{});return(N=this._inspectFont)===null||N===void 0||N.call(this,this),X}createFontFaceRule(){var N;if(!this.data||this.disableFontFace)return null;const X=(0,W.bytesToString)(this.data),y=`url(data:${this.mimetype};base64,${btoa(X)});`;let G;if(this.cssFontInfo){let V=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(V+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),G=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${V}src:${y}}`}else G=`@font-face {font-family:"${this.loadedName}";src:${y}}`;return(N=this._inspectFont)===null||N===void 0||N.call(this,this,y),G}getPathGenerator(N,X){if(this.compiledGlyphs[X]!==void 0)return this.compiledGlyphs[X];let y;try{y=N.get(this.loadedName+"_path_"+X)}catch(G){if(!this.ignoreErrors)throw G;return(0,W.warn)(`getPathGenerator - ignoring character: "${G}".`),this.compiledGlyphs[X]=function(V,g){}}if(this.isEvalSupported&&W.FeatureTest.isEvalSupported){const G=[];for(const V of y){const g=V.args!==void 0?V.args.join(","):"";G.push("c.",V.cmd,"(",g,`);
66
66
  `)}return this.compiledGlyphs[X]=new Function("c","size",G.join(""))}return this.compiledGlyphs[X]=function(G,V){for(const g of y)g.cmd==="scale"&&(g.args=[V,-V]),G[g.cmd].apply(G,g.args)}}}},(s,M,o)=>{var u,z,W,O;Object.defineProperty(M,"__esModule",{value:!0}),M.CanvasGraphics=void 0;var N=o(1),X=o(142),y=o(147),G=o(148),V=o(3);const g=4096,R=16;class S{constructor(Q){this.canvasFactory=Q,this.cache=Object.create(null)}getCanvas(Q,$,l0){let _;return this.cache[Q]!==void 0?(_=this.cache[Q],this.canvasFactory.reset(_,$,l0)):(_=this.canvasFactory.create($,l0),this.cache[Q]=_),_}delete(Q){delete this.cache[Q]}clear(){for(const Q in this.cache){const $=this.cache[Q];this.canvasFactory.destroy($),delete this.cache[Q]}}}function C(B,Q,$,l0,_,H,d0,p0,m0,r0){const[O0,h0,G0,z0,g0,f0]=(0,X.getCurrentTransform)(B);if(h0===0&&G0===0){const S0=d0*O0+g0,J=Math.round(S0),e0=p0*z0+f0,a0=Math.round(e0),o0=(d0+m0)*O0+g0,Z0=Math.abs(Math.round(o0)-J)||1,T0=(p0+r0)*z0+f0,I0=Math.abs(Math.round(T0)-a0)||1;return B.setTransform(Math.sign(O0),0,0,Math.sign(z0),J,a0),B.drawImage(Q,$,l0,_,H,0,0,Z0,I0),B.setTransform(O0,h0,G0,z0,g0,f0),[Z0,I0]}if(O0===0&&z0===0){const S0=p0*G0+g0,J=Math.round(S0),e0=d0*h0+f0,a0=Math.round(e0),o0=(p0+r0)*G0+g0,Z0=Math.abs(Math.round(o0)-J)||1,T0=(d0+m0)*h0+f0,I0=Math.abs(Math.round(T0)-a0)||1;return B.setTransform(0,Math.sign(h0),Math.sign(G0),0,J,a0),B.drawImage(Q,$,l0,_,H,0,0,I0,Z0),B.setTransform(O0,h0,G0,z0,g0,f0),[I0,Z0]}return B.drawImage(Q,$,l0,_,H,d0,p0,m0,r0),[Math.hypot(O0,h0)*m0,Math.hypot(G0,z0)*r0]}class F{constructor(Q,$){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=N.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=N.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=N.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,Q,$])}clone(){const Q=Object.create(this);return Q.clipBox=this.clipBox.slice(),Q}setCurrentPoint(Q,$){this.x=Q,this.y=$}updatePathMinMax(Q,$,l0){[$,l0]=N.Util.applyTransform([$,l0],Q),this.minX=Math.min(this.minX,$),this.minY=Math.min(this.minY,l0),this.maxX=Math.max(this.maxX,$),this.maxY=Math.max(this.maxY,l0)}updateRectMinMax(Q,$){const l0=N.Util.applyTransform($,Q),_=N.Util.applyTransform($.slice(2),Q);this.minX=Math.min(this.minX,l0[0],_[0]),this.minY=Math.min(this.minY,l0[1],_[1]),this.maxX=Math.max(this.maxX,l0[0],_[0]),this.maxY=Math.max(this.maxY,l0[1],_[1])}updateScalingPathMinMax(Q,$){N.Util.scaleMinMax(Q,$),this.minX=Math.min(this.minX,$[0]),this.maxX=Math.max(this.maxX,$[1]),this.minY=Math.min(this.minY,$[2]),this.maxY=Math.max(this.maxY,$[3])}updateCurvePathMinMax(Q,$,l0,_,H,d0,p0,m0,r0,O0){const h0=N.Util.bezierBoundingBox($,l0,_,H,d0,p0,m0,r0);O0?(O0[0]=Math.min(O0[0],h0[0],h0[2]),O0[1]=Math.max(O0[1],h0[0],h0[2]),O0[2]=Math.min(O0[2],h0[1],h0[3]),O0[3]=Math.max(O0[3],h0[1],h0[3])):this.updateRectMinMax(Q,h0)}getPathBoundingBox(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y.PathType.FILL,$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const l0=[this.minX,this.minY,this.maxX,this.maxY];if(Q===y.PathType.STROKE){$||(0,N.unreachable)("Stroke bounding box must include transform.");const _=N.Util.singularValueDecompose2dScale($),H=_[0]*this.lineWidth/2,d0=_[1]*this.lineWidth/2;l0[0]-=H,l0[1]-=d0,l0[2]+=H,l0[3]+=d0}return l0}updateClipFromPath(){const Q=N.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(Q||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(Q){this.clipBox=Q,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y.PathType.FILL,$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return N.Util.intersect(this.clipBox,this.getPathBoundingBox(Q,$))}}function K(B,Q){if(typeof ImageData<"u"&&Q instanceof ImageData){B.putImageData(Q,0,0);return}const $=Q.height,l0=Q.width,_=$%R,H=($-_)/R,d0=_===0?H:H+1,p0=B.createImageData(l0,R);let m0,r0=0;const O0=Q.data,h0=p0.data;let G0,z0,g0,f0;if(Q.kind===N.ImageKind.GRAYSCALE_1BPP){const S0=O0.byteLength,J=new Uint32Array(h0.buffer,0,h0.byteLength>>2),e0=J.length,a0=l0+7>>3,o0=4294967295,Z0=N.FeatureTest.isLittleEndian?4278190080:255;for(G0=0;G0<d0;G0++){for(g0=G0<H?R:_,m0=0,z0=0;z0<g0;z0++){const T0=S0-r0;let I0=0;const A0=T0>a0?l0:8*T0-7,F0=-8&A0;let J0=0,K0=0;for(;I0<F0;I0+=8)K0=O0[r0++],J[m0++]=128&K0?o0:Z0,J[m0++]=64&K0?o0:Z0,J[m0++]=32&K0?o0:Z0,J[m0++]=16&K0?o0:Z0,J[m0++]=8&K0?o0:Z0,J[m0++]=4&K0?o0:Z0,J[m0++]=2&K0?o0:Z0,J[m0++]=1&K0?o0:Z0;for(;I0<A0;I0++)J0===0&&(K0=O0[r0++],J0=128),J[m0++]=K0&J0?o0:Z0,J0>>=1}for(;m0<e0;)J[m0++]=0;B.putImageData(p0,0,G0*R)}}else if(Q.kind===N.ImageKind.RGBA_32BPP){for(z0=0,f0=l0*R*4,G0=0;G0<H;G0++)h0.set(O0.subarray(r0,r0+f0)),r0+=f0,B.putImageData(p0,0,z0),z0+=R;G0<d0&&(f0=l0*_*4,h0.set(O0.subarray(r0,r0+f0)),B.putImageData(p0,0,z0))}else{if(Q.kind!==N.ImageKind.RGB_24BPP)throw new Error(`bad image kind: ${Q.kind}`);for(g0=R,f0=l0*g0,G0=0;G0<d0;G0++){for(G0>=H&&(g0=_,f0=l0*g0),m0=0,z0=f0;z0--;)h0[m0++]=O0[r0++],h0[m0++]=O0[r0++],h0[m0++]=O0[r0++],h0[m0++]=255;B.putImageData(p0,0,G0*R)}}}function j(B,Q){if(Q.bitmap){B.drawImage(Q.bitmap,0,0);return}const $=Q.height,l0=Q.width,_=$%R,H=($-_)/R,d0=_===0?H:H+1,p0=B.createImageData(l0,R);let m0=0;const r0=Q.data,O0=p0.data;for(let h0=0;h0<d0;h0++){const G0=h0<H?R:_;({srcPos:m0}=(0,G.convertBlackAndWhiteToRGBA)({src:r0,srcPos:m0,dest:O0,width:l0,height:G0,nonBlackColor:0})),B.putImageData(p0,0,h0*R)}}function U(B,Q){const $=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const l0 of $)B[l0]!==void 0&&(Q[l0]=B[l0]);B.setLineDash!==void 0&&(Q.setLineDash(B.getLineDash()),Q.lineDashOffset=B.lineDashOffset)}function E(B){B.strokeStyle=B.fillStyle="#000000",B.fillRule="nonzero",B.globalAlpha=1,B.lineWidth=1,B.lineCap="butt",B.lineJoin="miter",B.miterLimit=10,B.globalCompositeOperation="source-over",B.font="10px sans-serif",B.setLineDash!==void 0&&(B.setLineDash([]),B.lineDashOffset=0),V.isNodeJS||(B.filter="none")}function D(B,Q,$,l0){const _=B.length;for(let H=3;H<_;H+=4){const d0=B[H];if(d0===0)B[H-3]=Q,B[H-2]=$,B[H-1]=l0;else if(d0<255){const p0=255-d0;B[H-3]=B[H-3]*d0+Q*p0>>8,B[H-2]=B[H-2]*d0+$*p0>>8,B[H-1]=B[H-1]*d0+l0*p0>>8}}}function v(B,Q,$){const l0=B.length;for(let _=3;_<l0;_+=4){const H=$?$[B[_]]:B[_];Q[_]=Q[_]*H*.00392156862745098|0}}function q(B,Q,$){const l0=B.length;for(let _=3;_<l0;_+=4){const H=77*B[_-3]+152*B[_-2]+28*B[_-1];Q[_]=$?Q[_]*$[H>>8]>>8:Q[_]*H>>16}}function i0(B,Q,$,l0){const _=l0[0],H=l0[1],d0=l0[2]-_,p0=l0[3]-H;d0!==0&&p0!==0&&(function(m0,r0,O0,h0,G0,z0,g0,f0,S0,J,e0){const a0=!!z0,o0=a0?z0[0]:0,Z0=a0?z0[1]:0,T0=a0?z0[2]:0;let I0;I0=G0==="Luminosity"?q:v;const A0=Math.min(h0,Math.ceil(1048576/O0));for(let F0=0;F0<h0;F0+=A0){const J0=Math.min(A0,h0-F0),K0=m0.getImageData(f0-J,F0+(S0-e0),O0,J0),E0=r0.getImageData(f0,F0+S0,O0,J0);a0&&D(K0.data,o0,Z0,T0),I0(K0.data,E0.data,g0),r0.putImageData(E0,f0,F0+S0)}}(Q.context,$,d0,p0,Q.subtype,Q.backdrop,Q.transferMap,_,H,Q.offsetX,Q.offsetY),B.save(),B.globalAlpha=1,B.globalCompositeOperation="source-over",B.setTransform(1,0,0,1,0,0),B.drawImage($.canvas,0,0),B.restore())}function t0(B,Q){const $=N.Util.singularValueDecompose2dScale(B);$[0]=Math.fround($[0]),$[1]=Math.fround($[1]);const l0=Math.fround((globalThis.devicePixelRatio||1)*X.PixelsPerInch.PDF_TO_CSS_UNITS);return Q!==void 0?Q:$[0]<=l0||$[1]<=l0}const P=["butt","round","square"],c0=["miter","round","bevel"],s0={},W0={},M0=class{constructor(B,Q,$,l0,_,H,d0,p0){et(this,u),et(this,W);let{optionalContentConfig:m0,markedContentStack:r0=null}=H;this.ctx=B,this.current=new F(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=Q,this.objs=$,this.canvasFactory=l0,this.filterFactory=_,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=r0||[],this.optionalContentConfig=m0,this.cachedCanvases=new S(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=d0,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=p0,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(B){let Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return typeof B=="string"?B.startsWith("g_")?this.commonObjs.get(B):this.objs.get(B):Q}beginDrawing(B){let{transform:Q,viewport:$,transparency:l0=!1,background:_=null}=B;const H=this.ctx.canvas.width,d0=this.ctx.canvas.height,p0=this.ctx.fillStyle;if(this.ctx.fillStyle=_||"#ffffff",this.ctx.fillRect(0,0,H,d0),this.ctx.fillStyle=p0,l0){const m0=this.cachedCanvases.getCanvas("transparent",H,d0);this.compositeCtx=this.ctx,this.transparentCanvas=m0.canvas,this.ctx=m0.context,this.ctx.save(),this.ctx.transform(...(0,X.getCurrentTransform)(this.compositeCtx))}this.ctx.save(),E(this.ctx),Q&&(this.ctx.transform(...Q),this.outputScaleX=Q[0],this.outputScaleY=Q[0]),this.ctx.transform(...$.transform),this.viewportScale=$.scale,this.baseTransform=(0,X.getCurrentTransform)(this.ctx)}executeOperatorList(B,Q,$,l0){const _=B.argsArray,H=B.fnArray;let d0=Q||0;const p0=_.length;if(p0===d0)return d0;const m0=p0-d0>10&&typeof $=="function",r0=m0?Date.now()+15:0;let O0=0;const h0=this.commonObjs,G0=this.objs;let z0;for(;;){if(l0!==void 0&&d0===l0.nextBreakPoint)return l0.breakIt(d0,$),d0;if(z0=H[d0],z0!==N.OPS.dependency)this[z0].apply(this,_[d0]);else for(const g0 of _[d0]){const f0=g0.startsWith("g_")?h0:G0;if(!f0.has(g0))return f0.get(g0,$),d0}if(d0++,d0===p0)return d0;if(m0&&++O0>10){if(Date.now()>r0)return $(),d0;O0=0}}}endDrawing(){nt(this,u,z).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const B of this._cachedBitmapsMap.values()){for(const Q of B.values())typeof HTMLCanvasElement<"u"&&Q instanceof HTMLCanvasElement&&(Q.width=Q.height=0);B.clear()}this._cachedBitmapsMap.clear(),nt(this,W,O).call(this)}_scaleImage(B,Q){const $=B.width,l0=B.height;let _,H,d0=Math.max(Math.hypot(Q[0],Q[1]),1),p0=Math.max(Math.hypot(Q[2],Q[3]),1),m0=$,r0=l0,O0="prescale1";for(;d0>2&&m0>1||p0>2&&r0>1;){let h0=m0,G0=r0;d0>2&&m0>1&&(h0=m0>=16384?Math.floor(m0/2)-1||1:Math.ceil(m0/2),d0/=m0/h0),p0>2&&r0>1&&(G0=r0>=16384?Math.floor(r0/2)-1||1:Math.ceil(r0)/2,p0/=r0/G0),_=this.cachedCanvases.getCanvas(O0,h0,G0),H=_.context,H.clearRect(0,0,h0,G0),H.drawImage(B,0,0,m0,r0,0,0,h0,G0),B=_.canvas,m0=h0,r0=G0,O0=O0==="prescale1"?"prescale2":"prescale1"}return{img:B,paintWidth:m0,paintHeight:r0}}_createMaskCanvas(B){const Q=this.ctx,{width:$,height:l0}=B,_=this.current.fillColor,H=this.current.patternFill,d0=(0,X.getCurrentTransform)(Q);let p0,m0,r0,O0;if((B.bitmap||B.data)&&B.count>1){const T0=B.bitmap||B.data.buffer;m0=JSON.stringify(H?d0:[d0.slice(0,4),_]),p0=this._cachedBitmapsMap.get(T0),p0||(p0=new Map,this._cachedBitmapsMap.set(T0,p0));const I0=p0.get(m0);if(I0&&!H)return{canvas:I0,offsetX:Math.round(Math.min(d0[0],d0[2])+d0[4]),offsetY:Math.round(Math.min(d0[1],d0[3])+d0[5])};r0=I0}r0||(O0=this.cachedCanvases.getCanvas("maskCanvas",$,l0),j(O0.context,B));let h0=N.Util.transform(d0,[1/$,0,0,-1/l0,0,0]);h0=N.Util.transform(h0,[1,0,0,1,0,-l0]);const G0=N.Util.applyTransform([0,0],h0),z0=N.Util.applyTransform([$,l0],h0),g0=N.Util.normalizeRect([G0[0],G0[1],z0[0],z0[1]]),f0=Math.round(g0[2]-g0[0])||1,S0=Math.round(g0[3]-g0[1])||1,J=this.cachedCanvases.getCanvas("fillCanvas",f0,S0),e0=J.context,a0=Math.min(G0[0],z0[0]),o0=Math.min(G0[1],z0[1]);e0.translate(-a0,-o0),e0.transform(...h0),r0||(r0=this._scaleImage(O0.canvas,(0,X.getCurrentTransformInverse)(e0)),r0=r0.img,p0&&H&&p0.set(m0,r0)),e0.imageSmoothingEnabled=t0((0,X.getCurrentTransform)(e0),B.interpolate),C(e0,r0,0,0,r0.width,r0.height,0,0,$,l0),e0.globalCompositeOperation="source-in";const Z0=N.Util.transform((0,X.getCurrentTransformInverse)(e0),[1,0,0,1,-a0,-o0]);return e0.fillStyle=H?_.getPattern(Q,this,Z0,y.PathType.FILL):_,e0.fillRect(0,0,$,l0),p0&&!H&&(this.cachedCanvases.delete("fillCanvas"),p0.set(m0,J.canvas)),{canvas:J.canvas,offsetX:Math.round(a0),offsetY:Math.round(o0)}}setLineWidth(B){B!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=B,this.ctx.lineWidth=B}setLineCap(B){this.ctx.lineCap=P[B]}setLineJoin(B){this.ctx.lineJoin=c0[B]}setMiterLimit(B){this.ctx.miterLimit=B}setDash(B,Q){const $=this.ctx;$.setLineDash!==void 0&&($.setLineDash(B),$.lineDashOffset=Q)}setRenderingIntent(B){}setFlatness(B){}setGState(B){for(const[Q,$]of B)switch(Q){case"LW":this.setLineWidth($);break;case"LC":this.setLineCap($);break;case"LJ":this.setLineJoin($);break;case"ML":this.setMiterLimit($);break;case"D":this.setDash($[0],$[1]);break;case"RI":this.setRenderingIntent($);break;case"FL":this.setFlatness($);break;case"Font":this.setFont($[0],$[1]);break;case"CA":this.current.strokeAlpha=$;break;case"ca":this.current.fillAlpha=$,this.ctx.globalAlpha=$;break;case"BM":this.ctx.globalCompositeOperation=$;break;case"SMask":this.current.activeSMask=$?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter($)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const B=this.inSMaskMode;this.current.activeSMask&&!B?this.beginSMaskMode():!this.current.activeSMask&&B&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const B=this.ctx.canvas.width,Q=this.ctx.canvas.height,$="smaskGroupAt"+this.groupLevel,l0=this.cachedCanvases.getCanvas($,B,Q);this.suspendedCtx=this.ctx,this.ctx=l0.context;const _=this.ctx;_.setTransform(...(0,X.getCurrentTransform)(this.suspendedCtx)),U(this.suspendedCtx,_),function(H,d0){if(H._removeMirroring)throw new Error("Context is already forwarding operations.");H.__originalSave=H.save,H.__originalRestore=H.restore,H.__originalRotate=H.rotate,H.__originalScale=H.scale,H.__originalTranslate=H.translate,H.__originalTransform=H.transform,H.__originalSetTransform=H.setTransform,H.__originalResetTransform=H.resetTransform,H.__originalClip=H.clip,H.__originalMoveTo=H.moveTo,H.__originalLineTo=H.lineTo,H.__originalBezierCurveTo=H.bezierCurveTo,H.__originalRect=H.rect,H.__originalClosePath=H.closePath,H.__originalBeginPath=H.beginPath,H._removeMirroring=()=>{H.save=H.__originalSave,H.restore=H.__originalRestore,H.rotate=H.__originalRotate,H.scale=H.__originalScale,H.translate=H.__originalTranslate,H.transform=H.__originalTransform,H.setTransform=H.__originalSetTransform,H.resetTransform=H.__originalResetTransform,H.clip=H.__originalClip,H.moveTo=H.__originalMoveTo,H.lineTo=H.__originalLineTo,H.bezierCurveTo=H.__originalBezierCurveTo,H.rect=H.__originalRect,H.closePath=H.__originalClosePath,H.beginPath=H.__originalBeginPath,delete H._removeMirroring},H.save=function(){d0.save(),this.__originalSave()},H.restore=function(){d0.restore(),this.__originalRestore()},H.translate=function(p0,m0){d0.translate(p0,m0),this.__originalTranslate(p0,m0)},H.scale=function(p0,m0){d0.scale(p0,m0),this.__originalScale(p0,m0)},H.transform=function(p0,m0,r0,O0,h0,G0){d0.transform(p0,m0,r0,O0,h0,G0),this.__originalTransform(p0,m0,r0,O0,h0,G0)},H.setTransform=function(p0,m0,r0,O0,h0,G0){d0.setTransform(p0,m0,r0,O0,h0,G0),this.__originalSetTransform(p0,m0,r0,O0,h0,G0)},H.resetTransform=function(){d0.resetTransform(),this.__originalResetTransform()},H.rotate=function(p0){d0.rotate(p0),this.__originalRotate(p0)},H.clip=function(p0){d0.clip(p0),this.__originalClip(p0)},H.moveTo=function(p0,m0){d0.moveTo(p0,m0),this.__originalMoveTo(p0,m0)},H.lineTo=function(p0,m0){d0.lineTo(p0,m0),this.__originalLineTo(p0,m0)},H.bezierCurveTo=function(p0,m0,r0,O0,h0,G0){d0.bezierCurveTo(p0,m0,r0,O0,h0,G0),this.__originalBezierCurveTo(p0,m0,r0,O0,h0,G0)},H.rect=function(p0,m0,r0,O0){d0.rect(p0,m0,r0,O0),this.__originalRect(p0,m0,r0,O0)},H.closePath=function(){d0.closePath(),this.__originalClosePath()},H.beginPath=function(){d0.beginPath(),this.__originalBeginPath()}}(_,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(),U(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(B){if(!this.current.activeSMask)return;B?(B[0]=Math.floor(B[0]),B[1]=Math.floor(B[1]),B[2]=Math.ceil(B[2]),B[3]=Math.ceil(B[3])):B=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const Q=this.current.activeSMask;i0(this.suspendedCtx,Q,this.ctx,B),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?(U(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const B=this.current;this.stateStack.push(B),this.current=B.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),U(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(B,Q,$,l0,_,H){this.ctx.transform(B,Q,$,l0,_,H),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(B,Q,$){const l0=this.ctx,_=this.current;let H,d0,p0=_.x,m0=_.y;const r0=(0,X.getCurrentTransform)(l0),O0=r0[0]===0&&r0[3]===0||r0[1]===0&&r0[2]===0,h0=O0?$.slice(0):null;for(let G0=0,z0=0,g0=B.length;G0<g0;G0++)switch(0|B[G0]){case N.OPS.rectangle:p0=Q[z0++],m0=Q[z0++];const f0=Q[z0++],S0=Q[z0++],J=p0+f0,e0=m0+S0;l0.moveTo(p0,m0),f0===0||S0===0?l0.lineTo(J,e0):(l0.lineTo(J,m0),l0.lineTo(J,e0),l0.lineTo(p0,e0)),O0||_.updateRectMinMax(r0,[p0,m0,J,e0]),l0.closePath();break;case N.OPS.moveTo:p0=Q[z0++],m0=Q[z0++],l0.moveTo(p0,m0),O0||_.updatePathMinMax(r0,p0,m0);break;case N.OPS.lineTo:p0=Q[z0++],m0=Q[z0++],l0.lineTo(p0,m0),O0||_.updatePathMinMax(r0,p0,m0);break;case N.OPS.curveTo:H=p0,d0=m0,p0=Q[z0+4],m0=Q[z0+5],l0.bezierCurveTo(Q[z0],Q[z0+1],Q[z0+2],Q[z0+3],p0,m0),_.updateCurvePathMinMax(r0,H,d0,Q[z0],Q[z0+1],Q[z0+2],Q[z0+3],p0,m0,h0),z0+=6;break;case N.OPS.curveTo2:H=p0,d0=m0,l0.bezierCurveTo(p0,m0,Q[z0],Q[z0+1],Q[z0+2],Q[z0+3]),_.updateCurvePathMinMax(r0,H,d0,p0,m0,Q[z0],Q[z0+1],Q[z0+2],Q[z0+3],h0),p0=Q[z0+2],m0=Q[z0+3],z0+=4;break;case N.OPS.curveTo3:H=p0,d0=m0,p0=Q[z0+2],m0=Q[z0+3],l0.bezierCurveTo(Q[z0],Q[z0+1],p0,m0,p0,m0),_.updateCurvePathMinMax(r0,H,d0,Q[z0],Q[z0+1],p0,m0,p0,m0,h0),z0+=4;break;case N.OPS.closePath:l0.closePath()}O0&&_.updateScalingPathMinMax(r0,h0),_.setCurrentPoint(p0,m0)}closePath(){this.ctx.closePath()}stroke(){let B=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];const Q=this.ctx,$=this.current.strokeColor;Q.globalAlpha=this.current.strokeAlpha,this.contentVisible&&(typeof $=="object"&&$!=null&&$.getPattern?(Q.save(),Q.strokeStyle=$.getPattern(Q,this,(0,X.getCurrentTransformInverse)(Q),y.PathType.STROKE),this.rescaleAndStroke(!1),Q.restore()):this.rescaleAndStroke(!0)),B&&this.consumePath(this.current.getClippedPathBoundingBox()),Q.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(){let B=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];const Q=this.ctx,$=this.current.fillColor;let l0=!1;this.current.patternFill&&(Q.save(),Q.fillStyle=$.getPattern(Q,this,(0,X.getCurrentTransformInverse)(Q),y.PathType.FILL),l0=!0);const _=this.current.getClippedPathBoundingBox();this.contentVisible&&_!==null&&(this.pendingEOFill?(Q.fill("evenodd"),this.pendingEOFill=!1):Q.fill()),l0&&Q.restore(),B&&this.consumePath(_)}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=s0}eoClip(){this.pendingClip=W0}beginText(){this.current.textMatrix=N.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const B=this.pendingTextPaths,Q=this.ctx;if(B!==void 0){Q.save(),Q.beginPath();for(const $ of B)Q.setTransform(...$.transform),Q.translate($.x,$.y),$.addToPath(Q,$.fontSize);Q.restore(),Q.clip(),Q.beginPath(),delete this.pendingTextPaths}else Q.beginPath()}setCharSpacing(B){this.current.charSpacing=B}setWordSpacing(B){this.current.wordSpacing=B}setHScale(B){this.current.textHScale=B/100}setLeading(B){this.current.leading=-B}setFont(B,Q){var $;const l0=this.commonObjs.get(B),_=this.current;if(!l0)throw new Error(`Can't find font for ${B}`);if(_.fontMatrix=l0.fontMatrix||N.FONT_IDENTITY_MATRIX,_.fontMatrix[0]!==0&&_.fontMatrix[3]!==0||(0,N.warn)("Invalid font matrix for font "+B),Q<0?(Q=-Q,_.fontDirection=-1):_.fontDirection=1,this.current.font=l0,this.current.fontSize=Q,l0.isType3Font)return;const H=l0.loadedName||"sans-serif",d0=(($=l0.systemFontInfo)===null||$===void 0?void 0:$.css)||`"${H}", ${l0.fallbackName}`;let p0="normal";l0.black?p0="900":l0.bold&&(p0="bold");const m0=l0.italic?"italic":"normal";let r0=Q;Q<16?r0=16:Q>100&&(r0=100),this.current.fontSizeScale=Q/r0,this.ctx.font=`${m0} ${p0} ${r0}px ${d0}`}setTextRenderingMode(B){this.current.textRenderingMode=B}setTextRise(B){this.current.textRise=B}moveText(B,Q){this.current.x=this.current.lineX+=B,this.current.y=this.current.lineY+=Q}setLeadingMoveText(B,Q){this.setLeading(-Q),this.moveText(B,Q)}setTextMatrix(B,Q,$,l0,_,H){this.current.textMatrix=[B,Q,$,l0,_,H],this.current.textMatrixScale=Math.hypot(B,Q),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(B,Q,$,l0){const _=this.ctx,H=this.current,d0=H.font,p0=H.textRenderingMode,m0=H.fontSize/H.fontSizeScale,r0=p0&N.TextRenderingMode.FILL_STROKE_MASK,O0=!!(p0&N.TextRenderingMode.ADD_TO_PATH_FLAG),h0=H.patternFill&&!d0.missingFile;let G0;(d0.disableFontFace||O0||h0)&&(G0=d0.getPathGenerator(this.commonObjs,B)),d0.disableFontFace||h0?(_.save(),_.translate(Q,$),_.beginPath(),G0(_,m0),l0&&_.setTransform(...l0),r0!==N.TextRenderingMode.FILL&&r0!==N.TextRenderingMode.FILL_STROKE||_.fill(),r0!==N.TextRenderingMode.STROKE&&r0!==N.TextRenderingMode.FILL_STROKE||_.stroke(),_.restore()):(r0!==N.TextRenderingMode.FILL&&r0!==N.TextRenderingMode.FILL_STROKE||_.fillText(B,Q,$),r0!==N.TextRenderingMode.STROKE&&r0!==N.TextRenderingMode.FILL_STROKE||_.strokeText(B,Q,$)),O0&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:(0,X.getCurrentTransform)(_),x:Q,y:$,fontSize:m0,addToPath:G0})}get isFontSubpixelAAEnabled(){const{context:B}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);B.scale(1.5,1),B.fillText("I",0,10);const Q=B.getImageData(0,0,10,10).data;let $=!1;for(let l0=3;l0<Q.length;l0+=4)if(Q[l0]>0&&Q[l0]<255){$=!0;break}return(0,N.shadow)(this,"isFontSubpixelAAEnabled",$)}showText(B){const Q=this.current,$=Q.font;if($.isType3Font)return this.showType3Text(B);const l0=Q.fontSize;if(l0===0)return;const _=this.ctx,H=Q.fontSizeScale,d0=Q.charSpacing,p0=Q.wordSpacing,m0=Q.fontDirection,r0=Q.textHScale*m0,O0=B.length,h0=$.vertical,G0=h0?1:-1,z0=$.defaultVMetrics,g0=l0*Q.fontMatrix[0],f0=Q.textRenderingMode===N.TextRenderingMode.FILL&&!$.disableFontFace&&!Q.patternFill;_.save(),_.transform(...Q.textMatrix),_.translate(Q.x,Q.y+Q.textRise),m0>0?_.scale(r0,-1):_.scale(r0,1);let S0;if(Q.patternFill){_.save();const Z0=Q.fillColor.getPattern(_,this,(0,X.getCurrentTransformInverse)(_),y.PathType.FILL);S0=(0,X.getCurrentTransform)(_),_.restore(),_.fillStyle=Z0}let J=Q.lineWidth;const e0=Q.textMatrixScale;if(e0===0||J===0){const Z0=Q.textRenderingMode&N.TextRenderingMode.FILL_STROKE_MASK;Z0!==N.TextRenderingMode.STROKE&&Z0!==N.TextRenderingMode.FILL_STROKE||(J=this.getSinglePixelWidth())}else J/=e0;if(H!==1&&(_.scale(H,H),J/=H),_.lineWidth=J,$.isInvalidPDFjsFont){const Z0=[];let T0=0;for(const I0 of B)Z0.push(I0.unicode),T0+=I0.width;_.fillText(Z0.join(""),0,0),Q.x+=T0*g0*r0,_.restore(),this.compose();return}let a0,o0=0;for(a0=0;a0<O0;++a0){const Z0=B[a0];if(typeof Z0=="number"){o0+=G0*Z0*l0/1e3;continue}let T0=!1;const I0=(Z0.isSpace?p0:0)+d0,A0=Z0.fontChar,F0=Z0.accent;let J0,K0,E0,H0=Z0.width;if(h0){const q0=Z0.vmetric||z0,a1=-(Z0.vmetric?q0[1]:.5*H0)*g0,Y0=q0[2]*g0;H0=q0?-q0[0]:H0,J0=a1/H,K0=(o0+Y0)/H}else J0=o0/H,K0=0;if($.remeasure&&H0>0){const q0=1e3*_.measureText(A0).width/l0*H;if(H0<q0&&this.isFontSubpixelAAEnabled){const a1=H0/q0;T0=!0,_.save(),_.scale(a1,1),J0/=a1}else H0!==q0&&(J0+=(H0-q0)/2e3*l0/H)}if(this.contentVisible&&(Z0.isInFont||$.missingFile)){if(f0&&!F0)_.fillText(A0,J0,K0);else if(this.paintChar(A0,J0,K0,S0),F0){const q0=J0+l0*F0.offset.x/H,a1=K0-l0*F0.offset.y/H;this.paintChar(F0.fontChar,q0,a1,S0)}}E0=h0?H0*g0-I0*m0:H0*g0+I0*m0,o0+=E0,T0&&_.restore()}h0?Q.y-=o0:Q.x+=o0*r0,_.restore(),this.compose()}showType3Text(B){const Q=this.ctx,$=this.current,l0=$.font,_=$.fontSize,H=$.fontDirection,d0=l0.vertical?1:-1,p0=$.charSpacing,m0=$.wordSpacing,r0=$.textHScale*H,O0=$.fontMatrix||N.FONT_IDENTITY_MATRIX,h0=B.length;let G0,z0,g0,f0;if($.textRenderingMode!==N.TextRenderingMode.INVISIBLE&&_!==0){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,Q.save(),Q.transform(...$.textMatrix),Q.translate($.x,$.y),Q.scale(r0,H),G0=0;G0<h0;++G0){if(z0=B[G0],typeof z0=="number"){f0=d0*z0*_/1e3,this.ctx.translate(f0,0),$.x+=f0*r0;continue}const S0=(z0.isSpace?m0:0)+p0,J=l0.charProcOperatorList[z0.operatorListId];if(!J){(0,N.warn)(`Type3 character "${z0.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=z0,this.save(),Q.scale(_,_),Q.transform(...O0),this.executeOperatorList(J),this.restore()),g0=N.Util.applyTransform([z0.width,0],O0)[0]*_+S0,Q.translate(g0,0),$.x+=g0*r0}Q.restore(),this.processingType3=null}}setCharWidth(B,Q){}setCharWidthAndBounds(B,Q,$,l0,_,H){this.ctx.rect($,l0,_-$,H-l0),this.ctx.clip(),this.endPath()}getColorN_Pattern(B){let Q;if(B[0]==="TilingPattern"){const $=B[1],l0=this.baseTransform||(0,X.getCurrentTransform)(this.ctx),_={createCanvasGraphics:H=>new M0(H,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};Q=new y.TilingPattern(B,$,this.ctx,_,l0)}else Q=this._getPattern(B[1],B[2]);return Q}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(B,Q,$){const l0=N.Util.makeHexColor(B,Q,$);this.ctx.strokeStyle=l0,this.current.strokeColor=l0}setFillRGBColor(B,Q,$){const l0=N.Util.makeHexColor(B,Q,$);this.ctx.fillStyle=l0,this.current.fillColor=l0,this.current.patternFill=!1}_getPattern(B){let Q,$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return this.cachedPatterns.has(B)?Q=this.cachedPatterns.get(B):(Q=(0,y.getShadingPattern)(this.getObject(B)),this.cachedPatterns.set(B,Q)),$&&(Q.matrix=$),Q}shadingFill(B){if(!this.contentVisible)return;const Q=this.ctx;this.save();const $=this._getPattern(B);Q.fillStyle=$.getPattern(Q,this,(0,X.getCurrentTransformInverse)(Q),y.PathType.SHADING);const l0=(0,X.getCurrentTransformInverse)(Q);if(l0){const _=Q.canvas,H=_.width,d0=_.height,p0=N.Util.applyTransform([0,0],l0),m0=N.Util.applyTransform([0,d0],l0),r0=N.Util.applyTransform([H,0],l0),O0=N.Util.applyTransform([H,d0],l0),h0=Math.min(p0[0],m0[0],r0[0],O0[0]),G0=Math.min(p0[1],m0[1],r0[1],O0[1]),z0=Math.max(p0[0],m0[0],r0[0],O0[0]),g0=Math.max(p0[1],m0[1],r0[1],O0[1]);this.ctx.fillRect(h0,G0,z0-h0,g0-G0)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){(0,N.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,N.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(B,Q){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(B)&&B.length===6&&this.transform(...B),this.baseTransform=(0,X.getCurrentTransform)(this.ctx),Q)){const $=Q[2]-Q[0],l0=Q[3]-Q[1];this.ctx.rect(Q[0],Q[1],$,l0),this.current.updateRectMinMax((0,X.getCurrentTransform)(this.ctx),Q),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(B){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const Q=this.ctx;B.isolated||(0,N.info)("TODO: Support non-isolated groups."),B.knockout&&(0,N.warn)("Knockout groups not supported.");const $=(0,X.getCurrentTransform)(Q);if(B.matrix&&Q.transform(...B.matrix),!B.bbox)throw new Error("Bounding box is required.");let l0=N.Util.getAxialAlignedBoundingBox(B.bbox,(0,X.getCurrentTransform)(Q));const _=[0,0,Q.canvas.width,Q.canvas.height];l0=N.Util.intersect(l0,_)||[0,0,0,0];const H=Math.floor(l0[0]),d0=Math.floor(l0[1]);let p0=Math.max(Math.ceil(l0[2])-H,1),m0=Math.max(Math.ceil(l0[3])-d0,1),r0=1,O0=1;p0>g&&(r0=p0/g,p0=g),m0>g&&(O0=m0/g,m0=g),this.current.startNewPathAndClipBox([0,0,p0,m0]);let h0="groupAt"+this.groupLevel;B.smask&&(h0+="_smask_"+this.smaskCounter++%2);const G0=this.cachedCanvases.getCanvas(h0,p0,m0),z0=G0.context;z0.scale(1/r0,1/O0),z0.translate(-H,-d0),z0.transform(...$),B.smask?this.smaskStack.push({canvas:G0.canvas,context:z0,offsetX:H,offsetY:d0,scaleX:r0,scaleY:O0,subtype:B.smask.subtype,backdrop:B.smask.backdrop,transferMap:B.smask.transferMap||null,startTransformInverse:null}):(Q.setTransform(1,0,0,1,0,0),Q.translate(H,d0),Q.scale(r0,O0),Q.save()),U(Q,z0),this.ctx=z0,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(Q),this.groupLevel++}endGroup(B){if(!this.contentVisible)return;this.groupLevel--;const Q=this.ctx,$=this.groupStack.pop();if(this.ctx=$,this.ctx.imageSmoothingEnabled=!1,B.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const l0=(0,X.getCurrentTransform)(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...l0);const _=N.Util.getAxialAlignedBoundingBox([0,0,Q.canvas.width,Q.canvas.height],l0);this.ctx.drawImage(Q.canvas,0,0),this.ctx.restore(),this.compose(_)}}beginAnnotation(B,Q,$,l0,_){if(nt(this,u,z).call(this),E(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Array.isArray(Q)&&Q.length===4){const H=Q[2]-Q[0],d0=Q[3]-Q[1];if(_&&this.annotationCanvasMap){($=$.slice())[4]-=Q[0],$[5]-=Q[1],(Q=Q.slice())[0]=Q[1]=0,Q[2]=H,Q[3]=d0;const[p0,m0]=N.Util.singularValueDecompose2dScale((0,X.getCurrentTransform)(this.ctx)),{viewportScale:r0}=this,O0=Math.ceil(H*this.outputScaleX*r0),h0=Math.ceil(d0*this.outputScaleY*r0);this.annotationCanvas=this.canvasFactory.create(O0,h0);const{canvas:G0,context:z0}=this.annotationCanvas;this.annotationCanvasMap.set(B,G0),this.annotationCanvas.savedCtx=this.ctx,this.ctx=z0,this.ctx.save(),this.ctx.setTransform(p0,0,0,-m0,0,d0*m0),E(this.ctx)}else E(this.ctx),this.ctx.rect(Q[0],Q[1],H,d0),this.ctx.clip(),this.endPath()}this.current=new F(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...$),this.transform(...l0)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),nt(this,W,O).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(B){if(!this.contentVisible)return;const Q=B.count;(B=this.getObject(B.data,B)).count=Q;const $=this.ctx,l0=this.processingType3;if(l0&&(l0.compiled===void 0&&(l0.compiled=function(d0){const{width:p0,height:m0}=d0;if(p0>1e3||m0>1e3)return null;const r0=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),O0=p0+1;let h0,G0,z0,g0=new Uint8Array(O0*(m0+1));const f0=p0+7&-8;let S0=new Uint8Array(f0*m0),J=0;for(const Z0 of d0.data){let T0=128;for(;T0>0;)S0[J++]=Z0&T0?0:255,T0>>=1}let e0=0;for(J=0,S0[J]!==0&&(g0[0]=1,++e0),G0=1;G0<p0;G0++)S0[J]!==S0[J+1]&&(g0[G0]=S0[J]?2:1,++e0),J++;for(S0[J]!==0&&(g0[G0]=2,++e0),h0=1;h0<m0;h0++){J=h0*f0,z0=h0*O0,S0[J-f0]!==S0[J]&&(g0[z0]=S0[J]?1:8,++e0);let Z0=(S0[J]?4:0)+(S0[J-f0]?8:0);for(G0=1;G0<p0;G0++)Z0=(Z0>>2)+(S0[J+1]?4:0)+(S0[J-f0+1]?8:0),r0[Z0]&&(g0[z0+G0]=r0[Z0],++e0),J++;if(S0[J-f0]!==S0[J]&&(g0[z0+G0]=S0[J]?2:4,++e0),e0>1e3)return null}for(J=f0*(m0-1),z0=h0*O0,S0[J]!==0&&(g0[z0]=8,++e0),G0=1;G0<p0;G0++)S0[J]!==S0[J+1]&&(g0[z0+G0]=S0[J]?4:8,++e0),J++;if(S0[J]!==0&&(g0[z0+G0]=4,++e0),e0>1e3)return null;const a0=new Int32Array([0,O0,-1,0,-O0,0,0,0,1]),o0=new Path2D;for(h0=0;e0&&h0<=m0;h0++){let Z0=h0*O0;const T0=Z0+p0;for(;Z0<T0&&!g0[Z0];)Z0++;if(Z0===T0)continue;o0.moveTo(Z0%O0,h0);const I0=Z0;let A0=g0[Z0];do{const F0=a0[A0];do Z0+=F0;while(!g0[Z0]);const J0=g0[Z0];J0!==5&&J0!==10?(A0=J0,g0[Z0]=0):(A0=J0&51*A0>>4,g0[Z0]&=A0>>2|A0<<2),o0.lineTo(Z0%O0,Z0/O0|0),g0[Z0]||--e0}while(I0!==Z0);--h0}return S0=null,g0=null,function(Z0){Z0.save(),Z0.scale(1/p0,-1/m0),Z0.translate(0,-m0),Z0.fill(o0),Z0.beginPath(),Z0.restore()}}(B)),l0.compiled)){l0.compiled($);return}const _=this._createMaskCanvas(B),H=_.canvas;$.save(),$.setTransform(1,0,0,1,0,0),$.drawImage(H,_.offsetX,_.offsetY),$.restore(),this.compose()}paintImageMaskXObjectRepeat(B,Q){let $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,l0=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,_=arguments.length>4?arguments[4]:void 0,H=arguments.length>5?arguments[5]:void 0;if(!this.contentVisible)return;B=this.getObject(B.data,B);const d0=this.ctx;d0.save();const p0=(0,X.getCurrentTransform)(d0);d0.transform(Q,$,l0,_,0,0);const m0=this._createMaskCanvas(B);d0.setTransform(1,0,0,1,m0.offsetX-p0[4],m0.offsetY-p0[5]);for(let r0=0,O0=H.length;r0<O0;r0+=2){const h0=N.Util.transform(p0,[Q,$,l0,_,H[r0],H[r0+1]]),[G0,z0]=N.Util.applyTransform([0,0],h0);d0.drawImage(m0.canvas,G0,z0)}d0.restore(),this.compose()}paintImageMaskXObjectGroup(B){if(!this.contentVisible)return;const Q=this.ctx,$=this.current.fillColor,l0=this.current.patternFill;for(const _ of B){const{data:H,width:d0,height:p0,transform:m0}=_,r0=this.cachedCanvases.getCanvas("maskCanvas",d0,p0),O0=r0.context;O0.save(),j(O0,this.getObject(H,_)),O0.globalCompositeOperation="source-in",O0.fillStyle=l0?$.getPattern(O0,this,(0,X.getCurrentTransformInverse)(Q),y.PathType.FILL):$,O0.fillRect(0,0,d0,p0),O0.restore(),Q.save(),Q.transform(...m0),Q.scale(1,-1),C(Q,r0.canvas,0,0,d0,p0,0,-1,1,1),Q.restore()}this.compose()}paintImageXObject(B){if(!this.contentVisible)return;const Q=this.getObject(B);Q?this.paintInlineImageXObject(Q):(0,N.warn)("Dependent image isn't ready yet")}paintImageXObjectRepeat(B,Q,$,l0){if(!this.contentVisible)return;const _=this.getObject(B);if(!_){(0,N.warn)("Dependent image isn't ready yet");return}const H=_.width,d0=_.height,p0=[];for(let m0=0,r0=l0.length;m0<r0;m0+=2)p0.push({transform:[Q,0,0,$,l0[m0],l0[m0+1]],x:0,y:0,w:H,h:d0});this.paintInlineImageXObjectGroup(_,p0)}applyTransferMapsToCanvas(B){return this.current.transferMaps!=="none"&&(B.filter=this.current.transferMaps,B.drawImage(B.canvas,0,0),B.filter="none"),B.canvas}applyTransferMapsToBitmap(B){if(this.current.transferMaps==="none")return B.bitmap;const{bitmap:Q,width:$,height:l0}=B,_=this.cachedCanvases.getCanvas("inlineImage",$,l0),H=_.context;return H.filter=this.current.transferMaps,H.drawImage(Q,0,0),H.filter="none",_.canvas}paintInlineImageXObject(B){if(!this.contentVisible)return;const Q=B.width,$=B.height,l0=this.ctx;this.save(),V.isNodeJS||(l0.filter="none"),l0.scale(1/Q,-1/$);let _;if(B.bitmap)_=this.applyTransferMapsToBitmap(B);else if(typeof HTMLElement=="function"&&B instanceof HTMLElement||!B.data)_=B;else{const d0=this.cachedCanvases.getCanvas("inlineImage",Q,$).context;K(d0,B),_=this.applyTransferMapsToCanvas(d0)}const H=this._scaleImage(_,(0,X.getCurrentTransformInverse)(l0));l0.imageSmoothingEnabled=t0((0,X.getCurrentTransform)(l0),B.interpolate),C(l0,H.img,0,0,H.paintWidth,H.paintHeight,0,-$,Q,$),this.compose(),this.restore()}paintInlineImageXObjectGroup(B,Q){if(!this.contentVisible)return;const $=this.ctx;let l0;if(B.bitmap)l0=B.bitmap;else{const _=B.width,H=B.height,d0=this.cachedCanvases.getCanvas("inlineImage",_,H).context;K(d0,B),l0=this.applyTransferMapsToCanvas(d0)}for(const _ of Q)$.save(),$.transform(..._.transform),$.scale(1,-1),C($,l0,_.x,_.y,_.w,_.h,0,-1,1,1),$.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(B){}markPointProps(B,Q){}beginMarkedContent(B){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(B,Q){B==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(Q)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(B){const Q=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(B);const $=this.ctx;this.pendingClip&&(Q||(this.pendingClip===W0?$.clip("evenodd"):$.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),$.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const B=(0,X.getCurrentTransform)(this.ctx);if(B[1]===0&&B[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(B[0]),Math.abs(B[3]));else{const Q=Math.abs(B[0]*B[3]-B[2]*B[1]),$=Math.hypot(B[0],B[2]),l0=Math.hypot(B[1],B[3]);this._cachedGetSinglePixelWidth=Math.max($,l0)/Q}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:B}=this.current,{a:Q,b:$,c:l0,d:_}=this.ctx.getTransform();let H,d0;if($===0&&l0===0){const p0=Math.abs(Q),m0=Math.abs(_);if(p0===m0)if(B===0)H=d0=1/p0;else{const r0=p0*B;H=d0=r0<1?1/r0:1}else if(B===0)H=1/p0,d0=1/m0;else{const r0=p0*B,O0=m0*B;H=r0<1?1/r0:1,d0=O0<1?1/O0:1}}else{const p0=Math.abs(Q*_-$*l0),m0=Math.hypot(Q,$),r0=Math.hypot(l0,_);if(B===0)H=r0/p0,d0=m0/p0;else{const O0=B*p0;H=r0>O0?r0/O0:1,d0=m0>O0?m0/O0:1}}this._cachedScaleForStroking[0]=H,this._cachedScaleForStroking[1]=d0}return this._cachedScaleForStroking}rescaleAndStroke(B){const{ctx:Q}=this,{lineWidth:$}=this.current,[l0,_]=this.getScaleForStroking();if(Q.lineWidth=$||1,l0===1&&_===1){Q.stroke();return}const H=Q.getLineDash();if(B&&Q.save(),Q.scale(l0,_),H.length>0){const d0=Math.max(l0,_);Q.setLineDash(H.map(p0=>p0/d0)),Q.lineDashOffset/=d0}Q.stroke(),B&&Q.restore()}isContentVisible(){for(let B=this.markedContentStack.length-1;B>=0;B--)if(!this.markedContentStack[B].visible)return!1;return!0}};let X0=M0;u=new WeakSet,z=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)},W=new WeakSet,O=function(){if(this.pageColors){const B=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(B!=="none"){const Q=this.ctx.filter;this.ctx.filter=B,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=Q}}},M.CanvasGraphics=X0;for(const B in N.OPS)X0.prototype[B]!==void 0&&(X0.prototype[N.OPS[B]]=X0.prototype[B])},(s,M,o)=>{Object.defineProperty(M,"__esModule",{value:!0}),M.TilingPattern=M.PathType=void 0,M.getShadingPattern=function(K){switch(K[0]){case"RadialAxial":return new X(K);case"Mesh":return new V(K);case"Dummy":return new g}throw new Error(`Unknown IR type: ${K[0]}`)};var u=o(1),z=o(142);const W={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};M.PathType=W;function O(K,j){if(!j)return;const U=j[2]-j[0],E=j[3]-j[1],D=new Path2D;D.rect(j[0],j[1],U,E),K.clip(D)}class N{constructor(){this.constructor===N&&(0,u.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,u.unreachable)("Abstract method `getPattern` called.")}}class X extends N{constructor(j){super(),this._type=j[1],this._bbox=j[2],this._colorStops=j[3],this._p0=j[4],this._p1=j[5],this._r0=j[6],this._r1=j[7],this.matrix=null}_createGradient(j){let U;this._type==="axial"?U=j.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(U=j.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const E of this._colorStops)U.addColorStop(E[0],E[1]);return U}getPattern(j,U,E,D){let v;if(D===W.STROKE||D===W.FILL){const q=U.current.getClippedPathBoundingBox(D,(0,z.getCurrentTransform)(j))||[0,0,0,0],i0=Math.ceil(q[2]-q[0])||1,t0=Math.ceil(q[3]-q[1])||1,P=U.cachedCanvases.getCanvas("pattern",i0,t0,!0),c0=P.context;c0.clearRect(0,0,c0.canvas.width,c0.canvas.height),c0.beginPath(),c0.rect(0,0,c0.canvas.width,c0.canvas.height),c0.translate(-q[0],-q[1]),E=u.Util.transform(E,[1,0,0,1,q[0],q[1]]),c0.transform(...U.baseTransform),this.matrix&&c0.transform(...this.matrix),O(c0,this._bbox),c0.fillStyle=this._createGradient(c0),c0.fill(),v=j.createPattern(P.canvas,"no-repeat");const s0=new DOMMatrix(E);v.setTransform(s0)}else O(j,this._bbox),v=this._createGradient(j);return v}}function y(K,j,U,E,D,v,q,i0){const t0=j.coords,P=j.colors,c0=K.data,s0=4*K.width;let W0;t0[U+1]>t0[E+1]&&(W0=U,U=E,E=W0,W0=v,v=q,q=W0),t0[E+1]>t0[D+1]&&(W0=E,E=D,D=W0,W0=q,q=i0,i0=W0),t0[U+1]>t0[E+1]&&(W0=U,U=E,E=W0,W0=v,v=q,q=W0);const M0=(t0[U]+j.offsetX)*j.scaleX,X0=(t0[U+1]+j.offsetY)*j.scaleY,B=(t0[E]+j.offsetX)*j.scaleX,Q=(t0[E+1]+j.offsetY)*j.scaleY,$=(t0[D]+j.offsetX)*j.scaleX,l0=(t0[D+1]+j.offsetY)*j.scaleY;if(X0>=l0)return;const _=P[v],H=P[v+1],d0=P[v+2],p0=P[q],m0=P[q+1],r0=P[q+2],O0=P[i0],h0=P[i0+1],G0=P[i0+2],z0=Math.round(X0),g0=Math.round(l0);let f0,S0,J,e0,a0,o0,Z0,T0;for(let I0=z0;I0<=g0;I0++){if(I0<Q){let E0;E0=I0<X0?0:(X0-I0)/(X0-Q),f0=M0-(M0-B)*E0,S0=_-(_-p0)*E0,J=H-(H-m0)*E0,e0=d0-(d0-r0)*E0}else{let E0;E0=I0>l0?1:Q===l0?0:(Q-I0)/(Q-l0),f0=B-(B-$)*E0,S0=p0-(p0-O0)*E0,J=m0-(m0-h0)*E0,e0=r0-(r0-G0)*E0}let A0;A0=I0<X0?0:I0>l0?1:(X0-I0)/(X0-l0),a0=M0-(M0-$)*A0,o0=_-(_-O0)*A0,Z0=H-(H-h0)*A0,T0=d0-(d0-G0)*A0;const F0=Math.round(Math.min(f0,a0)),J0=Math.round(Math.max(f0,a0));let K0=s0*I0+4*F0;for(let E0=F0;E0<=J0;E0++)A0=(f0-E0)/(f0-a0),A0<0?A0=0:A0>1&&(A0=1),c0[K0++]=S0-(S0-o0)*A0|0,c0[K0++]=J-(J-Z0)*A0|0,c0[K0++]=e0-(e0-T0)*A0|0,c0[K0++]=255}}function G(K,j,U){const E=j.coords,D=j.colors;let v,q;switch(j.type){case"lattice":const i0=j.verticesPerRow,t0=Math.floor(E.length/i0)-1,P=i0-1;for(v=0;v<t0;v++){let c0=v*i0;for(let s0=0;s0<P;s0++,c0++)y(K,U,E[c0],E[c0+1],E[c0+i0],D[c0],D[c0+1],D[c0+i0]),y(K,U,E[c0+i0+1],E[c0+1],E[c0+i0],D[c0+i0+1],D[c0+1],D[c0+i0])}break;case"triangles":for(v=0,q=E.length;v<q;v+=3)y(K,U,E[v],E[v+1],E[v+2],D[v],D[v+1],D[v+2]);break;default:throw new Error("illegal figure")}}class V extends N{constructor(j){super(),this._coords=j[2],this._colors=j[3],this._figures=j[4],this._bounds=j[5],this._bbox=j[7],this._background=j[8],this.matrix=null}_createMeshCanvas(j,U,E){const D=Math.floor(this._bounds[0]),v=Math.floor(this._bounds[1]),q=Math.ceil(this._bounds[2])-D,i0=Math.ceil(this._bounds[3])-v,t0=Math.min(Math.ceil(Math.abs(q*j[0]*1.1)),3e3),P=Math.min(Math.ceil(Math.abs(i0*j[1]*1.1)),3e3),c0=q/t0,s0=i0/P,W0={coords:this._coords,colors:this._colors,offsetX:-D,offsetY:-v,scaleX:1/c0,scaleY:1/s0},M0=t0+4,X0=P+4,B=E.getCanvas("mesh",M0,X0,!1),Q=B.context,$=Q.createImageData(t0,P);if(U){const l0=$.data;for(let _=0,H=l0.length;_<H;_+=4)l0[_]=U[0],l0[_+1]=U[1],l0[_+2]=U[2],l0[_+3]=255}for(const l0 of this._figures)G($,l0,W0);return Q.putImageData($,2,2),{canvas:B.canvas,offsetX:D-2*c0,offsetY:v-2*s0,scaleX:c0,scaleY:s0}}getPattern(j,U,E,D){O(j,this._bbox);let v;if(D===W.SHADING)v=u.Util.singularValueDecompose2dScale((0,z.getCurrentTransform)(j));else if(v=u.Util.singularValueDecompose2dScale(U.baseTransform),this.matrix){const i0=u.Util.singularValueDecompose2dScale(this.matrix);v=[v[0]*i0[0],v[1]*i0[1]]}const q=this._createMeshCanvas(v,D===W.SHADING?null:this._background,U.cachedCanvases);return D!==W.SHADING&&(j.setTransform(...U.baseTransform),this.matrix&&j.transform(...this.matrix)),j.translate(q.offsetX,q.offsetY),j.scale(q.scaleX,q.scaleY),j.createPattern(q.canvas,"no-repeat")}}class g extends N{getPattern(){return"hotpink"}}const R=1,S=2,C=class{constructor(K,j,U,E,D){this.operatorList=K[2],this.matrix=K[3]||[1,0,0,1,0,0],this.bbox=K[4],this.xstep=K[5],this.ystep=K[6],this.paintType=K[7],this.tilingType=K[8],this.color=j,this.ctx=U,this.canvasGraphicsFactory=E,this.baseTransform=D}createPatternCanvas(K){const j=this.operatorList,U=this.bbox,E=this.xstep,D=this.ystep,v=this.paintType,q=this.tilingType,i0=this.color,t0=this.canvasGraphicsFactory;(0,u.info)("TilingType: "+q);const P=U[0],c0=U[1],s0=U[2],W0=U[3],M0=u.Util.singularValueDecompose2dScale(this.matrix),X0=u.Util.singularValueDecompose2dScale(this.baseTransform),B=[M0[0]*X0[0],M0[1]*X0[1]],Q=this.getSizeAndScale(E,this.ctx.canvas.width,B[0]),$=this.getSizeAndScale(D,this.ctx.canvas.height,B[1]),l0=K.cachedCanvases.getCanvas("pattern",Q.size,$.size,!0),_=l0.context,H=t0.createCanvasGraphics(_);H.groupLevel=K.groupLevel,this.setFillAndStrokeStyleToContext(H,v,i0);let d0=P,p0=c0,m0=s0,r0=W0;return P<0&&(d0=0,m0+=Math.abs(P)),c0<0&&(p0=0,r0+=Math.abs(c0)),_.translate(-Q.scale*d0,-$.scale*p0),H.transform(Q.scale,0,0,$.scale,0,0),_.save(),this.clipBbox(H,d0,p0,m0,r0),H.baseTransform=(0,z.getCurrentTransform)(H.ctx),H.executeOperatorList(j),H.endDrawing(),{canvas:l0.canvas,scaleX:Q.scale,scaleY:$.scale,offsetX:d0,offsetY:p0}}getSizeAndScale(K,j,U){K=Math.abs(K);const E=Math.max(C.MAX_PATTERN_SIZE,j);let D=Math.ceil(K*U);return D>=E?D=E:U=D/K,{scale:U,size:D}}clipBbox(K,j,U,E,D){const v=E-j,q=D-U;K.ctx.rect(j,U,v,q),K.current.updateRectMinMax((0,z.getCurrentTransform)(K.ctx),[j,U,E,D]),K.clip(),K.endPath()}setFillAndStrokeStyleToContext(K,j,U){const E=K.ctx,D=K.current;switch(j){case R:const v=this.ctx;E.fillStyle=v.fillStyle,E.strokeStyle=v.strokeStyle,D.fillColor=v.fillStyle,D.strokeColor=v.strokeStyle;break;case S:const q=u.Util.makeHexColor(U[0],U[1],U[2]);E.fillStyle=q,E.strokeStyle=q,D.fillColor=q,D.strokeColor=q;break;default:throw new u.FormatError(`Unsupported paint type: ${j}`)}}getPattern(K,j,U,E){let D=U;E!==W.SHADING&&(D=u.Util.transform(D,j.baseTransform),this.matrix&&(D=u.Util.transform(D,this.matrix)));const v=this.createPatternCanvas(j);let q=new DOMMatrix(D);q=q.translate(v.offsetX,v.offsetY),q=q.scale(1/v.scaleX,1/v.scaleY);const i0=K.createPattern(v.canvas,"repeat");return i0.setTransform(q),i0}};let F=C;It(F,"MAX_PATTERN_SIZE",3e3),M.TilingPattern=F},(s,M,o)=>{Object.defineProperty(M,"__esModule",{value:!0}),M.convertBlackAndWhiteToRGBA=z,M.convertToRGBA=function(W){switch(W.kind){case u.ImageKind.GRAYSCALE_1BPP:return z(W);case u.ImageKind.RGB_24BPP:return function(O){let{src:N,srcPos:X=0,dest:y,destPos:G=0,width:V,height:g}=O,R=0;const S=N.length>>2,C=new Uint32Array(N.buffer,X,S);if(u.FeatureTest.isLittleEndian){for(;R<S-2;R+=3,G+=4){const F=C[R],K=C[R+1],j=C[R+2];y[G]=4278190080|F,y[G+1]=F>>>24|K<<8|4278190080,y[G+2]=K>>>16|j<<16|4278190080,y[G+3]=j>>>8|4278190080}for(let F=4*R,K=N.length;F<K;F+=3)y[G++]=N[F]|N[F+1]<<8|N[F+2]<<16|4278190080}else{for(;R<S-2;R+=3,G+=4){const F=C[R],K=C[R+1],j=C[R+2];y[G]=255|F,y[G+1]=F<<24|K>>>8|255,y[G+2]=K<<16|j>>>16|255,y[G+3]=j<<8|255}for(let F=4*R,K=N.length;F<K;F+=3)y[G++]=N[F]<<24|N[F+1]<<16|N[F+2]<<8|255}return{srcPos:X,destPos:G}}(W)}return null},M.grayToRGBA=function(W,O){if(u.FeatureTest.isLittleEndian)for(let N=0,X=W.length;N<X;N++)O[N]=65793*W[N]|4278190080;else for(let N=0,X=W.length;N<X;N++)O[N]=16843008*W[N]|255};var u=o(1);function z(W){let{src:O,srcPos:N=0,dest:X,width:y,height:G,nonBlackColor:V=4294967295,inverseDecode:g=!1}=W;const R=u.FeatureTest.isLittleEndian?4278190080:255,[S,C]=g?[V,R]:[R,V],F=y>>3,K=7&y,j=O.length;X=new Uint32Array(X.buffer);let U=0;for(let E=0;E<G;E++){for(const v=N+F;N<v;N++){const q=N<j?O[N]:255;X[U++]=128&q?C:S,X[U++]=64&q?C:S,X[U++]=32&q?C:S,X[U++]=16&q?C:S,X[U++]=8&q?C:S,X[U++]=4&q?C:S,X[U++]=2&q?C:S,X[U++]=1&q?C:S}if(K===0)continue;const D=N<j?O[N++]:255;for(let v=0;v<K;v++)X[U++]=D&1<<7-v?C:S}return{srcPos:N,destPos:U}}},(s,M)=>{Object.defineProperty(M,"__esModule",{value:!0}),M.GlobalWorkerOptions=void 0;const o=Object.create(null);M.GlobalWorkerOptions=o,o.workerPort=null,o.workerSrc=""},(s,M,o)=>{var u,z,W,O,N,X,y;Object.defineProperty(M,"__esModule",{value:!0}),M.MessageHandler=void 0;var G=o(1);const V=1,g=2,R=1,S=2,C=3,F=4,K=5,j=6,U=7,E=8;function D(v){switch(v instanceof Error||typeof v=="object"&&v!==null||(0,G.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),v.name){case"AbortException":return new G.AbortException(v.message);case"MissingPDFException":return new G.MissingPDFException(v.message);case"PasswordException":return new G.PasswordException(v.message,v.code);case"UnexpectedResponseException":return new G.UnexpectedResponseException(v.message,v.status);case"UnknownErrorException":return new G.UnknownErrorException(v.message,v.details);default:return new G.UnknownErrorException(v.message,v.toString())}}M.MessageHandler=(y=class{constructor(v,q,i0){et(this,u),et(this,W),et(this,N),this.sourceName=v,this.targetName=q,this.comObj=i0,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=t0=>{const P=t0.data;if(P.targetName!==this.sourceName)return;if(P.stream){nt(this,W,O).call(this,P);return}if(P.callback){const s0=P.callbackId,W0=this.callbackCapabilities[s0];if(!W0)throw new Error(`Cannot resolve callback ${s0}`);if(delete this.callbackCapabilities[s0],P.callback===V)W0.resolve(P.data);else{if(P.callback!==g)throw new Error("Unexpected callback case");W0.reject(D(P.reason))}return}const c0=this.actionHandler[P.action];if(!c0)throw new Error(`Unknown action from worker: ${P.action}`);if(P.callbackId){const s0=this.sourceName,W0=P.sourceName;new Promise(function(M0){M0(c0(P.data))}).then(function(M0){i0.postMessage({sourceName:s0,targetName:W0,callback:V,callbackId:P.callbackId,data:M0})},function(M0){i0.postMessage({sourceName:s0,targetName:W0,callback:g,callbackId:P.callbackId,reason:D(M0)})})}else P.streamId?nt(this,u,z).call(this,P):c0(P.data)},i0.addEventListener("message",this._onComObjOnMessage)}on(v,q){const i0=this.actionHandler;if(i0[v])throw new Error(`There is already an actionName called "${v}"`);i0[v]=q}send(v,q,i0){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:v,data:q},i0)}sendWithPromise(v,q,i0){const t0=this.callbackId++,P=new G.PromiseCapability;this.callbackCapabilities[t0]=P;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:v,callbackId:t0,data:q},i0)}catch(c0){P.reject(c0)}return P.promise}sendWithStream(v,q,i0,t0){const P=this.streamId++,c0=this.sourceName,s0=this.targetName,W0=this.comObj;return new ReadableStream({start:M0=>{const X0=new G.PromiseCapability;return this.streamControllers[P]={controller:M0,startCall:X0,pullCall:null,cancelCall:null,isClosed:!1},W0.postMessage({sourceName:c0,targetName:s0,action:v,streamId:P,data:q,desiredSize:M0.desiredSize},t0),X0.promise},pull:M0=>{const X0=new G.PromiseCapability;return this.streamControllers[P].pullCall=X0,W0.postMessage({sourceName:c0,targetName:s0,stream:j,streamId:P,desiredSize:M0.desiredSize}),X0.promise},cancel:M0=>{(0,G.assert)(M0 instanceof Error,"cancel must have a valid reason");const X0=new G.PromiseCapability;return this.streamControllers[P].cancelCall=X0,this.streamControllers[P].isClosed=!0,W0.postMessage({sourceName:c0,targetName:s0,stream:R,streamId:P,reason:D(M0)}),X0.promise}},i0)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}},u=new WeakSet,z=function(v){const q=v.streamId,i0=this.sourceName,t0=v.sourceName,P=this.comObj,c0=this,s0=this.actionHandler[v.action],W0={enqueue(M0){let X0=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,B=arguments.length>2?arguments[2]:void 0;if(this.isCancelled)return;const Q=this.desiredSize;this.desiredSize-=X0,Q>0&&this.desiredSize<=0&&(this.sinkCapability=new G.PromiseCapability,this.ready=this.sinkCapability.promise),P.postMessage({sourceName:i0,targetName:t0,stream:F,streamId:q,chunk:M0},B)},close(){this.isCancelled||(this.isCancelled=!0,P.postMessage({sourceName:i0,targetName:t0,stream:C,streamId:q}),delete c0.streamSinks[q])},error(M0){(0,G.assert)(M0 instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,P.postMessage({sourceName:i0,targetName:t0,stream:K,streamId:q,reason:D(M0)}))},sinkCapability:new G.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:v.desiredSize,ready:null};W0.sinkCapability.resolve(),W0.ready=W0.sinkCapability.promise,this.streamSinks[q]=W0,new Promise(function(M0){M0(s0(v.data,W0))}).then(function(){P.postMessage({sourceName:i0,targetName:t0,stream:E,streamId:q,success:!0})},function(M0){P.postMessage({sourceName:i0,targetName:t0,stream:E,streamId:q,reason:D(M0)})})},W=new WeakSet,O=function(v){const q=v.streamId,i0=this.sourceName,t0=v.sourceName,P=this.comObj,c0=this.streamControllers[q],s0=this.streamSinks[q];switch(v.stream){case E:v.success?c0.startCall.resolve():c0.startCall.reject(D(v.reason));break;case U:v.success?c0.pullCall.resolve():c0.pullCall.reject(D(v.reason));break;case j:if(!s0){P.postMessage({sourceName:i0,targetName:t0,stream:U,streamId:q,success:!0});break}s0.desiredSize<=0&&v.desiredSize>0&&s0.sinkCapability.resolve(),s0.desiredSize=v.desiredSize,new Promise(function(W0){var M0;W0((M0=s0.onPull)===null||M0===void 0?void 0:M0.call(s0))}).then(function(){P.postMessage({sourceName:i0,targetName:t0,stream:U,streamId:q,success:!0})},function(W0){P.postMessage({sourceName:i0,targetName:t0,stream:U,streamId:q,reason:D(W0)})});break;case F:if((0,G.assert)(c0,"enqueue should have stream controller"),c0.isClosed)break;c0.controller.enqueue(v.chunk);break;case C:if((0,G.assert)(c0,"close should have stream controller"),c0.isClosed)break;c0.isClosed=!0,c0.controller.close(),nt(this,N,X).call(this,c0,q);break;case K:(0,G.assert)(c0,"error should have stream controller"),c0.controller.error(D(v.reason)),nt(this,N,X).call(this,c0,q);break;case S:v.success?c0.cancelCall.resolve():c0.cancelCall.reject(D(v.reason)),nt(this,N,X).call(this,c0,q);break;case R:if(!s0)break;new Promise(function(W0){var M0;W0((M0=s0.onCancel)===null||M0===void 0?void 0:M0.call(s0,D(v.reason)))}).then(function(){P.postMessage({sourceName:i0,targetName:t0,stream:S,streamId:q,success:!0})},function(W0){P.postMessage({sourceName:i0,targetName:t0,stream:S,streamId:q,reason:D(W0)})}),s0.sinkCapability.reject(D(v.reason)),s0.isCancelled=!0,delete this.streamSinks[q];break;default:throw new Error("Unexpected stream case")}},N=new WeakSet,X=async function(v,q){var i0,t0,P;await Promise.allSettled([(i0=v.startCall)===null||i0===void 0?void 0:i0.promise,(t0=v.pullCall)===null||t0===void 0?void 0:t0.promise,(P=v.cancelCall)===null||P===void 0?void 0:P.promise]),delete this.streamControllers[q]},y)},(s,M,o)=>{var u,z,W;Object.defineProperty(M,"__esModule",{value:!0}),M.Metadata=void 0;var O=o(1);M.Metadata=(W=class{constructor(N){et(this,u,void 0),et(this,z,void 0);let{parsedData:X,rawData:y}=N;ut(this,u,X),ut(this,z,y)}getRaw(){return T(this,z)}get(N){return T(this,u).get(N)??null}getAll(){return(0,O.objectFromMap)(T(this,u))}has(N){return T(this,u).has(N)}},u=new WeakMap,z=new WeakMap,W)},(s,M,o)=>{var u,z,W,O,N,X,y,G;Object.defineProperty(M,"__esModule",{value:!0}),M.OptionalContentConfig=void 0;var V=o(1),g=o(144);const R=Symbol("INTERNAL");class S{constructor(F,K){et(this,u,!0),this.name=F,this.intent=K}get visible(){return T(this,u)}_setVisible(F,K){F!==R&&(0,V.unreachable)("Internal method `_setVisible` called."),ut(this,u,K)}}u=new WeakMap,M.OptionalContentConfig=(G=class{constructor(C){if(et(this,X),et(this,z,null),et(this,W,new Map),et(this,O,null),et(this,N,null),this.name=null,this.creator=null,C!==null){this.name=C.name,this.creator=C.creator,ut(this,N,C.order);for(const F of C.groups)T(this,W).set(F.id,new S(F.name,F.intent));if(C.baseState==="OFF")for(const F of T(this,W).values())F._setVisible(R,!1);for(const F of C.on)T(this,W).get(F)._setVisible(R,!0);for(const F of C.off)T(this,W).get(F)._setVisible(R,!1);ut(this,O,this.getHash())}}isVisible(C){if(T(this,W).size===0)return!0;if(!C)return(0,V.warn)("Optional content group not defined."),!0;if(C.type==="OCG")return T(this,W).has(C.id)?T(this,W).get(C.id).visible:((0,V.warn)(`Optional content group not found: ${C.id}`),!0);if(C.type==="OCMD"){if(C.expression)return nt(this,X,y).call(this,C.expression);if(!C.policy||C.policy==="AnyOn"){for(const F of C.ids){if(!T(this,W).has(F))return(0,V.warn)(`Optional content group not found: ${F}`),!0;if(T(this,W).get(F).visible)return!0}return!1}if(C.policy==="AllOn"){for(const F of C.ids){if(!T(this,W).has(F))return(0,V.warn)(`Optional content group not found: ${F}`),!0;if(!T(this,W).get(F).visible)return!1}return!0}if(C.policy==="AnyOff"){for(const F of C.ids){if(!T(this,W).has(F))return(0,V.warn)(`Optional content group not found: ${F}`),!0;if(!T(this,W).get(F).visible)return!0}return!1}if(C.policy==="AllOff"){for(const F of C.ids){if(!T(this,W).has(F))return(0,V.warn)(`Optional content group not found: ${F}`),!0;if(T(this,W).get(F).visible)return!1}return!0}return(0,V.warn)(`Unknown optional content policy ${C.policy}.`),!0}return(0,V.warn)(`Unknown group type ${C.type}.`),!0}setVisibility(C){let F=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];T(this,W).has(C)?(T(this,W).get(C)._setVisible(R,!!F),ut(this,z,null)):(0,V.warn)(`Optional content group not found: ${C}`)}get hasInitialVisibility(){return this.getHash()===T(this,O)}getOrder(){return T(this,W).size?T(this,N)?T(this,N).slice():[...T(this,W).keys()]:null}getGroups(){return T(this,W).size>0?(0,V.objectFromMap)(T(this,W)):null}getGroup(C){return T(this,W).get(C)||null}getHash(){if(T(this,z)!==null)return T(this,z);const C=new g.MurmurHash3_64;for(const[F,K]of T(this,W))C.update(`${F}:${K.visible}`);return ut(this,z,C.hexdigest())}},z=new WeakMap,W=new WeakMap,O=new WeakMap,N=new WeakMap,X=new WeakSet,y=function(C){const F=C.length;if(F<2)return!0;const K=C[0];for(let j=1;j<F;j++){const U=C[j];let E;if(Array.isArray(U))E=nt(this,X,y).call(this,U);else{if(!T(this,W).has(U))return(0,V.warn)(`Optional content group not found: ${U}`),!0;E=T(this,W).get(U).visible}switch(K){case"And":if(!E)return!1;break;case"Or":if(E)return!0;break;case"Not":return!E;default:return!0}}return K==="And"},G)},(s,M,o)=>{Object.defineProperty(M,"__esModule",{value:!0}),M.PDFDataTransportStream=void 0;var u=o(1),z=o(142);M.PDFDataTransportStream=class{constructor(N,X){let{length:y,initialData:G,progressiveDone:V=!1,contentDispositionFilename:g=null,disableRange:R=!1,disableStream:S=!1}=N;if((0,u.assert)(X,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=V,this._contentDispositionFilename=g,(G==null?void 0:G.length)>0){const C=G instanceof Uint8Array&&G.byteLength===G.buffer.byteLength?G.buffer:new Uint8Array(G).buffer;this._queuedChunks.push(C)}this._pdfDataRangeTransport=X,this._isStreamingSupported=!S,this._isRangeSupported=!R,this._contentLength=y,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((C,F)=>{this._onReceiveData({begin:C,chunk:F})}),this._pdfDataRangeTransport.addProgressListener((C,F)=>{this._onProgress({loaded:C,total:F})}),this._pdfDataRangeTransport.addProgressiveReadListener(C=>{this._onReceiveData({chunk:C})}),this._pdfDataRangeTransport.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}_onReceiveData(N){let{begin:X,chunk:y}=N;const G=y instanceof Uint8Array&&y.byteLength===y.buffer.byteLength?y.buffer:new Uint8Array(y).buffer;if(X===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(G):this._queuedChunks.push(G);else{const V=this._rangeReaders.some(function(g){return g._begin!==X?!1:(g._enqueue(G),!0)});(0,u.assert)(V,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var N;return((N=this._fullRequestReader)===null||N===void 0?void 0:N._loaded)??0}_onProgress(N){if(N.total===void 0){var X,y;(X=this._rangeReaders[0])===null||X===void 0||(y=X.onProgress)===null||y===void 0||y.call(X,{loaded:N.loaded})}else{var G,V;(G=this._fullRequestReader)===null||G===void 0||(V=G.onProgress)===null||V===void 0||V.call(G,{loaded:N.loaded,total:N.total})}}_onProgressiveDone(){var N;(N=this._fullRequestReader)===null||N===void 0||N.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(N){const X=this._rangeReaders.indexOf(N);X>=0&&this._rangeReaders.splice(X,1)}getFullReader(){(0,u.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const N=this._queuedChunks;return this._queuedChunks=null,new W(this,N,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(N,X){if(X<=this._progressiveDataLength)return null;const y=new O(this,N,X);return this._pdfDataRangeTransport.requestDataRange(N,X),this._rangeReaders.push(y),y}cancelAllRequests(N){var X;(X=this._fullRequestReader)===null||X===void 0||X.cancel(N);for(const y of this._rangeReaders.slice(0))y.cancel(N);this._pdfDataRangeTransport.abort()}};class W{constructor(X,y){let G=arguments.length>2&&arguments[2]!==void 0&&arguments[2],V=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;this._stream=X,this._done=G||!1,this._filename=(0,z.isPdfFile)(V)?V:null,this._queuedChunks=y||[],this._loaded=0;for(const g of this._queuedChunks)this._loaded+=g.byteLength;this._requests=[],this._headersReady=Promise.resolve(),X._fullRequestReader=this,this.onProgress=null}_enqueue(X){this._done||(this._requests.length>0?this._requests.shift().resolve({value:X,done:!1}):this._queuedChunks.push(X),this._loaded+=X.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 X=new u.PromiseCapability;return this._requests.push(X),X.promise}cancel(X){this._done=!0;for(const y of this._requests)y.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class O{constructor(X,y,G){this._stream=X,this._begin=y,this._end=G,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(X){if(!this._done){if(this._requests.length===0)this._queuedChunk=X;else{this._requests.shift().resolve({value:X,done:!1});for(const y of this._requests)y.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 y=this._queuedChunk;return this._queuedChunk=null,{value:y,done:!1}}if(this._done)return{value:void 0,done:!0};const X=new u.PromiseCapability;return this._requests.push(X),X.promise}cancel(X){this._done=!0;for(const y of this._requests)y.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}},(s,M)=>{Object.defineProperty(M,"__esModule",{value:!0}),M.XfaText=void 0;class o{static textContent(z){const W=[],O={items:W,styles:Object.create(null)};return function N(X){var y;if(!X)return;let G=null;const V=X.name;if(V==="#text")G=X.value;else{if(!o.shouldBuildText(V))return;X!=null&&(y=X.attributes)!==null&&y!==void 0&&y.textContent?G=X.attributes.textContent:X.value&&(G=X.value)}if(G!==null&&W.push({str:G}),X.children)for(const g of X.children)N(g)}(z),O}static shouldBuildText(z){return!(z==="textarea"||z==="input"||z==="option"||z==="select")}}M.XfaText=o},(s,M,o)=>{Object.defineProperty(M,"__esModule",{value:!0}),M.NodeStandardFontDataFactory=M.NodeFilterFactory=M.NodeCanvasFactory=M.NodeCMapReaderFactory=void 0;var u=o(143);const z=function(y){return new Promise((G,V)=>{require$$6.readFile(y,(g,R)=>{!g&&R?G(new Uint8Array(R)):V(new Error(g))})})};class W extends u.BaseFilterFactory{}M.NodeFilterFactory=W;class O extends u.BaseCanvasFactory{_createCanvas(G,V){return require$$6.createCanvas(G,V)}}M.NodeCanvasFactory=O;class N extends u.BaseCMapReaderFactory{_fetchData(G,V){return z(G).then(g=>({cMapData:g,compressionType:V}))}}M.NodeCMapReaderFactory=N;class X extends u.BaseStandardFontDataFactory{_fetchData(G){return z(G)}}M.NodeStandardFontDataFactory=X},(s,M,o)=>{Object.defineProperty(M,"__esModule",{value:!0}),M.PDFNodeStream=void 0;var u=o(1),z=o(157);const W=require$$6,O=require$$6,N=require$$6,X=require$$6,y=/^file:\/\/\/[a-zA-Z]:\//;M.PDFNodeStream=class{constructor(K){this.source=K,this.url=function(j){const U=X.parse(j);return U.protocol==="file:"||U.host?U:/^[a-z]:[/\\]/i.test(j)?X.parse(`file:///${j}`):(U.host||(U.protocol="file:"),U)}(K.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.httpHeaders=this.isHttp&&K.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var K;return((K=this._fullRequestReader)===null||K===void 0?void 0:K._loaded)??0}getFullReader(){return(0,u.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new C(this):new R(this),this._fullRequestReader}getRangeReader(K,j){if(j<=this._progressiveDataLength)return null;const U=this.isFsUrl?new F(this,K,j):new S(this,K,j);return this._rangeRequestReaders.push(U),U}cancelAllRequests(K){var j;(j=this._fullRequestReader)===null||j===void 0||j.cancel(K);for(const U of this._rangeRequestReaders.slice(0))U.cancel(K)}};class G{constructor(j){this._url=j.url,this._done=!1,this._storedError=null,this.onProgress=null;const U=j.source;this._contentLength=U.length,this._loaded=0,this._filename=null,this._disableRange=U.disableRange||!1,this._rangeChunkSize=U.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!U.disableStream,this._isRangeSupported=!U.disableRange,this._readableStream=null,this._readCapability=new u.PromiseCapability,this._headersCapability=new u.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 j;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const U=this._readableStream.read();return U===null?(this._readCapability=new u.PromiseCapability,this.read()):(this._loaded+=U.length,(j=this.onProgress)===null||j===void 0||j.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(U).buffer,done:!1})}cancel(j){this._readableStream?this._readableStream.destroy(j):this._error(j)}_error(j){this._storedError=j,this._readCapability.resolve()}_setReadableStream(j){this._readableStream=j,j.on("readable",()=>{this._readCapability.resolve()}),j.on("end",()=>{j.destroy(),this._done=!0,this._readCapability.resolve()}),j.on("error",U=>{this._error(U)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new u.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class V{constructor(j){this._url=j.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=new u.PromiseCapability;const U=j.source;this._isStreamingSupported=!U.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){var j;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const U=this._readableStream.read();return U===null?(this._readCapability=new u.PromiseCapability,this.read()):(this._loaded+=U.length,(j=this.onProgress)===null||j===void 0||j.call(this,{loaded:this._loaded}),{value:new Uint8Array(U).buffer,done:!1})}cancel(j){this._readableStream?this._readableStream.destroy(j):this._error(j)}_error(j){this._storedError=j,this._readCapability.resolve()}_setReadableStream(j){this._readableStream=j,j.on("readable",()=>{this._readCapability.resolve()}),j.on("end",()=>{j.destroy(),this._done=!0,this._readCapability.resolve()}),j.on("error",U=>{this._error(U)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function g(K,j){return{protocol:K.protocol,auth:K.auth,host:K.hostname,port:K.port,path:K.path,method:"GET",headers:j}}class R extends G{constructor(j){super(j);const U=E=>{if(E.statusCode===404){const i0=new u.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=i0,this._headersCapability.reject(i0);return}this._headersCapability.resolve(),this._setReadableStream(E);const D=i0=>this._readableStream.headers[i0.toLowerCase()],{allowRangeRequests:v,suggestedLength:q}=(0,z.validateRangeRequestCapabilities)({getResponseHeader:D,isHttp:j.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=v,this._contentLength=q||this._contentLength,this._filename=(0,z.extractFilenameFromHeader)(D)};this._request=null,this._url.protocol==="http:"?this._request=O.request(g(this._url,j.httpHeaders),U):this._request=N.request(g(this._url,j.httpHeaders),U),this._request.on("error",E=>{this._storedError=E,this._headersCapability.reject(E)}),this._request.end()}}class S extends V{constructor(j,U,E){super(j),this._httpHeaders={};for(const v in j.httpHeaders){const q=j.httpHeaders[v];q!==void 0&&(this._httpHeaders[v]=q)}this._httpHeaders.Range=`bytes=${U}-${E-1}`;const D=v=>{if(v.statusCode!==404)this._setReadableStream(v);else{const q=new u.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=q}};this._request=null,this._url.protocol==="http:"?this._request=O.request(g(this._url,this._httpHeaders),D):this._request=N.request(g(this._url,this._httpHeaders),D),this._request.on("error",v=>{this._storedError=v}),this._request.end()}}class C extends G{constructor(j){super(j);let U=decodeURIComponent(this._url.path);y.test(this._url.href)&&(U=U.replace(/^\//,"")),W.lstat(U,(E,D)=>{E?(E.code==="ENOENT"&&(E=new u.MissingPDFException(`Missing PDF "${U}".`)),this._storedError=E,this._headersCapability.reject(E)):(this._contentLength=D.size,this._setReadableStream(W.createReadStream(U)),this._headersCapability.resolve())})}}class F extends V{constructor(j,U,E){super(j);let D=decodeURIComponent(this._url.path);y.test(this._url.href)&&(D=D.replace(/^\//,"")),this._setReadableStream(W.createReadStream(D,{start:U,end:E-1}))}}},(s,M,o)=>{Object.defineProperty(M,"__esModule",{value:!0}),M.createResponseStatusError=function(O,N){return O===404||O===0&&N.startsWith("file:")?new u.MissingPDFException('Missing PDF "'+N+'".'):new u.UnexpectedResponseException(`Unexpected server response (${O}) while retrieving PDF "${N}".`,O)},M.extractFilenameFromHeader=function(O){const N=O("Content-Disposition");if(N){let X=(0,z.getFilenameFromContentDispositionHeader)(N);if(X.includes("%"))try{X=decodeURIComponent(X)}catch{}if((0,W.isPdfFile)(X))return X}return null},M.validateRangeRequestCapabilities=function(O){let{getResponseHeader:N,isHttp:X,rangeChunkSize:y,disableRange:G}=O;const V={allowRangeRequests:!1,suggestedLength:void 0},g=parseInt(N("Content-Length"),10);return!Number.isInteger(g)||(V.suggestedLength=g,g<=2*y)||G||!X||N("Accept-Ranges")!=="bytes"||(N("Content-Encoding")||"identity")!=="identity"||(V.allowRangeRequests=!0),V},M.validateResponseStatus=function(O){return O===200||O===206};var u=o(1),z=o(158),W=o(142)},(s,M,o)=>{Object.defineProperty(M,"__esModule",{value:!0}),M.getFilenameFromContentDispositionHeader=function(z){let W=!0,O=N("filename\\*","i").exec(z);if(O){O=O[1];let R=G(O);return R=unescape(R),R=V(R),R=g(R),y(R)}if(O=function(R){const S=[];let C;const F=N("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(C=F.exec(R))!==null;){let[,j,U,E]=C;if(j=parseInt(j,10),j in S){if(j===0)break}else S[j]=[U,E]}const K=[];for(let j=0;j<S.length&&j in S;++j){let[U,E]=S[j];E=G(E),U&&(E=unescape(E),j===0&&(E=V(E))),K.push(E)}return K.join("")}(z),O)return y(g(O));if(O=N("filename","i").exec(z),O){O=O[1];let R=G(O);return R=g(R),y(R)}function N(R,S){return new RegExp("(?:^|;)\\s*"+R+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',S)}function X(R,S){if(R){if(!/^[\x00-\xFF]+$/.test(S))return S;try{const C=new TextDecoder(R,{fatal:!0}),F=(0,u.stringToBytes)(S);S=C.decode(F),W=!1}catch{}}return S}function y(R){return W&&/[\x80-\xff]/.test(R)&&(R=X("utf-8",R),W&&(R=X("iso-8859-1",R))),R}function G(R){if(R.startsWith('"')){const S=R.slice(1).split('\\"');for(let C=0;C<S.length;++C){const F=S[C].indexOf('"');F!==-1&&(S[C]=S[C].slice(0,F),S.length=C+1),S[C]=S[C].replaceAll(/\\(.)/g,"$1")}R=S.join('"')}return R}function V(R){const S=R.indexOf("'");return S===-1?R:X(R.slice(0,S),R.slice(S+1).replace(/^[^']*'/,""))}function g(R){return!R.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(R)?R:R.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(S,C,F,K){if(F==="q"||F==="Q")return X(C,K=(K=K.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,function(j,U){return String.fromCharCode(parseInt(U,16))}));try{K=atob(K)}catch{}return X(C,K)})}return""};var u=o(1)},(s,M,o)=>{Object.defineProperty(M,"__esModule",{value:!0}),M.PDFNetworkStream=void 0;var u=o(1),z=o(157);class W{constructor(y){let G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.url=y,this.isHttp=/^https?:/i.test(y),this.httpHeaders=this.isHttp&&G.httpHeaders||Object.create(null),this.withCredentials=G.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(y,G,V){const g={begin:y,end:G};for(const R in V)g[R]=V[R];return this.request(g)}requestFull(y){return this.request(y)}request(y){const G=new XMLHttpRequest,V=this.currXhrId++,g=this.pendingRequests[V]={xhr:G};G.open("GET",this.url),G.withCredentials=this.withCredentials;for(const R in this.httpHeaders){const S=this.httpHeaders[R];S!==void 0&&G.setRequestHeader(R,S)}return this.isHttp&&"begin"in y&&"end"in y?(G.setRequestHeader("Range",`bytes=${y.begin}-${y.end-1}`),g.expectedStatus=206):g.expectedStatus=200,G.responseType="arraybuffer",y.onError&&(G.onerror=function(R){y.onError(G.status)}),G.onreadystatechange=this.onStateChange.bind(this,V),G.onprogress=this.onProgress.bind(this,V),g.onHeadersReceived=y.onHeadersReceived,g.onDone=y.onDone,g.onError=y.onError,g.onProgress=y.onProgress,G.send(null),V}onProgress(y,G){var V;const g=this.pendingRequests[y];g&&((V=g.onProgress)===null||V===void 0||V.call(g,G))}onStateChange(y,G){const V=this.pendingRequests[y];if(!V)return;const g=V.xhr;if(g.readyState>=2&&V.onHeadersReceived&&(V.onHeadersReceived(),delete V.onHeadersReceived),g.readyState!==4||!(y in this.pendingRequests))return;if(delete this.pendingRequests[y],g.status===0&&this.isHttp){var R;(R=V.onError)===null||R===void 0||R.call(V,g.status);return}const S=g.status||200;if(!(S===200&&V.expectedStatus===206)&&S!==V.expectedStatus){var C;(C=V.onError)===null||C===void 0||C.call(V,g.status);return}const F=function(j){const U=j.response;return typeof U!="string"?U:(0,u.stringToBytes)(U).buffer}(g);if(S===206){const j=g.getResponseHeader("Content-Range"),U=/bytes (\d+)-(\d+)\/(\d+)/.exec(j);V.onDone({begin:parseInt(U[1],10),chunk:F})}else if(F)V.onDone({begin:0,chunk:F});else{var K;(K=V.onError)===null||K===void 0||K.call(V,g.status)}}getRequestXhr(y){return this.pendingRequests[y].xhr}isPendingRequest(y){return y in this.pendingRequests}abortRequest(y){const G=this.pendingRequests[y].xhr;delete this.pendingRequests[y],G.abort()}}M.PDFNetworkStream=class{constructor(X){this._source=X,this._manager=new W(X.url,{httpHeaders:X.httpHeaders,withCredentials:X.withCredentials}),this._rangeChunkSize=X.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(X){const y=this._rangeRequestReaders.indexOf(X);y>=0&&this._rangeRequestReaders.splice(y,1)}getFullReader(){return(0,u.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new O(this._manager,this._source),this._fullRequestReader}getRangeReader(X,y){const G=new N(this._manager,X,y);return G.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(G),G}cancelAllRequests(X){var y;(y=this._fullRequestReader)===null||y===void 0||y.cancel(X);for(const G of this._rangeRequestReaders.slice(0))G.cancel(X)}};class O{constructor(y,G){this._manager=y;const V={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=G.url,this._fullRequestId=y.requestFull(V),this._headersReceivedCapability=new u.PromiseCapability,this._disableRange=G.disableRange||!1,this._contentLength=G.length,this._rangeChunkSize=G.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 y=this._fullRequestId,G=this._manager.getRequestXhr(y),V=S=>G.getResponseHeader(S),{allowRangeRequests:g,suggestedLength:R}=(0,z.validateRangeRequestCapabilities)({getResponseHeader:V,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});g&&(this._isRangeSupported=!0),this._contentLength=R||this._contentLength,this._filename=(0,z.extractFilenameFromHeader)(V),this._isRangeSupported&&this._manager.abortRequest(y),this._headersReceivedCapability.resolve()}_onDone(y){if(y&&(this._requests.length>0?this._requests.shift().resolve({value:y.chunk,done:!1}):this._cachedChunks.push(y.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const G of this._requests)G.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(y){this._storedError=(0,z.createResponseStatusError)(y,this._url),this._headersReceivedCapability.reject(this._storedError);for(const G of this._requests)G.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(y){var G;(G=this.onProgress)===null||G===void 0||G.call(this,{loaded:y.loaded,total:y.lengthComputable?y.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 y=new u.PromiseCapability;return this._requests.push(y),y.promise}cancel(y){this._done=!0,this._headersReceivedCapability.reject(y);for(const G of this._requests)G.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class N{constructor(y,G,V){this._manager=y;const g={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=y.url,this._requestId=y.requestRange(G,V,g),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var y;(y=this.onClosed)===null||y===void 0||y.call(this,this)}_onDone(y){const G=y.chunk;this._requests.length>0?this._requests.shift().resolve({value:G,done:!1}):this._queuedChunk=G,this._done=!0;for(const V of this._requests)V.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(y){this._storedError=(0,z.createResponseStatusError)(y,this._url);for(const G of this._requests)G.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(y){if(!this.isStreamingSupported){var G;(G=this.onProgress)===null||G===void 0||G.call(this,{loaded:y.loaded})}}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const G=this._queuedChunk;return this._queuedChunk=null,{value:G,done:!1}}if(this._done)return{value:void 0,done:!0};const y=new u.PromiseCapability;return this._requests.push(y),y.promise}cancel(y){this._done=!0;for(const G of this._requests)G.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},(s,M,o)=>{Object.defineProperty(M,"__esModule",{value:!0}),M.PDFFetchStream=void 0;var u=o(1),z=o(157);function W(G,V,g){return{method:"GET",headers:G,signal:g.signal,mode:"cors",credentials:V?"include":"same-origin",redirect:"follow"}}function O(G){const V=new Headers;for(const g in G){const R=G[g];R!==void 0&&V.append(g,R)}return V}function N(G){return G instanceof Uint8Array?G.buffer:G instanceof ArrayBuffer?G:((0,u.warn)(`getArrayBuffer - unexpected data format: ${G}`),new Uint8Array(G).buffer)}M.PDFFetchStream=class{constructor(G){this.source=G,this.isHttp=/^https?:/i.test(G.url),this.httpHeaders=this.isHttp&&G.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var G;return((G=this._fullRequestReader)===null||G===void 0?void 0:G._loaded)??0}getFullReader(){return(0,u.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new X(this),this._fullRequestReader}getRangeReader(G,V){if(V<=this._progressiveDataLength)return null;const g=new y(this,G,V);return this._rangeRequestReaders.push(g),g}cancelAllRequests(G){var V;(V=this._fullRequestReader)===null||V===void 0||V.cancel(G);for(const g of this._rangeRequestReaders.slice(0))g.cancel(G)}};class X{constructor(V){this._stream=V,this._reader=null,this._loaded=0,this._filename=null;const g=V.source;this._withCredentials=g.withCredentials||!1,this._contentLength=g.length,this._headersCapability=new u.PromiseCapability,this._disableRange=g.disableRange||!1,this._rangeChunkSize=g.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!g.disableStream,this._isRangeSupported=!g.disableRange,this._headers=O(this._stream.httpHeaders);const R=g.url;fetch(R,W(this._headers,this._withCredentials,this._abortController)).then(S=>{if(!(0,z.validateResponseStatus)(S.status))throw(0,z.createResponseStatusError)(S.status,R);this._reader=S.body.getReader(),this._headersCapability.resolve();const C=j=>S.headers.get(j),{allowRangeRequests:F,suggestedLength:K}=(0,z.validateRangeRequestCapabilities)({getResponseHeader:C,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=F,this._contentLength=K||this._contentLength,this._filename=(0,z.extractFilenameFromHeader)(C),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new u.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 V;await this._headersCapability.promise;const{value:g,done:R}=await this._reader.read();return R?{value:g,done:R}:(this._loaded+=g.byteLength,(V=this.onProgress)===null||V===void 0||V.call(this,{loaded:this._loaded,total:this._contentLength}),{value:N(g),done:!1})}cancel(V){var g;(g=this._reader)===null||g===void 0||g.cancel(V),this._abortController.abort()}}class y{constructor(V,g,R){this._stream=V,this._reader=null,this._loaded=0;const S=V.source;this._withCredentials=S.withCredentials||!1,this._readCapability=new u.PromiseCapability,this._isStreamingSupported=!S.disableStream,this._abortController=new AbortController,this._headers=O(this._stream.httpHeaders),this._headers.append("Range",`bytes=${g}-${R-1}`);const C=S.url;fetch(C,W(this._headers,this._withCredentials,this._abortController)).then(F=>{if(!(0,z.validateResponseStatus)(F.status))throw(0,z.createResponseStatusError)(F.status,C);this._readCapability.resolve(),this._reader=F.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var V;await this._readCapability.promise;const{value:g,done:R}=await this._reader.read();return R?{value:g,done:R}:(this._loaded+=g.byteLength,(V=this.onProgress)===null||V===void 0||V.call(this,{loaded:this._loaded}),{value:N(g),done:!1})}cancel(V){var g;(g=this._reader)===null||g===void 0||g.cancel(V),this._abortController.abort()}}},(s,M,o)=>{Object.defineProperty(M,"__esModule",{value:!0}),M.TextLayerRenderTask=void 0,M.renderTextLayer=function(g){!g.textContentSource&&(g.textContent||g.textContentStream)&&((0,z.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),g.textContentSource=g.textContent||g.textContentStream);const{container:R,viewport:S}=g,C=getComputedStyle(R),F=C.getPropertyValue("visibility"),K=parseFloat(C.getPropertyValue("--scale-factor"));F==="visible"&&(!K||Math.abs(K-S.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 j=new V(g);return j._render(),j},M.updateTextLayer=function(g){let{container:R,viewport:S,textDivs:C,textDivProperties:F,isOffscreenCanvasSupported:K,mustRotate:j=!0,mustRescale:U=!0}=g;if(j&&(0,z.setLayerDimensions)(R,{rotation:S.rotation}),U){const E=X(0,K),D={prevFontSize:null,prevFontFamily:null,div:null,scale:S.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:E};for(const v of C)D.properties=F.get(v),D.div=v,G(D)}};var u=o(1),z=o(142);const W=30,O=.8,N=new Map;function X(g,R){let S;if(R&&u.FeatureTest.isOffscreenCanvasSupported)S=new OffscreenCanvas(g,g).getContext("2d",{alpha:!1});else{const C=document.createElement("canvas");C.width=C.height=g,S=C.getContext("2d",{alpha:!1})}return S}function y(g,R,S){const C=document.createElement("span"),F={angle:0,canvasWidth:0,hasText:R.str!=="",hasEOL:R.hasEOL,fontSize:0};g._textDivs.push(C);const K=u.Util.transform(g._transform,R.transform);let j=Math.atan2(K[1],K[0]);const U=S[R.fontName];U.vertical&&(j+=Math.PI/2);const E=Math.hypot(K[2],K[3]),D=E*function(c0,s0){const W0=N.get(c0);if(W0)return W0;const M0=X(W,s0);M0.font=`${W}px ${c0}`;const X0=M0.measureText("");let B=X0.fontBoundingBoxAscent,Q=Math.abs(X0.fontBoundingBoxDescent);if(B){const l0=B/(B+Q);return N.set(c0,l0),M0.canvas.width=M0.canvas.height=0,l0}M0.strokeStyle="red",M0.clearRect(0,0,W,W),M0.strokeText("g",0,0);let $=M0.getImageData(0,0,W,W).data;Q=0;for(let l0=$.length-1-3;l0>=0;l0-=4)if($[l0]>0){Q=Math.ceil(l0/4/W);break}M0.clearRect(0,0,W,W),M0.strokeText("A",0,W),$=M0.getImageData(0,0,W,W).data,B=0;for(let l0=0,_=$.length;l0<_;l0+=4)if($[l0]>0){B=W-Math.floor(l0/4/W);break}if(M0.canvas.width=M0.canvas.height=0,B){const l0=B/(B+Q);return N.set(c0,l0),l0}return N.set(c0,O),O}(U.fontFamily,g._isOffscreenCanvasSupported);let v,q;j===0?(v=K[4],q=K[5]-D):(v=K[4]+D*Math.sin(j),q=K[5]-D*Math.cos(j));const i0="calc(var(--scale-factor)*",t0=C.style;g._container===g._rootContainer?(t0.left=`${(100*v/g._pageWidth).toFixed(2)}%`,t0.top=`${(100*q/g._pageHeight).toFixed(2)}%`):(t0.left=`${i0}${v.toFixed(2)}px)`,t0.top=`${i0}${q.toFixed(2)}px)`),t0.fontSize=`${i0}${E.toFixed(2)}px)`,t0.fontFamily=U.fontFamily,F.fontSize=E,C.setAttribute("role","presentation"),C.textContent=R.str,C.dir=R.dir,g._fontInspectorEnabled&&(C.dataset.fontName=R.fontName),j!==0&&(F.angle=j*(180/Math.PI));let P=!1;if(R.str.length>1)P=!0;else if(R.str!==" "&&R.transform[0]!==R.transform[3]){const c0=Math.abs(R.transform[0]),s0=Math.abs(R.transform[3]);c0!==s0&&Math.max(c0,s0)/Math.min(c0,s0)>1.5&&(P=!0)}P&&(F.canvasWidth=U.vertical?R.height:R.width),g._textDivProperties.set(C,F),g._isReadableStream&&g._layoutText(C)}function G(g){const{div:R,scale:S,properties:C,ctx:F,prevFontSize:K,prevFontFamily:j}=g,{style:U}=R;let E="";if(C.canvasWidth!==0&&C.hasText){const{fontFamily:D}=U,{canvasWidth:v,fontSize:q}=C;(K!==q||j!==D)&&(F.font=`${q*S}px ${D}`,g.prevFontSize=q,g.prevFontFamily=D);const{width:i0}=F.measureText(R.textContent);i0>0&&(E=`scaleX(${v*S/i0})`)}C.angle!==0&&(E=`rotate(${C.angle}deg) ${E}`),E.length>0&&(U.transform=E)}class V{constructor(R){var S;let{textContentSource:C,container:F,viewport:K,textDivs:j,textDivProperties:U,textContentItemsStr:E,isOffscreenCanvasSupported:D}=R;this._textContentSource=C,this._isReadableStream=C instanceof ReadableStream,this._container=this._rootContainer=F,this._textDivs=j||[],this._textContentItemsStr=E||[],this._isOffscreenCanvasSupported=D,this._fontInspectorEnabled=!((S=globalThis.FontInspector)===null||S===void 0||!S.enabled),this._reader=null,this._textDivProperties=U||new WeakMap,this._canceled=!1,this._capability=new u.PromiseCapability,this._layoutTextParams={prevFontSize:null,prevFontFamily:null,div:null,scale:K.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:X(0,D)};const{pageWidth:v,pageHeight:q,pageX:i0,pageY:t0}=K.rawDims;this._transform=[1,0,0,-1,-i0,t0+q],this._pageWidth=v,this._pageHeight=q,(0,z.setLayerDimensions)(F,K),this._capability.promise.finally(()=>{this._layoutTextParams=null}).catch(()=>{})}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new u.AbortException("TextLayer task cancelled.")).catch(()=>{}),this._reader=null),this._capability.reject(new u.AbortException("TextLayer task cancelled."))}_processItems(R,S){for(const C of R)if(C.str!==void 0)this._textContentItemsStr.push(C.str),y(this,C,S);else if(C.type==="beginMarkedContentProps"||C.type==="beginMarkedContent"){const F=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),C.id!==null&&this._container.setAttribute("id",`${C.id}`),F.append(this._container)}else C.type==="endMarkedContent"&&(this._container=this._container.parentNode)}_layoutText(R){const S=this._layoutTextParams.properties=this._textDivProperties.get(R);if(this._layoutTextParams.div=R,G(this._layoutTextParams),S.hasText&&this._container.append(R),S.hasEOL){const C=document.createElement("br");C.setAttribute("role","presentation"),this._container.append(C)}}_render(){const R=new u.PromiseCapability;let S=Object.create(null);if(this._isReadableStream){const C=()=>{this._reader.read().then(F=>{let{value:K,done:j}=F;j?R.resolve():(Object.assign(S,K.styles),this._processItems(K.items,S),C())},R.reject)};this._reader=this._textContentSource.getReader(),C()}else{if(!this._textContentSource)throw new Error('No "textContentSource" parameter specified.');{const{items:C,styles:F}=this._textContentSource;this._processItems(C,F),R.resolve()}}R.promise.then(()=>{S=null,function(C){if(C._canceled)return;const F=C._textDivs,K=C._capability;if(F.length>1e5)K.resolve();else{if(!C._isReadableStream)for(const j of F)C._layoutText(j);K.resolve()}}(this)},this._capability.reject)}}M.TextLayerRenderTask=V},(s,M,o)=>{var u,z,W,O,N,X,y,G,V,g,R,S,C,F,K,j;Object.defineProperty(M,"__esModule",{value:!0}),M.AnnotationEditorLayer=void 0;var U=o(1),E=o(141),D=o(163),v=o(164),q=o(142);const i0=class{constructor(P){et(this,V),et(this,R),et(this,C),et(this,K),et(this,u,void 0),et(this,z,!1),et(this,W,this.pointerup.bind(this)),et(this,O,this.pointerdown.bind(this)),et(this,N,new Map),et(this,X,!1),et(this,y,!1),et(this,G,void 0),i0._initialized||(i0._initialized=!0,D.FreeTextEditor.initialize(P.l10n),v.InkEditor.initialize(P.l10n)),P.uiManager.registerEditorTypes([D.FreeTextEditor,v.InkEditor]),ut(this,G,P.uiManager),this.pageIndex=P.pageIndex,this.div=P.div,ut(this,u,P.accessibilityManager),T(this,G).addLayer(this)}get isEmpty(){return T(this,N).size===0}updateToolbar(P){T(this,G).updateToolbar(P)}updateMode(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:T(this,G).getMode();nt(this,K,j).call(this),P===U.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),T(this,G).unselectAll(),P!==U.AnnotationEditorType.NONE&&(this.div.classList.toggle("freeTextEditing",P===U.AnnotationEditorType.FREETEXT),this.div.classList.toggle("inkEditing",P===U.AnnotationEditorType.INK),this.div.hidden=!1)}addInkEditorIfNeeded(P){if(!(!P&&T(this,G).getMode()!==U.AnnotationEditorType.INK)){if(!P){for(const c0 of T(this,N).values())if(c0.isEmpty()){c0.setInBackground();return}}nt(this,C,F).call(this,{offsetX:0,offsetY:0}).setInBackground()}}setEditingState(P){T(this,G).setEditingState(P)}addCommands(P){T(this,G).addCommands(P)}enable(){this.div.style.pointerEvents="auto";for(const P of T(this,N).values())P.enableEditing()}disable(){this.div.style.pointerEvents="none";for(const P of T(this,N).values())P.disableEditing();nt(this,K,j).call(this),this.isEmpty&&(this.div.hidden=!0)}setActiveEditor(P){T(this,G).getActive()!==P&&T(this,G).setActiveEditor(P)}enableClick(){this.div.addEventListener("pointerdown",T(this,O)),this.div.addEventListener("pointerup",T(this,W))}disableClick(){this.div.removeEventListener("pointerdown",T(this,O)),this.div.removeEventListener("pointerup",T(this,W))}attach(P){T(this,N).set(P.id,P)}detach(P){var c0;T(this,N).delete(P.id),(c0=T(this,u))===null||c0===void 0||c0.removePointerInTextLayer(P.contentDiv)}remove(P){T(this,G).removeEditor(P),this.detach(P),P.div.style.display="none",setTimeout(()=>{P.div.style.display="",P.div.remove(),P.isAttachedToDOM=!1,document.activeElement===document.body&&T(this,G).focusMainContainer()},0),T(this,y)||this.addInkEditorIfNeeded(!1)}add(P){if(nt(this,V,g).call(this,P),T(this,G).addEditor(P),this.attach(P),!P.isAttachedToDOM){const c0=P.render();this.div.append(c0),P.isAttachedToDOM=!0}this.moveEditorInDOM(P),P.onceAdded(),T(this,G).addToAnnotationStorage(P)}moveEditorInDOM(P){var c0;(c0=T(this,u))===null||c0===void 0||c0.moveElementInDOM(this.div,P.div,P.contentDiv,!0)}addOrRebuild(P){P.needsToBeRebuilt()?P.rebuild():this.add(P)}addANewEditor(P){this.addCommands({cmd:()=>{this.addOrRebuild(P)},undo:()=>{P.remove()},mustExec:!0})}addUndoableEditor(P){this.addCommands({cmd:()=>{this.addOrRebuild(P)},undo:()=>{P.remove()},mustExec:!1})}getNextId(){return T(this,G).getId()}deserialize(P){switch(P.annotationType){case U.AnnotationEditorType.FREETEXT:return D.FreeTextEditor.deserialize(P,this,T(this,G));case U.AnnotationEditorType.INK:return v.InkEditor.deserialize(P,this,T(this,G))}return null}setSelected(P){T(this,G).setSelected(P)}toggleSelected(P){T(this,G).toggleSelected(P)}isSelected(P){return T(this,G).isSelected(P)}unselect(P){T(this,G).unselect(P)}pointerup(P){const{isMac:c0}=U.FeatureTest.platform;!(P.button!==0||P.ctrlKey&&c0)&&P.target===this.div&&T(this,X)&&(ut(this,X,!1),T(this,z)?nt(this,C,F).call(this,P):ut(this,z,!0))}pointerdown(P){const{isMac:c0}=U.FeatureTest.platform;if(P.button!==0||P.ctrlKey&&c0||P.target!==this.div)return;ut(this,X,!0);const s0=T(this,G).getActive();ut(this,z,!s0||s0.isEmpty())}drop(P){const c0=P.dataTransfer.getData("text/plain"),s0=T(this,G).getEditor(c0);if(!s0)return;P.preventDefault(),P.dataTransfer.dropEffect="move",nt(this,V,g).call(this,s0);const W0=this.div.getBoundingClientRect(),M0=P.clientX-W0.x,X0=P.clientY-W0.y;s0.translate(M0-s0.startX,X0-s0.startY),this.moveEditorInDOM(s0),s0.div.focus()}dragover(P){P.preventDefault()}destroy(){var P;((P=T(this,G).getActive())===null||P===void 0?void 0:P.parent)===this&&T(this,G).setActiveEditor(null);for(const s0 of T(this,N).values()){var c0;(c0=T(this,u))===null||c0===void 0||c0.removePointerInTextLayer(s0.contentDiv),s0.setParent(null),s0.isAttachedToDOM=!1,s0.div.remove()}this.div=null,T(this,N).clear(),T(this,G).removeLayer(this)}render(P){let{viewport:c0}=P;this.viewport=c0,(0,q.setLayerDimensions)(this.div,c0),(0,E.bindEvents)(this,this.div,["dragover","drop"]);for(const s0 of T(this,G).getEditors(this.pageIndex))this.add(s0);this.updateMode()}update(P){let{viewport:c0}=P;T(this,G).commitOrRemove(),this.viewport=c0,(0,q.setLayerDimensions)(this.div,{rotation:c0.rotation}),this.updateMode()}get pageDimensions(){const{pageWidth:P,pageHeight:c0}=this.viewport.rawDims;return[P,c0]}};let t0=i0;u=new WeakMap,z=new WeakMap,W=new WeakMap,O=new WeakMap,N=new WeakMap,X=new WeakMap,y=new WeakMap,G=new WeakMap,V=new WeakSet,g=function(P){var c0;P.parent!==this&&(this.attach(P),(c0=P.parent)===null||c0===void 0||c0.detach(P),P.setParent(this),P.div&&P.isAttachedToDOM&&(P.div.remove(),this.div.append(P.div)))},R=new WeakSet,S=function(P){switch(T(this,G).getMode()){case U.AnnotationEditorType.FREETEXT:return new D.FreeTextEditor(P);case U.AnnotationEditorType.INK:return new v.InkEditor(P)}return null},C=new WeakSet,F=function(P){const c0=this.getNextId(),s0=nt(this,R,S).call(this,{parent:this,id:c0,x:P.offsetX,y:P.offsetY,uiManager:T(this,G)});return s0&&this.add(s0),s0},K=new WeakSet,j=function(){ut(this,y,!0);for(const P of T(this,N).values())P.isEmpty()&&P.remove();ut(this,y,!1)},It(t0,"_initialized",!1),M.AnnotationEditorLayer=t0},(s,M,o)=>{var u,z,W,O,N,X,y,G,V,g,R,S,C,F,K,j,U;Object.defineProperty(M,"__esModule",{value:!0}),M.FreeTextEditor=void 0;var E=o(1),D=o(141),v=o(140);const q=class extends v.AnnotationEditor{constructor(t0){super({...t0,name:"freeTextEditor"}),et(this,g),et(this,S),et(this,F),et(this,j),et(this,u,this.editorDivBlur.bind(this)),et(this,z,this.editorDivFocus.bind(this)),et(this,W,this.editorDivInput.bind(this)),et(this,O,this.editorDivKeydown.bind(this)),et(this,N,void 0),et(this,X,""),et(this,y,`${this.id}-editor`),et(this,G,!1),et(this,V,void 0),ut(this,N,t0.color||q._defaultColor||v.AnnotationEditor._defaultLineColor),ut(this,V,t0.fontSize||q._defaultFontSize)}static initialize(t0){this._l10nPromise=new Map(["free_text2_default_content","editor_free_text2_aria_label"].map(c0=>[c0,t0.get(c0)]));const P=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(P.getPropertyValue("--freetext-padding"))}static updateDefaultParams(t0,P){switch(t0){case E.AnnotationEditorParamsType.FREETEXT_SIZE:q._defaultFontSize=P;break;case E.AnnotationEditorParamsType.FREETEXT_COLOR:q._defaultColor=P}}updateParams(t0,P){switch(t0){case E.AnnotationEditorParamsType.FREETEXT_SIZE:nt(this,g,R).call(this,P);break;case E.AnnotationEditorParamsType.FREETEXT_COLOR:nt(this,S,C).call(this,P)}}static get defaultPropertiesToUpdate(){return[[E.AnnotationEditorParamsType.FREETEXT_SIZE,q._defaultFontSize],[E.AnnotationEditorParamsType.FREETEXT_COLOR,q._defaultColor||v.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[E.AnnotationEditorParamsType.FREETEXT_SIZE,T(this,V)],[E.AnnotationEditorParamsType.FREETEXT_COLOR,T(this,N)]]}getInitialTranslation(){const t0=this.parentScale;return[-q._internalPadding*t0,-(q._internalPadding+T(this,V))*t0]}rebuild(){super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(E.AnnotationEditorType.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this.div.draggable=!1,this.div.removeAttribute("aria-activedescendant"),this.editorDiv.addEventListener("keydown",T(this,O)),this.editorDiv.addEventListener("focus",T(this,z)),this.editorDiv.addEventListener("blur",T(this,u)),this.editorDiv.addEventListener("input",T(this,W)))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",T(this,y)),this.div.draggable=!0,this.editorDiv.removeEventListener("keydown",T(this,O)),this.editorDiv.removeEventListener("focus",T(this,z)),this.editorDiv.removeEventListener("blur",T(this,u)),this.editorDiv.removeEventListener("input",T(this,W)),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freeTextEditing"))}focusin(t0){super.focusin(t0),t0.target!==this.editorDiv&&this.editorDiv.focus()}onceAdded(){this.width||(this.enableEditMode(),this.editorDiv.focus())}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent.setEditingState(!0),this.parent.div.classList.add("freeTextEditing"),super.remove()}commit(){this.isInEditMode()&&(super.commit(),T(this,G)||(ut(this,G,!0),this.parent.addUndoableEditor(this)),this.disableEditMode(),ut(this,X,nt(this,F,K).call(this).trimEnd()),nt(this,j,U).call(this))}shouldGetKeyboardEvents(){return this.isInEditMode()}dblclick(t0){this.enableEditMode(),this.editorDiv.focus()}keydown(t0){t0.target===this.div&&t0.key==="Enter"&&(this.enableEditMode(),this.editorDiv.focus())}editorDivKeydown(t0){q._keyboardManager.exec(this,t0)}editorDivFocus(t0){this.isEditing=!0}editorDivBlur(t0){this.isEditing=!1}editorDivInput(t0){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 t0,P;this.width&&(t0=this.x,P=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",T(this,y)),this.enableEditing(),q._l10nPromise.get("editor_free_text2_aria_label").then(s0=>{var W0;return(W0=this.editorDiv)===null||W0===void 0?void 0:W0.setAttribute("aria-label",s0)}),q._l10nPromise.get("free_text2_default_content").then(s0=>{var W0;return(W0=this.editorDiv)===null||W0===void 0?void 0:W0.setAttribute("default-content",s0)}),this.editorDiv.contentEditable=!0;const{style:c0}=this.editorDiv;if(c0.fontSize=`calc(${T(this,V)}px * var(--scale-factor))`,c0.color=T(this,N),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,D.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){const[s0,W0]=this.parentDimensions;this.setAt(t0*s0,P*W0,this.width*s0,this.height*W0);for(const M0 of T(this,X).split(`
67
67
  `)){const X0=document.createElement("div");X0.append(M0?document.createTextNode(M0):document.createElement("br")),this.editorDiv.append(X0)}this.div.draggable=!0,this.editorDiv.contentEditable=!1}else this.div.draggable=!1,this.editorDiv.contentEditable=!0;return this.div}get contentDiv(){return this.editorDiv}static deserialize(t0,P,c0){const s0=super.deserialize(t0,P,c0);return ut(s0,V,t0.fontSize),ut(s0,N,E.Util.makeHexColor(...t0.color)),ut(s0,X,t0.value),s0}serialize(){if(this.isEmpty())return null;const t0=q._internalPadding*this.parentScale,P=this.getRect(t0,t0),c0=v.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:T(this,N));return{annotationType:E.AnnotationEditorType.FREETEXT,color:c0,fontSize:T(this,V),value:T(this,X),pageIndex:this.pageIndex,rect:P,rotation:this.rotation}}};let i0=q;u=new WeakMap,z=new WeakMap,W=new WeakMap,O=new WeakMap,N=new WeakMap,X=new WeakMap,y=new WeakMap,G=new WeakMap,V=new WeakMap,g=new WeakSet,R=function(t0){const P=s0=>{this.editorDiv.style.fontSize=`calc(${s0}px * var(--scale-factor))`,this.translate(0,-(s0-T(this,V))*this.parentScale),ut(this,V,s0),nt(this,j,U).call(this)},c0=T(this,V);this.addCommands({cmd:()=>{P(t0)},undo:()=>{P(c0)},mustExec:!0,type:E.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},S=new WeakSet,C=function(t0){const P=T(this,N);this.addCommands({cmd:()=>{ut(this,N,this.editorDiv.style.color=t0)},undo:()=>{ut(this,N,this.editorDiv.style.color=P)},mustExec:!0,type:E.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},F=new WeakSet,K=function(){const t0=this.editorDiv.getElementsByTagName("div");if(t0.length===0)return this.editorDiv.innerText;const P=[];for(const c0 of t0)P.push(c0.innerText.replace(/\r\n?|\n/,""));return P.join(`
68
68
  `)},j=new WeakSet,U=function(){const[t0,P]=this.parentDimensions;let c0;if(this.isAttachedToDOM)c0=this.div.getBoundingClientRect();else{const{currentLayer:s0,div:W0}=this,M0=W0.style.display;W0.style.display="hidden",s0.div.append(this.div),c0=W0.getBoundingClientRect(),W0.remove(),W0.style.display=M0}this.width=c0.width/t0,this.height=c0.height/P},It(i0,"_freeTextDefaultContent",""),It(i0,"_l10nPromise"),It(i0,"_internalPadding",0),It(i0,"_defaultColor",null),It(i0,"_defaultFontSize",10),It(i0,"_keyboardManager",new D.KeyboardManager([[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],q.prototype.commitOrRemove]])),It(i0,"_type","freetext"),M.FreeTextEditor=i0},(s,M,o)=>{var u,z,W,O,N,X,y,G,V,g,R,S,C,F,K,j,U,E,D,v,q,i0,t0,P,c0,s0,W0,M0,X0,B,Q,$,l0,_,H,d0,p0,m0,r0,O0,h0,G0,z0,g0,f0,S0,J,e0,a0,o0,Z0,T0,I0,A0,F0,J0,K0,E0,H0,q0,a1,Y0,U0,i1,b1,U1,p1,x0,o1,Z1;Object.defineProperty(M,"__esModule",{value:!0}),M.InkEditor=void 0;var m1=o(1),t1=o(140),Ul=o(141);const w1=16,r1=class extends t1.AnnotationEditor{constructor(R0){super({...R0,name:"inkEditor"}),et(this,U),et(this,D),et(this,q),et(this,t0),et(this,c0),et(this,W0),et(this,X0),et(this,Q),et(this,l0),et(this,H),et(this,p0),et(this,r0),et(this,h0),et(this,z0),et(this,f0),et(this,J),et(this,a0),et(this,Z0),et(this,I0),et(this,K0),et(this,H0),et(this,a1),et(this,U0),et(this,b1),et(this,p1),et(this,o1),et(this,u,0),et(this,z,0),et(this,W,0),et(this,O,this.canvasContextMenu.bind(this)),et(this,N,this.canvasPointermove.bind(this)),et(this,X,this.canvasPointerleave.bind(this)),et(this,y,this.canvasPointerup.bind(this)),et(this,G,this.canvasPointerdown.bind(this)),et(this,V,new Path2D),et(this,g,!1),et(this,R,!1),et(this,S,!1),et(this,C,null),et(this,F,0),et(this,K,0),et(this,j,null),this.color=R0.color||null,this.thickness=R0.thickness||null,this.opacity=R0.opacity||null,this.paths=[],this.bezierPath2D=[],this.allRawPaths=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0}static initialize(R0){this._l10nPromise=new Map(["editor_ink_canvas_aria_label","editor_ink2_aria_label"].map(j0=>[j0,R0.get(j0)]))}static updateDefaultParams(R0,j0){switch(R0){case m1.AnnotationEditorParamsType.INK_THICKNESS:r1._defaultThickness=j0;break;case m1.AnnotationEditorParamsType.INK_COLOR:r1._defaultColor=j0;break;case m1.AnnotationEditorParamsType.INK_OPACITY:r1._defaultOpacity=j0/100}}updateParams(R0,j0){switch(R0){case m1.AnnotationEditorParamsType.INK_THICKNESS:nt(this,U,E).call(this,j0);break;case m1.AnnotationEditorParamsType.INK_COLOR:nt(this,D,v).call(this,j0);break;case m1.AnnotationEditorParamsType.INK_OPACITY:nt(this,q,i0).call(this,j0)}}static get defaultPropertiesToUpdate(){return[[m1.AnnotationEditorParamsType.INK_THICKNESS,r1._defaultThickness],[m1.AnnotationEditorParamsType.INK_COLOR,r1._defaultColor||t1.AnnotationEditor._defaultLineColor],[m1.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*r1._defaultOpacity)]]}get propertiesToUpdate(){return[[m1.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||r1._defaultThickness],[m1.AnnotationEditorParamsType.INK_COLOR,this.color||r1._defaultColor||t1.AnnotationEditor._defaultLineColor],[m1.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(this.opacity??r1._defaultOpacity))]]}rebuild(){super.rebuild(),this.div!==null&&(this.canvas||(nt(this,f0,S0).call(this),nt(this,J,e0).call(this)),this.isAttachedToDOM||(this.parent.add(this),nt(this,a0,o0).call(this)),nt(this,p1,x0).call(this))}remove(){this.canvas!==null&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,T(this,C).disconnect(),ut(this,C,null),super.remove())}setParent(R0){!this.parent&&R0?this._uiManager.removeShouldRescale(this):this.parent&&R0===null&&this._uiManager.addShouldRescale(this),super.setParent(R0)}onScaleChanging(){const[R0,j0]=this.parentDimensions,Q0=this.width*R0,e1=this.height*j0;this.setDimensions(Q0,e1)}enableEditMode(){!T(this,g)&&this.canvas!==null&&(super.enableEditMode(),this.div.draggable=!1,this.canvas.addEventListener("pointerdown",T(this,G)))}disableEditMode(){this.isInEditMode()&&this.canvas!==null&&(super.disableEditMode(),this.div.draggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",T(this,G)))}onceAdded(){this.div.draggable=!this.isEmpty()}isEmpty(){return this.paths.length===0||this.paths.length===1&&this.paths[0].length===0}commit(){T(this,g)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),ut(this,g,!0),this.div.classList.add("disabled"),nt(this,p1,x0).call(this,!0),this.parent.addInkEditorIfNeeded(!0),this.parent.moveEditorInDOM(this),this.div.focus({preventScroll:!0}))}focusin(R0){super.focusin(R0),this.enableEditMode()}canvasPointerdown(R0){R0.button===0&&this.isInEditMode()&&!T(this,g)&&(this.setInForeground(),R0.preventDefault(),R0.type!=="mouse"&&this.div.focus(),nt(this,W0,M0).call(this,R0.offsetX,R0.offsetY))}canvasContextMenu(R0){R0.preventDefault()}canvasPointermove(R0){R0.preventDefault(),nt(this,X0,B).call(this,R0.offsetX,R0.offsetY)}canvasPointerup(R0){R0.preventDefault(),nt(this,z0,g0).call(this,R0)}canvasPointerleave(R0){nt(this,z0,g0).call(this,R0)}render(){if(this.div)return this.div;let R0,j0;this.width&&(R0=this.x,j0=this.y),super.render(),r1._l10nPromise.get("editor_ink2_aria_label").then(n1=>{var O1;return(O1=this.div)===null||O1===void 0?void 0:O1.setAttribute("aria-label",n1)});const[Q0,e1,P0,_0]=nt(this,t0,P).call(this);if(this.setAt(Q0,e1,0,0),this.setDims(P0,_0),nt(this,f0,S0).call(this),this.width){const[n1,O1]=this.parentDimensions;this.setAt(R0*n1,j0*O1,this.width*n1,this.height*O1),ut(this,S,!0),nt(this,a0,o0).call(this),this.setDims(this.width*n1,this.height*O1),nt(this,h0,G0).call(this),nt(this,o1,Z1).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return nt(this,J,e0).call(this),this.div}setDimensions(R0,j0){const Q0=Math.round(R0),e1=Math.round(j0);if(T(this,F)===Q0&&T(this,K)===e1)return;ut(this,F,Q0),ut(this,K,e1),this.canvas.style.visibility="hidden",T(this,u)&&Math.abs(T(this,u)-R0/j0)>.01&&(j0=Math.ceil(R0/T(this,u)),this.setDims(R0,j0));const[P0,_0]=this.parentDimensions;this.width=R0/P0,this.height=j0/_0,T(this,g)&&nt(this,Z0,T0).call(this,R0,j0),nt(this,a0,o0).call(this),nt(this,h0,G0).call(this),this.canvas.style.visibility="visible",this.fixDims()}static deserialize(R0,j0,Q0){var e1,P0;const _0=super.deserialize(R0,j0,Q0);_0.thickness=R0.thickness,_0.color=m1.Util.makeHexColor(...R0.color),_0.opacity=R0.opacity;const[n1,O1]=_0.pageDimensions,k1=_0.width*n1,L1=_0.height*O1,C1=_0.parentScale,Y1=R0.thickness/2;ut(_0,u,k1/L1),ut(_0,g,!0),ut(_0,F,Math.round(k1)),ut(_0,K,Math.round(L1));for(const{bezier:K1}of R0.paths){const il=[];_0.paths.push(il);let el=C1*(K1[0]-Y1),tl=C1*(L1-K1[1]-Y1);for(let nl=2,Te=K1.length;nl<Te;nl+=6){const Je=C1*(K1[nl]-Y1),ve=C1*(L1-K1[nl+1]-Y1),fe=C1*(K1[nl+2]-Y1),Oc=C1*(L1-K1[nl+3]-Y1),Vt=C1*(K1[nl+4]-Y1),Rt=C1*(L1-K1[nl+5]-Y1);il.push([[el,tl],[Je,ve],[fe,Oc],[Vt,Rt]]),el=Vt,tl=Rt}const se=nt(this,F0,J0).call(this,il);_0.bezierPath2D.push(se)}const j1=nt(e1=_0,U0,i1).call(e1);return ut(_0,W,Math.max(w1,j1[2]-j1[0])),ut(_0,z,Math.max(w1,j1[3]-j1[1])),nt(P0=_0,Z0,T0).call(P0,k1,L1),_0}serialize(){if(this.isEmpty())return null;const R0=this.getRect(0,0),j0=this.rotation%180==0?R0[3]-R0[1]:R0[2]-R0[0],Q0=t1.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);return{annotationType:m1.AnnotationEditorType.INK,color:Q0,thickness:this.thickness,opacity:this.opacity,paths:nt(this,K0,E0).call(this,this.scaleFactor/this.parentScale,this.translationX,this.translationY,j0),pageIndex:this.pageIndex,rect:R0,rotation:this.rotation}}};let B1=r1;u=new WeakMap,z=new WeakMap,W=new WeakMap,O=new WeakMap,N=new WeakMap,X=new WeakMap,y=new WeakMap,G=new WeakMap,V=new WeakMap,g=new WeakMap,R=new WeakMap,S=new WeakMap,C=new WeakMap,F=new WeakMap,K=new WeakMap,j=new WeakMap,U=new WeakSet,E=function(R0){const j0=this.thickness;this.addCommands({cmd:()=>{this.thickness=R0,nt(this,p1,x0).call(this)},undo:()=>{this.thickness=j0,nt(this,p1,x0).call(this)},mustExec:!0,type:m1.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})},D=new WeakSet,v=function(R0){const j0=this.color;this.addCommands({cmd:()=>{this.color=R0,nt(this,h0,G0).call(this)},undo:()=>{this.color=j0,nt(this,h0,G0).call(this)},mustExec:!0,type:m1.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})},q=new WeakSet,i0=function(R0){R0/=100;const j0=this.opacity;this.addCommands({cmd:()=>{this.opacity=R0,nt(this,h0,G0).call(this)},undo:()=>{this.opacity=j0,nt(this,h0,G0).call(this)},mustExec:!0,type:m1.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})},t0=new WeakSet,P=function(){const{parentRotation:R0,parentDimensions:[j0,Q0]}=this;switch(R0){case 90:return[0,Q0,Q0,j0];case 180:return[j0,Q0,j0,Q0];case 270:return[j0,0,Q0,j0];default:return[0,0,j0,Q0]}},c0=new WeakSet,s0=function(){const{ctx:R0,color:j0,opacity:Q0,thickness:e1,parentScale:P0,scaleFactor:_0}=this;R0.lineWidth=e1*P0/_0,R0.lineCap="round",R0.lineJoin="round",R0.miterLimit=10,R0.strokeStyle=`${j0}${(0,Ul.opacityToHex)(Q0)}`},W0=new WeakSet,M0=function(R0,j0){this.canvas.addEventListener("contextmenu",T(this,O)),this.canvas.addEventListener("pointerleave",T(this,X)),this.canvas.addEventListener("pointermove",T(this,N)),this.canvas.addEventListener("pointerup",T(this,y)),this.canvas.removeEventListener("pointerdown",T(this,G)),this.isEditing=!0,T(this,S)||(ut(this,S,!0),nt(this,a0,o0).call(this),this.thickness||(this.thickness=r1._defaultThickness),this.color||(this.color=r1._defaultColor||t1.AnnotationEditor._defaultLineColor),this.opacity??(this.opacity=r1._defaultOpacity)),this.currentPath.push([R0,j0]),ut(this,R,!1),nt(this,c0,s0).call(this),ut(this,j,()=>{nt(this,H,d0).call(this),T(this,j)&&window.requestAnimationFrame(T(this,j))}),window.requestAnimationFrame(T(this,j))},X0=new WeakSet,B=function(R0,j0){const[Q0,e1]=this.currentPath.at(-1);if(this.currentPath.length>1&&R0===Q0&&j0===e1)return;const P0=this.currentPath;let _0=T(this,V);P0.push([R0,j0]),ut(this,R,!0),P0.length<=2?(_0.moveTo(...P0[0]),_0.lineTo(R0,j0)):(P0.length===3&&(ut(this,V,_0=new Path2D),_0.moveTo(...P0[0])),nt(this,p0,m0).call(this,_0,...P0.at(-3),...P0.at(-2),R0,j0))},Q=new WeakSet,$=function(){if(this.currentPath.length===0)return;const R0=this.currentPath.at(-1);T(this,V).lineTo(...R0)},l0=new WeakSet,_=function(R0,j0){ut(this,j,null),R0=Math.min(Math.max(R0,0),this.canvas.width),j0=Math.min(Math.max(j0,0),this.canvas.height),nt(this,X0,B).call(this,R0,j0),nt(this,Q,$).call(this);let Q0;if(this.currentPath.length!==1)Q0=nt(this,r0,O0).call(this);else{const _0=[R0,j0];Q0=[[_0,_0.slice(),_0.slice(),_0]]}const e1=T(this,V),P0=this.currentPath;this.currentPath=[],ut(this,V,new Path2D),this.addCommands({cmd:()=>{this.allRawPaths.push(P0),this.paths.push(Q0),this.bezierPath2D.push(e1),this.rebuild()},undo:()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),this.paths.length===0?this.remove():(this.canvas||(nt(this,f0,S0).call(this),nt(this,J,e0).call(this)),nt(this,p1,x0).call(this))},mustExec:!0})},H=new WeakSet,d0=function(){if(!T(this,R))return;ut(this,R,!1),Math.ceil(this.thickness*this.parentScale);const R0=this.currentPath.slice(-3),j0=R0.map(P0=>P0[0]),Q0=R0.map(P0=>P0[1]),{ctx:e1}=(Math.min(...j0),Math.max(...j0),Math.min(...Q0),Math.max(...Q0),this);e1.save(),e1.clearRect(0,0,this.canvas.width,this.canvas.height);for(const P0 of this.bezierPath2D)e1.stroke(P0);e1.stroke(T(this,V)),e1.restore()},p0=new WeakSet,m0=function(R0,j0,Q0,e1,P0,_0,n1){const O1=(j0+e1)/2,k1=(Q0+P0)/2,L1=(e1+_0)/2,C1=(P0+n1)/2;R0.bezierCurveTo(O1+2*(e1-O1)/3,k1+2*(P0-k1)/3,L1+2*(e1-L1)/3,C1+2*(P0-C1)/3,L1,C1)},r0=new WeakSet,O0=function(){const R0=this.currentPath;if(R0.length<=2)return[[R0[0],R0[0],R0.at(-1),R0.at(-1)]];const j0=[];let Q0,[e1,P0]=R0[0];for(Q0=1;Q0<R0.length-2;Q0++){const[Y1,j1]=R0[Q0],[K1,il]=R0[Q0+1],el=(Y1+K1)/2,tl=(j1+il)/2,se=[e1+2*(Y1-e1)/3,P0+2*(j1-P0)/3],nl=[el+2*(Y1-el)/3,tl+2*(j1-tl)/3];j0.push([[e1,P0],se,nl,[el,tl]]),[e1,P0]=[el,tl]}const[_0,n1]=R0[Q0],[O1,k1]=R0[Q0+1],L1=[e1+2*(_0-e1)/3,P0+2*(n1-P0)/3],C1=[O1+2*(_0-O1)/3,k1+2*(n1-k1)/3];return j0.push([[e1,P0],L1,C1,[O1,k1]]),j0},h0=new WeakSet,G0=function(){if(this.isEmpty()){nt(this,I0,A0).call(this);return}nt(this,c0,s0).call(this);const{canvas:R0,ctx:j0}=this;j0.setTransform(1,0,0,1,0,0),j0.clearRect(0,0,R0.width,R0.height),nt(this,I0,A0).call(this);for(const Q0 of this.bezierPath2D)j0.stroke(Q0)},z0=new WeakSet,g0=function(R0){this.canvas.removeEventListener("pointerleave",T(this,X)),this.canvas.removeEventListener("pointermove",T(this,N)),this.canvas.removeEventListener("pointerup",T(this,y)),this.canvas.addEventListener("pointerdown",T(this,G)),setTimeout(()=>{this.canvas.removeEventListener("contextmenu",T(this,O))},10),nt(this,l0,_).call(this,R0.offsetX,R0.offsetY),this.addToAnnotationStorage(),this.setInBackground()},f0=new WeakSet,S0=function(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",r1._l10nPromise.get("editor_ink_canvas_aria_label").then(R0=>{var j0;return(j0=this.canvas)===null||j0===void 0?void 0:j0.setAttribute("aria-label",R0)}),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")},J=new WeakSet,e0=function(){ut(this,C,new ResizeObserver(R0=>{const j0=R0[0].contentRect;j0.width&&j0.height&&this.setDimensions(j0.width,j0.height)})),T(this,C).observe(this.div)},a0=new WeakSet,o0=function(){if(!T(this,S))return;const[R0,j0]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*R0),this.canvas.height=Math.ceil(this.height*j0),nt(this,I0,A0).call(this)},Z0=new WeakSet,T0=function(R0,j0){const Q0=nt(this,b1,U1).call(this),e1=(R0-Q0)/T(this,W),P0=(j0-Q0)/T(this,z);this.scaleFactor=Math.min(e1,P0)},I0=new WeakSet,A0=function(){const R0=nt(this,b1,U1).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+R0,this.translationY*this.scaleFactor+R0)},F0=new WeakSet,J0=function(R0){const j0=new Path2D;for(let Q0=0,e1=R0.length;Q0<e1;Q0++){const[P0,_0,n1,O1]=R0[Q0];Q0===0&&j0.moveTo(...P0),j0.bezierCurveTo(_0[0],_0[1],n1[0],n1[1],O1[0],O1[1])}return j0},K0=new WeakSet,E0=function(R0,j0,Q0,e1){const P0=[],_0=this.thickness/2;let n1,O1;for(const k1 of this.paths){n1=[],O1=[];for(let L1=0,C1=k1.length;L1<C1;L1++){const[Y1,j1,K1,il]=k1[L1],el=R0*(Y1[0]+j0)+_0,tl=e1-R0*(Y1[1]+Q0)-_0,se=R0*(j1[0]+j0)+_0,nl=e1-R0*(j1[1]+Q0)-_0,Te=R0*(K1[0]+j0)+_0,Je=e1-R0*(K1[1]+Q0)-_0,ve=R0*(il[0]+j0)+_0,fe=e1-R0*(il[1]+Q0)-_0;L1===0&&(n1.push(el,tl),O1.push(el,tl)),n1.push(se,nl,Te,Je,ve,fe),nt(this,H0,q0).call(this,el,tl,se,nl,Te,Je,ve,fe,4,O1)}P0.push({bezier:n1,points:O1})}return P0},H0=new WeakSet,q0=function(R0,j0,Q0,e1,P0,_0,n1,O1,k1,L1){if(nt(this,a1,Y0).call(this,R0,j0,Q0,e1,P0,_0,n1,O1))L1.push(n1,O1);else{for(let C1=1;C1<k1-1;C1++){const Y1=C1/k1,j1=1-Y1;let K1=Y1*R0+j1*Q0,il=Y1*j0+j1*e1,el=Y1*Q0+j1*P0,tl=Y1*e1+j1*_0;K1=Y1*K1+j1*el,il=Y1*il+j1*tl,el=Y1*el+j1*(Y1*P0+j1*n1),tl=Y1*tl+j1*(Y1*_0+j1*O1),K1=Y1*K1+j1*el,il=Y1*il+j1*tl,L1.push(K1,il)}L1.push(n1,O1)}},a1=new WeakSet,Y0=function(R0,j0,Q0,e1,P0,_0,n1,O1){const k1=(3*Q0-2*R0-n1)**2,L1=(3*e1-2*j0-O1)**2,C1=(3*P0-R0-2*n1)**2,Y1=(3*_0-j0-2*O1)**2;return Math.max(k1,C1)+Math.max(L1,Y1)<=10},U0=new WeakSet,i1=function(){let R0=1/0,j0=-1/0,Q0=1/0,e1=-1/0;for(const P0 of this.paths)for(const[_0,n1,O1,k1]of P0){const L1=m1.Util.bezierBoundingBox(..._0,...n1,...O1,...k1);R0=Math.min(R0,L1[0]),Q0=Math.min(Q0,L1[1]),j0=Math.max(j0,L1[2]),e1=Math.max(e1,L1[3])}return[R0,Q0,j0,e1]},b1=new WeakSet,U1=function(){return T(this,g)?Math.ceil(this.thickness*this.parentScale):0},p1=new WeakSet,x0=function(){let R0=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(this.isEmpty())return;if(!T(this,g)){nt(this,h0,G0).call(this);return}const j0=nt(this,U0,i1).call(this),Q0=nt(this,b1,U1).call(this);ut(this,W,Math.max(w1,j0[2]-j0[0])),ut(this,z,Math.max(w1,j0[3]-j0[1]));const e1=Math.ceil(Q0+T(this,W)*this.scaleFactor),P0=Math.ceil(Q0+T(this,z)*this.scaleFactor),[_0,n1]=this.parentDimensions;this.width=e1/_0,this.height=P0/n1,ut(this,u,e1/P0),nt(this,o1,Z1).call(this);const O1=this.translationX,k1=this.translationY;this.translationX=-j0[0],this.translationY=-j0[1],nt(this,a0,o0).call(this),nt(this,h0,G0).call(this),ut(this,F,e1),ut(this,K,P0),this.setDims(e1,P0);const L1=R0?Q0/this.scaleFactor/2:0;this.translate(O1-this.translationX-L1,k1-this.translationY-L1)},o1=new WeakSet,Z1=function(){const{style:R0}=this.div;T(this,u)>=1?(R0.minHeight="16px",R0.minWidth=`${Math.round(T(this,u)*w1)}px`):(R0.minWidth="16px",R0.minHeight=`${Math.round(w1/T(this,u))}px`)},et(B1,F0),It(B1,"_defaultColor",null),It(B1,"_defaultOpacity",1),It(B1,"_defaultThickness",1),It(B1,"_l10nPromise"),It(B1,"_type","ink"),M.InkEditor=B1},(s,M,o)=>{var u,z,W,O,N,X,y,G;Object.defineProperty(M,"__esModule",{value:!0}),M.AnnotationLayer=void 0;var V=o(1),g=o(142),R=o(139),S=o(166),C=o(167);const F=1e3,K=new WeakSet;function j(S0){return{width:S0[2]-S0[0],height:S0[3]-S0[1]}}class U{static create(J){switch(J.data.annotationType){case V.AnnotationType.LINK:return new D(J);case V.AnnotationType.TEXT:return new v(J);case V.AnnotationType.WIDGET:switch(J.data.fieldType){case"Tx":return new i0(J);case"Btn":return J.data.radioButton?new P(J):J.data.checkBox?new t0(J):new c0(J);case"Ch":return new s0(J)}return new q(J);case V.AnnotationType.POPUP:return new M0(J);case V.AnnotationType.FREETEXT:return new B(J);case V.AnnotationType.LINE:return new Q(J);case V.AnnotationType.SQUARE:return new $(J);case V.AnnotationType.CIRCLE:return new l0(J);case V.AnnotationType.POLYLINE:return new _(J);case V.AnnotationType.CARET:return new d0(J);case V.AnnotationType.INK:return new p0(J);case V.AnnotationType.POLYGON:return new H(J);case V.AnnotationType.HIGHLIGHT:return new m0(J);case V.AnnotationType.UNDERLINE:return new r0(J);case V.AnnotationType.SQUIGGLY:return new O0(J);case V.AnnotationType.STRIKEOUT:return new h0(J);case V.AnnotationType.STAMP:return new G0(J);case V.AnnotationType.FILEATTACHMENT:return new z0(J);default:return new E(J)}}}class E{constructor(J){let{isRenderable:e0=!1,ignoreBorder:a0=!1,createQuadrilaterals:o0=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.isRenderable=e0,this.data=J.data,this.layer=J.layer,this.page=J.page,this.viewport=J.viewport,this.linkService=J.linkService,this.downloadManager=J.downloadManager,this.imageResourcesPath=J.imageResourcesPath,this.renderForms=J.renderForms,this.svgFactory=J.svgFactory,this.annotationStorage=J.annotationStorage,this.enableScripting=J.enableScripting,this.hasJSActions=J.hasJSActions,this._fieldObjects=J.fieldObjects,e0&&(this.container=this._createContainer(a0)),o0&&(this.quadrilaterals=this._createQuadrilaterals(a0))}_createContainer(){let J=arguments.length>0&&arguments[0]!==void 0&&arguments[0];const{data:e0,page:a0,viewport:o0}=this,Z0=document.createElement("section");Z0.setAttribute("data-annotation-id",e0.id),e0.noRotate&&Z0.classList.add("norotate");const{pageWidth:T0,pageHeight:I0,pageX:A0,pageY:F0}=o0.rawDims,{width:J0,height:K0}=j(e0.rect),E0=V.Util.normalizeRect([e0.rect[0],a0.view[3]-e0.rect[1]+a0.view[1],e0.rect[2],a0.view[3]-e0.rect[3]+a0.view[1]]);if(!J&&e0.borderStyle.width>0){Z0.style.borderWidth=`${e0.borderStyle.width}px`;const q0=e0.borderStyle.horizontalCornerRadius,a1=e0.borderStyle.verticalCornerRadius;if(q0>0||a1>0){const U0=`calc(${q0}px * var(--scale-factor)) / calc(${a1}px * var(--scale-factor))`;Z0.style.borderRadius=U0}else if(this instanceof P){const U0=`calc(${J0}px * var(--scale-factor)) / calc(${K0}px * var(--scale-factor))`;Z0.style.borderRadius=U0}switch(e0.borderStyle.style){case V.AnnotationBorderStyleType.SOLID:Z0.style.borderStyle="solid";break;case V.AnnotationBorderStyleType.DASHED:Z0.style.borderStyle="dashed";break;case V.AnnotationBorderStyleType.BEVELED:(0,V.warn)("Unimplemented border style: beveled");break;case V.AnnotationBorderStyleType.INSET:(0,V.warn)("Unimplemented border style: inset");break;case V.AnnotationBorderStyleType.UNDERLINE:Z0.style.borderBottomStyle="solid"}const Y0=e0.borderColor||null;Y0?Z0.style.borderColor=V.Util.makeHexColor(0|Y0[0],0|Y0[1],0|Y0[2]):Z0.style.borderWidth=0}Z0.style.left=100*(E0[0]-A0)/T0+"%",Z0.style.top=100*(E0[1]-F0)/I0+"%";const{rotation:H0}=e0;return e0.hasOwnCanvas||H0===0?(Z0.style.width=100*J0/T0+"%",Z0.style.height=100*K0/I0+"%"):this.setRotation(H0,Z0),Z0}setRotation(J){let e0=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.container;const{pageWidth:a0,pageHeight:o0}=this.viewport.rawDims,{width:Z0,height:T0}=j(this.data.rect);let I0,A0;J%180==0?(I0=100*Z0/a0,A0=100*T0/o0):(I0=100*T0/a0,A0=100*Z0/o0),e0.style.width=`${I0}%`,e0.style.height=`${A0}%`,e0.setAttribute("data-main-rotation",(360-J)%360)}get _commonActions(){const J=(e0,a0,o0)=>{const Z0=o0.detail[e0];o0.target.style[a0]=S.ColorConverters[`${Z0[0]}_HTML`](Z0.slice(1))};return(0,V.shadow)(this,"_commonActions",{display:e0=>{const a0=e0.detail.display%2==1;this.container.style.visibility=a0?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:a0,print:e0.detail.display===0||e0.detail.display===3})},print:e0=>{this.annotationStorage.setValue(this.data.id,{print:e0.detail.print})},hidden:e0=>{this.container.style.visibility=e0.detail.hidden?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:e0.detail.hidden})},focus:e0=>{setTimeout(()=>e0.target.focus({preventScroll:!1}),0)},userName:e0=>{e0.target.title=e0.detail.userName},readonly:e0=>{e0.detail.readonly?e0.target.setAttribute("readonly",""):e0.target.removeAttribute("readonly")},required:e0=>{this._setRequired(e0.target,e0.detail.required)},bgColor:e0=>{J("bgColor","backgroundColor",e0)},fillColor:e0=>{J("fillColor","backgroundColor",e0)},fgColor:e0=>{J("fgColor","color",e0)},textColor:e0=>{J("textColor","color",e0)},borderColor:e0=>{J("borderColor","borderColor",e0)},strokeColor:e0=>{J("strokeColor","borderColor",e0)},rotation:e0=>{const a0=e0.detail.rotation;this.setRotation(a0),this.annotationStorage.setValue(this.data.id,{rotation:a0})}})}_dispatchEventFromSandbox(J,e0){const a0=this._commonActions;for(const o0 of Object.keys(e0.detail)){const Z0=J[o0]||a0[o0];Z0==null||Z0(e0)}}_setDefaultPropertiesFromJS(J){if(!this.enableScripting)return;const e0=this.annotationStorage.getRawValue(this.data.id);if(!e0)return;const a0=this._commonActions;for(const[o0,Z0]of Object.entries(e0)){const T0=a0[o0];T0&&(T0({detail:{[o0]:Z0},target:J}),delete e0[o0])}}_createQuadrilaterals(){let J=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(!this.data.quadPoints)return null;const e0=[],a0=this.data.rect;for(const o0 of this.data.quadPoints)this.data.rect=[o0[2].x,o0[2].y,o0[1].x,o0[1].y],e0.push(this._createContainer(J));return this.data.rect=a0,e0}_createPopup(J,e0){let a0=this.container;this.quadrilaterals&&(J||(J=this.quadrilaterals),a0=this.quadrilaterals[0]),J||((J=document.createElement("div")).classList.add("popupTriggerArea"),a0.append(J));const o0=new X0({container:a0,trigger:J,color:e0.color,titleObj:e0.titleObj,modificationDate:e0.modificationDate,contentsObj:e0.contentsObj,richText:e0.richText,hideWrapper:!0}).render();o0.style.left="100%",a0.append(o0)}_renderQuadrilaterals(J){for(const e0 of this.quadrilaterals)e0.classList.add(J);return this.quadrilaterals}render(){(0,V.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(J){let e0=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const a0=[];if(this._fieldObjects){const o0=this._fieldObjects[J];if(o0)for(const{page:Z0,id:T0,exportValues:I0}of o0){if(Z0===-1||T0===e0)continue;const A0=typeof I0=="string"?I0:null,F0=document.querySelector(`[data-element-id="${T0}"]`);!F0||K.has(F0)?a0.push({id:T0,exportValue:A0,domElement:F0}):(0,V.warn)(`_getElementsByName - element not allowed: ${T0}`)}return a0}for(const o0 of document.getElementsByName(J)){const{exportValue:Z0}=o0,T0=o0.getAttribute("data-element-id");T0!==e0&&K.has(o0)&&a0.push({id:T0,exportValue:Z0,domElement:o0})}return a0}}class D extends E{constructor(J){let e0=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;super(J,{isRenderable:!0,ignoreBorder:!(e0==null||!e0.ignoreBorder),createQuadrilaterals:!0}),et(this,u),et(this,W),this.isTooltipOnly=J.data.isTooltipOnly}render(){const{data:J,linkService:e0}=this,a0=document.createElement("a");a0.setAttribute("data-element-id",J.id);let o0=!1;return J.url?(e0.addLinkAttributes(a0,J.url,J.newWindow),o0=!0):J.action?(this._bindNamedAction(a0,J.action),o0=!0):J.attachment?(this._bindAttachment(a0,J.attachment),o0=!0):J.setOCGState?(nt(this,W,O).call(this,a0,J.setOCGState),o0=!0):J.dest?(this._bindLink(a0,J.dest),o0=!0):(J.actions&&(J.actions.Action||J.actions["Mouse Up"]||J.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(a0,J),o0=!0),J.resetForm?(this._bindResetFormAction(a0,J.resetForm),o0=!0):this.isTooltipOnly&&!o0&&(this._bindLink(a0,""),o0=!0)),this.quadrilaterals?this._renderQuadrilaterals("linkAnnotation").map((Z0,T0)=>{const I0=T0===0?a0:a0.cloneNode();return Z0.append(I0),Z0}):(this.container.classList.add("linkAnnotation"),o0&&this.container.append(a0),this.container)}_bindLink(J,e0){J.href=this.linkService.getDestinationHash(e0),J.onclick=()=>(e0&&this.linkService.goToDestination(e0),!1),(e0||e0==="")&&nt(this,u,z).call(this)}_bindNamedAction(J,e0){J.href=this.linkService.getAnchorUrl(""),J.onclick=()=>(this.linkService.executeNamedAction(e0),!1),nt(this,u,z).call(this)}_bindAttachment(J,e0){J.href=this.linkService.getAnchorUrl(""),J.onclick=()=>{var a0;return(a0=this.downloadManager)===null||a0===void 0||a0.openOrDownloadData(this.container,e0.content,e0.filename),!1},nt(this,u,z).call(this)}_bindJSAction(J,e0){J.href=this.linkService.getAnchorUrl("");const a0=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const o0 of Object.keys(e0.actions)){const Z0=a0.get(o0);Z0&&(J[Z0]=()=>{var T0;return(T0=this.linkService.eventBus)===null||T0===void 0||T0.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e0.id,name:o0}}),!1})}J.onclick||(J.onclick=()=>!1),nt(this,u,z).call(this)}_bindResetFormAction(J,e0){const a0=J.onclick;a0||(J.href=this.linkService.getAnchorUrl("")),nt(this,u,z).call(this),this._fieldObjects?J.onclick=()=>{a0==null||a0();const{fields:o0,refs:Z0,include:T0}=e0,I0=[];if(o0.length!==0||Z0.length!==0){const K0=new Set(Z0);for(const E0 of o0){const H0=this._fieldObjects[E0]||[];for(const{id:q0}of H0)K0.add(q0)}for(const E0 of Object.values(this._fieldObjects))for(const H0 of E0)K0.has(H0.id)===T0&&I0.push(H0)}else for(const K0 of Object.values(this._fieldObjects))I0.push(...K0);const A0=this.annotationStorage,F0=[];for(const K0 of I0){const{id:E0}=K0;switch(F0.push(E0),K0.type){case"text":{const q0=K0.defaultValue||"";A0.setValue(E0,{value:q0});break}case"checkbox":case"radiobutton":{const q0=K0.defaultValue===K0.exportValues;A0.setValue(E0,{value:q0});break}case"combobox":case"listbox":{const q0=K0.defaultValue||"";A0.setValue(E0,{value:q0});break}default:continue}const H0=document.querySelector(`[data-element-id="${E0}"]`);H0&&(K.has(H0)?H0.dispatchEvent(new Event("resetform")):(0,V.warn)(`_bindResetFormAction - element not allowed: ${E0}`))}if(this.enableScripting){var J0;(J0=this.linkService.eventBus)===null||J0===void 0||J0.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:F0,name:"ResetForm"}})}return!1}:((0,V.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),a0||(J.onclick=()=>!1))}}u=new WeakSet,z=function(){this.container.setAttribute("data-internal-link","")},W=new WeakSet,O=function(S0,J){S0.href=this.linkService.getAnchorUrl(""),S0.onclick=()=>(this.linkService.executeSetOCGState(J),!1),nt(this,u,z).call(this)};class v extends E{constructor(J){var e0,a0,o0;super(J,{isRenderable:!!(J.data.hasPopup||(e0=J.data.titleObj)!==null&&e0!==void 0&&e0.str||(a0=J.data.contentsObj)!==null&&a0!==void 0&&a0.str||(o0=J.data.richText)!==null&&o0!==void 0&&o0.str)})}render(){this.container.classList.add("textAnnotation");const J=document.createElement("img");return J.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",J.alt="[{{type}} Annotation]",J.dataset.l10nId="text_annotation_type",J.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(J,this.data),this.container.append(J),this.container}}class q extends E{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}showElementAndHideCanvas(J){if(this.data.hasOwnCanvas){var e0;((e0=J.previousSibling)===null||e0===void 0?void 0:e0.nodeName)==="CANVAS"&&(J.previousSibling.hidden=!0),J.hidden=!1}}_getKeyModifier(J){const{isWin:e0,isMac:a0}=V.FeatureTest.platform;return e0&&J.ctrlKey||a0&&J.metaKey}_setEventListener(J,e0,a0,o0){e0.includes("mouse")?J.addEventListener(e0,Z0=>{var T0;(T0=this.linkService.eventBus)===null||T0===void 0||T0.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:a0,value:o0(Z0),shift:Z0.shiftKey,modifier:this._getKeyModifier(Z0)}})}):J.addEventListener(e0,Z0=>{var T0;(T0=this.linkService.eventBus)===null||T0===void 0||T0.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:a0,value:o0(Z0)}})})}_setEventListeners(J,e0,a0){for(const[Z0,T0]of e0){var o0;(T0==="Action"||(o0=this.data.actions)!==null&&o0!==void 0&&o0[T0])&&this._setEventListener(J,Z0,T0,a0)}}_setBackgroundColor(J){const e0=this.data.backgroundColor||null;J.style.backgroundColor=e0===null?"transparent":V.Util.makeHexColor(e0[0],e0[1],e0[2])}_setTextStyle(J){const e0=["left","center","right"],{fontColor:a0}=this.data.defaultAppearanceData,o0=this.data.defaultAppearanceData.fontSize||9,Z0=J.style;let T0;const I0=A0=>Math.round(10*A0)/10;if(this.data.multiLine){const A0=Math.abs(this.data.rect[3]-this.data.rect[1]-2),F0=A0/(Math.round(A0/(V.LINE_FACTOR*o0))||1);T0=Math.min(o0,I0(F0/V.LINE_FACTOR))}else{const A0=Math.abs(this.data.rect[3]-this.data.rect[1]-2);T0=Math.min(o0,I0(A0/V.LINE_FACTOR))}Z0.fontSize=`calc(${T0}px * var(--scale-factor))`,Z0.color=V.Util.makeHexColor(a0[0],a0[1],a0[2]),this.data.textAlignment!==null&&(Z0.textAlign=e0[this.data.textAlignment])}_setRequired(J,e0){e0?J.setAttribute("required",!0):J.removeAttribute("required"),J.setAttribute("aria-required",e0)}}class i0 extends q{constructor(J){super(J,{isRenderable:J.renderForms||!J.data.hasAppearance&&!!J.data.fieldValue})}setPropertyOnSiblings(J,e0,a0,o0){const Z0=this.annotationStorage;for(const T0 of this._getElementsByName(J.name,J.id))T0.domElement&&(T0.domElement[e0]=a0),Z0.setValue(T0.id,{[o0]:a0})}render(){const J=this.annotationStorage,e0=this.data.id;this.container.classList.add("textWidgetAnnotation");let a0=null;if(this.renderForms){var o0;const T0=J.getValue(e0,{value:this.data.fieldValue});let I0=T0.value||"";const A0=J.getValue(e0,{charLimit:this.data.maxLen}).charLimit;A0&&I0.length>A0&&(I0=I0.slice(0,A0));let F0=T0.formattedValue||((o0=this.data.textContent)===null||o0===void 0?void 0:o0.join(`
69
69
  `))||null;F0&&this.data.comb&&(F0=F0.replaceAll(/\s+/g,""));const J0={userValue:I0,formattedValue:F0,lastCommittedValue:null,commitKey:1};this.data.multiLine?(a0=document.createElement("textarea"),a0.textContent=F0??I0,this.data.doNotScroll&&(a0.style.overflowY="hidden")):(a0=document.createElement("input"),a0.type="text",a0.setAttribute("value",F0??I0),this.data.doNotScroll&&(a0.style.overflowX="hidden")),this.data.hasOwnCanvas&&(a0.hidden=!0),K.add(a0),a0.setAttribute("data-element-id",e0),a0.disabled=this.data.readOnly,a0.name=this.data.fieldName,a0.tabIndex=F,this._setRequired(a0,this.data.required),A0&&(a0.maxLength=A0),a0.addEventListener("input",E0=>{J.setValue(e0,{value:E0.target.value}),this.setPropertyOnSiblings(a0,"value",E0.target.value,"value"),J0.formattedValue=null}),a0.addEventListener("resetform",E0=>{const H0=this.data.defaultFieldValue??"";a0.value=J0.userValue=H0,J0.formattedValue=null});let K0=E0=>{const{formattedValue:H0}=J0;H0!=null&&(E0.target.value=H0),E0.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){var Z0;a0.addEventListener("focus",H0=>{const{target:q0}=H0;J0.userValue&&(q0.value=J0.userValue),J0.lastCommittedValue=q0.value,J0.commitKey=1}),a0.addEventListener("updatefromsandbox",H0=>{this.showElementAndHideCanvas(H0.target);const q0={value(a1){J0.userValue=a1.detail.value??"",J.setValue(e0,{value:J0.userValue.toString()}),a1.target.value=J0.userValue},formattedValue(a1){const{formattedValue:Y0}=a1.detail;J0.formattedValue=Y0,Y0!=null&&a1.target!==document.activeElement&&(a1.target.value=Y0),J.setValue(e0,{formattedValue:Y0})},selRange(a1){a1.target.setSelectionRange(...a1.detail.selRange)},charLimit:a1=>{var Y0;const{charLimit:U0}=a1.detail,{target:i1}=a1;if(U0===0){i1.removeAttribute("maxLength");return}i1.setAttribute("maxLength",U0);let b1=J0.userValue;b1&&!(b1.length<=U0)&&(b1=b1.slice(0,U0),i1.value=J0.userValue=b1,J.setValue(e0,{value:b1}),(Y0=this.linkService.eventBus)===null||Y0===void 0||Y0.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e0,name:"Keystroke",value:b1,willCommit:!0,commitKey:1,selStart:i1.selectionStart,selEnd:i1.selectionEnd}}))}};this._dispatchEventFromSandbox(q0,H0)}),a0.addEventListener("keydown",H0=>{var q0;J0.commitKey=1;let a1=-1;if(H0.key==="Escape"?a1=0:H0.key!=="Enter"||this.data.multiLine?H0.key==="Tab"&&(J0.commitKey=3):a1=2,a1===-1)return;const{value:Y0}=H0.target;J0.lastCommittedValue!==Y0&&(J0.lastCommittedValue=Y0,J0.userValue=Y0,(q0=this.linkService.eventBus)===null||q0===void 0||q0.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e0,name:"Keystroke",value:Y0,willCommit:!0,commitKey:a1,selStart:H0.target.selectionStart,selEnd:H0.target.selectionEnd}}))});const E0=K0;K0=null,a0.addEventListener("blur",H0=>{if(!H0.relatedTarget)return;const{value:q0}=H0.target;if(J0.userValue=q0,J0.lastCommittedValue!==q0){var a1;(a1=this.linkService.eventBus)===null||a1===void 0||a1.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e0,name:"Keystroke",value:q0,willCommit:!0,commitKey:J0.commitKey,selStart:H0.target.selectionStart,selEnd:H0.target.selectionEnd}})}E0(H0)}),(Z0=this.data.actions)!==null&&Z0!==void 0&&Z0.Keystroke&&a0.addEventListener("beforeinput",H0=>{var q0;J0.lastCommittedValue=null;const{data:a1,target:Y0}=H0,{value:U0,selectionStart:i1,selectionEnd:b1}=Y0;let U1=i1,p1=b1;switch(H0.inputType){case"deleteWordBackward":{const x0=U0.substring(0,i1).match(/\w*[^\w]*$/);x0&&(U1-=x0[0].length);break}case"deleteWordForward":{const x0=U0.substring(i1).match(/^[^\w]*\w*/);x0&&(p1+=x0[0].length);break}case"deleteContentBackward":i1===b1&&(U1-=1);break;case"deleteContentForward":i1===b1&&(p1+=1)}H0.preventDefault(),(q0=this.linkService.eventBus)===null||q0===void 0||q0.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e0,name:"Keystroke",value:U0,change:a1||"",willCommit:!1,selStart:U1,selEnd:p1}})}),this._setEventListeners(a0,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],H0=>H0.target.value)}if(K0&&a0.addEventListener("blur",K0),this.data.comb){const E0=(this.data.rect[2]-this.data.rect[0])/A0;a0.classList.add("comb"),a0.style.letterSpacing=`calc(${E0}px * var(--scale-factor) - 1ch)`}}else a0=document.createElement("div"),a0.textContent=this.data.fieldValue,a0.style.verticalAlign="middle",a0.style.display="table-cell";return this._setTextStyle(a0),this._setBackgroundColor(a0),this._setDefaultPropertiesFromJS(a0),this.container.append(a0),this.container}}class t0 extends q{constructor(J){super(J,{isRenderable:J.renderForms})}render(){const J=this.annotationStorage,e0=this.data,a0=e0.id;let o0=J.getValue(a0,{value:e0.exportValue===e0.fieldValue}).value;typeof o0=="string"&&(o0=o0!=="Off",J.setValue(a0,{value:o0})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const Z0=document.createElement("input");return K.add(Z0),Z0.setAttribute("data-element-id",a0),Z0.disabled=e0.readOnly,this._setRequired(Z0,this.data.required),Z0.type="checkbox",Z0.name=e0.fieldName,o0&&Z0.setAttribute("checked",!0),Z0.setAttribute("exportValue",e0.exportValue),Z0.tabIndex=F,Z0.addEventListener("change",T0=>{const{name:I0,checked:A0}=T0.target;for(const F0 of this._getElementsByName(I0,a0)){const J0=A0&&F0.exportValue===e0.exportValue;F0.domElement&&(F0.domElement.checked=J0),J.setValue(F0.id,{value:J0})}J.setValue(a0,{value:A0})}),Z0.addEventListener("resetform",T0=>{const I0=e0.defaultFieldValue||"Off";T0.target.checked=I0===e0.exportValue}),this.enableScripting&&this.hasJSActions&&(Z0.addEventListener("updatefromsandbox",T0=>{const I0={value(A0){A0.target.checked=A0.detail.value!=="Off",J.setValue(a0,{value:A0.target.checked})}};this._dispatchEventFromSandbox(I0,T0)}),this._setEventListeners(Z0,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],T0=>T0.target.checked)),this._setBackgroundColor(Z0),this._setDefaultPropertiesFromJS(Z0),this.container.append(Z0),this.container}}class P extends q{constructor(J){super(J,{isRenderable:J.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const J=this.annotationStorage,e0=this.data,a0=e0.id;let o0=J.getValue(a0,{value:e0.fieldValue===e0.buttonValue}).value;typeof o0=="string"&&(o0=o0!==e0.buttonValue,J.setValue(a0,{value:o0}));const Z0=document.createElement("input");if(K.add(Z0),Z0.setAttribute("data-element-id",a0),Z0.disabled=e0.readOnly,this._setRequired(Z0,this.data.required),Z0.type="radio",Z0.name=e0.fieldName,o0&&Z0.setAttribute("checked",!0),Z0.tabIndex=F,Z0.addEventListener("change",T0=>{const{name:I0,checked:A0}=T0.target;for(const F0 of this._getElementsByName(I0,a0))J.setValue(F0.id,{value:!1});J.setValue(a0,{value:A0})}),Z0.addEventListener("resetform",T0=>{const I0=e0.defaultFieldValue;T0.target.checked=I0!=null&&I0===e0.buttonValue}),this.enableScripting&&this.hasJSActions){const T0=e0.buttonValue;Z0.addEventListener("updatefromsandbox",I0=>{const A0={value:F0=>{const J0=T0===F0.detail.value;for(const K0 of this._getElementsByName(F0.target.name)){const E0=J0&&K0.id===a0;K0.domElement&&(K0.domElement.checked=E0),J.setValue(K0.id,{value:E0})}}};this._dispatchEventFromSandbox(A0,I0)}),this._setEventListeners(Z0,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],I0=>I0.target.checked)}return this._setBackgroundColor(Z0),this._setDefaultPropertiesFromJS(Z0),this.container.append(Z0),this.container}}class c0 extends D{constructor(J){super(J,{ignoreBorder:J.data.hasAppearance})}render(){const J=super.render();J.classList.add("buttonWidgetAnnotation","pushButton"),this.data.alternativeText&&(J.title=this.data.alternativeText);const e0=J.lastChild;return this.enableScripting&&this.hasJSActions&&e0&&(this._setDefaultPropertiesFromJS(e0),e0.addEventListener("updatefromsandbox",a0=>{this._dispatchEventFromSandbox({},a0)})),J}}class s0 extends q{constructor(J){super(J,{isRenderable:J.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const J=this.annotationStorage,e0=this.data.id,a0=J.getValue(e0,{value:this.data.fieldValue}),o0=document.createElement("select");K.add(o0),o0.setAttribute("data-element-id",e0),o0.disabled=this.data.readOnly,this._setRequired(o0,this.data.required),o0.name=this.data.fieldName,o0.tabIndex=F;let Z0=this.data.combo&&this.data.options.length>0;this.data.combo||(o0.size=this.data.options.length,this.data.multiSelect&&(o0.multiple=!0)),o0.addEventListener("resetform",J0=>{const K0=this.data.defaultFieldValue;for(const E0 of o0.options)E0.selected=E0.value===K0});for(const J0 of this.data.options){const K0=document.createElement("option");K0.textContent=J0.displayValue,K0.value=J0.exportValue,a0.value.includes(J0.exportValue)&&(K0.setAttribute("selected",!0),Z0=!1),o0.append(K0)}let T0=null;if(Z0){const J0=document.createElement("option");J0.value=" ",J0.setAttribute("hidden",!0),J0.setAttribute("selected",!0),o0.prepend(J0),T0=()=>{J0.remove(),o0.removeEventListener("input",T0),T0=null},o0.addEventListener("input",T0)}const I0=J0=>{const K0=J0?"value":"textContent",{options:E0,multiple:H0}=o0;return H0?Array.prototype.filter.call(E0,q0=>q0.selected).map(q0=>q0[K0]):E0.selectedIndex===-1?null:E0[E0.selectedIndex][K0]};let A0=I0(!1);const F0=J0=>{const K0=J0.target.options;return Array.prototype.map.call(K0,E0=>({displayValue:E0.textContent,exportValue:E0.value}))};return this.enableScripting&&this.hasJSActions?(o0.addEventListener("updatefromsandbox",J0=>{const K0={value(E0){var H0;(H0=T0)===null||H0===void 0||H0();const q0=E0.detail.value,a1=new Set(Array.isArray(q0)?q0:[q0]);for(const Y0 of o0.options)Y0.selected=a1.has(Y0.value);J.setValue(e0,{value:I0(!0)}),A0=I0(!1)},multipleSelection(E0){o0.multiple=!0},remove(E0){const H0=o0.options,q0=E0.detail.remove;H0[q0].selected=!1,o0.remove(q0),H0.length>0&&Array.prototype.findIndex.call(H0,a1=>a1.selected)===-1&&(H0[0].selected=!0),J.setValue(e0,{value:I0(!0),items:F0(E0)}),A0=I0(!1)},clear(E0){for(;o0.length!==0;)o0.remove(0);J.setValue(e0,{value:null,items:[]}),A0=I0(!1)},insert(E0){const{index:H0,displayValue:q0,exportValue:a1}=E0.detail.insert,Y0=o0.children[H0],U0=document.createElement("option");U0.textContent=q0,U0.value=a1,Y0?Y0.before(U0):o0.append(U0),J.setValue(e0,{value:I0(!0),items:F0(E0)}),A0=I0(!1)},items(E0){const{items:H0}=E0.detail;for(;o0.length!==0;)o0.remove(0);for(const q0 of H0){const{displayValue:a1,exportValue:Y0}=q0,U0=document.createElement("option");U0.textContent=a1,U0.value=Y0,o0.append(U0)}o0.options.length>0&&(o0.options[0].selected=!0),J.setValue(e0,{value:I0(!0),items:F0(E0)}),A0=I0(!1)},indices(E0){const H0=new Set(E0.detail.indices);for(const q0 of E0.target.options)q0.selected=H0.has(q0.index);J.setValue(e0,{value:I0(!0)}),A0=I0(!1)},editable(E0){E0.target.disabled=!E0.detail.editable}};this._dispatchEventFromSandbox(K0,J0)}),o0.addEventListener("input",J0=>{var K0;const E0=I0(!0);J.setValue(e0,{value:E0}),J0.preventDefault(),(K0=this.linkService.eventBus)===null||K0===void 0||K0.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e0,name:"Keystroke",value:A0,changeEx:E0,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(o0,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],J0=>J0.target.value)):o0.addEventListener("input",function(J0){J.setValue(e0,{value:I0(!0)})}),this.data.combo&&this._setTextStyle(o0),this._setBackgroundColor(o0),this._setDefaultPropertiesFromJS(o0),this.container.append(o0),this.container}}const W0=class extends E{constructor(S0){var J,e0,a0;const{data:o0}=S0;super(S0,{isRenderable:!W0.IGNORE_TYPES.has(o0.parentType)&&!!((J=o0.titleObj)!==null&&J!==void 0&&J.str||(e0=o0.contentsObj)!==null&&e0!==void 0&&e0.str||(a0=o0.richText)!==null&&a0!==void 0&&a0.str)})}render(){this.container.classList.add("popupAnnotation");const S0=this.layer.querySelectorAll(`[data-annotation-id="${this.data.parentId}"]`);if(S0.length===0)return this.container;const J=new X0({container:this.container,trigger:Array.from(S0),color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText}),e0=this.page,a0=V.Util.normalizeRect([this.data.parentRect[0],e0.view[3]-this.data.parentRect[1]+e0.view[1],this.data.parentRect[2],e0.view[3]-this.data.parentRect[3]+e0.view[1]]),o0=a0[0]+this.data.parentRect[2]-this.data.parentRect[0],Z0=a0[1],{pageWidth:T0,pageHeight:I0,pageX:A0,pageY:F0}=this.viewport.rawDims;return this.container.style.left=100*(o0-A0)/T0+"%",this.container.style.top=100*(Z0-F0)/I0+"%",this.container.append(J.render()),this.container}};let M0=W0;It(M0,"IGNORE_TYPES",new Set(["Line","Square","Circle","PolyLine","Polygon","Ink"]));class X0{constructor(J){this.container=J.container,this.trigger=J.trigger,this.color=J.color,this.titleObj=J.titleObj,this.modificationDate=J.modificationDate,this.contentsObj=J.contentsObj,this.richText=J.richText,this.hideWrapper=J.hideWrapper||!1,this.pinned=!1}render(){var J,e0;const a0=document.createElement("div");a0.classList.add("popupWrapper"),this.hideElement=this.hideWrapper?a0:this.container,this.hideElement.hidden=!0;const o0=document.createElement("div");o0.classList.add("popup");const Z0=this.color;if(Z0){const A0=.7*(255-Z0[0])+Z0[0],F0=.7*(255-Z0[1])+Z0[1],J0=.7*(255-Z0[2])+Z0[2];o0.style.backgroundColor=V.Util.makeHexColor(0|A0,0|F0,0|J0)}const T0=document.createElement("h1");T0.dir=this.titleObj.dir,T0.textContent=this.titleObj.str,o0.append(T0);const I0=g.PDFDateString.toDateObject(this.modificationDate);if(I0){const A0=document.createElement("span");A0.classList.add("popupDate"),A0.textContent="{{date}}, {{time}}",A0.dataset.l10nId="annotation_date_string",A0.dataset.l10nArgs=JSON.stringify({date:I0.toLocaleDateString(),time:I0.toLocaleTimeString()}),o0.append(A0)}if((J=this.richText)===null||J===void 0||!J.str||(e0=this.contentsObj)!==null&&e0!==void 0&&e0.str&&this.contentsObj.str!==this.richText.str){const A0=this._formatContents(this.contentsObj);o0.append(A0)}else C.XfaLayer.render({xfaHtml:this.richText.html,intent:"richText",div:o0}),o0.lastChild.classList.add("richText","popupContent");Array.isArray(this.trigger)||(this.trigger=[this.trigger]);for(const A0 of this.trigger)A0.addEventListener("click",this._toggle.bind(this)),A0.addEventListener("mouseover",this._show.bind(this,!1)),A0.addEventListener("mouseout",this._hide.bind(this,!1));return o0.addEventListener("click",this._hide.bind(this,!0)),a0.append(o0),a0}_formatContents(J){let{str:e0,dir:a0}=J;const o0=document.createElement("p");o0.classList.add("popupContent"),o0.dir=a0;const Z0=e0.split(/(?:\r\n?|\n)/);for(let T0=0,I0=Z0.length;T0<I0;++T0){const A0=Z0[T0];o0.append(document.createTextNode(A0)),T0<I0-1&&o0.append(document.createElement("br"))}return o0}_toggle(){this.pinned?this._hide(!0):this._show(!0)}_show(){arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&(this.pinned=!0),this.hideElement.hidden&&(this.hideElement.hidden=!1,this.container.style.zIndex=parseInt(this.container.style.zIndex)+1e3)}_hide(){(!(arguments.length>0&&arguments[0]!==void 0)||arguments[0])&&(this.pinned=!1),!this.hideElement.hidden&&!this.pinned&&(this.hideElement.hidden=!0,this.container.style.zIndex=parseInt(this.container.style.zIndex)-1e3)}}class B extends E{constructor(J){var e0,a0,o0;super(J,{isRenderable:!!(J.data.hasPopup||(e0=J.data.titleObj)!==null&&e0!==void 0&&e0.str||(a0=J.data.contentsObj)!==null&&a0!==void 0&&a0.str||(o0=J.data.richText)!==null&&o0!==void 0&&o0.str),ignoreBorder:!0}),this.textContent=J.data.textContent}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const J=document.createElement("div");J.classList.add("annotationTextContent"),J.setAttribute("role","comment");for(const e0 of this.textContent){const a0=document.createElement("span");a0.textContent=e0,J.append(a0)}this.container.append(J)}return this.data.hasPopup||this._createPopup(null,this.data),this.container}}class Q extends E{constructor(J){var e0,a0,o0;super(J,{isRenderable:!!(J.data.hasPopup||(e0=J.data.titleObj)!==null&&e0!==void 0&&e0.str||(a0=J.data.contentsObj)!==null&&a0!==void 0&&a0.str||(o0=J.data.richText)!==null&&o0!==void 0&&o0.str),ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");const J=this.data,{width:e0,height:a0}=j(J.rect),o0=this.svgFactory.create(e0,a0,!0),Z0=this.svgFactory.createElement("svg:line");return Z0.setAttribute("x1",J.rect[2]-J.lineCoordinates[0]),Z0.setAttribute("y1",J.rect[3]-J.lineCoordinates[1]),Z0.setAttribute("x2",J.rect[2]-J.lineCoordinates[2]),Z0.setAttribute("y2",J.rect[3]-J.lineCoordinates[3]),Z0.setAttribute("stroke-width",J.borderStyle.width||1),Z0.setAttribute("stroke","transparent"),Z0.setAttribute("fill","transparent"),o0.append(Z0),this.container.append(o0),this._createPopup(Z0,J),this.container}}class $ extends E{constructor(J){var e0,a0,o0;super(J,{isRenderable:!!(J.data.hasPopup||(e0=J.data.titleObj)!==null&&e0!==void 0&&e0.str||(a0=J.data.contentsObj)!==null&&a0!==void 0&&a0.str||(o0=J.data.richText)!==null&&o0!==void 0&&o0.str),ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");const J=this.data,{width:e0,height:a0}=j(J.rect),o0=this.svgFactory.create(e0,a0,!0),Z0=J.borderStyle.width,T0=this.svgFactory.createElement("svg:rect");return T0.setAttribute("x",Z0/2),T0.setAttribute("y",Z0/2),T0.setAttribute("width",e0-Z0),T0.setAttribute("height",a0-Z0),T0.setAttribute("stroke-width",Z0||1),T0.setAttribute("stroke","transparent"),T0.setAttribute("fill","transparent"),o0.append(T0),this.container.append(o0),this._createPopup(T0,J),this.container}}class l0 extends E{constructor(J){var e0,a0,o0;super(J,{isRenderable:!!(J.data.hasPopup||(e0=J.data.titleObj)!==null&&e0!==void 0&&e0.str||(a0=J.data.contentsObj)!==null&&a0!==void 0&&a0.str||(o0=J.data.richText)!==null&&o0!==void 0&&o0.str),ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");const J=this.data,{width:e0,height:a0}=j(J.rect),o0=this.svgFactory.create(e0,a0,!0),Z0=J.borderStyle.width,T0=this.svgFactory.createElement("svg:ellipse");return T0.setAttribute("cx",e0/2),T0.setAttribute("cy",a0/2),T0.setAttribute("rx",e0/2-Z0/2),T0.setAttribute("ry",a0/2-Z0/2),T0.setAttribute("stroke-width",Z0||1),T0.setAttribute("stroke","transparent"),T0.setAttribute("fill","transparent"),o0.append(T0),this.container.append(o0),this._createPopup(T0,J),this.container}}class _ extends E{constructor(J){var e0,a0,o0;super(J,{isRenderable:!!(J.data.hasPopup||(e0=J.data.titleObj)!==null&&e0!==void 0&&e0.str||(a0=J.data.contentsObj)!==null&&a0!==void 0&&a0.str||(o0=J.data.richText)!==null&&o0!==void 0&&o0.str),ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const J=this.data,{width:e0,height:a0}=j(J.rect),o0=this.svgFactory.create(e0,a0,!0);let Z0=[];for(const I0 of J.vertices){const A0=I0.x-J.rect[0],F0=J.rect[3]-I0.y;Z0.push(A0+","+F0)}Z0=Z0.join(" ");const T0=this.svgFactory.createElement(this.svgElementName);return T0.setAttribute("points",Z0),T0.setAttribute("stroke-width",J.borderStyle.width||1),T0.setAttribute("stroke","transparent"),T0.setAttribute("fill","transparent"),o0.append(T0),this.container.append(o0),this._createPopup(T0,J),this.container}}class H extends _{constructor(J){super(J),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class d0 extends E{constructor(J){var e0,a0,o0;super(J,{isRenderable:!!(J.data.hasPopup||(e0=J.data.titleObj)!==null&&e0!==void 0&&e0.str||(a0=J.data.contentsObj)!==null&&a0!==void 0&&a0.str||(o0=J.data.richText)!==null&&o0!==void 0&&o0.str),ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),this.data.hasPopup||this._createPopup(null,this.data),this.container}}class p0 extends E{constructor(J){var e0,a0,o0;super(J,{isRenderable:!!(J.data.hasPopup||(e0=J.data.titleObj)!==null&&e0!==void 0&&e0.str||(a0=J.data.contentsObj)!==null&&a0!==void 0&&a0.str||(o0=J.data.richText)!==null&&o0!==void 0&&o0.str),ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const J=this.data,{width:e0,height:a0}=j(J.rect),o0=this.svgFactory.create(e0,a0,!0);for(const Z0 of J.inkLists){let T0=[];for(const A0 of Z0){const F0=A0.x-J.rect[0],J0=J.rect[3]-A0.y;T0.push(`${F0},${J0}`)}T0=T0.join(" ");const I0=this.svgFactory.createElement(this.svgElementName);I0.setAttribute("points",T0),I0.setAttribute("stroke-width",J.borderStyle.width||1),I0.setAttribute("stroke","transparent"),I0.setAttribute("fill","transparent"),this._createPopup(I0,J),o0.append(I0)}return this.container.append(o0),this.container}}class m0 extends E{constructor(J){var e0,a0,o0;super(J,{isRenderable:!!(J.data.hasPopup||(e0=J.data.titleObj)!==null&&e0!==void 0&&e0.str||(a0=J.data.contentsObj)!==null&&a0!==void 0&&a0.str||(o0=J.data.richText)!==null&&o0!==void 0&&o0.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("highlightAnnotation"):(this.container.classList.add("highlightAnnotation"),this.container)}}class r0 extends E{constructor(J){var e0,a0,o0;super(J,{isRenderable:!!(J.data.hasPopup||(e0=J.data.titleObj)!==null&&e0!==void 0&&e0.str||(a0=J.data.contentsObj)!==null&&a0!==void 0&&a0.str||(o0=J.data.richText)!==null&&o0!==void 0&&o0.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("underlineAnnotation"):(this.container.classList.add("underlineAnnotation"),this.container)}}class O0 extends E{constructor(J){var e0,a0,o0;super(J,{isRenderable:!!(J.data.hasPopup||(e0=J.data.titleObj)!==null&&e0!==void 0&&e0.str||(a0=J.data.contentsObj)!==null&&a0!==void 0&&a0.str||(o0=J.data.richText)!==null&&o0!==void 0&&o0.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("squigglyAnnotation"):(this.container.classList.add("squigglyAnnotation"),this.container)}}class h0 extends E{constructor(J){var e0,a0,o0;super(J,{isRenderable:!!(J.data.hasPopup||(e0=J.data.titleObj)!==null&&e0!==void 0&&e0.str||(a0=J.data.contentsObj)!==null&&a0!==void 0&&a0.str||(o0=J.data.richText)!==null&&o0!==void 0&&o0.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("strikeoutAnnotation"):(this.container.classList.add("strikeoutAnnotation"),this.container)}}class G0 extends E{constructor(J){var e0,a0,o0;super(J,{isRenderable:!!(J.data.hasPopup||(e0=J.data.titleObj)!==null&&e0!==void 0&&e0.str||(a0=J.data.contentsObj)!==null&&a0!==void 0&&a0.str||(o0=J.data.richText)!==null&&o0!==void 0&&o0.str),ignoreBorder:!0})}render(){return this.container.classList.add("stampAnnotation"),this.data.hasPopup||this._createPopup(null,this.data),this.container}}class z0 extends E{constructor(J){var e0;super(J,{isRenderable:!0});const{filename:a0,content:o0}=this.data.file;this.filename=(0,g.getFilenameFromUrl)(a0,!0),this.content=o0,(e0=this.linkService.eventBus)===null||e0===void 0||e0.dispatch("fileattachmentannotation",{source:this,filename:a0,content:o0})}render(){var J,e0;this.container.classList.add("fileAttachmentAnnotation");let a0;return this.data.hasAppearance?a0=document.createElement("div"):(a0=document.createElement("img"),a0.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(this.data.name)?"paperclip":"pushpin"}.svg`),a0.classList.add("popupTriggerArea"),a0.addEventListener("dblclick",this._download.bind(this)),!this.data.hasPopup&&((J=this.data.titleObj)!==null&&J!==void 0&&J.str||(e0=this.data.contentsObj)!==null&&e0!==void 0&&e0.str||this.data.richText)&&this._createPopup(a0,this.data),this.container.append(a0),this.container}_download(){var J;(J=this.downloadManager)===null||J===void 0||J.openOrDownloadData(this.container,this.content,this.filename)}}const g0=class{static render(S0){var J,e0;const{annotations:a0,div:o0,viewport:Z0,accessibilityManager:T0}=S0;(0,g.setLayerDimensions)(o0,Z0);const I0={data:null,layer:o0,page:S0.page,viewport:Z0,linkService:S0.linkService,downloadManager:S0.downloadManager,imageResourcesPath:S0.imageResourcesPath||"",renderForms:S0.renderForms!==!1,svgFactory:new g.DOMSVGFactory,annotationStorage:S0.annotationStorage||new R.AnnotationStorage,enableScripting:S0.enableScripting===!0,hasJSActions:S0.hasJSActions,fieldObjects:S0.fieldObjects};let A0=0;for(const F0 of a0){if(F0.noHTML)continue;if(F0.annotationType!==V.AnnotationType.POPUP){const{width:E0,height:H0}=j(F0.rect);if(E0<=0||H0<=0)continue}I0.data=F0;const J0=U.create(I0);if(!J0.isRenderable)continue;const K0=J0.render();if(F0.hidden&&(K0.style.visibility="hidden"),Array.isArray(K0))for(const E0 of K0)E0.style.zIndex=A0++,nt(J=g0,N,X).call(J,E0,F0.id,o0,T0);else K0.style.zIndex=A0++,J0 instanceof M0?o0.prepend(K0):nt(e0=g0,N,X).call(e0,K0,F0.id,o0,T0)}nt(this,y,G).call(this,o0,S0.annotationCanvasMap)}static update(S0){const{annotationCanvasMap:J,div:e0,viewport:a0}=S0;(0,g.setLayerDimensions)(e0,{rotation:a0.rotation}),nt(this,y,G).call(this,e0,J),e0.hidden=!1}};let f0=g0;N=new WeakSet,X=function(S0,J,e0,a0){const o0=S0.firstChild||S0;o0.id=`${g.AnnotationPrefix}${J}`,e0.append(S0),a0==null||a0.moveElementInDOM(e0,S0,o0,!1)},y=new WeakSet,G=function(S0,J){if(J){for(const[e0,a0]of J){const o0=S0.querySelector(`[data-annotation-id="${e0}"]`);if(!o0)continue;const{firstChild:Z0}=o0;Z0?Z0.nodeName==="CANVAS"?Z0.replaceWith(a0):Z0.before(a0):o0.append(a0)}J.clear()}},et(f0,N),et(f0,y),M.AnnotationLayer=f0},(s,M)=>{Object.defineProperty(M,"__esModule",{value:!0}),M.ColorConverters=void 0;function o(u){return Math.floor(255*Math.max(0,Math.min(1,u))).toString(16).padStart(2,"0")}M.ColorConverters=class{static CMYK_G(u){let[z,W,O,N]=u;return["G",1-Math.min(1,.3*z+.59*O+.11*W+N)]}static G_CMYK(u){let[z]=u;return["CMYK",0,0,0,1-z]}static G_RGB(u){let[z]=u;return["RGB",z,z,z]}static G_HTML(u){let[z]=u;const W=o(z);return`#${W}${W}${W}`}static RGB_G(u){let[z,W,O]=u;return["G",.3*z+.59*W+.11*O]}static RGB_HTML(u){let[z,W,O]=u;return`#${o(z)}${o(W)}${o(O)}`}static T_HTML(){return"#00000000"}static CMYK_RGB(u){let[z,W,O,N]=u;return["RGB",1-Math.min(1,z+N),1-Math.min(1,O+N),1-Math.min(1,W+N)]}static CMYK_HTML(u){const z=this.CMYK_RGB(u).slice(1);return this.RGB_HTML(z)}static RGB_CMYK(u){let[z,W,O]=u;const N=1-z,X=1-W,y=1-O;return["CMYK",N,X,y,Math.min(N,X,y)]}}},(s,M,o)=>{Object.defineProperty(M,"__esModule",{value:!0}),M.XfaLayer=void 0;var u=o(154);M.XfaLayer=class{static setupStorage(z,W,O,N,X){const y=N.getValue(W,{value:null});switch(O.name){case"textarea":if(y.value!==null&&(z.textContent=y.value),X==="print")break;z.addEventListener("input",G=>{N.setValue(W,{value:G.target.value})});break;case"input":if(O.attributes.type==="radio"||O.attributes.type==="checkbox"){if(y.value===O.attributes.xfaOn?z.setAttribute("checked",!0):y.value===O.attributes.xfaOff&&z.removeAttribute("checked"),X==="print")break;z.addEventListener("change",G=>{N.setValue(W,{value:G.target.checked?G.target.getAttribute("xfaOn"):G.target.getAttribute("xfaOff")})})}else{if(y.value!==null&&z.setAttribute("value",y.value),X==="print")break;z.addEventListener("input",G=>{N.setValue(W,{value:G.target.value})})}break;case"select":if(y.value!==null)for(const G of O.children)G.attributes.value===y.value&&(G.attributes.selected=!0);z.addEventListener("input",G=>{const V=G.target.options,g=V.selectedIndex===-1?"":V[V.selectedIndex].value;N.setValue(W,{value:g})})}}static setAttributes(z){let{html:W,element:O,storage:N=null,intent:X,linkService:y}=z;const{attributes:G}=O,V=W instanceof HTMLAnchorElement;G.type==="radio"&&(G.name=`${G.name}-${X}`);for(const[g,R]of Object.entries(G))if(R!=null)switch(g){case"class":R.length&&W.setAttribute(g,R.join(" "));break;case"dataId":break;case"id":W.setAttribute("data-element-id",R);break;case"style":Object.assign(W.style,R);break;case"textContent":W.textContent=R;break;default:(!V||g!=="href"&&g!=="newWindow")&&W.setAttribute(g,R)}V&&y.addLinkAttributes(W,G.href,G.newWindow),N&&G.dataId&&this.setupStorage(W,G.dataId,O,N)}static render(z){const W=z.annotationStorage,O=z.linkService,N=z.xfaHtml,X=z.intent||"display",y=document.createElement(N.name);N.attributes&&this.setAttributes({html:y,element:N,intent:X,linkService:O});const G=[[N,-1,y]],V=z.div;if(V.append(y),z.viewport){const S=`matrix(${z.viewport.transform.join(",")})`;V.style.transform=S}X!=="richText"&&V.setAttribute("class","xfaLayer xfaFont");const g=[];for(;G.length>0;){var R;const[S,C,F]=G.at(-1);if(C+1===S.children.length){G.pop();continue}const K=S.children[++G.at(-1)[1]];if(K===null)continue;const{name:j}=K;if(j==="#text"){const E=document.createTextNode(K.value);g.push(E),F.append(E);continue}let U;if(U=K!=null&&(R=K.attributes)!==null&&R!==void 0&&R.xmlns?document.createElementNS(K.attributes.xmlns,j):document.createElement(j),F.append(U),K.attributes&&this.setAttributes({html:U,element:K,storage:W,intent:X,linkService:O}),K.children&&K.children.length>0)G.push([K,-1,U]);else if(K.value){const E=document.createTextNode(K.value);u.XfaText.shouldBuildText(j)&&g.push(E),U.append(E)}}for(const S of V.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))S.setAttribute("readOnly",!0);return{textDivs:g}}static update(z){const W=`matrix(${z.viewport.transform.join(",")})`;z.div.style.transform=W,z.div.hidden=!1}}},(s,M,o)=>{Object.defineProperty(M,"__esModule",{value:!0}),M.SVGGraphics=void 0;var u=o(142),z=o(1),W=o(3);let O=class{constructor(){(0,z.unreachable)("Not implemented: SVGGraphics")}};M.SVGGraphics=O;{let N=function(D){let v=[];const q=[];for(const i0 of D)i0.fn!=="save"?i0.fn==="restore"?v=q.pop():v.push(i0):(v.push({fnId:92,fn:"group",items:[]}),q.push(v),v=v.at(-1).items);return v},X=function(D){if(Number.isInteger(D))return D.toString();const v=D.toFixed(10);let q=v.length-1;if(v[q]!=="0")return v;do q--;while(v[q]==="0");return v.substring(0,v[q]==="."?q:q+1)},y=function(D){if(D[4]===0&&D[5]===0){if(D[1]===0&&D[2]===0)return D[0]===1&&D[3]===1?"":`scale(${X(D[0])} ${X(D[3])})`;if(D[0]===D[3]&&D[1]===-D[2])return`rotate(${X(180*Math.acos(D[0])/Math.PI)})`}else if(D[0]===1&&D[1]===0&&D[2]===0&&D[3]===1)return`translate(${X(D[4])} ${X(D[5])})`;return`matrix(${X(D[0])} ${X(D[1])} ${X(D[2])} ${X(D[3])} ${X(D[4])} ${X(D[5])})`};const G={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},V="http://www.w3.org/XML/1998/namespace",g="http://www.w3.org/1999/xlink",R=["butt","round","square"],S=["miter","round","bevel"],C=function(D){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",q=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(URL.createObjectURL&&typeof Blob<"u"&&!q)return URL.createObjectURL(new Blob([D],{type:v}));const i0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let t0=`data:${v};base64,`;for(let P=0,c0=D.length;P<c0;P+=3){const s0=255&D[P],W0=255&D[P+1],M0=255&D[P+2];t0+=i0[s0>>2]+i0[(3&s0)<<4|W0>>4]+i0[P+1<c0?(15&W0)<<2|M0>>6:64]+i0[P+2<c0?63&M0:64]}return t0},F=function(){const D=new Uint8Array([137,80,78,71,13,10,26,10]),v=new Int32Array(256);for(let P=0;P<256;P++){let c0=P;for(let s0=0;s0<8;s0++)c0=1&c0?3988292384^c0>>1&2147483647:c0>>1&2147483647;v[P]=c0}function q(P,c0,s0,W0){let M0=W0;const X0=c0.length;s0[M0]=X0>>24&255,s0[M0+1]=X0>>16&255,s0[M0+2]=X0>>8&255,s0[M0+3]=255&X0,M0+=4,s0[M0]=255&P.charCodeAt(0),s0[M0+1]=255&P.charCodeAt(1),s0[M0+2]=255&P.charCodeAt(2),s0[M0+3]=255&P.charCodeAt(3),M0+=4,s0.set(c0,M0),M0+=c0.length;const B=function(Q,$,l0){let _=-1;for(let H=$;H<l0;H++){const d0=255&(_^Q[H]);_=_>>>8^v[d0]}return-1^_}(s0,W0+4,M0);s0[M0]=B>>24&255,s0[M0+1]=B>>16&255,s0[M0+2]=B>>8&255,s0[M0+3]=255&B}function i0(P){let c0=P.length;const s0=65535,W0=Math.ceil(c0/s0),M0=new Uint8Array(2+c0+5*W0+4);let X0=0;M0[X0++]=120,M0[X0++]=156;let B=0;for(;c0>s0;)M0[X0++]=0,M0[X0++]=255,M0[X0++]=255,M0[X0++]=0,M0[X0++]=0,M0.set(P.subarray(B,B+s0),X0),X0+=s0,B+=s0,c0-=s0;M0[X0++]=1,M0[X0++]=255&c0,M0[X0++]=c0>>8&255,M0[X0++]=255&~c0,M0[X0++]=(65535&~c0)>>8&255,M0.set(P.subarray(B),X0),X0+=P.length-B;const Q=function($,l0,_){let H=1,d0=0;for(let p0=l0;p0<_;++p0)H=(H+(255&$[p0]))%65521,d0=(d0+H)%65521;return d0<<16|H}(P,0,P.length);return M0[X0++]=Q>>24&255,M0[X0++]=Q>>16&255,M0[X0++]=Q>>8&255,M0[X0++]=255&Q,M0}function t0(P,c0,s0,W0){const M0=P.width,X0=P.height;let B,Q,$;const l0=P.data;switch(c0){case z.ImageKind.GRAYSCALE_1BPP:Q=0,B=1,$=M0+7>>3;break;case z.ImageKind.RGB_24BPP:Q=2,B=8,$=3*M0;break;case z.ImageKind.RGBA_32BPP:Q=6,B=8,$=4*M0;break;default:throw new Error("invalid format")}const _=new Uint8Array((1+$)*X0);let H=0,d0=0;for(let G0=0;G0<X0;++G0)_[H++]=0,_.set(l0.subarray(d0,d0+$),H),d0+=$,H+=$;if(c0===z.ImageKind.GRAYSCALE_1BPP&&W0){H=0;for(let G0=0;G0<X0;G0++){H++;for(let z0=0;z0<$;z0++)_[H++]^=255}}const p0=new Uint8Array([M0>>24&255,M0>>16&255,M0>>8&255,255&M0,X0>>24&255,X0>>16&255,X0>>8&255,255&X0,B,Q,0,0,0]),m0=function(G0){if(!W.isNodeJS)return i0(G0);try{let z0;z0=parseInt(process.versions.node)>=8?G0:Buffer.from(G0);const g0=require$$6.deflateSync(z0,{level:9});return g0 instanceof Uint8Array?g0:new Uint8Array(g0)}catch(z0){(0,z.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+z0)}return i0(G0)}(_),r0=D.length+36+p0.length+m0.length,O0=new Uint8Array(r0);let h0=0;return O0.set(D,h0),h0+=D.length,q("IHDR",p0,O0,h0),h0+=12+p0.length,q("IDATA",m0,O0,h0),h0+=12+m0.length,q("IEND",new Uint8Array(0),O0,h0),C(O0,"image/png",s0)}return function(P,c0,s0){return t0(P,P.kind===void 0?z.ImageKind.GRAYSCALE_1BPP:P.kind,c0,s0)}}();class K{constructor(){this.fontSizeScale=1,this.fontWeight=G.fontWeight,this.fontSize=0,this.textMatrix=z.IDENTITY_MATRIX,this.fontMatrix=z.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=z.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=G.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(v,q){this.x=v,this.y=q}}let j=0,U=0,E=0;M.SVGGraphics=O=class{constructor(D,v){let q=arguments.length>2&&arguments[2]!==void 0&&arguments[2];(0,u.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new u.DOMSVGFactory,this.current=new K,this.transformMatrix=z.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=D,this.objs=v,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!q,this._operatorIdMapping=[];for(const i0 in z.OPS)this._operatorIdMapping[z.OPS[i0]]=i0}getObject(D){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return typeof D=="string"?D.startsWith("g_")?this.commonObjs.get(D):this.objs.get(D):v}save(){this.transformStack.push(this.transformMatrix);const D=this.current;this.extraStack.push(D),this.current=D.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(D){this.save(),this.executeOpTree(D),this.restore()}loadDependencies(D){const v=D.fnArray,q=D.argsArray;for(let i0=0,t0=v.length;i0<t0;i0++)if(v[i0]===z.OPS.dependency)for(const P of q[i0]){const c0=P.startsWith("g_")?this.commonObjs:this.objs,s0=new Promise(W0=>{c0.get(P,W0)});this.current.dependencies.push(s0)}return Promise.all(this.current.dependencies)}transform(D,v,q,i0,t0,P){const c0=[D,v,q,i0,t0,P];this.transformMatrix=z.Util.transform(this.transformMatrix,c0),this.tgrp=null}getSVG(D,v){this.viewport=v;const q=this._initialize(v);return this.loadDependencies(D).then(()=>(this.transformMatrix=z.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(D)),q))}convertOpList(D){const v=this._operatorIdMapping,q=D.argsArray,i0=D.fnArray,t0=[];for(let P=0,c0=i0.length;P<c0;P++){const s0=i0[P];t0.push({fnId:s0,fn:v[s0],args:q[P]})}return N(t0)}executeOpTree(D){for(const v of D){const q=v.fn,i0=v.fnId,t0=v.args;switch(0|i0){case z.OPS.beginText:this.beginText();break;case z.OPS.dependency:break;case z.OPS.setLeading:this.setLeading(t0);break;case z.OPS.setLeadingMoveText:this.setLeadingMoveText(t0[0],t0[1]);break;case z.OPS.setFont:this.setFont(t0);break;case z.OPS.showText:case z.OPS.showSpacedText:this.showText(t0[0]);break;case z.OPS.endText:this.endText();break;case z.OPS.moveText:this.moveText(t0[0],t0[1]);break;case z.OPS.setCharSpacing:this.setCharSpacing(t0[0]);break;case z.OPS.setWordSpacing:this.setWordSpacing(t0[0]);break;case z.OPS.setHScale:this.setHScale(t0[0]);break;case z.OPS.setTextMatrix:this.setTextMatrix(t0[0],t0[1],t0[2],t0[3],t0[4],t0[5]);break;case z.OPS.setTextRise:this.setTextRise(t0[0]);break;case z.OPS.setTextRenderingMode:this.setTextRenderingMode(t0[0]);break;case z.OPS.setLineWidth:this.setLineWidth(t0[0]);break;case z.OPS.setLineJoin:this.setLineJoin(t0[0]);break;case z.OPS.setLineCap:this.setLineCap(t0[0]);break;case z.OPS.setMiterLimit:this.setMiterLimit(t0[0]);break;case z.OPS.setFillRGBColor:this.setFillRGBColor(t0[0],t0[1],t0[2]);break;case z.OPS.setStrokeRGBColor:this.setStrokeRGBColor(t0[0],t0[1],t0[2]);break;case z.OPS.setStrokeColorN:this.setStrokeColorN(t0);break;case z.OPS.setFillColorN:this.setFillColorN(t0);break;case z.OPS.shadingFill:this.shadingFill(t0[0]);break;case z.OPS.setDash:this.setDash(t0[0],t0[1]);break;case z.OPS.setRenderingIntent:this.setRenderingIntent(t0[0]);break;case z.OPS.setFlatness:this.setFlatness(t0[0]);break;case z.OPS.setGState:this.setGState(t0[0]);break;case z.OPS.fill:this.fill();break;case z.OPS.eoFill:this.eoFill();break;case z.OPS.stroke:this.stroke();break;case z.OPS.fillStroke:this.fillStroke();break;case z.OPS.eoFillStroke:this.eoFillStroke();break;case z.OPS.clip:this.clip("nonzero");break;case z.OPS.eoClip:this.clip("evenodd");break;case z.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case z.OPS.paintImageXObject:this.paintImageXObject(t0[0]);break;case z.OPS.paintInlineImageXObject:this.paintInlineImageXObject(t0[0]);break;case z.OPS.paintImageMaskXObject:this.paintImageMaskXObject(t0[0]);break;case z.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(t0[0],t0[1]);break;case z.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case z.OPS.closePath:this.closePath();break;case z.OPS.closeStroke:this.closeStroke();break;case z.OPS.closeFillStroke:this.closeFillStroke();break;case z.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case z.OPS.nextLine:this.nextLine();break;case z.OPS.transform:this.transform(t0[0],t0[1],t0[2],t0[3],t0[4],t0[5]);break;case z.OPS.constructPath:this.constructPath(t0[0],t0[1]);break;case z.OPS.endPath:this.endPath();break;case 92:this.group(v.items);break;default:(0,z.warn)(`Unimplemented operator ${q}`)}}}setWordSpacing(D){this.current.wordSpacing=D}setCharSpacing(D){this.current.charSpacing=D}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(D,v,q,i0,t0,P){const c0=this.current;c0.textMatrix=c0.lineMatrix=[D,v,q,i0,t0,P],c0.textMatrixScale=Math.hypot(D,v),c0.x=c0.lineX=0,c0.y=c0.lineY=0,c0.xcoords=[],c0.ycoords=[],c0.tspan=this.svgFactory.createElement("svg:tspan"),c0.tspan.setAttributeNS(null,"font-family",c0.fontFamily),c0.tspan.setAttributeNS(null,"font-size",`${X(c0.fontSize)}px`),c0.tspan.setAttributeNS(null,"y",X(-c0.y)),c0.txtElement=this.svgFactory.createElement("svg:text"),c0.txtElement.append(c0.tspan)}beginText(){const D=this.current;D.x=D.lineX=0,D.y=D.lineY=0,D.textMatrix=z.IDENTITY_MATRIX,D.lineMatrix=z.IDENTITY_MATRIX,D.textMatrixScale=1,D.tspan=this.svgFactory.createElement("svg:tspan"),D.txtElement=this.svgFactory.createElement("svg:text"),D.txtgrp=this.svgFactory.createElement("svg:g"),D.xcoords=[],D.ycoords=[]}moveText(D,v){const q=this.current;q.x=q.lineX+=D,q.y=q.lineY+=v,q.xcoords=[],q.ycoords=[],q.tspan=this.svgFactory.createElement("svg:tspan"),q.tspan.setAttributeNS(null,"font-family",q.fontFamily),q.tspan.setAttributeNS(null,"font-size",`${X(q.fontSize)}px`),q.tspan.setAttributeNS(null,"y",X(-q.y))}showText(D){const v=this.current,q=v.font,i0=v.fontSize;if(i0===0)return;const t0=v.fontSizeScale,P=v.charSpacing,c0=v.wordSpacing,s0=v.fontDirection,W0=v.textHScale*s0,M0=q.vertical,X0=M0?1:-1,B=q.defaultVMetrics,Q=i0*v.fontMatrix[0];let $=0;for(const H of D){if(H===null){$+=s0*c0;continue}if(typeof H=="number"){$+=X0*H*i0/1e3;continue}const d0=(H.isSpace?c0:0)+P,p0=H.fontChar;let m0,r0,O0,h0=H.width;if(M0){let G0;const z0=H.vmetric||B;G0=H.vmetric?z0[1]:.5*h0,G0=-G0*Q;const g0=z0[2]*Q;h0=z0?-z0[0]:h0,m0=G0/t0,r0=($+g0)/t0}else m0=$/t0,r0=0;(H.isInFont||q.missingFile)&&(v.xcoords.push(v.x+m0),M0&&v.ycoords.push(-v.y+r0),v.tspan.textContent+=p0),O0=M0?h0*Q-d0*s0:h0*Q+d0*s0,$+=O0}v.tspan.setAttributeNS(null,"x",v.xcoords.map(X).join(" ")),M0?v.tspan.setAttributeNS(null,"y",v.ycoords.map(X).join(" ")):v.tspan.setAttributeNS(null,"y",X(-v.y)),M0?v.y-=$:v.x+=$*W0,v.tspan.setAttributeNS(null,"font-family",v.fontFamily),v.tspan.setAttributeNS(null,"font-size",`${X(v.fontSize)}px`),v.fontStyle!==G.fontStyle&&v.tspan.setAttributeNS(null,"font-style",v.fontStyle),v.fontWeight!==G.fontWeight&&v.tspan.setAttributeNS(null,"font-weight",v.fontWeight);const l0=v.textRenderingMode&z.TextRenderingMode.FILL_STROKE_MASK;if(l0===z.TextRenderingMode.FILL||l0===z.TextRenderingMode.FILL_STROKE?(v.fillColor!==G.fillColor&&v.tspan.setAttributeNS(null,"fill",v.fillColor),v.fillAlpha<1&&v.tspan.setAttributeNS(null,"fill-opacity",v.fillAlpha)):v.textRenderingMode===z.TextRenderingMode.ADD_TO_PATH?v.tspan.setAttributeNS(null,"fill","transparent"):v.tspan.setAttributeNS(null,"fill","none"),l0===z.TextRenderingMode.STROKE||l0===z.TextRenderingMode.FILL_STROKE){const H=1/(v.textMatrixScale||1);this._setStrokeAttributes(v.tspan,H)}let _=v.textMatrix;v.textRise!==0&&(_=_.slice(),_[5]+=v.textRise),v.txtElement.setAttributeNS(null,"transform",`${y(_)} scale(${X(W0)}, -1)`),v.txtElement.setAttributeNS(V,"xml:space","preserve"),v.txtElement.append(v.tspan),v.txtgrp.append(v.txtElement),this._ensureTransformGroup().append(v.txtElement)}setLeadingMoveText(D,v){this.setLeading(-v),this.moveText(D,v)}addFontStyle(D){if(!D.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.append(this.cssStyle));const v=C(D.data,D.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${D.loadedName}"; src: url(${v}); }
70
- `}setFont(D){const v=this.current,q=this.commonObjs.get(D[0]);let i0=D[1];v.font=q,this.embedFonts&&!q.missingFile&&!this.embeddedFonts[q.loadedName]&&(this.addFontStyle(q),this.embeddedFonts[q.loadedName]=q),v.fontMatrix=q.fontMatrix||z.FONT_IDENTITY_MATRIX;let t0="normal";q.black?t0="900":q.bold&&(t0="bold");const P=q.italic?"italic":"normal";i0<0?(i0=-i0,v.fontDirection=-1):v.fontDirection=1,v.fontSize=i0,v.fontFamily=q.loadedName,v.fontWeight=t0,v.fontStyle=P,v.tspan=this.svgFactory.createElement("svg:tspan"),v.tspan.setAttributeNS(null,"y",X(-v.y)),v.xcoords=[],v.ycoords=[]}endText(){var D;const v=this.current;v.textRenderingMode&z.TextRenderingMode.ADD_TO_PATH_FLAG&&(D=v.txtElement)!==null&&D!==void 0&&D.hasChildNodes()&&(v.element=v.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(D){D>0&&(this.current.lineWidth=D)}setLineCap(D){this.current.lineCap=R[D]}setLineJoin(D){this.current.lineJoin=S[D]}setMiterLimit(D){this.current.miterLimit=D}setStrokeAlpha(D){this.current.strokeAlpha=D}setStrokeRGBColor(D,v,q){this.current.strokeColor=z.Util.makeHexColor(D,v,q)}setFillAlpha(D){this.current.fillAlpha=D}setFillRGBColor(D,v,q){this.current.fillColor=z.Util.makeHexColor(D,v,q),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(D){this.current.strokeColor=this._makeColorN_Pattern(D)}setFillColorN(D){this.current.fillColor=this._makeColorN_Pattern(D)}shadingFill(D){const v=this.viewport.width,q=this.viewport.height,i0=z.Util.inverseTransform(this.transformMatrix),t0=z.Util.applyTransform([0,0],i0),P=z.Util.applyTransform([0,q],i0),c0=z.Util.applyTransform([v,0],i0),s0=z.Util.applyTransform([v,q],i0),W0=Math.min(t0[0],P[0],c0[0],s0[0]),M0=Math.min(t0[1],P[1],c0[1],s0[1]),X0=Math.max(t0[0],P[0],c0[0],s0[0]),B=Math.max(t0[1],P[1],c0[1],s0[1]),Q=this.svgFactory.createElement("svg:rect");Q.setAttributeNS(null,"x",W0),Q.setAttributeNS(null,"y",M0),Q.setAttributeNS(null,"width",X0-W0),Q.setAttributeNS(null,"height",B-M0),Q.setAttributeNS(null,"fill",this._makeShadingPattern(D)),this.current.fillAlpha<1&&Q.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(Q)}_makeColorN_Pattern(D){return D[0]==="TilingPattern"?this._makeTilingPattern(D):this._makeShadingPattern(D)}_makeTilingPattern(D){const v=D[1],q=D[2],i0=D[3]||z.IDENTITY_MATRIX,[t0,P,c0,s0]=D[4],W0=D[5],M0=D[6],X0=D[7],B="shading"+E++,[Q,$,l0,_]=z.Util.normalizeRect([...z.Util.applyTransform([t0,P],i0),...z.Util.applyTransform([c0,s0],i0)]),[H,d0]=z.Util.singularValueDecompose2dScale(i0),p0=W0*H,m0=M0*d0,r0=this.svgFactory.createElement("svg:pattern");r0.setAttributeNS(null,"id",B),r0.setAttributeNS(null,"patternUnits","userSpaceOnUse"),r0.setAttributeNS(null,"width",p0),r0.setAttributeNS(null,"height",m0),r0.setAttributeNS(null,"x",`${Q}`),r0.setAttributeNS(null,"y",`${$}`);const O0=this.svg,h0=this.transformMatrix,G0=this.current.fillColor,z0=this.current.strokeColor,g0=this.svgFactory.create(l0-Q,_-$);if(this.svg=g0,this.transformMatrix=i0,X0===2){const f0=z.Util.makeHexColor(...v);this.current.fillColor=f0,this.current.strokeColor=f0}return this.executeOpTree(this.convertOpList(q)),this.svg=O0,this.transformMatrix=h0,this.current.fillColor=G0,this.current.strokeColor=z0,r0.append(g0.childNodes[0]),this.defs.append(r0),`url(#${B})`}_makeShadingPattern(D){switch(typeof D=="string"&&(D=this.objs.get(D)),D[0]){case"RadialAxial":const v="shading"+E++,q=D[3];let i0;switch(D[1]){case"axial":const t0=D[4],P=D[5];i0=this.svgFactory.createElement("svg:linearGradient"),i0.setAttributeNS(null,"id",v),i0.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),i0.setAttributeNS(null,"x1",t0[0]),i0.setAttributeNS(null,"y1",t0[1]),i0.setAttributeNS(null,"x2",P[0]),i0.setAttributeNS(null,"y2",P[1]);break;case"radial":const c0=D[4],s0=D[5],W0=D[6],M0=D[7];i0=this.svgFactory.createElement("svg:radialGradient"),i0.setAttributeNS(null,"id",v),i0.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),i0.setAttributeNS(null,"cx",s0[0]),i0.setAttributeNS(null,"cy",s0[1]),i0.setAttributeNS(null,"r",M0),i0.setAttributeNS(null,"fx",c0[0]),i0.setAttributeNS(null,"fy",c0[1]),i0.setAttributeNS(null,"fr",W0);break;default:throw new Error(`Unknown RadialAxial type: ${D[1]}`)}for(const t0 of q){const P=this.svgFactory.createElement("svg:stop");P.setAttributeNS(null,"offset",t0[0]),P.setAttributeNS(null,"stop-color",t0[1]),i0.append(P)}return this.defs.append(i0),`url(#${v})`;case"Mesh":return(0,z.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${D[0]}`)}}setDash(D,v){this.current.dashArray=D,this.current.dashPhase=v}constructPath(D,v){const q=this.current;let i0=q.x,t0=q.y,P=[],c0=0;for(const s0 of D)switch(0|s0){case z.OPS.rectangle:i0=v[c0++],t0=v[c0++];const W0=i0+v[c0++],M0=t0+v[c0++];P.push("M",X(i0),X(t0),"L",X(W0),X(t0),"L",X(W0),X(M0),"L",X(i0),X(M0),"Z");break;case z.OPS.moveTo:i0=v[c0++],t0=v[c0++],P.push("M",X(i0),X(t0));break;case z.OPS.lineTo:i0=v[c0++],t0=v[c0++],P.push("L",X(i0),X(t0));break;case z.OPS.curveTo:i0=v[c0+4],t0=v[c0+5],P.push("C",X(v[c0]),X(v[c0+1]),X(v[c0+2]),X(v[c0+3]),X(i0),X(t0)),c0+=6;break;case z.OPS.curveTo2:P.push("C",X(i0),X(t0),X(v[c0]),X(v[c0+1]),X(v[c0+2]),X(v[c0+3])),i0=v[c0+2],t0=v[c0+3],c0+=4;break;case z.OPS.curveTo3:i0=v[c0+2],t0=v[c0+3],P.push("C",X(v[c0]),X(v[c0+1]),X(i0),X(t0),X(i0),X(t0)),c0+=4;break;case z.OPS.closePath:P.push("Z")}P=P.join(" "),q.path&&D.length>0&&D[0]!==z.OPS.rectangle&&D[0]!==z.OPS.moveTo?P=q.path.getAttributeNS(null,"d")+P:(q.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(q.path)),q.path.setAttributeNS(null,"d",P),q.path.setAttributeNS(null,"fill","none"),q.element=q.path,q.setCurrentPoint(i0,t0)}endPath(){const D=this.current;if(D.path=null,!this.pendingClip)return;if(!D.element){this.pendingClip=null;return}const v="clippath"+j++,q=this.svgFactory.createElement("svg:clipPath");q.setAttributeNS(null,"id",v),q.setAttributeNS(null,"transform",y(this.transformMatrix));const i0=D.element.cloneNode(!0);if(this.pendingClip==="evenodd"?i0.setAttributeNS(null,"clip-rule","evenodd"):i0.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,q.append(i0),this.defs.append(q),D.activeClipUrl){D.clipGroup=null;for(const t0 of this.extraStack)t0.clipGroup=null;q.setAttributeNS(null,"clip-path",D.activeClipUrl)}D.activeClipUrl=`url(#${v})`,this.tgrp=null}clip(D){this.pendingClip=D}closePath(){const D=this.current;if(D.path){const v=`${D.path.getAttributeNS(null,"d")}Z`;D.path.setAttributeNS(null,"d",v)}}setLeading(D){this.current.leading=-D}setTextRise(D){this.current.textRise=D}setTextRenderingMode(D){this.current.textRenderingMode=D}setHScale(D){this.current.textHScale=D/100}setRenderingIntent(D){}setFlatness(D){}setGState(D){for(const[v,q]of D)switch(v){case"LW":this.setLineWidth(q);break;case"LC":this.setLineCap(q);break;case"LJ":this.setLineJoin(q);break;case"ML":this.setMiterLimit(q);break;case"D":this.setDash(q[0],q[1]);break;case"RI":this.setRenderingIntent(q);break;case"FL":this.setFlatness(q);break;case"Font":this.setFont(q);break;case"CA":this.setStrokeAlpha(q);break;case"ca":this.setFillAlpha(q);break;default:(0,z.warn)(`Unimplemented graphic state operator ${v}`)}}fill(){const D=this.current;D.element&&(D.element.setAttributeNS(null,"fill",D.fillColor),D.element.setAttributeNS(null,"fill-opacity",D.fillAlpha),this.endPath())}stroke(){const D=this.current;D.element&&(this._setStrokeAttributes(D.element),D.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(D){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const q=this.current;let i0=q.dashArray;v!==1&&i0.length>0&&(i0=i0.map(function(t0){return v*t0})),D.setAttributeNS(null,"stroke",q.strokeColor),D.setAttributeNS(null,"stroke-opacity",q.strokeAlpha),D.setAttributeNS(null,"stroke-miterlimit",X(q.miterLimit)),D.setAttributeNS(null,"stroke-linecap",q.lineCap),D.setAttributeNS(null,"stroke-linejoin",q.lineJoin),D.setAttributeNS(null,"stroke-width",X(v*q.lineWidth)+"px"),D.setAttributeNS(null,"stroke-dasharray",i0.map(X).join(" ")),D.setAttributeNS(null,"stroke-dashoffset",X(v*q.dashPhase)+"px")}eoFill(){var D;(D=this.current.element)===null||D===void 0||D.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){var D;(D=this.current.element)===null||D===void 0||D.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const D=this.svgFactory.createElement("svg:rect");D.setAttributeNS(null,"x","0"),D.setAttributeNS(null,"y","0"),D.setAttributeNS(null,"width","1px"),D.setAttributeNS(null,"height","1px"),D.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(D)}paintImageXObject(D){const v=this.getObject(D);v?this.paintInlineImageXObject(v):(0,z.warn)(`Dependent image with object ID ${D} is not ready yet`)}paintInlineImageXObject(D,v){const q=D.width,i0=D.height,t0=F(D,this.forceDataSchema,!!v),P=this.svgFactory.createElement("svg:rect");P.setAttributeNS(null,"x","0"),P.setAttributeNS(null,"y","0"),P.setAttributeNS(null,"width",X(q)),P.setAttributeNS(null,"height",X(i0)),this.current.element=P,this.clip("nonzero");const c0=this.svgFactory.createElement("svg:image");c0.setAttributeNS(g,"xlink:href",t0),c0.setAttributeNS(null,"x","0"),c0.setAttributeNS(null,"y",X(-i0)),c0.setAttributeNS(null,"width",X(q)+"px"),c0.setAttributeNS(null,"height",X(i0)+"px"),c0.setAttributeNS(null,"transform",`scale(${X(1/q)} ${X(-1/i0)})`),v?v.append(c0):this._ensureTransformGroup().append(c0)}paintImageMaskXObject(D){const v=this.getObject(D.data,D);if(v.bitmap){(0,z.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");return}const q=this.current,i0=v.width,t0=v.height,P=q.fillColor;q.maskId="mask"+U++;const c0=this.svgFactory.createElement("svg:mask");c0.setAttributeNS(null,"id",q.maskId);const s0=this.svgFactory.createElement("svg:rect");s0.setAttributeNS(null,"x","0"),s0.setAttributeNS(null,"y","0"),s0.setAttributeNS(null,"width",X(i0)),s0.setAttributeNS(null,"height",X(t0)),s0.setAttributeNS(null,"fill",P),s0.setAttributeNS(null,"mask",`url(#${q.maskId})`),this.defs.append(c0),this._ensureTransformGroup().append(s0),this.paintInlineImageXObject(v,c0)}paintFormXObjectBegin(D,v){if(Array.isArray(D)&&D.length===6&&this.transform(D[0],D[1],D[2],D[3],D[4],D[5]),v){const q=v[2]-v[0],i0=v[3]-v[1],t0=this.svgFactory.createElement("svg:rect");t0.setAttributeNS(null,"x",v[0]),t0.setAttributeNS(null,"y",v[1]),t0.setAttributeNS(null,"width",X(q)),t0.setAttributeNS(null,"height",X(i0)),this.current.element=t0,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(D){const v=this.svgFactory.create(D.width,D.height),q=this.svgFactory.createElement("svg:defs");v.append(q),this.defs=q;const i0=this.svgFactory.createElement("svg:g");return i0.setAttributeNS(null,"transform",y(D.transform)),v.append(i0),this.svg=i0,v}_ensureClipGroup(){if(!this.current.clipGroup){const D=this.svgFactory.createElement("svg:g");D.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(D),this.current.clipGroup=D}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",y(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}}}],__webpack_module_cache__={};function __w_pdfjs_require__(s){var M=__webpack_module_cache__[s];if(M!==void 0)return M.exports;var o=__webpack_module_cache__[s]={exports:{}};return __webpack_modules__[s].call(o.exports,o,o.exports,__w_pdfjs_require__),o.exports}var __webpack_exports__={};return(()=>{var s=__webpack_exports__;Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"AbortException",{enumerable:!0,get:function(){return M.AbortException}}),Object.defineProperty(s,"AnnotationEditorLayer",{enumerable:!0,get:function(){return W.AnnotationEditorLayer}}),Object.defineProperty(s,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return M.AnnotationEditorParamsType}}),Object.defineProperty(s,"AnnotationEditorType",{enumerable:!0,get:function(){return M.AnnotationEditorType}}),Object.defineProperty(s,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return O.AnnotationEditorUIManager}}),Object.defineProperty(s,"AnnotationLayer",{enumerable:!0,get:function(){return N.AnnotationLayer}}),Object.defineProperty(s,"AnnotationMode",{enumerable:!0,get:function(){return M.AnnotationMode}}),Object.defineProperty(s,"CMapCompressionType",{enumerable:!0,get:function(){return M.CMapCompressionType}}),Object.defineProperty(s,"FeatureTest",{enumerable:!0,get:function(){return M.FeatureTest}}),Object.defineProperty(s,"GlobalWorkerOptions",{enumerable:!0,get:function(){return X.GlobalWorkerOptions}}),Object.defineProperty(s,"InvalidPDFException",{enumerable:!0,get:function(){return M.InvalidPDFException}}),Object.defineProperty(s,"MissingPDFException",{enumerable:!0,get:function(){return M.MissingPDFException}}),Object.defineProperty(s,"OPS",{enumerable:!0,get:function(){return M.OPS}}),Object.defineProperty(s,"PDFDataRangeTransport",{enumerable:!0,get:function(){return o.PDFDataRangeTransport}}),Object.defineProperty(s,"PDFDateString",{enumerable:!0,get:function(){return u.PDFDateString}}),Object.defineProperty(s,"PDFWorker",{enumerable:!0,get:function(){return o.PDFWorker}}),Object.defineProperty(s,"PasswordResponses",{enumerable:!0,get:function(){return M.PasswordResponses}}),Object.defineProperty(s,"PermissionFlag",{enumerable:!0,get:function(){return M.PermissionFlag}}),Object.defineProperty(s,"PixelsPerInch",{enumerable:!0,get:function(){return u.PixelsPerInch}}),Object.defineProperty(s,"PromiseCapability",{enumerable:!0,get:function(){return M.PromiseCapability}}),Object.defineProperty(s,"RenderingCancelledException",{enumerable:!0,get:function(){return u.RenderingCancelledException}}),Object.defineProperty(s,"SVGGraphics",{enumerable:!0,get:function(){return y.SVGGraphics}}),Object.defineProperty(s,"UnexpectedResponseException",{enumerable:!0,get:function(){return M.UnexpectedResponseException}}),Object.defineProperty(s,"Util",{enumerable:!0,get:function(){return M.Util}}),Object.defineProperty(s,"VerbosityLevel",{enumerable:!0,get:function(){return M.VerbosityLevel}}),Object.defineProperty(s,"XfaLayer",{enumerable:!0,get:function(){return G.XfaLayer}}),Object.defineProperty(s,"build",{enumerable:!0,get:function(){return o.build}}),Object.defineProperty(s,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return M.createValidAbsoluteUrl}}),Object.defineProperty(s,"getDocument",{enumerable:!0,get:function(){return o.getDocument}}),Object.defineProperty(s,"getFilenameFromUrl",{enumerable:!0,get:function(){return u.getFilenameFromUrl}}),Object.defineProperty(s,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return u.getPdfFilenameFromUrl}}),Object.defineProperty(s,"getXfaPageViewport",{enumerable:!0,get:function(){return u.getXfaPageViewport}}),Object.defineProperty(s,"isDataScheme",{enumerable:!0,get:function(){return u.isDataScheme}}),Object.defineProperty(s,"isPdfFile",{enumerable:!0,get:function(){return u.isPdfFile}}),Object.defineProperty(s,"loadScript",{enumerable:!0,get:function(){return u.loadScript}}),Object.defineProperty(s,"normalizeUnicode",{enumerable:!0,get:function(){return M.normalizeUnicode}}),Object.defineProperty(s,"renderTextLayer",{enumerable:!0,get:function(){return z.renderTextLayer}}),Object.defineProperty(s,"setLayerDimensions",{enumerable:!0,get:function(){return u.setLayerDimensions}}),Object.defineProperty(s,"shadow",{enumerable:!0,get:function(){return M.shadow}}),Object.defineProperty(s,"updateTextLayer",{enumerable:!0,get:function(){return z.updateTextLayer}}),Object.defineProperty(s,"version",{enumerable:!0,get:function(){return o.version}});var M=__w_pdfjs_require__(1),o=__w_pdfjs_require__(138),u=__w_pdfjs_require__(142),z=__w_pdfjs_require__(161),W=__w_pdfjs_require__(162),O=__w_pdfjs_require__(141),N=__w_pdfjs_require__(165),X=__w_pdfjs_require__(149),y=__w_pdfjs_require__(168),G=__w_pdfjs_require__(167)})(),__webpack_exports__})())})(pdf_min$2);var pdf_minExports=pdf_min$2.exports;const pdf_min=getDefaultExportFromCjs(pdf_minExports),pdf_min$1=Object.freeze(Object.defineProperty({__proto__:null,default:pdf_min},Symbol.toStringTag,{value:"Module"})),pdf_minF72cfa08=Object.freeze(Object.defineProperty({__proto__:null,p:pdf_min$1},Symbol.toStringTag,{value:"Module"}));exports.Button=_sfc_main$F,exports.Card=Card$1,exports.DEFAULT_FETCH_OPTIONS=DEFAULT_FETCH_OPTIONS,exports.DynamicCarousel=_sfc_main$A,exports.IconButton=IconButton,exports.IndicatorColor=IndicatorColor,exports.MenuButton=_sfc_main$x,exports.ProductPrice=ProductPrice,exports.ProductProps=_sfc_main$f,exports.ProductTag=ProductTag,exports.SectionSpinner=SectionSpinner,exports.SectionsContainer=SectionsContainer,exports.StateIndicator=StateIndicator,exports.WidgetsIndex=WidgetsIndex,exports.createFetchUniq=createFetchUniq,exports.default=W2WSharedUi,exports.getFetchUniq=getFetchUniq,exports.getValue=getValue,exports.setFetchUniq=setFetchUniq,exports.useDragAndDrop=useDragAndDrop,exports.useFetch=useFetch,exports.useFetchPages=useFetchPages,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
70
+ `}setFont(D){const v=this.current,q=this.commonObjs.get(D[0]);let i0=D[1];v.font=q,this.embedFonts&&!q.missingFile&&!this.embeddedFonts[q.loadedName]&&(this.addFontStyle(q),this.embeddedFonts[q.loadedName]=q),v.fontMatrix=q.fontMatrix||z.FONT_IDENTITY_MATRIX;let t0="normal";q.black?t0="900":q.bold&&(t0="bold");const P=q.italic?"italic":"normal";i0<0?(i0=-i0,v.fontDirection=-1):v.fontDirection=1,v.fontSize=i0,v.fontFamily=q.loadedName,v.fontWeight=t0,v.fontStyle=P,v.tspan=this.svgFactory.createElement("svg:tspan"),v.tspan.setAttributeNS(null,"y",X(-v.y)),v.xcoords=[],v.ycoords=[]}endText(){var D;const v=this.current;v.textRenderingMode&z.TextRenderingMode.ADD_TO_PATH_FLAG&&(D=v.txtElement)!==null&&D!==void 0&&D.hasChildNodes()&&(v.element=v.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(D){D>0&&(this.current.lineWidth=D)}setLineCap(D){this.current.lineCap=R[D]}setLineJoin(D){this.current.lineJoin=S[D]}setMiterLimit(D){this.current.miterLimit=D}setStrokeAlpha(D){this.current.strokeAlpha=D}setStrokeRGBColor(D,v,q){this.current.strokeColor=z.Util.makeHexColor(D,v,q)}setFillAlpha(D){this.current.fillAlpha=D}setFillRGBColor(D,v,q){this.current.fillColor=z.Util.makeHexColor(D,v,q),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(D){this.current.strokeColor=this._makeColorN_Pattern(D)}setFillColorN(D){this.current.fillColor=this._makeColorN_Pattern(D)}shadingFill(D){const v=this.viewport.width,q=this.viewport.height,i0=z.Util.inverseTransform(this.transformMatrix),t0=z.Util.applyTransform([0,0],i0),P=z.Util.applyTransform([0,q],i0),c0=z.Util.applyTransform([v,0],i0),s0=z.Util.applyTransform([v,q],i0),W0=Math.min(t0[0],P[0],c0[0],s0[0]),M0=Math.min(t0[1],P[1],c0[1],s0[1]),X0=Math.max(t0[0],P[0],c0[0],s0[0]),B=Math.max(t0[1],P[1],c0[1],s0[1]),Q=this.svgFactory.createElement("svg:rect");Q.setAttributeNS(null,"x",W0),Q.setAttributeNS(null,"y",M0),Q.setAttributeNS(null,"width",X0-W0),Q.setAttributeNS(null,"height",B-M0),Q.setAttributeNS(null,"fill",this._makeShadingPattern(D)),this.current.fillAlpha<1&&Q.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(Q)}_makeColorN_Pattern(D){return D[0]==="TilingPattern"?this._makeTilingPattern(D):this._makeShadingPattern(D)}_makeTilingPattern(D){const v=D[1],q=D[2],i0=D[3]||z.IDENTITY_MATRIX,[t0,P,c0,s0]=D[4],W0=D[5],M0=D[6],X0=D[7],B="shading"+E++,[Q,$,l0,_]=z.Util.normalizeRect([...z.Util.applyTransform([t0,P],i0),...z.Util.applyTransform([c0,s0],i0)]),[H,d0]=z.Util.singularValueDecompose2dScale(i0),p0=W0*H,m0=M0*d0,r0=this.svgFactory.createElement("svg:pattern");r0.setAttributeNS(null,"id",B),r0.setAttributeNS(null,"patternUnits","userSpaceOnUse"),r0.setAttributeNS(null,"width",p0),r0.setAttributeNS(null,"height",m0),r0.setAttributeNS(null,"x",`${Q}`),r0.setAttributeNS(null,"y",`${$}`);const O0=this.svg,h0=this.transformMatrix,G0=this.current.fillColor,z0=this.current.strokeColor,g0=this.svgFactory.create(l0-Q,_-$);if(this.svg=g0,this.transformMatrix=i0,X0===2){const f0=z.Util.makeHexColor(...v);this.current.fillColor=f0,this.current.strokeColor=f0}return this.executeOpTree(this.convertOpList(q)),this.svg=O0,this.transformMatrix=h0,this.current.fillColor=G0,this.current.strokeColor=z0,r0.append(g0.childNodes[0]),this.defs.append(r0),`url(#${B})`}_makeShadingPattern(D){switch(typeof D=="string"&&(D=this.objs.get(D)),D[0]){case"RadialAxial":const v="shading"+E++,q=D[3];let i0;switch(D[1]){case"axial":const t0=D[4],P=D[5];i0=this.svgFactory.createElement("svg:linearGradient"),i0.setAttributeNS(null,"id",v),i0.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),i0.setAttributeNS(null,"x1",t0[0]),i0.setAttributeNS(null,"y1",t0[1]),i0.setAttributeNS(null,"x2",P[0]),i0.setAttributeNS(null,"y2",P[1]);break;case"radial":const c0=D[4],s0=D[5],W0=D[6],M0=D[7];i0=this.svgFactory.createElement("svg:radialGradient"),i0.setAttributeNS(null,"id",v),i0.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),i0.setAttributeNS(null,"cx",s0[0]),i0.setAttributeNS(null,"cy",s0[1]),i0.setAttributeNS(null,"r",M0),i0.setAttributeNS(null,"fx",c0[0]),i0.setAttributeNS(null,"fy",c0[1]),i0.setAttributeNS(null,"fr",W0);break;default:throw new Error(`Unknown RadialAxial type: ${D[1]}`)}for(const t0 of q){const P=this.svgFactory.createElement("svg:stop");P.setAttributeNS(null,"offset",t0[0]),P.setAttributeNS(null,"stop-color",t0[1]),i0.append(P)}return this.defs.append(i0),`url(#${v})`;case"Mesh":return(0,z.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${D[0]}`)}}setDash(D,v){this.current.dashArray=D,this.current.dashPhase=v}constructPath(D,v){const q=this.current;let i0=q.x,t0=q.y,P=[],c0=0;for(const s0 of D)switch(0|s0){case z.OPS.rectangle:i0=v[c0++],t0=v[c0++];const W0=i0+v[c0++],M0=t0+v[c0++];P.push("M",X(i0),X(t0),"L",X(W0),X(t0),"L",X(W0),X(M0),"L",X(i0),X(M0),"Z");break;case z.OPS.moveTo:i0=v[c0++],t0=v[c0++],P.push("M",X(i0),X(t0));break;case z.OPS.lineTo:i0=v[c0++],t0=v[c0++],P.push("L",X(i0),X(t0));break;case z.OPS.curveTo:i0=v[c0+4],t0=v[c0+5],P.push("C",X(v[c0]),X(v[c0+1]),X(v[c0+2]),X(v[c0+3]),X(i0),X(t0)),c0+=6;break;case z.OPS.curveTo2:P.push("C",X(i0),X(t0),X(v[c0]),X(v[c0+1]),X(v[c0+2]),X(v[c0+3])),i0=v[c0+2],t0=v[c0+3],c0+=4;break;case z.OPS.curveTo3:i0=v[c0+2],t0=v[c0+3],P.push("C",X(v[c0]),X(v[c0+1]),X(i0),X(t0),X(i0),X(t0)),c0+=4;break;case z.OPS.closePath:P.push("Z")}P=P.join(" "),q.path&&D.length>0&&D[0]!==z.OPS.rectangle&&D[0]!==z.OPS.moveTo?P=q.path.getAttributeNS(null,"d")+P:(q.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(q.path)),q.path.setAttributeNS(null,"d",P),q.path.setAttributeNS(null,"fill","none"),q.element=q.path,q.setCurrentPoint(i0,t0)}endPath(){const D=this.current;if(D.path=null,!this.pendingClip)return;if(!D.element){this.pendingClip=null;return}const v="clippath"+j++,q=this.svgFactory.createElement("svg:clipPath");q.setAttributeNS(null,"id",v),q.setAttributeNS(null,"transform",y(this.transformMatrix));const i0=D.element.cloneNode(!0);if(this.pendingClip==="evenodd"?i0.setAttributeNS(null,"clip-rule","evenodd"):i0.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,q.append(i0),this.defs.append(q),D.activeClipUrl){D.clipGroup=null;for(const t0 of this.extraStack)t0.clipGroup=null;q.setAttributeNS(null,"clip-path",D.activeClipUrl)}D.activeClipUrl=`url(#${v})`,this.tgrp=null}clip(D){this.pendingClip=D}closePath(){const D=this.current;if(D.path){const v=`${D.path.getAttributeNS(null,"d")}Z`;D.path.setAttributeNS(null,"d",v)}}setLeading(D){this.current.leading=-D}setTextRise(D){this.current.textRise=D}setTextRenderingMode(D){this.current.textRenderingMode=D}setHScale(D){this.current.textHScale=D/100}setRenderingIntent(D){}setFlatness(D){}setGState(D){for(const[v,q]of D)switch(v){case"LW":this.setLineWidth(q);break;case"LC":this.setLineCap(q);break;case"LJ":this.setLineJoin(q);break;case"ML":this.setMiterLimit(q);break;case"D":this.setDash(q[0],q[1]);break;case"RI":this.setRenderingIntent(q);break;case"FL":this.setFlatness(q);break;case"Font":this.setFont(q);break;case"CA":this.setStrokeAlpha(q);break;case"ca":this.setFillAlpha(q);break;default:(0,z.warn)(`Unimplemented graphic state operator ${v}`)}}fill(){const D=this.current;D.element&&(D.element.setAttributeNS(null,"fill",D.fillColor),D.element.setAttributeNS(null,"fill-opacity",D.fillAlpha),this.endPath())}stroke(){const D=this.current;D.element&&(this._setStrokeAttributes(D.element),D.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(D){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const q=this.current;let i0=q.dashArray;v!==1&&i0.length>0&&(i0=i0.map(function(t0){return v*t0})),D.setAttributeNS(null,"stroke",q.strokeColor),D.setAttributeNS(null,"stroke-opacity",q.strokeAlpha),D.setAttributeNS(null,"stroke-miterlimit",X(q.miterLimit)),D.setAttributeNS(null,"stroke-linecap",q.lineCap),D.setAttributeNS(null,"stroke-linejoin",q.lineJoin),D.setAttributeNS(null,"stroke-width",X(v*q.lineWidth)+"px"),D.setAttributeNS(null,"stroke-dasharray",i0.map(X).join(" ")),D.setAttributeNS(null,"stroke-dashoffset",X(v*q.dashPhase)+"px")}eoFill(){var D;(D=this.current.element)===null||D===void 0||D.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){var D;(D=this.current.element)===null||D===void 0||D.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const D=this.svgFactory.createElement("svg:rect");D.setAttributeNS(null,"x","0"),D.setAttributeNS(null,"y","0"),D.setAttributeNS(null,"width","1px"),D.setAttributeNS(null,"height","1px"),D.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(D)}paintImageXObject(D){const v=this.getObject(D);v?this.paintInlineImageXObject(v):(0,z.warn)(`Dependent image with object ID ${D} is not ready yet`)}paintInlineImageXObject(D,v){const q=D.width,i0=D.height,t0=F(D,this.forceDataSchema,!!v),P=this.svgFactory.createElement("svg:rect");P.setAttributeNS(null,"x","0"),P.setAttributeNS(null,"y","0"),P.setAttributeNS(null,"width",X(q)),P.setAttributeNS(null,"height",X(i0)),this.current.element=P,this.clip("nonzero");const c0=this.svgFactory.createElement("svg:image");c0.setAttributeNS(g,"xlink:href",t0),c0.setAttributeNS(null,"x","0"),c0.setAttributeNS(null,"y",X(-i0)),c0.setAttributeNS(null,"width",X(q)+"px"),c0.setAttributeNS(null,"height",X(i0)+"px"),c0.setAttributeNS(null,"transform",`scale(${X(1/q)} ${X(-1/i0)})`),v?v.append(c0):this._ensureTransformGroup().append(c0)}paintImageMaskXObject(D){const v=this.getObject(D.data,D);if(v.bitmap){(0,z.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");return}const q=this.current,i0=v.width,t0=v.height,P=q.fillColor;q.maskId="mask"+U++;const c0=this.svgFactory.createElement("svg:mask");c0.setAttributeNS(null,"id",q.maskId);const s0=this.svgFactory.createElement("svg:rect");s0.setAttributeNS(null,"x","0"),s0.setAttributeNS(null,"y","0"),s0.setAttributeNS(null,"width",X(i0)),s0.setAttributeNS(null,"height",X(t0)),s0.setAttributeNS(null,"fill",P),s0.setAttributeNS(null,"mask",`url(#${q.maskId})`),this.defs.append(c0),this._ensureTransformGroup().append(s0),this.paintInlineImageXObject(v,c0)}paintFormXObjectBegin(D,v){if(Array.isArray(D)&&D.length===6&&this.transform(D[0],D[1],D[2],D[3],D[4],D[5]),v){const q=v[2]-v[0],i0=v[3]-v[1],t0=this.svgFactory.createElement("svg:rect");t0.setAttributeNS(null,"x",v[0]),t0.setAttributeNS(null,"y",v[1]),t0.setAttributeNS(null,"width",X(q)),t0.setAttributeNS(null,"height",X(i0)),this.current.element=t0,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(D){const v=this.svgFactory.create(D.width,D.height),q=this.svgFactory.createElement("svg:defs");v.append(q),this.defs=q;const i0=this.svgFactory.createElement("svg:g");return i0.setAttributeNS(null,"transform",y(D.transform)),v.append(i0),this.svg=i0,v}_ensureClipGroup(){if(!this.current.clipGroup){const D=this.svgFactory.createElement("svg:g");D.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(D),this.current.clipGroup=D}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",y(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}}}],__webpack_module_cache__={};function __w_pdfjs_require__(s){var M=__webpack_module_cache__[s];if(M!==void 0)return M.exports;var o=__webpack_module_cache__[s]={exports:{}};return __webpack_modules__[s].call(o.exports,o,o.exports,__w_pdfjs_require__),o.exports}var __webpack_exports__={};return(()=>{var s=__webpack_exports__;Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"AbortException",{enumerable:!0,get:function(){return M.AbortException}}),Object.defineProperty(s,"AnnotationEditorLayer",{enumerable:!0,get:function(){return W.AnnotationEditorLayer}}),Object.defineProperty(s,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return M.AnnotationEditorParamsType}}),Object.defineProperty(s,"AnnotationEditorType",{enumerable:!0,get:function(){return M.AnnotationEditorType}}),Object.defineProperty(s,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return O.AnnotationEditorUIManager}}),Object.defineProperty(s,"AnnotationLayer",{enumerable:!0,get:function(){return N.AnnotationLayer}}),Object.defineProperty(s,"AnnotationMode",{enumerable:!0,get:function(){return M.AnnotationMode}}),Object.defineProperty(s,"CMapCompressionType",{enumerable:!0,get:function(){return M.CMapCompressionType}}),Object.defineProperty(s,"FeatureTest",{enumerable:!0,get:function(){return M.FeatureTest}}),Object.defineProperty(s,"GlobalWorkerOptions",{enumerable:!0,get:function(){return X.GlobalWorkerOptions}}),Object.defineProperty(s,"InvalidPDFException",{enumerable:!0,get:function(){return M.InvalidPDFException}}),Object.defineProperty(s,"MissingPDFException",{enumerable:!0,get:function(){return M.MissingPDFException}}),Object.defineProperty(s,"OPS",{enumerable:!0,get:function(){return M.OPS}}),Object.defineProperty(s,"PDFDataRangeTransport",{enumerable:!0,get:function(){return o.PDFDataRangeTransport}}),Object.defineProperty(s,"PDFDateString",{enumerable:!0,get:function(){return u.PDFDateString}}),Object.defineProperty(s,"PDFWorker",{enumerable:!0,get:function(){return o.PDFWorker}}),Object.defineProperty(s,"PasswordResponses",{enumerable:!0,get:function(){return M.PasswordResponses}}),Object.defineProperty(s,"PermissionFlag",{enumerable:!0,get:function(){return M.PermissionFlag}}),Object.defineProperty(s,"PixelsPerInch",{enumerable:!0,get:function(){return u.PixelsPerInch}}),Object.defineProperty(s,"PromiseCapability",{enumerable:!0,get:function(){return M.PromiseCapability}}),Object.defineProperty(s,"RenderingCancelledException",{enumerable:!0,get:function(){return u.RenderingCancelledException}}),Object.defineProperty(s,"SVGGraphics",{enumerable:!0,get:function(){return y.SVGGraphics}}),Object.defineProperty(s,"UnexpectedResponseException",{enumerable:!0,get:function(){return M.UnexpectedResponseException}}),Object.defineProperty(s,"Util",{enumerable:!0,get:function(){return M.Util}}),Object.defineProperty(s,"VerbosityLevel",{enumerable:!0,get:function(){return M.VerbosityLevel}}),Object.defineProperty(s,"XfaLayer",{enumerable:!0,get:function(){return G.XfaLayer}}),Object.defineProperty(s,"build",{enumerable:!0,get:function(){return o.build}}),Object.defineProperty(s,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return M.createValidAbsoluteUrl}}),Object.defineProperty(s,"getDocument",{enumerable:!0,get:function(){return o.getDocument}}),Object.defineProperty(s,"getFilenameFromUrl",{enumerable:!0,get:function(){return u.getFilenameFromUrl}}),Object.defineProperty(s,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return u.getPdfFilenameFromUrl}}),Object.defineProperty(s,"getXfaPageViewport",{enumerable:!0,get:function(){return u.getXfaPageViewport}}),Object.defineProperty(s,"isDataScheme",{enumerable:!0,get:function(){return u.isDataScheme}}),Object.defineProperty(s,"isPdfFile",{enumerable:!0,get:function(){return u.isPdfFile}}),Object.defineProperty(s,"loadScript",{enumerable:!0,get:function(){return u.loadScript}}),Object.defineProperty(s,"normalizeUnicode",{enumerable:!0,get:function(){return M.normalizeUnicode}}),Object.defineProperty(s,"renderTextLayer",{enumerable:!0,get:function(){return z.renderTextLayer}}),Object.defineProperty(s,"setLayerDimensions",{enumerable:!0,get:function(){return u.setLayerDimensions}}),Object.defineProperty(s,"shadow",{enumerable:!0,get:function(){return M.shadow}}),Object.defineProperty(s,"updateTextLayer",{enumerable:!0,get:function(){return z.updateTextLayer}}),Object.defineProperty(s,"version",{enumerable:!0,get:function(){return o.version}});var M=__w_pdfjs_require__(1),o=__w_pdfjs_require__(138),u=__w_pdfjs_require__(142),z=__w_pdfjs_require__(161),W=__w_pdfjs_require__(162),O=__w_pdfjs_require__(141),N=__w_pdfjs_require__(165),X=__w_pdfjs_require__(149),y=__w_pdfjs_require__(168),G=__w_pdfjs_require__(167)})(),__webpack_exports__})())})(pdf_min$2);var pdf_minExports=pdf_min$2.exports;const pdf_min=getDefaultExportFromCjs(pdf_minExports),pdf_min$1=Object.freeze(Object.defineProperty({__proto__:null,default:pdf_min},Symbol.toStringTag,{value:"Module"})),pdf_minF72cfa08=Object.freeze(Object.defineProperty({__proto__:null,p:pdf_min$1},Symbol.toStringTag,{value:"Module"}));exports.BrokerCard=BrokerCard,exports.BrokerDetail=BrokerDetail,exports.Button=_sfc_main$F,exports.Card=Card$1,exports.DEFAULT_FETCH_OPTIONS=DEFAULT_FETCH_OPTIONS,exports.DynamicCarousel=_sfc_main$A,exports.IconButton=IconButton,exports.IndicatorColor=IndicatorColor,exports.MenuButton=_sfc_main$x,exports.ProductPrice=ProductPrice,exports.ProductProps=_sfc_main$f,exports.ProductTag=ProductTag,exports.SectionSpinner=SectionSpinner,exports.SectionsContainer=SectionsContainer,exports.StateIndicator=StateIndicator,exports.WidgetsIndex=WidgetsIndex,exports.createFetchUniq=createFetchUniq,exports.default=W2WSharedUi,exports.getFetchUniq=getFetchUniq,exports.getValue=getValue,exports.setFetchUniq=setFetchUniq,exports.useDragAndDrop=useDragAndDrop,exports.useFetch=useFetch,exports.useFetchPages=useFetchPages,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});