@win2win/shared-ui 0.2.35 → 0.2.36

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.
@@ -76,10 +76,10 @@ function print() { __p += __j.call(arguments, '') }
76
76
  return false
77
77
  } }`,exclusive:!1}],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:`(values) => { if(['pantallas_led_modulares','totems','pantallas_lcd', 'controladoras'].includes(values.gama)) return true;
78
78
  return false;
79
- }`},controlType:"select"},{id:"6e8b965c-d68a-4dd5-ad28-64d4aa400eb2",code:"compatible_videowall",image:null,label:"Compatible videowall",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(values.gama === 'pantallas_led_modulares') return true; return false }"},controlType:"checkbox"},{id:"e6ebbb08-0245-4698-91e4-0ba0c0a50368",code:"tipo_montaje",image:null,label:"Tipo de montaje",prefix:"",suffix:"",options:[{image:null,label:"Matriz",value:"matriz",condition:"",exclusive:!1},{image:null,label:"Standalone",value:"standalone",condition:"",exclusive:!1},{image:null,label:"Mural",value:"mural",condition:"",exclusive:!1}],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['pantallas_led_modulares','totems','pantallas_lcd','banderola'].includes(values.gama)) return true; return false }"},controlType:"select"},{id:"81156583-de0a-4467-bd02-f1da769708db",code:"tasa_refresco",image:null,label:"Tasa de refresco (Hz)",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['pantallas_led_modulares','totems','pantallas_lcd','banderola'].includes(values.gama)) return true; return false }"},controlType:"input_number"},{id:"c1dff0d1-d622-4878-8ee4-516c55958714",code:"modelo",image:null,label:"Modelo",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['pantallas_led_modulares','totems','pantallas_lcd','banderola'].includes(values.gama)) return true; return false }"},controlType:"input_text"},{id:"9004ddcc-6a42-49ef-8a29-2b302e7b0f6e",code:"usos_habituales",image:null,label:"Usos habituales",prefix:"",suffix:"",options:[{image:null,label:"Tiendas, Recepciones, Hall, Salas de espera, Showrooms, Galerías",value:"tiendas_recepciones_hall_salas_de_espera_showrooms_galerias",condition:"",exclusive:!1},{image:null,label:"Escaparates o vitrinas expuestas al sol",value:"escaparates_o_vitrinas_expuestas_al_sol",condition:"",exclusive:!1},{image:null,label:"Eventos, Estadios, Mobiliario Urbano",value:"eventos_estadios_mobiliario_urbano",condition:"",exclusive:!1},{image:null,label:"Salas de Control, Estudios de TV, Salas de Videoconferencia, Auditorios",value:"salas_de_control_estudios_de_tv_salas_de_videoconferencia_auditorios",condition:"",exclusive:!1},{image:null,label:"Entornos con mucho tránsito como centros comerciales, aeropuertos o vestíbulos",value:"entornos_con_mucho_transito_como_centros_comerciales_aeropuertos_o_vestibulos",condition:"",exclusive:!1}],multiple:!0,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['pantallas_led_modulares','totems','pantallas_lcd','banderola'].includes(values.gama)) return true; return false }"},controlType:"select"},{id:"9a2e6614-a2d3-47ca-9559-0e86b9794f17",code:"proteccion_ip",image:null,label:"Protección IP",prefix:"",suffix:"",options:[{image:null,label:"IP20: Productos de interior",value:"ip_20_productos_de_interior",condition:"",exclusive:!1},{image:null,label:"IP56: Protegido contra polvo y chorros potentes de agua",value:"ip_56_protegido_contra_polvo_y_chorros_potentes_de_agua",condition:"",exclusive:!1},{image:null,label:" IP43: Protegido contra objetos de más de 1mm y agua pulverizada.",value:"ip_43_protegido_contra_objetos_de_mas_de_1_mm_y_agua_pulverizada",condition:"",exclusive:!1},{image:null,label:"IP65: Totalmente protegido contra polvo y chorros de agua (parte frontal)",value:"ip_65_totalmente_protegido_contra_polvo_y_chorros_de_agua_parte_frontal",condition:"",exclusive:!1},{image:null,label:"IP54: Alta resistencia a polvo y salpicaduras",value:"ip_54_alta_resistencia_a_polvo_y_salpicaduras",condition:"",exclusive:!1},{image:null,label:"IP65/IP43",value:"ip_65_ip_43",condition:"",exclusive:!1}],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['pantallas_led_modulares','totems','pantallas_lcd','banderola','controladoras'].includes(values.gama)) return true; return false }"},controlType:"select"},{id:"2ba06c97-3132-440c-9a3e-7b87cf49ef26",code:"gran_formato_independiente",image:null,label:"Gran formato independiente",prefix:"",suffix:"",options:[{image:null,label:"Si",value:"si",condition:"",exclusive:!1}],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['lcd'].includes(values.subgama)) return true; return false; }"},controlType:"select"},{id:"82e115bd-0c05-4d3f-b92f-28ef2f5a4367",code:"peso_kg",image:null,label:"Peso (kg)",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['pantallas_led_modulares','totems','pantallas_lcd','banderola'].includes(values.gama)) return true; return false }"},controlType:"input_text"},{id:"6f6b3dda-aeed-4458-9242-95b55b316675",code:"consumo_medio_w",image:null,label:"Consumo medio (W)",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['pantallas_led_modulares','totems','pantallas_lcd','banderola'].includes(values.gama)) return true; return false }"},controlType:"input_text"},{id:"2eb6ef27-3574-47e4-b519-2cd6c1f55824",code:"consumo_maximo_w",image:null,label:"Consumo Máximo (W)",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['pantallas_led_modulares','totems','pantallas_lcd','banderola'].includes(values.gama)) return true; return false }"},controlType:"input_text"},{id:"82b23d3e-8d67-455c-882c-a643f5ef3c8b",code:"material",image:null,label:"Material",prefix:"",suffix:"",options:[{image:null,label:"Aluminio Fundido",value:"aluminio_fundido",condition:"",exclusive:!1},{image:null,label:"Aluminio",value:"aluminio",condition:"",exclusive:!1},{image:null,label:"Acero/Aluminio (para la carcasa exterior).",value:"acero_aluminio_para_la_carcasa_exterior",condition:"",exclusive:!1},{image:null,label:"Estructura de Aluminio (Ligero, Robusto, Resistente a la Corrosión)",value:"estructura_de_aluminio_ligero_robusto_resistente_a_la_corrosion",condition:"",exclusive:!1},{image:null,label:"Material robusto y duradero",value:"material_robusto_y_duradero",condition:"",exclusive:!1}],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['pantallas_led_modulares','totems','pantallas_lcd','banderola'].includes(values.gama)) return true; return false }"},controlType:"select"},{id:"903a14ee-2735-4961-8f47-2c25611f039d",code:"tamano",image:null,label:"Tamaño",prefix:"",suffix:"",options:[{image:null,label:'43"',value:"43",condition:"",exclusive:!1},{image:null,label:'49"',value:"49",condition:"",exclusive:!1},{image:null,label:'55"',value:"55",condition:"",exclusive:!1},{image:null,label:'65"',value:"65",condition:"",exclusive:!1},{image:null,label:'75"',value:"75",condition:"",exclusive:!1}],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['lcd','qled'].includes(values.subgama)) return true; return false; }"},controlType:"select"},{id:"df3e8ee5-4656-4234-8d2c-7d4bcc434dc0",code:"unidad_de_medida",image:null,label:"Unidad de Medida",prefix:"",suffix:"",options:[{image:null,label:"mm",value:"mm",condition:"",exclusive:!1},{image:null,label:"cm",value:"cm",condition:"",exclusive:!1},{image:null,label:"m",value:"m",condition:"",exclusive:!1}],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['led'].includes(values.subgama)) return true; return false; }"},controlType:"select"},{id:"c79337f4-4a46-469e-abea-e6bd7ff9e422",code:"ancho",image:null,label:"Ancho",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['led'].includes(values.subgama)) return true; return false; }"},controlType:"input_text"},{id:"8ac0bc48-9b88-4689-a876-3c369262ed47",code:"alto",image:null,label:"Alto",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['led'].includes(values.subgama)) return true; return false; }"},controlType:"input_text"},{id:"dface708-9c21-44af-a434-b3a93d7eb1ce",code:"profundidad",image:null,label:"Profundidad",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['led'].includes(values.subgama)) return true; return false; }"},controlType:"input_text"},{id:"26f0bfec-1dcd-43ff-b5f1-8b4a162ba7c1",code:"a_medida",image:null,label:"A medida",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['pantallas_led_modulares','totems','pantallas_lcd','banderola'].includes(values.gama)) return true; return false }"},controlType:"checkbox"},{id:"e4cb73c3-67ab-4f63-94da-0db922dc5990",code:"codigo_ean",image:null,label:"Código EAN",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0},controlType:"input_text"},{id:"9e86e10f-cbef-439f-8bcc-3938b5dd493e",code:"compatibilidad_de_senal",image:null,label:"Compatibilidad de señal",prefix:"",suffix:"",options:[{image:null,label:"DVI",value:"dvi",condition:"",exclusive:!1},{image:null,label:"SDI (3G-SDI)",value:"sdi_3_g_sdi",condition:"",exclusive:!1},{image:null,label:"VGA",value:"vga",condition:"",exclusive:!1},{image:null,label:"CVBS",value:"cvbs",condition:"",exclusive:!1},{image:null,label:"USB",value:"usb",condition:"",exclusive:!1},{image:null,label:"Red (LAN / Wi-Fi / 4G)",value:"red_lan_wi_fi_4_g",condition:"",exclusive:!1},{image:null,label:"HDMI",value:"hdmi",condition:"",exclusive:!1},{image:null,label:"HDMI 1.4",value:"hdmi_1_4",condition:"",exclusive:!1},{image:null,label:"DisplayPort",value:"displayport",condition:"",exclusive:!1},{image:null,label:"DisplayPort 1.0",value:"displayport_1_0",condition:"",exclusive:!1},{image:null,label:"DisplayPort 1.1",value:"displayport_1_1",condition:"",exclusive:!1},{image:null,label:"DisplayPort 1.2",value:"displayport_1_2",condition:"",exclusive:!1},{image:null,label:"DisplayPort 1.3",value:"displayport_1_3",condition:"",exclusive:!1},{image:null,label:"DisplayPort 1.4",value:"displayport_1_4",condition:"",exclusive:!1},{image:null,label:"DisplayPort 2.0",value:"displayport_2_0",condition:"",exclusive:!1},{image:null,label:"DisplayPort 2.4",value:"displayport_2_4",condition:"",exclusive:!1}],multiple:!0,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['controladoras'].includes(values.gama)) return true; return false }"},controlType:"select"}]},LINVERMEDIA_PRODUCT_DETAIL_MOCK_PROPS={isPublic:!0,data:null,fetching:!1,scale:1,gama},LinvermediaProductDetailPropsSchema=WidgetPropsSchema.extend({view:enumType(["detail","summary"]).optional(),title:stringType().optional(),gama:objectType({PROPS: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"}}},WidgetsIndex=lodashExports.mapValues(LocalWidgetsIndex,s=>lodashExports.omit(s,"mock")),W2WSharedUi={install(s,u){if(u!=null&&u.pinia)s.use(u.pinia);else throw new Error("No se ha encontrado una instancia de pinia");s.component("DynamicForm",_sfc_main$o),s.component("SectionsContainer",SectionsContainer),s.component("Card",Card$1),s.component("DynamicCarousel",_sfc_main$I),s.component("IndicatorColor",IndicatorColor$1),s.component("SectionSpinner",SectionSpinner),s.component("StateIndicator",StateIndicator),s.component("WinIconButton",WinIconButton),Object.entries(WidgetsIndex).forEach(([o,r])=>{s.component(o,r.component)})}};var vr=Object.defineProperty,br=(s,u,o)=>u in s?vr(s,u,{enumerable:!0,configurable:!0,writable:!0,value:o}):s[u]=o,It=(s,u,o)=>(br(s,typeof u!="symbol"?u+"":u,o),o),ye=(s,u,o)=>{if(!u.has(s))throw TypeError("Cannot "+o)},T=(s,u,o)=>(ye(s,u,"read from private field"),o?o.call(s):u.get(s)),et=(s,u,o)=>{if(u.has(s))throw TypeError("Cannot add the same private member more than once");u instanceof WeakSet?u.add(s):u.set(s,o)},ut=(s,u,o,r)=>(ye(s,u,"write to private field"),u.set(s,o),o),ue=(s,u,o,r)=>({set _(W){ut(s,u,W)},get _(){return T(s,u,r)}}),nt=(s,u,o)=>(ye(s,u,"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 u=s.default;if(typeof u=="function"){var o=function r(){if(this instanceof r){var W=[null];W.push.apply(W,arguments);var M=Function.bind.apply(u,W);return new M}return u.apply(this,arguments)};o.prototype=u.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var W=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(o,r,W.get?W:{enumerable:!0,get:function(){return s[r]}})}),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(Y,S,D){for(var R,g=0,J=S.length;g<J;g++)!R&&g in S||(R||(R=Array.prototype.slice.call(S,0,g)),R[g]=S[g]);return Y.concat(R||Array.prototype.slice.call(S))}var u={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},o=/([astvzqmhlc])([^astvzqmhlc]*)/gi,r=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function W(Y){var S=[],D=String(Y).trim();return D[0]!=="M"&&D[0]!=="m"||D.replace(o,function(R,g,J){var U=function(v){var K=v.match(r);return K?K.map(Number):[]}(J),H=g.toLowerCase(),C=g;if(H==="m"&&U.length>2&&(S.push(s([C],U.splice(0,2))),H="l",C=C==="m"?"l":"L"),U.length<u[H])return"";for(S.push(s([C],U.splice(0,u[H])));U.length>=u[H]&&U.length&&u[H];)S.push(s([C],U.splice(0,u[H])));return""}),S}function M(Y,S){var D=Y.x*Math.cos(S)-Y.y*Math.sin(S),R=Y.y*Math.cos(S)+Y.x*Math.sin(S);Y.x=D,Y.y=R}function y(Y,S){Y.x*=S,Y.y*=S}var N=function(){function Y(S){var D;this.commands=[],S&&S instanceof Y?(D=this.commands).push.apply(D,S.commands):S&&(this.commands=W(S))}return Y.prototype.addPath=function(S){var D;S&&S instanceof Y&&(D=this.commands).push.apply(D,S.commands)},Y.prototype.moveTo=function(S,D){this.commands.push(["M",S,D])},Y.prototype.lineTo=function(S,D){this.commands.push(["L",S,D])},Y.prototype.arc=function(S,D,R,g,J,U){this.commands.push(["AC",S,D,R,g,J,!!U])},Y.prototype.arcTo=function(S,D,R,g,J){this.commands.push(["AT",S,D,R,g,J])},Y.prototype.ellipse=function(S,D,R,g,J,U,H,C){this.commands.push(["E",S,D,R,g,J,U,H,!!C])},Y.prototype.closePath=function(){this.commands.push(["Z"])},Y.prototype.bezierCurveTo=function(S,D,R,g,J,U){this.commands.push(["C",S,D,R,g,J,U])},Y.prototype.quadraticCurveTo=function(S,D,R,g){this.commands.push(["Q",S,D,R,g])},Y.prototype.rect=function(S,D,R,g){this.commands.push(["R",S,D,R,g])},Y.prototype.roundRect=function(S,D,R,g,J){J===void 0?this.commands.push(["RR",S,D,R,g,0]):this.commands.push(["RR",S,D,R,g,J])},Y}();function X(Y,S){var D,R,g,J,U,H,C,v,K,j,O,_,cl,tl,E,il,al,Nl,nl,Sl,P,Q,q,ll,B=0,F=0,el=null,dl=null,Zl=null,Wl=null,Gl=null,Il=null;Y.beginPath();for(var xl=0;xl<S.length;++xl){(Nl=S[xl][0])!=="S"&&Nl!=="s"&&Nl!=="C"&&Nl!=="c"&&(el=null,dl=null),Nl!=="T"&&Nl!=="t"&&Nl!=="Q"&&Nl!=="q"&&(Zl=null,Wl=null);var bl=void 0;switch(Nl){case"m":case"M":bl=S[xl],Nl==="m"?(B+=bl[1],F+=bl[2]):(B=bl[1],F=bl[2]),Nl!=="M"&&Gl||(Gl={x:B,y:F}),Y.moveTo(B,F);break;case"l":B+=(bl=S[xl])[1],F+=bl[2],Y.lineTo(B,F);break;case"L":B=(bl=S[xl])[1],F=bl[2],Y.lineTo(B,F);break;case"H":B=(bl=S[xl])[1],Y.lineTo(B,F);break;case"h":B+=(bl=S[xl])[1],Y.lineTo(B,F);break;case"V":F=(bl=S[xl])[1],Y.lineTo(B,F);break;case"v":F+=(bl=S[xl])[1],Y.lineTo(B,F);break;case"a":case"A":if(bl=S[xl],Il===null)throw new Error("This should never happen");Nl==="a"?(B+=bl[6],F+=bl[7]):(B=bl[6],F=bl[7]),tl=bl[1],E=bl[2],C=bl[3]*Math.PI/180,g=!!bl[4],J=!!bl[5],U={x:B,y:F},M(H={x:(Il.x-U.x)/2,y:(Il.y-U.y)/2},-C),(v=H.x*H.x/(tl*tl)+H.y*H.y/(E*E))>1&&(tl*=v=Math.sqrt(v),E*=v),K=tl*tl*E*E,j=tl*tl*H.y*H.y+E*E*H.x*H.x,y(nl={x:tl*H.y/E,y:-E*H.x/tl},J!==g?Math.sqrt((K-j)/j)||0:-Math.sqrt((K-j)/j)||0),R=Math.atan2((H.y-nl.y)/E,(H.x-nl.x)/tl),D=Math.atan2(-(H.y+nl.y)/E,-(H.x+nl.x)/tl),M(nl,C),Q=nl,q=(U.x+Il.x)/2,ll=(U.y+Il.y)/2,Q.x+=q,Q.y+=ll,Y.save(),Y.translate(nl.x,nl.y),Y.rotate(C),Y.scale(tl,E),Y.arc(0,0,1,R,D,!J),Y.restore();break;case"C":el=(bl=S[xl])[3],dl=bl[4],B=bl[5],F=bl[6],Y.bezierCurveTo(bl[1],bl[2],el,dl,B,F);break;case"c":bl=S[xl],Y.bezierCurveTo(bl[1]+B,bl[2]+F,bl[3]+B,bl[4]+F,bl[5]+B,bl[6]+F),el=bl[3]+B,dl=bl[4]+F,B+=bl[5],F+=bl[6];break;case"S":bl=S[xl],el!==null&&dl!==null||(el=B,dl=F),Y.bezierCurveTo(2*B-el,2*F-dl,bl[1],bl[2],bl[3],bl[4]),el=bl[1],dl=bl[2],B=bl[3],F=bl[4];break;case"s":bl=S[xl],el!==null&&dl!==null||(el=B,dl=F),Y.bezierCurveTo(2*B-el,2*F-dl,bl[1]+B,bl[2]+F,bl[3]+B,bl[4]+F),el=bl[1]+B,dl=bl[2]+F,B+=bl[3],F+=bl[4];break;case"Q":Zl=(bl=S[xl])[1],Wl=bl[2],B=bl[3],F=bl[4],Y.quadraticCurveTo(Zl,Wl,B,F);break;case"q":Zl=(bl=S[xl])[1]+B,Wl=bl[2]+F,B+=bl[3],F+=bl[4],Y.quadraticCurveTo(Zl,Wl,B,F);break;case"T":Zl!==null&&Wl!==null||(Zl=B,Wl=F),Zl=2*B-Zl,Wl=2*F-Wl,B=(bl=S[xl])[1],F=bl[2],Y.quadraticCurveTo(Zl,Wl,B,F);break;case"t":Zl!==null&&Wl!==null||(Zl=B,Wl=F),Zl=2*B-Zl,Wl=2*F-Wl,B+=(bl=S[xl])[1],F+=bl[2],Y.quadraticCurveTo(Zl,Wl,B,F);break;case"z":case"Z":Gl&&(B=Gl.x,F=Gl.y),Gl=null,Y.closePath();break;case"AC":B=(bl=S[xl])[1],F=bl[2],cl=bl[3],R=bl[4],D=bl[5],Sl=bl[6],Y.arc(B,F,cl,R,D,Sl);break;case"AT":O=(bl=S[xl])[1],_=bl[2],B=bl[3],F=bl[4],cl=bl[5],Y.arcTo(O,_,B,F,cl);break;case"E":B=(bl=S[xl])[1],F=bl[2],tl=bl[3],E=bl[4],C=bl[5],R=bl[6],D=bl[7],Sl=bl[8],Y.save(),Y.translate(B,F),Y.rotate(C),Y.scale(tl,E),Y.arc(0,0,1,R,D,Sl),Y.restore();break;case"R":B=(bl=S[xl])[1],F=bl[2],il=bl[3],al=bl[4],Gl={x:B,y:F},Y.rect(B,F,il,al);break;case"RR":B=(bl=S[xl])[1],F=bl[2],il=bl[3],al=bl[4],P=bl[5],Gl={x:B,y:F},Y.roundRect(B,F,il,al,P)}Il?(Il.x=B,Il.y=F):Il={x:B,y:F}}}function z(Y,S,D,R,g){var J=this;if(g===void 0&&(g=0),typeof g=="number"&&(g=[g]),Array.isArray(g)){if(g.length===0||g.length>4)throw new RangeError("Failed to execute 'roundRect' on '".concat(this.constructor.name,"': ").concat(g.length," radii provided. Between one and four radii are necessary."));if(g.forEach(function(j){if(j<0)throw new RangeError("Failed to execute 'roundRect' on '".concat(J.constructor.name,"': Radius value ").concat(j," is negative."))}),g.length===1&&g[0]===0)return this.rect(Y,S,D,R);var U,H,C,v=Math.min(D,R)/2,K=U=H=C=Math.min(v,g[0]);g.length===2&&(U=C=Math.min(v,g[1])),g.length===3&&(U=C=Math.min(v,g[1]),H=Math.min(v,g[2])),g.length===4&&(U=Math.min(v,g[1]),H=Math.min(v,g[2]),C=Math.min(v,g[3])),this.moveTo(Y,S+R-C),this.arcTo(Y,S,Y+K,S,K),this.arcTo(Y+D,S,Y+D,S+U,U),this.arcTo(Y+D,S+R,Y+D-H,S+R,H),this.arcTo(Y,S+R,Y,S+R-C,C),this.moveTo(Y,S)}}(function(Y){if(Y&&Y.CanvasRenderingContext2D&&!Y.Path2D){var S=Y.CanvasRenderingContext2D,D=S.prototype.fill,R=S.prototype.stroke,g=S.prototype.isPointInPath;S.prototype.fill=function(){for(var J=[],U=0;U<arguments.length;U++)J[U]=arguments[U];if(!(J[0]instanceof N))return C=J[0]||"nonzero",D.apply(this,[C]);var H=J[0],C=J[1]||"nonzero";X(this,H.commands),D.apply(this,[C])},S.prototype.stroke=function(J){J&&X(this,J.commands),R.apply(this)},S.prototype.isPointInPath=function(){for(var J=[],U=0;U<arguments.length;U++)J[U]=arguments[U];if(J[0]instanceof N){var H=J[0],C=J[1],v=J[2],K=J[3]||"nonzero";return X(this,H.commands),g.apply(this,[C,v,K])}return g.apply(this,J)},Y.Path2D=N}})(window),function(Y){if(Y&&Y.CanvasRenderingContext2D){var S=Y.CanvasRenderingContext2D,D=Y.Path2D;S&&!S.prototype.roundRect&&(S.prototype.roundRect=z),D&&!D.prototype.roundRect&&(D.prototype.roundRect=z)}}(window)}()),path2dPolyfill_min}(function(module,exports){(function(s,u){module.exports=u()})(globalThis,()=>(()=>{var __webpack_modules__=[,(s,u,o)=>{var r,W;Object.defineProperty(u,"__esModule",{value:!0}),u.VerbosityLevel=u.Util=u.UnknownErrorException=u.UnexpectedResponseException=u.TextRenderingMode=u.RenderingIntentFlag=u.PromiseCapability=u.PermissionFlag=u.PasswordResponses=u.PasswordException=u.PageActionEventType=u.OPS=u.MissingPDFException=u.MAX_IMAGE_SIZE_TO_CACHE=u.LINE_FACTOR=u.LINE_DESCENT_FACTOR=u.InvalidPDFException=u.ImageKind=u.IDENTITY_MATRIX=u.FormatError=u.FeatureTest=u.FONT_IDENTITY_MATRIX=u.DocumentActionEventType=u.CMapCompressionType=u.BaseException=u.BASELINE_FACTOR=u.AnnotationType=u.AnnotationStateModelType=u.AnnotationReviewState=u.AnnotationReplyType=u.AnnotationMode=u.AnnotationMarkedState=u.AnnotationFlag=u.AnnotationFieldFlag=u.AnnotationEditorType=u.AnnotationEditorPrefix=u.AnnotationEditorParamsType=u.AnnotationBorderStyleType=u.AnnotationActionEventType=u.AbortException=void 0,u.assert=function(C,v){C||X(v)},u.bytesToString=function(C){typeof C=="object"&&(C==null?void 0:C.length)!==void 0||X("Invalid argument for bytesToString");const v=C.length,K=8192;if(v<K)return String.fromCharCode.apply(null,C);const j=[];for(let O=0;O<v;O+=K){const _=Math.min(O+K,v),cl=C.subarray(O,_);j.push(String.fromCharCode.apply(null,cl))}return j.join("")},u.createValidAbsoluteUrl=function(C){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!C)return null;try{if(K&&typeof C=="string"){if(K.addDefaultProtocol&&C.startsWith("www.")){const O=C.match(/\./g);(O==null?void 0:O.length)>=2&&(C=`http://${C}`)}if(K.tryConvertEncoding)try{C=J(C)}catch{}}const j=v?new URL(C,v):new URL(C);if(function(O){switch(O==null?void 0:O.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(j))return j}catch{}return null},u.getModificationDate=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Date;return[C.getUTCFullYear().toString(),(C.getUTCMonth()+1).toString().padStart(2,"0"),C.getUTCDate().toString().padStart(2,"0"),C.getUTCHours().toString().padStart(2,"0"),C.getUTCMinutes().toString().padStart(2,"0"),C.getUTCSeconds().toString().padStart(2,"0")].join("")},u.getVerbosityLevel=function(){return y},u.info=function(C){y>=M.INFOS&&console.log(`Info: ${C}`)},u.isArrayBuffer=function(C){return typeof C=="object"&&(C==null?void 0:C.byteLength)!==void 0},u.isArrayEqual=function(C,v){if(C.length!==v.length)return!1;for(let K=0,j=C.length;K<j;K++)if(C[K]!==v[K])return!1;return!0},u.normalizeUnicode=function(C){return U||(U=/([\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,H=new Map([["ſt","ſt"]])),C.replaceAll(U,(v,K,j)=>K?K.normalize("NFKC"):H.get(j))},u.objectFromMap=function(C){const v=Object.create(null);for(const[K,j]of C)v[K]=j;return v},u.objectSize=function(C){return Object.keys(C).length},u.setVerbosityLevel=function(C){Number.isInteger(C)&&(y=C)},u.shadow=z,u.string32=function(C){return String.fromCharCode(C>>24&255,C>>16&255,C>>8&255,255&C)},u.stringToBytes=S,u.stringToPDFString=function(C){if(C[0]>="ï"){let K;if(C[0]==="þ"&&C[1]==="ÿ"?K="utf-16be":C[0]==="ÿ"&&C[1]==="þ"?K="utf-16le":C[0]==="ï"&&C[1]==="»"&&C[2]==="¿"&&(K="utf-8"),K)try{const j=new TextDecoder(K,{fatal:!0}),O=S(C);return j.decode(O)}catch(j){N(`stringToPDFString: "${j}".`)}}const v=[];for(let K=0,j=C.length;K<j;K++){const O=g[C.charCodeAt(K)];v.push(O?String.fromCharCode(O):C.charAt(K))}return v.join("")},u.stringToUTF8String=J,u.unreachable=X,u.utf8StringToString=function(C){return unescape(encodeURIComponent(C))},u.warn=N,globalThis._pdfjsCompatibilityChecked||(globalThis._pdfjsCompatibilityChecked=!0,o(2)),u.IDENTITY_MATRIX=[1,0,0,1,0,0],u.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],u.MAX_IMAGE_SIZE_TO_CACHE=1e7,u.LINE_FACTOR=1.35,u.LINE_DESCENT_FACTOR=.35,u.BASELINE_FACTOR=.25925925925925924,u.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},u.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},u.AnnotationEditorPrefix="pdfjs_internal_editor_",u.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,INK:15},u.AnnotationEditorParamsType={FREETEXT_SIZE:1,FREETEXT_COLOR:2,FREETEXT_OPACITY:3,INK_COLOR:11,INK_THICKNESS:12,INK_OPACITY:13},u.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},u.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},u.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},u.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},u.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},u.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},u.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},u.AnnotationReplyType={GROUP:"Group",REPLY:"R"},u.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},u.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},u.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},u.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"},u.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},u.PageActionEventType={O:"PageOpen",C:"PageClose"};const M={ERRORS:0,WARNINGS:1,INFOS:5};u.VerbosityLevel=M,u.CMapCompressionType={NONE:0,BINARY:1},u.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},u.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let y=M.WARNINGS;function N(C){y>=M.WARNINGS&&console.log(`Warning: ${C}`)}function X(C){throw new Error(C)}function z(C,v,K){let j=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return Object.defineProperty(C,v,{value:K,enumerable:!j,configurable:!0,writable:!1}),K}const Y=function(){function C(v,K){this.constructor===C&&X("Cannot initialize BaseException."),this.message=v,this.name=K}return C.prototype=new Error,C.constructor=C,C}();u.BaseException=Y,u.PasswordException=class extends Y{constructor(C,v){super(C,"PasswordException"),this.code=v}},u.UnknownErrorException=class extends Y{constructor(C,v){super(C,"UnknownErrorException"),this.details=v}},u.InvalidPDFException=class extends Y{constructor(C){super(C,"InvalidPDFException")}},u.MissingPDFException=class extends Y{constructor(C){super(C,"MissingPDFException")}},u.UnexpectedResponseException=class extends Y{constructor(C,v){super(C,"UnexpectedResponseException"),this.status=v}},u.FormatError=class extends Y{constructor(C){super(C,"FormatError")}},u.AbortException=class extends Y{constructor(C){super(C,"AbortException")}};function S(C){typeof C!="string"&&X("Invalid argument for stringToBytes");const v=C.length,K=new Uint8Array(v);for(let j=0;j<v;++j)K[j]=255&C.charCodeAt(j);return K}u.FeatureTest=class{static get isLittleEndian(){return z(this,"isLittleEndian",function(){const C=new Uint8Array(4);return C[0]=1,new Uint32Array(C.buffer,0,1)[0]===1}())}static get isEvalSupported(){return z(this,"isEvalSupported",function(){try{return new Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return z(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator>"u"?z(this,"platform",{isWin:!1,isMac:!1}):z(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}};const D=[...Array(256).keys()].map(C=>C.toString(16).padStart(2,"0"));class R{static makeHexColor(v,K,j){return`#${D[v]}${D[K]}${D[j]}`}static scaleMinMax(v,K){let j;v[0]?(v[0]<0&&(j=K[0],K[0]=K[1],K[1]=j),K[0]*=v[0],K[1]*=v[0],v[3]<0&&(j=K[2],K[2]=K[3],K[3]=j),K[2]*=v[3],K[3]*=v[3]):(j=K[0],K[0]=K[2],K[2]=j,j=K[1],K[1]=K[3],K[3]=j,v[1]<0&&(j=K[2],K[2]=K[3],K[3]=j),K[2]*=v[1],K[3]*=v[1],v[2]<0&&(j=K[0],K[0]=K[1],K[1]=j),K[0]*=v[2],K[1]*=v[2]),K[0]+=v[4],K[1]+=v[4],K[2]+=v[5],K[3]+=v[5]}static transform(v,K){return[v[0]*K[0]+v[2]*K[1],v[1]*K[0]+v[3]*K[1],v[0]*K[2]+v[2]*K[3],v[1]*K[2]+v[3]*K[3],v[0]*K[4]+v[2]*K[5]+v[4],v[1]*K[4]+v[3]*K[5]+v[5]]}static applyTransform(v,K){return[v[0]*K[0]+v[1]*K[2]+K[4],v[0]*K[1]+v[1]*K[3]+K[5]]}static applyInverseTransform(v,K){const j=K[0]*K[3]-K[1]*K[2];return[(v[0]*K[3]-v[1]*K[2]+K[2]*K[5]-K[4]*K[3])/j,(-v[0]*K[1]+v[1]*K[0]+K[4]*K[1]-K[5]*K[0])/j]}static getAxialAlignedBoundingBox(v,K){const j=R.applyTransform(v,K),O=R.applyTransform(v.slice(2,4),K),_=R.applyTransform([v[0],v[3]],K),cl=R.applyTransform([v[2],v[1]],K);return[Math.min(j[0],O[0],_[0],cl[0]),Math.min(j[1],O[1],_[1],cl[1]),Math.max(j[0],O[0],_[0],cl[0]),Math.max(j[1],O[1],_[1],cl[1])]}static inverseTransform(v){const K=v[0]*v[3]-v[1]*v[2];return[v[3]/K,-v[1]/K,-v[2]/K,v[0]/K,(v[2]*v[5]-v[4]*v[3])/K,(v[4]*v[1]-v[5]*v[0])/K]}static singularValueDecompose2dScale(v){const K=[v[0],v[2],v[1],v[3]],j=v[0]*K[0]+v[1]*K[2],O=v[0]*K[1]+v[1]*K[3],_=v[2]*K[0]+v[3]*K[2],cl=v[2]*K[1]+v[3]*K[3],tl=(j+cl)/2,E=Math.sqrt((j+cl)**2-4*(j*cl-_*O))/2,il=tl+E||1,al=tl-E||1;return[Math.sqrt(il),Math.sqrt(al)]}static normalizeRect(v){const K=v.slice(0);return v[0]>v[2]&&(K[0]=v[2],K[2]=v[0]),v[1]>v[3]&&(K[1]=v[3],K[3]=v[1]),K}static intersect(v,K){const j=Math.max(Math.min(v[0],v[2]),Math.min(K[0],K[2])),O=Math.min(Math.max(v[0],v[2]),Math.max(K[0],K[2]));if(j>O)return null;const _=Math.max(Math.min(v[1],v[3]),Math.min(K[1],K[3])),cl=Math.min(Math.max(v[1],v[3]),Math.max(K[1],K[3]));return _>cl?null:[j,_,O,cl]}static bezierBoundingBox(v,K,j,O,_,cl,tl,E){const il=[],al=[[],[]];let Nl,nl,Sl,P,Q,q,ll,B;for(let Zl=0;Zl<2;++Zl)if(Zl===0?(nl=6*v-12*j+6*_,Nl=-3*v+9*j-9*_+3*tl,Sl=3*j-3*v):(nl=6*K-12*O+6*cl,Nl=-3*K+9*O-9*cl+3*E,Sl=3*O-3*K),Math.abs(Nl)<1e-12){if(Math.abs(nl)<1e-12)continue;P=-Sl/nl,0<P&&P<1&&il.push(P)}else ll=nl*nl-4*Sl*Nl,B=Math.sqrt(ll),ll<0||(Q=(-nl+B)/(2*Nl),0<Q&&Q<1&&il.push(Q),q=(-nl-B)/(2*Nl),0<q&&q<1&&il.push(q));let F,el=il.length;const dl=el;for(;el--;)P=il[el],F=1-P,al[0][el]=F*F*F*v+3*F*F*P*j+3*F*P*P*_+P*P*P*tl,al[1][el]=F*F*F*K+3*F*F*P*O+3*F*P*P*cl+P*P*P*E;return al[0][dl]=v,al[1][dl]=K,al[0][dl+1]=tl,al[1][dl+1]=E,al[0].length=al[1].length=dl+2,[Math.min(...al[0]),Math.min(...al[1]),Math.max(...al[0]),Math.max(...al[1])]}}u.Util=R;const g=[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 J(C){return decodeURIComponent(escape(C))}u.PromiseCapability=(W=class{constructor(){et(this,r,!1),this.promise=new Promise((C,v)=>{this.resolve=K=>{ut(this,r,!0),C(K)},this.reject=K=>{ut(this,r,!0),v(K)}})}get settled(){return T(this,r)}},r=new WeakMap,W);let U=null,H=null},(s,u,o)=>{var r=o(3);(function(){!globalThis.DOMMatrix&&r.isNodeJS&&(globalThis.DOMMatrix=require$$6.DOMMatrix)})(),function(){if(globalThis.Path2D||!r.isNodeJS)return;const{CanvasRenderingContext2D:W}=require$$6,{polyfillPath2D:M}=requirePath2dPolyfill_min();globalThis.CanvasRenderingContext2D=W,M(globalThis)}(),function(){Array.prototype.at||o(4)}(),function(){Uint8Array.prototype.at||o(78)}(),function(){globalThis.structuredClone||o(90)}()},(s,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.isNodeJS=void 0;const o=!(typeof process!="object"||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&process.type!=="browser");u.isNodeJS=o},(s,u,o)=>{o(5);var r=o(77);s.exports=r("Array","at")},(s,u,o)=>{var r=o(6),W=o(43),M=o(67),y=o(65),N=o(72);r({target:"Array",proto:!0},{at:function(X){var z=W(this),Y=M(z),S=y(X),D=S>=0?S:Y+S;return D<0||D>=Y?void 0:z[D]}}),N("at")},(s,u,o)=>{var r=o(7),W=o(8).f,M=o(47),y=o(51),N=o(41),X=o(59),z=o(71);s.exports=function(Y,S){var D,R,g,J,U,H=Y.target,C=Y.global,v=Y.stat;if(D=C?r:v?r[H]||N(H,{}):(r[H]||{}).prototype)for(R in S){if(J=S[R],g=Y.dontCallGetSet?(U=W(D,R))&&U.value:D[R],!z(C?R:H+(v?".":"#")+R,Y.forced)&&g!==void 0){if(typeof J==typeof g)continue;X(J,g)}(Y.sham||g&&g.sham)&&M(J,"sham",!0),y(D,R,J,Y)}}},function(s){var u=function(o){return o&&o.Math==Math&&o};s.exports=u(typeof globalThis=="object"&&globalThis)||u(typeof window=="object"&&window)||u(typeof self=="object"&&self)||u(typeof commonjsGlobal=="object"&&commonjsGlobal)||function(){return this}()||this||Function("return this")()},(s,u,o)=>{var r=o(9),W=o(11),M=o(13),y=o(14),N=o(15),X=o(21),z=o(42),Y=o(45),S=Object.getOwnPropertyDescriptor;u.f=r?S:function(D,R){if(D=N(D),R=X(R),Y)try{return S(D,R)}catch{}if(z(D,R))return y(!W(M.f,D,R),D[R])}},(s,u,o)=>{var r=o(10);s.exports=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},s=>{s.exports=function(u){try{return!!u()}catch{return!0}}},(s,u,o)=>{var r=o(12),W=Function.prototype.call;s.exports=r?W.bind(W):function(){return W.apply(W,arguments)}},(s,u,o)=>{var r=o(10);s.exports=!r(function(){var W=(function(){}).bind();return typeof W!="function"||W.hasOwnProperty("prototype")})},(s,u)=>{var o={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,W=r&&!o.call({1:2},1);u.f=W?function(M){var y=r(this,M);return!!y&&y.enumerable}:o},s=>{s.exports=function(u,o){return{enumerable:!(1&u),configurable:!(2&u),writable:!(4&u),value:o}}},(s,u,o)=>{var r=o(16),W=o(19);s.exports=function(M){return r(W(M))}},(s,u,o)=>{var r=o(17),W=o(10),M=o(18),y=Object,N=r("".split);s.exports=W(function(){return!y("z").propertyIsEnumerable(0)})?function(X){return M(X)=="String"?N(X,""):y(X)}:y},(s,u,o)=>{var r=o(12),W=Function.prototype,M=W.call,y=r&&W.bind.bind(M,M);s.exports=r?y:function(N){return function(){return M.apply(N,arguments)}}},(s,u,o)=>{var r=o(17),W=r({}.toString),M=r("".slice);s.exports=function(y){return M(W(y),8,-1)}},(s,u,o)=>{var r=o(20),W=TypeError;s.exports=function(M){if(r(M))throw W("Can't call method on "+M);return M}},s=>{s.exports=function(u){return u==null}},(s,u,o)=>{var r=o(22),W=o(26);s.exports=function(M){var y=r(M,"string");return W(y)?y:y+""}},(s,u,o)=>{var r=o(11),W=o(23),M=o(26),y=o(33),N=o(36),X=o(37),z=TypeError,Y=X("toPrimitive");s.exports=function(S,D){if(!W(S)||M(S))return S;var R,g=y(S,Y);if(g){if(D===void 0&&(D="default"),R=r(g,S,D),!W(R)||M(R))return R;throw z("Can't convert object to primitive value")}return D===void 0&&(D="number"),N(S,D)}},(s,u,o)=>{var r=o(24),W=o(25),M=W.all;s.exports=W.IS_HTMLDDA?function(y){return typeof y=="object"?y!==null:r(y)||y===M}:function(y){return typeof y=="object"?y!==null:r(y)}},(s,u,o)=>{var r=o(25),W=r.all;s.exports=r.IS_HTMLDDA?function(M){return typeof M=="function"||M===W}:function(M){return typeof M=="function"}},s=>{var u=typeof document=="object"&&document.all,o=u===void 0&&u!==void 0;s.exports={all:u,IS_HTMLDDA:o}},(s,u,o)=>{var r=o(27),W=o(24),M=o(28),y=o(29),N=Object;s.exports=y?function(X){return typeof X=="symbol"}:function(X){var z=r("Symbol");return W(z)&&M(z.prototype,N(X))}},(s,u,o)=>{var r=o(7),W=o(24);s.exports=function(M,y){return arguments.length<2?(N=r[M],W(N)?N:void 0):r[M]&&r[M][y];var N}},(s,u,o)=>{var r=o(17);s.exports=r({}.isPrototypeOf)},(s,u,o)=>{var r=o(30);s.exports=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},(s,u,o)=>{var r=o(31),W=o(10),M=o(7).String;s.exports=!!Object.getOwnPropertySymbols&&!W(function(){var y=Symbol();return!M(y)||!(Object(y)instanceof Symbol)||!Symbol.sham&&r&&r<41})},(s,u,o)=>{var r,W,M=o(7),y=o(32),N=M.process,X=M.Deno,z=N&&N.versions||X&&X.version,Y=z&&z.v8;Y&&(W=(r=Y.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!W&&y&&(!(r=y.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=y.match(/Chrome\/(\d+)/))&&(W=+r[1]),s.exports=W},s=>{s.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},(s,u,o)=>{var r=o(34),W=o(20);s.exports=function(M,y){var N=M[y];return W(N)?void 0:r(N)}},(s,u,o)=>{var r=o(24),W=o(35),M=TypeError;s.exports=function(y){if(r(y))return y;throw M(W(y)+" is not a function")}},s=>{var u=String;s.exports=function(o){try{return u(o)}catch{return"Object"}}},(s,u,o)=>{var r=o(11),W=o(24),M=o(23),y=TypeError;s.exports=function(N,X){var z,Y;if(X==="string"&&W(z=N.toString)&&!M(Y=r(z,N))||W(z=N.valueOf)&&!M(Y=r(z,N))||X!=="string"&&W(z=N.toString)&&!M(Y=r(z,N)))return Y;throw y("Can't convert object to primitive value")}},(s,u,o)=>{var r=o(7),W=o(38),M=o(42),y=o(44),N=o(30),X=o(29),z=r.Symbol,Y=W("wks"),S=X?z.for||z:z&&z.withoutSetter||y;s.exports=function(D){return M(Y,D)||(Y[D]=N&&M(z,D)?z[D]:S("Symbol."+D)),Y[D]}},(s,u,o)=>{var r=o(39),W=o(40);(s.exports=function(M,y){return W[M]||(W[M]=y!==void 0?y:{})})("versions",[]).push({version:"3.30.2",mode:r?"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,u,o)=>{var r=o(7),W=o(41),M="__core-js_shared__",y=r[M]||W(M,{});s.exports=y},(s,u,o)=>{var r=o(7),W=Object.defineProperty;s.exports=function(M,y){try{W(r,M,{value:y,configurable:!0,writable:!0})}catch{r[M]=y}return y}},(s,u,o)=>{var r=o(17),W=o(43),M=r({}.hasOwnProperty);s.exports=Object.hasOwn||function(y,N){return M(W(y),N)}},(s,u,o)=>{var r=o(19),W=Object;s.exports=function(M){return W(r(M))}},(s,u,o)=>{var r=o(17),W=0,M=Math.random(),y=r(1 .toString);s.exports=function(N){return"Symbol("+(N===void 0?"":N)+")_"+y(++W+M,36)}},(s,u,o)=>{var r=o(9),W=o(10),M=o(46);s.exports=!r&&!W(function(){return Object.defineProperty(M("div"),"a",{get:function(){return 7}}).a!=7})},(s,u,o)=>{var r=o(7),W=o(23),M=r.document,y=W(M)&&W(M.createElement);s.exports=function(N){return y?M.createElement(N):{}}},(s,u,o)=>{var r=o(9),W=o(48),M=o(14);s.exports=r?function(y,N,X){return W.f(y,N,M(1,X))}:function(y,N,X){return y[N]=X,y}},(s,u,o)=>{var r=o(9),W=o(45),M=o(49),y=o(50),N=o(21),X=TypeError,z=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,S="enumerable",D="configurable",R="writable";u.f=r?M?function(g,J,U){if(y(g),J=N(J),y(U),typeof g=="function"&&J==="prototype"&&"value"in U&&R in U&&!U[R]){var H=Y(g,J);H&&H[R]&&(g[J]=U.value,U={configurable:D in U?U[D]:H[D],enumerable:S in U?U[S]:H[S],writable:!1})}return z(g,J,U)}:z:function(g,J,U){if(y(g),J=N(J),y(U),W)try{return z(g,J,U)}catch{}if("get"in U||"set"in U)throw X("Accessors not supported");return"value"in U&&(g[J]=U.value),g}},(s,u,o)=>{var r=o(9),W=o(10);s.exports=r&&W(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},(s,u,o)=>{var r=o(23),W=String,M=TypeError;s.exports=function(y){if(r(y))return y;throw M(W(y)+" is not an object")}},(s,u,o)=>{var r=o(24),W=o(48),M=o(52),y=o(41);s.exports=function(N,X,z,Y){Y||(Y={});var S=Y.enumerable,D=Y.name!==void 0?Y.name:X;if(r(z)&&M(z,D,Y),Y.global)S?N[X]=z:y(X,z);else{try{Y.unsafe?N[X]&&(S=!0):delete N[X]}catch{}S?N[X]=z:W.f(N,X,{value:z,enumerable:!1,configurable:!Y.nonConfigurable,writable:!Y.nonWritable})}return N}},(s,u,o)=>{var r=o(17),W=o(10),M=o(24),y=o(42),N=o(9),X=o(53).CONFIGURABLE,z=o(54),Y=o(55),S=Y.enforce,D=Y.get,R=String,g=Object.defineProperty,J=r("".slice),U=r("".replace),H=r([].join),C=N&&!W(function(){return g(function(){},"length",{value:8}).length!==8}),v=String(String).split("String"),K=s.exports=function(j,O,_){J(R(O),0,7)==="Symbol("&&(O="["+U(R(O),/^Symbol\(([^)]*)\)/,"$1")+"]"),_&&_.getter&&(O="get "+O),_&&_.setter&&(O="set "+O),(!y(j,"name")||X&&j.name!==O)&&(N?g(j,"name",{value:O,configurable:!0}):j.name=O),C&&_&&y(_,"arity")&&j.length!==_.arity&&g(j,"length",{value:_.arity});try{_&&y(_,"constructor")&&_.constructor?N&&g(j,"prototype",{writable:!1}):j.prototype&&(j.prototype=void 0)}catch{}var cl=S(j);return y(cl,"source")||(cl.source=H(v,typeof O=="string"?O:"")),j};Function.prototype.toString=K(function(){return M(this)&&D(this).source||z(this)},"toString")},(s,u,o)=>{var r=o(9),W=o(42),M=Function.prototype,y=r&&Object.getOwnPropertyDescriptor,N=W(M,"name"),X=N&&(function(){}).name==="something",z=N&&(!r||r&&y(M,"name").configurable);s.exports={EXISTS:N,PROPER:X,CONFIGURABLE:z}},(s,u,o)=>{var r=o(17),W=o(24),M=o(40),y=r(Function.toString);W(M.inspectSource)||(M.inspectSource=function(N){return y(N)}),s.exports=M.inspectSource},(s,u,o)=>{var r,W,M,y=o(56),N=o(7),X=o(23),z=o(47),Y=o(42),S=o(40),D=o(57),R=o(58),g="Object already initialized",J=N.TypeError,U=N.WeakMap;if(y||S.state){var H=S.state||(S.state=new U);H.get=H.get,H.has=H.has,H.set=H.set,r=function(v,K){if(H.has(v))throw J(g);return K.facade=v,H.set(v,K),K},W=function(v){return H.get(v)||{}},M=function(v){return H.has(v)}}else{var C=D("state");R[C]=!0,r=function(v,K){if(Y(v,C))throw J(g);return K.facade=v,z(v,C,K),K},W=function(v){return Y(v,C)?v[C]:{}},M=function(v){return Y(v,C)}}s.exports={set:r,get:W,has:M,enforce:function(v){return M(v)?W(v):r(v,{})},getterFor:function(v){return function(K){var j;if(!X(K)||(j=W(K)).type!==v)throw J("Incompatible receiver, "+v+" required");return j}}}},(s,u,o)=>{var r=o(7),W=o(24),M=r.WeakMap;s.exports=W(M)&&/native code/.test(String(M))},(s,u,o)=>{var r=o(38),W=o(44),M=r("keys");s.exports=function(y){return M[y]||(M[y]=W(y))}},s=>{s.exports={}},(s,u,o)=>{var r=o(42),W=o(60),M=o(8),y=o(48);s.exports=function(N,X,z){for(var Y=W(X),S=y.f,D=M.f,R=0;R<Y.length;R++){var g=Y[R];r(N,g)||z&&r(z,g)||S(N,g,D(X,g))}}},(s,u,o)=>{var r=o(27),W=o(17),M=o(61),y=o(70),N=o(50),X=W([].concat);s.exports=r("Reflect","ownKeys")||function(z){var Y=M.f(N(z)),S=y.f;return S?X(Y,S(z)):Y}},(s,u,o)=>{var r=o(62),W=o(69).concat("length","prototype");u.f=Object.getOwnPropertyNames||function(M){return r(M,W)}},(s,u,o)=>{var r=o(17),W=o(42),M=o(15),y=o(63).indexOf,N=o(58),X=r([].push);s.exports=function(z,Y){var S,D=M(z),R=0,g=[];for(S in D)!W(N,S)&&W(D,S)&&X(g,S);for(;Y.length>R;)W(D,S=Y[R++])&&(~y(g,S)||X(g,S));return g}},(s,u,o)=>{var r=o(15),W=o(64),M=o(67),y=function(N){return function(X,z,Y){var S,D=r(X),R=M(D),g=W(Y,R);if(N&&z!=z){for(;R>g;)if((S=D[g++])!=S)return!0}else for(;R>g;g++)if((N||g in D)&&D[g]===z)return N||g||0;return!N&&-1}};s.exports={includes:y(!0),indexOf:y(!1)}},(s,u,o)=>{var r=o(65),W=Math.max,M=Math.min;s.exports=function(y,N){var X=r(y);return X<0?W(X+N,0):M(X,N)}},(s,u,o)=>{var r=o(66);s.exports=function(W){var M=+W;return M!=M||M===0?0:r(M)}},s=>{var u=Math.ceil,o=Math.floor;s.exports=Math.trunc||function(r){var W=+r;return(W>0?o:u)(W)}},(s,u,o)=>{var r=o(68);s.exports=function(W){return r(W.length)}},(s,u,o)=>{var r=o(65),W=Math.min;s.exports=function(M){return M>0?W(r(M),9007199254740991):0}},s=>{s.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(s,u)=>{u.f=Object.getOwnPropertySymbols},(s,u,o)=>{var r=o(10),W=o(24),M=/#|\.prototype\./,y=function(S,D){var R=X[N(S)];return R==Y||R!=z&&(W(D)?r(D):!!D)},N=y.normalize=function(S){return String(S).replace(M,".").toLowerCase()},X=y.data={},z=y.NATIVE="N",Y=y.POLYFILL="P";s.exports=y},(s,u,o)=>{var r=o(37),W=o(73),M=o(48).f,y=r("unscopables"),N=Array.prototype;N[y]==null&&M(N,y,{configurable:!0,value:W(null)}),s.exports=function(X){N[y][X]=!0}},(s,u,o)=>{var r,W=o(50),M=o(74),y=o(69),N=o(58),X=o(76),z=o(46),Y=o(57),S="prototype",D="script",R=Y("IE_PROTO"),g=function(){},J=function(C){return"<"+D+">"+C+"</"+D+">"},U=function(C){C.write(J("")),C.close();var v=C.parentWindow.Object;return C=null,v},H=function(){try{r=new ActiveXObject("htmlfile")}catch{}H=typeof document<"u"?document.domain&&r?U(r):function(){var v,K=z("iframe"),j="java"+D+":";return K.style.display="none",X.appendChild(K),K.src=String(j),(v=K.contentWindow.document).open(),v.write(J("document.F=Object")),v.close(),v.F}():U(r);for(var C=y.length;C--;)delete H[S][y[C]];return H()};N[R]=!0,s.exports=Object.create||function(C,v){var K;return C!==null?(g[S]=W(C),K=new g,g[S]=null,K[R]=C):K=H(),v===void 0?K:M.f(K,v)}},(s,u,o)=>{var r=o(9),W=o(49),M=o(48),y=o(50),N=o(15),X=o(75);u.f=r&&!W?Object.defineProperties:function(z,Y){y(z);for(var S,D=N(Y),R=X(Y),g=R.length,J=0;g>J;)M.f(z,S=R[J++],D[S]);return z}},(s,u,o)=>{var r=o(62),W=o(69);s.exports=Object.keys||function(M){return r(M,W)}},(s,u,o)=>{var r=o(27);s.exports=r("document","documentElement")},(s,u,o)=>{var r=o(7),W=o(17);s.exports=function(M,y){return W(r[M].prototype[y])}},(s,u,o)=>{o(79)},(s,u,o)=>{var r=o(80),W=o(67),M=o(65),y=r.aTypedArray;(0,r.exportTypedArrayMethod)("at",function(N){var X=y(this),z=W(X),Y=M(N),S=Y>=0?Y:z+Y;return S<0||S>=z?void 0:X[S]})},(s,u,o)=>{var r,W,M,y=o(81),N=o(9),X=o(7),z=o(24),Y=o(23),S=o(42),D=o(82),R=o(35),g=o(47),J=o(51),U=o(84),H=o(28),C=o(85),v=o(87),K=o(37),j=o(44),O=o(55),_=O.enforce,cl=O.get,tl=X.Int8Array,E=tl&&tl.prototype,il=X.Uint8ClampedArray,al=il&&il.prototype,Nl=tl&&C(tl),nl=E&&C(E),Sl=Object.prototype,P=X.TypeError,Q=K("toStringTag"),q=j("TYPED_ARRAY_TAG"),ll="TypedArrayConstructor",B=y&&!!v&&D(X.opera)!=="Opera",F=!1,el={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},dl={BigInt64Array:8,BigUint64Array:8},Zl=function(Gl){var Il=C(Gl);if(Y(Il)){var xl=cl(Il);return xl&&S(xl,ll)?xl[ll]:Zl(Il)}},Wl=function(Gl){if(!Y(Gl))return!1;var Il=D(Gl);return S(el,Il)||S(dl,Il)};for(r in el)(M=(W=X[r])&&W.prototype)?_(M)[ll]=W:B=!1;for(r in dl)(M=(W=X[r])&&W.prototype)&&(_(M)[ll]=W);if((!B||!z(Nl)||Nl===Function.prototype)&&(Nl=function(){throw P("Incorrect invocation")},B))for(r in el)X[r]&&v(X[r],Nl);if((!B||!nl||nl===Sl)&&(nl=Nl.prototype,B))for(r in el)X[r]&&v(X[r].prototype,nl);if(B&&C(al)!==nl&&v(al,nl),N&&!S(nl,Q)){F=!0,U(nl,Q,{configurable:!0,get:function(){return Y(this)?this[q]:void 0}});for(r in el)X[r]&&g(X[r],q,r)}s.exports={NATIVE_ARRAY_BUFFER_VIEWS:B,TYPED_ARRAY_TAG:F&&q,aTypedArray:function(Gl){if(Wl(Gl))return Gl;throw P("Target is not a typed array")},aTypedArrayConstructor:function(Gl){if(z(Gl)&&(!v||H(Nl,Gl)))return Gl;throw P(R(Gl)+" is not a typed array constructor")},exportTypedArrayMethod:function(Gl,Il,xl,bl){if(N){if(xl)for(var Ol in el){var _l=X[Ol];if(_l&&S(_l.prototype,Gl))try{delete _l.prototype[Gl]}catch{try{_l.prototype[Gl]=Il}catch{}}}nl[Gl]&&!xl||J(nl,Gl,xl?Il:B&&E[Gl]||Il,bl)}},exportTypedArrayStaticMethod:function(Gl,Il,xl){var bl,Ol;if(N){if(v){if(xl){for(bl in el)if((Ol=X[bl])&&S(Ol,Gl))try{delete Ol[Gl]}catch{}}if(Nl[Gl]&&!xl)return;try{return J(Nl,Gl,xl?Il:B&&Nl[Gl]||Il)}catch{}}for(bl in el)!(Ol=X[bl])||Ol[Gl]&&!xl||J(Ol,Gl,Il)}},getTypedArrayConstructor:Zl,isView:function(Gl){if(!Y(Gl))return!1;var Il=D(Gl);return Il==="DataView"||S(el,Il)||S(dl,Il)},isTypedArray:Wl,TypedArray:Nl,TypedArrayPrototype:nl}},s=>{s.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"},(s,u,o)=>{var r=o(83),W=o(24),M=o(18),y=o(37)("toStringTag"),N=Object,X=M(function(){return arguments}())=="Arguments";s.exports=r?M:function(z){var Y,S,D;return z===void 0?"Undefined":z===null?"Null":typeof(S=function(R,g){try{return R[g]}catch{}}(Y=N(z),y))=="string"?S:X?M(Y):(D=M(Y))=="Object"&&W(Y.callee)?"Arguments":D}},(s,u,o)=>{var r={};r[o(37)("toStringTag")]="z",s.exports=String(r)==="[object z]"},(s,u,o)=>{var r=o(52),W=o(48);s.exports=function(M,y,N){return N.get&&r(N.get,y,{getter:!0}),N.set&&r(N.set,y,{setter:!0}),W.f(M,y,N)}},(s,u,o)=>{var r=o(42),W=o(24),M=o(43),y=o(57),N=o(86),X=y("IE_PROTO"),z=Object,Y=z.prototype;s.exports=N?z.getPrototypeOf:function(S){var D=M(S);if(r(D,X))return D[X];var R=D.constructor;return W(R)&&D instanceof R?R.prototype:D instanceof z?Y:null}},(s,u,o)=>{var r=o(10);s.exports=!r(function(){function W(){}return W.prototype.constructor=null,Object.getPrototypeOf(new W)!==W.prototype})},(s,u,o)=>{var r=o(88),W=o(50),M=o(89);s.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var y,N=!1,X={};try{(y=r(Object.prototype,"__proto__","set"))(X,[]),N=X instanceof Array}catch{}return function(z,Y){return W(z),M(Y),N?y(z,Y):z.__proto__=Y,z}}():void 0)},(s,u,o)=>{var r=o(17),W=o(34);s.exports=function(M,y,N){try{return r(W(Object.getOwnPropertyDescriptor(M,y)[N]))}catch{}}},(s,u,o)=>{var r=o(24),W=String,M=TypeError;s.exports=function(y){if(typeof y=="object"||r(y))return y;throw M("Can't set "+W(y)+" as a prototype")}},(s,u,o)=>{o(91),o(98),o(100),o(123),o(125);var r=o(137);s.exports=r.structuredClone},(s,u,o)=>{var r=o(15),W=o(72),M=o(92),y=o(55),N=o(48).f,X=o(93),z=o(97),Y=o(39),S=o(9),D="Array Iterator",R=y.set,g=y.getterFor(D);s.exports=X(Array,"Array",function(U,H){R(this,{type:D,target:r(U),index:0,kind:H})},function(){var U=g(this),H=U.target,C=U.kind,v=U.index++;return!H||v>=H.length?(U.target=void 0,z(void 0,!0)):z(C=="keys"?v:C=="values"?H[v]:[v,H[v]],!1)},"values");var J=M.Arguments=M.Array;if(W("keys"),W("values"),W("entries"),!Y&&S&&J.name!=="values")try{N(J,"name",{value:"values"})}catch{}},s=>{s.exports={}},(s,u,o)=>{var r=o(6),W=o(11),M=o(39),y=o(53),N=o(24),X=o(94),z=o(85),Y=o(87),S=o(96),D=o(47),R=o(51),g=o(37),J=o(92),U=o(95),H=y.PROPER,C=y.CONFIGURABLE,v=U.IteratorPrototype,K=U.BUGGY_SAFARI_ITERATORS,j=g("iterator"),O="keys",_="values",cl="entries",tl=function(){return this};s.exports=function(E,il,al,Nl,nl,Sl,P){X(al,il,Nl);var Q,q,ll,B=function(Il){if(Il===nl&&Wl)return Wl;if(!K&&Il in dl)return dl[Il];switch(Il){case O:return function(){return new al(this,Il)};case _:return function(){return new al(this,Il)};case cl:return function(){return new al(this,Il)}}return function(){return new al(this)}},F=il+" Iterator",el=!1,dl=E.prototype,Zl=dl[j]||dl["@@iterator"]||nl&&dl[nl],Wl=!K&&Zl||B(nl),Gl=il=="Array"&&dl.entries||Zl;if(Gl&&(Q=z(Gl.call(new E)))!==Object.prototype&&Q.next&&(M||z(Q)===v||(Y?Y(Q,v):N(Q[j])||R(Q,j,tl)),S(Q,F,!0,!0),M&&(J[F]=tl)),H&&nl==_&&Zl&&Zl.name!==_&&(!M&&C?D(dl,"name",_):(el=!0,Wl=function(){return W(Zl,this)})),nl)if(q={values:B(_),keys:Sl?Wl:B(O),entries:B(cl)},P)for(ll in q)(K||el||!(ll in dl))&&R(dl,ll,q[ll]);else r({target:il,proto:!0,forced:K||el},q);return M&&!P||dl[j]===Wl||R(dl,j,Wl,{name:nl}),J[il]=Wl,q}},(s,u,o)=>{var r=o(95).IteratorPrototype,W=o(73),M=o(14),y=o(96),N=o(92),X=function(){return this};s.exports=function(z,Y,S,D){var R=Y+" Iterator";return z.prototype=W(r,{next:M(+!D,S)}),y(z,R,!1,!0),N[R]=X,z}},(s,u,o)=>{var r,W,M,y=o(10),N=o(24),X=o(23),z=o(73),Y=o(85),S=o(51),D=o(37),R=o(39),g=D("iterator"),J=!1;[].keys&&("next"in(M=[].keys())?(W=Y(Y(M)))!==Object.prototype&&(r=W):J=!0),!X(r)||y(function(){var U={};return r[g].call(U)!==U})?r={}:R&&(r=z(r)),N(r[g])||S(r,g,function(){return this}),s.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:J}},(s,u,o)=>{var r=o(48).f,W=o(42),M=o(37)("toStringTag");s.exports=function(y,N,X){y&&!X&&(y=y.prototype),y&&!W(y,M)&&r(y,M,{configurable:!0,value:N})}},s=>{s.exports=function(u,o){return{value:u,done:o}}},(s,u,o)=>{var r=o(83),W=o(51),M=o(99);r||W(Object.prototype,"toString",M,{unsafe:!0})},(s,u,o)=>{var r=o(83),W=o(82);s.exports=r?{}.toString:function(){return"[object "+W(this)+"]"}},(s,u,o)=>{o(101)},(s,u,o)=>{o(102)("Map",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},o(120))},(s,u,o)=>{var r=o(6),W=o(7),M=o(17),y=o(71),N=o(51),X=o(103),z=o(110),Y=o(117),S=o(24),D=o(20),R=o(23),g=o(10),J=o(118),U=o(96),H=o(119);s.exports=function(C,v,K){var j=C.indexOf("Map")!==-1,O=C.indexOf("Weak")!==-1,_=j?"set":"add",cl=W[C],tl=cl&&cl.prototype,E=cl,il={},al=function(q){var ll=M(tl[q]);N(tl,q,q=="add"?function(B){return ll(this,B===0?0:B),this}:q=="delete"?function(B){return!(O&&!R(B))&&ll(this,B===0?0:B)}:q=="get"?function(B){return O&&!R(B)?void 0:ll(this,B===0?0:B)}:q=="has"?function(B){return!(O&&!R(B))&&ll(this,B===0?0:B)}:function(B,F){return ll(this,B===0?0:B,F),this})};if(y(C,!S(cl)||!(O||tl.forEach&&!g(function(){new cl().entries().next()}))))E=K.getConstructor(v,C,j,_),X.enable();else if(y(C,!0)){var Nl=new E,nl=Nl[_](O?{}:-0,1)!=Nl,Sl=g(function(){Nl.has(1)}),P=J(function(q){new cl(q)}),Q=!O&&g(function(){for(var q=new cl,ll=5;ll--;)q[_](ll,ll);return!q.has(-0)});P||((E=v(function(q,ll){Y(q,tl);var B=H(new cl,q,E);return D(ll)||z(ll,B[_],{that:B,AS_ENTRIES:j}),B})).prototype=tl,tl.constructor=E),(Sl||Q)&&(al("delete"),al("has"),j&&al("get")),(Q||nl)&&al(_),O&&tl.clear&&delete tl.clear}return il[C]=E,r({global:!0,constructor:!0,forced:E!=cl},il),U(E,C),O||K.setStrong(E,C,j),E}},(s,u,o)=>{var r=o(6),W=o(17),M=o(58),y=o(23),N=o(42),X=o(48).f,z=o(61),Y=o(104),S=o(107),D=o(44),R=o(109),g=!1,J=D("meta"),U=0,H=function(v){X(v,J,{value:{objectID:"O"+U++,weakData:{}}})},C=s.exports={enable:function(){C.enable=function(){},g=!0;var v=z.f,K=W([].splice),j={};j[J]=1,v(j).length&&(z.f=function(O){for(var _=v(O),cl=0,tl=_.length;cl<tl;cl++)if(_[cl]===J){K(_,cl,1);break}return _},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Y.f}))},fastKey:function(v,K){if(!y(v))return typeof v=="symbol"?v:(typeof v=="string"?"S":"P")+v;if(!N(v,J)){if(!S(v))return"F";if(!K)return"E";H(v)}return v[J].objectID},getWeakData:function(v,K){if(!N(v,J)){if(!S(v))return!0;if(!K)return!1;H(v)}return v[J].weakData},onFreeze:function(v){return R&&g&&S(v)&&!N(v,J)&&H(v),v}};M[J]=!0},(s,u,o)=>{var r=o(18),W=o(15),M=o(61).f,y=o(105),N=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];s.exports.f=function(X){return N&&r(X)=="Window"?function(z){try{return M(z)}catch{return y(N)}}(X):M(W(X))}},(s,u,o)=>{var r=o(64),W=o(67),M=o(106),y=Array,N=Math.max;s.exports=function(X,z,Y){for(var S=W(X),D=r(z,S),R=r(Y===void 0?S:Y,S),g=y(N(R-D,0)),J=0;D<R;D++,J++)M(g,J,X[D]);return g.length=J,g}},(s,u,o)=>{var r=o(21),W=o(48),M=o(14);s.exports=function(y,N,X){var z=r(N);z in y?W.f(y,z,M(0,X)):y[z]=X}},(s,u,o)=>{var r=o(10),W=o(23),M=o(18),y=o(108),N=Object.isExtensible,X=r(function(){});s.exports=X||y?function(z){return!!W(z)&&(!y||M(z)!="ArrayBuffer")&&(!N||N(z))}:N},(s,u,o)=>{var r=o(10);s.exports=r(function(){if(typeof ArrayBuffer=="function"){var W=new ArrayBuffer(8);Object.isExtensible(W)&&Object.defineProperty(W,"a",{value:8})}})},(s,u,o)=>{var r=o(10);s.exports=!r(function(){return Object.isExtensible(Object.preventExtensions({}))})},(s,u,o)=>{var r=o(111),W=o(11),M=o(50),y=o(35),N=o(113),X=o(67),z=o(28),Y=o(114),S=o(115),D=o(116),R=TypeError,g=function(U,H){this.stopped=U,this.result=H},J=g.prototype;s.exports=function(U,H,C){var v,K,j,O,_,cl,tl,E=C&&C.that,il=!(!C||!C.AS_ENTRIES),al=!(!C||!C.IS_RECORD),Nl=!(!C||!C.IS_ITERATOR),nl=!(!C||!C.INTERRUPTED),Sl=r(H,E),P=function(q){return v&&D(v,"normal",q),new g(!0,q)},Q=function(q){return il?(M(q),nl?Sl(q[0],q[1],P):Sl(q[0],q[1])):nl?Sl(q,P):Sl(q)};if(al)v=U.iterator;else if(Nl)v=U;else{if(!(K=S(U)))throw R(y(U)+" is not iterable");if(N(K)){for(j=0,O=X(U);O>j;j++)if((_=Q(U[j]))&&z(J,_))return _;return new g(!1)}v=Y(U,K)}for(cl=al?U.next:v.next;!(tl=W(cl,v)).done;){try{_=Q(tl.value)}catch(q){D(v,"throw",q)}if(typeof _=="object"&&_&&z(J,_))return _}return new g(!1)}},(s,u,o)=>{var r=o(112),W=o(34),M=o(12),y=r(r.bind);s.exports=function(N,X){return W(N),X===void 0?N:M?y(N,X):function(){return N.apply(X,arguments)}}},(s,u,o)=>{var r=o(18),W=o(17);s.exports=function(M){if(r(M)==="Function")return W(M)}},(s,u,o)=>{var r=o(37),W=o(92),M=r("iterator"),y=Array.prototype;s.exports=function(N){return N!==void 0&&(W.Array===N||y[M]===N)}},(s,u,o)=>{var r=o(11),W=o(34),M=o(50),y=o(35),N=o(115),X=TypeError;s.exports=function(z,Y){var S=arguments.length<2?N(z):Y;if(W(S))return M(r(S,z));throw X(y(z)+" is not iterable")}},(s,u,o)=>{var r=o(82),W=o(33),M=o(20),y=o(92),N=o(37)("iterator");s.exports=function(X){if(!M(X))return W(X,N)||W(X,"@@iterator")||y[r(X)]}},(s,u,o)=>{var r=o(11),W=o(50),M=o(33);s.exports=function(y,N,X){var z,Y;W(y);try{if(!(z=M(y,"return"))){if(N==="throw")throw X;return X}z=r(z,y)}catch(S){Y=!0,z=S}if(N==="throw")throw X;if(Y)throw z;return W(z),X}},(s,u,o)=>{var r=o(28),W=TypeError;s.exports=function(M,y){if(r(y,M))return M;throw W("Incorrect invocation")}},(s,u,o)=>{var r=o(37)("iterator"),W=!1;try{var M=0,y={next:function(){return{done:!!M++}},return:function(){W=!0}};y[r]=function(){return this},Array.from(y,function(){throw 2})}catch{}s.exports=function(N,X){if(!X&&!W)return!1;var z=!1;try{var Y={};Y[r]=function(){return{next:function(){return{done:z=!0}}}},N(Y)}catch{}return z}},(s,u,o)=>{var r=o(24),W=o(23),M=o(87);s.exports=function(y,N,X){var z,Y;return M&&r(z=N.constructor)&&z!==X&&W(Y=z.prototype)&&Y!==X.prototype&&M(y,Y),y}},(s,u,o)=>{var r=o(73),W=o(84),M=o(121),y=o(111),N=o(117),X=o(20),z=o(110),Y=o(93),S=o(97),D=o(122),R=o(9),g=o(103).fastKey,J=o(55),U=J.set,H=J.getterFor;s.exports={getConstructor:function(C,v,K,j){var O=C(function(il,al){N(il,_),U(il,{type:v,index:r(null),first:void 0,last:void 0,size:0}),R||(il.size=0),X(al)||z(al,il[j],{that:il,AS_ENTRIES:K})}),_=O.prototype,cl=H(v),tl=function(il,al,Nl){var nl,Sl,P=cl(il),Q=E(il,al);return Q?Q.value=Nl:(P.last=Q={index:Sl=g(al,!0),key:al,value:Nl,previous:nl=P.last,next:void 0,removed:!1},P.first||(P.first=Q),nl&&(nl.next=Q),R?P.size++:il.size++,Sl!=="F"&&(P.index[Sl]=Q)),il},E=function(il,al){var Nl,nl=cl(il),Sl=g(al);if(Sl!=="F")return nl.index[Sl];for(Nl=nl.first;Nl;Nl=Nl.next)if(Nl.key==al)return Nl};return M(_,{clear:function(){for(var il=cl(this),al=il.index,Nl=il.first;Nl;)Nl.removed=!0,Nl.previous&&(Nl.previous=Nl.previous.next=void 0),delete al[Nl.index],Nl=Nl.next;il.first=il.last=void 0,R?il.size=0:this.size=0},delete:function(il){var al=this,Nl=cl(al),nl=E(al,il);if(nl){var Sl=nl.next,P=nl.previous;delete Nl.index[nl.index],nl.removed=!0,P&&(P.next=Sl),Sl&&(Sl.previous=P),Nl.first==nl&&(Nl.first=Sl),Nl.last==nl&&(Nl.last=P),R?Nl.size--:al.size--}return!!nl},forEach:function(il){for(var al,Nl=cl(this),nl=y(il,arguments.length>1?arguments[1]:void 0);al=al?al.next:Nl.first;)for(nl(al.value,al.key,this);al&&al.removed;)al=al.previous},has:function(il){return!!E(this,il)}}),M(_,K?{get:function(il){var al=E(this,il);return al&&al.value},set:function(il,al){return tl(this,il===0?0:il,al)}}:{add:function(il){return tl(this,il=il===0?0:il,il)}}),R&&W(_,"size",{configurable:!0,get:function(){return cl(this).size}}),O},setStrong:function(C,v,K){var j=v+" Iterator",O=H(v),_=H(j);Y(C,v,function(cl,tl){U(this,{type:j,target:cl,state:O(cl),kind:tl,last:void 0})},function(){for(var cl=_(this),tl=cl.kind,E=cl.last;E&&E.removed;)E=E.previous;return!cl.target||!(cl.last=E=E?E.next:cl.state.first)?(cl.target=void 0,S(void 0,!0)):S(tl=="keys"?E.key:tl=="values"?E.value:[E.key,E.value],!1)},K?"entries":"values",!K,!0),D(v)}}},(s,u,o)=>{var r=o(51);s.exports=function(W,M,y){for(var N in M)r(W,N,M[N],y);return W}},(s,u,o)=>{var r=o(27),W=o(84),M=o(37),y=o(9),N=M("species");s.exports=function(X){var z=r(X);y&&z&&!z[N]&&W(z,N,{configurable:!0,get:function(){return this}})}},(s,u,o)=>{o(124)},(s,u,o)=>{o(102)("Set",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},o(120))},(s,u,o)=>{var r,W=o(39),M=o(6),y=o(7),N=o(27),X=o(17),z=o(10),Y=o(44),S=o(24),D=o(126),R=o(20),g=o(23),J=o(26),U=o(110),H=o(50),C=o(82),v=o(42),K=o(106),j=o(47),O=o(67),_=o(127),cl=o(128),tl=o(130),E=o(131),il=o(132),al=o(133),Nl=y.Object,nl=y.Array,Sl=y.Date,P=y.Error,Q=y.EvalError,q=y.RangeError,ll=y.ReferenceError,B=y.SyntaxError,F=y.TypeError,el=y.URIError,dl=y.PerformanceMark,Zl=y.WebAssembly,Wl=Zl&&Zl.CompileError||P,Gl=Zl&&Zl.LinkError||P,Il=Zl&&Zl.RuntimeError||P,xl=N("DOMException"),bl=tl.Map,Ol=tl.has,_l=tl.get,Jl=tl.set,$=E.Set,ol=E.add,hl=N("Object","keys"),pl=X([].push),zl=X((!0).valueOf),jl=X(1 .valueOf),Ul=X("".valueOf),Kl=X(Sl.prototype.getTime),le=Y("structuredClone"),Pl="DataCloneError",ee="Transferring",ql=function(fl){return!z(function(){var Ye=new y.Set([7]),ze=fl(Ye),Ie=fl(Nl(7));return ze==Ye||!ze.has(7)||typeof Ie!="object"||Ie!=7})&&fl},ie=function(fl,Ye){return!z(function(){var ze=new Ye,Ie=fl({a:ze,b:ze});return!(Ie&&Ie.a===Ie.b&&Ie.a instanceof Ye&&Ie.a.stack===ze.stack)})},ce=y.structuredClone,Ge=W||!ie(ce,P)||!ie(ce,xl)||(r=ce,!!z(function(){var fl=r(new y.AggregateError([1],le,{cause:3}));return fl.name!="AggregateError"||fl.errors[0]!=1||fl.message!=le||fl.cause!=3})),Dl=!ce&&ql(function(fl){return new dl(le,{detail:fl}).detail}),Al=ql(ce)||Dl,We=function(fl){throw new xl("Uncloneable type: "+fl,Pl)},he=function(fl,Ye){throw new xl((Ye||"Cloning")+" of "+fl+" cannot be properly polyfilled in this engine",Pl)},Ke=function(fl,Ye){return Al||he(Ye),Al(fl)},Le=function(fl,Ye){if(J(fl)&&We("Symbol"),!g(fl))return fl;if(Ye){if(Ol(Ye,fl))return _l(Ye,fl)}else Ye=new bl;var ze,Ie,be,St,Oe,Se,Zt,Cl,Ql,se,oe,te=C(fl),ae=!1;switch(te){case"Array":be=nl(O(fl)),ae=!0;break;case"Object":be={},ae=!0;break;case"Map":be=new bl,ae=!0;break;case"Set":be=new $,ae=!0;break;case"RegExp":be=new RegExp(fl.source,cl(fl));break;case"Error":switch(Ie=fl.name){case"AggregateError":be=N("AggregateError")([]);break;case"EvalError":be=Q();break;case"RangeError":be=q();break;case"ReferenceError":be=ll();break;case"SyntaxError":be=B();break;case"TypeError":be=F();break;case"URIError":be=el();break;case"CompileError":be=Wl();break;case"LinkError":be=Gl();break;case"RuntimeError":be=Il();break;default:be=P()}ae=!0;break;case"DOMException":be=new xl(fl.message,fl.name),ae=!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":ze=y[te],g(ze)||he(te),be=new ze(Le(fl.buffer,Ye),fl.byteOffset,te==="DataView"?fl.byteLength:fl.length);break;case"DOMQuad":try{be=new DOMQuad(Le(fl.p1,Ye),Le(fl.p2,Ye),Le(fl.p3,Ye),Le(fl.p4,Ye))}catch{be=Ke(fl,te)}break;case"File":if(Al)try{be=Al(fl),C(be)!==te&&(be=void 0)}catch{}if(!be)try{be=new File([fl],fl.name,fl)}catch{}be||he(te);break;case"FileList":if(St=function(){var Ve;try{Ve=new y.DataTransfer}catch{try{Ve=new y.ClipboardEvent("").clipboardData}catch{}}return Ve&&Ve.items&&Ve.files?Ve:null}()){for(Oe=0,Se=O(fl);Oe<Se;Oe++)St.items.add(Le(fl[Oe],Ye));be=St.files}else be=Ke(fl,te);break;case"ImageData":try{be=new ImageData(Le(fl.data,Ye),fl.width,fl.height,{colorSpace:fl.colorSpace})}catch{be=Ke(fl,te)}break;default:if(Al)be=Al(fl);else switch(te){case"BigInt":be=Nl(fl.valueOf());break;case"Boolean":be=Nl(zl(fl));break;case"Number":be=Nl(jl(fl));break;case"String":be=Nl(Ul(fl));break;case"Date":be=new Sl(Kl(fl));break;case"ArrayBuffer":(ze=y.DataView)||typeof fl.slice=="function"||he(te);try{if(typeof fl.slice!="function"||fl.resizable)for(Se=fl.byteLength,oe=("maxByteLength"in fl)?{maxByteLength:fl.maxByteLength}:void 0,be=new ArrayBuffer(Se,oe),Ql=new ze(fl),se=new ze(be),Oe=0;Oe<Se;Oe++)se.setUint8(Oe,Ql.getUint8(Oe));else be=fl.slice(0)}catch{throw new xl("ArrayBuffer is detached",Pl)}break;case"SharedArrayBuffer":be=fl;break;case"Blob":try{be=fl.slice(0,fl.size,fl.type)}catch{he(te)}break;case"DOMPoint":case"DOMPointReadOnly":ze=y[te];try{be=ze.fromPoint?ze.fromPoint(fl):new ze(fl.x,fl.y,fl.z,fl.w)}catch{he(te)}break;case"DOMRect":case"DOMRectReadOnly":ze=y[te];try{be=ze.fromRect?ze.fromRect(fl):new ze(fl.x,fl.y,fl.width,fl.height)}catch{he(te)}break;case"DOMMatrix":case"DOMMatrixReadOnly":ze=y[te];try{be=ze.fromMatrix?ze.fromMatrix(fl):new ze(fl)}catch{he(te)}break;case"AudioData":case"VideoFrame":S(fl.clone)||he(te);try{be=fl.clone()}catch{We(te)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":he(te);default:We(te)}}if(Jl(Ye,fl,be),ae)switch(te){case"Array":case"Object":for(Zt=hl(fl),Oe=0,Se=O(Zt);Oe<Se;Oe++)Cl=Zt[Oe],K(be,Cl,Le(fl[Cl],Ye));break;case"Map":fl.forEach(function(Ve,we){Jl(be,Le(we,Ye),Le(Ve,Ye))});break;case"Set":fl.forEach(function(Ve){ol(be,Le(Ve,Ye))});break;case"Error":j(be,"message",Le(fl.message,Ye)),v(fl,"cause")&&j(be,"cause",Le(fl.cause,Ye)),Ie=="AggregateError"&&(be.errors=Le(fl.errors,Ye));case"DOMException":il&&j(be,"stack",Le(fl.stack,Ye))}return be};M({global:!0,enumerable:!0,sham:!al,forced:Ge},{structuredClone:function(fl){var Ye,ze=_(arguments.length,1)>1&&!R(arguments[1])?H(arguments[1]):void 0,Ie=ze?ze.transfer:void 0;return Ie!==void 0&&function(be,St){if(!g(be))throw F("Transfer option cannot be converted to a sequence");var Oe=[];U(be,function(Ve){pl(Oe,H(Ve))});var Se,Zt,Cl,Ql,se,oe,te=0,ae=O(Oe);if(al)for(Ql=ce(Oe,{transfer:Oe});te<ae;)Jl(St,Oe[te],Ql[te++]);else for(;te<ae;){if(Se=Oe[te++],Ol(St,Se))throw new xl("Duplicate transferable",Pl);switch(Zt=C(Se)){case"ImageBitmap":Cl=y.OffscreenCanvas,D(Cl)||he(Zt,ee);try{(oe=new Cl(Se.width,Se.height)).getContext("bitmaprenderer").transferFromImageBitmap(Se),se=oe.transferToImageBitmap()}catch{}break;case"AudioData":case"VideoFrame":S(Se.clone)&&S(Se.close)||he(Zt,ee);try{se=Se.clone(),Se.close()}catch{}break;case"ArrayBuffer":S(Se.transfer)||he(Zt,ee),se=Se.transfer();break;case"MediaSourceHandle":case"MessagePort":case"OffscreenCanvas":case"ReadableStream":case"TransformStream":case"WritableStream":he(Zt,ee)}if(se===void 0)throw new xl("This object cannot be transferred: "+Zt,Pl);Jl(St,Se,se)}}(Ie,Ye=new bl),Le(fl,Ye)}})},(s,u,o)=>{var r=o(17),W=o(10),M=o(24),y=o(82),N=o(27),X=o(54),z=function(){},Y=[],S=N("Reflect","construct"),D=/^\s*(?:class|function)\b/,R=r(D.exec),g=!D.exec(z),J=function(H){if(!M(H))return!1;try{return S(z,Y,H),!0}catch{return!1}},U=function(H){if(!M(H))return!1;switch(y(H)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return g||!!R(D,X(H))}catch{return!0}};U.sham=!0,s.exports=!S||W(function(){var H;return J(J.call)||!J(Object)||!J(function(){H=!0})||H})?U:J},s=>{var u=TypeError;s.exports=function(o,r){if(o<r)throw u("Not enough arguments");return o}},(s,u,o)=>{var r=o(11),W=o(42),M=o(28),y=o(129),N=RegExp.prototype;s.exports=function(X){var z=X.flags;return z!==void 0||"flags"in N||W(X,"flags")||!M(N,X)?z:r(y,X)}},(s,u,o)=>{var r=o(50);s.exports=function(){var W=r(this),M="";return W.hasIndices&&(M+="d"),W.global&&(M+="g"),W.ignoreCase&&(M+="i"),W.multiline&&(M+="m"),W.dotAll&&(M+="s"),W.unicode&&(M+="u"),W.unicodeSets&&(M+="v"),W.sticky&&(M+="y"),M}},(s,u,o)=>{var r=o(17),W=Map.prototype;s.exports={Map,set:r(W.set),get:r(W.get),has:r(W.has),remove:r(W.delete),proto:W}},(s,u,o)=>{var r=o(17),W=Set.prototype;s.exports={Set,add:r(W.add),has:r(W.has),remove:r(W.delete),proto:W}},(s,u,o)=>{var r=o(10),W=o(14);s.exports=!r(function(){var M=Error("a");return"stack"in M?(Object.defineProperty(M,"stack",W(1,7)),M.stack!==7):!0})},(s,u,o)=>{var r=o(7),W=o(10),M=o(31),y=o(134),N=o(135),X=o(136),z=r.structuredClone;s.exports=!!z&&!W(function(){if(N&&M>92||X&&M>94||y&&M>97)return!1;var Y=new ArrayBuffer(8),S=z(Y,{transfer:[Y]});return Y.byteLength!=0||S.byteLength!=8})},(s,u,o)=>{var r=o(135),W=o(136);s.exports=!r&&!W&&typeof window=="object"&&typeof document=="object"},s=>{s.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},(s,u,o)=>{var r=o(18);s.exports=typeof process<"u"&&r(process)=="process"},(s,u,o)=>{var r=o(7);s.exports=r},(__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:u,NodeFilterFactory:o,NodeStandardFontDataFactory:r}=__w_pdfjs_require__(155);exports.DefaultCanvasFactory=DefaultCanvasFactory=s,exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory=u,exports.DefaultFilterFactory=DefaultFilterFactory=o,exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory=r}if(_is_node.isNodeJS){const{PDFNodeStream:s}=__w_pdfjs_require__(156);createPDFNetworkStream=u=>new s(u)}else{const{PDFNetworkStream:s}=__w_pdfjs_require__(159),{PDFFetchStream:u}=__w_pdfjs_require__(160);createPDFNetworkStream=o=>(0,_display_utils.isValidFetchUrl)(o.url)?new u(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 u=new PDFDocumentLoadingTask,{docId:o}=u,r=s.url?getUrlProp(s.url):null,W=s.data?getDataProp(s.data):null,M=s.httpHeaders||null,y=s.withCredentials===!0,N=s.password??null,X=s.range instanceof PDFDataRangeTransport?s.range:null,z=Number.isInteger(s.rangeChunkSize)&&s.rangeChunkSize>0?s.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let Y=s.worker instanceof PDFWorker?s.worker:null;const S=s.verbosity,D=typeof s.docBaseUrl!="string"||(0,_display_utils.isDataScheme)(s.docBaseUrl)?null:s.docBaseUrl,R=typeof s.cMapUrl=="string"?s.cMapUrl:null,g=s.cMapPacked!==!1,J=s.CMapReaderFactory||DefaultCMapReaderFactory,U=typeof s.standardFontDataUrl=="string"?s.standardFontDataUrl:null,H=s.StandardFontDataFactory||DefaultStandardFontDataFactory,C=s.stopAtErrors!==!0,v=Number.isInteger(s.maxImageSize)&&s.maxImageSize>-1?s.maxImageSize:-1,K=s.isEvalSupported!==!1,j=typeof s.isOffscreenCanvasSupported=="boolean"?s.isOffscreenCanvasSupported:!_is_node.isNodeJS,O=Number.isInteger(s.canvasMaxAreaInBytes)?s.canvasMaxAreaInBytes:-1,_=typeof s.disableFontFace=="boolean"?s.disableFontFace:_is_node.isNodeJS,cl=s.fontExtraProperties===!0,tl=s.enableXfa===!0,E=s.ownerDocument||globalThis.document,il=s.disableRange===!0,al=s.disableStream===!0,Nl=s.disableAutoFetch===!0,nl=s.pdfBug===!0,Sl=X?X.length:s.length??NaN,P=typeof s.useSystemFonts=="boolean"?s.useSystemFonts:!_is_node.isNodeJS&&!_,Q=typeof s.useWorkerFetch=="boolean"?s.useWorkerFetch:J===_display_utils.DOMCMapReaderFactory&&H===_display_utils.DOMStandardFontDataFactory&&(0,_display_utils.isValidFetchUrl)(R,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(U,document.baseURI),q=s.canvasFactory||new DefaultCanvasFactory({ownerDocument:E}),ll=s.filterFactory||new DefaultFilterFactory({docId:o,ownerDocument:E});(0,_util.setVerbosityLevel)(S);const B={canvasFactory:q,filterFactory:ll};if(Q||(B.cMapReaderFactory=new J({baseUrl:R,isCompressed:g}),B.standardFontDataFactory=new H({baseUrl:U})),!Y){const dl={verbosity:S,port:_worker_options.GlobalWorkerOptions.workerPort};Y=dl.port?PDFWorker.fromPort(dl):new PDFWorker(dl),u._worker=Y}const F={docId:o,apiVersion:"3.7.107",data:W,password:N,disableAutoFetch:Nl,rangeChunkSize:z,length:Sl,docBaseUrl:D,enableXfa:tl,evaluatorOptions:{maxImageSize:v,disableFontFace:_,ignoreErrors:C,isEvalSupported:K,isOffscreenCanvasSupported:j,canvasMaxAreaInBytes:O,fontExtraProperties:cl,useSystemFonts:P,cMapUrl:Q?R:null,standardFontDataUrl:Q?U:null}},el={ignoreErrors:C,isEvalSupported:K,disableFontFace:_,fontExtraProperties:cl,enableXfa:tl,ownerDocument:E,disableAutoFetch:Nl,pdfBug:nl,styleElement:null};return Y.promise.then(function(){if(u.destroyed)throw new Error("Loading aborted");const dl=_fetchDocument(Y,F),Zl=new Promise(function(Wl){let Gl;X?Gl=new _transport_stream.PDFDataTransportStream({length:Sl,initialData:X.initialData,progressiveDone:X.progressiveDone,contentDispositionFilename:X.contentDispositionFilename,disableRange:il,disableStream:al},X):W||(Gl=createPDFNetworkStream({url:r,length:Sl,httpHeaders:M,withCredentials:y,rangeChunkSize:z,disableRange:il,disableStream:al})),Wl(Gl)});return Promise.all([dl,Zl]).then(function(Wl){let[Gl,Il]=Wl;if(u.destroyed)throw new Error("Loading aborted");const xl=new _message_handler.MessageHandler(o,Gl,Y.port),bl=new WorkerTransport(xl,u,Il,el,B);u._transport=bl,xl.send("Ready",null)})}).catch(u._capability.reject),u}async function _fetchDocument(s,u){if(s.destroyed)throw new Error("Worker was destroyed");const o=await s.messageHandler.sendWithPromise("GetDocRequest",u,u.data?[u.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(u,o){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],W=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;this.length=u,this.initialData=o,this.progressiveDone=r,this.contentDispositionFilename=W,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=new _util.PromiseCapability}addRangeListener(u){this._rangeListeners.push(u)}addProgressListener(u){this._progressListeners.push(u)}addProgressiveReadListener(u){this._progressiveReadListeners.push(u)}addProgressiveDoneListener(u){this._progressiveDoneListeners.push(u)}onDataRange(u,o){for(const r of this._rangeListeners)r(u,o)}onDataProgress(u,o){this._readyCapability.promise.then(()=>{for(const r of this._progressListeners)r(u,o)})}onDataProgressiveRead(u){this._readyCapability.promise.then(()=>{for(const o of this._progressiveReadListeners)o(u)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const u of this._progressiveDoneListeners)u()})}transportReady(){this._readyCapability.resolve()}requestDataRange(u,o){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(u,o){this._pdfInfo=u,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(u){return this._transport.getPage(u)}getPageIndex(u){return this._transport.getPageIndex(u)}getDestinations(){return this._transport.getDestinations()}getDestination(u){return this._transport.getDestination(u)}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 u=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return this._transport.startCleanup(u||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(u,o,r){et(this,a),et(this,w),et(this,t,null),et(this,e,!1);let W=arguments.length>3&&arguments[3]!==void 0&&arguments[3];this._pageIndex=u,this._pageInfo=o,this._transport=r,this._stats=W?new _display_utils.StatTimer:null,this._pdfBug=W,this.commonObjs=r.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:u,rotation:o=this.rotate,offsetX:r=0,offsetY:W=0,dontFlip:M=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new _display_utils.PageViewport({viewBox:this.view,scale:u,rotation:o,offsetX:r,offsetY:W,dontFlip:M})}getAnnotations(){let{intent:u="display"}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const o=this._transport.getRenderingIntent(u);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 u;return((u=this._transport._htmlForXfa)===null||u===void 0?void 0:u.children[this._pageIndex])||null}render(u){var o,r;let{canvasContext:W,viewport:M,intent:y="display",annotationMode:N=_util.AnnotationMode.ENABLE,transform:X=null,background:z=null,optionalContentConfigPromise:Y=null,annotationCanvasMap:S=null,pageColors:D=null,printAnnotationStorage:R=null}=u;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.");(r=this._stats)===null||r===void 0||r.time("Overall");const g=this._transport.getRenderingIntent(y,N,R);ut(this,e,!1),nt(this,w,pe).call(this),Y||(Y=this._transport.getOptionalContentConfig());let J=this._intentStates.get(g.cacheKey);J||(J=Object.create(null),this._intentStates.set(g.cacheKey,J)),J.streamReaderCancelTimeout&&(clearTimeout(J.streamReaderCancelTimeout),J.streamReaderCancelTimeout=null);const U=!!(g.renderingIntent&_util.RenderingIntentFlag.PRINT);if(!J.displayReadyCapability){var H;J.displayReadyCapability=new _util.PromiseCapability,J.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(H=this._stats)===null||H===void 0||H.time("Page Request"),this._pumpOperatorList(g)}const C=j=>{var O,_;J.renderTasks.delete(v),(this._maybeCleanupAfterRender||U)&&ut(this,e,!0),nt(this,a,re).call(this,!U),j?(v.capability.reject(j),this._abortOperatorList({intentState:J,reason:j instanceof Error?j:new Error(j)})):v.capability.resolve(),(O=this._stats)===null||O===void 0||O.timeEnd("Rendering"),(_=this._stats)===null||_===void 0||_.timeEnd("Overall")},v=new InternalRenderTask({callback:C,params:{canvasContext:W,viewport:M,transform:X,background:z},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:S,operatorList:J.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!U,pdfBug:this._pdfBug,pageColors:D});(J.renderTasks||(J.renderTasks=new Set)).add(v);const K=v.task;return Promise.all([J.displayReadyCapability.promise,Y]).then(j=>{var O;let[_,cl]=j;T(this,e)?C():((O=this._stats)===null||O===void 0||O.time("Rendering"),v.initializeGraphics({transparency:_,optionalContentConfig:cl}),v.operatorListChanged())}).catch(C),K}getOperatorList(){let{intent:u="display",annotationMode:o=_util.AnnotationMode.ENABLE,printAnnotationStorage:r=null}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const W=this._transport.getRenderingIntent(u,o,r,!0);let M,y=this._intentStates.get(W.cacheKey);if(y||(y=Object.create(null),this._intentStates.set(W.cacheKey,y)),!y.opListReadCapability){var N;M=Object.create(null),M.operatorListChanged=function(){y.operatorList.lastChunk&&(y.opListReadCapability.resolve(y.operatorList),y.renderTasks.delete(M))},y.opListReadCapability=new _util.PromiseCapability,(y.renderTasks||(y.renderTasks=new Set)).add(M),y.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(N=this._stats)===null||N===void 0||N.time("Page Request"),this._pumpOperatorList(W)}return y.opListReadCapability.promise}streamTextContent(){let{includeMarkedContent:u=!1,disableNormalization:o=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:u===!0,disableNormalization:o===!0},{highWaterMark:100,size:r=>r.items.length})}getTextContent(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then(r=>_xfa_text.XfaText.textContent(r));const o=this.streamTextContent(u);return new Promise(function(r,W){const M=o.getReader(),y={items:[],styles:Object.create(null)};(function N(){M.read().then(function(X){let{value:z,done:Y}=X;Y?r(y):(Object.assign(y.styles,z.styles),y.items.push(...z.items),N())},W)})()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const u=[];for(const o of this._intentStates.values())if(this._abortOperatorList({intentState:o,reason:new Error("Page was destroyed."),force:!0}),!o.opListReadCapability)for(const r of o.renderTasks)u.push(r.completed),r.cancel();return this.objs.clear(),ut(this,e,!1),nt(this,w,pe).call(this),Promise.all(u)}cleanup(){let u=arguments.length>0&&arguments[0]!==void 0&&arguments[0];ut(this,e,!0);const o=nt(this,a,re).call(this,!1);return u&&o&&this._stats&&(this._stats=new _display_utils.StatTimer),o}_startRenderPage(u,o){var r,W;const M=this._intentStates.get(o);M&&((r=this._stats)===null||r===void 0||r.timeEnd("Page Request"),(W=M.displayReadyCapability)===null||W===void 0||W.resolve(u))}_renderPageChunk(u,o){for(let r=0,W=u.length;r<W;r++)o.operatorList.fnArray.push(u.fnArray[r]),o.operatorList.argsArray.push(u.argsArray[r]);o.operatorList.lastChunk=u.lastChunk,o.operatorList.separateAnnots=u.separateAnnots;for(const r of o.renderTasks)r.operatorListChanged();u.lastChunk&&nt(this,a,re).call(this,!0)}_pumpOperatorList(u){let{renderingIntent:o,cacheKey:r,annotationStorageMap:W}=u;const M=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:o,cacheKey:r,annotationStorage:W}).getReader(),y=this._intentStates.get(r);y.streamReader=M;const N=()=>{M.read().then(X=>{let{value:z,done:Y}=X;Y?y.streamReader=null:this._transport.destroyed||(this._renderPageChunk(z,y),N())},X=>{if(y.streamReader=null,!this._transport.destroyed){if(y.operatorList){y.operatorList.lastChunk=!0;for(const z of y.renderTasks)z.operatorListChanged();nt(this,a,re).call(this,!0)}if(y.displayReadyCapability)y.displayReadyCapability.reject(X);else{if(!y.opListReadCapability)throw X;y.opListReadCapability.reject(X)}}})};N()}_abortOperatorList(u){let{intentState:o,reason:r,force:W=!1}=u;if(o.streamReader){if(o.streamReaderCancelTimeout&&(clearTimeout(o.streamReaderCancelTimeout),o.streamReaderCancelTimeout=null),!W){if(o.renderTasks.size>0)return;if(r instanceof _display_utils.RenderingCancelledException){let M=RENDERING_CANCELLED_TIMEOUT;r.extraDelay>0&&r.extraDelay<1e3&&(M+=r.extraDelay),o.streamReaderCancelTimeout=setTimeout(()=>{o.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:o,reason:r,force:!0})},M);return}}if(o.streamReader.cancel(new _util.AbortException(r.message)).catch(()=>{}),o.streamReader=null,!this._transport.destroyed){for(const[M,y]of this._intentStates)if(y===o){this._intentStates.delete(M);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:u,operatorList:o}of this._intentStates.values())if(u.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(u,o){const r={data:structuredClone(u,null)};T(this,h).then(()=>{for(const W of T(this,p))W.call(this,r)})}addEventListener(u,o){T(this,p).add(o)}removeEventListener(u,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,u){let o;try{if(o=new URL(s),!o.origin||o.origin==="null")return!1}catch{return!1}const r=new URL(u,o);return o.origin===r.origin},PDFWorkerUtil.createCDNWrapper=function(s){const u=`importScripts("${s}");`;return URL.createObjectURL(new Blob([u]))};const _PDFWorker=class{constructor(){let{name:s=null,port:u=null,verbosity:o=(0,_util.getVerbosityLevel)()}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(u&&T(_PDFWorker,l).has(u))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,u?(T(_PDFWorker,l).set(u,this),this._initializeFromPort(u)):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 u=new Worker(s),o=new _message_handler.MessageHandler("main","worker",u),r=()=>{u.removeEventListener("error",W),o.destroy(),u.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},W=()=>{this._webWorker||r()};u.addEventListener("error",W),o.on("test",y=>{u.removeEventListener("error",W),this.destroyed?r():y?(this._messageHandler=o,this._port=u,this._webWorker=u,this._readyCapability.resolve(),o.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),o.destroy(),u.terminate())}),o.on("ready",y=>{if(u.removeEventListener("error",W),this.destroyed)r();else try{M()}catch{this._setupFakeWorker()}});const M=()=>{const y=new Uint8Array;o.send("test",y,[y.buffer])};M();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 u=new LoopbackPort;this._port=u;const o="fake"+PDFWorkerUtil.fakeWorkerId++,r=new _message_handler.MessageHandler(o+"_worker",o,u);s.setup(r,u);const W=new _message_handler.MessageHandler(o,o+"_worker",u);this._messageHandler=W,this._readyCapability.resolve(),W.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(u,o,r,W,M){et(this,m),et(this,c,new Map),et(this,b,new Map),et(this,L,new Map),this.messageHandler=u,this.loadingTask=o,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({ownerDocument:W.ownerDocument,styleElement:W.styleElement}),this._params=W,this.canvasFactory=M.canvasFactory,this.filterFactory=M.filterFactory,this.cMapReaderFactory=M.cMapReaderFactory,this.standardFontDataFactory=M.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=r,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(u){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_util.AnnotationMode.ENABLE,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,W=arguments.length>3&&arguments[3]!==void 0&&arguments[3],M=_util.RenderingIntentFlag.DISPLAY,y=null;switch(u){case"any":M=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":M=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${u}`)}switch(o){case _util.AnnotationMode.DISABLE:M+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:M+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:M+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,y=(M&_util.RenderingIntentFlag.PRINT&&r instanceof _annotation_storage.PrintAnnotationStorage?r:this.annotationStorage).serializable;break;default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${o}`)}return W&&(M+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:M,cacheKey:`${M}_${_annotation_storage.AnnotationStorage.getHash(y)}`,annotationStorageMap:y}}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 u=[];for(const r of T(this,b).values())u.push(r._destroy());T(this,b).clear(),T(this,L).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const o=this.messageHandler.sendWithPromise("Terminate",null);return u.push(o),Promise.all(u).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:u,loadingTask:o}=this;u.on("GetReader",(r,W)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=M=>{this._lastProgress={loaded:M.loaded,total:M.total}},W.onPull=()=>{this._fullReader.read().then(function(M){let{value:y,done:N}=M;N?W.close():((0,_util.assert)(y instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),W.enqueue(new Uint8Array(y),1,[y]))}).catch(M=>{W.error(M)})},W.onCancel=M=>{this._fullReader.cancel(M),W.ready.catch(y=>{if(!this.destroyed)throw y})}}),u.on("ReaderHeadersReady",r=>{const W=new _util.PromiseCapability,M=this._fullReader;return M.headersReady.then(()=>{if(!M.isStreamingSupported||!M.isRangeSupported){if(this._lastProgress){var y;(y=o.onProgress)===null||y===void 0||y.call(o,this._lastProgress)}M.onProgress=N=>{var X;(X=o.onProgress)===null||X===void 0||X.call(o,{loaded:N.loaded,total:N.total})}}W.resolve({isStreamingSupported:M.isStreamingSupported,isRangeSupported:M.isRangeSupported,contentLength:M.contentLength})},W.reject),W.promise}),u.on("GetRangeReader",(r,W)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const M=this._networkStream.getRangeReader(r.begin,r.end);M?(W.onPull=()=>{M.read().then(function(y){let{value:N,done:X}=y;X?W.close():((0,_util.assert)(N instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),W.enqueue(new Uint8Array(N),1,[N]))}).catch(y=>{W.error(y)})},W.onCancel=y=>{M.cancel(y),W.ready.catch(N=>{if(!this.destroyed)throw N})}):W.close()}),u.on("GetDoc",r=>{let{pdfInfo:W}=r;this._numPages=W.numPages,this._htmlForXfa=W.htmlForXfa,delete W.htmlForXfa,o._capability.resolve(new PDFDocumentProxy(W,this))}),u.on("DocException",function(r){let W;switch(r.name){case"PasswordException":W=new _util.PasswordException(r.message,r.code);break;case"InvalidPDFException":W=new _util.InvalidPDFException(r.message);break;case"MissingPDFException":W=new _util.MissingPDFException(r.message);break;case"UnexpectedResponseException":W=new _util.UnexpectedResponseException(r.message,r.status);break;case"UnknownErrorException":W=new _util.UnknownErrorException(r.message,r.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}o._capability.reject(W)}),u.on("PasswordRequest",r=>{if(this._passwordCapability=new _util.PromiseCapability,o.onPassword){const W=M=>{M instanceof Error?this._passwordCapability.reject(M):this._passwordCapability.resolve({password:M})};try{o.onPassword(W,r.code)}catch(M){this._passwordCapability.reject(M)}}else this._passwordCapability.reject(new _util.PasswordException(r.message,r.code));return this._passwordCapability.promise}),u.on("DataLoaded",r=>{var W;(W=o.onProgress)===null||W===void 0||W.call(o,{loaded:r.length,total:r.length}),this.downloadInfoCapability.resolve(r)}),u.on("StartRenderPage",r=>{this.destroyed||T(this,b).get(r.pageIndex)._startRenderPage(r.transparency,r.cacheKey)}),u.on("commonobj",r=>{var W;let[M,y,N]=r;if(!this.destroyed&&!this.commonObjs.has(M))switch(y){case"Font":const X=this._params;if("error"in N){const S=N.error;(0,_util.warn)(`Error during font loading: ${S}`),this.commonObjs.resolve(M,S);break}const z=X.pdfBug&&(W=globalThis.FontInspector)!==null&&W!==void 0&&W.enabled?(S,D)=>globalThis.FontInspector.fontAdded(S,D):null,Y=new _font_loader.FontFaceObject(N,{isEvalSupported:X.isEvalSupported,disableFontFace:X.disableFontFace,ignoreErrors:X.ignoreErrors,inspectFont:z});this.fontLoader.bind(Y).catch(S=>u.sendWithPromise("FontFallback",{id:M})).finally(()=>{!X.fontExtraProperties&&Y.data&&(Y.data=null),this.commonObjs.resolve(M,Y)});break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(M,N);break;default:throw new Error(`Got unknown common object type ${y}`)}}),u.on("obj",r=>{let[W,M,y,N]=r;if(this.destroyed)return;const X=T(this,b).get(M);if(!X.objs.has(W))switch(y){case"Image":if(X.objs.resolve(W,N),N){let Y;if(N.bitmap){const{width:S,height:D}=N;Y=S*D*4}else{var z;Y=((z=N.data)===null||z===void 0?void 0:z.length)||0}Y>_util.MAX_IMAGE_SIZE_TO_CACHE&&(X._maybeCleanupAfterRender=!0)}break;case"Pattern":X.objs.resolve(W,N);break;default:throw new Error(`Got unknown object type ${y}`)}}),u.on("DocProgress",r=>{var W;this.destroyed||(W=o.onProgress)===null||W===void 0||W.call(o,{loaded:r.loaded,total:r.total})}),u.on("FetchBuiltInCMap",r=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(r):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),u.on("FetchStandardFontData",r=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(r):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var u;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:((u=this._fullReader)===null||u===void 0?void 0:u.filename)??null}).finally(()=>{this.annotationStorage.resetModified()})}getPage(u){if(!Number.isInteger(u)||u<=0||u>this._numPages)return Promise.reject(new Error("Invalid page request."));const o=u-1,r=T(this,L).get(o);if(r)return r;const W=this.messageHandler.sendWithPromise("GetPage",{pageIndex:o}).then(M=>{if(this.destroyed)throw new Error("Transport destroyed");const y=new PDFPageProxy(o,M,this,this._params.pdfBug);return T(this,b).set(o,y),y});return T(this,L).set(o,W),W}getPageIndex(u){return typeof u!="object"||u===null||!Number.isInteger(u.num)||u.num<0||!Number.isInteger(u.gen)||u.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:u.num,gen:u.gen})}getAnnotations(u,o){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:u,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(u){return typeof u!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:u})}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(u){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:u})}getStructTree(u){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:u})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(u=>new _optional_content_config.OptionalContentConfig(u))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const u="GetMetadata",o=T(this,c).get(u);if(o)return o;const r=this.messageHandler.sendWithPromise(u,null).then(W=>{var M,y;return{info:W[0],metadata:W[1]?new _metadata.Metadata(W[1]):null,contentDispositionFilename:((M=this._fullReader)===null||M===void 0?void 0:M.filename)??null,contentLength:((y=this._fullReader)===null||y===void 0?void 0:y.contentLength)??null}});return T(this,c).set(u,r),r}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(){let u=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(),u||this.fontLoader.clear(),T(this,c).clear(),this.filterFactory.destroy(!0)}}get loadingParams(){const{disableAutoFetch:u,enableXfa:o}=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:u,enableXfa:o})}}c=new WeakMap,b=new WeakMap,L=new WeakMap,m=new WeakSet,Ae=function(s){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const o=T(this,c).get(s);if(o)return o;const r=this.messageHandler.sendWithPromise(s,u);return T(this,c).set(s,r),r};class PDFObjects{constructor(){et(this,I),et(this,x,Object.create(null))}get(u){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(o){const W=nt(this,I,_e).call(this,u);return W.capability.promise.then(()=>o(W.data)),null}const r=T(this,x)[u];if(r==null||!r.capability.settled)throw new Error(`Requesting object that isn't resolved yet ${u}.`);return r.data}has(u){const o=T(this,x)[u];return(o==null?void 0:o.capability.settled)||!1}resolve(u){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const r=nt(this,I,_e).call(this,u);r.data=o,r.capability.resolve()}clear(){for(const o in T(this,x)){var u;const{data:r}=T(this,x)[o];r==null||(u=r.bitmap)===null||u===void 0||u.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(u){et(this,i,null),ut(this,i,u),this.onContinue=null}get promise(){return T(this,i).capability.promise}cancel(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;T(this,i).cancel(null,u)}get separateAnnots(){const{separateAnnots:u}=T(this,i).operatorList;if(!u)return!1;const{annotationCanvasMap:o}=T(this,i);return u.form||u.canvas&&(o==null?void 0:o.size)>0}}i=new WeakMap,exports.RenderTask=RenderTask;const n=class{constructor(s){let{callback:u,params:o,objs:r,commonObjs:W,annotationCanvasMap:M,operatorList:y,pageIndex:N,canvasFactory:X,filterFactory:z,useRequestAnimationFrame:Y=!1,pdfBug:S=!1,pageColors:D=null}=s;this.callback=u,this.params=o,this.objs=r,this.commonObjs=W,this.annotationCanvasMap=M,this.operatorListIdx=null,this.operatorList=y,this._pageIndex=N,this.canvasFactory=X,this.filterFactory=z,this._pdfBug=S,this.pageColors=D,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=Y===!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 u,o;let{transparency:r=!1,optionalContentConfig:W}=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&&(u=globalThis.StepperManager)!==null&&u!==void 0&&u.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:M,viewport:y,transform:N,background:X}=this.params;this.gfx=new _canvas.CanvasGraphics(M,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:W},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:N,viewport:y,transparency:r,background:X}),this.operatorListIdx=0,this.graphicsReady=!0,(o=this.graphicsReadyCallback)===null||o===void 0||o.call(this)}cancel(){var s;let u=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(u||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,u,o)=>{var r,W,M,y,N;Object.defineProperty(u,"__esModule",{value:!0}),u.PrintAnnotationStorage=u.AnnotationStorage=void 0;var X=o(1),z=o(140),Y=o(144);class S{constructor(){et(this,M),et(this,r,!1),et(this,W,new Map),this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(g,J){const U=T(this,W).get(g);return U===void 0?J:Object.assign(J,U)}getRawValue(g){return T(this,W).get(g)}remove(g){if(T(this,W).delete(g),T(this,W).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const J of T(this,W).values())if(J instanceof z.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(g,J){const U=T(this,W).get(g);let H=!1;if(U!==void 0)for(const[C,v]of Object.entries(J))U[C]!==v&&(H=!0,U[C]=v);else H=!0,T(this,W).set(g,J);H&&nt(this,M,y).call(this),J instanceof z.AnnotationEditor&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(J.constructor._type)}has(g){return T(this,W).has(g)}getAll(){return T(this,W).size>0?(0,X.objectFromMap)(T(this,W)):null}setAll(g){for(const[J,U]of Object.entries(g))this.setValue(J,U)}get size(){return T(this,W).size}resetModified(){T(this,r)&&(ut(this,r,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new D(this)}get serializable(){if(T(this,W).size===0)return null;const g=new Map;for(const[J,U]of T(this,W)){const H=U instanceof z.AnnotationEditor?U.serialize():U;H&&g.set(J,H)}return g}static getHash(g){if(!g)return"";const J=new Y.MurmurHash3_64;for(const[U,H]of g)J.update(`${U}:${JSON.stringify(H)}`);return J.hexdigest()}}r=new WeakMap,W=new WeakMap,M=new WeakSet,y=function(){T(this,r)||(ut(this,r,!0),typeof this.onSetModified=="function"&&this.onSetModified())},u.AnnotationStorage=S;class D extends S{constructor(g){super(),et(this,N,null),ut(this,N,structuredClone(g.serializable))}get print(){(0,X.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return T(this,N)}}N=new WeakMap,u.PrintAnnotationStorage=D},(s,u,o)=>{var r,W,M,y,N,X;Object.defineProperty(u,"__esModule",{value:!0}),u.AnnotationEditor=void 0;var z=o(141),Y=o(1);const S=class{constructor(R){et(this,r,this.focusin.bind(this)),et(this,W,this.focusout.bind(this)),et(this,M,!1),et(this,y,!1),et(this,N,!1),It(this,"_uiManager",null),et(this,X,S._zIndex++),this.constructor===S&&(0,Y.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:g,rawDims:{pageWidth:J,pageHeight:U,pageX:H,pageY:C}}=this.parent.viewport;this.rotation=g,this.pageRotation=(360+g-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[J,U],this.pageTranslation=[H,C];const[v,K]=this.parentDimensions;this.x=R.x/v,this.y=R.y/K,this.isAttachedToDOM=!1}static get _defaultLineColor(){return(0,Y.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,M)?ut(this,M,!1):this.parent.setSelected(this)}focusout(R){var g;if(!this.isAttachedToDOM)return;const J=R.relatedTarget;(J==null||!J.closest(`#${this.id}`))&&(R.preventDefault(),(g=this.parent)!==null&&g!==void 0&&g.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}dragstart(R){const g=this.parent.div.getBoundingClientRect();this.startX=R.clientX-g.x,this.startY=R.clientY-g.y,R.dataTransfer.setData("text/plain",this.id),R.dataTransfer.effectAllowed="move"}setAt(R,g,J,U){const[H,C]=this.parentDimensions;[J,U]=this.screenToPageTranslation(J,U),this.x=(R+J)/H,this.y=(g+U)/C,this.div.style.left=100*this.x+"%",this.div.style.top=100*this.y+"%"}translate(R,g){const[J,U]=this.parentDimensions;[R,g]=this.screenToPageTranslation(R,g),this.x+=R/J,this.y+=g/U,this.div.style.left=100*this.x+"%",this.div.style.top=100*this.y+"%"}screenToPageTranslation(R,g){switch(this.parentRotation){case 90:return[g,-R];case 180:return[-R,-g];case 270:return[-g,R];default:return[R,g]}}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,[g,J]=this.pageDimensions;return[g*R,J*R]}setDims(R,g){const[J,U]=this.parentDimensions;this.div.style.width=100*R/J+"%",this.div.style.height=100*g/U+"%"}fixDims(){const{style:R}=this.div,{height:g,width:J}=R,U=J.endsWith("%"),H=g.endsWith("%");if(U&&H)return;const[C,v]=this.parentDimensions;U||(R.width=100*parseFloat(J)/C+"%"),H||(R.height=100*parseFloat(g)/v+"%")}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,r)),this.div.addEventListener("focusout",T(this,W));const[R,g]=this.getInitialTranslation();return this.translate(R,g),(0,z.bindEvents)(this,this.div,["dragstart","pointerdown"]),this.div}pointerdown(R){const{isMac:g}=Y.FeatureTest.platform;R.button!==0||R.ctrlKey&&g?R.preventDefault():(R.ctrlKey&&!g||R.shiftKey||R.metaKey&&g?this.parent.toggleSelected(this):this.parent.setSelected(this),ut(this,M,!0))}getRect(R,g){const J=this.parentScale,[U,H]=this.pageDimensions,[C,v]=this.pageTranslation,K=R/J,j=g/J,O=this.x*U,_=this.y*H,cl=this.width*U,tl=this.height*H;switch(this.rotation){case 0:return[O+K+C,H-_-j-tl+v,O+K+cl+C,H-_-j+v];case 90:return[O+j+C,H-_+K+v,O+j+tl+C,H-_+K+cl+v];case 180:return[O-K-cl+C,H-_+j+v,O-K+C,H-_+j+tl+v];case 270:return[O-j-tl+C,H-_-K-cl+v,O-j+C,H-_-K+v];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(R,g){const[J,U,H,C]=R,v=H-J,K=C-U;switch(this.rotation){case 0:return[J,g-C,v,K];case 90:return[J,g-U,K,v];case 180:return[H,g-U,v,K];case 270:return[H,g-C,K,v];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,r))}serialize(){(0,Y.unreachable)("An editor must be serializable")}static deserialize(R,g,J){const U=new this.prototype.constructor({parent:g,id:g.getNextId(),uiManager:J});U.rotation=R.rotation;const[H,C]=U.pageDimensions,[v,K,j,O]=U.getRectInCurrentCoords(R.rect,C);return U.x=v/H,U.y=K/C,U.width=j/H,U.height=O/C,U}remove(){this.div.removeEventListener("focusin",T(this,r)),this.div.removeEventListener("focusout",T(this,W)),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,g){}disableEditing(){}enableEditing(){}get propertiesToUpdate(){return{}}get contentDiv(){return this.div}get isEditing(){return T(this,y)}set isEditing(R){ut(this,y,R),R?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null)}};let D=S;r=new WeakMap,W=new WeakMap,M=new WeakMap,y=new WeakMap,N=new WeakMap,X=new WeakMap,It(D,"_colorManager",new z.ColorManager),It(D,"_zIndex",1),u.AnnotationEditor=D},(s,u,o)=>{var r,W,M,y,N,X,z,Y,S,D,R,g,J,U,H,C,v,K,j,O,_,cl,tl,E,il,al,Nl,nl,Sl,P,Q,q,ll,B,F,el,dl,Zl,Wl,Gl,Il,xl,bl,Ol,_l,Jl,$,ol,hl,pl,zl,jl;Object.defineProperty(u,"__esModule",{value:!0}),u.KeyboardManager=u.CommandManager=u.ColorManager=u.AnnotationEditorUIManager=void 0,u.bindEvents=function(Dl,Al,We){for(const he of We)Al.addEventListener(he,Dl[he].bind(Dl))},u.opacityToHex=function(Dl){return Math.round(Math.min(255,Math.max(1,255*Dl))).toString(16).padStart(2,"0")};var Ul=o(1),Kl=o(142);class le{constructor(){et(this,r,0)}getId(){return`${Ul.AnnotationEditorPrefix}${ue(this,r)._++}`}}r=new WeakMap;class Pl{constructor(){et(this,W,[]),et(this,M,!1),et(this,y,void 0),et(this,N,-1);let Al=arguments.length>0&&arguments[0]!==void 0?arguments[0]:128;ut(this,y,Al)}add(Al){let{cmd:We,undo:he,mustExec:Ke,type:Le=NaN,overwriteIfSameType:fl=!1,keepUndo:Ye=!1}=Al;if(Ke&&We(),T(this,M))return;const ze={cmd:We,undo:he,type:Le};if(T(this,N)===-1){T(this,W).length>0&&(T(this,W).length=0),ut(this,N,0),T(this,W).push(ze);return}if(fl&&T(this,W)[T(this,N)].type===Le){Ye&&(ze.undo=T(this,W)[T(this,N)].undo),T(this,W)[T(this,N)]=ze;return}const Ie=T(this,N)+1;Ie===T(this,y)?T(this,W).splice(0,1):(ut(this,N,Ie),Ie<T(this,W).length&&T(this,W).splice(Ie)),T(this,W).push(ze)}undo(){T(this,N)!==-1&&(ut(this,M,!0),T(this,W)[T(this,N)].undo(),ut(this,M,!1),ut(this,N,T(this,N)-1))}redo(){T(this,N)<T(this,W).length-1&&(ut(this,N,T(this,N)+1),ut(this,M,!0),T(this,W)[T(this,N)].cmd(),ut(this,M,!1))}hasSomethingToUndo(){return T(this,N)!==-1}hasSomethingToRedo(){return T(this,N)<T(this,W).length-1}destroy(){ut(this,W,null)}}W=new WeakMap,M=new WeakMap,y=new WeakMap,N=new WeakMap,u.CommandManager=Pl;class ee{constructor(Al){et(this,X),this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:We}=Ul.FeatureTest.platform;for(const[he,Ke]of Al)for(const Le of he){const fl=Le.startsWith("mac+");We&&fl?(this.callbacks.set(Le.slice(4),Ke),this.allKeys.add(Le.split("+").at(-1))):!We&&!fl&&(this.callbacks.set(Le,Ke),this.allKeys.add(Le.split("+").at(-1)))}}exec(Al,We){if(!this.allKeys.has(We.key))return;const he=this.callbacks.get(nt(this,X,z).call(this,We));he&&(he.bind(Al)(),We.stopPropagation(),We.preventDefault())}}X=new WeakSet,z=function(Dl){Dl.altKey&&this.buffer.push("alt"),Dl.ctrlKey&&this.buffer.push("ctrl"),Dl.metaKey&&this.buffer.push("meta"),Dl.shiftKey&&this.buffer.push("shift"),this.buffer.push(Dl.key);const Al=this.buffer.join("+");return this.buffer.length=0,Al},u.KeyboardManager=ee;const ql=class{get _colors(){const Dl=new Map([["CanvasText",null],["Canvas",null]]);return(0,Kl.getColorValues)(Dl),(0,Ul.shadow)(this,"_colors",Dl)}convert(Dl){const Al=(0,Kl.getRGB)(Dl);if(!window.matchMedia("(forced-colors: active)").matches)return Al;for(const[We,he]of this._colors)if(he.every((Ke,Le)=>Ke===Al[Le]))return ql._colorsMapping.get(We);return Al}getHexCode(Dl){const Al=this._colors.get(Dl);return Al?Ul.Util.makeHexColor(...Al):Dl}};let ie=ql;It(ie,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]])),u.ColorManager=ie;const ce=class{constructor(Dl,Al,We){et(this,Q),et(this,ll),et(this,F),et(this,dl),et(this,Wl),et(this,Il),et(this,bl),et(this,_l),et(this,$),et(this,hl),et(this,zl),et(this,Y,null),et(this,S,new Map),et(this,D,new Map),et(this,R,null),et(this,g,new Pl),et(this,J,0),et(this,U,null),et(this,H,new Set),et(this,C,null),et(this,v,new le),et(this,K,!1),et(this,j,Ul.AnnotationEditorType.NONE),et(this,O,new Set),et(this,_,this.copy.bind(this)),et(this,cl,this.cut.bind(this)),et(this,tl,this.paste.bind(this)),et(this,E,this.keydown.bind(this)),et(this,il,this.onEditingAction.bind(this)),et(this,al,this.onPageChanging.bind(this)),et(this,Nl,this.onScaleChanging.bind(this)),et(this,nl,this.onRotationChanging.bind(this)),et(this,Sl,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1}),et(this,P,null),ut(this,P,Dl),ut(this,C,Al),T(this,C)._on("editingaction",T(this,il)),T(this,C)._on("pagechanging",T(this,al)),T(this,C)._on("scalechanging",T(this,Nl)),T(this,C)._on("rotationchanging",T(this,nl)),ut(this,R,We),this.viewParameters={realScale:Kl.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}destroy(){nt(this,ll,B).call(this),T(this,C)._off("editingaction",T(this,il)),T(this,C)._off("pagechanging",T(this,al)),T(this,C)._off("scalechanging",T(this,Nl)),T(this,C)._off("rotationchanging",T(this,nl));for(const Dl of T(this,D).values())Dl.destroy();T(this,D).clear(),T(this,S).clear(),T(this,H).clear(),ut(this,Y,null),T(this,O).clear(),T(this,g).destroy()}onPageChanging(Dl){let{pageNumber:Al}=Dl;ut(this,J,Al-1)}focusMainContainer(){T(this,P).focus()}addShouldRescale(Dl){T(this,H).add(Dl)}removeShouldRescale(Dl){T(this,H).delete(Dl)}onScaleChanging(Dl){let{scale:Al}=Dl;this.commitOrRemove(),this.viewParameters.realScale=Al*Kl.PixelsPerInch.PDF_TO_CSS_UNITS;for(const We of T(this,H))We.onScaleChanging()}onRotationChanging(Dl){let{pagesRotation:Al}=Dl;this.commitOrRemove(),this.viewParameters.rotation=Al}addToAnnotationStorage(Dl){Dl.isEmpty()||!T(this,R)||T(this,R).has(Dl.id)||T(this,R).setValue(Dl.id,Dl)}copy(Dl){if(Dl.preventDefault(),T(this,Y)&&T(this,Y).commitOrRemove(),!this.hasSelection)return;const Al=[];for(const We of T(this,O))We.isEmpty()||Al.push(We.serialize());Al.length!==0&&Dl.clipboardData.setData("application/pdfjs",JSON.stringify(Al))}cut(Dl){this.copy(Dl),this.delete()}paste(Dl){Dl.preventDefault();let Al=Dl.clipboardData.getData("application/pdfjs");if(!Al)return;try{Al=JSON.parse(Al)}catch(he){(0,Ul.warn)(`paste: "${he.message}".`);return}if(!Array.isArray(Al))return;this.unselectAll();const We=T(this,D).get(T(this,J));try{const he=[];for(const fl of Al){const Ye=We.deserialize(fl);if(!Ye)return;he.push(Ye)}const Ke=()=>{for(const fl of he)nt(this,$,ol).call(this,fl);nt(this,zl,jl).call(this,he)},Le=()=>{for(const fl of he)fl.remove()};this.addCommands({cmd:Ke,undo:Le,mustExec:!0})}catch(he){(0,Ul.warn)(`paste: "${he.message}".`)}}keydown(Dl){var Al;(Al=this.getActive())!==null&&Al!==void 0&&Al.shouldGetKeyboardEvents()||ce._keyboardManager.exec(this,Dl)}onEditingAction(Dl){["undo","redo","delete","selectAll"].includes(Dl.name)&&this[Dl.name]()}setEditingState(Dl){Dl?(nt(this,Q,q).call(this),nt(this,F,el).call(this),nt(this,Wl,Gl).call(this,{isEditing:T(this,j)!==Ul.AnnotationEditorType.NONE,isEmpty:nt(this,hl,pl).call(this),hasSomethingToUndo:T(this,g).hasSomethingToUndo(),hasSomethingToRedo:T(this,g).hasSomethingToRedo(),hasSelectedEditor:!1})):(nt(this,ll,B).call(this),nt(this,dl,Zl).call(this),nt(this,Wl,Gl).call(this,{isEditing:!1}))}registerEditorTypes(Dl){if(!T(this,U)){ut(this,U,Dl);for(const Al of T(this,U))nt(this,Il,xl).call(this,Al.defaultPropertiesToUpdate)}}getId(){return T(this,v).getId()}get currentLayer(){return T(this,D).get(T(this,J))}get currentPageIndex(){return T(this,J)}addLayer(Dl){T(this,D).set(Dl.pageIndex,Dl),T(this,K)?Dl.enable():Dl.disable()}removeLayer(Dl){T(this,D).delete(Dl.pageIndex)}updateMode(Dl){if(ut(this,j,Dl),Dl===Ul.AnnotationEditorType.NONE)this.setEditingState(!1),nt(this,_l,Jl).call(this);else{this.setEditingState(!0),nt(this,bl,Ol).call(this);for(const Al of T(this,D).values())Al.updateMode(Dl)}}updateToolbar(Dl){Dl!==T(this,j)&&T(this,C).dispatch("switchannotationeditormode",{source:this,mode:Dl})}updateParams(Dl,Al){if(T(this,U)){for(const We of T(this,O))We.updateParams(Dl,Al);for(const We of T(this,U))We.updateDefaultParams(Dl,Al)}}getEditors(Dl){const Al=[];for(const We of T(this,S).values())We.pageIndex===Dl&&Al.push(We);return Al}getEditor(Dl){return T(this,S).get(Dl)}addEditor(Dl){T(this,S).set(Dl.id,Dl)}removeEditor(Dl){var Al;T(this,S).delete(Dl.id),this.unselect(Dl),(Al=T(this,R))===null||Al===void 0||Al.remove(Dl.id)}setActiveEditor(Dl){T(this,Y)!==Dl&&(ut(this,Y,Dl),Dl&&nt(this,Il,xl).call(this,Dl.propertiesToUpdate))}toggleSelected(Dl){T(this,O).has(Dl)?(T(this,O).delete(Dl),Dl.unselect(),nt(this,Wl,Gl).call(this,{hasSelectedEditor:this.hasSelection})):(T(this,O).add(Dl),Dl.select(),nt(this,Il,xl).call(this,Dl.propertiesToUpdate),nt(this,Wl,Gl).call(this,{hasSelectedEditor:!0}))}setSelected(Dl){for(const Al of T(this,O))Al!==Dl&&Al.unselect();T(this,O).clear(),T(this,O).add(Dl),Dl.select(),nt(this,Il,xl).call(this,Dl.propertiesToUpdate),nt(this,Wl,Gl).call(this,{hasSelectedEditor:!0})}isSelected(Dl){return T(this,O).has(Dl)}unselect(Dl){Dl.unselect(),T(this,O).delete(Dl),nt(this,Wl,Gl).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return T(this,O).size!==0}undo(){T(this,g).undo(),nt(this,Wl,Gl).call(this,{hasSomethingToUndo:T(this,g).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:nt(this,hl,pl).call(this)})}redo(){T(this,g).redo(),nt(this,Wl,Gl).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:T(this,g).hasSomethingToRedo(),isEmpty:nt(this,hl,pl).call(this)})}addCommands(Dl){T(this,g).add(Dl),nt(this,Wl,Gl).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:nt(this,hl,pl).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const Dl=[...T(this,O)];this.addCommands({cmd:()=>{for(const Al of Dl)Al.remove()},undo:()=>{for(const Al of Dl)nt(this,$,ol).call(this,Al)},mustExec:!0})}commitOrRemove(){var Dl;(Dl=T(this,Y))===null||Dl===void 0||Dl.commitOrRemove()}selectAll(){for(const Dl of T(this,O))Dl.commit();nt(this,zl,jl).call(this,T(this,S).values())}unselectAll(){if(T(this,Y))T(this,Y).commitOrRemove();else if(T(this,O).size!==0){for(const Dl of T(this,O))Dl.unselect();T(this,O).clear(),nt(this,Wl,Gl).call(this,{hasSelectedEditor:!1})}}isActive(Dl){return T(this,Y)===Dl}getActive(){return T(this,Y)}getMode(){return T(this,j)}};let Ge=ce;Y=new WeakMap,S=new WeakMap,D=new WeakMap,R=new WeakMap,g=new WeakMap,J=new WeakMap,U=new WeakMap,H=new WeakMap,C=new WeakMap,v=new WeakMap,K=new WeakMap,j=new WeakMap,O=new WeakMap,_=new WeakMap,cl=new WeakMap,tl=new WeakMap,E=new WeakMap,il=new WeakMap,al=new WeakMap,Nl=new WeakMap,nl=new WeakMap,Sl=new WeakMap,P=new WeakMap,Q=new WeakSet,q=function(){T(this,P).addEventListener("keydown",T(this,E))},ll=new WeakSet,B=function(){T(this,P).removeEventListener("keydown",T(this,E))},F=new WeakSet,el=function(){document.addEventListener("copy",T(this,_)),document.addEventListener("cut",T(this,cl)),document.addEventListener("paste",T(this,tl))},dl=new WeakSet,Zl=function(){document.removeEventListener("copy",T(this,_)),document.removeEventListener("cut",T(this,cl)),document.removeEventListener("paste",T(this,tl))},Wl=new WeakSet,Gl=function(Dl){Object.entries(Dl).some(Al=>{let[We,he]=Al;return T(this,Sl)[We]!==he})&&T(this,C).dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(T(this,Sl),Dl)})},Il=new WeakSet,xl=function(Dl){T(this,C).dispatch("annotationeditorparamschanged",{source:this,details:Dl})},bl=new WeakSet,Ol=function(){if(!T(this,K)){ut(this,K,!0);for(const Dl of T(this,D).values())Dl.enable()}},_l=new WeakSet,Jl=function(){if(this.unselectAll(),T(this,K)){ut(this,K,!1);for(const Dl of T(this,D).values())Dl.disable()}},$=new WeakSet,ol=function(Dl){const Al=T(this,D).get(Dl.pageIndex);Al?Al.addOrRebuild(Dl):this.addEditor(Dl)},hl=new WeakSet,pl=function(){if(T(this,S).size===0)return!0;if(T(this,S).size===1)for(const Dl of T(this,S).values())return Dl.isEmpty();return!1},zl=new WeakSet,jl=function(Dl){T(this,O).clear();for(const Al of Dl)Al.isEmpty()||(T(this,O).add(Al),Al.select());nt(this,Wl,Gl).call(this,{hasSelectedEditor:!0})},It(Ge,"_keyboardManager",new ee([[["ctrl+a","mac+meta+a"],ce.prototype.selectAll],[["ctrl+z","mac+meta+z"],ce.prototype.undo],[["ctrl+y","ctrl+shift+Z","mac+meta+shift+Z"],ce.prototype.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete"],ce.prototype.delete],[["Escape","mac+Escape"],ce.prototype.unselectAll]])),u.AnnotationEditorUIManager=Ge},(s,u,o)=>{var r,W,M,y,N,X,z,Y,S,D,R,g,J,U;Object.defineProperty(u,"__esModule",{value:!0}),u.StatTimer=u.RenderingCancelledException=u.PixelsPerInch=u.PageViewport=u.PDFDateString=u.DOMStandardFontDataFactory=u.DOMSVGFactory=u.DOMFilterFactory=u.DOMCanvasFactory=u.DOMCMapReaderFactory=u.AnnotationPrefix=void 0,u.deprecated=function(q){console.log("Deprecated API usage: "+q)},u.getColorValues=function(q){const ll=document.createElement("span");ll.style.visibility="hidden",document.body.append(ll);for(const B of q.keys()){ll.style.color=B;const F=window.getComputedStyle(ll).color;q.set(B,Q(F))}ll.remove()},u.getCurrentTransform=function(q){const{a:ll,b:B,c:F,d:el,e:dl,f:Zl}=q.getTransform();return[ll,B,F,el,dl,Zl]},u.getCurrentTransformInverse=function(q){const{a:ll,b:B,c:F,d:el,e:dl,f:Zl}=q.getTransform().invertSelf();return[ll,B,F,el,dl,Zl]},u.getFilenameFromUrl=function(q){return arguments.length>1&&arguments[1]!==void 0&&arguments[1]||([q]=q.split(/[#?]/,1)),q.substring(q.lastIndexOf("/")+1)},u.getPdfFilenameFromUrl=function(q){let ll=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"document.pdf";if(typeof q!="string")return ll;if(nl(q))return(0,C.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),ll;const B=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,F=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(q);let el=B.exec(F[1])||B.exec(F[2])||B.exec(F[3]);if(el&&(el=el[0],el.includes("%")))try{el=B.exec(decodeURIComponent(el))[0]}catch{}return el||ll},u.getRGB=Q,u.getXfaPageViewport=function(q,ll){let{scale:B=1,rotation:F=0}=ll;const{width:el,height:dl}=q.attributes.style,Zl=[0,0,parseInt(el),parseInt(dl)];return new al({viewBox:Zl,scale:B,rotation:F})},u.isDataScheme=nl,u.isPdfFile=function(q){return typeof q=="string"&&/\.pdf$/i.test(q)},u.isValidFetchUrl=Sl,u.loadScript=function(q){let ll=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return new Promise((B,F)=>{const el=document.createElement("script");el.src=q,el.onload=function(dl){ll&&el.remove(),B(dl)},el.onerror=function(){F(new Error(`Cannot load script at: ${el.src}`))},(document.head||document.documentElement).append(el)})},u.setLayerDimensions=function(q,ll){let B=arguments.length>2&&arguments[2]!==void 0&&arguments[2],F=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];if(ll instanceof al){const{pageWidth:el,pageHeight:dl}=ll.rawDims,{style:Zl}=q,Wl=`calc(var(--scale-factor) * ${el}px)`,Gl=`calc(var(--scale-factor) * ${dl}px)`;B&&ll.rotation%180!=0?(Zl.width=Gl,Zl.height=Wl):(Zl.width=Wl,Zl.height=Gl)}F&&q.setAttribute("data-main-rotation",ll.rotation)};var H=o(143),C=o(1);const v="http://www.w3.org/2000/svg";u.AnnotationPrefix="pdfjs_internal_id_";const K=class{};let j=K;It(j,"CSS",96),It(j,"PDF",72),It(j,"PDF_TO_CSS_UNITS",K.CSS/K.PDF),u.PixelsPerInch=j;class O extends H.BaseFilterFactory{constructor(){let{docId:ll,ownerDocument:B=globalThis.document}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),et(this,S),et(this,R),et(this,J),et(this,r,void 0),et(this,W,void 0),et(this,M,void 0),et(this,y,void 0),et(this,N,void 0),et(this,X,void 0),et(this,z,void 0),et(this,Y,0),ut(this,M,ll),ut(this,y,B)}addFilter(ll){if(!ll)return"none";let B,F,el,dl,Zl=T(this,S,D).get(ll);if(Zl)return Zl;if(ll.length===1){const bl=ll[0],Ol=new Array(256);for(let _l=0;_l<256;_l++)Ol[_l]=bl[_l]/255;dl=B=F=el=Ol.join(",")}else{const[bl,Ol,_l]=ll,Jl=new Array(256),$=new Array(256),ol=new Array(256);for(let hl=0;hl<256;hl++)Jl[hl]=bl[hl]/255,$[hl]=Ol[hl]/255,ol[hl]=_l[hl]/255;B=Jl.join(","),F=$.join(","),el=ol.join(","),dl=`${B}${F}${el}`}if(Zl=T(this,S,D).get(dl),Zl)return T(this,S,D).set(ll,Zl),Zl;const Wl=`g_${T(this,M)}_transfer_map_${ue(this,Y)._++}`,Gl=`url(#${Wl})`;T(this,S,D).set(ll,Gl),T(this,S,D).set(dl,Gl);const Il=T(this,y).createElementNS(v,"filter",v);Il.setAttribute("id",Wl),Il.setAttribute("color-interpolation-filters","sRGB");const xl=T(this,y).createElementNS(v,"feComponentTransfer");return Il.append(xl),nt(this,J,U).call(this,xl,"feFuncR",B),nt(this,J,U).call(this,xl,"feFuncG",F),nt(this,J,U).call(this,xl,"feFuncB",el),T(this,R,g).append(Il),Gl}addHCMFilter(ll,B){var F;const el=`${ll}-${B}`;if(T(this,X)===el)return T(this,z);if(ut(this,X,el),ut(this,z,"none"),(F=T(this,N))===null||F===void 0||F.remove(),!ll||!B)return T(this,z);T(this,R,g).style.color=ll;const dl=Q(ll=getComputedStyle(T(this,R,g)).getPropertyValue("color"));ll=C.Util.makeHexColor(...dl),T(this,R,g).style.color=B;const Zl=Q(B=getComputedStyle(T(this,R,g)).getPropertyValue("color"));if(B=C.Util.makeHexColor(...Zl),T(this,R,g).style.color="",ll==="#000000"&&B==="#ffffff"||ll===B)return T(this,z);const Wl=new Array(256);for(let Jl=0;Jl<=255;Jl++){const $=Jl/255;Wl[Jl]=$<=.03928?$/12.92:(($+.055)/1.055)**2.4}const Gl=Wl.join(","),Il=`g_${T(this,M)}_hcm_filter`,xl=ut(this,N,T(this,y).createElementNS(v,"filter",v));xl.setAttribute("id",Il),xl.setAttribute("color-interpolation-filters","sRGB");let bl=T(this,y).createElementNS(v,"feComponentTransfer");xl.append(bl),nt(this,J,U).call(this,bl,"feFuncR",Gl),nt(this,J,U).call(this,bl,"feFuncG",Gl),nt(this,J,U).call(this,bl,"feFuncB",Gl);const Ol=T(this,y).createElementNS(v,"feColorMatrix");Ol.setAttribute("type","matrix"),Ol.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"),xl.append(Ol),bl=T(this,y).createElementNS(v,"feComponentTransfer"),xl.append(bl);const _l=(Jl,$)=>{const ol=dl[Jl]/255,hl=Zl[Jl]/255,pl=new Array($+1);for(let zl=0;zl<=$;zl++)pl[zl]=ol+zl/$*(hl-ol);return pl.join(",")};return nt(this,J,U).call(this,bl,"feFuncR",_l(0,5)),nt(this,J,U).call(this,bl,"feFuncG",_l(1,5)),nt(this,J,U).call(this,bl,"feFuncB",_l(2,5)),T(this,R,g).append(xl),ut(this,z,`url(#${Il})`),T(this,z)}destroy(){(!(arguments.length>0&&arguments[0]!==void 0&&arguments[0])||!T(this,z))&&(T(this,W)&&(T(this,W).parentNode.parentNode.remove(),ut(this,W,null)),T(this,r)&&(T(this,r).clear(),ut(this,r,null)),ut(this,Y,0))}}r=new WeakMap,W=new WeakMap,M=new WeakMap,y=new WeakMap,N=new WeakMap,X=new WeakMap,z=new WeakMap,Y=new WeakMap,S=new WeakSet,D=function(){return T(this,r)||ut(this,r,new Map)},R=new WeakSet,g=function(){if(!T(this,W)){const q=T(this,y).createElement("div"),{style:ll}=q;ll.visibility="hidden",ll.contain="strict",ll.width=ll.height=0,ll.position="absolute",ll.top=ll.left=0,ll.zIndex=-1;const B=T(this,y).createElementNS(v,"svg");B.setAttribute("width",0),B.setAttribute("height",0),ut(this,W,T(this,y).createElementNS(v,"defs")),q.append(B),B.append(T(this,W)),T(this,y).body.append(q)}return T(this,W)},J=new WeakSet,U=function(q,ll,B){const F=T(this,y).createElementNS(v,ll);F.setAttribute("type","discrete"),F.setAttribute("tableValues",B),q.append(F)},u.DOMFilterFactory=O;class _ extends H.BaseCanvasFactory{constructor(){let{ownerDocument:ll=globalThis.document}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),this._document=ll}_createCanvas(ll,B){const F=this._document.createElement("canvas");return F.width=ll,F.height=B,F}}u.DOMCanvasFactory=_;async function cl(q){let ll=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(Sl(q,document.baseURI)){const B=await fetch(q);if(!B.ok)throw new Error(B.statusText);return ll?new Uint8Array(await B.arrayBuffer()):(0,C.stringToBytes)(await B.text())}return new Promise((B,F)=>{const el=new XMLHttpRequest;el.open("GET",q,!0),ll&&(el.responseType="arraybuffer"),el.onreadystatechange=()=>{if(el.readyState===XMLHttpRequest.DONE){if(el.status===200||el.status===0){let dl;if(ll&&el.response?dl=new Uint8Array(el.response):!ll&&el.responseText&&(dl=(0,C.stringToBytes)(el.responseText)),dl){B(dl);return}}F(new Error(el.statusText))}},el.send(null)})}class tl extends H.BaseCMapReaderFactory{_fetchData(ll,B){return cl(ll,this.isCompressed).then(F=>({cMapData:F,compressionType:B}))}}u.DOMCMapReaderFactory=tl;class E extends H.BaseStandardFontDataFactory{_fetchData(ll){return cl(ll,!0)}}u.DOMStandardFontDataFactory=E;class il extends H.BaseSVGFactory{_createSVG(ll){return document.createElementNS(v,ll)}}u.DOMSVGFactory=il;class al{constructor(ll){let{viewBox:B,scale:F,rotation:el,offsetX:dl=0,offsetY:Zl=0,dontFlip:Wl=!1}=ll;this.viewBox=B,this.scale=F,this.rotation=el,this.offsetX=dl,this.offsetY=Zl;const Gl=(B[2]+B[0])/2,Il=(B[3]+B[1])/2;let xl,bl,Ol,_l,Jl,$,ol,hl;switch(el%=360,el<0&&(el+=360),el){case 180:xl=-1,bl=0,Ol=0,_l=1;break;case 90:xl=0,bl=1,Ol=1,_l=0;break;case 270:xl=0,bl=-1,Ol=-1,_l=0;break;case 0:xl=1,bl=0,Ol=0,_l=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}Wl&&(Ol=-Ol,_l=-_l),xl===0?(Jl=Math.abs(Il-B[1])*F+dl,$=Math.abs(Gl-B[0])*F+Zl,ol=(B[3]-B[1])*F,hl=(B[2]-B[0])*F):(Jl=Math.abs(Gl-B[0])*F+dl,$=Math.abs(Il-B[1])*F+Zl,ol=(B[2]-B[0])*F,hl=(B[3]-B[1])*F),this.transform=[xl*F,bl*F,Ol*F,_l*F,Jl-xl*F*Gl-Ol*F*Il,$-bl*F*Gl-_l*F*Il],this.width=ol,this.height=hl}get rawDims(){const{viewBox:ll}=this;return(0,C.shadow)(this,"rawDims",{pageWidth:ll[2]-ll[0],pageHeight:ll[3]-ll[1],pageX:ll[0],pageY:ll[1]})}clone(){let{scale:ll=this.scale,rotation:B=this.rotation,offsetX:F=this.offsetX,offsetY:el=this.offsetY,dontFlip:dl=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new al({viewBox:this.viewBox.slice(),scale:ll,rotation:B,offsetX:F,offsetY:el,dontFlip:dl})}convertToViewportPoint(ll,B){return C.Util.applyTransform([ll,B],this.transform)}convertToViewportRectangle(ll){const B=C.Util.applyTransform([ll[0],ll[1]],this.transform),F=C.Util.applyTransform([ll[2],ll[3]],this.transform);return[B[0],B[1],F[0],F[1]]}convertToPdfPoint(ll,B){return C.Util.applyInverseTransform([ll,B],this.transform)}}u.PageViewport=al;class Nl extends C.BaseException{constructor(ll,B){let F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;super(ll,"RenderingCancelledException"),this.type=B,this.extraDelay=F}}u.RenderingCancelledException=Nl;function nl(q){const ll=q.length;let B=0;for(;B<ll&&q[B].trim()==="";)B++;return q.substring(B,B+5).toLowerCase()==="data:"}u.StatTimer=class{constructor(){It(this,"started",Object.create(null)),It(this,"times",[])}time(q){q in this.started&&(0,C.warn)(`Timer is already running for ${q}`),this.started[q]=Date.now()}timeEnd(q){q in this.started||(0,C.warn)(`Timer has not been started for ${q}`),this.times.push({name:q,start:this.started[q],end:Date.now()}),delete this.started[q]}toString(){const q=[];let ll=0;for(const{name:B}of this.times)ll=Math.max(B.length,ll);for(const{name:B,start:F,end:el}of this.times)q.push(`${B.padEnd(ll)} ${el-F}ms
79
+ }`},controlType:"select"},{id:"6e8b965c-d68a-4dd5-ad28-64d4aa400eb2",code:"compatible_videowall",image:null,label:"Compatible videowall",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(values.gama === 'pantallas_led_modulares') return true; return false }"},controlType:"checkbox"},{id:"e6ebbb08-0245-4698-91e4-0ba0c0a50368",code:"tipo_montaje",image:null,label:"Tipo de montaje",prefix:"",suffix:"",options:[{image:null,label:"Matriz",value:"matriz",condition:"",exclusive:!1},{image:null,label:"Standalone",value:"standalone",condition:"",exclusive:!1},{image:null,label:"Mural",value:"mural",condition:"",exclusive:!1}],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['pantallas_led_modulares','totems','pantallas_lcd','banderola'].includes(values.gama)) return true; return false }"},controlType:"select"},{id:"81156583-de0a-4467-bd02-f1da769708db",code:"tasa_refresco",image:null,label:"Tasa de refresco (Hz)",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['pantallas_led_modulares','totems','pantallas_lcd','banderola'].includes(values.gama)) return true; return false }"},controlType:"input_number"},{id:"c1dff0d1-d622-4878-8ee4-516c55958714",code:"modelo",image:null,label:"Modelo",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['pantallas_led_modulares','totems','pantallas_lcd','banderola'].includes(values.gama)) return true; return false }"},controlType:"input_text"},{id:"9004ddcc-6a42-49ef-8a29-2b302e7b0f6e",code:"usos_habituales",image:null,label:"Usos habituales",prefix:"",suffix:"",options:[{image:null,label:"Tiendas, Recepciones, Hall, Salas de espera, Showrooms, Galerías",value:"tiendas_recepciones_hall_salas_de_espera_showrooms_galerias",condition:"",exclusive:!1},{image:null,label:"Escaparates o vitrinas expuestas al sol",value:"escaparates_o_vitrinas_expuestas_al_sol",condition:"",exclusive:!1},{image:null,label:"Eventos, Estadios, Mobiliario Urbano",value:"eventos_estadios_mobiliario_urbano",condition:"",exclusive:!1},{image:null,label:"Salas de Control, Estudios de TV, Salas de Videoconferencia, Auditorios",value:"salas_de_control_estudios_de_tv_salas_de_videoconferencia_auditorios",condition:"",exclusive:!1},{image:null,label:"Entornos con mucho tránsito como centros comerciales, aeropuertos o vestíbulos",value:"entornos_con_mucho_transito_como_centros_comerciales_aeropuertos_o_vestibulos",condition:"",exclusive:!1}],multiple:!0,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['pantallas_led_modulares','totems','pantallas_lcd','banderola'].includes(values.gama)) return true; return false }"},controlType:"select"},{id:"9a2e6614-a2d3-47ca-9559-0e86b9794f17",code:"proteccion_ip",image:null,label:"Protección IP",prefix:"",suffix:"",options:[{image:null,label:"IP20: Productos de interior",value:"ip_20_productos_de_interior",condition:"",exclusive:!1},{image:null,label:"IP56: Protegido contra polvo y chorros potentes de agua",value:"ip_56_protegido_contra_polvo_y_chorros_potentes_de_agua",condition:"",exclusive:!1},{image:null,label:" IP43: Protegido contra objetos de más de 1mm y agua pulverizada.",value:"ip_43_protegido_contra_objetos_de_mas_de_1_mm_y_agua_pulverizada",condition:"",exclusive:!1},{image:null,label:"IP65: Totalmente protegido contra polvo y chorros de agua (parte frontal)",value:"ip_65_totalmente_protegido_contra_polvo_y_chorros_de_agua_parte_frontal",condition:"",exclusive:!1},{image:null,label:"IP54: Alta resistencia a polvo y salpicaduras",value:"ip_54_alta_resistencia_a_polvo_y_salpicaduras",condition:"",exclusive:!1},{image:null,label:"IP65/IP43",value:"ip_65_ip_43",condition:"",exclusive:!1}],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['pantallas_led_modulares','totems','pantallas_lcd','banderola','controladoras'].includes(values.gama)) return true; return false }"},controlType:"select"},{id:"2ba06c97-3132-440c-9a3e-7b87cf49ef26",code:"gran_formato_independiente",image:null,label:"Gran formato independiente",prefix:"",suffix:"",options:[{image:null,label:"Si",value:"si",condition:"",exclusive:!1}],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['lcd'].includes(values.subgama)) return true; return false; }"},controlType:"select"},{id:"82e115bd-0c05-4d3f-b92f-28ef2f5a4367",code:"peso_kg",image:null,label:"Peso (kg)",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['pantallas_led_modulares','totems','pantallas_lcd','banderola'].includes(values.gama)) return true; return false }"},controlType:"input_text"},{id:"6f6b3dda-aeed-4458-9242-95b55b316675",code:"consumo_medio_w",image:null,label:"Consumo medio (W)",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['pantallas_led_modulares','totems','pantallas_lcd','banderola'].includes(values.gama)) return true; return false }"},controlType:"input_text"},{id:"2eb6ef27-3574-47e4-b519-2cd6c1f55824",code:"consumo_maximo_w",image:null,label:"Consumo Máximo (W)",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['pantallas_led_modulares','totems','pantallas_lcd','banderola'].includes(values.gama)) return true; return false }"},controlType:"input_text"},{id:"82b23d3e-8d67-455c-882c-a643f5ef3c8b",code:"material",image:null,label:"Material",prefix:"",suffix:"",options:[{image:null,label:"Aluminio Fundido",value:"aluminio_fundido",condition:"",exclusive:!1},{image:null,label:"Aluminio",value:"aluminio",condition:"",exclusive:!1},{image:null,label:"Acero/Aluminio (para la carcasa exterior).",value:"acero_aluminio_para_la_carcasa_exterior",condition:"",exclusive:!1},{image:null,label:"Estructura de Aluminio (Ligero, Robusto, Resistente a la Corrosión)",value:"estructura_de_aluminio_ligero_robusto_resistente_a_la_corrosion",condition:"",exclusive:!1},{image:null,label:"Material robusto y duradero",value:"material_robusto_y_duradero",condition:"",exclusive:!1}],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['pantallas_led_modulares','totems','pantallas_lcd','banderola'].includes(values.gama)) return true; return false }"},controlType:"select"},{id:"903a14ee-2735-4961-8f47-2c25611f039d",code:"tamano",image:null,label:"Tamaño",prefix:"",suffix:"",options:[{image:null,label:'43"',value:"43",condition:"",exclusive:!1},{image:null,label:'49"',value:"49",condition:"",exclusive:!1},{image:null,label:'55"',value:"55",condition:"",exclusive:!1},{image:null,label:'65"',value:"65",condition:"",exclusive:!1},{image:null,label:'75"',value:"75",condition:"",exclusive:!1}],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['lcd','qled'].includes(values.subgama)) return true; return false; }"},controlType:"select"},{id:"df3e8ee5-4656-4234-8d2c-7d4bcc434dc0",code:"unidad_de_medida",image:null,label:"Unidad de Medida",prefix:"",suffix:"",options:[{image:null,label:"mm",value:"mm",condition:"",exclusive:!1},{image:null,label:"cm",value:"cm",condition:"",exclusive:!1},{image:null,label:"m",value:"m",condition:"",exclusive:!1}],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['led'].includes(values.subgama)) return true; return false; }"},controlType:"select"},{id:"c79337f4-4a46-469e-abea-e6bd7ff9e422",code:"ancho",image:null,label:"Ancho",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['led'].includes(values.subgama)) return true; return false; }"},controlType:"input_text"},{id:"8ac0bc48-9b88-4689-a876-3c369262ed47",code:"alto",image:null,label:"Alto",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['led'].includes(values.subgama)) return true; return false; }"},controlType:"input_text"},{id:"dface708-9c21-44af-a434-b3a93d7eb1ce",code:"profundidad",image:null,label:"Profundidad",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['led'].includes(values.subgama)) return true; return false; }"},controlType:"input_text"},{id:"26f0bfec-1dcd-43ff-b5f1-8b4a162ba7c1",code:"a_medida",image:null,label:"A medida",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['pantallas_led_modulares','totems','pantallas_lcd','banderola'].includes(values.gama)) return true; return false }"},controlType:"checkbox"},{id:"e4cb73c3-67ab-4f63-94da-0db922dc5990",code:"codigo_ean",image:null,label:"Código EAN",prefix:"",suffix:"",options:[],multiple:!1,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0},controlType:"input_text"},{id:"9e86e10f-cbef-439f-8bcc-3938b5dd493e",code:"compatibilidad_de_senal",image:null,label:"Compatibilidad de señal",prefix:"",suffix:"",options:[{image:null,label:"DVI",value:"dvi",condition:"",exclusive:!1},{image:null,label:"SDI (3G-SDI)",value:"sdi_3_g_sdi",condition:"",exclusive:!1},{image:null,label:"VGA",value:"vga",condition:"",exclusive:!1},{image:null,label:"CVBS",value:"cvbs",condition:"",exclusive:!1},{image:null,label:"USB",value:"usb",condition:"",exclusive:!1},{image:null,label:"Red (LAN / Wi-Fi / 4G)",value:"red_lan_wi_fi_4_g",condition:"",exclusive:!1},{image:null,label:"HDMI",value:"hdmi",condition:"",exclusive:!1},{image:null,label:"HDMI 1.4",value:"hdmi_1_4",condition:"",exclusive:!1},{image:null,label:"DisplayPort",value:"displayport",condition:"",exclusive:!1},{image:null,label:"DisplayPort 1.0",value:"displayport_1_0",condition:"",exclusive:!1},{image:null,label:"DisplayPort 1.1",value:"displayport_1_1",condition:"",exclusive:!1},{image:null,label:"DisplayPort 1.2",value:"displayport_1_2",condition:"",exclusive:!1},{image:null,label:"DisplayPort 1.3",value:"displayport_1_3",condition:"",exclusive:!1},{image:null,label:"DisplayPort 1.4",value:"displayport_1_4",condition:"",exclusive:!1},{image:null,label:"DisplayPort 2.0",value:"displayport_2_0",condition:"",exclusive:!1},{image:null,label:"DisplayPort 2.4",value:"displayport_2_4",condition:"",exclusive:!1}],multiple:!0,structure:[],validators:[],visibility:{form:!0,roles:[],detail:!0,public:!1,summary:!0,condition:"(values) => { if(['controladoras'].includes(values.gama)) return true; return false }"},controlType:"select"}]},LINVERMEDIA_PRODUCT_DETAIL_MOCK_PROPS={isPublic:!0,data:null,fetching:!1,scale:1,gama},LinvermediaProductDetailPropsSchema=WidgetPropsSchema.extend({view:enumType(["detail","summary"]).optional(),title:stringType().optional(),gama:objectType({PROPS: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"}}},WidgetsIndex=lodashExports.mapValues(LocalWidgetsIndex,s=>lodashExports.omit(s,"mock")),W2WSharedUi={install(s,u){if(u!=null&&u.pinia)s.use(u.pinia);else throw new Error("No se ha encontrado una instancia de pinia");s.component("DynamicForm",_sfc_main$o),s.component("SectionsContainer",SectionsContainer),s.component("Card",Card$1),s.component("DynamicCarousel",_sfc_main$I),s.component("IndicatorColor",IndicatorColor$1),s.component("SectionSpinner",SectionSpinner),s.component("StateIndicator",StateIndicator),s.component("WinIconButton",WinIconButton),s.component("ProductPrice",ProductPrice),s.component("ProductProps",_sfc_main$b),s.component("ProductTag",ProductTag),Object.entries(WidgetsIndex).forEach(([o,r])=>{s.component(o,r.component)})}};var vr=Object.defineProperty,br=(s,u,o)=>u in s?vr(s,u,{enumerable:!0,configurable:!0,writable:!0,value:o}):s[u]=o,It=(s,u,o)=>(br(s,typeof u!="symbol"?u+"":u,o),o),ye=(s,u,o)=>{if(!u.has(s))throw TypeError("Cannot "+o)},T=(s,u,o)=>(ye(s,u,"read from private field"),o?o.call(s):u.get(s)),et=(s,u,o)=>{if(u.has(s))throw TypeError("Cannot add the same private member more than once");u instanceof WeakSet?u.add(s):u.set(s,o)},ut=(s,u,o,r)=>(ye(s,u,"write to private field"),u.set(s,o),o),ue=(s,u,o,r)=>({set _(W){ut(s,u,W)},get _(){return T(s,u,r)}}),nt=(s,u,o)=>(ye(s,u,"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 u=s.default;if(typeof u=="function"){var o=function r(){if(this instanceof r){var W=[null];W.push.apply(W,arguments);var M=Function.bind.apply(u,W);return new M}return u.apply(this,arguments)};o.prototype=u.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var W=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(o,r,W.get?W:{enumerable:!0,get:function(){return s[r]}})}),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(Y,S,D){for(var R,g=0,J=S.length;g<J;g++)!R&&g in S||(R||(R=Array.prototype.slice.call(S,0,g)),R[g]=S[g]);return Y.concat(R||Array.prototype.slice.call(S))}var u={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},o=/([astvzqmhlc])([^astvzqmhlc]*)/gi,r=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function W(Y){var S=[],D=String(Y).trim();return D[0]!=="M"&&D[0]!=="m"||D.replace(o,function(R,g,J){var U=function(v){var K=v.match(r);return K?K.map(Number):[]}(J),H=g.toLowerCase(),C=g;if(H==="m"&&U.length>2&&(S.push(s([C],U.splice(0,2))),H="l",C=C==="m"?"l":"L"),U.length<u[H])return"";for(S.push(s([C],U.splice(0,u[H])));U.length>=u[H]&&U.length&&u[H];)S.push(s([C],U.splice(0,u[H])));return""}),S}function M(Y,S){var D=Y.x*Math.cos(S)-Y.y*Math.sin(S),R=Y.y*Math.cos(S)+Y.x*Math.sin(S);Y.x=D,Y.y=R}function y(Y,S){Y.x*=S,Y.y*=S}var N=function(){function Y(S){var D;this.commands=[],S&&S instanceof Y?(D=this.commands).push.apply(D,S.commands):S&&(this.commands=W(S))}return Y.prototype.addPath=function(S){var D;S&&S instanceof Y&&(D=this.commands).push.apply(D,S.commands)},Y.prototype.moveTo=function(S,D){this.commands.push(["M",S,D])},Y.prototype.lineTo=function(S,D){this.commands.push(["L",S,D])},Y.prototype.arc=function(S,D,R,g,J,U){this.commands.push(["AC",S,D,R,g,J,!!U])},Y.prototype.arcTo=function(S,D,R,g,J){this.commands.push(["AT",S,D,R,g,J])},Y.prototype.ellipse=function(S,D,R,g,J,U,H,C){this.commands.push(["E",S,D,R,g,J,U,H,!!C])},Y.prototype.closePath=function(){this.commands.push(["Z"])},Y.prototype.bezierCurveTo=function(S,D,R,g,J,U){this.commands.push(["C",S,D,R,g,J,U])},Y.prototype.quadraticCurveTo=function(S,D,R,g){this.commands.push(["Q",S,D,R,g])},Y.prototype.rect=function(S,D,R,g){this.commands.push(["R",S,D,R,g])},Y.prototype.roundRect=function(S,D,R,g,J){J===void 0?this.commands.push(["RR",S,D,R,g,0]):this.commands.push(["RR",S,D,R,g,J])},Y}();function X(Y,S){var D,R,g,J,U,H,C,v,K,j,O,_,cl,tl,E,il,al,Nl,nl,Sl,P,Q,q,ll,B=0,F=0,el=null,dl=null,Zl=null,Wl=null,Gl=null,Il=null;Y.beginPath();for(var xl=0;xl<S.length;++xl){(Nl=S[xl][0])!=="S"&&Nl!=="s"&&Nl!=="C"&&Nl!=="c"&&(el=null,dl=null),Nl!=="T"&&Nl!=="t"&&Nl!=="Q"&&Nl!=="q"&&(Zl=null,Wl=null);var bl=void 0;switch(Nl){case"m":case"M":bl=S[xl],Nl==="m"?(B+=bl[1],F+=bl[2]):(B=bl[1],F=bl[2]),Nl!=="M"&&Gl||(Gl={x:B,y:F}),Y.moveTo(B,F);break;case"l":B+=(bl=S[xl])[1],F+=bl[2],Y.lineTo(B,F);break;case"L":B=(bl=S[xl])[1],F=bl[2],Y.lineTo(B,F);break;case"H":B=(bl=S[xl])[1],Y.lineTo(B,F);break;case"h":B+=(bl=S[xl])[1],Y.lineTo(B,F);break;case"V":F=(bl=S[xl])[1],Y.lineTo(B,F);break;case"v":F+=(bl=S[xl])[1],Y.lineTo(B,F);break;case"a":case"A":if(bl=S[xl],Il===null)throw new Error("This should never happen");Nl==="a"?(B+=bl[6],F+=bl[7]):(B=bl[6],F=bl[7]),tl=bl[1],E=bl[2],C=bl[3]*Math.PI/180,g=!!bl[4],J=!!bl[5],U={x:B,y:F},M(H={x:(Il.x-U.x)/2,y:(Il.y-U.y)/2},-C),(v=H.x*H.x/(tl*tl)+H.y*H.y/(E*E))>1&&(tl*=v=Math.sqrt(v),E*=v),K=tl*tl*E*E,j=tl*tl*H.y*H.y+E*E*H.x*H.x,y(nl={x:tl*H.y/E,y:-E*H.x/tl},J!==g?Math.sqrt((K-j)/j)||0:-Math.sqrt((K-j)/j)||0),R=Math.atan2((H.y-nl.y)/E,(H.x-nl.x)/tl),D=Math.atan2(-(H.y+nl.y)/E,-(H.x+nl.x)/tl),M(nl,C),Q=nl,q=(U.x+Il.x)/2,ll=(U.y+Il.y)/2,Q.x+=q,Q.y+=ll,Y.save(),Y.translate(nl.x,nl.y),Y.rotate(C),Y.scale(tl,E),Y.arc(0,0,1,R,D,!J),Y.restore();break;case"C":el=(bl=S[xl])[3],dl=bl[4],B=bl[5],F=bl[6],Y.bezierCurveTo(bl[1],bl[2],el,dl,B,F);break;case"c":bl=S[xl],Y.bezierCurveTo(bl[1]+B,bl[2]+F,bl[3]+B,bl[4]+F,bl[5]+B,bl[6]+F),el=bl[3]+B,dl=bl[4]+F,B+=bl[5],F+=bl[6];break;case"S":bl=S[xl],el!==null&&dl!==null||(el=B,dl=F),Y.bezierCurveTo(2*B-el,2*F-dl,bl[1],bl[2],bl[3],bl[4]),el=bl[1],dl=bl[2],B=bl[3],F=bl[4];break;case"s":bl=S[xl],el!==null&&dl!==null||(el=B,dl=F),Y.bezierCurveTo(2*B-el,2*F-dl,bl[1]+B,bl[2]+F,bl[3]+B,bl[4]+F),el=bl[1]+B,dl=bl[2]+F,B+=bl[3],F+=bl[4];break;case"Q":Zl=(bl=S[xl])[1],Wl=bl[2],B=bl[3],F=bl[4],Y.quadraticCurveTo(Zl,Wl,B,F);break;case"q":Zl=(bl=S[xl])[1]+B,Wl=bl[2]+F,B+=bl[3],F+=bl[4],Y.quadraticCurveTo(Zl,Wl,B,F);break;case"T":Zl!==null&&Wl!==null||(Zl=B,Wl=F),Zl=2*B-Zl,Wl=2*F-Wl,B=(bl=S[xl])[1],F=bl[2],Y.quadraticCurveTo(Zl,Wl,B,F);break;case"t":Zl!==null&&Wl!==null||(Zl=B,Wl=F),Zl=2*B-Zl,Wl=2*F-Wl,B+=(bl=S[xl])[1],F+=bl[2],Y.quadraticCurveTo(Zl,Wl,B,F);break;case"z":case"Z":Gl&&(B=Gl.x,F=Gl.y),Gl=null,Y.closePath();break;case"AC":B=(bl=S[xl])[1],F=bl[2],cl=bl[3],R=bl[4],D=bl[5],Sl=bl[6],Y.arc(B,F,cl,R,D,Sl);break;case"AT":O=(bl=S[xl])[1],_=bl[2],B=bl[3],F=bl[4],cl=bl[5],Y.arcTo(O,_,B,F,cl);break;case"E":B=(bl=S[xl])[1],F=bl[2],tl=bl[3],E=bl[4],C=bl[5],R=bl[6],D=bl[7],Sl=bl[8],Y.save(),Y.translate(B,F),Y.rotate(C),Y.scale(tl,E),Y.arc(0,0,1,R,D,Sl),Y.restore();break;case"R":B=(bl=S[xl])[1],F=bl[2],il=bl[3],al=bl[4],Gl={x:B,y:F},Y.rect(B,F,il,al);break;case"RR":B=(bl=S[xl])[1],F=bl[2],il=bl[3],al=bl[4],P=bl[5],Gl={x:B,y:F},Y.roundRect(B,F,il,al,P)}Il?(Il.x=B,Il.y=F):Il={x:B,y:F}}}function z(Y,S,D,R,g){var J=this;if(g===void 0&&(g=0),typeof g=="number"&&(g=[g]),Array.isArray(g)){if(g.length===0||g.length>4)throw new RangeError("Failed to execute 'roundRect' on '".concat(this.constructor.name,"': ").concat(g.length," radii provided. Between one and four radii are necessary."));if(g.forEach(function(j){if(j<0)throw new RangeError("Failed to execute 'roundRect' on '".concat(J.constructor.name,"': Radius value ").concat(j," is negative."))}),g.length===1&&g[0]===0)return this.rect(Y,S,D,R);var U,H,C,v=Math.min(D,R)/2,K=U=H=C=Math.min(v,g[0]);g.length===2&&(U=C=Math.min(v,g[1])),g.length===3&&(U=C=Math.min(v,g[1]),H=Math.min(v,g[2])),g.length===4&&(U=Math.min(v,g[1]),H=Math.min(v,g[2]),C=Math.min(v,g[3])),this.moveTo(Y,S+R-C),this.arcTo(Y,S,Y+K,S,K),this.arcTo(Y+D,S,Y+D,S+U,U),this.arcTo(Y+D,S+R,Y+D-H,S+R,H),this.arcTo(Y,S+R,Y,S+R-C,C),this.moveTo(Y,S)}}(function(Y){if(Y&&Y.CanvasRenderingContext2D&&!Y.Path2D){var S=Y.CanvasRenderingContext2D,D=S.prototype.fill,R=S.prototype.stroke,g=S.prototype.isPointInPath;S.prototype.fill=function(){for(var J=[],U=0;U<arguments.length;U++)J[U]=arguments[U];if(!(J[0]instanceof N))return C=J[0]||"nonzero",D.apply(this,[C]);var H=J[0],C=J[1]||"nonzero";X(this,H.commands),D.apply(this,[C])},S.prototype.stroke=function(J){J&&X(this,J.commands),R.apply(this)},S.prototype.isPointInPath=function(){for(var J=[],U=0;U<arguments.length;U++)J[U]=arguments[U];if(J[0]instanceof N){var H=J[0],C=J[1],v=J[2],K=J[3]||"nonzero";return X(this,H.commands),g.apply(this,[C,v,K])}return g.apply(this,J)},Y.Path2D=N}})(window),function(Y){if(Y&&Y.CanvasRenderingContext2D){var S=Y.CanvasRenderingContext2D,D=Y.Path2D;S&&!S.prototype.roundRect&&(S.prototype.roundRect=z),D&&!D.prototype.roundRect&&(D.prototype.roundRect=z)}}(window)}()),path2dPolyfill_min}(function(module,exports){(function(s,u){module.exports=u()})(globalThis,()=>(()=>{var __webpack_modules__=[,(s,u,o)=>{var r,W;Object.defineProperty(u,"__esModule",{value:!0}),u.VerbosityLevel=u.Util=u.UnknownErrorException=u.UnexpectedResponseException=u.TextRenderingMode=u.RenderingIntentFlag=u.PromiseCapability=u.PermissionFlag=u.PasswordResponses=u.PasswordException=u.PageActionEventType=u.OPS=u.MissingPDFException=u.MAX_IMAGE_SIZE_TO_CACHE=u.LINE_FACTOR=u.LINE_DESCENT_FACTOR=u.InvalidPDFException=u.ImageKind=u.IDENTITY_MATRIX=u.FormatError=u.FeatureTest=u.FONT_IDENTITY_MATRIX=u.DocumentActionEventType=u.CMapCompressionType=u.BaseException=u.BASELINE_FACTOR=u.AnnotationType=u.AnnotationStateModelType=u.AnnotationReviewState=u.AnnotationReplyType=u.AnnotationMode=u.AnnotationMarkedState=u.AnnotationFlag=u.AnnotationFieldFlag=u.AnnotationEditorType=u.AnnotationEditorPrefix=u.AnnotationEditorParamsType=u.AnnotationBorderStyleType=u.AnnotationActionEventType=u.AbortException=void 0,u.assert=function(C,v){C||X(v)},u.bytesToString=function(C){typeof C=="object"&&(C==null?void 0:C.length)!==void 0||X("Invalid argument for bytesToString");const v=C.length,K=8192;if(v<K)return String.fromCharCode.apply(null,C);const j=[];for(let O=0;O<v;O+=K){const _=Math.min(O+K,v),cl=C.subarray(O,_);j.push(String.fromCharCode.apply(null,cl))}return j.join("")},u.createValidAbsoluteUrl=function(C){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!C)return null;try{if(K&&typeof C=="string"){if(K.addDefaultProtocol&&C.startsWith("www.")){const O=C.match(/\./g);(O==null?void 0:O.length)>=2&&(C=`http://${C}`)}if(K.tryConvertEncoding)try{C=J(C)}catch{}}const j=v?new URL(C,v):new URL(C);if(function(O){switch(O==null?void 0:O.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(j))return j}catch{}return null},u.getModificationDate=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Date;return[C.getUTCFullYear().toString(),(C.getUTCMonth()+1).toString().padStart(2,"0"),C.getUTCDate().toString().padStart(2,"0"),C.getUTCHours().toString().padStart(2,"0"),C.getUTCMinutes().toString().padStart(2,"0"),C.getUTCSeconds().toString().padStart(2,"0")].join("")},u.getVerbosityLevel=function(){return y},u.info=function(C){y>=M.INFOS&&console.log(`Info: ${C}`)},u.isArrayBuffer=function(C){return typeof C=="object"&&(C==null?void 0:C.byteLength)!==void 0},u.isArrayEqual=function(C,v){if(C.length!==v.length)return!1;for(let K=0,j=C.length;K<j;K++)if(C[K]!==v[K])return!1;return!0},u.normalizeUnicode=function(C){return U||(U=/([\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,H=new Map([["ſt","ſt"]])),C.replaceAll(U,(v,K,j)=>K?K.normalize("NFKC"):H.get(j))},u.objectFromMap=function(C){const v=Object.create(null);for(const[K,j]of C)v[K]=j;return v},u.objectSize=function(C){return Object.keys(C).length},u.setVerbosityLevel=function(C){Number.isInteger(C)&&(y=C)},u.shadow=z,u.string32=function(C){return String.fromCharCode(C>>24&255,C>>16&255,C>>8&255,255&C)},u.stringToBytes=S,u.stringToPDFString=function(C){if(C[0]>="ï"){let K;if(C[0]==="þ"&&C[1]==="ÿ"?K="utf-16be":C[0]==="ÿ"&&C[1]==="þ"?K="utf-16le":C[0]==="ï"&&C[1]==="»"&&C[2]==="¿"&&(K="utf-8"),K)try{const j=new TextDecoder(K,{fatal:!0}),O=S(C);return j.decode(O)}catch(j){N(`stringToPDFString: "${j}".`)}}const v=[];for(let K=0,j=C.length;K<j;K++){const O=g[C.charCodeAt(K)];v.push(O?String.fromCharCode(O):C.charAt(K))}return v.join("")},u.stringToUTF8String=J,u.unreachable=X,u.utf8StringToString=function(C){return unescape(encodeURIComponent(C))},u.warn=N,globalThis._pdfjsCompatibilityChecked||(globalThis._pdfjsCompatibilityChecked=!0,o(2)),u.IDENTITY_MATRIX=[1,0,0,1,0,0],u.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],u.MAX_IMAGE_SIZE_TO_CACHE=1e7,u.LINE_FACTOR=1.35,u.LINE_DESCENT_FACTOR=.35,u.BASELINE_FACTOR=.25925925925925924,u.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},u.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},u.AnnotationEditorPrefix="pdfjs_internal_editor_",u.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,INK:15},u.AnnotationEditorParamsType={FREETEXT_SIZE:1,FREETEXT_COLOR:2,FREETEXT_OPACITY:3,INK_COLOR:11,INK_THICKNESS:12,INK_OPACITY:13},u.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},u.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},u.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},u.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},u.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},u.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},u.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},u.AnnotationReplyType={GROUP:"Group",REPLY:"R"},u.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},u.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},u.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},u.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"},u.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},u.PageActionEventType={O:"PageOpen",C:"PageClose"};const M={ERRORS:0,WARNINGS:1,INFOS:5};u.VerbosityLevel=M,u.CMapCompressionType={NONE:0,BINARY:1},u.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},u.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let y=M.WARNINGS;function N(C){y>=M.WARNINGS&&console.log(`Warning: ${C}`)}function X(C){throw new Error(C)}function z(C,v,K){let j=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return Object.defineProperty(C,v,{value:K,enumerable:!j,configurable:!0,writable:!1}),K}const Y=function(){function C(v,K){this.constructor===C&&X("Cannot initialize BaseException."),this.message=v,this.name=K}return C.prototype=new Error,C.constructor=C,C}();u.BaseException=Y,u.PasswordException=class extends Y{constructor(C,v){super(C,"PasswordException"),this.code=v}},u.UnknownErrorException=class extends Y{constructor(C,v){super(C,"UnknownErrorException"),this.details=v}},u.InvalidPDFException=class extends Y{constructor(C){super(C,"InvalidPDFException")}},u.MissingPDFException=class extends Y{constructor(C){super(C,"MissingPDFException")}},u.UnexpectedResponseException=class extends Y{constructor(C,v){super(C,"UnexpectedResponseException"),this.status=v}},u.FormatError=class extends Y{constructor(C){super(C,"FormatError")}},u.AbortException=class extends Y{constructor(C){super(C,"AbortException")}};function S(C){typeof C!="string"&&X("Invalid argument for stringToBytes");const v=C.length,K=new Uint8Array(v);for(let j=0;j<v;++j)K[j]=255&C.charCodeAt(j);return K}u.FeatureTest=class{static get isLittleEndian(){return z(this,"isLittleEndian",function(){const C=new Uint8Array(4);return C[0]=1,new Uint32Array(C.buffer,0,1)[0]===1}())}static get isEvalSupported(){return z(this,"isEvalSupported",function(){try{return new Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return z(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator>"u"?z(this,"platform",{isWin:!1,isMac:!1}):z(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}};const D=[...Array(256).keys()].map(C=>C.toString(16).padStart(2,"0"));class R{static makeHexColor(v,K,j){return`#${D[v]}${D[K]}${D[j]}`}static scaleMinMax(v,K){let j;v[0]?(v[0]<0&&(j=K[0],K[0]=K[1],K[1]=j),K[0]*=v[0],K[1]*=v[0],v[3]<0&&(j=K[2],K[2]=K[3],K[3]=j),K[2]*=v[3],K[3]*=v[3]):(j=K[0],K[0]=K[2],K[2]=j,j=K[1],K[1]=K[3],K[3]=j,v[1]<0&&(j=K[2],K[2]=K[3],K[3]=j),K[2]*=v[1],K[3]*=v[1],v[2]<0&&(j=K[0],K[0]=K[1],K[1]=j),K[0]*=v[2],K[1]*=v[2]),K[0]+=v[4],K[1]+=v[4],K[2]+=v[5],K[3]+=v[5]}static transform(v,K){return[v[0]*K[0]+v[2]*K[1],v[1]*K[0]+v[3]*K[1],v[0]*K[2]+v[2]*K[3],v[1]*K[2]+v[3]*K[3],v[0]*K[4]+v[2]*K[5]+v[4],v[1]*K[4]+v[3]*K[5]+v[5]]}static applyTransform(v,K){return[v[0]*K[0]+v[1]*K[2]+K[4],v[0]*K[1]+v[1]*K[3]+K[5]]}static applyInverseTransform(v,K){const j=K[0]*K[3]-K[1]*K[2];return[(v[0]*K[3]-v[1]*K[2]+K[2]*K[5]-K[4]*K[3])/j,(-v[0]*K[1]+v[1]*K[0]+K[4]*K[1]-K[5]*K[0])/j]}static getAxialAlignedBoundingBox(v,K){const j=R.applyTransform(v,K),O=R.applyTransform(v.slice(2,4),K),_=R.applyTransform([v[0],v[3]],K),cl=R.applyTransform([v[2],v[1]],K);return[Math.min(j[0],O[0],_[0],cl[0]),Math.min(j[1],O[1],_[1],cl[1]),Math.max(j[0],O[0],_[0],cl[0]),Math.max(j[1],O[1],_[1],cl[1])]}static inverseTransform(v){const K=v[0]*v[3]-v[1]*v[2];return[v[3]/K,-v[1]/K,-v[2]/K,v[0]/K,(v[2]*v[5]-v[4]*v[3])/K,(v[4]*v[1]-v[5]*v[0])/K]}static singularValueDecompose2dScale(v){const K=[v[0],v[2],v[1],v[3]],j=v[0]*K[0]+v[1]*K[2],O=v[0]*K[1]+v[1]*K[3],_=v[2]*K[0]+v[3]*K[2],cl=v[2]*K[1]+v[3]*K[3],tl=(j+cl)/2,E=Math.sqrt((j+cl)**2-4*(j*cl-_*O))/2,il=tl+E||1,al=tl-E||1;return[Math.sqrt(il),Math.sqrt(al)]}static normalizeRect(v){const K=v.slice(0);return v[0]>v[2]&&(K[0]=v[2],K[2]=v[0]),v[1]>v[3]&&(K[1]=v[3],K[3]=v[1]),K}static intersect(v,K){const j=Math.max(Math.min(v[0],v[2]),Math.min(K[0],K[2])),O=Math.min(Math.max(v[0],v[2]),Math.max(K[0],K[2]));if(j>O)return null;const _=Math.max(Math.min(v[1],v[3]),Math.min(K[1],K[3])),cl=Math.min(Math.max(v[1],v[3]),Math.max(K[1],K[3]));return _>cl?null:[j,_,O,cl]}static bezierBoundingBox(v,K,j,O,_,cl,tl,E){const il=[],al=[[],[]];let Nl,nl,Sl,P,Q,q,ll,B;for(let Zl=0;Zl<2;++Zl)if(Zl===0?(nl=6*v-12*j+6*_,Nl=-3*v+9*j-9*_+3*tl,Sl=3*j-3*v):(nl=6*K-12*O+6*cl,Nl=-3*K+9*O-9*cl+3*E,Sl=3*O-3*K),Math.abs(Nl)<1e-12){if(Math.abs(nl)<1e-12)continue;P=-Sl/nl,0<P&&P<1&&il.push(P)}else ll=nl*nl-4*Sl*Nl,B=Math.sqrt(ll),ll<0||(Q=(-nl+B)/(2*Nl),0<Q&&Q<1&&il.push(Q),q=(-nl-B)/(2*Nl),0<q&&q<1&&il.push(q));let F,el=il.length;const dl=el;for(;el--;)P=il[el],F=1-P,al[0][el]=F*F*F*v+3*F*F*P*j+3*F*P*P*_+P*P*P*tl,al[1][el]=F*F*F*K+3*F*F*P*O+3*F*P*P*cl+P*P*P*E;return al[0][dl]=v,al[1][dl]=K,al[0][dl+1]=tl,al[1][dl+1]=E,al[0].length=al[1].length=dl+2,[Math.min(...al[0]),Math.min(...al[1]),Math.max(...al[0]),Math.max(...al[1])]}}u.Util=R;const g=[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 J(C){return decodeURIComponent(escape(C))}u.PromiseCapability=(W=class{constructor(){et(this,r,!1),this.promise=new Promise((C,v)=>{this.resolve=K=>{ut(this,r,!0),C(K)},this.reject=K=>{ut(this,r,!0),v(K)}})}get settled(){return T(this,r)}},r=new WeakMap,W);let U=null,H=null},(s,u,o)=>{var r=o(3);(function(){!globalThis.DOMMatrix&&r.isNodeJS&&(globalThis.DOMMatrix=require$$6.DOMMatrix)})(),function(){if(globalThis.Path2D||!r.isNodeJS)return;const{CanvasRenderingContext2D:W}=require$$6,{polyfillPath2D:M}=requirePath2dPolyfill_min();globalThis.CanvasRenderingContext2D=W,M(globalThis)}(),function(){Array.prototype.at||o(4)}(),function(){Uint8Array.prototype.at||o(78)}(),function(){globalThis.structuredClone||o(90)}()},(s,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.isNodeJS=void 0;const o=!(typeof process!="object"||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&process.type!=="browser");u.isNodeJS=o},(s,u,o)=>{o(5);var r=o(77);s.exports=r("Array","at")},(s,u,o)=>{var r=o(6),W=o(43),M=o(67),y=o(65),N=o(72);r({target:"Array",proto:!0},{at:function(X){var z=W(this),Y=M(z),S=y(X),D=S>=0?S:Y+S;return D<0||D>=Y?void 0:z[D]}}),N("at")},(s,u,o)=>{var r=o(7),W=o(8).f,M=o(47),y=o(51),N=o(41),X=o(59),z=o(71);s.exports=function(Y,S){var D,R,g,J,U,H=Y.target,C=Y.global,v=Y.stat;if(D=C?r:v?r[H]||N(H,{}):(r[H]||{}).prototype)for(R in S){if(J=S[R],g=Y.dontCallGetSet?(U=W(D,R))&&U.value:D[R],!z(C?R:H+(v?".":"#")+R,Y.forced)&&g!==void 0){if(typeof J==typeof g)continue;X(J,g)}(Y.sham||g&&g.sham)&&M(J,"sham",!0),y(D,R,J,Y)}}},function(s){var u=function(o){return o&&o.Math==Math&&o};s.exports=u(typeof globalThis=="object"&&globalThis)||u(typeof window=="object"&&window)||u(typeof self=="object"&&self)||u(typeof commonjsGlobal=="object"&&commonjsGlobal)||function(){return this}()||this||Function("return this")()},(s,u,o)=>{var r=o(9),W=o(11),M=o(13),y=o(14),N=o(15),X=o(21),z=o(42),Y=o(45),S=Object.getOwnPropertyDescriptor;u.f=r?S:function(D,R){if(D=N(D),R=X(R),Y)try{return S(D,R)}catch{}if(z(D,R))return y(!W(M.f,D,R),D[R])}},(s,u,o)=>{var r=o(10);s.exports=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},s=>{s.exports=function(u){try{return!!u()}catch{return!0}}},(s,u,o)=>{var r=o(12),W=Function.prototype.call;s.exports=r?W.bind(W):function(){return W.apply(W,arguments)}},(s,u,o)=>{var r=o(10);s.exports=!r(function(){var W=(function(){}).bind();return typeof W!="function"||W.hasOwnProperty("prototype")})},(s,u)=>{var o={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,W=r&&!o.call({1:2},1);u.f=W?function(M){var y=r(this,M);return!!y&&y.enumerable}:o},s=>{s.exports=function(u,o){return{enumerable:!(1&u),configurable:!(2&u),writable:!(4&u),value:o}}},(s,u,o)=>{var r=o(16),W=o(19);s.exports=function(M){return r(W(M))}},(s,u,o)=>{var r=o(17),W=o(10),M=o(18),y=Object,N=r("".split);s.exports=W(function(){return!y("z").propertyIsEnumerable(0)})?function(X){return M(X)=="String"?N(X,""):y(X)}:y},(s,u,o)=>{var r=o(12),W=Function.prototype,M=W.call,y=r&&W.bind.bind(M,M);s.exports=r?y:function(N){return function(){return M.apply(N,arguments)}}},(s,u,o)=>{var r=o(17),W=r({}.toString),M=r("".slice);s.exports=function(y){return M(W(y),8,-1)}},(s,u,o)=>{var r=o(20),W=TypeError;s.exports=function(M){if(r(M))throw W("Can't call method on "+M);return M}},s=>{s.exports=function(u){return u==null}},(s,u,o)=>{var r=o(22),W=o(26);s.exports=function(M){var y=r(M,"string");return W(y)?y:y+""}},(s,u,o)=>{var r=o(11),W=o(23),M=o(26),y=o(33),N=o(36),X=o(37),z=TypeError,Y=X("toPrimitive");s.exports=function(S,D){if(!W(S)||M(S))return S;var R,g=y(S,Y);if(g){if(D===void 0&&(D="default"),R=r(g,S,D),!W(R)||M(R))return R;throw z("Can't convert object to primitive value")}return D===void 0&&(D="number"),N(S,D)}},(s,u,o)=>{var r=o(24),W=o(25),M=W.all;s.exports=W.IS_HTMLDDA?function(y){return typeof y=="object"?y!==null:r(y)||y===M}:function(y){return typeof y=="object"?y!==null:r(y)}},(s,u,o)=>{var r=o(25),W=r.all;s.exports=r.IS_HTMLDDA?function(M){return typeof M=="function"||M===W}:function(M){return typeof M=="function"}},s=>{var u=typeof document=="object"&&document.all,o=u===void 0&&u!==void 0;s.exports={all:u,IS_HTMLDDA:o}},(s,u,o)=>{var r=o(27),W=o(24),M=o(28),y=o(29),N=Object;s.exports=y?function(X){return typeof X=="symbol"}:function(X){var z=r("Symbol");return W(z)&&M(z.prototype,N(X))}},(s,u,o)=>{var r=o(7),W=o(24);s.exports=function(M,y){return arguments.length<2?(N=r[M],W(N)?N:void 0):r[M]&&r[M][y];var N}},(s,u,o)=>{var r=o(17);s.exports=r({}.isPrototypeOf)},(s,u,o)=>{var r=o(30);s.exports=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},(s,u,o)=>{var r=o(31),W=o(10),M=o(7).String;s.exports=!!Object.getOwnPropertySymbols&&!W(function(){var y=Symbol();return!M(y)||!(Object(y)instanceof Symbol)||!Symbol.sham&&r&&r<41})},(s,u,o)=>{var r,W,M=o(7),y=o(32),N=M.process,X=M.Deno,z=N&&N.versions||X&&X.version,Y=z&&z.v8;Y&&(W=(r=Y.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!W&&y&&(!(r=y.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=y.match(/Chrome\/(\d+)/))&&(W=+r[1]),s.exports=W},s=>{s.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},(s,u,o)=>{var r=o(34),W=o(20);s.exports=function(M,y){var N=M[y];return W(N)?void 0:r(N)}},(s,u,o)=>{var r=o(24),W=o(35),M=TypeError;s.exports=function(y){if(r(y))return y;throw M(W(y)+" is not a function")}},s=>{var u=String;s.exports=function(o){try{return u(o)}catch{return"Object"}}},(s,u,o)=>{var r=o(11),W=o(24),M=o(23),y=TypeError;s.exports=function(N,X){var z,Y;if(X==="string"&&W(z=N.toString)&&!M(Y=r(z,N))||W(z=N.valueOf)&&!M(Y=r(z,N))||X!=="string"&&W(z=N.toString)&&!M(Y=r(z,N)))return Y;throw y("Can't convert object to primitive value")}},(s,u,o)=>{var r=o(7),W=o(38),M=o(42),y=o(44),N=o(30),X=o(29),z=r.Symbol,Y=W("wks"),S=X?z.for||z:z&&z.withoutSetter||y;s.exports=function(D){return M(Y,D)||(Y[D]=N&&M(z,D)?z[D]:S("Symbol."+D)),Y[D]}},(s,u,o)=>{var r=o(39),W=o(40);(s.exports=function(M,y){return W[M]||(W[M]=y!==void 0?y:{})})("versions",[]).push({version:"3.30.2",mode:r?"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,u,o)=>{var r=o(7),W=o(41),M="__core-js_shared__",y=r[M]||W(M,{});s.exports=y},(s,u,o)=>{var r=o(7),W=Object.defineProperty;s.exports=function(M,y){try{W(r,M,{value:y,configurable:!0,writable:!0})}catch{r[M]=y}return y}},(s,u,o)=>{var r=o(17),W=o(43),M=r({}.hasOwnProperty);s.exports=Object.hasOwn||function(y,N){return M(W(y),N)}},(s,u,o)=>{var r=o(19),W=Object;s.exports=function(M){return W(r(M))}},(s,u,o)=>{var r=o(17),W=0,M=Math.random(),y=r(1 .toString);s.exports=function(N){return"Symbol("+(N===void 0?"":N)+")_"+y(++W+M,36)}},(s,u,o)=>{var r=o(9),W=o(10),M=o(46);s.exports=!r&&!W(function(){return Object.defineProperty(M("div"),"a",{get:function(){return 7}}).a!=7})},(s,u,o)=>{var r=o(7),W=o(23),M=r.document,y=W(M)&&W(M.createElement);s.exports=function(N){return y?M.createElement(N):{}}},(s,u,o)=>{var r=o(9),W=o(48),M=o(14);s.exports=r?function(y,N,X){return W.f(y,N,M(1,X))}:function(y,N,X){return y[N]=X,y}},(s,u,o)=>{var r=o(9),W=o(45),M=o(49),y=o(50),N=o(21),X=TypeError,z=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,S="enumerable",D="configurable",R="writable";u.f=r?M?function(g,J,U){if(y(g),J=N(J),y(U),typeof g=="function"&&J==="prototype"&&"value"in U&&R in U&&!U[R]){var H=Y(g,J);H&&H[R]&&(g[J]=U.value,U={configurable:D in U?U[D]:H[D],enumerable:S in U?U[S]:H[S],writable:!1})}return z(g,J,U)}:z:function(g,J,U){if(y(g),J=N(J),y(U),W)try{return z(g,J,U)}catch{}if("get"in U||"set"in U)throw X("Accessors not supported");return"value"in U&&(g[J]=U.value),g}},(s,u,o)=>{var r=o(9),W=o(10);s.exports=r&&W(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},(s,u,o)=>{var r=o(23),W=String,M=TypeError;s.exports=function(y){if(r(y))return y;throw M(W(y)+" is not an object")}},(s,u,o)=>{var r=o(24),W=o(48),M=o(52),y=o(41);s.exports=function(N,X,z,Y){Y||(Y={});var S=Y.enumerable,D=Y.name!==void 0?Y.name:X;if(r(z)&&M(z,D,Y),Y.global)S?N[X]=z:y(X,z);else{try{Y.unsafe?N[X]&&(S=!0):delete N[X]}catch{}S?N[X]=z:W.f(N,X,{value:z,enumerable:!1,configurable:!Y.nonConfigurable,writable:!Y.nonWritable})}return N}},(s,u,o)=>{var r=o(17),W=o(10),M=o(24),y=o(42),N=o(9),X=o(53).CONFIGURABLE,z=o(54),Y=o(55),S=Y.enforce,D=Y.get,R=String,g=Object.defineProperty,J=r("".slice),U=r("".replace),H=r([].join),C=N&&!W(function(){return g(function(){},"length",{value:8}).length!==8}),v=String(String).split("String"),K=s.exports=function(j,O,_){J(R(O),0,7)==="Symbol("&&(O="["+U(R(O),/^Symbol\(([^)]*)\)/,"$1")+"]"),_&&_.getter&&(O="get "+O),_&&_.setter&&(O="set "+O),(!y(j,"name")||X&&j.name!==O)&&(N?g(j,"name",{value:O,configurable:!0}):j.name=O),C&&_&&y(_,"arity")&&j.length!==_.arity&&g(j,"length",{value:_.arity});try{_&&y(_,"constructor")&&_.constructor?N&&g(j,"prototype",{writable:!1}):j.prototype&&(j.prototype=void 0)}catch{}var cl=S(j);return y(cl,"source")||(cl.source=H(v,typeof O=="string"?O:"")),j};Function.prototype.toString=K(function(){return M(this)&&D(this).source||z(this)},"toString")},(s,u,o)=>{var r=o(9),W=o(42),M=Function.prototype,y=r&&Object.getOwnPropertyDescriptor,N=W(M,"name"),X=N&&(function(){}).name==="something",z=N&&(!r||r&&y(M,"name").configurable);s.exports={EXISTS:N,PROPER:X,CONFIGURABLE:z}},(s,u,o)=>{var r=o(17),W=o(24),M=o(40),y=r(Function.toString);W(M.inspectSource)||(M.inspectSource=function(N){return y(N)}),s.exports=M.inspectSource},(s,u,o)=>{var r,W,M,y=o(56),N=o(7),X=o(23),z=o(47),Y=o(42),S=o(40),D=o(57),R=o(58),g="Object already initialized",J=N.TypeError,U=N.WeakMap;if(y||S.state){var H=S.state||(S.state=new U);H.get=H.get,H.has=H.has,H.set=H.set,r=function(v,K){if(H.has(v))throw J(g);return K.facade=v,H.set(v,K),K},W=function(v){return H.get(v)||{}},M=function(v){return H.has(v)}}else{var C=D("state");R[C]=!0,r=function(v,K){if(Y(v,C))throw J(g);return K.facade=v,z(v,C,K),K},W=function(v){return Y(v,C)?v[C]:{}},M=function(v){return Y(v,C)}}s.exports={set:r,get:W,has:M,enforce:function(v){return M(v)?W(v):r(v,{})},getterFor:function(v){return function(K){var j;if(!X(K)||(j=W(K)).type!==v)throw J("Incompatible receiver, "+v+" required");return j}}}},(s,u,o)=>{var r=o(7),W=o(24),M=r.WeakMap;s.exports=W(M)&&/native code/.test(String(M))},(s,u,o)=>{var r=o(38),W=o(44),M=r("keys");s.exports=function(y){return M[y]||(M[y]=W(y))}},s=>{s.exports={}},(s,u,o)=>{var r=o(42),W=o(60),M=o(8),y=o(48);s.exports=function(N,X,z){for(var Y=W(X),S=y.f,D=M.f,R=0;R<Y.length;R++){var g=Y[R];r(N,g)||z&&r(z,g)||S(N,g,D(X,g))}}},(s,u,o)=>{var r=o(27),W=o(17),M=o(61),y=o(70),N=o(50),X=W([].concat);s.exports=r("Reflect","ownKeys")||function(z){var Y=M.f(N(z)),S=y.f;return S?X(Y,S(z)):Y}},(s,u,o)=>{var r=o(62),W=o(69).concat("length","prototype");u.f=Object.getOwnPropertyNames||function(M){return r(M,W)}},(s,u,o)=>{var r=o(17),W=o(42),M=o(15),y=o(63).indexOf,N=o(58),X=r([].push);s.exports=function(z,Y){var S,D=M(z),R=0,g=[];for(S in D)!W(N,S)&&W(D,S)&&X(g,S);for(;Y.length>R;)W(D,S=Y[R++])&&(~y(g,S)||X(g,S));return g}},(s,u,o)=>{var r=o(15),W=o(64),M=o(67),y=function(N){return function(X,z,Y){var S,D=r(X),R=M(D),g=W(Y,R);if(N&&z!=z){for(;R>g;)if((S=D[g++])!=S)return!0}else for(;R>g;g++)if((N||g in D)&&D[g]===z)return N||g||0;return!N&&-1}};s.exports={includes:y(!0),indexOf:y(!1)}},(s,u,o)=>{var r=o(65),W=Math.max,M=Math.min;s.exports=function(y,N){var X=r(y);return X<0?W(X+N,0):M(X,N)}},(s,u,o)=>{var r=o(66);s.exports=function(W){var M=+W;return M!=M||M===0?0:r(M)}},s=>{var u=Math.ceil,o=Math.floor;s.exports=Math.trunc||function(r){var W=+r;return(W>0?o:u)(W)}},(s,u,o)=>{var r=o(68);s.exports=function(W){return r(W.length)}},(s,u,o)=>{var r=o(65),W=Math.min;s.exports=function(M){return M>0?W(r(M),9007199254740991):0}},s=>{s.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(s,u)=>{u.f=Object.getOwnPropertySymbols},(s,u,o)=>{var r=o(10),W=o(24),M=/#|\.prototype\./,y=function(S,D){var R=X[N(S)];return R==Y||R!=z&&(W(D)?r(D):!!D)},N=y.normalize=function(S){return String(S).replace(M,".").toLowerCase()},X=y.data={},z=y.NATIVE="N",Y=y.POLYFILL="P";s.exports=y},(s,u,o)=>{var r=o(37),W=o(73),M=o(48).f,y=r("unscopables"),N=Array.prototype;N[y]==null&&M(N,y,{configurable:!0,value:W(null)}),s.exports=function(X){N[y][X]=!0}},(s,u,o)=>{var r,W=o(50),M=o(74),y=o(69),N=o(58),X=o(76),z=o(46),Y=o(57),S="prototype",D="script",R=Y("IE_PROTO"),g=function(){},J=function(C){return"<"+D+">"+C+"</"+D+">"},U=function(C){C.write(J("")),C.close();var v=C.parentWindow.Object;return C=null,v},H=function(){try{r=new ActiveXObject("htmlfile")}catch{}H=typeof document<"u"?document.domain&&r?U(r):function(){var v,K=z("iframe"),j="java"+D+":";return K.style.display="none",X.appendChild(K),K.src=String(j),(v=K.contentWindow.document).open(),v.write(J("document.F=Object")),v.close(),v.F}():U(r);for(var C=y.length;C--;)delete H[S][y[C]];return H()};N[R]=!0,s.exports=Object.create||function(C,v){var K;return C!==null?(g[S]=W(C),K=new g,g[S]=null,K[R]=C):K=H(),v===void 0?K:M.f(K,v)}},(s,u,o)=>{var r=o(9),W=o(49),M=o(48),y=o(50),N=o(15),X=o(75);u.f=r&&!W?Object.defineProperties:function(z,Y){y(z);for(var S,D=N(Y),R=X(Y),g=R.length,J=0;g>J;)M.f(z,S=R[J++],D[S]);return z}},(s,u,o)=>{var r=o(62),W=o(69);s.exports=Object.keys||function(M){return r(M,W)}},(s,u,o)=>{var r=o(27);s.exports=r("document","documentElement")},(s,u,o)=>{var r=o(7),W=o(17);s.exports=function(M,y){return W(r[M].prototype[y])}},(s,u,o)=>{o(79)},(s,u,o)=>{var r=o(80),W=o(67),M=o(65),y=r.aTypedArray;(0,r.exportTypedArrayMethod)("at",function(N){var X=y(this),z=W(X),Y=M(N),S=Y>=0?Y:z+Y;return S<0||S>=z?void 0:X[S]})},(s,u,o)=>{var r,W,M,y=o(81),N=o(9),X=o(7),z=o(24),Y=o(23),S=o(42),D=o(82),R=o(35),g=o(47),J=o(51),U=o(84),H=o(28),C=o(85),v=o(87),K=o(37),j=o(44),O=o(55),_=O.enforce,cl=O.get,tl=X.Int8Array,E=tl&&tl.prototype,il=X.Uint8ClampedArray,al=il&&il.prototype,Nl=tl&&C(tl),nl=E&&C(E),Sl=Object.prototype,P=X.TypeError,Q=K("toStringTag"),q=j("TYPED_ARRAY_TAG"),ll="TypedArrayConstructor",B=y&&!!v&&D(X.opera)!=="Opera",F=!1,el={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},dl={BigInt64Array:8,BigUint64Array:8},Zl=function(Gl){var Il=C(Gl);if(Y(Il)){var xl=cl(Il);return xl&&S(xl,ll)?xl[ll]:Zl(Il)}},Wl=function(Gl){if(!Y(Gl))return!1;var Il=D(Gl);return S(el,Il)||S(dl,Il)};for(r in el)(M=(W=X[r])&&W.prototype)?_(M)[ll]=W:B=!1;for(r in dl)(M=(W=X[r])&&W.prototype)&&(_(M)[ll]=W);if((!B||!z(Nl)||Nl===Function.prototype)&&(Nl=function(){throw P("Incorrect invocation")},B))for(r in el)X[r]&&v(X[r],Nl);if((!B||!nl||nl===Sl)&&(nl=Nl.prototype,B))for(r in el)X[r]&&v(X[r].prototype,nl);if(B&&C(al)!==nl&&v(al,nl),N&&!S(nl,Q)){F=!0,U(nl,Q,{configurable:!0,get:function(){return Y(this)?this[q]:void 0}});for(r in el)X[r]&&g(X[r],q,r)}s.exports={NATIVE_ARRAY_BUFFER_VIEWS:B,TYPED_ARRAY_TAG:F&&q,aTypedArray:function(Gl){if(Wl(Gl))return Gl;throw P("Target is not a typed array")},aTypedArrayConstructor:function(Gl){if(z(Gl)&&(!v||H(Nl,Gl)))return Gl;throw P(R(Gl)+" is not a typed array constructor")},exportTypedArrayMethod:function(Gl,Il,xl,bl){if(N){if(xl)for(var Ol in el){var _l=X[Ol];if(_l&&S(_l.prototype,Gl))try{delete _l.prototype[Gl]}catch{try{_l.prototype[Gl]=Il}catch{}}}nl[Gl]&&!xl||J(nl,Gl,xl?Il:B&&E[Gl]||Il,bl)}},exportTypedArrayStaticMethod:function(Gl,Il,xl){var bl,Ol;if(N){if(v){if(xl){for(bl in el)if((Ol=X[bl])&&S(Ol,Gl))try{delete Ol[Gl]}catch{}}if(Nl[Gl]&&!xl)return;try{return J(Nl,Gl,xl?Il:B&&Nl[Gl]||Il)}catch{}}for(bl in el)!(Ol=X[bl])||Ol[Gl]&&!xl||J(Ol,Gl,Il)}},getTypedArrayConstructor:Zl,isView:function(Gl){if(!Y(Gl))return!1;var Il=D(Gl);return Il==="DataView"||S(el,Il)||S(dl,Il)},isTypedArray:Wl,TypedArray:Nl,TypedArrayPrototype:nl}},s=>{s.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"},(s,u,o)=>{var r=o(83),W=o(24),M=o(18),y=o(37)("toStringTag"),N=Object,X=M(function(){return arguments}())=="Arguments";s.exports=r?M:function(z){var Y,S,D;return z===void 0?"Undefined":z===null?"Null":typeof(S=function(R,g){try{return R[g]}catch{}}(Y=N(z),y))=="string"?S:X?M(Y):(D=M(Y))=="Object"&&W(Y.callee)?"Arguments":D}},(s,u,o)=>{var r={};r[o(37)("toStringTag")]="z",s.exports=String(r)==="[object z]"},(s,u,o)=>{var r=o(52),W=o(48);s.exports=function(M,y,N){return N.get&&r(N.get,y,{getter:!0}),N.set&&r(N.set,y,{setter:!0}),W.f(M,y,N)}},(s,u,o)=>{var r=o(42),W=o(24),M=o(43),y=o(57),N=o(86),X=y("IE_PROTO"),z=Object,Y=z.prototype;s.exports=N?z.getPrototypeOf:function(S){var D=M(S);if(r(D,X))return D[X];var R=D.constructor;return W(R)&&D instanceof R?R.prototype:D instanceof z?Y:null}},(s,u,o)=>{var r=o(10);s.exports=!r(function(){function W(){}return W.prototype.constructor=null,Object.getPrototypeOf(new W)!==W.prototype})},(s,u,o)=>{var r=o(88),W=o(50),M=o(89);s.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var y,N=!1,X={};try{(y=r(Object.prototype,"__proto__","set"))(X,[]),N=X instanceof Array}catch{}return function(z,Y){return W(z),M(Y),N?y(z,Y):z.__proto__=Y,z}}():void 0)},(s,u,o)=>{var r=o(17),W=o(34);s.exports=function(M,y,N){try{return r(W(Object.getOwnPropertyDescriptor(M,y)[N]))}catch{}}},(s,u,o)=>{var r=o(24),W=String,M=TypeError;s.exports=function(y){if(typeof y=="object"||r(y))return y;throw M("Can't set "+W(y)+" as a prototype")}},(s,u,o)=>{o(91),o(98),o(100),o(123),o(125);var r=o(137);s.exports=r.structuredClone},(s,u,o)=>{var r=o(15),W=o(72),M=o(92),y=o(55),N=o(48).f,X=o(93),z=o(97),Y=o(39),S=o(9),D="Array Iterator",R=y.set,g=y.getterFor(D);s.exports=X(Array,"Array",function(U,H){R(this,{type:D,target:r(U),index:0,kind:H})},function(){var U=g(this),H=U.target,C=U.kind,v=U.index++;return!H||v>=H.length?(U.target=void 0,z(void 0,!0)):z(C=="keys"?v:C=="values"?H[v]:[v,H[v]],!1)},"values");var J=M.Arguments=M.Array;if(W("keys"),W("values"),W("entries"),!Y&&S&&J.name!=="values")try{N(J,"name",{value:"values"})}catch{}},s=>{s.exports={}},(s,u,o)=>{var r=o(6),W=o(11),M=o(39),y=o(53),N=o(24),X=o(94),z=o(85),Y=o(87),S=o(96),D=o(47),R=o(51),g=o(37),J=o(92),U=o(95),H=y.PROPER,C=y.CONFIGURABLE,v=U.IteratorPrototype,K=U.BUGGY_SAFARI_ITERATORS,j=g("iterator"),O="keys",_="values",cl="entries",tl=function(){return this};s.exports=function(E,il,al,Nl,nl,Sl,P){X(al,il,Nl);var Q,q,ll,B=function(Il){if(Il===nl&&Wl)return Wl;if(!K&&Il in dl)return dl[Il];switch(Il){case O:return function(){return new al(this,Il)};case _:return function(){return new al(this,Il)};case cl:return function(){return new al(this,Il)}}return function(){return new al(this)}},F=il+" Iterator",el=!1,dl=E.prototype,Zl=dl[j]||dl["@@iterator"]||nl&&dl[nl],Wl=!K&&Zl||B(nl),Gl=il=="Array"&&dl.entries||Zl;if(Gl&&(Q=z(Gl.call(new E)))!==Object.prototype&&Q.next&&(M||z(Q)===v||(Y?Y(Q,v):N(Q[j])||R(Q,j,tl)),S(Q,F,!0,!0),M&&(J[F]=tl)),H&&nl==_&&Zl&&Zl.name!==_&&(!M&&C?D(dl,"name",_):(el=!0,Wl=function(){return W(Zl,this)})),nl)if(q={values:B(_),keys:Sl?Wl:B(O),entries:B(cl)},P)for(ll in q)(K||el||!(ll in dl))&&R(dl,ll,q[ll]);else r({target:il,proto:!0,forced:K||el},q);return M&&!P||dl[j]===Wl||R(dl,j,Wl,{name:nl}),J[il]=Wl,q}},(s,u,o)=>{var r=o(95).IteratorPrototype,W=o(73),M=o(14),y=o(96),N=o(92),X=function(){return this};s.exports=function(z,Y,S,D){var R=Y+" Iterator";return z.prototype=W(r,{next:M(+!D,S)}),y(z,R,!1,!0),N[R]=X,z}},(s,u,o)=>{var r,W,M,y=o(10),N=o(24),X=o(23),z=o(73),Y=o(85),S=o(51),D=o(37),R=o(39),g=D("iterator"),J=!1;[].keys&&("next"in(M=[].keys())?(W=Y(Y(M)))!==Object.prototype&&(r=W):J=!0),!X(r)||y(function(){var U={};return r[g].call(U)!==U})?r={}:R&&(r=z(r)),N(r[g])||S(r,g,function(){return this}),s.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:J}},(s,u,o)=>{var r=o(48).f,W=o(42),M=o(37)("toStringTag");s.exports=function(y,N,X){y&&!X&&(y=y.prototype),y&&!W(y,M)&&r(y,M,{configurable:!0,value:N})}},s=>{s.exports=function(u,o){return{value:u,done:o}}},(s,u,o)=>{var r=o(83),W=o(51),M=o(99);r||W(Object.prototype,"toString",M,{unsafe:!0})},(s,u,o)=>{var r=o(83),W=o(82);s.exports=r?{}.toString:function(){return"[object "+W(this)+"]"}},(s,u,o)=>{o(101)},(s,u,o)=>{o(102)("Map",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},o(120))},(s,u,o)=>{var r=o(6),W=o(7),M=o(17),y=o(71),N=o(51),X=o(103),z=o(110),Y=o(117),S=o(24),D=o(20),R=o(23),g=o(10),J=o(118),U=o(96),H=o(119);s.exports=function(C,v,K){var j=C.indexOf("Map")!==-1,O=C.indexOf("Weak")!==-1,_=j?"set":"add",cl=W[C],tl=cl&&cl.prototype,E=cl,il={},al=function(q){var ll=M(tl[q]);N(tl,q,q=="add"?function(B){return ll(this,B===0?0:B),this}:q=="delete"?function(B){return!(O&&!R(B))&&ll(this,B===0?0:B)}:q=="get"?function(B){return O&&!R(B)?void 0:ll(this,B===0?0:B)}:q=="has"?function(B){return!(O&&!R(B))&&ll(this,B===0?0:B)}:function(B,F){return ll(this,B===0?0:B,F),this})};if(y(C,!S(cl)||!(O||tl.forEach&&!g(function(){new cl().entries().next()}))))E=K.getConstructor(v,C,j,_),X.enable();else if(y(C,!0)){var Nl=new E,nl=Nl[_](O?{}:-0,1)!=Nl,Sl=g(function(){Nl.has(1)}),P=J(function(q){new cl(q)}),Q=!O&&g(function(){for(var q=new cl,ll=5;ll--;)q[_](ll,ll);return!q.has(-0)});P||((E=v(function(q,ll){Y(q,tl);var B=H(new cl,q,E);return D(ll)||z(ll,B[_],{that:B,AS_ENTRIES:j}),B})).prototype=tl,tl.constructor=E),(Sl||Q)&&(al("delete"),al("has"),j&&al("get")),(Q||nl)&&al(_),O&&tl.clear&&delete tl.clear}return il[C]=E,r({global:!0,constructor:!0,forced:E!=cl},il),U(E,C),O||K.setStrong(E,C,j),E}},(s,u,o)=>{var r=o(6),W=o(17),M=o(58),y=o(23),N=o(42),X=o(48).f,z=o(61),Y=o(104),S=o(107),D=o(44),R=o(109),g=!1,J=D("meta"),U=0,H=function(v){X(v,J,{value:{objectID:"O"+U++,weakData:{}}})},C=s.exports={enable:function(){C.enable=function(){},g=!0;var v=z.f,K=W([].splice),j={};j[J]=1,v(j).length&&(z.f=function(O){for(var _=v(O),cl=0,tl=_.length;cl<tl;cl++)if(_[cl]===J){K(_,cl,1);break}return _},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Y.f}))},fastKey:function(v,K){if(!y(v))return typeof v=="symbol"?v:(typeof v=="string"?"S":"P")+v;if(!N(v,J)){if(!S(v))return"F";if(!K)return"E";H(v)}return v[J].objectID},getWeakData:function(v,K){if(!N(v,J)){if(!S(v))return!0;if(!K)return!1;H(v)}return v[J].weakData},onFreeze:function(v){return R&&g&&S(v)&&!N(v,J)&&H(v),v}};M[J]=!0},(s,u,o)=>{var r=o(18),W=o(15),M=o(61).f,y=o(105),N=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];s.exports.f=function(X){return N&&r(X)=="Window"?function(z){try{return M(z)}catch{return y(N)}}(X):M(W(X))}},(s,u,o)=>{var r=o(64),W=o(67),M=o(106),y=Array,N=Math.max;s.exports=function(X,z,Y){for(var S=W(X),D=r(z,S),R=r(Y===void 0?S:Y,S),g=y(N(R-D,0)),J=0;D<R;D++,J++)M(g,J,X[D]);return g.length=J,g}},(s,u,o)=>{var r=o(21),W=o(48),M=o(14);s.exports=function(y,N,X){var z=r(N);z in y?W.f(y,z,M(0,X)):y[z]=X}},(s,u,o)=>{var r=o(10),W=o(23),M=o(18),y=o(108),N=Object.isExtensible,X=r(function(){});s.exports=X||y?function(z){return!!W(z)&&(!y||M(z)!="ArrayBuffer")&&(!N||N(z))}:N},(s,u,o)=>{var r=o(10);s.exports=r(function(){if(typeof ArrayBuffer=="function"){var W=new ArrayBuffer(8);Object.isExtensible(W)&&Object.defineProperty(W,"a",{value:8})}})},(s,u,o)=>{var r=o(10);s.exports=!r(function(){return Object.isExtensible(Object.preventExtensions({}))})},(s,u,o)=>{var r=o(111),W=o(11),M=o(50),y=o(35),N=o(113),X=o(67),z=o(28),Y=o(114),S=o(115),D=o(116),R=TypeError,g=function(U,H){this.stopped=U,this.result=H},J=g.prototype;s.exports=function(U,H,C){var v,K,j,O,_,cl,tl,E=C&&C.that,il=!(!C||!C.AS_ENTRIES),al=!(!C||!C.IS_RECORD),Nl=!(!C||!C.IS_ITERATOR),nl=!(!C||!C.INTERRUPTED),Sl=r(H,E),P=function(q){return v&&D(v,"normal",q),new g(!0,q)},Q=function(q){return il?(M(q),nl?Sl(q[0],q[1],P):Sl(q[0],q[1])):nl?Sl(q,P):Sl(q)};if(al)v=U.iterator;else if(Nl)v=U;else{if(!(K=S(U)))throw R(y(U)+" is not iterable");if(N(K)){for(j=0,O=X(U);O>j;j++)if((_=Q(U[j]))&&z(J,_))return _;return new g(!1)}v=Y(U,K)}for(cl=al?U.next:v.next;!(tl=W(cl,v)).done;){try{_=Q(tl.value)}catch(q){D(v,"throw",q)}if(typeof _=="object"&&_&&z(J,_))return _}return new g(!1)}},(s,u,o)=>{var r=o(112),W=o(34),M=o(12),y=r(r.bind);s.exports=function(N,X){return W(N),X===void 0?N:M?y(N,X):function(){return N.apply(X,arguments)}}},(s,u,o)=>{var r=o(18),W=o(17);s.exports=function(M){if(r(M)==="Function")return W(M)}},(s,u,o)=>{var r=o(37),W=o(92),M=r("iterator"),y=Array.prototype;s.exports=function(N){return N!==void 0&&(W.Array===N||y[M]===N)}},(s,u,o)=>{var r=o(11),W=o(34),M=o(50),y=o(35),N=o(115),X=TypeError;s.exports=function(z,Y){var S=arguments.length<2?N(z):Y;if(W(S))return M(r(S,z));throw X(y(z)+" is not iterable")}},(s,u,o)=>{var r=o(82),W=o(33),M=o(20),y=o(92),N=o(37)("iterator");s.exports=function(X){if(!M(X))return W(X,N)||W(X,"@@iterator")||y[r(X)]}},(s,u,o)=>{var r=o(11),W=o(50),M=o(33);s.exports=function(y,N,X){var z,Y;W(y);try{if(!(z=M(y,"return"))){if(N==="throw")throw X;return X}z=r(z,y)}catch(S){Y=!0,z=S}if(N==="throw")throw X;if(Y)throw z;return W(z),X}},(s,u,o)=>{var r=o(28),W=TypeError;s.exports=function(M,y){if(r(y,M))return M;throw W("Incorrect invocation")}},(s,u,o)=>{var r=o(37)("iterator"),W=!1;try{var M=0,y={next:function(){return{done:!!M++}},return:function(){W=!0}};y[r]=function(){return this},Array.from(y,function(){throw 2})}catch{}s.exports=function(N,X){if(!X&&!W)return!1;var z=!1;try{var Y={};Y[r]=function(){return{next:function(){return{done:z=!0}}}},N(Y)}catch{}return z}},(s,u,o)=>{var r=o(24),W=o(23),M=o(87);s.exports=function(y,N,X){var z,Y;return M&&r(z=N.constructor)&&z!==X&&W(Y=z.prototype)&&Y!==X.prototype&&M(y,Y),y}},(s,u,o)=>{var r=o(73),W=o(84),M=o(121),y=o(111),N=o(117),X=o(20),z=o(110),Y=o(93),S=o(97),D=o(122),R=o(9),g=o(103).fastKey,J=o(55),U=J.set,H=J.getterFor;s.exports={getConstructor:function(C,v,K,j){var O=C(function(il,al){N(il,_),U(il,{type:v,index:r(null),first:void 0,last:void 0,size:0}),R||(il.size=0),X(al)||z(al,il[j],{that:il,AS_ENTRIES:K})}),_=O.prototype,cl=H(v),tl=function(il,al,Nl){var nl,Sl,P=cl(il),Q=E(il,al);return Q?Q.value=Nl:(P.last=Q={index:Sl=g(al,!0),key:al,value:Nl,previous:nl=P.last,next:void 0,removed:!1},P.first||(P.first=Q),nl&&(nl.next=Q),R?P.size++:il.size++,Sl!=="F"&&(P.index[Sl]=Q)),il},E=function(il,al){var Nl,nl=cl(il),Sl=g(al);if(Sl!=="F")return nl.index[Sl];for(Nl=nl.first;Nl;Nl=Nl.next)if(Nl.key==al)return Nl};return M(_,{clear:function(){for(var il=cl(this),al=il.index,Nl=il.first;Nl;)Nl.removed=!0,Nl.previous&&(Nl.previous=Nl.previous.next=void 0),delete al[Nl.index],Nl=Nl.next;il.first=il.last=void 0,R?il.size=0:this.size=0},delete:function(il){var al=this,Nl=cl(al),nl=E(al,il);if(nl){var Sl=nl.next,P=nl.previous;delete Nl.index[nl.index],nl.removed=!0,P&&(P.next=Sl),Sl&&(Sl.previous=P),Nl.first==nl&&(Nl.first=Sl),Nl.last==nl&&(Nl.last=P),R?Nl.size--:al.size--}return!!nl},forEach:function(il){for(var al,Nl=cl(this),nl=y(il,arguments.length>1?arguments[1]:void 0);al=al?al.next:Nl.first;)for(nl(al.value,al.key,this);al&&al.removed;)al=al.previous},has:function(il){return!!E(this,il)}}),M(_,K?{get:function(il){var al=E(this,il);return al&&al.value},set:function(il,al){return tl(this,il===0?0:il,al)}}:{add:function(il){return tl(this,il=il===0?0:il,il)}}),R&&W(_,"size",{configurable:!0,get:function(){return cl(this).size}}),O},setStrong:function(C,v,K){var j=v+" Iterator",O=H(v),_=H(j);Y(C,v,function(cl,tl){U(this,{type:j,target:cl,state:O(cl),kind:tl,last:void 0})},function(){for(var cl=_(this),tl=cl.kind,E=cl.last;E&&E.removed;)E=E.previous;return!cl.target||!(cl.last=E=E?E.next:cl.state.first)?(cl.target=void 0,S(void 0,!0)):S(tl=="keys"?E.key:tl=="values"?E.value:[E.key,E.value],!1)},K?"entries":"values",!K,!0),D(v)}}},(s,u,o)=>{var r=o(51);s.exports=function(W,M,y){for(var N in M)r(W,N,M[N],y);return W}},(s,u,o)=>{var r=o(27),W=o(84),M=o(37),y=o(9),N=M("species");s.exports=function(X){var z=r(X);y&&z&&!z[N]&&W(z,N,{configurable:!0,get:function(){return this}})}},(s,u,o)=>{o(124)},(s,u,o)=>{o(102)("Set",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},o(120))},(s,u,o)=>{var r,W=o(39),M=o(6),y=o(7),N=o(27),X=o(17),z=o(10),Y=o(44),S=o(24),D=o(126),R=o(20),g=o(23),J=o(26),U=o(110),H=o(50),C=o(82),v=o(42),K=o(106),j=o(47),O=o(67),_=o(127),cl=o(128),tl=o(130),E=o(131),il=o(132),al=o(133),Nl=y.Object,nl=y.Array,Sl=y.Date,P=y.Error,Q=y.EvalError,q=y.RangeError,ll=y.ReferenceError,B=y.SyntaxError,F=y.TypeError,el=y.URIError,dl=y.PerformanceMark,Zl=y.WebAssembly,Wl=Zl&&Zl.CompileError||P,Gl=Zl&&Zl.LinkError||P,Il=Zl&&Zl.RuntimeError||P,xl=N("DOMException"),bl=tl.Map,Ol=tl.has,_l=tl.get,Jl=tl.set,$=E.Set,ol=E.add,hl=N("Object","keys"),pl=X([].push),zl=X((!0).valueOf),jl=X(1 .valueOf),Ul=X("".valueOf),Kl=X(Sl.prototype.getTime),le=Y("structuredClone"),Pl="DataCloneError",ee="Transferring",ql=function(fl){return!z(function(){var Ye=new y.Set([7]),ze=fl(Ye),Ie=fl(Nl(7));return ze==Ye||!ze.has(7)||typeof Ie!="object"||Ie!=7})&&fl},ie=function(fl,Ye){return!z(function(){var ze=new Ye,Ie=fl({a:ze,b:ze});return!(Ie&&Ie.a===Ie.b&&Ie.a instanceof Ye&&Ie.a.stack===ze.stack)})},ce=y.structuredClone,Ge=W||!ie(ce,P)||!ie(ce,xl)||(r=ce,!!z(function(){var fl=r(new y.AggregateError([1],le,{cause:3}));return fl.name!="AggregateError"||fl.errors[0]!=1||fl.message!=le||fl.cause!=3})),Dl=!ce&&ql(function(fl){return new dl(le,{detail:fl}).detail}),Al=ql(ce)||Dl,We=function(fl){throw new xl("Uncloneable type: "+fl,Pl)},he=function(fl,Ye){throw new xl((Ye||"Cloning")+" of "+fl+" cannot be properly polyfilled in this engine",Pl)},Ke=function(fl,Ye){return Al||he(Ye),Al(fl)},Le=function(fl,Ye){if(J(fl)&&We("Symbol"),!g(fl))return fl;if(Ye){if(Ol(Ye,fl))return _l(Ye,fl)}else Ye=new bl;var ze,Ie,be,St,Oe,Se,Zt,Cl,Ql,se,oe,te=C(fl),ae=!1;switch(te){case"Array":be=nl(O(fl)),ae=!0;break;case"Object":be={},ae=!0;break;case"Map":be=new bl,ae=!0;break;case"Set":be=new $,ae=!0;break;case"RegExp":be=new RegExp(fl.source,cl(fl));break;case"Error":switch(Ie=fl.name){case"AggregateError":be=N("AggregateError")([]);break;case"EvalError":be=Q();break;case"RangeError":be=q();break;case"ReferenceError":be=ll();break;case"SyntaxError":be=B();break;case"TypeError":be=F();break;case"URIError":be=el();break;case"CompileError":be=Wl();break;case"LinkError":be=Gl();break;case"RuntimeError":be=Il();break;default:be=P()}ae=!0;break;case"DOMException":be=new xl(fl.message,fl.name),ae=!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":ze=y[te],g(ze)||he(te),be=new ze(Le(fl.buffer,Ye),fl.byteOffset,te==="DataView"?fl.byteLength:fl.length);break;case"DOMQuad":try{be=new DOMQuad(Le(fl.p1,Ye),Le(fl.p2,Ye),Le(fl.p3,Ye),Le(fl.p4,Ye))}catch{be=Ke(fl,te)}break;case"File":if(Al)try{be=Al(fl),C(be)!==te&&(be=void 0)}catch{}if(!be)try{be=new File([fl],fl.name,fl)}catch{}be||he(te);break;case"FileList":if(St=function(){var Ve;try{Ve=new y.DataTransfer}catch{try{Ve=new y.ClipboardEvent("").clipboardData}catch{}}return Ve&&Ve.items&&Ve.files?Ve:null}()){for(Oe=0,Se=O(fl);Oe<Se;Oe++)St.items.add(Le(fl[Oe],Ye));be=St.files}else be=Ke(fl,te);break;case"ImageData":try{be=new ImageData(Le(fl.data,Ye),fl.width,fl.height,{colorSpace:fl.colorSpace})}catch{be=Ke(fl,te)}break;default:if(Al)be=Al(fl);else switch(te){case"BigInt":be=Nl(fl.valueOf());break;case"Boolean":be=Nl(zl(fl));break;case"Number":be=Nl(jl(fl));break;case"String":be=Nl(Ul(fl));break;case"Date":be=new Sl(Kl(fl));break;case"ArrayBuffer":(ze=y.DataView)||typeof fl.slice=="function"||he(te);try{if(typeof fl.slice!="function"||fl.resizable)for(Se=fl.byteLength,oe=("maxByteLength"in fl)?{maxByteLength:fl.maxByteLength}:void 0,be=new ArrayBuffer(Se,oe),Ql=new ze(fl),se=new ze(be),Oe=0;Oe<Se;Oe++)se.setUint8(Oe,Ql.getUint8(Oe));else be=fl.slice(0)}catch{throw new xl("ArrayBuffer is detached",Pl)}break;case"SharedArrayBuffer":be=fl;break;case"Blob":try{be=fl.slice(0,fl.size,fl.type)}catch{he(te)}break;case"DOMPoint":case"DOMPointReadOnly":ze=y[te];try{be=ze.fromPoint?ze.fromPoint(fl):new ze(fl.x,fl.y,fl.z,fl.w)}catch{he(te)}break;case"DOMRect":case"DOMRectReadOnly":ze=y[te];try{be=ze.fromRect?ze.fromRect(fl):new ze(fl.x,fl.y,fl.width,fl.height)}catch{he(te)}break;case"DOMMatrix":case"DOMMatrixReadOnly":ze=y[te];try{be=ze.fromMatrix?ze.fromMatrix(fl):new ze(fl)}catch{he(te)}break;case"AudioData":case"VideoFrame":S(fl.clone)||he(te);try{be=fl.clone()}catch{We(te)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":he(te);default:We(te)}}if(Jl(Ye,fl,be),ae)switch(te){case"Array":case"Object":for(Zt=hl(fl),Oe=0,Se=O(Zt);Oe<Se;Oe++)Cl=Zt[Oe],K(be,Cl,Le(fl[Cl],Ye));break;case"Map":fl.forEach(function(Ve,we){Jl(be,Le(we,Ye),Le(Ve,Ye))});break;case"Set":fl.forEach(function(Ve){ol(be,Le(Ve,Ye))});break;case"Error":j(be,"message",Le(fl.message,Ye)),v(fl,"cause")&&j(be,"cause",Le(fl.cause,Ye)),Ie=="AggregateError"&&(be.errors=Le(fl.errors,Ye));case"DOMException":il&&j(be,"stack",Le(fl.stack,Ye))}return be};M({global:!0,enumerable:!0,sham:!al,forced:Ge},{structuredClone:function(fl){var Ye,ze=_(arguments.length,1)>1&&!R(arguments[1])?H(arguments[1]):void 0,Ie=ze?ze.transfer:void 0;return Ie!==void 0&&function(be,St){if(!g(be))throw F("Transfer option cannot be converted to a sequence");var Oe=[];U(be,function(Ve){pl(Oe,H(Ve))});var Se,Zt,Cl,Ql,se,oe,te=0,ae=O(Oe);if(al)for(Ql=ce(Oe,{transfer:Oe});te<ae;)Jl(St,Oe[te],Ql[te++]);else for(;te<ae;){if(Se=Oe[te++],Ol(St,Se))throw new xl("Duplicate transferable",Pl);switch(Zt=C(Se)){case"ImageBitmap":Cl=y.OffscreenCanvas,D(Cl)||he(Zt,ee);try{(oe=new Cl(Se.width,Se.height)).getContext("bitmaprenderer").transferFromImageBitmap(Se),se=oe.transferToImageBitmap()}catch{}break;case"AudioData":case"VideoFrame":S(Se.clone)&&S(Se.close)||he(Zt,ee);try{se=Se.clone(),Se.close()}catch{}break;case"ArrayBuffer":S(Se.transfer)||he(Zt,ee),se=Se.transfer();break;case"MediaSourceHandle":case"MessagePort":case"OffscreenCanvas":case"ReadableStream":case"TransformStream":case"WritableStream":he(Zt,ee)}if(se===void 0)throw new xl("This object cannot be transferred: "+Zt,Pl);Jl(St,Se,se)}}(Ie,Ye=new bl),Le(fl,Ye)}})},(s,u,o)=>{var r=o(17),W=o(10),M=o(24),y=o(82),N=o(27),X=o(54),z=function(){},Y=[],S=N("Reflect","construct"),D=/^\s*(?:class|function)\b/,R=r(D.exec),g=!D.exec(z),J=function(H){if(!M(H))return!1;try{return S(z,Y,H),!0}catch{return!1}},U=function(H){if(!M(H))return!1;switch(y(H)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return g||!!R(D,X(H))}catch{return!0}};U.sham=!0,s.exports=!S||W(function(){var H;return J(J.call)||!J(Object)||!J(function(){H=!0})||H})?U:J},s=>{var u=TypeError;s.exports=function(o,r){if(o<r)throw u("Not enough arguments");return o}},(s,u,o)=>{var r=o(11),W=o(42),M=o(28),y=o(129),N=RegExp.prototype;s.exports=function(X){var z=X.flags;return z!==void 0||"flags"in N||W(X,"flags")||!M(N,X)?z:r(y,X)}},(s,u,o)=>{var r=o(50);s.exports=function(){var W=r(this),M="";return W.hasIndices&&(M+="d"),W.global&&(M+="g"),W.ignoreCase&&(M+="i"),W.multiline&&(M+="m"),W.dotAll&&(M+="s"),W.unicode&&(M+="u"),W.unicodeSets&&(M+="v"),W.sticky&&(M+="y"),M}},(s,u,o)=>{var r=o(17),W=Map.prototype;s.exports={Map,set:r(W.set),get:r(W.get),has:r(W.has),remove:r(W.delete),proto:W}},(s,u,o)=>{var r=o(17),W=Set.prototype;s.exports={Set,add:r(W.add),has:r(W.has),remove:r(W.delete),proto:W}},(s,u,o)=>{var r=o(10),W=o(14);s.exports=!r(function(){var M=Error("a");return"stack"in M?(Object.defineProperty(M,"stack",W(1,7)),M.stack!==7):!0})},(s,u,o)=>{var r=o(7),W=o(10),M=o(31),y=o(134),N=o(135),X=o(136),z=r.structuredClone;s.exports=!!z&&!W(function(){if(N&&M>92||X&&M>94||y&&M>97)return!1;var Y=new ArrayBuffer(8),S=z(Y,{transfer:[Y]});return Y.byteLength!=0||S.byteLength!=8})},(s,u,o)=>{var r=o(135),W=o(136);s.exports=!r&&!W&&typeof window=="object"&&typeof document=="object"},s=>{s.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},(s,u,o)=>{var r=o(18);s.exports=typeof process<"u"&&r(process)=="process"},(s,u,o)=>{var r=o(7);s.exports=r},(__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:u,NodeFilterFactory:o,NodeStandardFontDataFactory:r}=__w_pdfjs_require__(155);exports.DefaultCanvasFactory=DefaultCanvasFactory=s,exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory=u,exports.DefaultFilterFactory=DefaultFilterFactory=o,exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory=r}if(_is_node.isNodeJS){const{PDFNodeStream:s}=__w_pdfjs_require__(156);createPDFNetworkStream=u=>new s(u)}else{const{PDFNetworkStream:s}=__w_pdfjs_require__(159),{PDFFetchStream:u}=__w_pdfjs_require__(160);createPDFNetworkStream=o=>(0,_display_utils.isValidFetchUrl)(o.url)?new u(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 u=new PDFDocumentLoadingTask,{docId:o}=u,r=s.url?getUrlProp(s.url):null,W=s.data?getDataProp(s.data):null,M=s.httpHeaders||null,y=s.withCredentials===!0,N=s.password??null,X=s.range instanceof PDFDataRangeTransport?s.range:null,z=Number.isInteger(s.rangeChunkSize)&&s.rangeChunkSize>0?s.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let Y=s.worker instanceof PDFWorker?s.worker:null;const S=s.verbosity,D=typeof s.docBaseUrl!="string"||(0,_display_utils.isDataScheme)(s.docBaseUrl)?null:s.docBaseUrl,R=typeof s.cMapUrl=="string"?s.cMapUrl:null,g=s.cMapPacked!==!1,J=s.CMapReaderFactory||DefaultCMapReaderFactory,U=typeof s.standardFontDataUrl=="string"?s.standardFontDataUrl:null,H=s.StandardFontDataFactory||DefaultStandardFontDataFactory,C=s.stopAtErrors!==!0,v=Number.isInteger(s.maxImageSize)&&s.maxImageSize>-1?s.maxImageSize:-1,K=s.isEvalSupported!==!1,j=typeof s.isOffscreenCanvasSupported=="boolean"?s.isOffscreenCanvasSupported:!_is_node.isNodeJS,O=Number.isInteger(s.canvasMaxAreaInBytes)?s.canvasMaxAreaInBytes:-1,_=typeof s.disableFontFace=="boolean"?s.disableFontFace:_is_node.isNodeJS,cl=s.fontExtraProperties===!0,tl=s.enableXfa===!0,E=s.ownerDocument||globalThis.document,il=s.disableRange===!0,al=s.disableStream===!0,Nl=s.disableAutoFetch===!0,nl=s.pdfBug===!0,Sl=X?X.length:s.length??NaN,P=typeof s.useSystemFonts=="boolean"?s.useSystemFonts:!_is_node.isNodeJS&&!_,Q=typeof s.useWorkerFetch=="boolean"?s.useWorkerFetch:J===_display_utils.DOMCMapReaderFactory&&H===_display_utils.DOMStandardFontDataFactory&&(0,_display_utils.isValidFetchUrl)(R,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(U,document.baseURI),q=s.canvasFactory||new DefaultCanvasFactory({ownerDocument:E}),ll=s.filterFactory||new DefaultFilterFactory({docId:o,ownerDocument:E});(0,_util.setVerbosityLevel)(S);const B={canvasFactory:q,filterFactory:ll};if(Q||(B.cMapReaderFactory=new J({baseUrl:R,isCompressed:g}),B.standardFontDataFactory=new H({baseUrl:U})),!Y){const dl={verbosity:S,port:_worker_options.GlobalWorkerOptions.workerPort};Y=dl.port?PDFWorker.fromPort(dl):new PDFWorker(dl),u._worker=Y}const F={docId:o,apiVersion:"3.7.107",data:W,password:N,disableAutoFetch:Nl,rangeChunkSize:z,length:Sl,docBaseUrl:D,enableXfa:tl,evaluatorOptions:{maxImageSize:v,disableFontFace:_,ignoreErrors:C,isEvalSupported:K,isOffscreenCanvasSupported:j,canvasMaxAreaInBytes:O,fontExtraProperties:cl,useSystemFonts:P,cMapUrl:Q?R:null,standardFontDataUrl:Q?U:null}},el={ignoreErrors:C,isEvalSupported:K,disableFontFace:_,fontExtraProperties:cl,enableXfa:tl,ownerDocument:E,disableAutoFetch:Nl,pdfBug:nl,styleElement:null};return Y.promise.then(function(){if(u.destroyed)throw new Error("Loading aborted");const dl=_fetchDocument(Y,F),Zl=new Promise(function(Wl){let Gl;X?Gl=new _transport_stream.PDFDataTransportStream({length:Sl,initialData:X.initialData,progressiveDone:X.progressiveDone,contentDispositionFilename:X.contentDispositionFilename,disableRange:il,disableStream:al},X):W||(Gl=createPDFNetworkStream({url:r,length:Sl,httpHeaders:M,withCredentials:y,rangeChunkSize:z,disableRange:il,disableStream:al})),Wl(Gl)});return Promise.all([dl,Zl]).then(function(Wl){let[Gl,Il]=Wl;if(u.destroyed)throw new Error("Loading aborted");const xl=new _message_handler.MessageHandler(o,Gl,Y.port),bl=new WorkerTransport(xl,u,Il,el,B);u._transport=bl,xl.send("Ready",null)})}).catch(u._capability.reject),u}async function _fetchDocument(s,u){if(s.destroyed)throw new Error("Worker was destroyed");const o=await s.messageHandler.sendWithPromise("GetDocRequest",u,u.data?[u.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(u,o){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],W=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;this.length=u,this.initialData=o,this.progressiveDone=r,this.contentDispositionFilename=W,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=new _util.PromiseCapability}addRangeListener(u){this._rangeListeners.push(u)}addProgressListener(u){this._progressListeners.push(u)}addProgressiveReadListener(u){this._progressiveReadListeners.push(u)}addProgressiveDoneListener(u){this._progressiveDoneListeners.push(u)}onDataRange(u,o){for(const r of this._rangeListeners)r(u,o)}onDataProgress(u,o){this._readyCapability.promise.then(()=>{for(const r of this._progressListeners)r(u,o)})}onDataProgressiveRead(u){this._readyCapability.promise.then(()=>{for(const o of this._progressiveReadListeners)o(u)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const u of this._progressiveDoneListeners)u()})}transportReady(){this._readyCapability.resolve()}requestDataRange(u,o){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(u,o){this._pdfInfo=u,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(u){return this._transport.getPage(u)}getPageIndex(u){return this._transport.getPageIndex(u)}getDestinations(){return this._transport.getDestinations()}getDestination(u){return this._transport.getDestination(u)}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 u=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return this._transport.startCleanup(u||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(u,o,r){et(this,a),et(this,w),et(this,t,null),et(this,e,!1);let W=arguments.length>3&&arguments[3]!==void 0&&arguments[3];this._pageIndex=u,this._pageInfo=o,this._transport=r,this._stats=W?new _display_utils.StatTimer:null,this._pdfBug=W,this.commonObjs=r.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:u,rotation:o=this.rotate,offsetX:r=0,offsetY:W=0,dontFlip:M=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new _display_utils.PageViewport({viewBox:this.view,scale:u,rotation:o,offsetX:r,offsetY:W,dontFlip:M})}getAnnotations(){let{intent:u="display"}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const o=this._transport.getRenderingIntent(u);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 u;return((u=this._transport._htmlForXfa)===null||u===void 0?void 0:u.children[this._pageIndex])||null}render(u){var o,r;let{canvasContext:W,viewport:M,intent:y="display",annotationMode:N=_util.AnnotationMode.ENABLE,transform:X=null,background:z=null,optionalContentConfigPromise:Y=null,annotationCanvasMap:S=null,pageColors:D=null,printAnnotationStorage:R=null}=u;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.");(r=this._stats)===null||r===void 0||r.time("Overall");const g=this._transport.getRenderingIntent(y,N,R);ut(this,e,!1),nt(this,w,pe).call(this),Y||(Y=this._transport.getOptionalContentConfig());let J=this._intentStates.get(g.cacheKey);J||(J=Object.create(null),this._intentStates.set(g.cacheKey,J)),J.streamReaderCancelTimeout&&(clearTimeout(J.streamReaderCancelTimeout),J.streamReaderCancelTimeout=null);const U=!!(g.renderingIntent&_util.RenderingIntentFlag.PRINT);if(!J.displayReadyCapability){var H;J.displayReadyCapability=new _util.PromiseCapability,J.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(H=this._stats)===null||H===void 0||H.time("Page Request"),this._pumpOperatorList(g)}const C=j=>{var O,_;J.renderTasks.delete(v),(this._maybeCleanupAfterRender||U)&&ut(this,e,!0),nt(this,a,re).call(this,!U),j?(v.capability.reject(j),this._abortOperatorList({intentState:J,reason:j instanceof Error?j:new Error(j)})):v.capability.resolve(),(O=this._stats)===null||O===void 0||O.timeEnd("Rendering"),(_=this._stats)===null||_===void 0||_.timeEnd("Overall")},v=new InternalRenderTask({callback:C,params:{canvasContext:W,viewport:M,transform:X,background:z},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:S,operatorList:J.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!U,pdfBug:this._pdfBug,pageColors:D});(J.renderTasks||(J.renderTasks=new Set)).add(v);const K=v.task;return Promise.all([J.displayReadyCapability.promise,Y]).then(j=>{var O;let[_,cl]=j;T(this,e)?C():((O=this._stats)===null||O===void 0||O.time("Rendering"),v.initializeGraphics({transparency:_,optionalContentConfig:cl}),v.operatorListChanged())}).catch(C),K}getOperatorList(){let{intent:u="display",annotationMode:o=_util.AnnotationMode.ENABLE,printAnnotationStorage:r=null}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const W=this._transport.getRenderingIntent(u,o,r,!0);let M,y=this._intentStates.get(W.cacheKey);if(y||(y=Object.create(null),this._intentStates.set(W.cacheKey,y)),!y.opListReadCapability){var N;M=Object.create(null),M.operatorListChanged=function(){y.operatorList.lastChunk&&(y.opListReadCapability.resolve(y.operatorList),y.renderTasks.delete(M))},y.opListReadCapability=new _util.PromiseCapability,(y.renderTasks||(y.renderTasks=new Set)).add(M),y.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(N=this._stats)===null||N===void 0||N.time("Page Request"),this._pumpOperatorList(W)}return y.opListReadCapability.promise}streamTextContent(){let{includeMarkedContent:u=!1,disableNormalization:o=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:u===!0,disableNormalization:o===!0},{highWaterMark:100,size:r=>r.items.length})}getTextContent(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then(r=>_xfa_text.XfaText.textContent(r));const o=this.streamTextContent(u);return new Promise(function(r,W){const M=o.getReader(),y={items:[],styles:Object.create(null)};(function N(){M.read().then(function(X){let{value:z,done:Y}=X;Y?r(y):(Object.assign(y.styles,z.styles),y.items.push(...z.items),N())},W)})()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const u=[];for(const o of this._intentStates.values())if(this._abortOperatorList({intentState:o,reason:new Error("Page was destroyed."),force:!0}),!o.opListReadCapability)for(const r of o.renderTasks)u.push(r.completed),r.cancel();return this.objs.clear(),ut(this,e,!1),nt(this,w,pe).call(this),Promise.all(u)}cleanup(){let u=arguments.length>0&&arguments[0]!==void 0&&arguments[0];ut(this,e,!0);const o=nt(this,a,re).call(this,!1);return u&&o&&this._stats&&(this._stats=new _display_utils.StatTimer),o}_startRenderPage(u,o){var r,W;const M=this._intentStates.get(o);M&&((r=this._stats)===null||r===void 0||r.timeEnd("Page Request"),(W=M.displayReadyCapability)===null||W===void 0||W.resolve(u))}_renderPageChunk(u,o){for(let r=0,W=u.length;r<W;r++)o.operatorList.fnArray.push(u.fnArray[r]),o.operatorList.argsArray.push(u.argsArray[r]);o.operatorList.lastChunk=u.lastChunk,o.operatorList.separateAnnots=u.separateAnnots;for(const r of o.renderTasks)r.operatorListChanged();u.lastChunk&&nt(this,a,re).call(this,!0)}_pumpOperatorList(u){let{renderingIntent:o,cacheKey:r,annotationStorageMap:W}=u;const M=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:o,cacheKey:r,annotationStorage:W}).getReader(),y=this._intentStates.get(r);y.streamReader=M;const N=()=>{M.read().then(X=>{let{value:z,done:Y}=X;Y?y.streamReader=null:this._transport.destroyed||(this._renderPageChunk(z,y),N())},X=>{if(y.streamReader=null,!this._transport.destroyed){if(y.operatorList){y.operatorList.lastChunk=!0;for(const z of y.renderTasks)z.operatorListChanged();nt(this,a,re).call(this,!0)}if(y.displayReadyCapability)y.displayReadyCapability.reject(X);else{if(!y.opListReadCapability)throw X;y.opListReadCapability.reject(X)}}})};N()}_abortOperatorList(u){let{intentState:o,reason:r,force:W=!1}=u;if(o.streamReader){if(o.streamReaderCancelTimeout&&(clearTimeout(o.streamReaderCancelTimeout),o.streamReaderCancelTimeout=null),!W){if(o.renderTasks.size>0)return;if(r instanceof _display_utils.RenderingCancelledException){let M=RENDERING_CANCELLED_TIMEOUT;r.extraDelay>0&&r.extraDelay<1e3&&(M+=r.extraDelay),o.streamReaderCancelTimeout=setTimeout(()=>{o.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:o,reason:r,force:!0})},M);return}}if(o.streamReader.cancel(new _util.AbortException(r.message)).catch(()=>{}),o.streamReader=null,!this._transport.destroyed){for(const[M,y]of this._intentStates)if(y===o){this._intentStates.delete(M);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:u,operatorList:o}of this._intentStates.values())if(u.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(u,o){const r={data:structuredClone(u,null)};T(this,h).then(()=>{for(const W of T(this,p))W.call(this,r)})}addEventListener(u,o){T(this,p).add(o)}removeEventListener(u,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,u){let o;try{if(o=new URL(s),!o.origin||o.origin==="null")return!1}catch{return!1}const r=new URL(u,o);return o.origin===r.origin},PDFWorkerUtil.createCDNWrapper=function(s){const u=`importScripts("${s}");`;return URL.createObjectURL(new Blob([u]))};const _PDFWorker=class{constructor(){let{name:s=null,port:u=null,verbosity:o=(0,_util.getVerbosityLevel)()}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(u&&T(_PDFWorker,l).has(u))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,u?(T(_PDFWorker,l).set(u,this),this._initializeFromPort(u)):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 u=new Worker(s),o=new _message_handler.MessageHandler("main","worker",u),r=()=>{u.removeEventListener("error",W),o.destroy(),u.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},W=()=>{this._webWorker||r()};u.addEventListener("error",W),o.on("test",y=>{u.removeEventListener("error",W),this.destroyed?r():y?(this._messageHandler=o,this._port=u,this._webWorker=u,this._readyCapability.resolve(),o.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),o.destroy(),u.terminate())}),o.on("ready",y=>{if(u.removeEventListener("error",W),this.destroyed)r();else try{M()}catch{this._setupFakeWorker()}});const M=()=>{const y=new Uint8Array;o.send("test",y,[y.buffer])};M();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 u=new LoopbackPort;this._port=u;const o="fake"+PDFWorkerUtil.fakeWorkerId++,r=new _message_handler.MessageHandler(o+"_worker",o,u);s.setup(r,u);const W=new _message_handler.MessageHandler(o,o+"_worker",u);this._messageHandler=W,this._readyCapability.resolve(),W.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(u,o,r,W,M){et(this,m),et(this,c,new Map),et(this,b,new Map),et(this,L,new Map),this.messageHandler=u,this.loadingTask=o,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({ownerDocument:W.ownerDocument,styleElement:W.styleElement}),this._params=W,this.canvasFactory=M.canvasFactory,this.filterFactory=M.filterFactory,this.cMapReaderFactory=M.cMapReaderFactory,this.standardFontDataFactory=M.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=r,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(u){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_util.AnnotationMode.ENABLE,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,W=arguments.length>3&&arguments[3]!==void 0&&arguments[3],M=_util.RenderingIntentFlag.DISPLAY,y=null;switch(u){case"any":M=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":M=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${u}`)}switch(o){case _util.AnnotationMode.DISABLE:M+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:M+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:M+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,y=(M&_util.RenderingIntentFlag.PRINT&&r instanceof _annotation_storage.PrintAnnotationStorage?r:this.annotationStorage).serializable;break;default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${o}`)}return W&&(M+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:M,cacheKey:`${M}_${_annotation_storage.AnnotationStorage.getHash(y)}`,annotationStorageMap:y}}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 u=[];for(const r of T(this,b).values())u.push(r._destroy());T(this,b).clear(),T(this,L).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const o=this.messageHandler.sendWithPromise("Terminate",null);return u.push(o),Promise.all(u).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:u,loadingTask:o}=this;u.on("GetReader",(r,W)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=M=>{this._lastProgress={loaded:M.loaded,total:M.total}},W.onPull=()=>{this._fullReader.read().then(function(M){let{value:y,done:N}=M;N?W.close():((0,_util.assert)(y instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),W.enqueue(new Uint8Array(y),1,[y]))}).catch(M=>{W.error(M)})},W.onCancel=M=>{this._fullReader.cancel(M),W.ready.catch(y=>{if(!this.destroyed)throw y})}}),u.on("ReaderHeadersReady",r=>{const W=new _util.PromiseCapability,M=this._fullReader;return M.headersReady.then(()=>{if(!M.isStreamingSupported||!M.isRangeSupported){if(this._lastProgress){var y;(y=o.onProgress)===null||y===void 0||y.call(o,this._lastProgress)}M.onProgress=N=>{var X;(X=o.onProgress)===null||X===void 0||X.call(o,{loaded:N.loaded,total:N.total})}}W.resolve({isStreamingSupported:M.isStreamingSupported,isRangeSupported:M.isRangeSupported,contentLength:M.contentLength})},W.reject),W.promise}),u.on("GetRangeReader",(r,W)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const M=this._networkStream.getRangeReader(r.begin,r.end);M?(W.onPull=()=>{M.read().then(function(y){let{value:N,done:X}=y;X?W.close():((0,_util.assert)(N instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),W.enqueue(new Uint8Array(N),1,[N]))}).catch(y=>{W.error(y)})},W.onCancel=y=>{M.cancel(y),W.ready.catch(N=>{if(!this.destroyed)throw N})}):W.close()}),u.on("GetDoc",r=>{let{pdfInfo:W}=r;this._numPages=W.numPages,this._htmlForXfa=W.htmlForXfa,delete W.htmlForXfa,o._capability.resolve(new PDFDocumentProxy(W,this))}),u.on("DocException",function(r){let W;switch(r.name){case"PasswordException":W=new _util.PasswordException(r.message,r.code);break;case"InvalidPDFException":W=new _util.InvalidPDFException(r.message);break;case"MissingPDFException":W=new _util.MissingPDFException(r.message);break;case"UnexpectedResponseException":W=new _util.UnexpectedResponseException(r.message,r.status);break;case"UnknownErrorException":W=new _util.UnknownErrorException(r.message,r.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}o._capability.reject(W)}),u.on("PasswordRequest",r=>{if(this._passwordCapability=new _util.PromiseCapability,o.onPassword){const W=M=>{M instanceof Error?this._passwordCapability.reject(M):this._passwordCapability.resolve({password:M})};try{o.onPassword(W,r.code)}catch(M){this._passwordCapability.reject(M)}}else this._passwordCapability.reject(new _util.PasswordException(r.message,r.code));return this._passwordCapability.promise}),u.on("DataLoaded",r=>{var W;(W=o.onProgress)===null||W===void 0||W.call(o,{loaded:r.length,total:r.length}),this.downloadInfoCapability.resolve(r)}),u.on("StartRenderPage",r=>{this.destroyed||T(this,b).get(r.pageIndex)._startRenderPage(r.transparency,r.cacheKey)}),u.on("commonobj",r=>{var W;let[M,y,N]=r;if(!this.destroyed&&!this.commonObjs.has(M))switch(y){case"Font":const X=this._params;if("error"in N){const S=N.error;(0,_util.warn)(`Error during font loading: ${S}`),this.commonObjs.resolve(M,S);break}const z=X.pdfBug&&(W=globalThis.FontInspector)!==null&&W!==void 0&&W.enabled?(S,D)=>globalThis.FontInspector.fontAdded(S,D):null,Y=new _font_loader.FontFaceObject(N,{isEvalSupported:X.isEvalSupported,disableFontFace:X.disableFontFace,ignoreErrors:X.ignoreErrors,inspectFont:z});this.fontLoader.bind(Y).catch(S=>u.sendWithPromise("FontFallback",{id:M})).finally(()=>{!X.fontExtraProperties&&Y.data&&(Y.data=null),this.commonObjs.resolve(M,Y)});break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(M,N);break;default:throw new Error(`Got unknown common object type ${y}`)}}),u.on("obj",r=>{let[W,M,y,N]=r;if(this.destroyed)return;const X=T(this,b).get(M);if(!X.objs.has(W))switch(y){case"Image":if(X.objs.resolve(W,N),N){let Y;if(N.bitmap){const{width:S,height:D}=N;Y=S*D*4}else{var z;Y=((z=N.data)===null||z===void 0?void 0:z.length)||0}Y>_util.MAX_IMAGE_SIZE_TO_CACHE&&(X._maybeCleanupAfterRender=!0)}break;case"Pattern":X.objs.resolve(W,N);break;default:throw new Error(`Got unknown object type ${y}`)}}),u.on("DocProgress",r=>{var W;this.destroyed||(W=o.onProgress)===null||W===void 0||W.call(o,{loaded:r.loaded,total:r.total})}),u.on("FetchBuiltInCMap",r=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(r):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),u.on("FetchStandardFontData",r=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(r):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var u;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:((u=this._fullReader)===null||u===void 0?void 0:u.filename)??null}).finally(()=>{this.annotationStorage.resetModified()})}getPage(u){if(!Number.isInteger(u)||u<=0||u>this._numPages)return Promise.reject(new Error("Invalid page request."));const o=u-1,r=T(this,L).get(o);if(r)return r;const W=this.messageHandler.sendWithPromise("GetPage",{pageIndex:o}).then(M=>{if(this.destroyed)throw new Error("Transport destroyed");const y=new PDFPageProxy(o,M,this,this._params.pdfBug);return T(this,b).set(o,y),y});return T(this,L).set(o,W),W}getPageIndex(u){return typeof u!="object"||u===null||!Number.isInteger(u.num)||u.num<0||!Number.isInteger(u.gen)||u.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:u.num,gen:u.gen})}getAnnotations(u,o){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:u,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(u){return typeof u!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:u})}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(u){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:u})}getStructTree(u){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:u})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(u=>new _optional_content_config.OptionalContentConfig(u))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const u="GetMetadata",o=T(this,c).get(u);if(o)return o;const r=this.messageHandler.sendWithPromise(u,null).then(W=>{var M,y;return{info:W[0],metadata:W[1]?new _metadata.Metadata(W[1]):null,contentDispositionFilename:((M=this._fullReader)===null||M===void 0?void 0:M.filename)??null,contentLength:((y=this._fullReader)===null||y===void 0?void 0:y.contentLength)??null}});return T(this,c).set(u,r),r}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(){let u=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(),u||this.fontLoader.clear(),T(this,c).clear(),this.filterFactory.destroy(!0)}}get loadingParams(){const{disableAutoFetch:u,enableXfa:o}=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:u,enableXfa:o})}}c=new WeakMap,b=new WeakMap,L=new WeakMap,m=new WeakSet,Ae=function(s){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const o=T(this,c).get(s);if(o)return o;const r=this.messageHandler.sendWithPromise(s,u);return T(this,c).set(s,r),r};class PDFObjects{constructor(){et(this,I),et(this,x,Object.create(null))}get(u){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(o){const W=nt(this,I,_e).call(this,u);return W.capability.promise.then(()=>o(W.data)),null}const r=T(this,x)[u];if(r==null||!r.capability.settled)throw new Error(`Requesting object that isn't resolved yet ${u}.`);return r.data}has(u){const o=T(this,x)[u];return(o==null?void 0:o.capability.settled)||!1}resolve(u){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const r=nt(this,I,_e).call(this,u);r.data=o,r.capability.resolve()}clear(){for(const o in T(this,x)){var u;const{data:r}=T(this,x)[o];r==null||(u=r.bitmap)===null||u===void 0||u.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(u){et(this,i,null),ut(this,i,u),this.onContinue=null}get promise(){return T(this,i).capability.promise}cancel(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;T(this,i).cancel(null,u)}get separateAnnots(){const{separateAnnots:u}=T(this,i).operatorList;if(!u)return!1;const{annotationCanvasMap:o}=T(this,i);return u.form||u.canvas&&(o==null?void 0:o.size)>0}}i=new WeakMap,exports.RenderTask=RenderTask;const n=class{constructor(s){let{callback:u,params:o,objs:r,commonObjs:W,annotationCanvasMap:M,operatorList:y,pageIndex:N,canvasFactory:X,filterFactory:z,useRequestAnimationFrame:Y=!1,pdfBug:S=!1,pageColors:D=null}=s;this.callback=u,this.params=o,this.objs=r,this.commonObjs=W,this.annotationCanvasMap=M,this.operatorListIdx=null,this.operatorList=y,this._pageIndex=N,this.canvasFactory=X,this.filterFactory=z,this._pdfBug=S,this.pageColors=D,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=Y===!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 u,o;let{transparency:r=!1,optionalContentConfig:W}=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&&(u=globalThis.StepperManager)!==null&&u!==void 0&&u.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:M,viewport:y,transform:N,background:X}=this.params;this.gfx=new _canvas.CanvasGraphics(M,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:W},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:N,viewport:y,transparency:r,background:X}),this.operatorListIdx=0,this.graphicsReady=!0,(o=this.graphicsReadyCallback)===null||o===void 0||o.call(this)}cancel(){var s;let u=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(u||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,u,o)=>{var r,W,M,y,N;Object.defineProperty(u,"__esModule",{value:!0}),u.PrintAnnotationStorage=u.AnnotationStorage=void 0;var X=o(1),z=o(140),Y=o(144);class S{constructor(){et(this,M),et(this,r,!1),et(this,W,new Map),this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(g,J){const U=T(this,W).get(g);return U===void 0?J:Object.assign(J,U)}getRawValue(g){return T(this,W).get(g)}remove(g){if(T(this,W).delete(g),T(this,W).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const J of T(this,W).values())if(J instanceof z.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(g,J){const U=T(this,W).get(g);let H=!1;if(U!==void 0)for(const[C,v]of Object.entries(J))U[C]!==v&&(H=!0,U[C]=v);else H=!0,T(this,W).set(g,J);H&&nt(this,M,y).call(this),J instanceof z.AnnotationEditor&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(J.constructor._type)}has(g){return T(this,W).has(g)}getAll(){return T(this,W).size>0?(0,X.objectFromMap)(T(this,W)):null}setAll(g){for(const[J,U]of Object.entries(g))this.setValue(J,U)}get size(){return T(this,W).size}resetModified(){T(this,r)&&(ut(this,r,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new D(this)}get serializable(){if(T(this,W).size===0)return null;const g=new Map;for(const[J,U]of T(this,W)){const H=U instanceof z.AnnotationEditor?U.serialize():U;H&&g.set(J,H)}return g}static getHash(g){if(!g)return"";const J=new Y.MurmurHash3_64;for(const[U,H]of g)J.update(`${U}:${JSON.stringify(H)}`);return J.hexdigest()}}r=new WeakMap,W=new WeakMap,M=new WeakSet,y=function(){T(this,r)||(ut(this,r,!0),typeof this.onSetModified=="function"&&this.onSetModified())},u.AnnotationStorage=S;class D extends S{constructor(g){super(),et(this,N,null),ut(this,N,structuredClone(g.serializable))}get print(){(0,X.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return T(this,N)}}N=new WeakMap,u.PrintAnnotationStorage=D},(s,u,o)=>{var r,W,M,y,N,X;Object.defineProperty(u,"__esModule",{value:!0}),u.AnnotationEditor=void 0;var z=o(141),Y=o(1);const S=class{constructor(R){et(this,r,this.focusin.bind(this)),et(this,W,this.focusout.bind(this)),et(this,M,!1),et(this,y,!1),et(this,N,!1),It(this,"_uiManager",null),et(this,X,S._zIndex++),this.constructor===S&&(0,Y.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:g,rawDims:{pageWidth:J,pageHeight:U,pageX:H,pageY:C}}=this.parent.viewport;this.rotation=g,this.pageRotation=(360+g-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[J,U],this.pageTranslation=[H,C];const[v,K]=this.parentDimensions;this.x=R.x/v,this.y=R.y/K,this.isAttachedToDOM=!1}static get _defaultLineColor(){return(0,Y.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,M)?ut(this,M,!1):this.parent.setSelected(this)}focusout(R){var g;if(!this.isAttachedToDOM)return;const J=R.relatedTarget;(J==null||!J.closest(`#${this.id}`))&&(R.preventDefault(),(g=this.parent)!==null&&g!==void 0&&g.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}dragstart(R){const g=this.parent.div.getBoundingClientRect();this.startX=R.clientX-g.x,this.startY=R.clientY-g.y,R.dataTransfer.setData("text/plain",this.id),R.dataTransfer.effectAllowed="move"}setAt(R,g,J,U){const[H,C]=this.parentDimensions;[J,U]=this.screenToPageTranslation(J,U),this.x=(R+J)/H,this.y=(g+U)/C,this.div.style.left=100*this.x+"%",this.div.style.top=100*this.y+"%"}translate(R,g){const[J,U]=this.parentDimensions;[R,g]=this.screenToPageTranslation(R,g),this.x+=R/J,this.y+=g/U,this.div.style.left=100*this.x+"%",this.div.style.top=100*this.y+"%"}screenToPageTranslation(R,g){switch(this.parentRotation){case 90:return[g,-R];case 180:return[-R,-g];case 270:return[-g,R];default:return[R,g]}}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,[g,J]=this.pageDimensions;return[g*R,J*R]}setDims(R,g){const[J,U]=this.parentDimensions;this.div.style.width=100*R/J+"%",this.div.style.height=100*g/U+"%"}fixDims(){const{style:R}=this.div,{height:g,width:J}=R,U=J.endsWith("%"),H=g.endsWith("%");if(U&&H)return;const[C,v]=this.parentDimensions;U||(R.width=100*parseFloat(J)/C+"%"),H||(R.height=100*parseFloat(g)/v+"%")}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,r)),this.div.addEventListener("focusout",T(this,W));const[R,g]=this.getInitialTranslation();return this.translate(R,g),(0,z.bindEvents)(this,this.div,["dragstart","pointerdown"]),this.div}pointerdown(R){const{isMac:g}=Y.FeatureTest.platform;R.button!==0||R.ctrlKey&&g?R.preventDefault():(R.ctrlKey&&!g||R.shiftKey||R.metaKey&&g?this.parent.toggleSelected(this):this.parent.setSelected(this),ut(this,M,!0))}getRect(R,g){const J=this.parentScale,[U,H]=this.pageDimensions,[C,v]=this.pageTranslation,K=R/J,j=g/J,O=this.x*U,_=this.y*H,cl=this.width*U,tl=this.height*H;switch(this.rotation){case 0:return[O+K+C,H-_-j-tl+v,O+K+cl+C,H-_-j+v];case 90:return[O+j+C,H-_+K+v,O+j+tl+C,H-_+K+cl+v];case 180:return[O-K-cl+C,H-_+j+v,O-K+C,H-_+j+tl+v];case 270:return[O-j-tl+C,H-_-K-cl+v,O-j+C,H-_-K+v];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(R,g){const[J,U,H,C]=R,v=H-J,K=C-U;switch(this.rotation){case 0:return[J,g-C,v,K];case 90:return[J,g-U,K,v];case 180:return[H,g-U,v,K];case 270:return[H,g-C,K,v];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,r))}serialize(){(0,Y.unreachable)("An editor must be serializable")}static deserialize(R,g,J){const U=new this.prototype.constructor({parent:g,id:g.getNextId(),uiManager:J});U.rotation=R.rotation;const[H,C]=U.pageDimensions,[v,K,j,O]=U.getRectInCurrentCoords(R.rect,C);return U.x=v/H,U.y=K/C,U.width=j/H,U.height=O/C,U}remove(){this.div.removeEventListener("focusin",T(this,r)),this.div.removeEventListener("focusout",T(this,W)),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,g){}disableEditing(){}enableEditing(){}get propertiesToUpdate(){return{}}get contentDiv(){return this.div}get isEditing(){return T(this,y)}set isEditing(R){ut(this,y,R),R?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null)}};let D=S;r=new WeakMap,W=new WeakMap,M=new WeakMap,y=new WeakMap,N=new WeakMap,X=new WeakMap,It(D,"_colorManager",new z.ColorManager),It(D,"_zIndex",1),u.AnnotationEditor=D},(s,u,o)=>{var r,W,M,y,N,X,z,Y,S,D,R,g,J,U,H,C,v,K,j,O,_,cl,tl,E,il,al,Nl,nl,Sl,P,Q,q,ll,B,F,el,dl,Zl,Wl,Gl,Il,xl,bl,Ol,_l,Jl,$,ol,hl,pl,zl,jl;Object.defineProperty(u,"__esModule",{value:!0}),u.KeyboardManager=u.CommandManager=u.ColorManager=u.AnnotationEditorUIManager=void 0,u.bindEvents=function(Dl,Al,We){for(const he of We)Al.addEventListener(he,Dl[he].bind(Dl))},u.opacityToHex=function(Dl){return Math.round(Math.min(255,Math.max(1,255*Dl))).toString(16).padStart(2,"0")};var Ul=o(1),Kl=o(142);class le{constructor(){et(this,r,0)}getId(){return`${Ul.AnnotationEditorPrefix}${ue(this,r)._++}`}}r=new WeakMap;class Pl{constructor(){et(this,W,[]),et(this,M,!1),et(this,y,void 0),et(this,N,-1);let Al=arguments.length>0&&arguments[0]!==void 0?arguments[0]:128;ut(this,y,Al)}add(Al){let{cmd:We,undo:he,mustExec:Ke,type:Le=NaN,overwriteIfSameType:fl=!1,keepUndo:Ye=!1}=Al;if(Ke&&We(),T(this,M))return;const ze={cmd:We,undo:he,type:Le};if(T(this,N)===-1){T(this,W).length>0&&(T(this,W).length=0),ut(this,N,0),T(this,W).push(ze);return}if(fl&&T(this,W)[T(this,N)].type===Le){Ye&&(ze.undo=T(this,W)[T(this,N)].undo),T(this,W)[T(this,N)]=ze;return}const Ie=T(this,N)+1;Ie===T(this,y)?T(this,W).splice(0,1):(ut(this,N,Ie),Ie<T(this,W).length&&T(this,W).splice(Ie)),T(this,W).push(ze)}undo(){T(this,N)!==-1&&(ut(this,M,!0),T(this,W)[T(this,N)].undo(),ut(this,M,!1),ut(this,N,T(this,N)-1))}redo(){T(this,N)<T(this,W).length-1&&(ut(this,N,T(this,N)+1),ut(this,M,!0),T(this,W)[T(this,N)].cmd(),ut(this,M,!1))}hasSomethingToUndo(){return T(this,N)!==-1}hasSomethingToRedo(){return T(this,N)<T(this,W).length-1}destroy(){ut(this,W,null)}}W=new WeakMap,M=new WeakMap,y=new WeakMap,N=new WeakMap,u.CommandManager=Pl;class ee{constructor(Al){et(this,X),this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:We}=Ul.FeatureTest.platform;for(const[he,Ke]of Al)for(const Le of he){const fl=Le.startsWith("mac+");We&&fl?(this.callbacks.set(Le.slice(4),Ke),this.allKeys.add(Le.split("+").at(-1))):!We&&!fl&&(this.callbacks.set(Le,Ke),this.allKeys.add(Le.split("+").at(-1)))}}exec(Al,We){if(!this.allKeys.has(We.key))return;const he=this.callbacks.get(nt(this,X,z).call(this,We));he&&(he.bind(Al)(),We.stopPropagation(),We.preventDefault())}}X=new WeakSet,z=function(Dl){Dl.altKey&&this.buffer.push("alt"),Dl.ctrlKey&&this.buffer.push("ctrl"),Dl.metaKey&&this.buffer.push("meta"),Dl.shiftKey&&this.buffer.push("shift"),this.buffer.push(Dl.key);const Al=this.buffer.join("+");return this.buffer.length=0,Al},u.KeyboardManager=ee;const ql=class{get _colors(){const Dl=new Map([["CanvasText",null],["Canvas",null]]);return(0,Kl.getColorValues)(Dl),(0,Ul.shadow)(this,"_colors",Dl)}convert(Dl){const Al=(0,Kl.getRGB)(Dl);if(!window.matchMedia("(forced-colors: active)").matches)return Al;for(const[We,he]of this._colors)if(he.every((Ke,Le)=>Ke===Al[Le]))return ql._colorsMapping.get(We);return Al}getHexCode(Dl){const Al=this._colors.get(Dl);return Al?Ul.Util.makeHexColor(...Al):Dl}};let ie=ql;It(ie,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]])),u.ColorManager=ie;const ce=class{constructor(Dl,Al,We){et(this,Q),et(this,ll),et(this,F),et(this,dl),et(this,Wl),et(this,Il),et(this,bl),et(this,_l),et(this,$),et(this,hl),et(this,zl),et(this,Y,null),et(this,S,new Map),et(this,D,new Map),et(this,R,null),et(this,g,new Pl),et(this,J,0),et(this,U,null),et(this,H,new Set),et(this,C,null),et(this,v,new le),et(this,K,!1),et(this,j,Ul.AnnotationEditorType.NONE),et(this,O,new Set),et(this,_,this.copy.bind(this)),et(this,cl,this.cut.bind(this)),et(this,tl,this.paste.bind(this)),et(this,E,this.keydown.bind(this)),et(this,il,this.onEditingAction.bind(this)),et(this,al,this.onPageChanging.bind(this)),et(this,Nl,this.onScaleChanging.bind(this)),et(this,nl,this.onRotationChanging.bind(this)),et(this,Sl,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1}),et(this,P,null),ut(this,P,Dl),ut(this,C,Al),T(this,C)._on("editingaction",T(this,il)),T(this,C)._on("pagechanging",T(this,al)),T(this,C)._on("scalechanging",T(this,Nl)),T(this,C)._on("rotationchanging",T(this,nl)),ut(this,R,We),this.viewParameters={realScale:Kl.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}destroy(){nt(this,ll,B).call(this),T(this,C)._off("editingaction",T(this,il)),T(this,C)._off("pagechanging",T(this,al)),T(this,C)._off("scalechanging",T(this,Nl)),T(this,C)._off("rotationchanging",T(this,nl));for(const Dl of T(this,D).values())Dl.destroy();T(this,D).clear(),T(this,S).clear(),T(this,H).clear(),ut(this,Y,null),T(this,O).clear(),T(this,g).destroy()}onPageChanging(Dl){let{pageNumber:Al}=Dl;ut(this,J,Al-1)}focusMainContainer(){T(this,P).focus()}addShouldRescale(Dl){T(this,H).add(Dl)}removeShouldRescale(Dl){T(this,H).delete(Dl)}onScaleChanging(Dl){let{scale:Al}=Dl;this.commitOrRemove(),this.viewParameters.realScale=Al*Kl.PixelsPerInch.PDF_TO_CSS_UNITS;for(const We of T(this,H))We.onScaleChanging()}onRotationChanging(Dl){let{pagesRotation:Al}=Dl;this.commitOrRemove(),this.viewParameters.rotation=Al}addToAnnotationStorage(Dl){Dl.isEmpty()||!T(this,R)||T(this,R).has(Dl.id)||T(this,R).setValue(Dl.id,Dl)}copy(Dl){if(Dl.preventDefault(),T(this,Y)&&T(this,Y).commitOrRemove(),!this.hasSelection)return;const Al=[];for(const We of T(this,O))We.isEmpty()||Al.push(We.serialize());Al.length!==0&&Dl.clipboardData.setData("application/pdfjs",JSON.stringify(Al))}cut(Dl){this.copy(Dl),this.delete()}paste(Dl){Dl.preventDefault();let Al=Dl.clipboardData.getData("application/pdfjs");if(!Al)return;try{Al=JSON.parse(Al)}catch(he){(0,Ul.warn)(`paste: "${he.message}".`);return}if(!Array.isArray(Al))return;this.unselectAll();const We=T(this,D).get(T(this,J));try{const he=[];for(const fl of Al){const Ye=We.deserialize(fl);if(!Ye)return;he.push(Ye)}const Ke=()=>{for(const fl of he)nt(this,$,ol).call(this,fl);nt(this,zl,jl).call(this,he)},Le=()=>{for(const fl of he)fl.remove()};this.addCommands({cmd:Ke,undo:Le,mustExec:!0})}catch(he){(0,Ul.warn)(`paste: "${he.message}".`)}}keydown(Dl){var Al;(Al=this.getActive())!==null&&Al!==void 0&&Al.shouldGetKeyboardEvents()||ce._keyboardManager.exec(this,Dl)}onEditingAction(Dl){["undo","redo","delete","selectAll"].includes(Dl.name)&&this[Dl.name]()}setEditingState(Dl){Dl?(nt(this,Q,q).call(this),nt(this,F,el).call(this),nt(this,Wl,Gl).call(this,{isEditing:T(this,j)!==Ul.AnnotationEditorType.NONE,isEmpty:nt(this,hl,pl).call(this),hasSomethingToUndo:T(this,g).hasSomethingToUndo(),hasSomethingToRedo:T(this,g).hasSomethingToRedo(),hasSelectedEditor:!1})):(nt(this,ll,B).call(this),nt(this,dl,Zl).call(this),nt(this,Wl,Gl).call(this,{isEditing:!1}))}registerEditorTypes(Dl){if(!T(this,U)){ut(this,U,Dl);for(const Al of T(this,U))nt(this,Il,xl).call(this,Al.defaultPropertiesToUpdate)}}getId(){return T(this,v).getId()}get currentLayer(){return T(this,D).get(T(this,J))}get currentPageIndex(){return T(this,J)}addLayer(Dl){T(this,D).set(Dl.pageIndex,Dl),T(this,K)?Dl.enable():Dl.disable()}removeLayer(Dl){T(this,D).delete(Dl.pageIndex)}updateMode(Dl){if(ut(this,j,Dl),Dl===Ul.AnnotationEditorType.NONE)this.setEditingState(!1),nt(this,_l,Jl).call(this);else{this.setEditingState(!0),nt(this,bl,Ol).call(this);for(const Al of T(this,D).values())Al.updateMode(Dl)}}updateToolbar(Dl){Dl!==T(this,j)&&T(this,C).dispatch("switchannotationeditormode",{source:this,mode:Dl})}updateParams(Dl,Al){if(T(this,U)){for(const We of T(this,O))We.updateParams(Dl,Al);for(const We of T(this,U))We.updateDefaultParams(Dl,Al)}}getEditors(Dl){const Al=[];for(const We of T(this,S).values())We.pageIndex===Dl&&Al.push(We);return Al}getEditor(Dl){return T(this,S).get(Dl)}addEditor(Dl){T(this,S).set(Dl.id,Dl)}removeEditor(Dl){var Al;T(this,S).delete(Dl.id),this.unselect(Dl),(Al=T(this,R))===null||Al===void 0||Al.remove(Dl.id)}setActiveEditor(Dl){T(this,Y)!==Dl&&(ut(this,Y,Dl),Dl&&nt(this,Il,xl).call(this,Dl.propertiesToUpdate))}toggleSelected(Dl){T(this,O).has(Dl)?(T(this,O).delete(Dl),Dl.unselect(),nt(this,Wl,Gl).call(this,{hasSelectedEditor:this.hasSelection})):(T(this,O).add(Dl),Dl.select(),nt(this,Il,xl).call(this,Dl.propertiesToUpdate),nt(this,Wl,Gl).call(this,{hasSelectedEditor:!0}))}setSelected(Dl){for(const Al of T(this,O))Al!==Dl&&Al.unselect();T(this,O).clear(),T(this,O).add(Dl),Dl.select(),nt(this,Il,xl).call(this,Dl.propertiesToUpdate),nt(this,Wl,Gl).call(this,{hasSelectedEditor:!0})}isSelected(Dl){return T(this,O).has(Dl)}unselect(Dl){Dl.unselect(),T(this,O).delete(Dl),nt(this,Wl,Gl).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return T(this,O).size!==0}undo(){T(this,g).undo(),nt(this,Wl,Gl).call(this,{hasSomethingToUndo:T(this,g).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:nt(this,hl,pl).call(this)})}redo(){T(this,g).redo(),nt(this,Wl,Gl).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:T(this,g).hasSomethingToRedo(),isEmpty:nt(this,hl,pl).call(this)})}addCommands(Dl){T(this,g).add(Dl),nt(this,Wl,Gl).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:nt(this,hl,pl).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const Dl=[...T(this,O)];this.addCommands({cmd:()=>{for(const Al of Dl)Al.remove()},undo:()=>{for(const Al of Dl)nt(this,$,ol).call(this,Al)},mustExec:!0})}commitOrRemove(){var Dl;(Dl=T(this,Y))===null||Dl===void 0||Dl.commitOrRemove()}selectAll(){for(const Dl of T(this,O))Dl.commit();nt(this,zl,jl).call(this,T(this,S).values())}unselectAll(){if(T(this,Y))T(this,Y).commitOrRemove();else if(T(this,O).size!==0){for(const Dl of T(this,O))Dl.unselect();T(this,O).clear(),nt(this,Wl,Gl).call(this,{hasSelectedEditor:!1})}}isActive(Dl){return T(this,Y)===Dl}getActive(){return T(this,Y)}getMode(){return T(this,j)}};let Ge=ce;Y=new WeakMap,S=new WeakMap,D=new WeakMap,R=new WeakMap,g=new WeakMap,J=new WeakMap,U=new WeakMap,H=new WeakMap,C=new WeakMap,v=new WeakMap,K=new WeakMap,j=new WeakMap,O=new WeakMap,_=new WeakMap,cl=new WeakMap,tl=new WeakMap,E=new WeakMap,il=new WeakMap,al=new WeakMap,Nl=new WeakMap,nl=new WeakMap,Sl=new WeakMap,P=new WeakMap,Q=new WeakSet,q=function(){T(this,P).addEventListener("keydown",T(this,E))},ll=new WeakSet,B=function(){T(this,P).removeEventListener("keydown",T(this,E))},F=new WeakSet,el=function(){document.addEventListener("copy",T(this,_)),document.addEventListener("cut",T(this,cl)),document.addEventListener("paste",T(this,tl))},dl=new WeakSet,Zl=function(){document.removeEventListener("copy",T(this,_)),document.removeEventListener("cut",T(this,cl)),document.removeEventListener("paste",T(this,tl))},Wl=new WeakSet,Gl=function(Dl){Object.entries(Dl).some(Al=>{let[We,he]=Al;return T(this,Sl)[We]!==he})&&T(this,C).dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(T(this,Sl),Dl)})},Il=new WeakSet,xl=function(Dl){T(this,C).dispatch("annotationeditorparamschanged",{source:this,details:Dl})},bl=new WeakSet,Ol=function(){if(!T(this,K)){ut(this,K,!0);for(const Dl of T(this,D).values())Dl.enable()}},_l=new WeakSet,Jl=function(){if(this.unselectAll(),T(this,K)){ut(this,K,!1);for(const Dl of T(this,D).values())Dl.disable()}},$=new WeakSet,ol=function(Dl){const Al=T(this,D).get(Dl.pageIndex);Al?Al.addOrRebuild(Dl):this.addEditor(Dl)},hl=new WeakSet,pl=function(){if(T(this,S).size===0)return!0;if(T(this,S).size===1)for(const Dl of T(this,S).values())return Dl.isEmpty();return!1},zl=new WeakSet,jl=function(Dl){T(this,O).clear();for(const Al of Dl)Al.isEmpty()||(T(this,O).add(Al),Al.select());nt(this,Wl,Gl).call(this,{hasSelectedEditor:!0})},It(Ge,"_keyboardManager",new ee([[["ctrl+a","mac+meta+a"],ce.prototype.selectAll],[["ctrl+z","mac+meta+z"],ce.prototype.undo],[["ctrl+y","ctrl+shift+Z","mac+meta+shift+Z"],ce.prototype.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete"],ce.prototype.delete],[["Escape","mac+Escape"],ce.prototype.unselectAll]])),u.AnnotationEditorUIManager=Ge},(s,u,o)=>{var r,W,M,y,N,X,z,Y,S,D,R,g,J,U;Object.defineProperty(u,"__esModule",{value:!0}),u.StatTimer=u.RenderingCancelledException=u.PixelsPerInch=u.PageViewport=u.PDFDateString=u.DOMStandardFontDataFactory=u.DOMSVGFactory=u.DOMFilterFactory=u.DOMCanvasFactory=u.DOMCMapReaderFactory=u.AnnotationPrefix=void 0,u.deprecated=function(q){console.log("Deprecated API usage: "+q)},u.getColorValues=function(q){const ll=document.createElement("span");ll.style.visibility="hidden",document.body.append(ll);for(const B of q.keys()){ll.style.color=B;const F=window.getComputedStyle(ll).color;q.set(B,Q(F))}ll.remove()},u.getCurrentTransform=function(q){const{a:ll,b:B,c:F,d:el,e:dl,f:Zl}=q.getTransform();return[ll,B,F,el,dl,Zl]},u.getCurrentTransformInverse=function(q){const{a:ll,b:B,c:F,d:el,e:dl,f:Zl}=q.getTransform().invertSelf();return[ll,B,F,el,dl,Zl]},u.getFilenameFromUrl=function(q){return arguments.length>1&&arguments[1]!==void 0&&arguments[1]||([q]=q.split(/[#?]/,1)),q.substring(q.lastIndexOf("/")+1)},u.getPdfFilenameFromUrl=function(q){let ll=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"document.pdf";if(typeof q!="string")return ll;if(nl(q))return(0,C.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),ll;const B=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,F=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(q);let el=B.exec(F[1])||B.exec(F[2])||B.exec(F[3]);if(el&&(el=el[0],el.includes("%")))try{el=B.exec(decodeURIComponent(el))[0]}catch{}return el||ll},u.getRGB=Q,u.getXfaPageViewport=function(q,ll){let{scale:B=1,rotation:F=0}=ll;const{width:el,height:dl}=q.attributes.style,Zl=[0,0,parseInt(el),parseInt(dl)];return new al({viewBox:Zl,scale:B,rotation:F})},u.isDataScheme=nl,u.isPdfFile=function(q){return typeof q=="string"&&/\.pdf$/i.test(q)},u.isValidFetchUrl=Sl,u.loadScript=function(q){let ll=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return new Promise((B,F)=>{const el=document.createElement("script");el.src=q,el.onload=function(dl){ll&&el.remove(),B(dl)},el.onerror=function(){F(new Error(`Cannot load script at: ${el.src}`))},(document.head||document.documentElement).append(el)})},u.setLayerDimensions=function(q,ll){let B=arguments.length>2&&arguments[2]!==void 0&&arguments[2],F=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];if(ll instanceof al){const{pageWidth:el,pageHeight:dl}=ll.rawDims,{style:Zl}=q,Wl=`calc(var(--scale-factor) * ${el}px)`,Gl=`calc(var(--scale-factor) * ${dl}px)`;B&&ll.rotation%180!=0?(Zl.width=Gl,Zl.height=Wl):(Zl.width=Wl,Zl.height=Gl)}F&&q.setAttribute("data-main-rotation",ll.rotation)};var H=o(143),C=o(1);const v="http://www.w3.org/2000/svg";u.AnnotationPrefix="pdfjs_internal_id_";const K=class{};let j=K;It(j,"CSS",96),It(j,"PDF",72),It(j,"PDF_TO_CSS_UNITS",K.CSS/K.PDF),u.PixelsPerInch=j;class O extends H.BaseFilterFactory{constructor(){let{docId:ll,ownerDocument:B=globalThis.document}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),et(this,S),et(this,R),et(this,J),et(this,r,void 0),et(this,W,void 0),et(this,M,void 0),et(this,y,void 0),et(this,N,void 0),et(this,X,void 0),et(this,z,void 0),et(this,Y,0),ut(this,M,ll),ut(this,y,B)}addFilter(ll){if(!ll)return"none";let B,F,el,dl,Zl=T(this,S,D).get(ll);if(Zl)return Zl;if(ll.length===1){const bl=ll[0],Ol=new Array(256);for(let _l=0;_l<256;_l++)Ol[_l]=bl[_l]/255;dl=B=F=el=Ol.join(",")}else{const[bl,Ol,_l]=ll,Jl=new Array(256),$=new Array(256),ol=new Array(256);for(let hl=0;hl<256;hl++)Jl[hl]=bl[hl]/255,$[hl]=Ol[hl]/255,ol[hl]=_l[hl]/255;B=Jl.join(","),F=$.join(","),el=ol.join(","),dl=`${B}${F}${el}`}if(Zl=T(this,S,D).get(dl),Zl)return T(this,S,D).set(ll,Zl),Zl;const Wl=`g_${T(this,M)}_transfer_map_${ue(this,Y)._++}`,Gl=`url(#${Wl})`;T(this,S,D).set(ll,Gl),T(this,S,D).set(dl,Gl);const Il=T(this,y).createElementNS(v,"filter",v);Il.setAttribute("id",Wl),Il.setAttribute("color-interpolation-filters","sRGB");const xl=T(this,y).createElementNS(v,"feComponentTransfer");return Il.append(xl),nt(this,J,U).call(this,xl,"feFuncR",B),nt(this,J,U).call(this,xl,"feFuncG",F),nt(this,J,U).call(this,xl,"feFuncB",el),T(this,R,g).append(Il),Gl}addHCMFilter(ll,B){var F;const el=`${ll}-${B}`;if(T(this,X)===el)return T(this,z);if(ut(this,X,el),ut(this,z,"none"),(F=T(this,N))===null||F===void 0||F.remove(),!ll||!B)return T(this,z);T(this,R,g).style.color=ll;const dl=Q(ll=getComputedStyle(T(this,R,g)).getPropertyValue("color"));ll=C.Util.makeHexColor(...dl),T(this,R,g).style.color=B;const Zl=Q(B=getComputedStyle(T(this,R,g)).getPropertyValue("color"));if(B=C.Util.makeHexColor(...Zl),T(this,R,g).style.color="",ll==="#000000"&&B==="#ffffff"||ll===B)return T(this,z);const Wl=new Array(256);for(let Jl=0;Jl<=255;Jl++){const $=Jl/255;Wl[Jl]=$<=.03928?$/12.92:(($+.055)/1.055)**2.4}const Gl=Wl.join(","),Il=`g_${T(this,M)}_hcm_filter`,xl=ut(this,N,T(this,y).createElementNS(v,"filter",v));xl.setAttribute("id",Il),xl.setAttribute("color-interpolation-filters","sRGB");let bl=T(this,y).createElementNS(v,"feComponentTransfer");xl.append(bl),nt(this,J,U).call(this,bl,"feFuncR",Gl),nt(this,J,U).call(this,bl,"feFuncG",Gl),nt(this,J,U).call(this,bl,"feFuncB",Gl);const Ol=T(this,y).createElementNS(v,"feColorMatrix");Ol.setAttribute("type","matrix"),Ol.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"),xl.append(Ol),bl=T(this,y).createElementNS(v,"feComponentTransfer"),xl.append(bl);const _l=(Jl,$)=>{const ol=dl[Jl]/255,hl=Zl[Jl]/255,pl=new Array($+1);for(let zl=0;zl<=$;zl++)pl[zl]=ol+zl/$*(hl-ol);return pl.join(",")};return nt(this,J,U).call(this,bl,"feFuncR",_l(0,5)),nt(this,J,U).call(this,bl,"feFuncG",_l(1,5)),nt(this,J,U).call(this,bl,"feFuncB",_l(2,5)),T(this,R,g).append(xl),ut(this,z,`url(#${Il})`),T(this,z)}destroy(){(!(arguments.length>0&&arguments[0]!==void 0&&arguments[0])||!T(this,z))&&(T(this,W)&&(T(this,W).parentNode.parentNode.remove(),ut(this,W,null)),T(this,r)&&(T(this,r).clear(),ut(this,r,null)),ut(this,Y,0))}}r=new WeakMap,W=new WeakMap,M=new WeakMap,y=new WeakMap,N=new WeakMap,X=new WeakMap,z=new WeakMap,Y=new WeakMap,S=new WeakSet,D=function(){return T(this,r)||ut(this,r,new Map)},R=new WeakSet,g=function(){if(!T(this,W)){const q=T(this,y).createElement("div"),{style:ll}=q;ll.visibility="hidden",ll.contain="strict",ll.width=ll.height=0,ll.position="absolute",ll.top=ll.left=0,ll.zIndex=-1;const B=T(this,y).createElementNS(v,"svg");B.setAttribute("width",0),B.setAttribute("height",0),ut(this,W,T(this,y).createElementNS(v,"defs")),q.append(B),B.append(T(this,W)),T(this,y).body.append(q)}return T(this,W)},J=new WeakSet,U=function(q,ll,B){const F=T(this,y).createElementNS(v,ll);F.setAttribute("type","discrete"),F.setAttribute("tableValues",B),q.append(F)},u.DOMFilterFactory=O;class _ extends H.BaseCanvasFactory{constructor(){let{ownerDocument:ll=globalThis.document}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),this._document=ll}_createCanvas(ll,B){const F=this._document.createElement("canvas");return F.width=ll,F.height=B,F}}u.DOMCanvasFactory=_;async function cl(q){let ll=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(Sl(q,document.baseURI)){const B=await fetch(q);if(!B.ok)throw new Error(B.statusText);return ll?new Uint8Array(await B.arrayBuffer()):(0,C.stringToBytes)(await B.text())}return new Promise((B,F)=>{const el=new XMLHttpRequest;el.open("GET",q,!0),ll&&(el.responseType="arraybuffer"),el.onreadystatechange=()=>{if(el.readyState===XMLHttpRequest.DONE){if(el.status===200||el.status===0){let dl;if(ll&&el.response?dl=new Uint8Array(el.response):!ll&&el.responseText&&(dl=(0,C.stringToBytes)(el.responseText)),dl){B(dl);return}}F(new Error(el.statusText))}},el.send(null)})}class tl extends H.BaseCMapReaderFactory{_fetchData(ll,B){return cl(ll,this.isCompressed).then(F=>({cMapData:F,compressionType:B}))}}u.DOMCMapReaderFactory=tl;class E extends H.BaseStandardFontDataFactory{_fetchData(ll){return cl(ll,!0)}}u.DOMStandardFontDataFactory=E;class il extends H.BaseSVGFactory{_createSVG(ll){return document.createElementNS(v,ll)}}u.DOMSVGFactory=il;class al{constructor(ll){let{viewBox:B,scale:F,rotation:el,offsetX:dl=0,offsetY:Zl=0,dontFlip:Wl=!1}=ll;this.viewBox=B,this.scale=F,this.rotation=el,this.offsetX=dl,this.offsetY=Zl;const Gl=(B[2]+B[0])/2,Il=(B[3]+B[1])/2;let xl,bl,Ol,_l,Jl,$,ol,hl;switch(el%=360,el<0&&(el+=360),el){case 180:xl=-1,bl=0,Ol=0,_l=1;break;case 90:xl=0,bl=1,Ol=1,_l=0;break;case 270:xl=0,bl=-1,Ol=-1,_l=0;break;case 0:xl=1,bl=0,Ol=0,_l=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}Wl&&(Ol=-Ol,_l=-_l),xl===0?(Jl=Math.abs(Il-B[1])*F+dl,$=Math.abs(Gl-B[0])*F+Zl,ol=(B[3]-B[1])*F,hl=(B[2]-B[0])*F):(Jl=Math.abs(Gl-B[0])*F+dl,$=Math.abs(Il-B[1])*F+Zl,ol=(B[2]-B[0])*F,hl=(B[3]-B[1])*F),this.transform=[xl*F,bl*F,Ol*F,_l*F,Jl-xl*F*Gl-Ol*F*Il,$-bl*F*Gl-_l*F*Il],this.width=ol,this.height=hl}get rawDims(){const{viewBox:ll}=this;return(0,C.shadow)(this,"rawDims",{pageWidth:ll[2]-ll[0],pageHeight:ll[3]-ll[1],pageX:ll[0],pageY:ll[1]})}clone(){let{scale:ll=this.scale,rotation:B=this.rotation,offsetX:F=this.offsetX,offsetY:el=this.offsetY,dontFlip:dl=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new al({viewBox:this.viewBox.slice(),scale:ll,rotation:B,offsetX:F,offsetY:el,dontFlip:dl})}convertToViewportPoint(ll,B){return C.Util.applyTransform([ll,B],this.transform)}convertToViewportRectangle(ll){const B=C.Util.applyTransform([ll[0],ll[1]],this.transform),F=C.Util.applyTransform([ll[2],ll[3]],this.transform);return[B[0],B[1],F[0],F[1]]}convertToPdfPoint(ll,B){return C.Util.applyInverseTransform([ll,B],this.transform)}}u.PageViewport=al;class Nl extends C.BaseException{constructor(ll,B){let F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;super(ll,"RenderingCancelledException"),this.type=B,this.extraDelay=F}}u.RenderingCancelledException=Nl;function nl(q){const ll=q.length;let B=0;for(;B<ll&&q[B].trim()==="";)B++;return q.substring(B,B+5).toLowerCase()==="data:"}u.StatTimer=class{constructor(){It(this,"started",Object.create(null)),It(this,"times",[])}time(q){q in this.started&&(0,C.warn)(`Timer is already running for ${q}`),this.started[q]=Date.now()}timeEnd(q){q in this.started||(0,C.warn)(`Timer has not been started for ${q}`),this.times.push({name:q,start:this.started[q],end:Date.now()}),delete this.started[q]}toString(){const q=[];let ll=0;for(const{name:B}of this.times)ll=Math.max(B.length,ll);for(const{name:B,start:F,end:el}of this.times)q.push(`${B.padEnd(ll)} ${el-F}ms
80
80
  `);return q.join("")}};function Sl(q,ll){try{const{protocol:B}=ll?new URL(q,ll):new URL(q);return B==="http:"||B==="https:"}catch{return!1}}let P;u.PDFDateString=class{static toDateObject(q){if(!q||typeof q!="string")return null;P||(P=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const ll=P.exec(q);if(!ll)return null;const B=parseInt(ll[1],10);let F=parseInt(ll[2],10);F=F>=1&&F<=12?F-1:0;let el=parseInt(ll[3],10);el=el>=1&&el<=31?el:1;let dl=parseInt(ll[4],10);dl=dl>=0&&dl<=23?dl:0;let Zl=parseInt(ll[5],10);Zl=Zl>=0&&Zl<=59?Zl:0;let Wl=parseInt(ll[6],10);Wl=Wl>=0&&Wl<=59?Wl:0;const Gl=ll[7]||"Z";let Il=parseInt(ll[8],10);Il=Il>=0&&Il<=23?Il:0;let xl=parseInt(ll[9],10)||0;return xl=xl>=0&&xl<=59?xl:0,Gl==="-"?(dl+=Il,Zl+=xl):Gl==="+"&&(dl-=Il,Zl-=xl),new Date(Date.UTC(B,F,el,dl,Zl,Wl))}};function Q(q){if(q.startsWith("#")){const ll=parseInt(q.slice(1),16);return[(16711680&ll)>>16,(65280&ll)>>8,255&ll]}return q.startsWith("rgb(")?q.slice(4,-1).split(",").map(ll=>parseInt(ll)):q.startsWith("rgba(")?q.slice(5,-1).split(",").map(ll=>parseInt(ll)).slice(0,3):((0,C.warn)(`Not a valid color format: "${q}"`),[0,0,0])}},(s,u,o)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BaseStandardFontDataFactory=u.BaseSVGFactory=u.BaseFilterFactory=u.BaseCanvasFactory=u.BaseCMapReaderFactory=void 0;var r=o(1);class W{constructor(){this.constructor===W&&(0,r.unreachable)("Cannot initialize BaseFilterFactory.")}addFilter(Y){return"none"}addHCMFilter(Y,S){return"none"}destroy(){}}u.BaseFilterFactory=W;class M{constructor(){this.constructor===M&&(0,r.unreachable)("Cannot initialize BaseCanvasFactory.")}create(Y,S){if(Y<=0||S<=0)throw new Error("Invalid canvas size");const D=this._createCanvas(Y,S);return{canvas:D,context:D.getContext("2d")}}reset(Y,S,D){if(!Y.canvas)throw new Error("Canvas is not specified");if(S<=0||D<=0)throw new Error("Invalid canvas size");Y.canvas.width=S,Y.canvas.height=D}destroy(Y){if(!Y.canvas)throw new Error("Canvas is not specified");Y.canvas.width=0,Y.canvas.height=0,Y.canvas=null,Y.context=null}_createCanvas(Y,S){(0,r.unreachable)("Abstract method `_createCanvas` called.")}}u.BaseCanvasFactory=M;class y{constructor(Y){let{baseUrl:S=null,isCompressed:D=!0}=Y;this.constructor===y&&(0,r.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=S,this.isCompressed=D}async fetch(Y){let{name:S}=Y;if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!S)throw new Error("CMap name must be specified.");const D=this.baseUrl+S+(this.isCompressed?".bcmap":""),R=this.isCompressed?r.CMapCompressionType.BINARY:r.CMapCompressionType.NONE;return this._fetchData(D,R).catch(g=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${D}`)})}_fetchData(Y,S){(0,r.unreachable)("Abstract method `_fetchData` called.")}}u.BaseCMapReaderFactory=y;class N{constructor(Y){let{baseUrl:S=null}=Y;this.constructor===N&&(0,r.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=S}async fetch(Y){let{filename:S}=Y;if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!S)throw new Error("Font filename must be specified.");const D=`${this.baseUrl}${S}`;return this._fetchData(D).catch(R=>{throw new Error(`Unable to load font data at: ${D}`)})}_fetchData(Y){(0,r.unreachable)("Abstract method `_fetchData` called.")}}u.BaseStandardFontDataFactory=N;class X{constructor(){this.constructor===X&&(0,r.unreachable)("Cannot initialize BaseSVGFactory.")}create(Y,S){let D=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(Y<=0||S<=0)throw new Error("Invalid SVG dimensions");const R=this._createSVG("svg:svg");return R.setAttribute("version","1.1"),D||(R.setAttribute("width",`${Y}px`),R.setAttribute("height",`${S}px`)),R.setAttribute("preserveAspectRatio","none"),R.setAttribute("viewBox",`0 0 ${Y} ${S}`),R}createElement(Y){if(typeof Y!="string")throw new Error("Invalid SVG element type");return this._createSVG(Y)}_createSVG(Y){(0,r.unreachable)("Abstract method `_createSVG` called.")}}u.BaseSVGFactory=X},(s,u,o)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.MurmurHash3_64=void 0;var r=o(1);const W=3285377520,M=4294901760,y=65535;u.MurmurHash3_64=class{constructor(N){this.h1=N?4294967295&N:W,this.h2=N?4294967295&N:W}update(N){let X,z;if(typeof N=="string"){X=new Uint8Array(2*N.length),z=0;for(let j=0,O=N.length;j<O;j++){const _=N.charCodeAt(j);_<=255?X[z++]=_:(X[z++]=_>>>8,X[z++]=255&_)}}else{if(!(0,r.isArrayBuffer)(N))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");X=N.slice(),z=X.byteLength}const Y=z>>2,S=z-4*Y,D=new Uint32Array(X.buffer,0,Y);let R=0,g=0,J=this.h1,U=this.h2;const H=3432918353,C=461845907,v=11601,K=13715;for(let j=0;j<Y;j++)1&j?(R=D[j],R=R*H&M|R*v&y,R=R<<15|R>>>17,R=R*C&M|R*K&y,J^=R,J=J<<13|J>>>19,J=5*J+3864292196):(g=D[j],g=g*H&M|g*v&y,g=g<<15|g>>>17,g=g*C&M|g*K&y,U^=g,U=U<<13|U>>>19,U=5*U+3864292196);switch(R=0,S){case 3:R^=X[4*Y+2]<<16;case 2:R^=X[4*Y+1]<<8;case 1:R^=X[4*Y],R=R*H&M|R*v&y,R=R<<15|R>>>17,R=R*C&M|R*K&y,1&Y?J^=R:U^=R}this.h1=J,this.h2=U}hexdigest(){let N=this.h1,X=this.h2;return N^=X>>>1,N=3981806797*N&M|36045*N&y,X=4283543511*X&M|(2950163797*(X<<16|N>>>16)&M)>>>16,N^=X>>>1,N=444984403*N&M|60499*N&y,X=3301882366*X&M|(3120437893*(X<<16|N>>>16)&M)>>>16,N^=X>>>1,(N>>>0).toString(16).padStart(8,"0")+(X>>>0).toString(16).padStart(8,"0")}}},(s,u,o)=>{var r,W;Object.defineProperty(u,"__esModule",{value:!0}),u.FontLoader=u.FontFaceObject=void 0;var M=o(1),y=o(3);u.FontLoader=(W=class{constructor(N){et(this,r,new Set);let{ownerDocument:X=globalThis.document,styleElement:z=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,r).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont(N){if(N&&!T(this,r).has(N.loadedName))if((0,M.assert)(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:X,src:z,style:Y}=N,S=new FontFace(X,z,Y);this.addNativeFontFace(S);try{await S.load(),T(this,r).add(X)}catch{(0,M.warn)(`Cannot load system font: ${N.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(S)}}else(0,M.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 z=N.createNativeFontFace();if(z){this.addNativeFontFace(z);try{await z.loaded}catch(Y){throw(0,M.warn)(`Failed to load font '${z.family}': '${Y}'.`),N.disableFontFace=!0,Y}}return}const X=N.createFontFaceRule();if(X){if(this.insertRule(X),this.isSyncFontLoadingSupported)return;await new Promise(z=>{const Y=this._queueLoadingCallback(z);this._prepareFontLoadEvent(N,Y)})}}get isFontLoadingAPISupported(){var N;const X=!((N=this._document)===null||N===void 0||!N.fonts);return(0,M.shadow)(this,"isFontLoadingAPISupported",X)}get isSyncFontLoadingSupported(){let N=!1;return(y.isNodeJS||typeof navigator<"u"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(N=!0),(0,M.shadow)(this,"isSyncFontLoadingSupported",N)}_queueLoadingCallback(N){const{loadingRequests:X}=this,z={done:!1,complete:function(){for((0,M.assert)(!z.done,"completeRequest() cannot be called twice."),z.done=!0;X.length>0&&X[0].done;){const Y=X.shift();setTimeout(Y.callback,0)}},callback:N};return X.push(z),z}get _loadTestFont(){const N=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return(0,M.shadow)(this,"_loadTestFont",N)}_prepareFontLoadEvent(N,X){function z(O,_){return O.charCodeAt(_)<<24|O.charCodeAt(_+1)<<16|O.charCodeAt(_+2)<<8|255&O.charCodeAt(_+3)}function Y(O,_,cl,tl){return O.substring(0,_)+tl+O.substring(_+cl)}let S,D;const R=this._document.createElement("canvas");R.width=1,R.height=1;const g=R.getContext("2d");let J=0;const U=`lt${Date.now()}${this.loadTestFontId++}`;let H=this._loadTestFont;H=Y(H,976,U.length,U);const C=1482184792;let v=z(H,16);for(S=0,D=U.length-3;S<D;S+=4)v=v-C+z(U,S)|0;S<U.length&&(v=v-C+z(U+"XXX",S)|0),H=Y(H,16,4,(0,M.string32)(v));const K=`@font-face {font-family:"${U}";src:${`url(data:font/opentype;base64,${btoa(H)});`}}`;this.insertRule(K);const j=this._document.createElement("div");j.style.visibility="hidden",j.style.width=j.style.height="10px",j.style.position="absolute",j.style.top=j.style.left="0px";for(const O of[N.loadedName,U]){const _=this._document.createElement("span");_.textContent="Hi",_.style.fontFamily=O,j.append(_)}this._document.body.append(j),function O(_,cl){if(++J>30){(0,M.warn)("Load test font never loaded."),cl();return}g.font="30px "+_,g.fillText(".",0,20),g.getImageData(0,0,1,1).data[3]>0?cl():setTimeout(O.bind(null,_,cl))}(U,()=>{j.remove(),X.complete()})}},r=new WeakMap,W),u.FontFaceObject=class{constructor(N,X){let{isEvalSupported:z=!0,disableFontFace:Y=!1,ignoreErrors:S=!1,inspectFont:D=null}=X;this.compiledGlyphs=Object.create(null);for(const R in N)this[R]=N[R];this.isEvalSupported=z!==!1,this.disableFontFace=Y===!0,this.ignoreErrors=S===!0,this._inspectFont=D}createNativeFontFace(){var N;if(!this.data||this.disableFontFace)return null;let X;if(this.cssFontInfo){const z={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(z.style=`oblique ${this.cssFontInfo.italicAngle}deg`),X=new FontFace(this.cssFontInfo.fontFamily,this.data,z)}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,M.bytesToString)(this.data),z=`url(data:${this.mimetype};base64,${btoa(X)});`;let Y;if(this.cssFontInfo){let S=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(S+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),Y=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${S}src:${z}}`}else Y=`@font-face {font-family:"${this.loadedName}";src:${z}}`;return(N=this._inspectFont)===null||N===void 0||N.call(this,this,z),Y}getPathGenerator(N,X){if(this.compiledGlyphs[X]!==void 0)return this.compiledGlyphs[X];let z;try{z=N.get(this.loadedName+"_path_"+X)}catch(Y){if(!this.ignoreErrors)throw Y;return(0,M.warn)(`getPathGenerator - ignoring character: "${Y}".`),this.compiledGlyphs[X]=function(S,D){}}if(this.isEvalSupported&&M.FeatureTest.isEvalSupported){const Y=[];for(const S of z){const D=S.args!==void 0?S.args.join(","):"";Y.push("c.",S.cmd,"(",D,`);
81
81
  `)}return this.compiledGlyphs[X]=new Function("c","size",Y.join(""))}return this.compiledGlyphs[X]=function(Y,S){for(const D of z)D.cmd==="scale"&&(D.args=[S,-S]),Y[D.cmd].apply(Y,D.args)}}}},(s,u,o)=>{var r,W,M,y;Object.defineProperty(u,"__esModule",{value:!0}),u.CanvasGraphics=void 0;var N=o(1),X=o(142),z=o(147),Y=o(148),S=o(3);const D=4096,R=16;class g{constructor(Q){this.canvasFactory=Q,this.cache=Object.create(null)}getCanvas(Q,q,ll){let B;return this.cache[Q]!==void 0?(B=this.cache[Q],this.canvasFactory.reset(B,q,ll)):(B=this.canvasFactory.create(q,ll),this.cache[Q]=B),B}delete(Q){delete this.cache[Q]}clear(){for(const Q in this.cache){const q=this.cache[Q];this.canvasFactory.destroy(q),delete this.cache[Q]}}}function J(P,Q,q,ll,B,F,el,dl,Zl,Wl){const[Gl,Il,xl,bl,Ol,_l]=(0,X.getCurrentTransform)(P);if(Il===0&&xl===0){const Jl=el*Gl+Ol,$=Math.round(Jl),ol=dl*bl+_l,hl=Math.round(ol),pl=(el+Zl)*Gl+Ol,zl=Math.abs(Math.round(pl)-$)||1,jl=(dl+Wl)*bl+_l,Ul=Math.abs(Math.round(jl)-hl)||1;return P.setTransform(Math.sign(Gl),0,0,Math.sign(bl),$,hl),P.drawImage(Q,q,ll,B,F,0,0,zl,Ul),P.setTransform(Gl,Il,xl,bl,Ol,_l),[zl,Ul]}if(Gl===0&&bl===0){const Jl=dl*xl+Ol,$=Math.round(Jl),ol=el*Il+_l,hl=Math.round(ol),pl=(dl+Wl)*xl+Ol,zl=Math.abs(Math.round(pl)-$)||1,jl=(el+Zl)*Il+_l,Ul=Math.abs(Math.round(jl)-hl)||1;return P.setTransform(0,Math.sign(Il),Math.sign(xl),0,$,hl),P.drawImage(Q,q,ll,B,F,0,0,Ul,zl),P.setTransform(Gl,Il,xl,bl,Ol,_l),[Ul,zl]}return P.drawImage(Q,q,ll,B,F,el,dl,Zl,Wl),[Math.hypot(Gl,Il)*Zl,Math.hypot(xl,bl)*Wl]}class U{constructor(Q,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,q])}clone(){const Q=Object.create(this);return Q.clipBox=this.clipBox.slice(),Q}setCurrentPoint(Q,q){this.x=Q,this.y=q}updatePathMinMax(Q,q,ll){[q,ll]=N.Util.applyTransform([q,ll],Q),this.minX=Math.min(this.minX,q),this.minY=Math.min(this.minY,ll),this.maxX=Math.max(this.maxX,q),this.maxY=Math.max(this.maxY,ll)}updateRectMinMax(Q,q){const ll=N.Util.applyTransform(q,Q),B=N.Util.applyTransform(q.slice(2),Q);this.minX=Math.min(this.minX,ll[0],B[0]),this.minY=Math.min(this.minY,ll[1],B[1]),this.maxX=Math.max(this.maxX,ll[0],B[0]),this.maxY=Math.max(this.maxY,ll[1],B[1])}updateScalingPathMinMax(Q,q){N.Util.scaleMinMax(Q,q),this.minX=Math.min(this.minX,q[0]),this.maxX=Math.max(this.maxX,q[1]),this.minY=Math.min(this.minY,q[2]),this.maxY=Math.max(this.maxY,q[3])}updateCurvePathMinMax(Q,q,ll,B,F,el,dl,Zl,Wl,Gl){const Il=N.Util.bezierBoundingBox(q,ll,B,F,el,dl,Zl,Wl);Gl?(Gl[0]=Math.min(Gl[0],Il[0],Il[2]),Gl[1]=Math.max(Gl[1],Il[0],Il[2]),Gl[2]=Math.min(Gl[2],Il[1],Il[3]),Gl[3]=Math.max(Gl[3],Il[1],Il[3])):this.updateRectMinMax(Q,Il)}getPathBoundingBox(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:z.PathType.FILL,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const ll=[this.minX,this.minY,this.maxX,this.maxY];if(Q===z.PathType.STROKE){q||(0,N.unreachable)("Stroke bounding box must include transform.");const B=N.Util.singularValueDecompose2dScale(q),F=B[0]*this.lineWidth/2,el=B[1]*this.lineWidth/2;ll[0]-=F,ll[1]-=el,ll[2]+=F,ll[3]+=el}return ll}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]:z.PathType.FILL,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return N.Util.intersect(this.clipBox,this.getPathBoundingBox(Q,q))}}function H(P,Q){if(typeof ImageData<"u"&&Q instanceof ImageData){P.putImageData(Q,0,0);return}const q=Q.height,ll=Q.width,B=q%R,F=(q-B)/R,el=B===0?F:F+1,dl=P.createImageData(ll,R);let Zl,Wl=0;const Gl=Q.data,Il=dl.data;let xl,bl,Ol,_l;if(Q.kind===N.ImageKind.GRAYSCALE_1BPP){const Jl=Gl.byteLength,$=new Uint32Array(Il.buffer,0,Il.byteLength>>2),ol=$.length,hl=ll+7>>3,pl=4294967295,zl=N.FeatureTest.isLittleEndian?4278190080:255;for(xl=0;xl<el;xl++){for(Ol=xl<F?R:B,Zl=0,bl=0;bl<Ol;bl++){const jl=Jl-Wl;let Ul=0;const Kl=jl>hl?ll:8*jl-7,le=-8&Kl;let Pl=0,ee=0;for(;Ul<le;Ul+=8)ee=Gl[Wl++],$[Zl++]=128&ee?pl:zl,$[Zl++]=64&ee?pl:zl,$[Zl++]=32&ee?pl:zl,$[Zl++]=16&ee?pl:zl,$[Zl++]=8&ee?pl:zl,$[Zl++]=4&ee?pl:zl,$[Zl++]=2&ee?pl:zl,$[Zl++]=1&ee?pl:zl;for(;Ul<Kl;Ul++)Pl===0&&(ee=Gl[Wl++],Pl=128),$[Zl++]=ee&Pl?pl:zl,Pl>>=1}for(;Zl<ol;)$[Zl++]=0;P.putImageData(dl,0,xl*R)}}else if(Q.kind===N.ImageKind.RGBA_32BPP){for(bl=0,_l=ll*R*4,xl=0;xl<F;xl++)Il.set(Gl.subarray(Wl,Wl+_l)),Wl+=_l,P.putImageData(dl,0,bl),bl+=R;xl<el&&(_l=ll*B*4,Il.set(Gl.subarray(Wl,Wl+_l)),P.putImageData(dl,0,bl))}else{if(Q.kind!==N.ImageKind.RGB_24BPP)throw new Error(`bad image kind: ${Q.kind}`);for(Ol=R,_l=ll*Ol,xl=0;xl<el;xl++){for(xl>=F&&(Ol=B,_l=ll*Ol),Zl=0,bl=_l;bl--;)Il[Zl++]=Gl[Wl++],Il[Zl++]=Gl[Wl++],Il[Zl++]=Gl[Wl++],Il[Zl++]=255;P.putImageData(dl,0,xl*R)}}}function C(P,Q){if(Q.bitmap){P.drawImage(Q.bitmap,0,0);return}const q=Q.height,ll=Q.width,B=q%R,F=(q-B)/R,el=B===0?F:F+1,dl=P.createImageData(ll,R);let Zl=0;const Wl=Q.data,Gl=dl.data;for(let Il=0;Il<el;Il++){const xl=Il<F?R:B;({srcPos:Zl}=(0,Y.convertBlackAndWhiteToRGBA)({src:Wl,srcPos:Zl,dest:Gl,width:ll,height:xl,nonBlackColor:0})),P.putImageData(dl,0,Il*R)}}function v(P,Q){const q=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const ll of q)P[ll]!==void 0&&(Q[ll]=P[ll]);P.setLineDash!==void 0&&(Q.setLineDash(P.getLineDash()),Q.lineDashOffset=P.lineDashOffset)}function K(P){P.strokeStyle=P.fillStyle="#000000",P.fillRule="nonzero",P.globalAlpha=1,P.lineWidth=1,P.lineCap="butt",P.lineJoin="miter",P.miterLimit=10,P.globalCompositeOperation="source-over",P.font="10px sans-serif",P.setLineDash!==void 0&&(P.setLineDash([]),P.lineDashOffset=0),S.isNodeJS||(P.filter="none")}function j(P,Q,q,ll){const B=P.length;for(let F=3;F<B;F+=4){const el=P[F];if(el===0)P[F-3]=Q,P[F-2]=q,P[F-1]=ll;else if(el<255){const dl=255-el;P[F-3]=P[F-3]*el+Q*dl>>8,P[F-2]=P[F-2]*el+q*dl>>8,P[F-1]=P[F-1]*el+ll*dl>>8}}}function O(P,Q,q){const ll=P.length;for(let B=3;B<ll;B+=4){const F=q?q[P[B]]:P[B];Q[B]=Q[B]*F*.00392156862745098|0}}function _(P,Q,q){const ll=P.length;for(let B=3;B<ll;B+=4){const F=77*P[B-3]+152*P[B-2]+28*P[B-1];Q[B]=q?Q[B]*q[F>>8]>>8:Q[B]*F>>16}}function cl(P,Q,q,ll){const B=ll[0],F=ll[1],el=ll[2]-B,dl=ll[3]-F;el!==0&&dl!==0&&(function(Zl,Wl,Gl,Il,xl,bl,Ol,_l,Jl,$,ol){const hl=!!bl,pl=hl?bl[0]:0,zl=hl?bl[1]:0,jl=hl?bl[2]:0;let Ul;Ul=xl==="Luminosity"?_:O;const Kl=Math.min(Il,Math.ceil(1048576/Gl));for(let le=0;le<Il;le+=Kl){const Pl=Math.min(Kl,Il-le),ee=Zl.getImageData(_l-$,le+(Jl-ol),Gl,Pl),ql=Wl.getImageData(_l,le+Jl,Gl,Pl);hl&&j(ee.data,pl,zl,jl),Ul(ee.data,ql.data,Ol),Wl.putImageData(ql,_l,le+Jl)}}(Q.context,q,el,dl,Q.subtype,Q.backdrop,Q.transferMap,B,F,Q.offsetX,Q.offsetY),P.save(),P.globalAlpha=1,P.globalCompositeOperation="source-over",P.setTransform(1,0,0,1,0,0),P.drawImage(q.canvas,0,0),P.restore())}function tl(P,Q){const q=N.Util.singularValueDecompose2dScale(P);q[0]=Math.fround(q[0]),q[1]=Math.fround(q[1]);const ll=Math.fround((globalThis.devicePixelRatio||1)*X.PixelsPerInch.PDF_TO_CSS_UNITS);return Q!==void 0?Q:q[0]<=ll||q[1]<=ll}const E=["butt","round","square"],il=["miter","round","bevel"],al={},Nl={},nl=class{constructor(P,Q,q,ll,B,F,el,dl){et(this,r),et(this,M);let{optionalContentConfig:Zl,markedContentStack:Wl=null}=F;this.ctx=P,this.current=new U(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=q,this.canvasFactory=ll,this.filterFactory=B,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=Wl||[],this.optionalContentConfig=Zl,this.cachedCanvases=new g(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=el,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=dl,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(P){let Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return typeof P=="string"?P.startsWith("g_")?this.commonObjs.get(P):this.objs.get(P):Q}beginDrawing(P){let{transform:Q,viewport:q,transparency:ll=!1,background:B=null}=P;const F=this.ctx.canvas.width,el=this.ctx.canvas.height,dl=this.ctx.fillStyle;if(this.ctx.fillStyle=B||"#ffffff",this.ctx.fillRect(0,0,F,el),this.ctx.fillStyle=dl,ll){const Zl=this.cachedCanvases.getCanvas("transparent",F,el);this.compositeCtx=this.ctx,this.transparentCanvas=Zl.canvas,this.ctx=Zl.context,this.ctx.save(),this.ctx.transform(...(0,X.getCurrentTransform)(this.compositeCtx))}this.ctx.save(),K(this.ctx),Q&&(this.ctx.transform(...Q),this.outputScaleX=Q[0],this.outputScaleY=Q[0]),this.ctx.transform(...q.transform),this.viewportScale=q.scale,this.baseTransform=(0,X.getCurrentTransform)(this.ctx)}executeOperatorList(P,Q,q,ll){const B=P.argsArray,F=P.fnArray;let el=Q||0;const dl=B.length;if(dl===el)return el;const Zl=dl-el>10&&typeof q=="function",Wl=Zl?Date.now()+15:0;let Gl=0;const Il=this.commonObjs,xl=this.objs;let bl;for(;;){if(ll!==void 0&&el===ll.nextBreakPoint)return ll.breakIt(el,q),el;if(bl=F[el],bl!==N.OPS.dependency)this[bl].apply(this,B[el]);else for(const Ol of B[el]){const _l=Ol.startsWith("g_")?Il:xl;if(!_l.has(Ol))return _l.get(Ol,q),el}if(el++,el===dl)return el;if(Zl&&++Gl>10){if(Date.now()>Wl)return q(),el;Gl=0}}}endDrawing(){nt(this,r,W).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const P of this._cachedBitmapsMap.values()){for(const Q of P.values())typeof HTMLCanvasElement<"u"&&Q instanceof HTMLCanvasElement&&(Q.width=Q.height=0);P.clear()}this._cachedBitmapsMap.clear(),nt(this,M,y).call(this)}_scaleImage(P,Q){const q=P.width,ll=P.height;let B,F,el=Math.max(Math.hypot(Q[0],Q[1]),1),dl=Math.max(Math.hypot(Q[2],Q[3]),1),Zl=q,Wl=ll,Gl="prescale1";for(;el>2&&Zl>1||dl>2&&Wl>1;){let Il=Zl,xl=Wl;el>2&&Zl>1&&(Il=Zl>=16384?Math.floor(Zl/2)-1||1:Math.ceil(Zl/2),el/=Zl/Il),dl>2&&Wl>1&&(xl=Wl>=16384?Math.floor(Wl/2)-1||1:Math.ceil(Wl)/2,dl/=Wl/xl),B=this.cachedCanvases.getCanvas(Gl,Il,xl),F=B.context,F.clearRect(0,0,Il,xl),F.drawImage(P,0,0,Zl,Wl,0,0,Il,xl),P=B.canvas,Zl=Il,Wl=xl,Gl=Gl==="prescale1"?"prescale2":"prescale1"}return{img:P,paintWidth:Zl,paintHeight:Wl}}_createMaskCanvas(P){const Q=this.ctx,{width:q,height:ll}=P,B=this.current.fillColor,F=this.current.patternFill,el=(0,X.getCurrentTransform)(Q);let dl,Zl,Wl,Gl;if((P.bitmap||P.data)&&P.count>1){const jl=P.bitmap||P.data.buffer;Zl=JSON.stringify(F?el:[el.slice(0,4),B]),dl=this._cachedBitmapsMap.get(jl),dl||(dl=new Map,this._cachedBitmapsMap.set(jl,dl));const Ul=dl.get(Zl);if(Ul&&!F)return{canvas:Ul,offsetX:Math.round(Math.min(el[0],el[2])+el[4]),offsetY:Math.round(Math.min(el[1],el[3])+el[5])};Wl=Ul}Wl||(Gl=this.cachedCanvases.getCanvas("maskCanvas",q,ll),C(Gl.context,P));let Il=N.Util.transform(el,[1/q,0,0,-1/ll,0,0]);Il=N.Util.transform(Il,[1,0,0,1,0,-ll]);const xl=N.Util.applyTransform([0,0],Il),bl=N.Util.applyTransform([q,ll],Il),Ol=N.Util.normalizeRect([xl[0],xl[1],bl[0],bl[1]]),_l=Math.round(Ol[2]-Ol[0])||1,Jl=Math.round(Ol[3]-Ol[1])||1,$=this.cachedCanvases.getCanvas("fillCanvas",_l,Jl),ol=$.context,hl=Math.min(xl[0],bl[0]),pl=Math.min(xl[1],bl[1]);ol.translate(-hl,-pl),ol.transform(...Il),Wl||(Wl=this._scaleImage(Gl.canvas,(0,X.getCurrentTransformInverse)(ol)),Wl=Wl.img,dl&&F&&dl.set(Zl,Wl)),ol.imageSmoothingEnabled=tl((0,X.getCurrentTransform)(ol),P.interpolate),J(ol,Wl,0,0,Wl.width,Wl.height,0,0,q,ll),ol.globalCompositeOperation="source-in";const zl=N.Util.transform((0,X.getCurrentTransformInverse)(ol),[1,0,0,1,-hl,-pl]);return ol.fillStyle=F?B.getPattern(Q,this,zl,z.PathType.FILL):B,ol.fillRect(0,0,q,ll),dl&&!F&&(this.cachedCanvases.delete("fillCanvas"),dl.set(Zl,$.canvas)),{canvas:$.canvas,offsetX:Math.round(hl),offsetY:Math.round(pl)}}setLineWidth(P){P!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=P,this.ctx.lineWidth=P}setLineCap(P){this.ctx.lineCap=E[P]}setLineJoin(P){this.ctx.lineJoin=il[P]}setMiterLimit(P){this.ctx.miterLimit=P}setDash(P,Q){const q=this.ctx;q.setLineDash!==void 0&&(q.setLineDash(P),q.lineDashOffset=Q)}setRenderingIntent(P){}setFlatness(P){}setGState(P){for(const[Q,q]of P)switch(Q){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[0],q[1]);break;case"CA":this.current.strokeAlpha=q;break;case"ca":this.current.fillAlpha=q,this.ctx.globalAlpha=q;break;case"BM":this.ctx.globalCompositeOperation=q;break;case"SMask":this.current.activeSMask=q?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(q)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const P=this.inSMaskMode;this.current.activeSMask&&!P?this.beginSMaskMode():!this.current.activeSMask&&P&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const P=this.ctx.canvas.width,Q=this.ctx.canvas.height,q="smaskGroupAt"+this.groupLevel,ll=this.cachedCanvases.getCanvas(q,P,Q);this.suspendedCtx=this.ctx,this.ctx=ll.context;const B=this.ctx;B.setTransform(...(0,X.getCurrentTransform)(this.suspendedCtx)),v(this.suspendedCtx,B),function(F,el){if(F._removeMirroring)throw new Error("Context is already forwarding operations.");F.__originalSave=F.save,F.__originalRestore=F.restore,F.__originalRotate=F.rotate,F.__originalScale=F.scale,F.__originalTranslate=F.translate,F.__originalTransform=F.transform,F.__originalSetTransform=F.setTransform,F.__originalResetTransform=F.resetTransform,F.__originalClip=F.clip,F.__originalMoveTo=F.moveTo,F.__originalLineTo=F.lineTo,F.__originalBezierCurveTo=F.bezierCurveTo,F.__originalRect=F.rect,F.__originalClosePath=F.closePath,F.__originalBeginPath=F.beginPath,F._removeMirroring=()=>{F.save=F.__originalSave,F.restore=F.__originalRestore,F.rotate=F.__originalRotate,F.scale=F.__originalScale,F.translate=F.__originalTranslate,F.transform=F.__originalTransform,F.setTransform=F.__originalSetTransform,F.resetTransform=F.__originalResetTransform,F.clip=F.__originalClip,F.moveTo=F.__originalMoveTo,F.lineTo=F.__originalLineTo,F.bezierCurveTo=F.__originalBezierCurveTo,F.rect=F.__originalRect,F.closePath=F.__originalClosePath,F.beginPath=F.__originalBeginPath,delete F._removeMirroring},F.save=function(){el.save(),this.__originalSave()},F.restore=function(){el.restore(),this.__originalRestore()},F.translate=function(dl,Zl){el.translate(dl,Zl),this.__originalTranslate(dl,Zl)},F.scale=function(dl,Zl){el.scale(dl,Zl),this.__originalScale(dl,Zl)},F.transform=function(dl,Zl,Wl,Gl,Il,xl){el.transform(dl,Zl,Wl,Gl,Il,xl),this.__originalTransform(dl,Zl,Wl,Gl,Il,xl)},F.setTransform=function(dl,Zl,Wl,Gl,Il,xl){el.setTransform(dl,Zl,Wl,Gl,Il,xl),this.__originalSetTransform(dl,Zl,Wl,Gl,Il,xl)},F.resetTransform=function(){el.resetTransform(),this.__originalResetTransform()},F.rotate=function(dl){el.rotate(dl),this.__originalRotate(dl)},F.clip=function(dl){el.clip(dl),this.__originalClip(dl)},F.moveTo=function(dl,Zl){el.moveTo(dl,Zl),this.__originalMoveTo(dl,Zl)},F.lineTo=function(dl,Zl){el.lineTo(dl,Zl),this.__originalLineTo(dl,Zl)},F.bezierCurveTo=function(dl,Zl,Wl,Gl,Il,xl){el.bezierCurveTo(dl,Zl,Wl,Gl,Il,xl),this.__originalBezierCurveTo(dl,Zl,Wl,Gl,Il,xl)},F.rect=function(dl,Zl,Wl,Gl){el.rect(dl,Zl,Wl,Gl),this.__originalRect(dl,Zl,Wl,Gl)},F.closePath=function(){el.closePath(),this.__originalClosePath()},F.beginPath=function(){el.beginPath(),this.__originalBeginPath()}}(B,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(),v(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(P){if(!this.current.activeSMask)return;P?(P[0]=Math.floor(P[0]),P[1]=Math.floor(P[1]),P[2]=Math.ceil(P[2]),P[3]=Math.ceil(P[3])):P=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const Q=this.current.activeSMask;cl(this.suspendedCtx,Q,this.ctx,P),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}save(){this.inSMaskMode?(v(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const P=this.current;this.stateStack.push(P),this.current=P.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),v(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(P,Q,q,ll,B,F){this.ctx.transform(P,Q,q,ll,B,F),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(P,Q,q){const ll=this.ctx,B=this.current;let F,el,dl=B.x,Zl=B.y;const Wl=(0,X.getCurrentTransform)(ll),Gl=Wl[0]===0&&Wl[3]===0||Wl[1]===0&&Wl[2]===0,Il=Gl?q.slice(0):null;for(let xl=0,bl=0,Ol=P.length;xl<Ol;xl++)switch(0|P[xl]){case N.OPS.rectangle:dl=Q[bl++],Zl=Q[bl++];const _l=Q[bl++],Jl=Q[bl++],$=dl+_l,ol=Zl+Jl;ll.moveTo(dl,Zl),_l===0||Jl===0?ll.lineTo($,ol):(ll.lineTo($,Zl),ll.lineTo($,ol),ll.lineTo(dl,ol)),Gl||B.updateRectMinMax(Wl,[dl,Zl,$,ol]),ll.closePath();break;case N.OPS.moveTo:dl=Q[bl++],Zl=Q[bl++],ll.moveTo(dl,Zl),Gl||B.updatePathMinMax(Wl,dl,Zl);break;case N.OPS.lineTo:dl=Q[bl++],Zl=Q[bl++],ll.lineTo(dl,Zl),Gl||B.updatePathMinMax(Wl,dl,Zl);break;case N.OPS.curveTo:F=dl,el=Zl,dl=Q[bl+4],Zl=Q[bl+5],ll.bezierCurveTo(Q[bl],Q[bl+1],Q[bl+2],Q[bl+3],dl,Zl),B.updateCurvePathMinMax(Wl,F,el,Q[bl],Q[bl+1],Q[bl+2],Q[bl+3],dl,Zl,Il),bl+=6;break;case N.OPS.curveTo2:F=dl,el=Zl,ll.bezierCurveTo(dl,Zl,Q[bl],Q[bl+1],Q[bl+2],Q[bl+3]),B.updateCurvePathMinMax(Wl,F,el,dl,Zl,Q[bl],Q[bl+1],Q[bl+2],Q[bl+3],Il),dl=Q[bl+2],Zl=Q[bl+3],bl+=4;break;case N.OPS.curveTo3:F=dl,el=Zl,dl=Q[bl+2],Zl=Q[bl+3],ll.bezierCurveTo(Q[bl],Q[bl+1],dl,Zl,dl,Zl),B.updateCurvePathMinMax(Wl,F,el,Q[bl],Q[bl+1],dl,Zl,dl,Zl,Il),bl+=4;break;case N.OPS.closePath:ll.closePath()}Gl&&B.updateScalingPathMinMax(Wl,Il),B.setCurrentPoint(dl,Zl)}closePath(){this.ctx.closePath()}stroke(){let P=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];const Q=this.ctx,q=this.current.strokeColor;Q.globalAlpha=this.current.strokeAlpha,this.contentVisible&&(typeof q=="object"&&q!=null&&q.getPattern?(Q.save(),Q.strokeStyle=q.getPattern(Q,this,(0,X.getCurrentTransformInverse)(Q),z.PathType.STROKE),this.rescaleAndStroke(!1),Q.restore()):this.rescaleAndStroke(!0)),P&&this.consumePath(this.current.getClippedPathBoundingBox()),Q.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(){let P=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];const Q=this.ctx,q=this.current.fillColor;let ll=!1;this.current.patternFill&&(Q.save(),Q.fillStyle=q.getPattern(Q,this,(0,X.getCurrentTransformInverse)(Q),z.PathType.FILL),ll=!0);const B=this.current.getClippedPathBoundingBox();this.contentVisible&&B!==null&&(this.pendingEOFill?(Q.fill("evenodd"),this.pendingEOFill=!1):Q.fill()),ll&&Q.restore(),P&&this.consumePath(B)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=al}eoClip(){this.pendingClip=Nl}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 P=this.pendingTextPaths,Q=this.ctx;if(P!==void 0){Q.save(),Q.beginPath();for(const q of P)Q.setTransform(...q.transform),Q.translate(q.x,q.y),q.addToPath(Q,q.fontSize);Q.restore(),Q.clip(),Q.beginPath(),delete this.pendingTextPaths}else Q.beginPath()}setCharSpacing(P){this.current.charSpacing=P}setWordSpacing(P){this.current.wordSpacing=P}setHScale(P){this.current.textHScale=P/100}setLeading(P){this.current.leading=-P}setFont(P,Q){var q;const ll=this.commonObjs.get(P),B=this.current;if(!ll)throw new Error(`Can't find font for ${P}`);if(B.fontMatrix=ll.fontMatrix||N.FONT_IDENTITY_MATRIX,B.fontMatrix[0]!==0&&B.fontMatrix[3]!==0||(0,N.warn)("Invalid font matrix for font "+P),Q<0?(Q=-Q,B.fontDirection=-1):B.fontDirection=1,this.current.font=ll,this.current.fontSize=Q,ll.isType3Font)return;const F=ll.loadedName||"sans-serif",el=((q=ll.systemFontInfo)===null||q===void 0?void 0:q.css)||`"${F}", ${ll.fallbackName}`;let dl="normal";ll.black?dl="900":ll.bold&&(dl="bold");const Zl=ll.italic?"italic":"normal";let Wl=Q;Q<16?Wl=16:Q>100&&(Wl=100),this.current.fontSizeScale=Q/Wl,this.ctx.font=`${Zl} ${dl} ${Wl}px ${el}`}setTextRenderingMode(P){this.current.textRenderingMode=P}setTextRise(P){this.current.textRise=P}moveText(P,Q){this.current.x=this.current.lineX+=P,this.current.y=this.current.lineY+=Q}setLeadingMoveText(P,Q){this.setLeading(-Q),this.moveText(P,Q)}setTextMatrix(P,Q,q,ll,B,F){this.current.textMatrix=[P,Q,q,ll,B,F],this.current.textMatrixScale=Math.hypot(P,Q),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(P,Q,q,ll){const B=this.ctx,F=this.current,el=F.font,dl=F.textRenderingMode,Zl=F.fontSize/F.fontSizeScale,Wl=dl&N.TextRenderingMode.FILL_STROKE_MASK,Gl=!!(dl&N.TextRenderingMode.ADD_TO_PATH_FLAG),Il=F.patternFill&&!el.missingFile;let xl;(el.disableFontFace||Gl||Il)&&(xl=el.getPathGenerator(this.commonObjs,P)),el.disableFontFace||Il?(B.save(),B.translate(Q,q),B.beginPath(),xl(B,Zl),ll&&B.setTransform(...ll),Wl!==N.TextRenderingMode.FILL&&Wl!==N.TextRenderingMode.FILL_STROKE||B.fill(),Wl!==N.TextRenderingMode.STROKE&&Wl!==N.TextRenderingMode.FILL_STROKE||B.stroke(),B.restore()):(Wl!==N.TextRenderingMode.FILL&&Wl!==N.TextRenderingMode.FILL_STROKE||B.fillText(P,Q,q),Wl!==N.TextRenderingMode.STROKE&&Wl!==N.TextRenderingMode.FILL_STROKE||B.strokeText(P,Q,q)),Gl&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:(0,X.getCurrentTransform)(B),x:Q,y:q,fontSize:Zl,addToPath:xl})}get isFontSubpixelAAEnabled(){const{context:P}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);P.scale(1.5,1),P.fillText("I",0,10);const Q=P.getImageData(0,0,10,10).data;let q=!1;for(let ll=3;ll<Q.length;ll+=4)if(Q[ll]>0&&Q[ll]<255){q=!0;break}return(0,N.shadow)(this,"isFontSubpixelAAEnabled",q)}showText(P){const Q=this.current,q=Q.font;if(q.isType3Font)return this.showType3Text(P);const ll=Q.fontSize;if(ll===0)return;const B=this.ctx,F=Q.fontSizeScale,el=Q.charSpacing,dl=Q.wordSpacing,Zl=Q.fontDirection,Wl=Q.textHScale*Zl,Gl=P.length,Il=q.vertical,xl=Il?1:-1,bl=q.defaultVMetrics,Ol=ll*Q.fontMatrix[0],_l=Q.textRenderingMode===N.TextRenderingMode.FILL&&!q.disableFontFace&&!Q.patternFill;B.save(),B.transform(...Q.textMatrix),B.translate(Q.x,Q.y+Q.textRise),Zl>0?B.scale(Wl,-1):B.scale(Wl,1);let Jl;if(Q.patternFill){B.save();const zl=Q.fillColor.getPattern(B,this,(0,X.getCurrentTransformInverse)(B),z.PathType.FILL);Jl=(0,X.getCurrentTransform)(B),B.restore(),B.fillStyle=zl}let $=Q.lineWidth;const ol=Q.textMatrixScale;if(ol===0||$===0){const zl=Q.textRenderingMode&N.TextRenderingMode.FILL_STROKE_MASK;zl!==N.TextRenderingMode.STROKE&&zl!==N.TextRenderingMode.FILL_STROKE||($=this.getSinglePixelWidth())}else $/=ol;if(F!==1&&(B.scale(F,F),$/=F),B.lineWidth=$,q.isInvalidPDFjsFont){const zl=[];let jl=0;for(const Ul of P)zl.push(Ul.unicode),jl+=Ul.width;B.fillText(zl.join(""),0,0),Q.x+=jl*Ol*Wl,B.restore(),this.compose();return}let hl,pl=0;for(hl=0;hl<Gl;++hl){const zl=P[hl];if(typeof zl=="number"){pl+=xl*zl*ll/1e3;continue}let jl=!1;const Ul=(zl.isSpace?dl:0)+el,Kl=zl.fontChar,le=zl.accent;let Pl,ee,ql,ie=zl.width;if(Il){const ce=zl.vmetric||bl,Ge=-(zl.vmetric?ce[1]:.5*ie)*Ol,Dl=ce[2]*Ol;ie=ce?-ce[0]:ie,Pl=Ge/F,ee=(pl+Dl)/F}else Pl=pl/F,ee=0;if(q.remeasure&&ie>0){const ce=1e3*B.measureText(Kl).width/ll*F;if(ie<ce&&this.isFontSubpixelAAEnabled){const Ge=ie/ce;jl=!0,B.save(),B.scale(Ge,1),Pl/=Ge}else ie!==ce&&(Pl+=(ie-ce)/2e3*ll/F)}if(this.contentVisible&&(zl.isInFont||q.missingFile)){if(_l&&!le)B.fillText(Kl,Pl,ee);else if(this.paintChar(Kl,Pl,ee,Jl),le){const ce=Pl+ll*le.offset.x/F,Ge=ee-ll*le.offset.y/F;this.paintChar(le.fontChar,ce,Ge,Jl)}}ql=Il?ie*Ol-Ul*Zl:ie*Ol+Ul*Zl,pl+=ql,jl&&B.restore()}Il?Q.y-=pl:Q.x+=pl*Wl,B.restore(),this.compose()}showType3Text(P){const Q=this.ctx,q=this.current,ll=q.font,B=q.fontSize,F=q.fontDirection,el=ll.vertical?1:-1,dl=q.charSpacing,Zl=q.wordSpacing,Wl=q.textHScale*F,Gl=q.fontMatrix||N.FONT_IDENTITY_MATRIX,Il=P.length;let xl,bl,Ol,_l;if(q.textRenderingMode!==N.TextRenderingMode.INVISIBLE&&B!==0){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,Q.save(),Q.transform(...q.textMatrix),Q.translate(q.x,q.y),Q.scale(Wl,F),xl=0;xl<Il;++xl){if(bl=P[xl],typeof bl=="number"){_l=el*bl*B/1e3,this.ctx.translate(_l,0),q.x+=_l*Wl;continue}const Jl=(bl.isSpace?Zl:0)+dl,$=ll.charProcOperatorList[bl.operatorListId];if(!$){(0,N.warn)(`Type3 character "${bl.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=bl,this.save(),Q.scale(B,B),Q.transform(...Gl),this.executeOperatorList($),this.restore()),Ol=N.Util.applyTransform([bl.width,0],Gl)[0]*B+Jl,Q.translate(Ol,0),q.x+=Ol*Wl}Q.restore(),this.processingType3=null}}setCharWidth(P,Q){}setCharWidthAndBounds(P,Q,q,ll,B,F){this.ctx.rect(q,ll,B-q,F-ll),this.ctx.clip(),this.endPath()}getColorN_Pattern(P){let Q;if(P[0]==="TilingPattern"){const q=P[1],ll=this.baseTransform||(0,X.getCurrentTransform)(this.ctx),B={createCanvasGraphics:F=>new nl(F,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};Q=new z.TilingPattern(P,q,this.ctx,B,ll)}else Q=this._getPattern(P[1],P[2]);return Q}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(P,Q,q){const ll=N.Util.makeHexColor(P,Q,q);this.ctx.strokeStyle=ll,this.current.strokeColor=ll}setFillRGBColor(P,Q,q){const ll=N.Util.makeHexColor(P,Q,q);this.ctx.fillStyle=ll,this.current.fillColor=ll,this.current.patternFill=!1}_getPattern(P){let Q,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return this.cachedPatterns.has(P)?Q=this.cachedPatterns.get(P):(Q=(0,z.getShadingPattern)(this.getObject(P)),this.cachedPatterns.set(P,Q)),q&&(Q.matrix=q),Q}shadingFill(P){if(!this.contentVisible)return;const Q=this.ctx;this.save();const q=this._getPattern(P);Q.fillStyle=q.getPattern(Q,this,(0,X.getCurrentTransformInverse)(Q),z.PathType.SHADING);const ll=(0,X.getCurrentTransformInverse)(Q);if(ll){const B=Q.canvas,F=B.width,el=B.height,dl=N.Util.applyTransform([0,0],ll),Zl=N.Util.applyTransform([0,el],ll),Wl=N.Util.applyTransform([F,0],ll),Gl=N.Util.applyTransform([F,el],ll),Il=Math.min(dl[0],Zl[0],Wl[0],Gl[0]),xl=Math.min(dl[1],Zl[1],Wl[1],Gl[1]),bl=Math.max(dl[0],Zl[0],Wl[0],Gl[0]),Ol=Math.max(dl[1],Zl[1],Wl[1],Gl[1]);this.ctx.fillRect(Il,xl,bl-Il,Ol-xl)}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(P,Q){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(P)&&P.length===6&&this.transform(...P),this.baseTransform=(0,X.getCurrentTransform)(this.ctx),Q)){const q=Q[2]-Q[0],ll=Q[3]-Q[1];this.ctx.rect(Q[0],Q[1],q,ll),this.current.updateRectMinMax((0,X.getCurrentTransform)(this.ctx),Q),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(P){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const Q=this.ctx;P.isolated||(0,N.info)("TODO: Support non-isolated groups."),P.knockout&&(0,N.warn)("Knockout groups not supported.");const q=(0,X.getCurrentTransform)(Q);if(P.matrix&&Q.transform(...P.matrix),!P.bbox)throw new Error("Bounding box is required.");let ll=N.Util.getAxialAlignedBoundingBox(P.bbox,(0,X.getCurrentTransform)(Q));const B=[0,0,Q.canvas.width,Q.canvas.height];ll=N.Util.intersect(ll,B)||[0,0,0,0];const F=Math.floor(ll[0]),el=Math.floor(ll[1]);let dl=Math.max(Math.ceil(ll[2])-F,1),Zl=Math.max(Math.ceil(ll[3])-el,1),Wl=1,Gl=1;dl>D&&(Wl=dl/D,dl=D),Zl>D&&(Gl=Zl/D,Zl=D),this.current.startNewPathAndClipBox([0,0,dl,Zl]);let Il="groupAt"+this.groupLevel;P.smask&&(Il+="_smask_"+this.smaskCounter++%2);const xl=this.cachedCanvases.getCanvas(Il,dl,Zl),bl=xl.context;bl.scale(1/Wl,1/Gl),bl.translate(-F,-el),bl.transform(...q),P.smask?this.smaskStack.push({canvas:xl.canvas,context:bl,offsetX:F,offsetY:el,scaleX:Wl,scaleY:Gl,subtype:P.smask.subtype,backdrop:P.smask.backdrop,transferMap:P.smask.transferMap||null,startTransformInverse:null}):(Q.setTransform(1,0,0,1,0,0),Q.translate(F,el),Q.scale(Wl,Gl),Q.save()),v(Q,bl),this.ctx=bl,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(Q),this.groupLevel++}endGroup(P){if(!this.contentVisible)return;this.groupLevel--;const Q=this.ctx,q=this.groupStack.pop();if(this.ctx=q,this.ctx.imageSmoothingEnabled=!1,P.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const ll=(0,X.getCurrentTransform)(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...ll);const B=N.Util.getAxialAlignedBoundingBox([0,0,Q.canvas.width,Q.canvas.height],ll);this.ctx.drawImage(Q.canvas,0,0),this.ctx.restore(),this.compose(B)}}beginAnnotation(P,Q,q,ll,B){if(nt(this,r,W).call(this),K(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Array.isArray(Q)&&Q.length===4){const F=Q[2]-Q[0],el=Q[3]-Q[1];if(B&&this.annotationCanvasMap){(q=q.slice())[4]-=Q[0],q[5]-=Q[1],(Q=Q.slice())[0]=Q[1]=0,Q[2]=F,Q[3]=el;const[dl,Zl]=N.Util.singularValueDecompose2dScale((0,X.getCurrentTransform)(this.ctx)),{viewportScale:Wl}=this,Gl=Math.ceil(F*this.outputScaleX*Wl),Il=Math.ceil(el*this.outputScaleY*Wl);this.annotationCanvas=this.canvasFactory.create(Gl,Il);const{canvas:xl,context:bl}=this.annotationCanvas;this.annotationCanvasMap.set(P,xl),this.annotationCanvas.savedCtx=this.ctx,this.ctx=bl,this.ctx.save(),this.ctx.setTransform(dl,0,0,-Zl,0,el*Zl),K(this.ctx)}else K(this.ctx),this.ctx.rect(Q[0],Q[1],F,el),this.ctx.clip(),this.endPath()}this.current=new U(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...q),this.transform(...ll)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),nt(this,M,y).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(P){if(!this.contentVisible)return;const Q=P.count;(P=this.getObject(P.data,P)).count=Q;const q=this.ctx,ll=this.processingType3;if(ll&&(ll.compiled===void 0&&(ll.compiled=function(el){const{width:dl,height:Zl}=el;if(dl>1e3||Zl>1e3)return null;const Wl=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),Gl=dl+1;let Il,xl,bl,Ol=new Uint8Array(Gl*(Zl+1));const _l=dl+7&-8;let Jl=new Uint8Array(_l*Zl),$=0;for(const zl of el.data){let jl=128;for(;jl>0;)Jl[$++]=zl&jl?0:255,jl>>=1}let ol=0;for($=0,Jl[$]!==0&&(Ol[0]=1,++ol),xl=1;xl<dl;xl++)Jl[$]!==Jl[$+1]&&(Ol[xl]=Jl[$]?2:1,++ol),$++;for(Jl[$]!==0&&(Ol[xl]=2,++ol),Il=1;Il<Zl;Il++){$=Il*_l,bl=Il*Gl,Jl[$-_l]!==Jl[$]&&(Ol[bl]=Jl[$]?1:8,++ol);let zl=(Jl[$]?4:0)+(Jl[$-_l]?8:0);for(xl=1;xl<dl;xl++)zl=(zl>>2)+(Jl[$+1]?4:0)+(Jl[$-_l+1]?8:0),Wl[zl]&&(Ol[bl+xl]=Wl[zl],++ol),$++;if(Jl[$-_l]!==Jl[$]&&(Ol[bl+xl]=Jl[$]?2:4,++ol),ol>1e3)return null}for($=_l*(Zl-1),bl=Il*Gl,Jl[$]!==0&&(Ol[bl]=8,++ol),xl=1;xl<dl;xl++)Jl[$]!==Jl[$+1]&&(Ol[bl+xl]=Jl[$]?4:8,++ol),$++;if(Jl[$]!==0&&(Ol[bl+xl]=4,++ol),ol>1e3)return null;const hl=new Int32Array([0,Gl,-1,0,-Gl,0,0,0,1]),pl=new Path2D;for(Il=0;ol&&Il<=Zl;Il++){let zl=Il*Gl;const jl=zl+dl;for(;zl<jl&&!Ol[zl];)zl++;if(zl===jl)continue;pl.moveTo(zl%Gl,Il);const Ul=zl;let Kl=Ol[zl];do{const le=hl[Kl];do zl+=le;while(!Ol[zl]);const Pl=Ol[zl];Pl!==5&&Pl!==10?(Kl=Pl,Ol[zl]=0):(Kl=Pl&51*Kl>>4,Ol[zl]&=Kl>>2|Kl<<2),pl.lineTo(zl%Gl,zl/Gl|0),Ol[zl]||--ol}while(Ul!==zl);--Il}return Jl=null,Ol=null,function(zl){zl.save(),zl.scale(1/dl,-1/Zl),zl.translate(0,-Zl),zl.fill(pl),zl.beginPath(),zl.restore()}}(P)),ll.compiled)){ll.compiled(q);return}const B=this._createMaskCanvas(P),F=B.canvas;q.save(),q.setTransform(1,0,0,1,0,0),q.drawImage(F,B.offsetX,B.offsetY),q.restore(),this.compose()}paintImageMaskXObjectRepeat(P,Q){let q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,ll=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,B=arguments.length>4?arguments[4]:void 0,F=arguments.length>5?arguments[5]:void 0;if(!this.contentVisible)return;P=this.getObject(P.data,P);const el=this.ctx;el.save();const dl=(0,X.getCurrentTransform)(el);el.transform(Q,q,ll,B,0,0);const Zl=this._createMaskCanvas(P);el.setTransform(1,0,0,1,Zl.offsetX-dl[4],Zl.offsetY-dl[5]);for(let Wl=0,Gl=F.length;Wl<Gl;Wl+=2){const Il=N.Util.transform(dl,[Q,q,ll,B,F[Wl],F[Wl+1]]),[xl,bl]=N.Util.applyTransform([0,0],Il);el.drawImage(Zl.canvas,xl,bl)}el.restore(),this.compose()}paintImageMaskXObjectGroup(P){if(!this.contentVisible)return;const Q=this.ctx,q=this.current.fillColor,ll=this.current.patternFill;for(const B of P){const{data:F,width:el,height:dl,transform:Zl}=B,Wl=this.cachedCanvases.getCanvas("maskCanvas",el,dl),Gl=Wl.context;Gl.save(),C(Gl,this.getObject(F,B)),Gl.globalCompositeOperation="source-in",Gl.fillStyle=ll?q.getPattern(Gl,this,(0,X.getCurrentTransformInverse)(Q),z.PathType.FILL):q,Gl.fillRect(0,0,el,dl),Gl.restore(),Q.save(),Q.transform(...Zl),Q.scale(1,-1),J(Q,Wl.canvas,0,0,el,dl,0,-1,1,1),Q.restore()}this.compose()}paintImageXObject(P){if(!this.contentVisible)return;const Q=this.getObject(P);Q?this.paintInlineImageXObject(Q):(0,N.warn)("Dependent image isn't ready yet")}paintImageXObjectRepeat(P,Q,q,ll){if(!this.contentVisible)return;const B=this.getObject(P);if(!B){(0,N.warn)("Dependent image isn't ready yet");return}const F=B.width,el=B.height,dl=[];for(let Zl=0,Wl=ll.length;Zl<Wl;Zl+=2)dl.push({transform:[Q,0,0,q,ll[Zl],ll[Zl+1]],x:0,y:0,w:F,h:el});this.paintInlineImageXObjectGroup(B,dl)}applyTransferMapsToCanvas(P){return this.current.transferMaps!=="none"&&(P.filter=this.current.transferMaps,P.drawImage(P.canvas,0,0),P.filter="none"),P.canvas}applyTransferMapsToBitmap(P){if(this.current.transferMaps==="none")return P.bitmap;const{bitmap:Q,width:q,height:ll}=P,B=this.cachedCanvases.getCanvas("inlineImage",q,ll),F=B.context;return F.filter=this.current.transferMaps,F.drawImage(Q,0,0),F.filter="none",B.canvas}paintInlineImageXObject(P){if(!this.contentVisible)return;const Q=P.width,q=P.height,ll=this.ctx;this.save(),S.isNodeJS||(ll.filter="none"),ll.scale(1/Q,-1/q);let B;if(P.bitmap)B=this.applyTransferMapsToBitmap(P);else if(typeof HTMLElement=="function"&&P instanceof HTMLElement||!P.data)B=P;else{const el=this.cachedCanvases.getCanvas("inlineImage",Q,q).context;H(el,P),B=this.applyTransferMapsToCanvas(el)}const F=this._scaleImage(B,(0,X.getCurrentTransformInverse)(ll));ll.imageSmoothingEnabled=tl((0,X.getCurrentTransform)(ll),P.interpolate),J(ll,F.img,0,0,F.paintWidth,F.paintHeight,0,-q,Q,q),this.compose(),this.restore()}paintInlineImageXObjectGroup(P,Q){if(!this.contentVisible)return;const q=this.ctx;let ll;if(P.bitmap)ll=P.bitmap;else{const B=P.width,F=P.height,el=this.cachedCanvases.getCanvas("inlineImage",B,F).context;H(el,P),ll=this.applyTransferMapsToCanvas(el)}for(const B of Q)q.save(),q.transform(...B.transform),q.scale(1,-1),J(q,ll,B.x,B.y,B.w,B.h,0,-1,1,1),q.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(P){}markPointProps(P,Q){}beginMarkedContent(P){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(P,Q){P==="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(P){const Q=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(P);const q=this.ctx;this.pendingClip&&(Q||(this.pendingClip===Nl?q.clip("evenodd"):q.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),q.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const P=(0,X.getCurrentTransform)(this.ctx);if(P[1]===0&&P[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(P[0]),Math.abs(P[3]));else{const Q=Math.abs(P[0]*P[3]-P[2]*P[1]),q=Math.hypot(P[0],P[2]),ll=Math.hypot(P[1],P[3]);this._cachedGetSinglePixelWidth=Math.max(q,ll)/Q}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:P}=this.current,{a:Q,b:q,c:ll,d:B}=this.ctx.getTransform();let F,el;if(q===0&&ll===0){const dl=Math.abs(Q),Zl=Math.abs(B);if(dl===Zl)if(P===0)F=el=1/dl;else{const Wl=dl*P;F=el=Wl<1?1/Wl:1}else if(P===0)F=1/dl,el=1/Zl;else{const Wl=dl*P,Gl=Zl*P;F=Wl<1?1/Wl:1,el=Gl<1?1/Gl:1}}else{const dl=Math.abs(Q*B-q*ll),Zl=Math.hypot(Q,q),Wl=Math.hypot(ll,B);if(P===0)F=Wl/dl,el=Zl/dl;else{const Gl=P*dl;F=Wl>Gl?Wl/Gl:1,el=Zl>Gl?Zl/Gl:1}}this._cachedScaleForStroking[0]=F,this._cachedScaleForStroking[1]=el}return this._cachedScaleForStroking}rescaleAndStroke(P){const{ctx:Q}=this,{lineWidth:q}=this.current,[ll,B]=this.getScaleForStroking();if(Q.lineWidth=q||1,ll===1&&B===1){Q.stroke();return}const F=Q.getLineDash();if(P&&Q.save(),Q.scale(ll,B),F.length>0){const el=Math.max(ll,B);Q.setLineDash(F.map(dl=>dl/el)),Q.lineDashOffset/=el}Q.stroke(),P&&Q.restore()}isContentVisible(){for(let P=this.markedContentStack.length-1;P>=0;P--)if(!this.markedContentStack[P].visible)return!1;return!0}};let Sl=nl;r=new WeakSet,W=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)},M=new WeakSet,y=function(){if(this.pageColors){const P=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(P!=="none"){const Q=this.ctx.filter;this.ctx.filter=P,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=Q}}},u.CanvasGraphics=Sl;for(const P in N.OPS)Sl.prototype[P]!==void 0&&(Sl.prototype[N.OPS[P]]=Sl.prototype[P])},(s,u,o)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TilingPattern=u.PathType=void 0,u.getShadingPattern=function(H){switch(H[0]){case"RadialAxial":return new X(H);case"Mesh":return new S(H);case"Dummy":return new D}throw new Error(`Unknown IR type: ${H[0]}`)};var r=o(1),W=o(142);const M={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};u.PathType=M;function y(H,C){if(!C)return;const v=C[2]-C[0],K=C[3]-C[1],j=new Path2D;j.rect(C[0],C[1],v,K),H.clip(j)}class N{constructor(){this.constructor===N&&(0,r.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,r.unreachable)("Abstract method `getPattern` called.")}}class X extends N{constructor(C){super(),this._type=C[1],this._bbox=C[2],this._colorStops=C[3],this._p0=C[4],this._p1=C[5],this._r0=C[6],this._r1=C[7],this.matrix=null}_createGradient(C){let v;this._type==="axial"?v=C.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(v=C.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const K of this._colorStops)v.addColorStop(K[0],K[1]);return v}getPattern(C,v,K,j){let O;if(j===M.STROKE||j===M.FILL){const _=v.current.getClippedPathBoundingBox(j,(0,W.getCurrentTransform)(C))||[0,0,0,0],cl=Math.ceil(_[2]-_[0])||1,tl=Math.ceil(_[3]-_[1])||1,E=v.cachedCanvases.getCanvas("pattern",cl,tl,!0),il=E.context;il.clearRect(0,0,il.canvas.width,il.canvas.height),il.beginPath(),il.rect(0,0,il.canvas.width,il.canvas.height),il.translate(-_[0],-_[1]),K=r.Util.transform(K,[1,0,0,1,_[0],_[1]]),il.transform(...v.baseTransform),this.matrix&&il.transform(...this.matrix),y(il,this._bbox),il.fillStyle=this._createGradient(il),il.fill(),O=C.createPattern(E.canvas,"no-repeat");const al=new DOMMatrix(K);O.setTransform(al)}else y(C,this._bbox),O=this._createGradient(C);return O}}function z(H,C,v,K,j,O,_,cl){const tl=C.coords,E=C.colors,il=H.data,al=4*H.width;let Nl;tl[v+1]>tl[K+1]&&(Nl=v,v=K,K=Nl,Nl=O,O=_,_=Nl),tl[K+1]>tl[j+1]&&(Nl=K,K=j,j=Nl,Nl=_,_=cl,cl=Nl),tl[v+1]>tl[K+1]&&(Nl=v,v=K,K=Nl,Nl=O,O=_,_=Nl);const nl=(tl[v]+C.offsetX)*C.scaleX,Sl=(tl[v+1]+C.offsetY)*C.scaleY,P=(tl[K]+C.offsetX)*C.scaleX,Q=(tl[K+1]+C.offsetY)*C.scaleY,q=(tl[j]+C.offsetX)*C.scaleX,ll=(tl[j+1]+C.offsetY)*C.scaleY;if(Sl>=ll)return;const B=E[O],F=E[O+1],el=E[O+2],dl=E[_],Zl=E[_+1],Wl=E[_+2],Gl=E[cl],Il=E[cl+1],xl=E[cl+2],bl=Math.round(Sl),Ol=Math.round(ll);let _l,Jl,$,ol,hl,pl,zl,jl;for(let Ul=bl;Ul<=Ol;Ul++){if(Ul<Q){let ql;ql=Ul<Sl?0:(Sl-Ul)/(Sl-Q),_l=nl-(nl-P)*ql,Jl=B-(B-dl)*ql,$=F-(F-Zl)*ql,ol=el-(el-Wl)*ql}else{let ql;ql=Ul>ll?1:Q===ll?0:(Q-Ul)/(Q-ll),_l=P-(P-q)*ql,Jl=dl-(dl-Gl)*ql,$=Zl-(Zl-Il)*ql,ol=Wl-(Wl-xl)*ql}let Kl;Kl=Ul<Sl?0:Ul>ll?1:(Sl-Ul)/(Sl-ll),hl=nl-(nl-q)*Kl,pl=B-(B-Gl)*Kl,zl=F-(F-Il)*Kl,jl=el-(el-xl)*Kl;const le=Math.round(Math.min(_l,hl)),Pl=Math.round(Math.max(_l,hl));let ee=al*Ul+4*le;for(let ql=le;ql<=Pl;ql++)Kl=(_l-ql)/(_l-hl),Kl<0?Kl=0:Kl>1&&(Kl=1),il[ee++]=Jl-(Jl-pl)*Kl|0,il[ee++]=$-($-zl)*Kl|0,il[ee++]=ol-(ol-jl)*Kl|0,il[ee++]=255}}function Y(H,C,v){const K=C.coords,j=C.colors;let O,_;switch(C.type){case"lattice":const cl=C.verticesPerRow,tl=Math.floor(K.length/cl)-1,E=cl-1;for(O=0;O<tl;O++){let il=O*cl;for(let al=0;al<E;al++,il++)z(H,v,K[il],K[il+1],K[il+cl],j[il],j[il+1],j[il+cl]),z(H,v,K[il+cl+1],K[il+1],K[il+cl],j[il+cl+1],j[il+1],j[il+cl])}break;case"triangles":for(O=0,_=K.length;O<_;O+=3)z(H,v,K[O],K[O+1],K[O+2],j[O],j[O+1],j[O+2]);break;default:throw new Error("illegal figure")}}class S extends N{constructor(C){super(),this._coords=C[2],this._colors=C[3],this._figures=C[4],this._bounds=C[5],this._bbox=C[7],this._background=C[8],this.matrix=null}_createMeshCanvas(C,v,K){const j=Math.floor(this._bounds[0]),O=Math.floor(this._bounds[1]),_=Math.ceil(this._bounds[2])-j,cl=Math.ceil(this._bounds[3])-O,tl=Math.min(Math.ceil(Math.abs(_*C[0]*1.1)),3e3),E=Math.min(Math.ceil(Math.abs(cl*C[1]*1.1)),3e3),il=_/tl,al=cl/E,Nl={coords:this._coords,colors:this._colors,offsetX:-j,offsetY:-O,scaleX:1/il,scaleY:1/al},nl=tl+4,Sl=E+4,P=K.getCanvas("mesh",nl,Sl,!1),Q=P.context,q=Q.createImageData(tl,E);if(v){const ll=q.data;for(let B=0,F=ll.length;B<F;B+=4)ll[B]=v[0],ll[B+1]=v[1],ll[B+2]=v[2],ll[B+3]=255}for(const ll of this._figures)Y(q,ll,Nl);return Q.putImageData(q,2,2),{canvas:P.canvas,offsetX:j-2*il,offsetY:O-2*al,scaleX:il,scaleY:al}}getPattern(C,v,K,j){y(C,this._bbox);let O;if(j===M.SHADING)O=r.Util.singularValueDecompose2dScale((0,W.getCurrentTransform)(C));else if(O=r.Util.singularValueDecompose2dScale(v.baseTransform),this.matrix){const cl=r.Util.singularValueDecompose2dScale(this.matrix);O=[O[0]*cl[0],O[1]*cl[1]]}const _=this._createMeshCanvas(O,j===M.SHADING?null:this._background,v.cachedCanvases);return j!==M.SHADING&&(C.setTransform(...v.baseTransform),this.matrix&&C.transform(...this.matrix)),C.translate(_.offsetX,_.offsetY),C.scale(_.scaleX,_.scaleY),C.createPattern(_.canvas,"no-repeat")}}class D extends N{getPattern(){return"hotpink"}}const R=1,g=2,J=class{constructor(H,C,v,K,j){this.operatorList=H[2],this.matrix=H[3]||[1,0,0,1,0,0],this.bbox=H[4],this.xstep=H[5],this.ystep=H[6],this.paintType=H[7],this.tilingType=H[8],this.color=C,this.ctx=v,this.canvasGraphicsFactory=K,this.baseTransform=j}createPatternCanvas(H){const C=this.operatorList,v=this.bbox,K=this.xstep,j=this.ystep,O=this.paintType,_=this.tilingType,cl=this.color,tl=this.canvasGraphicsFactory;(0,r.info)("TilingType: "+_);const E=v[0],il=v[1],al=v[2],Nl=v[3],nl=r.Util.singularValueDecompose2dScale(this.matrix),Sl=r.Util.singularValueDecompose2dScale(this.baseTransform),P=[nl[0]*Sl[0],nl[1]*Sl[1]],Q=this.getSizeAndScale(K,this.ctx.canvas.width,P[0]),q=this.getSizeAndScale(j,this.ctx.canvas.height,P[1]),ll=H.cachedCanvases.getCanvas("pattern",Q.size,q.size,!0),B=ll.context,F=tl.createCanvasGraphics(B);F.groupLevel=H.groupLevel,this.setFillAndStrokeStyleToContext(F,O,cl);let el=E,dl=il,Zl=al,Wl=Nl;return E<0&&(el=0,Zl+=Math.abs(E)),il<0&&(dl=0,Wl+=Math.abs(il)),B.translate(-Q.scale*el,-q.scale*dl),F.transform(Q.scale,0,0,q.scale,0,0),B.save(),this.clipBbox(F,el,dl,Zl,Wl),F.baseTransform=(0,W.getCurrentTransform)(F.ctx),F.executeOperatorList(C),F.endDrawing(),{canvas:ll.canvas,scaleX:Q.scale,scaleY:q.scale,offsetX:el,offsetY:dl}}getSizeAndScale(H,C,v){H=Math.abs(H);const K=Math.max(J.MAX_PATTERN_SIZE,C);let j=Math.ceil(H*v);return j>=K?j=K:v=j/H,{scale:v,size:j}}clipBbox(H,C,v,K,j){const O=K-C,_=j-v;H.ctx.rect(C,v,O,_),H.current.updateRectMinMax((0,W.getCurrentTransform)(H.ctx),[C,v,K,j]),H.clip(),H.endPath()}setFillAndStrokeStyleToContext(H,C,v){const K=H.ctx,j=H.current;switch(C){case R:const O=this.ctx;K.fillStyle=O.fillStyle,K.strokeStyle=O.strokeStyle,j.fillColor=O.fillStyle,j.strokeColor=O.strokeStyle;break;case g:const _=r.Util.makeHexColor(v[0],v[1],v[2]);K.fillStyle=_,K.strokeStyle=_,j.fillColor=_,j.strokeColor=_;break;default:throw new r.FormatError(`Unsupported paint type: ${C}`)}}getPattern(H,C,v,K){let j=v;K!==M.SHADING&&(j=r.Util.transform(j,C.baseTransform),this.matrix&&(j=r.Util.transform(j,this.matrix)));const O=this.createPatternCanvas(C);let _=new DOMMatrix(j);_=_.translate(O.offsetX,O.offsetY),_=_.scale(1/O.scaleX,1/O.scaleY);const cl=H.createPattern(O.canvas,"repeat");return cl.setTransform(_),cl}};let U=J;It(U,"MAX_PATTERN_SIZE",3e3),u.TilingPattern=U},(s,u,o)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.convertBlackAndWhiteToRGBA=W,u.convertToRGBA=function(M){switch(M.kind){case r.ImageKind.GRAYSCALE_1BPP:return W(M);case r.ImageKind.RGB_24BPP:return function(y){let{src:N,srcPos:X=0,dest:z,destPos:Y=0,width:S,height:D}=y,R=0;const g=N.length>>2,J=new Uint32Array(N.buffer,X,g);if(r.FeatureTest.isLittleEndian){for(;R<g-2;R+=3,Y+=4){const U=J[R],H=J[R+1],C=J[R+2];z[Y]=4278190080|U,z[Y+1]=U>>>24|H<<8|4278190080,z[Y+2]=H>>>16|C<<16|4278190080,z[Y+3]=C>>>8|4278190080}for(let U=4*R,H=N.length;U<H;U+=3)z[Y++]=N[U]|N[U+1]<<8|N[U+2]<<16|4278190080}else{for(;R<g-2;R+=3,Y+=4){const U=J[R],H=J[R+1],C=J[R+2];z[Y]=255|U,z[Y+1]=U<<24|H>>>8|255,z[Y+2]=H<<16|C>>>16|255,z[Y+3]=C<<8|255}for(let U=4*R,H=N.length;U<H;U+=3)z[Y++]=N[U]<<24|N[U+1]<<16|N[U+2]<<8|255}return{srcPos:X,destPos:Y}}(M)}return null},u.grayToRGBA=function(M,y){if(r.FeatureTest.isLittleEndian)for(let N=0,X=M.length;N<X;N++)y[N]=65793*M[N]|4278190080;else for(let N=0,X=M.length;N<X;N++)y[N]=16843008*M[N]|255};var r=o(1);function W(M){let{src:y,srcPos:N=0,dest:X,width:z,height:Y,nonBlackColor:S=4294967295,inverseDecode:D=!1}=M;const R=r.FeatureTest.isLittleEndian?4278190080:255,[g,J]=D?[S,R]:[R,S],U=z>>3,H=7&z,C=y.length;X=new Uint32Array(X.buffer);let v=0;for(let K=0;K<Y;K++){for(const O=N+U;N<O;N++){const _=N<C?y[N]:255;X[v++]=128&_?J:g,X[v++]=64&_?J:g,X[v++]=32&_?J:g,X[v++]=16&_?J:g,X[v++]=8&_?J:g,X[v++]=4&_?J:g,X[v++]=2&_?J:g,X[v++]=1&_?J:g}if(H===0)continue;const j=N<C?y[N++]:255;for(let O=0;O<H;O++)X[v++]=j&1<<7-O?J:g}return{srcPos:N,destPos:v}}},(s,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.GlobalWorkerOptions=void 0;const o=Object.create(null);u.GlobalWorkerOptions=o,o.workerPort=null,o.workerSrc=""},(s,u,o)=>{var r,W,M,y,N,X,z;Object.defineProperty(u,"__esModule",{value:!0}),u.MessageHandler=void 0;var Y=o(1);const S=1,D=2,R=1,g=2,J=3,U=4,H=5,C=6,v=7,K=8;function j(O){switch(O instanceof Error||typeof O=="object"&&O!==null||(0,Y.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),O.name){case"AbortException":return new Y.AbortException(O.message);case"MissingPDFException":return new Y.MissingPDFException(O.message);case"PasswordException":return new Y.PasswordException(O.message,O.code);case"UnexpectedResponseException":return new Y.UnexpectedResponseException(O.message,O.status);case"UnknownErrorException":return new Y.UnknownErrorException(O.message,O.details);default:return new Y.UnknownErrorException(O.message,O.toString())}}u.MessageHandler=(z=class{constructor(O,_,cl){et(this,r),et(this,M),et(this,N),this.sourceName=O,this.targetName=_,this.comObj=cl,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=tl=>{const E=tl.data;if(E.targetName!==this.sourceName)return;if(E.stream){nt(this,M,y).call(this,E);return}if(E.callback){const al=E.callbackId,Nl=this.callbackCapabilities[al];if(!Nl)throw new Error(`Cannot resolve callback ${al}`);if(delete this.callbackCapabilities[al],E.callback===S)Nl.resolve(E.data);else{if(E.callback!==D)throw new Error("Unexpected callback case");Nl.reject(j(E.reason))}return}const il=this.actionHandler[E.action];if(!il)throw new Error(`Unknown action from worker: ${E.action}`);if(E.callbackId){const al=this.sourceName,Nl=E.sourceName;new Promise(function(nl){nl(il(E.data))}).then(function(nl){cl.postMessage({sourceName:al,targetName:Nl,callback:S,callbackId:E.callbackId,data:nl})},function(nl){cl.postMessage({sourceName:al,targetName:Nl,callback:D,callbackId:E.callbackId,reason:j(nl)})})}else E.streamId?nt(this,r,W).call(this,E):il(E.data)},cl.addEventListener("message",this._onComObjOnMessage)}on(O,_){const cl=this.actionHandler;if(cl[O])throw new Error(`There is already an actionName called "${O}"`);cl[O]=_}send(O,_,cl){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:O,data:_},cl)}sendWithPromise(O,_,cl){const tl=this.callbackId++,E=new Y.PromiseCapability;this.callbackCapabilities[tl]=E;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:O,callbackId:tl,data:_},cl)}catch(il){E.reject(il)}return E.promise}sendWithStream(O,_,cl,tl){const E=this.streamId++,il=this.sourceName,al=this.targetName,Nl=this.comObj;return new ReadableStream({start:nl=>{const Sl=new Y.PromiseCapability;return this.streamControllers[E]={controller:nl,startCall:Sl,pullCall:null,cancelCall:null,isClosed:!1},Nl.postMessage({sourceName:il,targetName:al,action:O,streamId:E,data:_,desiredSize:nl.desiredSize},tl),Sl.promise},pull:nl=>{const Sl=new Y.PromiseCapability;return this.streamControllers[E].pullCall=Sl,Nl.postMessage({sourceName:il,targetName:al,stream:C,streamId:E,desiredSize:nl.desiredSize}),Sl.promise},cancel:nl=>{(0,Y.assert)(nl instanceof Error,"cancel must have a valid reason");const Sl=new Y.PromiseCapability;return this.streamControllers[E].cancelCall=Sl,this.streamControllers[E].isClosed=!0,Nl.postMessage({sourceName:il,targetName:al,stream:R,streamId:E,reason:j(nl)}),Sl.promise}},cl)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}},r=new WeakSet,W=function(O){const _=O.streamId,cl=this.sourceName,tl=O.sourceName,E=this.comObj,il=this,al=this.actionHandler[O.action],Nl={enqueue(nl){let Sl=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,P=arguments.length>2?arguments[2]:void 0;if(this.isCancelled)return;const Q=this.desiredSize;this.desiredSize-=Sl,Q>0&&this.desiredSize<=0&&(this.sinkCapability=new Y.PromiseCapability,this.ready=this.sinkCapability.promise),E.postMessage({sourceName:cl,targetName:tl,stream:U,streamId:_,chunk:nl},P)},close(){this.isCancelled||(this.isCancelled=!0,E.postMessage({sourceName:cl,targetName:tl,stream:J,streamId:_}),delete il.streamSinks[_])},error(nl){(0,Y.assert)(nl instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,E.postMessage({sourceName:cl,targetName:tl,stream:H,streamId:_,reason:j(nl)}))},sinkCapability:new Y.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:O.desiredSize,ready:null};Nl.sinkCapability.resolve(),Nl.ready=Nl.sinkCapability.promise,this.streamSinks[_]=Nl,new Promise(function(nl){nl(al(O.data,Nl))}).then(function(){E.postMessage({sourceName:cl,targetName:tl,stream:K,streamId:_,success:!0})},function(nl){E.postMessage({sourceName:cl,targetName:tl,stream:K,streamId:_,reason:j(nl)})})},M=new WeakSet,y=function(O){const _=O.streamId,cl=this.sourceName,tl=O.sourceName,E=this.comObj,il=this.streamControllers[_],al=this.streamSinks[_];switch(O.stream){case K:O.success?il.startCall.resolve():il.startCall.reject(j(O.reason));break;case v:O.success?il.pullCall.resolve():il.pullCall.reject(j(O.reason));break;case C:if(!al){E.postMessage({sourceName:cl,targetName:tl,stream:v,streamId:_,success:!0});break}al.desiredSize<=0&&O.desiredSize>0&&al.sinkCapability.resolve(),al.desiredSize=O.desiredSize,new Promise(function(Nl){var nl;Nl((nl=al.onPull)===null||nl===void 0?void 0:nl.call(al))}).then(function(){E.postMessage({sourceName:cl,targetName:tl,stream:v,streamId:_,success:!0})},function(Nl){E.postMessage({sourceName:cl,targetName:tl,stream:v,streamId:_,reason:j(Nl)})});break;case U:if((0,Y.assert)(il,"enqueue should have stream controller"),il.isClosed)break;il.controller.enqueue(O.chunk);break;case J:if((0,Y.assert)(il,"close should have stream controller"),il.isClosed)break;il.isClosed=!0,il.controller.close(),nt(this,N,X).call(this,il,_);break;case H:(0,Y.assert)(il,"error should have stream controller"),il.controller.error(j(O.reason)),nt(this,N,X).call(this,il,_);break;case g:O.success?il.cancelCall.resolve():il.cancelCall.reject(j(O.reason)),nt(this,N,X).call(this,il,_);break;case R:if(!al)break;new Promise(function(Nl){var nl;Nl((nl=al.onCancel)===null||nl===void 0?void 0:nl.call(al,j(O.reason)))}).then(function(){E.postMessage({sourceName:cl,targetName:tl,stream:g,streamId:_,success:!0})},function(Nl){E.postMessage({sourceName:cl,targetName:tl,stream:g,streamId:_,reason:j(Nl)})}),al.sinkCapability.reject(j(O.reason)),al.isCancelled=!0,delete this.streamSinks[_];break;default:throw new Error("Unexpected stream case")}},N=new WeakSet,X=async function(O,_){var cl,tl,E;await Promise.allSettled([(cl=O.startCall)===null||cl===void 0?void 0:cl.promise,(tl=O.pullCall)===null||tl===void 0?void 0:tl.promise,(E=O.cancelCall)===null||E===void 0?void 0:E.promise]),delete this.streamControllers[_]},z)},(s,u,o)=>{var r,W,M;Object.defineProperty(u,"__esModule",{value:!0}),u.Metadata=void 0;var y=o(1);u.Metadata=(M=class{constructor(N){et(this,r,void 0),et(this,W,void 0);let{parsedData:X,rawData:z}=N;ut(this,r,X),ut(this,W,z)}getRaw(){return T(this,W)}get(N){return T(this,r).get(N)??null}getAll(){return(0,y.objectFromMap)(T(this,r))}has(N){return T(this,r).has(N)}},r=new WeakMap,W=new WeakMap,M)},(s,u,o)=>{var r,W,M,y,N,X,z,Y;Object.defineProperty(u,"__esModule",{value:!0}),u.OptionalContentConfig=void 0;var S=o(1),D=o(144);const R=Symbol("INTERNAL");class g{constructor(U,H){et(this,r,!0),this.name=U,this.intent=H}get visible(){return T(this,r)}_setVisible(U,H){U!==R&&(0,S.unreachable)("Internal method `_setVisible` called."),ut(this,r,H)}}r=new WeakMap,u.OptionalContentConfig=(Y=class{constructor(J){if(et(this,X),et(this,W,null),et(this,M,new Map),et(this,y,null),et(this,N,null),this.name=null,this.creator=null,J!==null){this.name=J.name,this.creator=J.creator,ut(this,N,J.order);for(const U of J.groups)T(this,M).set(U.id,new g(U.name,U.intent));if(J.baseState==="OFF")for(const U of T(this,M).values())U._setVisible(R,!1);for(const U of J.on)T(this,M).get(U)._setVisible(R,!0);for(const U of J.off)T(this,M).get(U)._setVisible(R,!1);ut(this,y,this.getHash())}}isVisible(J){if(T(this,M).size===0)return!0;if(!J)return(0,S.warn)("Optional content group not defined."),!0;if(J.type==="OCG")return T(this,M).has(J.id)?T(this,M).get(J.id).visible:((0,S.warn)(`Optional content group not found: ${J.id}`),!0);if(J.type==="OCMD"){if(J.expression)return nt(this,X,z).call(this,J.expression);if(!J.policy||J.policy==="AnyOn"){for(const U of J.ids){if(!T(this,M).has(U))return(0,S.warn)(`Optional content group not found: ${U}`),!0;if(T(this,M).get(U).visible)return!0}return!1}if(J.policy==="AllOn"){for(const U of J.ids){if(!T(this,M).has(U))return(0,S.warn)(`Optional content group not found: ${U}`),!0;if(!T(this,M).get(U).visible)return!1}return!0}if(J.policy==="AnyOff"){for(const U of J.ids){if(!T(this,M).has(U))return(0,S.warn)(`Optional content group not found: ${U}`),!0;if(!T(this,M).get(U).visible)return!0}return!1}if(J.policy==="AllOff"){for(const U of J.ids){if(!T(this,M).has(U))return(0,S.warn)(`Optional content group not found: ${U}`),!0;if(T(this,M).get(U).visible)return!1}return!0}return(0,S.warn)(`Unknown optional content policy ${J.policy}.`),!0}return(0,S.warn)(`Unknown group type ${J.type}.`),!0}setVisibility(J){let U=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];T(this,M).has(J)?(T(this,M).get(J)._setVisible(R,!!U),ut(this,W,null)):(0,S.warn)(`Optional content group not found: ${J}`)}get hasInitialVisibility(){return this.getHash()===T(this,y)}getOrder(){return T(this,M).size?T(this,N)?T(this,N).slice():[...T(this,M).keys()]:null}getGroups(){return T(this,M).size>0?(0,S.objectFromMap)(T(this,M)):null}getGroup(J){return T(this,M).get(J)||null}getHash(){if(T(this,W)!==null)return T(this,W);const J=new D.MurmurHash3_64;for(const[U,H]of T(this,M))J.update(`${U}:${H.visible}`);return ut(this,W,J.hexdigest())}},W=new WeakMap,M=new WeakMap,y=new WeakMap,N=new WeakMap,X=new WeakSet,z=function(J){const U=J.length;if(U<2)return!0;const H=J[0];for(let C=1;C<U;C++){const v=J[C];let K;if(Array.isArray(v))K=nt(this,X,z).call(this,v);else{if(!T(this,M).has(v))return(0,S.warn)(`Optional content group not found: ${v}`),!0;K=T(this,M).get(v).visible}switch(H){case"And":if(!K)return!1;break;case"Or":if(K)return!0;break;case"Not":return!K;default:return!0}}return H==="And"},Y)},(s,u,o)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.PDFDataTransportStream=void 0;var r=o(1),W=o(142);u.PDFDataTransportStream=class{constructor(N,X){let{length:z,initialData:Y,progressiveDone:S=!1,contentDispositionFilename:D=null,disableRange:R=!1,disableStream:g=!1}=N;if((0,r.assert)(X,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=S,this._contentDispositionFilename=D,(Y==null?void 0:Y.length)>0){const J=Y instanceof Uint8Array&&Y.byteLength===Y.buffer.byteLength?Y.buffer:new Uint8Array(Y).buffer;this._queuedChunks.push(J)}this._pdfDataRangeTransport=X,this._isStreamingSupported=!g,this._isRangeSupported=!R,this._contentLength=z,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((J,U)=>{this._onReceiveData({begin:J,chunk:U})}),this._pdfDataRangeTransport.addProgressListener((J,U)=>{this._onProgress({loaded:J,total:U})}),this._pdfDataRangeTransport.addProgressiveReadListener(J=>{this._onReceiveData({chunk:J})}),this._pdfDataRangeTransport.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}_onReceiveData(N){let{begin:X,chunk:z}=N;const Y=z instanceof Uint8Array&&z.byteLength===z.buffer.byteLength?z.buffer:new Uint8Array(z).buffer;if(X===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(Y):this._queuedChunks.push(Y);else{const S=this._rangeReaders.some(function(D){return D._begin!==X?!1:(D._enqueue(Y),!0)});(0,r.assert)(S,"_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,z;(X=this._rangeReaders[0])===null||X===void 0||(z=X.onProgress)===null||z===void 0||z.call(X,{loaded:N.loaded})}else{var Y,S;(Y=this._fullRequestReader)===null||Y===void 0||(S=Y.onProgress)===null||S===void 0||S.call(Y,{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,r.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const N=this._queuedChunks;return this._queuedChunks=null,new M(this,N,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(N,X){if(X<=this._progressiveDataLength)return null;const z=new y(this,N,X);return this._pdfDataRangeTransport.requestDataRange(N,X),this._rangeReaders.push(z),z}cancelAllRequests(N){var X;(X=this._fullRequestReader)===null||X===void 0||X.cancel(N);for(const z of this._rangeReaders.slice(0))z.cancel(N);this._pdfDataRangeTransport.abort()}};class M{constructor(X,z){let Y=arguments.length>2&&arguments[2]!==void 0&&arguments[2],S=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;this._stream=X,this._done=Y||!1,this._filename=(0,W.isPdfFile)(S)?S:null,this._queuedChunks=z||[],this._loaded=0;for(const D of this._queuedChunks)this._loaded+=D.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 r.PromiseCapability;return this._requests.push(X),X.promise}cancel(X){this._done=!0;for(const z of this._requests)z.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class y{constructor(X,z,Y){this._stream=X,this._begin=z,this._end=Y,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 z of this._requests)z.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 z=this._queuedChunk;return this._queuedChunk=null,{value:z,done:!1}}if(this._done)return{value:void 0,done:!0};const X=new r.PromiseCapability;return this._requests.push(X),X.promise}cancel(X){this._done=!0;for(const z of this._requests)z.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}},(s,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.XfaText=void 0;class o{static textContent(W){const M=[],y={items:M,styles:Object.create(null)};return function N(X){var z;if(!X)return;let Y=null;const S=X.name;if(S==="#text")Y=X.value;else{if(!o.shouldBuildText(S))return;X!=null&&(z=X.attributes)!==null&&z!==void 0&&z.textContent?Y=X.attributes.textContent:X.value&&(Y=X.value)}if(Y!==null&&M.push({str:Y}),X.children)for(const D of X.children)N(D)}(W),y}static shouldBuildText(W){return!(W==="textarea"||W==="input"||W==="option"||W==="select")}}u.XfaText=o},(s,u,o)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.NodeStandardFontDataFactory=u.NodeFilterFactory=u.NodeCanvasFactory=u.NodeCMapReaderFactory=void 0;var r=o(143);const W=function(z){return new Promise((Y,S)=>{require$$6.readFile(z,(D,R)=>{!D&&R?Y(new Uint8Array(R)):S(new Error(D))})})};class M extends r.BaseFilterFactory{}u.NodeFilterFactory=M;class y extends r.BaseCanvasFactory{_createCanvas(Y,S){return require$$6.createCanvas(Y,S)}}u.NodeCanvasFactory=y;class N extends r.BaseCMapReaderFactory{_fetchData(Y,S){return W(Y).then(D=>({cMapData:D,compressionType:S}))}}u.NodeCMapReaderFactory=N;class X extends r.BaseStandardFontDataFactory{_fetchData(Y){return W(Y)}}u.NodeStandardFontDataFactory=X},(s,u,o)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.PDFNodeStream=void 0;var r=o(1),W=o(157);const M=require$$6,y=require$$6,N=require$$6,X=require$$6,z=/^file:\/\/\/[a-zA-Z]:\//;u.PDFNodeStream=class{constructor(H){this.source=H,this.url=function(C){const v=X.parse(C);return v.protocol==="file:"||v.host?v:/^[a-z]:[/\\]/i.test(C)?X.parse(`file:///${C}`):(v.host||(v.protocol="file:"),v)}(H.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.httpHeaders=this.isHttp&&H.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var H;return((H=this._fullRequestReader)===null||H===void 0?void 0:H._loaded)??0}getFullReader(){return(0,r.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new J(this):new R(this),this._fullRequestReader}getRangeReader(H,C){if(C<=this._progressiveDataLength)return null;const v=this.isFsUrl?new U(this,H,C):new g(this,H,C);return this._rangeRequestReaders.push(v),v}cancelAllRequests(H){var C;(C=this._fullRequestReader)===null||C===void 0||C.cancel(H);for(const v of this._rangeRequestReaders.slice(0))v.cancel(H)}};class Y{constructor(C){this._url=C.url,this._done=!1,this._storedError=null,this.onProgress=null;const v=C.source;this._contentLength=v.length,this._loaded=0,this._filename=null,this._disableRange=v.disableRange||!1,this._rangeChunkSize=v.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!v.disableStream,this._isRangeSupported=!v.disableRange,this._readableStream=null,this._readCapability=new r.PromiseCapability,this._headersCapability=new r.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 C;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const v=this._readableStream.read();return v===null?(this._readCapability=new r.PromiseCapability,this.read()):(this._loaded+=v.length,(C=this.onProgress)===null||C===void 0||C.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(v).buffer,done:!1})}cancel(C){this._readableStream?this._readableStream.destroy(C):this._error(C)}_error(C){this._storedError=C,this._readCapability.resolve()}_setReadableStream(C){this._readableStream=C,C.on("readable",()=>{this._readCapability.resolve()}),C.on("end",()=>{C.destroy(),this._done=!0,this._readCapability.resolve()}),C.on("error",v=>{this._error(v)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new r.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class S{constructor(C){this._url=C.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=new r.PromiseCapability;const v=C.source;this._isStreamingSupported=!v.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){var C;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const v=this._readableStream.read();return v===null?(this._readCapability=new r.PromiseCapability,this.read()):(this._loaded+=v.length,(C=this.onProgress)===null||C===void 0||C.call(this,{loaded:this._loaded}),{value:new Uint8Array(v).buffer,done:!1})}cancel(C){this._readableStream?this._readableStream.destroy(C):this._error(C)}_error(C){this._storedError=C,this._readCapability.resolve()}_setReadableStream(C){this._readableStream=C,C.on("readable",()=>{this._readCapability.resolve()}),C.on("end",()=>{C.destroy(),this._done=!0,this._readCapability.resolve()}),C.on("error",v=>{this._error(v)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function D(H,C){return{protocol:H.protocol,auth:H.auth,host:H.hostname,port:H.port,path:H.path,method:"GET",headers:C}}class R extends Y{constructor(C){super(C);const v=K=>{if(K.statusCode===404){const cl=new r.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=cl,this._headersCapability.reject(cl);return}this._headersCapability.resolve(),this._setReadableStream(K);const j=cl=>this._readableStream.headers[cl.toLowerCase()],{allowRangeRequests:O,suggestedLength:_}=(0,W.validateRangeRequestCapabilities)({getResponseHeader:j,isHttp:C.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=O,this._contentLength=_||this._contentLength,this._filename=(0,W.extractFilenameFromHeader)(j)};this._request=null,this._url.protocol==="http:"?this._request=y.request(D(this._url,C.httpHeaders),v):this._request=N.request(D(this._url,C.httpHeaders),v),this._request.on("error",K=>{this._storedError=K,this._headersCapability.reject(K)}),this._request.end()}}class g extends S{constructor(C,v,K){super(C),this._httpHeaders={};for(const O in C.httpHeaders){const _=C.httpHeaders[O];_!==void 0&&(this._httpHeaders[O]=_)}this._httpHeaders.Range=`bytes=${v}-${K-1}`;const j=O=>{if(O.statusCode!==404)this._setReadableStream(O);else{const _=new r.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=_}};this._request=null,this._url.protocol==="http:"?this._request=y.request(D(this._url,this._httpHeaders),j):this._request=N.request(D(this._url,this._httpHeaders),j),this._request.on("error",O=>{this._storedError=O}),this._request.end()}}class J extends Y{constructor(C){super(C);let v=decodeURIComponent(this._url.path);z.test(this._url.href)&&(v=v.replace(/^\//,"")),M.lstat(v,(K,j)=>{K?(K.code==="ENOENT"&&(K=new r.MissingPDFException(`Missing PDF "${v}".`)),this._storedError=K,this._headersCapability.reject(K)):(this._contentLength=j.size,this._setReadableStream(M.createReadStream(v)),this._headersCapability.resolve())})}}class U extends S{constructor(C,v,K){super(C);let j=decodeURIComponent(this._url.path);z.test(this._url.href)&&(j=j.replace(/^\//,"")),this._setReadableStream(M.createReadStream(j,{start:v,end:K-1}))}}},(s,u,o)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.createResponseStatusError=function(y,N){return y===404||y===0&&N.startsWith("file:")?new r.MissingPDFException('Missing PDF "'+N+'".'):new r.UnexpectedResponseException(`Unexpected server response (${y}) while retrieving PDF "${N}".`,y)},u.extractFilenameFromHeader=function(y){const N=y("Content-Disposition");if(N){let X=(0,W.getFilenameFromContentDispositionHeader)(N);if(X.includes("%"))try{X=decodeURIComponent(X)}catch{}if((0,M.isPdfFile)(X))return X}return null},u.validateRangeRequestCapabilities=function(y){let{getResponseHeader:N,isHttp:X,rangeChunkSize:z,disableRange:Y}=y;const S={allowRangeRequests:!1,suggestedLength:void 0},D=parseInt(N("Content-Length"),10);return!Number.isInteger(D)||(S.suggestedLength=D,D<=2*z)||Y||!X||N("Accept-Ranges")!=="bytes"||(N("Content-Encoding")||"identity")!=="identity"||(S.allowRangeRequests=!0),S},u.validateResponseStatus=function(y){return y===200||y===206};var r=o(1),W=o(158),M=o(142)},(s,u,o)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.getFilenameFromContentDispositionHeader=function(W){let M=!0,y=N("filename\\*","i").exec(W);if(y){y=y[1];let R=Y(y);return R=unescape(R),R=S(R),R=D(R),z(R)}if(y=function(R){const g=[];let J;const U=N("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(J=U.exec(R))!==null;){let[,C,v,K]=J;if(C=parseInt(C,10),C in g){if(C===0)break}else g[C]=[v,K]}const H=[];for(let C=0;C<g.length&&C in g;++C){let[v,K]=g[C];K=Y(K),v&&(K=unescape(K),C===0&&(K=S(K))),H.push(K)}return H.join("")}(W),y)return z(D(y));if(y=N("filename","i").exec(W),y){y=y[1];let R=Y(y);return R=D(R),z(R)}function N(R,g){return new RegExp("(?:^|;)\\s*"+R+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',g)}function X(R,g){if(R){if(!/^[\x00-\xFF]+$/.test(g))return g;try{const J=new TextDecoder(R,{fatal:!0}),U=(0,r.stringToBytes)(g);g=J.decode(U),M=!1}catch{}}return g}function z(R){return M&&/[\x80-\xff]/.test(R)&&(R=X("utf-8",R),M&&(R=X("iso-8859-1",R))),R}function Y(R){if(R.startsWith('"')){const g=R.slice(1).split('\\"');for(let J=0;J<g.length;++J){const U=g[J].indexOf('"');U!==-1&&(g[J]=g[J].slice(0,U),g.length=J+1),g[J]=g[J].replaceAll(/\\(.)/g,"$1")}R=g.join('"')}return R}function S(R){const g=R.indexOf("'");return g===-1?R:X(R.slice(0,g),R.slice(g+1).replace(/^[^']*'/,""))}function D(R){return!R.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(R)?R:R.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(g,J,U,H){if(U==="q"||U==="Q")return X(J,H=(H=H.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,function(C,v){return String.fromCharCode(parseInt(v,16))}));try{H=atob(H)}catch{}return X(J,H)})}return""};var r=o(1)},(s,u,o)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.PDFNetworkStream=void 0;var r=o(1),W=o(157);class M{constructor(z){let Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.url=z,this.isHttp=/^https?:/i.test(z),this.httpHeaders=this.isHttp&&Y.httpHeaders||Object.create(null),this.withCredentials=Y.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(z,Y,S){const D={begin:z,end:Y};for(const R in S)D[R]=S[R];return this.request(D)}requestFull(z){return this.request(z)}request(z){const Y=new XMLHttpRequest,S=this.currXhrId++,D=this.pendingRequests[S]={xhr:Y};Y.open("GET",this.url),Y.withCredentials=this.withCredentials;for(const R in this.httpHeaders){const g=this.httpHeaders[R];g!==void 0&&Y.setRequestHeader(R,g)}return this.isHttp&&"begin"in z&&"end"in z?(Y.setRequestHeader("Range",`bytes=${z.begin}-${z.end-1}`),D.expectedStatus=206):D.expectedStatus=200,Y.responseType="arraybuffer",z.onError&&(Y.onerror=function(R){z.onError(Y.status)}),Y.onreadystatechange=this.onStateChange.bind(this,S),Y.onprogress=this.onProgress.bind(this,S),D.onHeadersReceived=z.onHeadersReceived,D.onDone=z.onDone,D.onError=z.onError,D.onProgress=z.onProgress,Y.send(null),S}onProgress(z,Y){var S;const D=this.pendingRequests[z];D&&((S=D.onProgress)===null||S===void 0||S.call(D,Y))}onStateChange(z,Y){const S=this.pendingRequests[z];if(!S)return;const D=S.xhr;if(D.readyState>=2&&S.onHeadersReceived&&(S.onHeadersReceived(),delete S.onHeadersReceived),D.readyState!==4||!(z in this.pendingRequests))return;if(delete this.pendingRequests[z],D.status===0&&this.isHttp){var R;(R=S.onError)===null||R===void 0||R.call(S,D.status);return}const g=D.status||200;if(!(g===200&&S.expectedStatus===206)&&g!==S.expectedStatus){var J;(J=S.onError)===null||J===void 0||J.call(S,D.status);return}const U=function(C){const v=C.response;return typeof v!="string"?v:(0,r.stringToBytes)(v).buffer}(D);if(g===206){const C=D.getResponseHeader("Content-Range"),v=/bytes (\d+)-(\d+)\/(\d+)/.exec(C);S.onDone({begin:parseInt(v[1],10),chunk:U})}else if(U)S.onDone({begin:0,chunk:U});else{var H;(H=S.onError)===null||H===void 0||H.call(S,D.status)}}getRequestXhr(z){return this.pendingRequests[z].xhr}isPendingRequest(z){return z in this.pendingRequests}abortRequest(z){const Y=this.pendingRequests[z].xhr;delete this.pendingRequests[z],Y.abort()}}u.PDFNetworkStream=class{constructor(X){this._source=X,this._manager=new M(X.url,{httpHeaders:X.httpHeaders,withCredentials:X.withCredentials}),this._rangeChunkSize=X.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(X){const z=this._rangeRequestReaders.indexOf(X);z>=0&&this._rangeRequestReaders.splice(z,1)}getFullReader(){return(0,r.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new y(this._manager,this._source),this._fullRequestReader}getRangeReader(X,z){const Y=new N(this._manager,X,z);return Y.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(Y),Y}cancelAllRequests(X){var z;(z=this._fullRequestReader)===null||z===void 0||z.cancel(X);for(const Y of this._rangeRequestReaders.slice(0))Y.cancel(X)}};class y{constructor(z,Y){this._manager=z;const S={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=Y.url,this._fullRequestId=z.requestFull(S),this._headersReceivedCapability=new r.PromiseCapability,this._disableRange=Y.disableRange||!1,this._contentLength=Y.length,this._rangeChunkSize=Y.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 z=this._fullRequestId,Y=this._manager.getRequestXhr(z),S=g=>Y.getResponseHeader(g),{allowRangeRequests:D,suggestedLength:R}=(0,W.validateRangeRequestCapabilities)({getResponseHeader:S,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});D&&(this._isRangeSupported=!0),this._contentLength=R||this._contentLength,this._filename=(0,W.extractFilenameFromHeader)(S),this._isRangeSupported&&this._manager.abortRequest(z),this._headersReceivedCapability.resolve()}_onDone(z){if(z&&(this._requests.length>0?this._requests.shift().resolve({value:z.chunk,done:!1}):this._cachedChunks.push(z.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const Y of this._requests)Y.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(z){this._storedError=(0,W.createResponseStatusError)(z,this._url),this._headersReceivedCapability.reject(this._storedError);for(const Y of this._requests)Y.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(z){var Y;(Y=this.onProgress)===null||Y===void 0||Y.call(this,{loaded:z.loaded,total:z.lengthComputable?z.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 z=new r.PromiseCapability;return this._requests.push(z),z.promise}cancel(z){this._done=!0,this._headersReceivedCapability.reject(z);for(const Y of this._requests)Y.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(z,Y,S){this._manager=z;const D={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=z.url,this._requestId=z.requestRange(Y,S,D),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var z;(z=this.onClosed)===null||z===void 0||z.call(this,this)}_onDone(z){const Y=z.chunk;this._requests.length>0?this._requests.shift().resolve({value:Y,done:!1}):this._queuedChunk=Y,this._done=!0;for(const S of this._requests)S.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(z){this._storedError=(0,W.createResponseStatusError)(z,this._url);for(const Y of this._requests)Y.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(z){if(!this.isStreamingSupported){var Y;(Y=this.onProgress)===null||Y===void 0||Y.call(this,{loaded:z.loaded})}}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const Y=this._queuedChunk;return this._queuedChunk=null,{value:Y,done:!1}}if(this._done)return{value:void 0,done:!0};const z=new r.PromiseCapability;return this._requests.push(z),z.promise}cancel(z){this._done=!0;for(const Y of this._requests)Y.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},(s,u,o)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.PDFFetchStream=void 0;var r=o(1),W=o(157);function M(Y,S,D){return{method:"GET",headers:Y,signal:D.signal,mode:"cors",credentials:S?"include":"same-origin",redirect:"follow"}}function y(Y){const S=new Headers;for(const D in Y){const R=Y[D];R!==void 0&&S.append(D,R)}return S}function N(Y){return Y instanceof Uint8Array?Y.buffer:Y instanceof ArrayBuffer?Y:((0,r.warn)(`getArrayBuffer - unexpected data format: ${Y}`),new Uint8Array(Y).buffer)}u.PDFFetchStream=class{constructor(Y){this.source=Y,this.isHttp=/^https?:/i.test(Y.url),this.httpHeaders=this.isHttp&&Y.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var Y;return((Y=this._fullRequestReader)===null||Y===void 0?void 0:Y._loaded)??0}getFullReader(){return(0,r.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new X(this),this._fullRequestReader}getRangeReader(Y,S){if(S<=this._progressiveDataLength)return null;const D=new z(this,Y,S);return this._rangeRequestReaders.push(D),D}cancelAllRequests(Y){var S;(S=this._fullRequestReader)===null||S===void 0||S.cancel(Y);for(const D of this._rangeRequestReaders.slice(0))D.cancel(Y)}};class X{constructor(S){this._stream=S,this._reader=null,this._loaded=0,this._filename=null;const D=S.source;this._withCredentials=D.withCredentials||!1,this._contentLength=D.length,this._headersCapability=new r.PromiseCapability,this._disableRange=D.disableRange||!1,this._rangeChunkSize=D.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!D.disableStream,this._isRangeSupported=!D.disableRange,this._headers=y(this._stream.httpHeaders);const R=D.url;fetch(R,M(this._headers,this._withCredentials,this._abortController)).then(g=>{if(!(0,W.validateResponseStatus)(g.status))throw(0,W.createResponseStatusError)(g.status,R);this._reader=g.body.getReader(),this._headersCapability.resolve();const J=C=>g.headers.get(C),{allowRangeRequests:U,suggestedLength:H}=(0,W.validateRangeRequestCapabilities)({getResponseHeader:J,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=U,this._contentLength=H||this._contentLength,this._filename=(0,W.extractFilenameFromHeader)(J),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new r.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 S;await this._headersCapability.promise;const{value:D,done:R}=await this._reader.read();return R?{value:D,done:R}:(this._loaded+=D.byteLength,(S=this.onProgress)===null||S===void 0||S.call(this,{loaded:this._loaded,total:this._contentLength}),{value:N(D),done:!1})}cancel(S){var D;(D=this._reader)===null||D===void 0||D.cancel(S),this._abortController.abort()}}class z{constructor(S,D,R){this._stream=S,this._reader=null,this._loaded=0;const g=S.source;this._withCredentials=g.withCredentials||!1,this._readCapability=new r.PromiseCapability,this._isStreamingSupported=!g.disableStream,this._abortController=new AbortController,this._headers=y(this._stream.httpHeaders),this._headers.append("Range",`bytes=${D}-${R-1}`);const J=g.url;fetch(J,M(this._headers,this._withCredentials,this._abortController)).then(U=>{if(!(0,W.validateResponseStatus)(U.status))throw(0,W.createResponseStatusError)(U.status,J);this._readCapability.resolve(),this._reader=U.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var S;await this._readCapability.promise;const{value:D,done:R}=await this._reader.read();return R?{value:D,done:R}:(this._loaded+=D.byteLength,(S=this.onProgress)===null||S===void 0||S.call(this,{loaded:this._loaded}),{value:N(D),done:!1})}cancel(S){var D;(D=this._reader)===null||D===void 0||D.cancel(S),this._abortController.abort()}}},(s,u,o)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TextLayerRenderTask=void 0,u.renderTextLayer=function(D){!D.textContentSource&&(D.textContent||D.textContentStream)&&((0,W.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),D.textContentSource=D.textContent||D.textContentStream);const{container:R,viewport:g}=D,J=getComputedStyle(R),U=J.getPropertyValue("visibility"),H=parseFloat(J.getPropertyValue("--scale-factor"));U==="visible"&&(!H||Math.abs(H-g.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 C=new S(D);return C._render(),C},u.updateTextLayer=function(D){let{container:R,viewport:g,textDivs:J,textDivProperties:U,isOffscreenCanvasSupported:H,mustRotate:C=!0,mustRescale:v=!0}=D;if(C&&(0,W.setLayerDimensions)(R,{rotation:g.rotation}),v){const K=X(0,H),j={prevFontSize:null,prevFontFamily:null,div:null,scale:g.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:K};for(const O of J)j.properties=U.get(O),j.div=O,Y(j)}};var r=o(1),W=o(142);const M=30,y=.8,N=new Map;function X(D,R){let g;if(R&&r.FeatureTest.isOffscreenCanvasSupported)g=new OffscreenCanvas(D,D).getContext("2d",{alpha:!1});else{const J=document.createElement("canvas");J.width=J.height=D,g=J.getContext("2d",{alpha:!1})}return g}function z(D,R,g){const J=document.createElement("span"),U={angle:0,canvasWidth:0,hasText:R.str!=="",hasEOL:R.hasEOL,fontSize:0};D._textDivs.push(J);const H=r.Util.transform(D._transform,R.transform);let C=Math.atan2(H[1],H[0]);const v=g[R.fontName];v.vertical&&(C+=Math.PI/2);const K=Math.hypot(H[2],H[3]),j=K*function(il,al){const Nl=N.get(il);if(Nl)return Nl;const nl=X(M,al);nl.font=`${M}px ${il}`;const Sl=nl.measureText("");let P=Sl.fontBoundingBoxAscent,Q=Math.abs(Sl.fontBoundingBoxDescent);if(P){const ll=P/(P+Q);return N.set(il,ll),nl.canvas.width=nl.canvas.height=0,ll}nl.strokeStyle="red",nl.clearRect(0,0,M,M),nl.strokeText("g",0,0);let q=nl.getImageData(0,0,M,M).data;Q=0;for(let ll=q.length-1-3;ll>=0;ll-=4)if(q[ll]>0){Q=Math.ceil(ll/4/M);break}nl.clearRect(0,0,M,M),nl.strokeText("A",0,M),q=nl.getImageData(0,0,M,M).data,P=0;for(let ll=0,B=q.length;ll<B;ll+=4)if(q[ll]>0){P=M-Math.floor(ll/4/M);break}if(nl.canvas.width=nl.canvas.height=0,P){const ll=P/(P+Q);return N.set(il,ll),ll}return N.set(il,y),y}(v.fontFamily,D._isOffscreenCanvasSupported);let O,_;C===0?(O=H[4],_=H[5]-j):(O=H[4]+j*Math.sin(C),_=H[5]-j*Math.cos(C));const cl="calc(var(--scale-factor)*",tl=J.style;D._container===D._rootContainer?(tl.left=`${(100*O/D._pageWidth).toFixed(2)}%`,tl.top=`${(100*_/D._pageHeight).toFixed(2)}%`):(tl.left=`${cl}${O.toFixed(2)}px)`,tl.top=`${cl}${_.toFixed(2)}px)`),tl.fontSize=`${cl}${K.toFixed(2)}px)`,tl.fontFamily=v.fontFamily,U.fontSize=K,J.setAttribute("role","presentation"),J.textContent=R.str,J.dir=R.dir,D._fontInspectorEnabled&&(J.dataset.fontName=R.fontName),C!==0&&(U.angle=C*(180/Math.PI));let E=!1;if(R.str.length>1)E=!0;else if(R.str!==" "&&R.transform[0]!==R.transform[3]){const il=Math.abs(R.transform[0]),al=Math.abs(R.transform[3]);il!==al&&Math.max(il,al)/Math.min(il,al)>1.5&&(E=!0)}E&&(U.canvasWidth=v.vertical?R.height:R.width),D._textDivProperties.set(J,U),D._isReadableStream&&D._layoutText(J)}function Y(D){const{div:R,scale:g,properties:J,ctx:U,prevFontSize:H,prevFontFamily:C}=D,{style:v}=R;let K="";if(J.canvasWidth!==0&&J.hasText){const{fontFamily:j}=v,{canvasWidth:O,fontSize:_}=J;(H!==_||C!==j)&&(U.font=`${_*g}px ${j}`,D.prevFontSize=_,D.prevFontFamily=j);const{width:cl}=U.measureText(R.textContent);cl>0&&(K=`scaleX(${O*g/cl})`)}J.angle!==0&&(K=`rotate(${J.angle}deg) ${K}`),K.length>0&&(v.transform=K)}class S{constructor(R){var g;let{textContentSource:J,container:U,viewport:H,textDivs:C,textDivProperties:v,textContentItemsStr:K,isOffscreenCanvasSupported:j}=R;this._textContentSource=J,this._isReadableStream=J instanceof ReadableStream,this._container=this._rootContainer=U,this._textDivs=C||[],this._textContentItemsStr=K||[],this._isOffscreenCanvasSupported=j,this._fontInspectorEnabled=!((g=globalThis.FontInspector)===null||g===void 0||!g.enabled),this._reader=null,this._textDivProperties=v||new WeakMap,this._canceled=!1,this._capability=new r.PromiseCapability,this._layoutTextParams={prevFontSize:null,prevFontFamily:null,div:null,scale:H.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:X(0,j)};const{pageWidth:O,pageHeight:_,pageX:cl,pageY:tl}=H.rawDims;this._transform=[1,0,0,-1,-cl,tl+_],this._pageWidth=O,this._pageHeight=_,(0,W.setLayerDimensions)(U,H),this._capability.promise.finally(()=>{this._layoutTextParams=null}).catch(()=>{})}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new r.AbortException("TextLayer task cancelled.")).catch(()=>{}),this._reader=null),this._capability.reject(new r.AbortException("TextLayer task cancelled."))}_processItems(R,g){for(const J of R)if(J.str!==void 0)this._textContentItemsStr.push(J.str),z(this,J,g);else if(J.type==="beginMarkedContentProps"||J.type==="beginMarkedContent"){const U=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),J.id!==null&&this._container.setAttribute("id",`${J.id}`),U.append(this._container)}else J.type==="endMarkedContent"&&(this._container=this._container.parentNode)}_layoutText(R){const g=this._layoutTextParams.properties=this._textDivProperties.get(R);if(this._layoutTextParams.div=R,Y(this._layoutTextParams),g.hasText&&this._container.append(R),g.hasEOL){const J=document.createElement("br");J.setAttribute("role","presentation"),this._container.append(J)}}_render(){const R=new r.PromiseCapability;let g=Object.create(null);if(this._isReadableStream){const J=()=>{this._reader.read().then(U=>{let{value:H,done:C}=U;C?R.resolve():(Object.assign(g,H.styles),this._processItems(H.items,g),J())},R.reject)};this._reader=this._textContentSource.getReader(),J()}else{if(!this._textContentSource)throw new Error('No "textContentSource" parameter specified.');{const{items:J,styles:U}=this._textContentSource;this._processItems(J,U),R.resolve()}}R.promise.then(()=>{g=null,function(J){if(J._canceled)return;const U=J._textDivs,H=J._capability;if(U.length>1e5)H.resolve();else{if(!J._isReadableStream)for(const C of U)J._layoutText(C);H.resolve()}}(this)},this._capability.reject)}}u.TextLayerRenderTask=S},(s,u,o)=>{var r,W,M,y,N,X,z,Y,S,D,R,g,J,U,H,C;Object.defineProperty(u,"__esModule",{value:!0}),u.AnnotationEditorLayer=void 0;var v=o(1),K=o(141),j=o(163),O=o(164),_=o(142);const cl=class{constructor(E){et(this,S),et(this,R),et(this,J),et(this,H),et(this,r,void 0),et(this,W,!1),et(this,M,this.pointerup.bind(this)),et(this,y,this.pointerdown.bind(this)),et(this,N,new Map),et(this,X,!1),et(this,z,!1),et(this,Y,void 0),cl._initialized||(cl._initialized=!0,j.FreeTextEditor.initialize(E.l10n),O.InkEditor.initialize(E.l10n)),E.uiManager.registerEditorTypes([j.FreeTextEditor,O.InkEditor]),ut(this,Y,E.uiManager),this.pageIndex=E.pageIndex,this.div=E.div,ut(this,r,E.accessibilityManager),T(this,Y).addLayer(this)}get isEmpty(){return T(this,N).size===0}updateToolbar(E){T(this,Y).updateToolbar(E)}updateMode(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:T(this,Y).getMode();nt(this,H,C).call(this),E===v.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),T(this,Y).unselectAll(),E!==v.AnnotationEditorType.NONE&&(this.div.classList.toggle("freeTextEditing",E===v.AnnotationEditorType.FREETEXT),this.div.classList.toggle("inkEditing",E===v.AnnotationEditorType.INK),this.div.hidden=!1)}addInkEditorIfNeeded(E){if(!(!E&&T(this,Y).getMode()!==v.AnnotationEditorType.INK)){if(!E){for(const il of T(this,N).values())if(il.isEmpty()){il.setInBackground();return}}nt(this,J,U).call(this,{offsetX:0,offsetY:0}).setInBackground()}}setEditingState(E){T(this,Y).setEditingState(E)}addCommands(E){T(this,Y).addCommands(E)}enable(){this.div.style.pointerEvents="auto";for(const E of T(this,N).values())E.enableEditing()}disable(){this.div.style.pointerEvents="none";for(const E of T(this,N).values())E.disableEditing();nt(this,H,C).call(this),this.isEmpty&&(this.div.hidden=!0)}setActiveEditor(E){T(this,Y).getActive()!==E&&T(this,Y).setActiveEditor(E)}enableClick(){this.div.addEventListener("pointerdown",T(this,y)),this.div.addEventListener("pointerup",T(this,M))}disableClick(){this.div.removeEventListener("pointerdown",T(this,y)),this.div.removeEventListener("pointerup",T(this,M))}attach(E){T(this,N).set(E.id,E)}detach(E){var il;T(this,N).delete(E.id),(il=T(this,r))===null||il===void 0||il.removePointerInTextLayer(E.contentDiv)}remove(E){T(this,Y).removeEditor(E),this.detach(E),E.div.style.display="none",setTimeout(()=>{E.div.style.display="",E.div.remove(),E.isAttachedToDOM=!1,document.activeElement===document.body&&T(this,Y).focusMainContainer()},0),T(this,z)||this.addInkEditorIfNeeded(!1)}add(E){if(nt(this,S,D).call(this,E),T(this,Y).addEditor(E),this.attach(E),!E.isAttachedToDOM){const il=E.render();this.div.append(il),E.isAttachedToDOM=!0}this.moveEditorInDOM(E),E.onceAdded(),T(this,Y).addToAnnotationStorage(E)}moveEditorInDOM(E){var il;(il=T(this,r))===null||il===void 0||il.moveElementInDOM(this.div,E.div,E.contentDiv,!0)}addOrRebuild(E){E.needsToBeRebuilt()?E.rebuild():this.add(E)}addANewEditor(E){this.addCommands({cmd:()=>{this.addOrRebuild(E)},undo:()=>{E.remove()},mustExec:!0})}addUndoableEditor(E){this.addCommands({cmd:()=>{this.addOrRebuild(E)},undo:()=>{E.remove()},mustExec:!1})}getNextId(){return T(this,Y).getId()}deserialize(E){switch(E.annotationType){case v.AnnotationEditorType.FREETEXT:return j.FreeTextEditor.deserialize(E,this,T(this,Y));case v.AnnotationEditorType.INK:return O.InkEditor.deserialize(E,this,T(this,Y))}return null}setSelected(E){T(this,Y).setSelected(E)}toggleSelected(E){T(this,Y).toggleSelected(E)}isSelected(E){return T(this,Y).isSelected(E)}unselect(E){T(this,Y).unselect(E)}pointerup(E){const{isMac:il}=v.FeatureTest.platform;!(E.button!==0||E.ctrlKey&&il)&&E.target===this.div&&T(this,X)&&(ut(this,X,!1),T(this,W)?nt(this,J,U).call(this,E):ut(this,W,!0))}pointerdown(E){const{isMac:il}=v.FeatureTest.platform;if(E.button!==0||E.ctrlKey&&il||E.target!==this.div)return;ut(this,X,!0);const al=T(this,Y).getActive();ut(this,W,!al||al.isEmpty())}drop(E){const il=E.dataTransfer.getData("text/plain"),al=T(this,Y).getEditor(il);if(!al)return;E.preventDefault(),E.dataTransfer.dropEffect="move",nt(this,S,D).call(this,al);const Nl=this.div.getBoundingClientRect(),nl=E.clientX-Nl.x,Sl=E.clientY-Nl.y;al.translate(nl-al.startX,Sl-al.startY),this.moveEditorInDOM(al),al.div.focus()}dragover(E){E.preventDefault()}destroy(){var E;((E=T(this,Y).getActive())===null||E===void 0?void 0:E.parent)===this&&T(this,Y).setActiveEditor(null);for(const al of T(this,N).values()){var il;(il=T(this,r))===null||il===void 0||il.removePointerInTextLayer(al.contentDiv),al.setParent(null),al.isAttachedToDOM=!1,al.div.remove()}this.div=null,T(this,N).clear(),T(this,Y).removeLayer(this)}render(E){let{viewport:il}=E;this.viewport=il,(0,_.setLayerDimensions)(this.div,il),(0,K.bindEvents)(this,this.div,["dragover","drop"]);for(const al of T(this,Y).getEditors(this.pageIndex))this.add(al);this.updateMode()}update(E){let{viewport:il}=E;T(this,Y).commitOrRemove(),this.viewport=il,(0,_.setLayerDimensions)(this.div,{rotation:il.rotation}),this.updateMode()}get pageDimensions(){const{pageWidth:E,pageHeight:il}=this.viewport.rawDims;return[E,il]}};let tl=cl;r=new WeakMap,W=new WeakMap,M=new WeakMap,y=new WeakMap,N=new WeakMap,X=new WeakMap,z=new WeakMap,Y=new WeakMap,S=new WeakSet,D=function(E){var il;E.parent!==this&&(this.attach(E),(il=E.parent)===null||il===void 0||il.detach(E),E.setParent(this),E.div&&E.isAttachedToDOM&&(E.div.remove(),this.div.append(E.div)))},R=new WeakSet,g=function(E){switch(T(this,Y).getMode()){case v.AnnotationEditorType.FREETEXT:return new j.FreeTextEditor(E);case v.AnnotationEditorType.INK:return new O.InkEditor(E)}return null},J=new WeakSet,U=function(E){const il=this.getNextId(),al=nt(this,R,g).call(this,{parent:this,id:il,x:E.offsetX,y:E.offsetY,uiManager:T(this,Y)});return al&&this.add(al),al},H=new WeakSet,C=function(){ut(this,z,!0);for(const E of T(this,N).values())E.isEmpty()&&E.remove();ut(this,z,!1)},It(tl,"_initialized",!1),u.AnnotationEditorLayer=tl},(s,u,o)=>{var r,W,M,y,N,X,z,Y,S,D,R,g,J,U,H,C,v;Object.defineProperty(u,"__esModule",{value:!0}),u.FreeTextEditor=void 0;var K=o(1),j=o(141),O=o(140);const _=class extends O.AnnotationEditor{constructor(tl){super({...tl,name:"freeTextEditor"}),et(this,D),et(this,g),et(this,U),et(this,C),et(this,r,this.editorDivBlur.bind(this)),et(this,W,this.editorDivFocus.bind(this)),et(this,M,this.editorDivInput.bind(this)),et(this,y,this.editorDivKeydown.bind(this)),et(this,N,void 0),et(this,X,""),et(this,z,`${this.id}-editor`),et(this,Y,!1),et(this,S,void 0),ut(this,N,tl.color||_._defaultColor||O.AnnotationEditor._defaultLineColor),ut(this,S,tl.fontSize||_._defaultFontSize)}static initialize(tl){this._l10nPromise=new Map(["free_text2_default_content","editor_free_text2_aria_label"].map(il=>[il,tl.get(il)]));const E=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(E.getPropertyValue("--freetext-padding"))}static updateDefaultParams(tl,E){switch(tl){case K.AnnotationEditorParamsType.FREETEXT_SIZE:_._defaultFontSize=E;break;case K.AnnotationEditorParamsType.FREETEXT_COLOR:_._defaultColor=E}}updateParams(tl,E){switch(tl){case K.AnnotationEditorParamsType.FREETEXT_SIZE:nt(this,D,R).call(this,E);break;case K.AnnotationEditorParamsType.FREETEXT_COLOR:nt(this,g,J).call(this,E)}}static get defaultPropertiesToUpdate(){return[[K.AnnotationEditorParamsType.FREETEXT_SIZE,_._defaultFontSize],[K.AnnotationEditorParamsType.FREETEXT_COLOR,_._defaultColor||O.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[K.AnnotationEditorParamsType.FREETEXT_SIZE,T(this,S)],[K.AnnotationEditorParamsType.FREETEXT_COLOR,T(this,N)]]}getInitialTranslation(){const tl=this.parentScale;return[-_._internalPadding*tl,-(_._internalPadding+T(this,S))*tl]}rebuild(){super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(K.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,y)),this.editorDiv.addEventListener("focus",T(this,W)),this.editorDiv.addEventListener("blur",T(this,r)),this.editorDiv.addEventListener("input",T(this,M)))}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,z)),this.div.draggable=!0,this.editorDiv.removeEventListener("keydown",T(this,y)),this.editorDiv.removeEventListener("focus",T(this,W)),this.editorDiv.removeEventListener("blur",T(this,r)),this.editorDiv.removeEventListener("input",T(this,M)),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freeTextEditing"))}focusin(tl){super.focusin(tl),tl.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,Y)||(ut(this,Y,!0),this.parent.addUndoableEditor(this)),this.disableEditMode(),ut(this,X,nt(this,U,H).call(this).trimEnd()),nt(this,C,v).call(this))}shouldGetKeyboardEvents(){return this.isInEditMode()}dblclick(tl){this.enableEditMode(),this.editorDiv.focus()}keydown(tl){tl.target===this.div&&tl.key==="Enter"&&(this.enableEditMode(),this.editorDiv.focus())}editorDivKeydown(tl){_._keyboardManager.exec(this,tl)}editorDivFocus(tl){this.isEditing=!0}editorDivBlur(tl){this.isEditing=!1}editorDivInput(tl){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 tl,E;this.width&&(tl=this.x,E=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",T(this,z)),this.enableEditing(),_._l10nPromise.get("editor_free_text2_aria_label").then(al=>{var Nl;return(Nl=this.editorDiv)===null||Nl===void 0?void 0:Nl.setAttribute("aria-label",al)}),_._l10nPromise.get("free_text2_default_content").then(al=>{var Nl;return(Nl=this.editorDiv)===null||Nl===void 0?void 0:Nl.setAttribute("default-content",al)}),this.editorDiv.contentEditable=!0;const{style:il}=this.editorDiv;if(il.fontSize=`calc(${T(this,S)}px * var(--scale-factor))`,il.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,j.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){const[al,Nl]=this.parentDimensions;this.setAt(tl*al,E*Nl,this.width*al,this.height*Nl);for(const nl of T(this,X).split(`
82
82
  `)){const Sl=document.createElement("div");Sl.append(nl?document.createTextNode(nl):document.createElement("br")),this.editorDiv.append(Sl)}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(tl,E,il){const al=super.deserialize(tl,E,il);return ut(al,S,tl.fontSize),ut(al,N,K.Util.makeHexColor(...tl.color)),ut(al,X,tl.value),al}serialize(){if(this.isEmpty())return null;const tl=_._internalPadding*this.parentScale,E=this.getRect(tl,tl),il=O.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:T(this,N));return{annotationType:K.AnnotationEditorType.FREETEXT,color:il,fontSize:T(this,S),value:T(this,X),pageIndex:this.pageIndex,rect:E,rotation:this.rotation}}};let cl=_;r=new WeakMap,W=new WeakMap,M=new WeakMap,y=new WeakMap,N=new WeakMap,X=new WeakMap,z=new WeakMap,Y=new WeakMap,S=new WeakMap,D=new WeakSet,R=function(tl){const E=al=>{this.editorDiv.style.fontSize=`calc(${al}px * var(--scale-factor))`,this.translate(0,-(al-T(this,S))*this.parentScale),ut(this,S,al),nt(this,C,v).call(this)},il=T(this,S);this.addCommands({cmd:()=>{E(tl)},undo:()=>{E(il)},mustExec:!0,type:K.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},g=new WeakSet,J=function(tl){const E=T(this,N);this.addCommands({cmd:()=>{ut(this,N,this.editorDiv.style.color=tl)},undo:()=>{ut(this,N,this.editorDiv.style.color=E)},mustExec:!0,type:K.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},U=new WeakSet,H=function(){const tl=this.editorDiv.getElementsByTagName("div");if(tl.length===0)return this.editorDiv.innerText;const E=[];for(const il of tl)E.push(il.innerText.replace(/\r\n?|\n/,""));return E.join(`
83
83
  `)},C=new WeakSet,v=function(){const[tl,E]=this.parentDimensions;let il;if(this.isAttachedToDOM)il=this.div.getBoundingClientRect();else{const{currentLayer:al,div:Nl}=this,nl=Nl.style.display;Nl.style.display="hidden",al.div.append(this.div),il=Nl.getBoundingClientRect(),Nl.remove(),Nl.style.display=nl}this.width=il.width/tl,this.height=il.height/E},It(cl,"_freeTextDefaultContent",""),It(cl,"_l10nPromise"),It(cl,"_internalPadding",0),It(cl,"_defaultColor",null),It(cl,"_defaultFontSize",10),It(cl,"_keyboardManager",new j.KeyboardManager([[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],_.prototype.commitOrRemove]])),It(cl,"_type","freetext"),u.FreeTextEditor=cl},(s,u,o)=>{var r,W,M,y,N,X,z,Y,S,D,R,g,J,U,H,C,v,K,j,O,_,cl,tl,E,il,al,Nl,nl,Sl,P,Q,q,ll,B,F,el,dl,Zl,Wl,Gl,Il,xl,bl,Ol,_l,Jl,$,ol,hl,pl,zl,jl,Ul,Kl,le,Pl,ee,ql,ie,ce,Ge,Dl,Al,We,he,Ke,Le,fl,Ye,ze;Object.defineProperty(u,"__esModule",{value:!0}),u.InkEditor=void 0;var Ie=o(1),be=o(140),St=o(141);const Oe=16,Se=class extends be.AnnotationEditor{constructor(Cl){super({...Cl,name:"inkEditor"}),et(this,v),et(this,j),et(this,_),et(this,tl),et(this,il),et(this,Nl),et(this,Sl),et(this,Q),et(this,ll),et(this,F),et(this,dl),et(this,Wl),et(this,Il),et(this,bl),et(this,_l),et(this,$),et(this,hl),et(this,zl),et(this,Ul),et(this,ee),et(this,ie),et(this,Ge),et(this,Al),et(this,he),et(this,Le),et(this,Ye),et(this,r,0),et(this,W,0),et(this,M,0),et(this,y,this.canvasContextMenu.bind(this)),et(this,N,this.canvasPointermove.bind(this)),et(this,X,this.canvasPointerleave.bind(this)),et(this,z,this.canvasPointerup.bind(this)),et(this,Y,this.canvasPointerdown.bind(this)),et(this,S,new Path2D),et(this,D,!1),et(this,R,!1),et(this,g,!1),et(this,J,null),et(this,U,0),et(this,H,0),et(this,C,null),this.color=Cl.color||null,this.thickness=Cl.thickness||null,this.opacity=Cl.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(Cl){this._l10nPromise=new Map(["editor_ink_canvas_aria_label","editor_ink2_aria_label"].map(Ql=>[Ql,Cl.get(Ql)]))}static updateDefaultParams(Cl,Ql){switch(Cl){case Ie.AnnotationEditorParamsType.INK_THICKNESS:Se._defaultThickness=Ql;break;case Ie.AnnotationEditorParamsType.INK_COLOR:Se._defaultColor=Ql;break;case Ie.AnnotationEditorParamsType.INK_OPACITY:Se._defaultOpacity=Ql/100}}updateParams(Cl,Ql){switch(Cl){case Ie.AnnotationEditorParamsType.INK_THICKNESS:nt(this,v,K).call(this,Ql);break;case Ie.AnnotationEditorParamsType.INK_COLOR:nt(this,j,O).call(this,Ql);break;case Ie.AnnotationEditorParamsType.INK_OPACITY:nt(this,_,cl).call(this,Ql)}}static get defaultPropertiesToUpdate(){return[[Ie.AnnotationEditorParamsType.INK_THICKNESS,Se._defaultThickness],[Ie.AnnotationEditorParamsType.INK_COLOR,Se._defaultColor||be.AnnotationEditor._defaultLineColor],[Ie.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*Se._defaultOpacity)]]}get propertiesToUpdate(){return[[Ie.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||Se._defaultThickness],[Ie.AnnotationEditorParamsType.INK_COLOR,this.color||Se._defaultColor||be.AnnotationEditor._defaultLineColor],[Ie.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(this.opacity??Se._defaultOpacity))]]}rebuild(){super.rebuild(),this.div!==null&&(this.canvas||(nt(this,_l,Jl).call(this),nt(this,$,ol).call(this)),this.isAttachedToDOM||(this.parent.add(this),nt(this,hl,pl).call(this)),nt(this,Le,fl).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,J).disconnect(),ut(this,J,null),super.remove())}setParent(Cl){!this.parent&&Cl?this._uiManager.removeShouldRescale(this):this.parent&&Cl===null&&this._uiManager.addShouldRescale(this),super.setParent(Cl)}onScaleChanging(){const[Cl,Ql]=this.parentDimensions,se=this.width*Cl,oe=this.height*Ql;this.setDimensions(se,oe)}enableEditMode(){!T(this,D)&&this.canvas!==null&&(super.enableEditMode(),this.div.draggable=!1,this.canvas.addEventListener("pointerdown",T(this,Y)))}disableEditMode(){this.isInEditMode()&&this.canvas!==null&&(super.disableEditMode(),this.div.draggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",T(this,Y)))}onceAdded(){this.div.draggable=!this.isEmpty()}isEmpty(){return this.paths.length===0||this.paths.length===1&&this.paths[0].length===0}commit(){T(this,D)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),ut(this,D,!0),this.div.classList.add("disabled"),nt(this,Le,fl).call(this,!0),this.parent.addInkEditorIfNeeded(!0),this.parent.moveEditorInDOM(this),this.div.focus({preventScroll:!0}))}focusin(Cl){super.focusin(Cl),this.enableEditMode()}canvasPointerdown(Cl){Cl.button===0&&this.isInEditMode()&&!T(this,D)&&(this.setInForeground(),Cl.preventDefault(),Cl.type!=="mouse"&&this.div.focus(),nt(this,Nl,nl).call(this,Cl.offsetX,Cl.offsetY))}canvasContextMenu(Cl){Cl.preventDefault()}canvasPointermove(Cl){Cl.preventDefault(),nt(this,Sl,P).call(this,Cl.offsetX,Cl.offsetY)}canvasPointerup(Cl){Cl.preventDefault(),nt(this,bl,Ol).call(this,Cl)}canvasPointerleave(Cl){nt(this,bl,Ol).call(this,Cl)}render(){if(this.div)return this.div;let Cl,Ql;this.width&&(Cl=this.x,Ql=this.y),super.render(),Se._l10nPromise.get("editor_ink2_aria_label").then(Ve=>{var we;return(we=this.div)===null||we===void 0?void 0:we.setAttribute("aria-label",Ve)});const[se,oe,te,ae]=nt(this,tl,E).call(this);if(this.setAt(se,oe,0,0),this.setDims(te,ae),nt(this,_l,Jl).call(this),this.width){const[Ve,we]=this.parentDimensions;this.setAt(Cl*Ve,Ql*we,this.width*Ve,this.height*we),ut(this,g,!0),nt(this,hl,pl).call(this),this.setDims(this.width*Ve,this.height*we),nt(this,Il,xl).call(this),nt(this,Ye,ze).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return nt(this,$,ol).call(this),this.div}setDimensions(Cl,Ql){const se=Math.round(Cl),oe=Math.round(Ql);if(T(this,U)===se&&T(this,H)===oe)return;ut(this,U,se),ut(this,H,oe),this.canvas.style.visibility="hidden",T(this,r)&&Math.abs(T(this,r)-Cl/Ql)>.01&&(Ql=Math.ceil(Cl/T(this,r)),this.setDims(Cl,Ql));const[te,ae]=this.parentDimensions;this.width=Cl/te,this.height=Ql/ae,T(this,D)&&nt(this,zl,jl).call(this,Cl,Ql),nt(this,hl,pl).call(this),nt(this,Il,xl).call(this),this.canvas.style.visibility="visible",this.fixDims()}static deserialize(Cl,Ql,se){var oe,te;const ae=super.deserialize(Cl,Ql,se);ae.thickness=Cl.thickness,ae.color=Ie.Util.makeHexColor(...Cl.color),ae.opacity=Cl.opacity;const[Ve,we]=ae.pageDimensions,Qe=ae.width*Ve,je=ae.height*we,He=ae.parentScale,Fe=Cl.thickness/2;ut(ae,r,Qe/je),ut(ae,D,!0),ut(ae,U,Math.round(Qe)),ut(ae,H,Math.round(je));for(const{bezier:ct}of Cl.paths){const Nt=[];ae.paths.push(Nt);let it=He*(ct[0]-Fe),at=He*(je-ct[1]-Fe);for(let rt=2,At=ct.length;rt<At;rt+=6){const Wi=He*(ct[rt]-Fe),ai=He*(je-ct[rt+1]-Fe),si=He*(ct[rt+2]-Fe),ki=He*(je-ct[rt+3]-Fe),Li=He*(ct[rt+4]-Fe),gl=He*(je-ct[rt+5]-Fe);Nt.push([[it,at],[Wi,ai],[si,ki],[Li,gl]]),it=Li,at=gl}const Tt=nt(this,le,Pl).call(this,Nt);ae.bezierPath2D.push(Tt)}const Be=nt(oe=ae,Al,We).call(oe);return ut(ae,M,Math.max(Oe,Be[2]-Be[0])),ut(ae,W,Math.max(Oe,Be[3]-Be[1])),nt(te=ae,zl,jl).call(te,Qe,je),ae}serialize(){if(this.isEmpty())return null;const Cl=this.getRect(0,0),Ql=this.rotation%180==0?Cl[3]-Cl[1]:Cl[2]-Cl[0],se=be.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);return{annotationType:Ie.AnnotationEditorType.INK,color:se,thickness:this.thickness,opacity:this.opacity,paths:nt(this,ee,ql).call(this,this.scaleFactor/this.parentScale,this.translationX,this.translationY,Ql),pageIndex:this.pageIndex,rect:Cl,rotation:this.rotation}}};let Zt=Se;r=new WeakMap,W=new WeakMap,M=new WeakMap,y=new WeakMap,N=new WeakMap,X=new WeakMap,z=new WeakMap,Y=new WeakMap,S=new WeakMap,D=new WeakMap,R=new WeakMap,g=new WeakMap,J=new WeakMap,U=new WeakMap,H=new WeakMap,C=new WeakMap,v=new WeakSet,K=function(Cl){const Ql=this.thickness;this.addCommands({cmd:()=>{this.thickness=Cl,nt(this,Le,fl).call(this)},undo:()=>{this.thickness=Ql,nt(this,Le,fl).call(this)},mustExec:!0,type:Ie.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})},j=new WeakSet,O=function(Cl){const Ql=this.color;this.addCommands({cmd:()=>{this.color=Cl,nt(this,Il,xl).call(this)},undo:()=>{this.color=Ql,nt(this,Il,xl).call(this)},mustExec:!0,type:Ie.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})},_=new WeakSet,cl=function(Cl){Cl/=100;const Ql=this.opacity;this.addCommands({cmd:()=>{this.opacity=Cl,nt(this,Il,xl).call(this)},undo:()=>{this.opacity=Ql,nt(this,Il,xl).call(this)},mustExec:!0,type:Ie.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})},tl=new WeakSet,E=function(){const{parentRotation:Cl,parentDimensions:[Ql,se]}=this;switch(Cl){case 90:return[0,se,se,Ql];case 180:return[Ql,se,Ql,se];case 270:return[Ql,0,se,Ql];default:return[0,0,Ql,se]}},il=new WeakSet,al=function(){const{ctx:Cl,color:Ql,opacity:se,thickness:oe,parentScale:te,scaleFactor:ae}=this;Cl.lineWidth=oe*te/ae,Cl.lineCap="round",Cl.lineJoin="round",Cl.miterLimit=10,Cl.strokeStyle=`${Ql}${(0,St.opacityToHex)(se)}`},Nl=new WeakSet,nl=function(Cl,Ql){this.canvas.addEventListener("contextmenu",T(this,y)),this.canvas.addEventListener("pointerleave",T(this,X)),this.canvas.addEventListener("pointermove",T(this,N)),this.canvas.addEventListener("pointerup",T(this,z)),this.canvas.removeEventListener("pointerdown",T(this,Y)),this.isEditing=!0,T(this,g)||(ut(this,g,!0),nt(this,hl,pl).call(this),this.thickness||(this.thickness=Se._defaultThickness),this.color||(this.color=Se._defaultColor||be.AnnotationEditor._defaultLineColor),this.opacity??(this.opacity=Se._defaultOpacity)),this.currentPath.push([Cl,Ql]),ut(this,R,!1),nt(this,il,al).call(this),ut(this,C,()=>{nt(this,F,el).call(this),T(this,C)&&window.requestAnimationFrame(T(this,C))}),window.requestAnimationFrame(T(this,C))},Sl=new WeakSet,P=function(Cl,Ql){const[se,oe]=this.currentPath.at(-1);if(this.currentPath.length>1&&Cl===se&&Ql===oe)return;const te=this.currentPath;let ae=T(this,S);te.push([Cl,Ql]),ut(this,R,!0),te.length<=2?(ae.moveTo(...te[0]),ae.lineTo(Cl,Ql)):(te.length===3&&(ut(this,S,ae=new Path2D),ae.moveTo(...te[0])),nt(this,dl,Zl).call(this,ae,...te.at(-3),...te.at(-2),Cl,Ql))},Q=new WeakSet,q=function(){if(this.currentPath.length===0)return;const Cl=this.currentPath.at(-1);T(this,S).lineTo(...Cl)},ll=new WeakSet,B=function(Cl,Ql){ut(this,C,null),Cl=Math.min(Math.max(Cl,0),this.canvas.width),Ql=Math.min(Math.max(Ql,0),this.canvas.height),nt(this,Sl,P).call(this,Cl,Ql),nt(this,Q,q).call(this);let se;if(this.currentPath.length!==1)se=nt(this,Wl,Gl).call(this);else{const ae=[Cl,Ql];se=[[ae,ae.slice(),ae.slice(),ae]]}const oe=T(this,S),te=this.currentPath;this.currentPath=[],ut(this,S,new Path2D),this.addCommands({cmd:()=>{this.allRawPaths.push(te),this.paths.push(se),this.bezierPath2D.push(oe),this.rebuild()},undo:()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),this.paths.length===0?this.remove():(this.canvas||(nt(this,_l,Jl).call(this),nt(this,$,ol).call(this)),nt(this,Le,fl).call(this))},mustExec:!0})},F=new WeakSet,el=function(){if(!T(this,R))return;ut(this,R,!1),Math.ceil(this.thickness*this.parentScale);const Cl=this.currentPath.slice(-3),Ql=Cl.map(te=>te[0]),se=Cl.map(te=>te[1]),{ctx:oe}=(Math.min(...Ql),Math.max(...Ql),Math.min(...se),Math.max(...se),this);oe.save(),oe.clearRect(0,0,this.canvas.width,this.canvas.height);for(const te of this.bezierPath2D)oe.stroke(te);oe.stroke(T(this,S)),oe.restore()},dl=new WeakSet,Zl=function(Cl,Ql,se,oe,te,ae,Ve){const we=(Ql+oe)/2,Qe=(se+te)/2,je=(oe+ae)/2,He=(te+Ve)/2;Cl.bezierCurveTo(we+2*(oe-we)/3,Qe+2*(te-Qe)/3,je+2*(oe-je)/3,He+2*(te-He)/3,je,He)},Wl=new WeakSet,Gl=function(){const Cl=this.currentPath;if(Cl.length<=2)return[[Cl[0],Cl[0],Cl.at(-1),Cl.at(-1)]];const Ql=[];let se,[oe,te]=Cl[0];for(se=1;se<Cl.length-2;se++){const[Fe,Be]=Cl[se],[ct,Nt]=Cl[se+1],it=(Fe+ct)/2,at=(Be+Nt)/2,Tt=[oe+2*(Fe-oe)/3,te+2*(Be-te)/3],rt=[it+2*(Fe-it)/3,at+2*(Be-at)/3];Ql.push([[oe,te],Tt,rt,[it,at]]),[oe,te]=[it,at]}const[ae,Ve]=Cl[se],[we,Qe]=Cl[se+1],je=[oe+2*(ae-oe)/3,te+2*(Ve-te)/3],He=[we+2*(ae-we)/3,Qe+2*(Ve-Qe)/3];return Ql.push([[oe,te],je,He,[we,Qe]]),Ql},Il=new WeakSet,xl=function(){if(this.isEmpty()){nt(this,Ul,Kl).call(this);return}nt(this,il,al).call(this);const{canvas:Cl,ctx:Ql}=this;Ql.setTransform(1,0,0,1,0,0),Ql.clearRect(0,0,Cl.width,Cl.height),nt(this,Ul,Kl).call(this);for(const se of this.bezierPath2D)Ql.stroke(se)},bl=new WeakSet,Ol=function(Cl){this.canvas.removeEventListener("pointerleave",T(this,X)),this.canvas.removeEventListener("pointermove",T(this,N)),this.canvas.removeEventListener("pointerup",T(this,z)),this.canvas.addEventListener("pointerdown",T(this,Y)),setTimeout(()=>{this.canvas.removeEventListener("contextmenu",T(this,y))},10),nt(this,ll,B).call(this,Cl.offsetX,Cl.offsetY),this.addToAnnotationStorage(),this.setInBackground()},_l=new WeakSet,Jl=function(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",Se._l10nPromise.get("editor_ink_canvas_aria_label").then(Cl=>{var Ql;return(Ql=this.canvas)===null||Ql===void 0?void 0:Ql.setAttribute("aria-label",Cl)}),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")},$=new WeakSet,ol=function(){ut(this,J,new ResizeObserver(Cl=>{const Ql=Cl[0].contentRect;Ql.width&&Ql.height&&this.setDimensions(Ql.width,Ql.height)})),T(this,J).observe(this.div)},hl=new WeakSet,pl=function(){if(!T(this,g))return;const[Cl,Ql]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*Cl),this.canvas.height=Math.ceil(this.height*Ql),nt(this,Ul,Kl).call(this)},zl=new WeakSet,jl=function(Cl,Ql){const se=nt(this,he,Ke).call(this),oe=(Cl-se)/T(this,M),te=(Ql-se)/T(this,W);this.scaleFactor=Math.min(oe,te)},Ul=new WeakSet,Kl=function(){const Cl=nt(this,he,Ke).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+Cl,this.translationY*this.scaleFactor+Cl)},le=new WeakSet,Pl=function(Cl){const Ql=new Path2D;for(let se=0,oe=Cl.length;se<oe;se++){const[te,ae,Ve,we]=Cl[se];se===0&&Ql.moveTo(...te),Ql.bezierCurveTo(ae[0],ae[1],Ve[0],Ve[1],we[0],we[1])}return Ql},ee=new WeakSet,ql=function(Cl,Ql,se,oe){const te=[],ae=this.thickness/2;let Ve,we;for(const Qe of this.paths){Ve=[],we=[];for(let je=0,He=Qe.length;je<He;je++){const[Fe,Be,ct,Nt]=Qe[je],it=Cl*(Fe[0]+Ql)+ae,at=oe-Cl*(Fe[1]+se)-ae,Tt=Cl*(Be[0]+Ql)+ae,rt=oe-Cl*(Be[1]+se)-ae,At=Cl*(ct[0]+Ql)+ae,Wi=oe-Cl*(ct[1]+se)-ae,ai=Cl*(Nt[0]+Ql)+ae,si=oe-Cl*(Nt[1]+se)-ae;je===0&&(Ve.push(it,at),we.push(it,at)),Ve.push(Tt,rt,At,Wi,ai,si),nt(this,ie,ce).call(this,it,at,Tt,rt,At,Wi,ai,si,4,we)}te.push({bezier:Ve,points:we})}return te},ie=new WeakSet,ce=function(Cl,Ql,se,oe,te,ae,Ve,we,Qe,je){if(nt(this,Ge,Dl).call(this,Cl,Ql,se,oe,te,ae,Ve,we))je.push(Ve,we);else{for(let He=1;He<Qe-1;He++){const Fe=He/Qe,Be=1-Fe;let ct=Fe*Cl+Be*se,Nt=Fe*Ql+Be*oe,it=Fe*se+Be*te,at=Fe*oe+Be*ae;ct=Fe*ct+Be*it,Nt=Fe*Nt+Be*at,it=Fe*it+Be*(Fe*te+Be*Ve),at=Fe*at+Be*(Fe*ae+Be*we),ct=Fe*ct+Be*it,Nt=Fe*Nt+Be*at,je.push(ct,Nt)}je.push(Ve,we)}},Ge=new WeakSet,Dl=function(Cl,Ql,se,oe,te,ae,Ve,we){const Qe=(3*se-2*Cl-Ve)**2,je=(3*oe-2*Ql-we)**2,He=(3*te-Cl-2*Ve)**2,Fe=(3*ae-Ql-2*we)**2;return Math.max(Qe,He)+Math.max(je,Fe)<=10},Al=new WeakSet,We=function(){let Cl=1/0,Ql=-1/0,se=1/0,oe=-1/0;for(const te of this.paths)for(const[ae,Ve,we,Qe]of te){const je=Ie.Util.bezierBoundingBox(...ae,...Ve,...we,...Qe);Cl=Math.min(Cl,je[0]),se=Math.min(se,je[1]),Ql=Math.max(Ql,je[2]),oe=Math.max(oe,je[3])}return[Cl,se,Ql,oe]},he=new WeakSet,Ke=function(){return T(this,D)?Math.ceil(this.thickness*this.parentScale):0},Le=new WeakSet,fl=function(){let Cl=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(this.isEmpty())return;if(!T(this,D)){nt(this,Il,xl).call(this);return}const Ql=nt(this,Al,We).call(this),se=nt(this,he,Ke).call(this);ut(this,M,Math.max(Oe,Ql[2]-Ql[0])),ut(this,W,Math.max(Oe,Ql[3]-Ql[1]));const oe=Math.ceil(se+T(this,M)*this.scaleFactor),te=Math.ceil(se+T(this,W)*this.scaleFactor),[ae,Ve]=this.parentDimensions;this.width=oe/ae,this.height=te/Ve,ut(this,r,oe/te),nt(this,Ye,ze).call(this);const we=this.translationX,Qe=this.translationY;this.translationX=-Ql[0],this.translationY=-Ql[1],nt(this,hl,pl).call(this),nt(this,Il,xl).call(this),ut(this,U,oe),ut(this,H,te),this.setDims(oe,te);const je=Cl?se/this.scaleFactor/2:0;this.translate(we-this.translationX-je,Qe-this.translationY-je)},Ye=new WeakSet,ze=function(){const{style:Cl}=this.div;T(this,r)>=1?(Cl.minHeight="16px",Cl.minWidth=`${Math.round(T(this,r)*Oe)}px`):(Cl.minWidth="16px",Cl.minHeight=`${Math.round(Oe/T(this,r))}px`)},et(Zt,le),It(Zt,"_defaultColor",null),It(Zt,"_defaultOpacity",1),It(Zt,"_defaultThickness",1),It(Zt,"_l10nPromise"),It(Zt,"_type","ink"),u.InkEditor=Zt},(s,u,o)=>{var r,W,M,y,N,X,z,Y;Object.defineProperty(u,"__esModule",{value:!0}),u.AnnotationLayer=void 0;var S=o(1),D=o(142),R=o(139),g=o(166),J=o(167);const U=1e3,H=new WeakSet;function C(Jl){return{width:Jl[2]-Jl[0],height:Jl[3]-Jl[1]}}class v{static create($){switch($.data.annotationType){case S.AnnotationType.LINK:return new j($);case S.AnnotationType.TEXT:return new O($);case S.AnnotationType.WIDGET:switch($.data.fieldType){case"Tx":return new cl($);case"Btn":return $.data.radioButton?new E($):$.data.checkBox?new tl($):new il($);case"Ch":return new al($)}return new _($);case S.AnnotationType.POPUP:return new nl($);case S.AnnotationType.FREETEXT:return new P($);case S.AnnotationType.LINE:return new Q($);case S.AnnotationType.SQUARE:return new q($);case S.AnnotationType.CIRCLE:return new ll($);case S.AnnotationType.POLYLINE:return new B($);case S.AnnotationType.CARET:return new el($);case S.AnnotationType.INK:return new dl($);case S.AnnotationType.POLYGON:return new F($);case S.AnnotationType.HIGHLIGHT:return new Zl($);case S.AnnotationType.UNDERLINE:return new Wl($);case S.AnnotationType.SQUIGGLY:return new Gl($);case S.AnnotationType.STRIKEOUT:return new Il($);case S.AnnotationType.STAMP:return new xl($);case S.AnnotationType.FILEATTACHMENT:return new bl($);default:return new K($)}}}class K{constructor($){let{isRenderable:ol=!1,ignoreBorder:hl=!1,createQuadrilaterals:pl=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.isRenderable=ol,this.data=$.data,this.layer=$.layer,this.page=$.page,this.viewport=$.viewport,this.linkService=$.linkService,this.downloadManager=$.downloadManager,this.imageResourcesPath=$.imageResourcesPath,this.renderForms=$.renderForms,this.svgFactory=$.svgFactory,this.annotationStorage=$.annotationStorage,this.enableScripting=$.enableScripting,this.hasJSActions=$.hasJSActions,this._fieldObjects=$.fieldObjects,ol&&(this.container=this._createContainer(hl)),pl&&(this.quadrilaterals=this._createQuadrilaterals(hl))}_createContainer(){let $=arguments.length>0&&arguments[0]!==void 0&&arguments[0];const{data:ol,page:hl,viewport:pl}=this,zl=document.createElement("section");zl.setAttribute("data-annotation-id",ol.id),ol.noRotate&&zl.classList.add("norotate");const{pageWidth:jl,pageHeight:Ul,pageX:Kl,pageY:le}=pl.rawDims,{width:Pl,height:ee}=C(ol.rect),ql=S.Util.normalizeRect([ol.rect[0],hl.view[3]-ol.rect[1]+hl.view[1],ol.rect[2],hl.view[3]-ol.rect[3]+hl.view[1]]);if(!$&&ol.borderStyle.width>0){zl.style.borderWidth=`${ol.borderStyle.width}px`;const ce=ol.borderStyle.horizontalCornerRadius,Ge=ol.borderStyle.verticalCornerRadius;if(ce>0||Ge>0){const Al=`calc(${ce}px * var(--scale-factor)) / calc(${Ge}px * var(--scale-factor))`;zl.style.borderRadius=Al}else if(this instanceof E){const Al=`calc(${Pl}px * var(--scale-factor)) / calc(${ee}px * var(--scale-factor))`;zl.style.borderRadius=Al}switch(ol.borderStyle.style){case S.AnnotationBorderStyleType.SOLID:zl.style.borderStyle="solid";break;case S.AnnotationBorderStyleType.DASHED:zl.style.borderStyle="dashed";break;case S.AnnotationBorderStyleType.BEVELED:(0,S.warn)("Unimplemented border style: beveled");break;case S.AnnotationBorderStyleType.INSET:(0,S.warn)("Unimplemented border style: inset");break;case S.AnnotationBorderStyleType.UNDERLINE:zl.style.borderBottomStyle="solid"}const Dl=ol.borderColor||null;Dl?zl.style.borderColor=S.Util.makeHexColor(0|Dl[0],0|Dl[1],0|Dl[2]):zl.style.borderWidth=0}zl.style.left=100*(ql[0]-Kl)/jl+"%",zl.style.top=100*(ql[1]-le)/Ul+"%";const{rotation:ie}=ol;return ol.hasOwnCanvas||ie===0?(zl.style.width=100*Pl/jl+"%",zl.style.height=100*ee/Ul+"%"):this.setRotation(ie,zl),zl}setRotation($){let ol=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.container;const{pageWidth:hl,pageHeight:pl}=this.viewport.rawDims,{width:zl,height:jl}=C(this.data.rect);let Ul,Kl;$%180==0?(Ul=100*zl/hl,Kl=100*jl/pl):(Ul=100*jl/hl,Kl=100*zl/pl),ol.style.width=`${Ul}%`,ol.style.height=`${Kl}%`,ol.setAttribute("data-main-rotation",(360-$)%360)}get _commonActions(){const $=(ol,hl,pl)=>{const zl=pl.detail[ol];pl.target.style[hl]=g.ColorConverters[`${zl[0]}_HTML`](zl.slice(1))};return(0,S.shadow)(this,"_commonActions",{display:ol=>{const hl=ol.detail.display%2==1;this.container.style.visibility=hl?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:hl,print:ol.detail.display===0||ol.detail.display===3})},print:ol=>{this.annotationStorage.setValue(this.data.id,{print:ol.detail.print})},hidden:ol=>{this.container.style.visibility=ol.detail.hidden?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:ol.detail.hidden})},focus:ol=>{setTimeout(()=>ol.target.focus({preventScroll:!1}),0)},userName:ol=>{ol.target.title=ol.detail.userName},readonly:ol=>{ol.detail.readonly?ol.target.setAttribute("readonly",""):ol.target.removeAttribute("readonly")},required:ol=>{this._setRequired(ol.target,ol.detail.required)},bgColor:ol=>{$("bgColor","backgroundColor",ol)},fillColor:ol=>{$("fillColor","backgroundColor",ol)},fgColor:ol=>{$("fgColor","color",ol)},textColor:ol=>{$("textColor","color",ol)},borderColor:ol=>{$("borderColor","borderColor",ol)},strokeColor:ol=>{$("strokeColor","borderColor",ol)},rotation:ol=>{const hl=ol.detail.rotation;this.setRotation(hl),this.annotationStorage.setValue(this.data.id,{rotation:hl})}})}_dispatchEventFromSandbox($,ol){const hl=this._commonActions;for(const pl of Object.keys(ol.detail)){const zl=$[pl]||hl[pl];zl==null||zl(ol)}}_setDefaultPropertiesFromJS($){if(!this.enableScripting)return;const ol=this.annotationStorage.getRawValue(this.data.id);if(!ol)return;const hl=this._commonActions;for(const[pl,zl]of Object.entries(ol)){const jl=hl[pl];jl&&(jl({detail:{[pl]:zl},target:$}),delete ol[pl])}}_createQuadrilaterals(){let $=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(!this.data.quadPoints)return null;const ol=[],hl=this.data.rect;for(const pl of this.data.quadPoints)this.data.rect=[pl[2].x,pl[2].y,pl[1].x,pl[1].y],ol.push(this._createContainer($));return this.data.rect=hl,ol}_createPopup($,ol){let hl=this.container;this.quadrilaterals&&($||($=this.quadrilaterals),hl=this.quadrilaterals[0]),$||(($=document.createElement("div")).classList.add("popupTriggerArea"),hl.append($));const pl=new Sl({container:hl,trigger:$,color:ol.color,titleObj:ol.titleObj,modificationDate:ol.modificationDate,contentsObj:ol.contentsObj,richText:ol.richText,hideWrapper:!0}).render();pl.style.left="100%",hl.append(pl)}_renderQuadrilaterals($){for(const ol of this.quadrilaterals)ol.classList.add($);return this.quadrilaterals}render(){(0,S.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName($){let ol=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const hl=[];if(this._fieldObjects){const pl=this._fieldObjects[$];if(pl)for(const{page:zl,id:jl,exportValues:Ul}of pl){if(zl===-1||jl===ol)continue;const Kl=typeof Ul=="string"?Ul:null,le=document.querySelector(`[data-element-id="${jl}"]`);!le||H.has(le)?hl.push({id:jl,exportValue:Kl,domElement:le}):(0,S.warn)(`_getElementsByName - element not allowed: ${jl}`)}return hl}for(const pl of document.getElementsByName($)){const{exportValue:zl}=pl,jl=pl.getAttribute("data-element-id");jl!==ol&&H.has(pl)&&hl.push({id:jl,exportValue:zl,domElement:pl})}return hl}}class j extends K{constructor($){let ol=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;super($,{isRenderable:!0,ignoreBorder:!(ol==null||!ol.ignoreBorder),createQuadrilaterals:!0}),et(this,r),et(this,M),this.isTooltipOnly=$.data.isTooltipOnly}render(){const{data:$,linkService:ol}=this,hl=document.createElement("a");hl.setAttribute("data-element-id",$.id);let pl=!1;return $.url?(ol.addLinkAttributes(hl,$.url,$.newWindow),pl=!0):$.action?(this._bindNamedAction(hl,$.action),pl=!0):$.attachment?(this._bindAttachment(hl,$.attachment),pl=!0):$.setOCGState?(nt(this,M,y).call(this,hl,$.setOCGState),pl=!0):$.dest?(this._bindLink(hl,$.dest),pl=!0):($.actions&&($.actions.Action||$.actions["Mouse Up"]||$.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(hl,$),pl=!0),$.resetForm?(this._bindResetFormAction(hl,$.resetForm),pl=!0):this.isTooltipOnly&&!pl&&(this._bindLink(hl,""),pl=!0)),this.quadrilaterals?this._renderQuadrilaterals("linkAnnotation").map((zl,jl)=>{const Ul=jl===0?hl:hl.cloneNode();return zl.append(Ul),zl}):(this.container.classList.add("linkAnnotation"),pl&&this.container.append(hl),this.container)}_bindLink($,ol){$.href=this.linkService.getDestinationHash(ol),$.onclick=()=>(ol&&this.linkService.goToDestination(ol),!1),(ol||ol==="")&&nt(this,r,W).call(this)}_bindNamedAction($,ol){$.href=this.linkService.getAnchorUrl(""),$.onclick=()=>(this.linkService.executeNamedAction(ol),!1),nt(this,r,W).call(this)}_bindAttachment($,ol){$.href=this.linkService.getAnchorUrl(""),$.onclick=()=>{var hl;return(hl=this.downloadManager)===null||hl===void 0||hl.openOrDownloadData(this.container,ol.content,ol.filename),!1},nt(this,r,W).call(this)}_bindJSAction($,ol){$.href=this.linkService.getAnchorUrl("");const hl=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const pl of Object.keys(ol.actions)){const zl=hl.get(pl);zl&&($[zl]=()=>{var jl;return(jl=this.linkService.eventBus)===null||jl===void 0||jl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:ol.id,name:pl}}),!1})}$.onclick||($.onclick=()=>!1),nt(this,r,W).call(this)}_bindResetFormAction($,ol){const hl=$.onclick;hl||($.href=this.linkService.getAnchorUrl("")),nt(this,r,W).call(this),this._fieldObjects?$.onclick=()=>{hl==null||hl();const{fields:pl,refs:zl,include:jl}=ol,Ul=[];if(pl.length!==0||zl.length!==0){const ee=new Set(zl);for(const ql of pl){const ie=this._fieldObjects[ql]||[];for(const{id:ce}of ie)ee.add(ce)}for(const ql of Object.values(this._fieldObjects))for(const ie of ql)ee.has(ie.id)===jl&&Ul.push(ie)}else for(const ee of Object.values(this._fieldObjects))Ul.push(...ee);const Kl=this.annotationStorage,le=[];for(const ee of Ul){const{id:ql}=ee;switch(le.push(ql),ee.type){case"text":{const ce=ee.defaultValue||"";Kl.setValue(ql,{value:ce});break}case"checkbox":case"radiobutton":{const ce=ee.defaultValue===ee.exportValues;Kl.setValue(ql,{value:ce});break}case"combobox":case"listbox":{const ce=ee.defaultValue||"";Kl.setValue(ql,{value:ce});break}default:continue}const ie=document.querySelector(`[data-element-id="${ql}"]`);ie&&(H.has(ie)?ie.dispatchEvent(new Event("resetform")):(0,S.warn)(`_bindResetFormAction - element not allowed: ${ql}`))}if(this.enableScripting){var Pl;(Pl=this.linkService.eventBus)===null||Pl===void 0||Pl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:le,name:"ResetForm"}})}return!1}:((0,S.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),hl||($.onclick=()=>!1))}}r=new WeakSet,W=function(){this.container.setAttribute("data-internal-link","")},M=new WeakSet,y=function(Jl,$){Jl.href=this.linkService.getAnchorUrl(""),Jl.onclick=()=>(this.linkService.executeSetOCGState($),!1),nt(this,r,W).call(this)};class O extends K{constructor($){var ol,hl,pl;super($,{isRenderable:!!($.data.hasPopup||(ol=$.data.titleObj)!==null&&ol!==void 0&&ol.str||(hl=$.data.contentsObj)!==null&&hl!==void 0&&hl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str)})}render(){this.container.classList.add("textAnnotation");const $=document.createElement("img");return $.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",$.alt="[{{type}} Annotation]",$.dataset.l10nId="text_annotation_type",$.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup($,this.data),this.container.append($),this.container}}class _ extends K{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}showElementAndHideCanvas($){if(this.data.hasOwnCanvas){var ol;((ol=$.previousSibling)===null||ol===void 0?void 0:ol.nodeName)==="CANVAS"&&($.previousSibling.hidden=!0),$.hidden=!1}}_getKeyModifier($){const{isWin:ol,isMac:hl}=S.FeatureTest.platform;return ol&&$.ctrlKey||hl&&$.metaKey}_setEventListener($,ol,hl,pl){ol.includes("mouse")?$.addEventListener(ol,zl=>{var jl;(jl=this.linkService.eventBus)===null||jl===void 0||jl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:hl,value:pl(zl),shift:zl.shiftKey,modifier:this._getKeyModifier(zl)}})}):$.addEventListener(ol,zl=>{var jl;(jl=this.linkService.eventBus)===null||jl===void 0||jl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:hl,value:pl(zl)}})})}_setEventListeners($,ol,hl){for(const[zl,jl]of ol){var pl;(jl==="Action"||(pl=this.data.actions)!==null&&pl!==void 0&&pl[jl])&&this._setEventListener($,zl,jl,hl)}}_setBackgroundColor($){const ol=this.data.backgroundColor||null;$.style.backgroundColor=ol===null?"transparent":S.Util.makeHexColor(ol[0],ol[1],ol[2])}_setTextStyle($){const ol=["left","center","right"],{fontColor:hl}=this.data.defaultAppearanceData,pl=this.data.defaultAppearanceData.fontSize||9,zl=$.style;let jl;const Ul=Kl=>Math.round(10*Kl)/10;if(this.data.multiLine){const Kl=Math.abs(this.data.rect[3]-this.data.rect[1]-2),le=Kl/(Math.round(Kl/(S.LINE_FACTOR*pl))||1);jl=Math.min(pl,Ul(le/S.LINE_FACTOR))}else{const Kl=Math.abs(this.data.rect[3]-this.data.rect[1]-2);jl=Math.min(pl,Ul(Kl/S.LINE_FACTOR))}zl.fontSize=`calc(${jl}px * var(--scale-factor))`,zl.color=S.Util.makeHexColor(hl[0],hl[1],hl[2]),this.data.textAlignment!==null&&(zl.textAlign=ol[this.data.textAlignment])}_setRequired($,ol){ol?$.setAttribute("required",!0):$.removeAttribute("required"),$.setAttribute("aria-required",ol)}}class cl extends _{constructor($){super($,{isRenderable:$.renderForms||!$.data.hasAppearance&&!!$.data.fieldValue})}setPropertyOnSiblings($,ol,hl,pl){const zl=this.annotationStorage;for(const jl of this._getElementsByName($.name,$.id))jl.domElement&&(jl.domElement[ol]=hl),zl.setValue(jl.id,{[pl]:hl})}render(){const $=this.annotationStorage,ol=this.data.id;this.container.classList.add("textWidgetAnnotation");let hl=null;if(this.renderForms){var pl;const jl=$.getValue(ol,{value:this.data.fieldValue});let Ul=jl.value||"";const Kl=$.getValue(ol,{charLimit:this.data.maxLen}).charLimit;Kl&&Ul.length>Kl&&(Ul=Ul.slice(0,Kl));let le=jl.formattedValue||((pl=this.data.textContent)===null||pl===void 0?void 0:pl.join(`
84
84
  `))||null;le&&this.data.comb&&(le=le.replaceAll(/\s+/g,""));const Pl={userValue:Ul,formattedValue:le,lastCommittedValue:null,commitKey:1};this.data.multiLine?(hl=document.createElement("textarea"),hl.textContent=le??Ul,this.data.doNotScroll&&(hl.style.overflowY="hidden")):(hl=document.createElement("input"),hl.type="text",hl.setAttribute("value",le??Ul),this.data.doNotScroll&&(hl.style.overflowX="hidden")),this.data.hasOwnCanvas&&(hl.hidden=!0),H.add(hl),hl.setAttribute("data-element-id",ol),hl.disabled=this.data.readOnly,hl.name=this.data.fieldName,hl.tabIndex=U,this._setRequired(hl,this.data.required),Kl&&(hl.maxLength=Kl),hl.addEventListener("input",ql=>{$.setValue(ol,{value:ql.target.value}),this.setPropertyOnSiblings(hl,"value",ql.target.value,"value"),Pl.formattedValue=null}),hl.addEventListener("resetform",ql=>{const ie=this.data.defaultFieldValue??"";hl.value=Pl.userValue=ie,Pl.formattedValue=null});let ee=ql=>{const{formattedValue:ie}=Pl;ie!=null&&(ql.target.value=ie),ql.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){var zl;hl.addEventListener("focus",ie=>{const{target:ce}=ie;Pl.userValue&&(ce.value=Pl.userValue),Pl.lastCommittedValue=ce.value,Pl.commitKey=1}),hl.addEventListener("updatefromsandbox",ie=>{this.showElementAndHideCanvas(ie.target);const ce={value(Ge){Pl.userValue=Ge.detail.value??"",$.setValue(ol,{value:Pl.userValue.toString()}),Ge.target.value=Pl.userValue},formattedValue(Ge){const{formattedValue:Dl}=Ge.detail;Pl.formattedValue=Dl,Dl!=null&&Ge.target!==document.activeElement&&(Ge.target.value=Dl),$.setValue(ol,{formattedValue:Dl})},selRange(Ge){Ge.target.setSelectionRange(...Ge.detail.selRange)},charLimit:Ge=>{var Dl;const{charLimit:Al}=Ge.detail,{target:We}=Ge;if(Al===0){We.removeAttribute("maxLength");return}We.setAttribute("maxLength",Al);let he=Pl.userValue;he&&!(he.length<=Al)&&(he=he.slice(0,Al),We.value=Pl.userValue=he,$.setValue(ol,{value:he}),(Dl=this.linkService.eventBus)===null||Dl===void 0||Dl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:ol,name:"Keystroke",value:he,willCommit:!0,commitKey:1,selStart:We.selectionStart,selEnd:We.selectionEnd}}))}};this._dispatchEventFromSandbox(ce,ie)}),hl.addEventListener("keydown",ie=>{var ce;Pl.commitKey=1;let Ge=-1;if(ie.key==="Escape"?Ge=0:ie.key!=="Enter"||this.data.multiLine?ie.key==="Tab"&&(Pl.commitKey=3):Ge=2,Ge===-1)return;const{value:Dl}=ie.target;Pl.lastCommittedValue!==Dl&&(Pl.lastCommittedValue=Dl,Pl.userValue=Dl,(ce=this.linkService.eventBus)===null||ce===void 0||ce.dispatch("dispatcheventinsandbox",{source:this,detail:{id:ol,name:"Keystroke",value:Dl,willCommit:!0,commitKey:Ge,selStart:ie.target.selectionStart,selEnd:ie.target.selectionEnd}}))});const ql=ee;ee=null,hl.addEventListener("blur",ie=>{if(!ie.relatedTarget)return;const{value:ce}=ie.target;if(Pl.userValue=ce,Pl.lastCommittedValue!==ce){var Ge;(Ge=this.linkService.eventBus)===null||Ge===void 0||Ge.dispatch("dispatcheventinsandbox",{source:this,detail:{id:ol,name:"Keystroke",value:ce,willCommit:!0,commitKey:Pl.commitKey,selStart:ie.target.selectionStart,selEnd:ie.target.selectionEnd}})}ql(ie)}),(zl=this.data.actions)!==null&&zl!==void 0&&zl.Keystroke&&hl.addEventListener("beforeinput",ie=>{var ce;Pl.lastCommittedValue=null;const{data:Ge,target:Dl}=ie,{value:Al,selectionStart:We,selectionEnd:he}=Dl;let Ke=We,Le=he;switch(ie.inputType){case"deleteWordBackward":{const fl=Al.substring(0,We).match(/\w*[^\w]*$/);fl&&(Ke-=fl[0].length);break}case"deleteWordForward":{const fl=Al.substring(We).match(/^[^\w]*\w*/);fl&&(Le+=fl[0].length);break}case"deleteContentBackward":We===he&&(Ke-=1);break;case"deleteContentForward":We===he&&(Le+=1)}ie.preventDefault(),(ce=this.linkService.eventBus)===null||ce===void 0||ce.dispatch("dispatcheventinsandbox",{source:this,detail:{id:ol,name:"Keystroke",value:Al,change:Ge||"",willCommit:!1,selStart:Ke,selEnd:Le}})}),this._setEventListeners(hl,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],ie=>ie.target.value)}if(ee&&hl.addEventListener("blur",ee),this.data.comb){const ql=(this.data.rect[2]-this.data.rect[0])/Kl;hl.classList.add("comb"),hl.style.letterSpacing=`calc(${ql}px * var(--scale-factor) - 1ch)`}}else hl=document.createElement("div"),hl.textContent=this.data.fieldValue,hl.style.verticalAlign="middle",hl.style.display="table-cell";return this._setTextStyle(hl),this._setBackgroundColor(hl),this._setDefaultPropertiesFromJS(hl),this.container.append(hl),this.container}}class tl extends _{constructor($){super($,{isRenderable:$.renderForms})}render(){const $=this.annotationStorage,ol=this.data,hl=ol.id;let pl=$.getValue(hl,{value:ol.exportValue===ol.fieldValue}).value;typeof pl=="string"&&(pl=pl!=="Off",$.setValue(hl,{value:pl})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const zl=document.createElement("input");return H.add(zl),zl.setAttribute("data-element-id",hl),zl.disabled=ol.readOnly,this._setRequired(zl,this.data.required),zl.type="checkbox",zl.name=ol.fieldName,pl&&zl.setAttribute("checked",!0),zl.setAttribute("exportValue",ol.exportValue),zl.tabIndex=U,zl.addEventListener("change",jl=>{const{name:Ul,checked:Kl}=jl.target;for(const le of this._getElementsByName(Ul,hl)){const Pl=Kl&&le.exportValue===ol.exportValue;le.domElement&&(le.domElement.checked=Pl),$.setValue(le.id,{value:Pl})}$.setValue(hl,{value:Kl})}),zl.addEventListener("resetform",jl=>{const Ul=ol.defaultFieldValue||"Off";jl.target.checked=Ul===ol.exportValue}),this.enableScripting&&this.hasJSActions&&(zl.addEventListener("updatefromsandbox",jl=>{const Ul={value(Kl){Kl.target.checked=Kl.detail.value!=="Off",$.setValue(hl,{value:Kl.target.checked})}};this._dispatchEventFromSandbox(Ul,jl)}),this._setEventListeners(zl,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],jl=>jl.target.checked)),this._setBackgroundColor(zl),this._setDefaultPropertiesFromJS(zl),this.container.append(zl),this.container}}class E extends _{constructor($){super($,{isRenderable:$.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const $=this.annotationStorage,ol=this.data,hl=ol.id;let pl=$.getValue(hl,{value:ol.fieldValue===ol.buttonValue}).value;typeof pl=="string"&&(pl=pl!==ol.buttonValue,$.setValue(hl,{value:pl}));const zl=document.createElement("input");if(H.add(zl),zl.setAttribute("data-element-id",hl),zl.disabled=ol.readOnly,this._setRequired(zl,this.data.required),zl.type="radio",zl.name=ol.fieldName,pl&&zl.setAttribute("checked",!0),zl.tabIndex=U,zl.addEventListener("change",jl=>{const{name:Ul,checked:Kl}=jl.target;for(const le of this._getElementsByName(Ul,hl))$.setValue(le.id,{value:!1});$.setValue(hl,{value:Kl})}),zl.addEventListener("resetform",jl=>{const Ul=ol.defaultFieldValue;jl.target.checked=Ul!=null&&Ul===ol.buttonValue}),this.enableScripting&&this.hasJSActions){const jl=ol.buttonValue;zl.addEventListener("updatefromsandbox",Ul=>{const Kl={value:le=>{const Pl=jl===le.detail.value;for(const ee of this._getElementsByName(le.target.name)){const ql=Pl&&ee.id===hl;ee.domElement&&(ee.domElement.checked=ql),$.setValue(ee.id,{value:ql})}}};this._dispatchEventFromSandbox(Kl,Ul)}),this._setEventListeners(zl,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],Ul=>Ul.target.checked)}return this._setBackgroundColor(zl),this._setDefaultPropertiesFromJS(zl),this.container.append(zl),this.container}}class il extends j{constructor($){super($,{ignoreBorder:$.data.hasAppearance})}render(){const $=super.render();$.classList.add("buttonWidgetAnnotation","pushButton"),this.data.alternativeText&&($.title=this.data.alternativeText);const ol=$.lastChild;return this.enableScripting&&this.hasJSActions&&ol&&(this._setDefaultPropertiesFromJS(ol),ol.addEventListener("updatefromsandbox",hl=>{this._dispatchEventFromSandbox({},hl)})),$}}class al extends _{constructor($){super($,{isRenderable:$.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const $=this.annotationStorage,ol=this.data.id,hl=$.getValue(ol,{value:this.data.fieldValue}),pl=document.createElement("select");H.add(pl),pl.setAttribute("data-element-id",ol),pl.disabled=this.data.readOnly,this._setRequired(pl,this.data.required),pl.name=this.data.fieldName,pl.tabIndex=U;let zl=this.data.combo&&this.data.options.length>0;this.data.combo||(pl.size=this.data.options.length,this.data.multiSelect&&(pl.multiple=!0)),pl.addEventListener("resetform",Pl=>{const ee=this.data.defaultFieldValue;for(const ql of pl.options)ql.selected=ql.value===ee});for(const Pl of this.data.options){const ee=document.createElement("option");ee.textContent=Pl.displayValue,ee.value=Pl.exportValue,hl.value.includes(Pl.exportValue)&&(ee.setAttribute("selected",!0),zl=!1),pl.append(ee)}let jl=null;if(zl){const Pl=document.createElement("option");Pl.value=" ",Pl.setAttribute("hidden",!0),Pl.setAttribute("selected",!0),pl.prepend(Pl),jl=()=>{Pl.remove(),pl.removeEventListener("input",jl),jl=null},pl.addEventListener("input",jl)}const Ul=Pl=>{const ee=Pl?"value":"textContent",{options:ql,multiple:ie}=pl;return ie?Array.prototype.filter.call(ql,ce=>ce.selected).map(ce=>ce[ee]):ql.selectedIndex===-1?null:ql[ql.selectedIndex][ee]};let Kl=Ul(!1);const le=Pl=>{const ee=Pl.target.options;return Array.prototype.map.call(ee,ql=>({displayValue:ql.textContent,exportValue:ql.value}))};return this.enableScripting&&this.hasJSActions?(pl.addEventListener("updatefromsandbox",Pl=>{const ee={value(ql){var ie;(ie=jl)===null||ie===void 0||ie();const ce=ql.detail.value,Ge=new Set(Array.isArray(ce)?ce:[ce]);for(const Dl of pl.options)Dl.selected=Ge.has(Dl.value);$.setValue(ol,{value:Ul(!0)}),Kl=Ul(!1)},multipleSelection(ql){pl.multiple=!0},remove(ql){const ie=pl.options,ce=ql.detail.remove;ie[ce].selected=!1,pl.remove(ce),ie.length>0&&Array.prototype.findIndex.call(ie,Ge=>Ge.selected)===-1&&(ie[0].selected=!0),$.setValue(ol,{value:Ul(!0),items:le(ql)}),Kl=Ul(!1)},clear(ql){for(;pl.length!==0;)pl.remove(0);$.setValue(ol,{value:null,items:[]}),Kl=Ul(!1)},insert(ql){const{index:ie,displayValue:ce,exportValue:Ge}=ql.detail.insert,Dl=pl.children[ie],Al=document.createElement("option");Al.textContent=ce,Al.value=Ge,Dl?Dl.before(Al):pl.append(Al),$.setValue(ol,{value:Ul(!0),items:le(ql)}),Kl=Ul(!1)},items(ql){const{items:ie}=ql.detail;for(;pl.length!==0;)pl.remove(0);for(const ce of ie){const{displayValue:Ge,exportValue:Dl}=ce,Al=document.createElement("option");Al.textContent=Ge,Al.value=Dl,pl.append(Al)}pl.options.length>0&&(pl.options[0].selected=!0),$.setValue(ol,{value:Ul(!0),items:le(ql)}),Kl=Ul(!1)},indices(ql){const ie=new Set(ql.detail.indices);for(const ce of ql.target.options)ce.selected=ie.has(ce.index);$.setValue(ol,{value:Ul(!0)}),Kl=Ul(!1)},editable(ql){ql.target.disabled=!ql.detail.editable}};this._dispatchEventFromSandbox(ee,Pl)}),pl.addEventListener("input",Pl=>{var ee;const ql=Ul(!0);$.setValue(ol,{value:ql}),Pl.preventDefault(),(ee=this.linkService.eventBus)===null||ee===void 0||ee.dispatch("dispatcheventinsandbox",{source:this,detail:{id:ol,name:"Keystroke",value:Kl,changeEx:ql,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(pl,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],Pl=>Pl.target.value)):pl.addEventListener("input",function(Pl){$.setValue(ol,{value:Ul(!0)})}),this.data.combo&&this._setTextStyle(pl),this._setBackgroundColor(pl),this._setDefaultPropertiesFromJS(pl),this.container.append(pl),this.container}}const Nl=class extends K{constructor(Jl){var $,ol,hl;const{data:pl}=Jl;super(Jl,{isRenderable:!Nl.IGNORE_TYPES.has(pl.parentType)&&!!(($=pl.titleObj)!==null&&$!==void 0&&$.str||(ol=pl.contentsObj)!==null&&ol!==void 0&&ol.str||(hl=pl.richText)!==null&&hl!==void 0&&hl.str)})}render(){this.container.classList.add("popupAnnotation");const Jl=this.layer.querySelectorAll(`[data-annotation-id="${this.data.parentId}"]`);if(Jl.length===0)return this.container;const $=new Sl({container:this.container,trigger:Array.from(Jl),color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText}),ol=this.page,hl=S.Util.normalizeRect([this.data.parentRect[0],ol.view[3]-this.data.parentRect[1]+ol.view[1],this.data.parentRect[2],ol.view[3]-this.data.parentRect[3]+ol.view[1]]),pl=hl[0]+this.data.parentRect[2]-this.data.parentRect[0],zl=hl[1],{pageWidth:jl,pageHeight:Ul,pageX:Kl,pageY:le}=this.viewport.rawDims;return this.container.style.left=100*(pl-Kl)/jl+"%",this.container.style.top=100*(zl-le)/Ul+"%",this.container.append($.render()),this.container}};let nl=Nl;It(nl,"IGNORE_TYPES",new Set(["Line","Square","Circle","PolyLine","Polygon","Ink"]));class Sl{constructor($){this.container=$.container,this.trigger=$.trigger,this.color=$.color,this.titleObj=$.titleObj,this.modificationDate=$.modificationDate,this.contentsObj=$.contentsObj,this.richText=$.richText,this.hideWrapper=$.hideWrapper||!1,this.pinned=!1}render(){var $,ol;const hl=document.createElement("div");hl.classList.add("popupWrapper"),this.hideElement=this.hideWrapper?hl:this.container,this.hideElement.hidden=!0;const pl=document.createElement("div");pl.classList.add("popup");const zl=this.color;if(zl){const Kl=.7*(255-zl[0])+zl[0],le=.7*(255-zl[1])+zl[1],Pl=.7*(255-zl[2])+zl[2];pl.style.backgroundColor=S.Util.makeHexColor(0|Kl,0|le,0|Pl)}const jl=document.createElement("h1");jl.dir=this.titleObj.dir,jl.textContent=this.titleObj.str,pl.append(jl);const Ul=D.PDFDateString.toDateObject(this.modificationDate);if(Ul){const Kl=document.createElement("span");Kl.classList.add("popupDate"),Kl.textContent="{{date}}, {{time}}",Kl.dataset.l10nId="annotation_date_string",Kl.dataset.l10nArgs=JSON.stringify({date:Ul.toLocaleDateString(),time:Ul.toLocaleTimeString()}),pl.append(Kl)}if(($=this.richText)===null||$===void 0||!$.str||(ol=this.contentsObj)!==null&&ol!==void 0&&ol.str&&this.contentsObj.str!==this.richText.str){const Kl=this._formatContents(this.contentsObj);pl.append(Kl)}else J.XfaLayer.render({xfaHtml:this.richText.html,intent:"richText",div:pl}),pl.lastChild.classList.add("richText","popupContent");Array.isArray(this.trigger)||(this.trigger=[this.trigger]);for(const Kl of this.trigger)Kl.addEventListener("click",this._toggle.bind(this)),Kl.addEventListener("mouseover",this._show.bind(this,!1)),Kl.addEventListener("mouseout",this._hide.bind(this,!1));return pl.addEventListener("click",this._hide.bind(this,!0)),hl.append(pl),hl}_formatContents($){let{str:ol,dir:hl}=$;const pl=document.createElement("p");pl.classList.add("popupContent"),pl.dir=hl;const zl=ol.split(/(?:\r\n?|\n)/);for(let jl=0,Ul=zl.length;jl<Ul;++jl){const Kl=zl[jl];pl.append(document.createTextNode(Kl)),jl<Ul-1&&pl.append(document.createElement("br"))}return pl}_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 P extends K{constructor($){var ol,hl,pl;super($,{isRenderable:!!($.data.hasPopup||(ol=$.data.titleObj)!==null&&ol!==void 0&&ol.str||(hl=$.data.contentsObj)!==null&&hl!==void 0&&hl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str),ignoreBorder:!0}),this.textContent=$.data.textContent}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const $=document.createElement("div");$.classList.add("annotationTextContent"),$.setAttribute("role","comment");for(const ol of this.textContent){const hl=document.createElement("span");hl.textContent=ol,$.append(hl)}this.container.append($)}return this.data.hasPopup||this._createPopup(null,this.data),this.container}}class Q extends K{constructor($){var ol,hl,pl;super($,{isRenderable:!!($.data.hasPopup||(ol=$.data.titleObj)!==null&&ol!==void 0&&ol.str||(hl=$.data.contentsObj)!==null&&hl!==void 0&&hl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str),ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");const $=this.data,{width:ol,height:hl}=C($.rect),pl=this.svgFactory.create(ol,hl,!0),zl=this.svgFactory.createElement("svg:line");return zl.setAttribute("x1",$.rect[2]-$.lineCoordinates[0]),zl.setAttribute("y1",$.rect[3]-$.lineCoordinates[1]),zl.setAttribute("x2",$.rect[2]-$.lineCoordinates[2]),zl.setAttribute("y2",$.rect[3]-$.lineCoordinates[3]),zl.setAttribute("stroke-width",$.borderStyle.width||1),zl.setAttribute("stroke","transparent"),zl.setAttribute("fill","transparent"),pl.append(zl),this.container.append(pl),this._createPopup(zl,$),this.container}}class q extends K{constructor($){var ol,hl,pl;super($,{isRenderable:!!($.data.hasPopup||(ol=$.data.titleObj)!==null&&ol!==void 0&&ol.str||(hl=$.data.contentsObj)!==null&&hl!==void 0&&hl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str),ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");const $=this.data,{width:ol,height:hl}=C($.rect),pl=this.svgFactory.create(ol,hl,!0),zl=$.borderStyle.width,jl=this.svgFactory.createElement("svg:rect");return jl.setAttribute("x",zl/2),jl.setAttribute("y",zl/2),jl.setAttribute("width",ol-zl),jl.setAttribute("height",hl-zl),jl.setAttribute("stroke-width",zl||1),jl.setAttribute("stroke","transparent"),jl.setAttribute("fill","transparent"),pl.append(jl),this.container.append(pl),this._createPopup(jl,$),this.container}}class ll extends K{constructor($){var ol,hl,pl;super($,{isRenderable:!!($.data.hasPopup||(ol=$.data.titleObj)!==null&&ol!==void 0&&ol.str||(hl=$.data.contentsObj)!==null&&hl!==void 0&&hl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str),ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");const $=this.data,{width:ol,height:hl}=C($.rect),pl=this.svgFactory.create(ol,hl,!0),zl=$.borderStyle.width,jl=this.svgFactory.createElement("svg:ellipse");return jl.setAttribute("cx",ol/2),jl.setAttribute("cy",hl/2),jl.setAttribute("rx",ol/2-zl/2),jl.setAttribute("ry",hl/2-zl/2),jl.setAttribute("stroke-width",zl||1),jl.setAttribute("stroke","transparent"),jl.setAttribute("fill","transparent"),pl.append(jl),this.container.append(pl),this._createPopup(jl,$),this.container}}class B extends K{constructor($){var ol,hl,pl;super($,{isRenderable:!!($.data.hasPopup||(ol=$.data.titleObj)!==null&&ol!==void 0&&ol.str||(hl=$.data.contentsObj)!==null&&hl!==void 0&&hl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str),ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const $=this.data,{width:ol,height:hl}=C($.rect),pl=this.svgFactory.create(ol,hl,!0);let zl=[];for(const Ul of $.vertices){const Kl=Ul.x-$.rect[0],le=$.rect[3]-Ul.y;zl.push(Kl+","+le)}zl=zl.join(" ");const jl=this.svgFactory.createElement(this.svgElementName);return jl.setAttribute("points",zl),jl.setAttribute("stroke-width",$.borderStyle.width||1),jl.setAttribute("stroke","transparent"),jl.setAttribute("fill","transparent"),pl.append(jl),this.container.append(pl),this._createPopup(jl,$),this.container}}class F extends B{constructor($){super($),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class el extends K{constructor($){var ol,hl,pl;super($,{isRenderable:!!($.data.hasPopup||(ol=$.data.titleObj)!==null&&ol!==void 0&&ol.str||(hl=$.data.contentsObj)!==null&&hl!==void 0&&hl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str),ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),this.data.hasPopup||this._createPopup(null,this.data),this.container}}class dl extends K{constructor($){var ol,hl,pl;super($,{isRenderable:!!($.data.hasPopup||(ol=$.data.titleObj)!==null&&ol!==void 0&&ol.str||(hl=$.data.contentsObj)!==null&&hl!==void 0&&hl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str),ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const $=this.data,{width:ol,height:hl}=C($.rect),pl=this.svgFactory.create(ol,hl,!0);for(const zl of $.inkLists){let jl=[];for(const Kl of zl){const le=Kl.x-$.rect[0],Pl=$.rect[3]-Kl.y;jl.push(`${le},${Pl}`)}jl=jl.join(" ");const Ul=this.svgFactory.createElement(this.svgElementName);Ul.setAttribute("points",jl),Ul.setAttribute("stroke-width",$.borderStyle.width||1),Ul.setAttribute("stroke","transparent"),Ul.setAttribute("fill","transparent"),this._createPopup(Ul,$),pl.append(Ul)}return this.container.append(pl),this.container}}class Zl extends K{constructor($){var ol,hl,pl;super($,{isRenderable:!!($.data.hasPopup||(ol=$.data.titleObj)!==null&&ol!==void 0&&ol.str||(hl=$.data.contentsObj)!==null&&hl!==void 0&&hl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.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 Wl extends K{constructor($){var ol,hl,pl;super($,{isRenderable:!!($.data.hasPopup||(ol=$.data.titleObj)!==null&&ol!==void 0&&ol.str||(hl=$.data.contentsObj)!==null&&hl!==void 0&&hl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.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 Gl extends K{constructor($){var ol,hl,pl;super($,{isRenderable:!!($.data.hasPopup||(ol=$.data.titleObj)!==null&&ol!==void 0&&ol.str||(hl=$.data.contentsObj)!==null&&hl!==void 0&&hl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.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 Il extends K{constructor($){var ol,hl,pl;super($,{isRenderable:!!($.data.hasPopup||(ol=$.data.titleObj)!==null&&ol!==void 0&&ol.str||(hl=$.data.contentsObj)!==null&&hl!==void 0&&hl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.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 xl extends K{constructor($){var ol,hl,pl;super($,{isRenderable:!!($.data.hasPopup||(ol=$.data.titleObj)!==null&&ol!==void 0&&ol.str||(hl=$.data.contentsObj)!==null&&hl!==void 0&&hl.str||(pl=$.data.richText)!==null&&pl!==void 0&&pl.str),ignoreBorder:!0})}render(){return this.container.classList.add("stampAnnotation"),this.data.hasPopup||this._createPopup(null,this.data),this.container}}class bl extends K{constructor($){var ol;super($,{isRenderable:!0});const{filename:hl,content:pl}=this.data.file;this.filename=(0,D.getFilenameFromUrl)(hl,!0),this.content=pl,(ol=this.linkService.eventBus)===null||ol===void 0||ol.dispatch("fileattachmentannotation",{source:this,filename:hl,content:pl})}render(){var $,ol;this.container.classList.add("fileAttachmentAnnotation");let hl;return this.data.hasAppearance?hl=document.createElement("div"):(hl=document.createElement("img"),hl.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(this.data.name)?"paperclip":"pushpin"}.svg`),hl.classList.add("popupTriggerArea"),hl.addEventListener("dblclick",this._download.bind(this)),!this.data.hasPopup&&(($=this.data.titleObj)!==null&&$!==void 0&&$.str||(ol=this.data.contentsObj)!==null&&ol!==void 0&&ol.str||this.data.richText)&&this._createPopup(hl,this.data),this.container.append(hl),this.container}_download(){var $;($=this.downloadManager)===null||$===void 0||$.openOrDownloadData(this.container,this.content,this.filename)}}const Ol=class{static render(Jl){var $,ol;const{annotations:hl,div:pl,viewport:zl,accessibilityManager:jl}=Jl;(0,D.setLayerDimensions)(pl,zl);const Ul={data:null,layer:pl,page:Jl.page,viewport:zl,linkService:Jl.linkService,downloadManager:Jl.downloadManager,imageResourcesPath:Jl.imageResourcesPath||"",renderForms:Jl.renderForms!==!1,svgFactory:new D.DOMSVGFactory,annotationStorage:Jl.annotationStorage||new R.AnnotationStorage,enableScripting:Jl.enableScripting===!0,hasJSActions:Jl.hasJSActions,fieldObjects:Jl.fieldObjects};let Kl=0;for(const le of hl){if(le.noHTML)continue;if(le.annotationType!==S.AnnotationType.POPUP){const{width:ql,height:ie}=C(le.rect);if(ql<=0||ie<=0)continue}Ul.data=le;const Pl=v.create(Ul);if(!Pl.isRenderable)continue;const ee=Pl.render();if(le.hidden&&(ee.style.visibility="hidden"),Array.isArray(ee))for(const ql of ee)ql.style.zIndex=Kl++,nt($=Ol,N,X).call($,ql,le.id,pl,jl);else ee.style.zIndex=Kl++,Pl instanceof nl?pl.prepend(ee):nt(ol=Ol,N,X).call(ol,ee,le.id,pl,jl)}nt(this,z,Y).call(this,pl,Jl.annotationCanvasMap)}static update(Jl){const{annotationCanvasMap:$,div:ol,viewport:hl}=Jl;(0,D.setLayerDimensions)(ol,{rotation:hl.rotation}),nt(this,z,Y).call(this,ol,$),ol.hidden=!1}};let _l=Ol;N=new WeakSet,X=function(Jl,$,ol,hl){const pl=Jl.firstChild||Jl;pl.id=`${D.AnnotationPrefix}${$}`,ol.append(Jl),hl==null||hl.moveElementInDOM(ol,Jl,pl,!1)},z=new WeakSet,Y=function(Jl,$){if($){for(const[ol,hl]of $){const pl=Jl.querySelector(`[data-annotation-id="${ol}"]`);if(!pl)continue;const{firstChild:zl}=pl;zl?zl.nodeName==="CANVAS"?zl.replaceWith(hl):zl.before(hl):pl.append(hl)}$.clear()}},et(_l,N),et(_l,z),u.AnnotationLayer=_l},(s,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ColorConverters=void 0;function o(r){return Math.floor(255*Math.max(0,Math.min(1,r))).toString(16).padStart(2,"0")}u.ColorConverters=class{static CMYK_G(r){let[W,M,y,N]=r;return["G",1-Math.min(1,.3*W+.59*y+.11*M+N)]}static G_CMYK(r){let[W]=r;return["CMYK",0,0,0,1-W]}static G_RGB(r){let[W]=r;return["RGB",W,W,W]}static G_HTML(r){let[W]=r;const M=o(W);return`#${M}${M}${M}`}static RGB_G(r){let[W,M,y]=r;return["G",.3*W+.59*M+.11*y]}static RGB_HTML(r){let[W,M,y]=r;return`#${o(W)}${o(M)}${o(y)}`}static T_HTML(){return"#00000000"}static CMYK_RGB(r){let[W,M,y,N]=r;return["RGB",1-Math.min(1,W+N),1-Math.min(1,y+N),1-Math.min(1,M+N)]}static CMYK_HTML(r){const W=this.CMYK_RGB(r).slice(1);return this.RGB_HTML(W)}static RGB_CMYK(r){let[W,M,y]=r;const N=1-W,X=1-M,z=1-y;return["CMYK",N,X,z,Math.min(N,X,z)]}}},(s,u,o)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.XfaLayer=void 0;var r=o(154);u.XfaLayer=class{static setupStorage(W,M,y,N,X){const z=N.getValue(M,{value:null});switch(y.name){case"textarea":if(z.value!==null&&(W.textContent=z.value),X==="print")break;W.addEventListener("input",Y=>{N.setValue(M,{value:Y.target.value})});break;case"input":if(y.attributes.type==="radio"||y.attributes.type==="checkbox"){if(z.value===y.attributes.xfaOn?W.setAttribute("checked",!0):z.value===y.attributes.xfaOff&&W.removeAttribute("checked"),X==="print")break;W.addEventListener("change",Y=>{N.setValue(M,{value:Y.target.checked?Y.target.getAttribute("xfaOn"):Y.target.getAttribute("xfaOff")})})}else{if(z.value!==null&&W.setAttribute("value",z.value),X==="print")break;W.addEventListener("input",Y=>{N.setValue(M,{value:Y.target.value})})}break;case"select":if(z.value!==null)for(const Y of y.children)Y.attributes.value===z.value&&(Y.attributes.selected=!0);W.addEventListener("input",Y=>{const S=Y.target.options,D=S.selectedIndex===-1?"":S[S.selectedIndex].value;N.setValue(M,{value:D})})}}static setAttributes(W){let{html:M,element:y,storage:N=null,intent:X,linkService:z}=W;const{attributes:Y}=y,S=M instanceof HTMLAnchorElement;Y.type==="radio"&&(Y.name=`${Y.name}-${X}`);for(const[D,R]of Object.entries(Y))if(R!=null)switch(D){case"class":R.length&&M.setAttribute(D,R.join(" "));break;case"dataId":break;case"id":M.setAttribute("data-element-id",R);break;case"style":Object.assign(M.style,R);break;case"textContent":M.textContent=R;break;default:(!S||D!=="href"&&D!=="newWindow")&&M.setAttribute(D,R)}S&&z.addLinkAttributes(M,Y.href,Y.newWindow),N&&Y.dataId&&this.setupStorage(M,Y.dataId,y,N)}static render(W){const M=W.annotationStorage,y=W.linkService,N=W.xfaHtml,X=W.intent||"display",z=document.createElement(N.name);N.attributes&&this.setAttributes({html:z,element:N,intent:X,linkService:y});const Y=[[N,-1,z]],S=W.div;if(S.append(z),W.viewport){const g=`matrix(${W.viewport.transform.join(",")})`;S.style.transform=g}X!=="richText"&&S.setAttribute("class","xfaLayer xfaFont");const D=[];for(;Y.length>0;){var R;const[g,J,U]=Y.at(-1);if(J+1===g.children.length){Y.pop();continue}const H=g.children[++Y.at(-1)[1]];if(H===null)continue;const{name:C}=H;if(C==="#text"){const K=document.createTextNode(H.value);D.push(K),U.append(K);continue}let v;if(v=H!=null&&(R=H.attributes)!==null&&R!==void 0&&R.xmlns?document.createElementNS(H.attributes.xmlns,C):document.createElement(C),U.append(v),H.attributes&&this.setAttributes({html:v,element:H,storage:M,intent:X,linkService:y}),H.children&&H.children.length>0)Y.push([H,-1,v]);else if(H.value){const K=document.createTextNode(H.value);r.XfaText.shouldBuildText(C)&&D.push(K),v.append(K)}}for(const g of S.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))g.setAttribute("readOnly",!0);return{textDivs:D}}static update(W){const M=`matrix(${W.viewport.transform.join(",")})`;W.div.style.transform=M,W.div.hidden=!1}}},(s,u,o)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.SVGGraphics=void 0;var r=o(142),W=o(1),M=o(3);let y=class{constructor(){(0,W.unreachable)("Not implemented: SVGGraphics")}};u.SVGGraphics=y;{let N=function(j){let O=[];const _=[];for(const cl of j)cl.fn!=="save"?cl.fn==="restore"?O=_.pop():O.push(cl):(O.push({fnId:92,fn:"group",items:[]}),_.push(O),O=O.at(-1).items);return O},X=function(j){if(Number.isInteger(j))return j.toString();const O=j.toFixed(10);let _=O.length-1;if(O[_]!=="0")return O;do _--;while(O[_]==="0");return O.substring(0,O[_]==="."?_:_+1)},z=function(j){if(j[4]===0&&j[5]===0){if(j[1]===0&&j[2]===0)return j[0]===1&&j[3]===1?"":`scale(${X(j[0])} ${X(j[3])})`;if(j[0]===j[3]&&j[1]===-j[2])return`rotate(${X(180*Math.acos(j[0])/Math.PI)})`}else if(j[0]===1&&j[1]===0&&j[2]===0&&j[3]===1)return`translate(${X(j[4])} ${X(j[5])})`;return`matrix(${X(j[0])} ${X(j[1])} ${X(j[2])} ${X(j[3])} ${X(j[4])} ${X(j[5])})`};const Y={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},S="http://www.w3.org/XML/1998/namespace",D="http://www.w3.org/1999/xlink",R=["butt","round","square"],g=["miter","round","bevel"],J=function(j){let O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",_=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(URL.createObjectURL&&typeof Blob<"u"&&!_)return URL.createObjectURL(new Blob([j],{type:O}));const cl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let tl=`data:${O};base64,`;for(let E=0,il=j.length;E<il;E+=3){const al=255&j[E],Nl=255&j[E+1],nl=255&j[E+2];tl+=cl[al>>2]+cl[(3&al)<<4|Nl>>4]+cl[E+1<il?(15&Nl)<<2|nl>>6:64]+cl[E+2<il?63&nl:64]}return tl},U=function(){const j=new Uint8Array([137,80,78,71,13,10,26,10]),O=new Int32Array(256);for(let E=0;E<256;E++){let il=E;for(let al=0;al<8;al++)il=1&il?3988292384^il>>1&2147483647:il>>1&2147483647;O[E]=il}function _(E,il,al,Nl){let nl=Nl;const Sl=il.length;al[nl]=Sl>>24&255,al[nl+1]=Sl>>16&255,al[nl+2]=Sl>>8&255,al[nl+3]=255&Sl,nl+=4,al[nl]=255&E.charCodeAt(0),al[nl+1]=255&E.charCodeAt(1),al[nl+2]=255&E.charCodeAt(2),al[nl+3]=255&E.charCodeAt(3),nl+=4,al.set(il,nl),nl+=il.length;const P=function(Q,q,ll){let B=-1;for(let F=q;F<ll;F++){const el=255&(B^Q[F]);B=B>>>8^O[el]}return-1^B}(al,Nl+4,nl);al[nl]=P>>24&255,al[nl+1]=P>>16&255,al[nl+2]=P>>8&255,al[nl+3]=255&P}function cl(E){let il=E.length;const al=65535,Nl=Math.ceil(il/al),nl=new Uint8Array(2+il+5*Nl+4);let Sl=0;nl[Sl++]=120,nl[Sl++]=156;let P=0;for(;il>al;)nl[Sl++]=0,nl[Sl++]=255,nl[Sl++]=255,nl[Sl++]=0,nl[Sl++]=0,nl.set(E.subarray(P,P+al),Sl),Sl+=al,P+=al,il-=al;nl[Sl++]=1,nl[Sl++]=255&il,nl[Sl++]=il>>8&255,nl[Sl++]=255&~il,nl[Sl++]=(65535&~il)>>8&255,nl.set(E.subarray(P),Sl),Sl+=E.length-P;const Q=function(q,ll,B){let F=1,el=0;for(let dl=ll;dl<B;++dl)F=(F+(255&q[dl]))%65521,el=(el+F)%65521;return el<<16|F}(E,0,E.length);return nl[Sl++]=Q>>24&255,nl[Sl++]=Q>>16&255,nl[Sl++]=Q>>8&255,nl[Sl++]=255&Q,nl}function tl(E,il,al,Nl){const nl=E.width,Sl=E.height;let P,Q,q;const ll=E.data;switch(il){case W.ImageKind.GRAYSCALE_1BPP:Q=0,P=1,q=nl+7>>3;break;case W.ImageKind.RGB_24BPP:Q=2,P=8,q=3*nl;break;case W.ImageKind.RGBA_32BPP:Q=6,P=8,q=4*nl;break;default:throw new Error("invalid format")}const B=new Uint8Array((1+q)*Sl);let F=0,el=0;for(let xl=0;xl<Sl;++xl)B[F++]=0,B.set(ll.subarray(el,el+q),F),el+=q,F+=q;if(il===W.ImageKind.GRAYSCALE_1BPP&&Nl){F=0;for(let xl=0;xl<Sl;xl++){F++;for(let bl=0;bl<q;bl++)B[F++]^=255}}const dl=new Uint8Array([nl>>24&255,nl>>16&255,nl>>8&255,255&nl,Sl>>24&255,Sl>>16&255,Sl>>8&255,255&Sl,P,Q,0,0,0]),Zl=function(xl){if(!M.isNodeJS)return cl(xl);try{let bl;bl=parseInt(process.versions.node)>=8?xl:Buffer.from(xl);const Ol=require$$6.deflateSync(bl,{level:9});return Ol instanceof Uint8Array?Ol:new Uint8Array(Ol)}catch(bl){(0,W.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+bl)}return cl(xl)}(B),Wl=j.length+36+dl.length+Zl.length,Gl=new Uint8Array(Wl);let Il=0;return Gl.set(j,Il),Il+=j.length,_("IHDR",dl,Gl,Il),Il+=12+dl.length,_("IDATA",Zl,Gl,Il),Il+=12+Zl.length,_("IEND",new Uint8Array(0),Gl,Il),J(Gl,"image/png",al)}return function(E,il,al){return tl(E,E.kind===void 0?W.ImageKind.GRAYSCALE_1BPP:E.kind,il,al)}}();class H{constructor(){this.fontSizeScale=1,this.fontWeight=Y.fontWeight,this.fontSize=0,this.textMatrix=W.IDENTITY_MATRIX,this.fontMatrix=W.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=W.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=Y.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(O,_){this.x=O,this.y=_}}let C=0,v=0,K=0;u.SVGGraphics=y=class{constructor(j,O){let _=arguments.length>2&&arguments[2]!==void 0&&arguments[2];(0,r.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new r.DOMSVGFactory,this.current=new H,this.transformMatrix=W.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=j,this.objs=O,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!_,this._operatorIdMapping=[];for(const cl in W.OPS)this._operatorIdMapping[W.OPS[cl]]=cl}getObject(j){let O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return typeof j=="string"?j.startsWith("g_")?this.commonObjs.get(j):this.objs.get(j):O}save(){this.transformStack.push(this.transformMatrix);const j=this.current;this.extraStack.push(j),this.current=j.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(j){this.save(),this.executeOpTree(j),this.restore()}loadDependencies(j){const O=j.fnArray,_=j.argsArray;for(let cl=0,tl=O.length;cl<tl;cl++)if(O[cl]===W.OPS.dependency)for(const E of _[cl]){const il=E.startsWith("g_")?this.commonObjs:this.objs,al=new Promise(Nl=>{il.get(E,Nl)});this.current.dependencies.push(al)}return Promise.all(this.current.dependencies)}transform(j,O,_,cl,tl,E){const il=[j,O,_,cl,tl,E];this.transformMatrix=W.Util.transform(this.transformMatrix,il),this.tgrp=null}getSVG(j,O){this.viewport=O;const _=this._initialize(O);return this.loadDependencies(j).then(()=>(this.transformMatrix=W.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(j)),_))}convertOpList(j){const O=this._operatorIdMapping,_=j.argsArray,cl=j.fnArray,tl=[];for(let E=0,il=cl.length;E<il;E++){const al=cl[E];tl.push({fnId:al,fn:O[al],args:_[E]})}return N(tl)}executeOpTree(j){for(const O of j){const _=O.fn,cl=O.fnId,tl=O.args;switch(0|cl){case W.OPS.beginText:this.beginText();break;case W.OPS.dependency:break;case W.OPS.setLeading:this.setLeading(tl);break;case W.OPS.setLeadingMoveText:this.setLeadingMoveText(tl[0],tl[1]);break;case W.OPS.setFont:this.setFont(tl);break;case W.OPS.showText:case W.OPS.showSpacedText:this.showText(tl[0]);break;case W.OPS.endText:this.endText();break;case W.OPS.moveText:this.moveText(tl[0],tl[1]);break;case W.OPS.setCharSpacing:this.setCharSpacing(tl[0]);break;case W.OPS.setWordSpacing:this.setWordSpacing(tl[0]);break;case W.OPS.setHScale:this.setHScale(tl[0]);break;case W.OPS.setTextMatrix:this.setTextMatrix(tl[0],tl[1],tl[2],tl[3],tl[4],tl[5]);break;case W.OPS.setTextRise:this.setTextRise(tl[0]);break;case W.OPS.setTextRenderingMode:this.setTextRenderingMode(tl[0]);break;case W.OPS.setLineWidth:this.setLineWidth(tl[0]);break;case W.OPS.setLineJoin:this.setLineJoin(tl[0]);break;case W.OPS.setLineCap:this.setLineCap(tl[0]);break;case W.OPS.setMiterLimit:this.setMiterLimit(tl[0]);break;case W.OPS.setFillRGBColor:this.setFillRGBColor(tl[0],tl[1],tl[2]);break;case W.OPS.setStrokeRGBColor:this.setStrokeRGBColor(tl[0],tl[1],tl[2]);break;case W.OPS.setStrokeColorN:this.setStrokeColorN(tl);break;case W.OPS.setFillColorN:this.setFillColorN(tl);break;case W.OPS.shadingFill:this.shadingFill(tl[0]);break;case W.OPS.setDash:this.setDash(tl[0],tl[1]);break;case W.OPS.setRenderingIntent:this.setRenderingIntent(tl[0]);break;case W.OPS.setFlatness:this.setFlatness(tl[0]);break;case W.OPS.setGState:this.setGState(tl[0]);break;case W.OPS.fill:this.fill();break;case W.OPS.eoFill:this.eoFill();break;case W.OPS.stroke:this.stroke();break;case W.OPS.fillStroke:this.fillStroke();break;case W.OPS.eoFillStroke:this.eoFillStroke();break;case W.OPS.clip:this.clip("nonzero");break;case W.OPS.eoClip:this.clip("evenodd");break;case W.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case W.OPS.paintImageXObject:this.paintImageXObject(tl[0]);break;case W.OPS.paintInlineImageXObject:this.paintInlineImageXObject(tl[0]);break;case W.OPS.paintImageMaskXObject:this.paintImageMaskXObject(tl[0]);break;case W.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(tl[0],tl[1]);break;case W.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case W.OPS.closePath:this.closePath();break;case W.OPS.closeStroke:this.closeStroke();break;case W.OPS.closeFillStroke:this.closeFillStroke();break;case W.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case W.OPS.nextLine:this.nextLine();break;case W.OPS.transform:this.transform(tl[0],tl[1],tl[2],tl[3],tl[4],tl[5]);break;case W.OPS.constructPath:this.constructPath(tl[0],tl[1]);break;case W.OPS.endPath:this.endPath();break;case 92:this.group(O.items);break;default:(0,W.warn)(`Unimplemented operator ${_}`)}}}setWordSpacing(j){this.current.wordSpacing=j}setCharSpacing(j){this.current.charSpacing=j}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(j,O,_,cl,tl,E){const il=this.current;il.textMatrix=il.lineMatrix=[j,O,_,cl,tl,E],il.textMatrixScale=Math.hypot(j,O),il.x=il.lineX=0,il.y=il.lineY=0,il.xcoords=[],il.ycoords=[],il.tspan=this.svgFactory.createElement("svg:tspan"),il.tspan.setAttributeNS(null,"font-family",il.fontFamily),il.tspan.setAttributeNS(null,"font-size",`${X(il.fontSize)}px`),il.tspan.setAttributeNS(null,"y",X(-il.y)),il.txtElement=this.svgFactory.createElement("svg:text"),il.txtElement.append(il.tspan)}beginText(){const j=this.current;j.x=j.lineX=0,j.y=j.lineY=0,j.textMatrix=W.IDENTITY_MATRIX,j.lineMatrix=W.IDENTITY_MATRIX,j.textMatrixScale=1,j.tspan=this.svgFactory.createElement("svg:tspan"),j.txtElement=this.svgFactory.createElement("svg:text"),j.txtgrp=this.svgFactory.createElement("svg:g"),j.xcoords=[],j.ycoords=[]}moveText(j,O){const _=this.current;_.x=_.lineX+=j,_.y=_.lineY+=O,_.xcoords=[],_.ycoords=[],_.tspan=this.svgFactory.createElement("svg:tspan"),_.tspan.setAttributeNS(null,"font-family",_.fontFamily),_.tspan.setAttributeNS(null,"font-size",`${X(_.fontSize)}px`),_.tspan.setAttributeNS(null,"y",X(-_.y))}showText(j){const O=this.current,_=O.font,cl=O.fontSize;if(cl===0)return;const tl=O.fontSizeScale,E=O.charSpacing,il=O.wordSpacing,al=O.fontDirection,Nl=O.textHScale*al,nl=_.vertical,Sl=nl?1:-1,P=_.defaultVMetrics,Q=cl*O.fontMatrix[0];let q=0;for(const F of j){if(F===null){q+=al*il;continue}if(typeof F=="number"){q+=Sl*F*cl/1e3;continue}const el=(F.isSpace?il:0)+E,dl=F.fontChar;let Zl,Wl,Gl,Il=F.width;if(nl){let xl;const bl=F.vmetric||P;xl=F.vmetric?bl[1]:.5*Il,xl=-xl*Q;const Ol=bl[2]*Q;Il=bl?-bl[0]:Il,Zl=xl/tl,Wl=(q+Ol)/tl}else Zl=q/tl,Wl=0;(F.isInFont||_.missingFile)&&(O.xcoords.push(O.x+Zl),nl&&O.ycoords.push(-O.y+Wl),O.tspan.textContent+=dl),Gl=nl?Il*Q-el*al:Il*Q+el*al,q+=Gl}O.tspan.setAttributeNS(null,"x",O.xcoords.map(X).join(" ")),nl?O.tspan.setAttributeNS(null,"y",O.ycoords.map(X).join(" ")):O.tspan.setAttributeNS(null,"y",X(-O.y)),nl?O.y-=q:O.x+=q*Nl,O.tspan.setAttributeNS(null,"font-family",O.fontFamily),O.tspan.setAttributeNS(null,"font-size",`${X(O.fontSize)}px`),O.fontStyle!==Y.fontStyle&&O.tspan.setAttributeNS(null,"font-style",O.fontStyle),O.fontWeight!==Y.fontWeight&&O.tspan.setAttributeNS(null,"font-weight",O.fontWeight);const ll=O.textRenderingMode&W.TextRenderingMode.FILL_STROKE_MASK;if(ll===W.TextRenderingMode.FILL||ll===W.TextRenderingMode.FILL_STROKE?(O.fillColor!==Y.fillColor&&O.tspan.setAttributeNS(null,"fill",O.fillColor),O.fillAlpha<1&&O.tspan.setAttributeNS(null,"fill-opacity",O.fillAlpha)):O.textRenderingMode===W.TextRenderingMode.ADD_TO_PATH?O.tspan.setAttributeNS(null,"fill","transparent"):O.tspan.setAttributeNS(null,"fill","none"),ll===W.TextRenderingMode.STROKE||ll===W.TextRenderingMode.FILL_STROKE){const F=1/(O.textMatrixScale||1);this._setStrokeAttributes(O.tspan,F)}let B=O.textMatrix;O.textRise!==0&&(B=B.slice(),B[5]+=O.textRise),O.txtElement.setAttributeNS(null,"transform",`${z(B)} scale(${X(Nl)}, -1)`),O.txtElement.setAttributeNS(S,"xml:space","preserve"),O.txtElement.append(O.tspan),O.txtgrp.append(O.txtElement),this._ensureTransformGroup().append(O.txtElement)}setLeadingMoveText(j,O){this.setLeading(-O),this.moveText(j,O)}addFontStyle(j){if(!j.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 O=J(j.data,j.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${j.loadedName}"; src: url(${O}); }
85
- `}setFont(j){const O=this.current,_=this.commonObjs.get(j[0]);let cl=j[1];O.font=_,this.embedFonts&&!_.missingFile&&!this.embeddedFonts[_.loadedName]&&(this.addFontStyle(_),this.embeddedFonts[_.loadedName]=_),O.fontMatrix=_.fontMatrix||W.FONT_IDENTITY_MATRIX;let tl="normal";_.black?tl="900":_.bold&&(tl="bold");const E=_.italic?"italic":"normal";cl<0?(cl=-cl,O.fontDirection=-1):O.fontDirection=1,O.fontSize=cl,O.fontFamily=_.loadedName,O.fontWeight=tl,O.fontStyle=E,O.tspan=this.svgFactory.createElement("svg:tspan"),O.tspan.setAttributeNS(null,"y",X(-O.y)),O.xcoords=[],O.ycoords=[]}endText(){var j;const O=this.current;O.textRenderingMode&W.TextRenderingMode.ADD_TO_PATH_FLAG&&(j=O.txtElement)!==null&&j!==void 0&&j.hasChildNodes()&&(O.element=O.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(j){j>0&&(this.current.lineWidth=j)}setLineCap(j){this.current.lineCap=R[j]}setLineJoin(j){this.current.lineJoin=g[j]}setMiterLimit(j){this.current.miterLimit=j}setStrokeAlpha(j){this.current.strokeAlpha=j}setStrokeRGBColor(j,O,_){this.current.strokeColor=W.Util.makeHexColor(j,O,_)}setFillAlpha(j){this.current.fillAlpha=j}setFillRGBColor(j,O,_){this.current.fillColor=W.Util.makeHexColor(j,O,_),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(j){this.current.strokeColor=this._makeColorN_Pattern(j)}setFillColorN(j){this.current.fillColor=this._makeColorN_Pattern(j)}shadingFill(j){const O=this.viewport.width,_=this.viewport.height,cl=W.Util.inverseTransform(this.transformMatrix),tl=W.Util.applyTransform([0,0],cl),E=W.Util.applyTransform([0,_],cl),il=W.Util.applyTransform([O,0],cl),al=W.Util.applyTransform([O,_],cl),Nl=Math.min(tl[0],E[0],il[0],al[0]),nl=Math.min(tl[1],E[1],il[1],al[1]),Sl=Math.max(tl[0],E[0],il[0],al[0]),P=Math.max(tl[1],E[1],il[1],al[1]),Q=this.svgFactory.createElement("svg:rect");Q.setAttributeNS(null,"x",Nl),Q.setAttributeNS(null,"y",nl),Q.setAttributeNS(null,"width",Sl-Nl),Q.setAttributeNS(null,"height",P-nl),Q.setAttributeNS(null,"fill",this._makeShadingPattern(j)),this.current.fillAlpha<1&&Q.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(Q)}_makeColorN_Pattern(j){return j[0]==="TilingPattern"?this._makeTilingPattern(j):this._makeShadingPattern(j)}_makeTilingPattern(j){const O=j[1],_=j[2],cl=j[3]||W.IDENTITY_MATRIX,[tl,E,il,al]=j[4],Nl=j[5],nl=j[6],Sl=j[7],P="shading"+K++,[Q,q,ll,B]=W.Util.normalizeRect([...W.Util.applyTransform([tl,E],cl),...W.Util.applyTransform([il,al],cl)]),[F,el]=W.Util.singularValueDecompose2dScale(cl),dl=Nl*F,Zl=nl*el,Wl=this.svgFactory.createElement("svg:pattern");Wl.setAttributeNS(null,"id",P),Wl.setAttributeNS(null,"patternUnits","userSpaceOnUse"),Wl.setAttributeNS(null,"width",dl),Wl.setAttributeNS(null,"height",Zl),Wl.setAttributeNS(null,"x",`${Q}`),Wl.setAttributeNS(null,"y",`${q}`);const Gl=this.svg,Il=this.transformMatrix,xl=this.current.fillColor,bl=this.current.strokeColor,Ol=this.svgFactory.create(ll-Q,B-q);if(this.svg=Ol,this.transformMatrix=cl,Sl===2){const _l=W.Util.makeHexColor(...O);this.current.fillColor=_l,this.current.strokeColor=_l}return this.executeOpTree(this.convertOpList(_)),this.svg=Gl,this.transformMatrix=Il,this.current.fillColor=xl,this.current.strokeColor=bl,Wl.append(Ol.childNodes[0]),this.defs.append(Wl),`url(#${P})`}_makeShadingPattern(j){switch(typeof j=="string"&&(j=this.objs.get(j)),j[0]){case"RadialAxial":const O="shading"+K++,_=j[3];let cl;switch(j[1]){case"axial":const tl=j[4],E=j[5];cl=this.svgFactory.createElement("svg:linearGradient"),cl.setAttributeNS(null,"id",O),cl.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),cl.setAttributeNS(null,"x1",tl[0]),cl.setAttributeNS(null,"y1",tl[1]),cl.setAttributeNS(null,"x2",E[0]),cl.setAttributeNS(null,"y2",E[1]);break;case"radial":const il=j[4],al=j[5],Nl=j[6],nl=j[7];cl=this.svgFactory.createElement("svg:radialGradient"),cl.setAttributeNS(null,"id",O),cl.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),cl.setAttributeNS(null,"cx",al[0]),cl.setAttributeNS(null,"cy",al[1]),cl.setAttributeNS(null,"r",nl),cl.setAttributeNS(null,"fx",il[0]),cl.setAttributeNS(null,"fy",il[1]),cl.setAttributeNS(null,"fr",Nl);break;default:throw new Error(`Unknown RadialAxial type: ${j[1]}`)}for(const tl of _){const E=this.svgFactory.createElement("svg:stop");E.setAttributeNS(null,"offset",tl[0]),E.setAttributeNS(null,"stop-color",tl[1]),cl.append(E)}return this.defs.append(cl),`url(#${O})`;case"Mesh":return(0,W.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${j[0]}`)}}setDash(j,O){this.current.dashArray=j,this.current.dashPhase=O}constructPath(j,O){const _=this.current;let cl=_.x,tl=_.y,E=[],il=0;for(const al of j)switch(0|al){case W.OPS.rectangle:cl=O[il++],tl=O[il++];const Nl=cl+O[il++],nl=tl+O[il++];E.push("M",X(cl),X(tl),"L",X(Nl),X(tl),"L",X(Nl),X(nl),"L",X(cl),X(nl),"Z");break;case W.OPS.moveTo:cl=O[il++],tl=O[il++],E.push("M",X(cl),X(tl));break;case W.OPS.lineTo:cl=O[il++],tl=O[il++],E.push("L",X(cl),X(tl));break;case W.OPS.curveTo:cl=O[il+4],tl=O[il+5],E.push("C",X(O[il]),X(O[il+1]),X(O[il+2]),X(O[il+3]),X(cl),X(tl)),il+=6;break;case W.OPS.curveTo2:E.push("C",X(cl),X(tl),X(O[il]),X(O[il+1]),X(O[il+2]),X(O[il+3])),cl=O[il+2],tl=O[il+3],il+=4;break;case W.OPS.curveTo3:cl=O[il+2],tl=O[il+3],E.push("C",X(O[il]),X(O[il+1]),X(cl),X(tl),X(cl),X(tl)),il+=4;break;case W.OPS.closePath:E.push("Z")}E=E.join(" "),_.path&&j.length>0&&j[0]!==W.OPS.rectangle&&j[0]!==W.OPS.moveTo?E=_.path.getAttributeNS(null,"d")+E:(_.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(_.path)),_.path.setAttributeNS(null,"d",E),_.path.setAttributeNS(null,"fill","none"),_.element=_.path,_.setCurrentPoint(cl,tl)}endPath(){const j=this.current;if(j.path=null,!this.pendingClip)return;if(!j.element){this.pendingClip=null;return}const O="clippath"+C++,_=this.svgFactory.createElement("svg:clipPath");_.setAttributeNS(null,"id",O),_.setAttributeNS(null,"transform",z(this.transformMatrix));const cl=j.element.cloneNode(!0);if(this.pendingClip==="evenodd"?cl.setAttributeNS(null,"clip-rule","evenodd"):cl.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,_.append(cl),this.defs.append(_),j.activeClipUrl){j.clipGroup=null;for(const tl of this.extraStack)tl.clipGroup=null;_.setAttributeNS(null,"clip-path",j.activeClipUrl)}j.activeClipUrl=`url(#${O})`,this.tgrp=null}clip(j){this.pendingClip=j}closePath(){const j=this.current;if(j.path){const O=`${j.path.getAttributeNS(null,"d")}Z`;j.path.setAttributeNS(null,"d",O)}}setLeading(j){this.current.leading=-j}setTextRise(j){this.current.textRise=j}setTextRenderingMode(j){this.current.textRenderingMode=j}setHScale(j){this.current.textHScale=j/100}setRenderingIntent(j){}setFlatness(j){}setGState(j){for(const[O,_]of j)switch(O){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(_);break;case"CA":this.setStrokeAlpha(_);break;case"ca":this.setFillAlpha(_);break;default:(0,W.warn)(`Unimplemented graphic state operator ${O}`)}}fill(){const j=this.current;j.element&&(j.element.setAttributeNS(null,"fill",j.fillColor),j.element.setAttributeNS(null,"fill-opacity",j.fillAlpha),this.endPath())}stroke(){const j=this.current;j.element&&(this._setStrokeAttributes(j.element),j.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(j){let O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const _=this.current;let cl=_.dashArray;O!==1&&cl.length>0&&(cl=cl.map(function(tl){return O*tl})),j.setAttributeNS(null,"stroke",_.strokeColor),j.setAttributeNS(null,"stroke-opacity",_.strokeAlpha),j.setAttributeNS(null,"stroke-miterlimit",X(_.miterLimit)),j.setAttributeNS(null,"stroke-linecap",_.lineCap),j.setAttributeNS(null,"stroke-linejoin",_.lineJoin),j.setAttributeNS(null,"stroke-width",X(O*_.lineWidth)+"px"),j.setAttributeNS(null,"stroke-dasharray",cl.map(X).join(" ")),j.setAttributeNS(null,"stroke-dashoffset",X(O*_.dashPhase)+"px")}eoFill(){var j;(j=this.current.element)===null||j===void 0||j.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){var j;(j=this.current.element)===null||j===void 0||j.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const j=this.svgFactory.createElement("svg:rect");j.setAttributeNS(null,"x","0"),j.setAttributeNS(null,"y","0"),j.setAttributeNS(null,"width","1px"),j.setAttributeNS(null,"height","1px"),j.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(j)}paintImageXObject(j){const O=this.getObject(j);O?this.paintInlineImageXObject(O):(0,W.warn)(`Dependent image with object ID ${j} is not ready yet`)}paintInlineImageXObject(j,O){const _=j.width,cl=j.height,tl=U(j,this.forceDataSchema,!!O),E=this.svgFactory.createElement("svg:rect");E.setAttributeNS(null,"x","0"),E.setAttributeNS(null,"y","0"),E.setAttributeNS(null,"width",X(_)),E.setAttributeNS(null,"height",X(cl)),this.current.element=E,this.clip("nonzero");const il=this.svgFactory.createElement("svg:image");il.setAttributeNS(D,"xlink:href",tl),il.setAttributeNS(null,"x","0"),il.setAttributeNS(null,"y",X(-cl)),il.setAttributeNS(null,"width",X(_)+"px"),il.setAttributeNS(null,"height",X(cl)+"px"),il.setAttributeNS(null,"transform",`scale(${X(1/_)} ${X(-1/cl)})`),O?O.append(il):this._ensureTransformGroup().append(il)}paintImageMaskXObject(j){const O=this.getObject(j.data,j);if(O.bitmap){(0,W.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");return}const _=this.current,cl=O.width,tl=O.height,E=_.fillColor;_.maskId="mask"+v++;const il=this.svgFactory.createElement("svg:mask");il.setAttributeNS(null,"id",_.maskId);const al=this.svgFactory.createElement("svg:rect");al.setAttributeNS(null,"x","0"),al.setAttributeNS(null,"y","0"),al.setAttributeNS(null,"width",X(cl)),al.setAttributeNS(null,"height",X(tl)),al.setAttributeNS(null,"fill",E),al.setAttributeNS(null,"mask",`url(#${_.maskId})`),this.defs.append(il),this._ensureTransformGroup().append(al),this.paintInlineImageXObject(O,il)}paintFormXObjectBegin(j,O){if(Array.isArray(j)&&j.length===6&&this.transform(j[0],j[1],j[2],j[3],j[4],j[5]),O){const _=O[2]-O[0],cl=O[3]-O[1],tl=this.svgFactory.createElement("svg:rect");tl.setAttributeNS(null,"x",O[0]),tl.setAttributeNS(null,"y",O[1]),tl.setAttributeNS(null,"width",X(_)),tl.setAttributeNS(null,"height",X(cl)),this.current.element=tl,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(j){const O=this.svgFactory.create(j.width,j.height),_=this.svgFactory.createElement("svg:defs");O.append(_),this.defs=_;const cl=this.svgFactory.createElement("svg:g");return cl.setAttributeNS(null,"transform",z(j.transform)),O.append(cl),this.svg=cl,O}_ensureClipGroup(){if(!this.current.clipGroup){const j=this.svgFactory.createElement("svg:g");j.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(j),this.current.clipGroup=j}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",z(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 u=__webpack_module_cache__[s];if(u!==void 0)return u.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 u.AbortException}}),Object.defineProperty(s,"AnnotationEditorLayer",{enumerable:!0,get:function(){return M.AnnotationEditorLayer}}),Object.defineProperty(s,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return u.AnnotationEditorParamsType}}),Object.defineProperty(s,"AnnotationEditorType",{enumerable:!0,get:function(){return u.AnnotationEditorType}}),Object.defineProperty(s,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return y.AnnotationEditorUIManager}}),Object.defineProperty(s,"AnnotationLayer",{enumerable:!0,get:function(){return N.AnnotationLayer}}),Object.defineProperty(s,"AnnotationMode",{enumerable:!0,get:function(){return u.AnnotationMode}}),Object.defineProperty(s,"CMapCompressionType",{enumerable:!0,get:function(){return u.CMapCompressionType}}),Object.defineProperty(s,"FeatureTest",{enumerable:!0,get:function(){return u.FeatureTest}}),Object.defineProperty(s,"GlobalWorkerOptions",{enumerable:!0,get:function(){return X.GlobalWorkerOptions}}),Object.defineProperty(s,"InvalidPDFException",{enumerable:!0,get:function(){return u.InvalidPDFException}}),Object.defineProperty(s,"MissingPDFException",{enumerable:!0,get:function(){return u.MissingPDFException}}),Object.defineProperty(s,"OPS",{enumerable:!0,get:function(){return u.OPS}}),Object.defineProperty(s,"PDFDataRangeTransport",{enumerable:!0,get:function(){return o.PDFDataRangeTransport}}),Object.defineProperty(s,"PDFDateString",{enumerable:!0,get:function(){return r.PDFDateString}}),Object.defineProperty(s,"PDFWorker",{enumerable:!0,get:function(){return o.PDFWorker}}),Object.defineProperty(s,"PasswordResponses",{enumerable:!0,get:function(){return u.PasswordResponses}}),Object.defineProperty(s,"PermissionFlag",{enumerable:!0,get:function(){return u.PermissionFlag}}),Object.defineProperty(s,"PixelsPerInch",{enumerable:!0,get:function(){return r.PixelsPerInch}}),Object.defineProperty(s,"PromiseCapability",{enumerable:!0,get:function(){return u.PromiseCapability}}),Object.defineProperty(s,"RenderingCancelledException",{enumerable:!0,get:function(){return r.RenderingCancelledException}}),Object.defineProperty(s,"SVGGraphics",{enumerable:!0,get:function(){return z.SVGGraphics}}),Object.defineProperty(s,"UnexpectedResponseException",{enumerable:!0,get:function(){return u.UnexpectedResponseException}}),Object.defineProperty(s,"Util",{enumerable:!0,get:function(){return u.Util}}),Object.defineProperty(s,"VerbosityLevel",{enumerable:!0,get:function(){return u.VerbosityLevel}}),Object.defineProperty(s,"XfaLayer",{enumerable:!0,get:function(){return Y.XfaLayer}}),Object.defineProperty(s,"build",{enumerable:!0,get:function(){return o.build}}),Object.defineProperty(s,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return u.createValidAbsoluteUrl}}),Object.defineProperty(s,"getDocument",{enumerable:!0,get:function(){return o.getDocument}}),Object.defineProperty(s,"getFilenameFromUrl",{enumerable:!0,get:function(){return r.getFilenameFromUrl}}),Object.defineProperty(s,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return r.getPdfFilenameFromUrl}}),Object.defineProperty(s,"getXfaPageViewport",{enumerable:!0,get:function(){return r.getXfaPageViewport}}),Object.defineProperty(s,"isDataScheme",{enumerable:!0,get:function(){return r.isDataScheme}}),Object.defineProperty(s,"isPdfFile",{enumerable:!0,get:function(){return r.isPdfFile}}),Object.defineProperty(s,"loadScript",{enumerable:!0,get:function(){return r.loadScript}}),Object.defineProperty(s,"normalizeUnicode",{enumerable:!0,get:function(){return u.normalizeUnicode}}),Object.defineProperty(s,"renderTextLayer",{enumerable:!0,get:function(){return W.renderTextLayer}}),Object.defineProperty(s,"setLayerDimensions",{enumerable:!0,get:function(){return r.setLayerDimensions}}),Object.defineProperty(s,"shadow",{enumerable:!0,get:function(){return u.shadow}}),Object.defineProperty(s,"updateTextLayer",{enumerable:!0,get:function(){return W.updateTextLayer}}),Object.defineProperty(s,"version",{enumerable:!0,get:function(){return o.version}});var u=__w_pdfjs_require__(1),o=__w_pdfjs_require__(138),r=__w_pdfjs_require__(142),W=__w_pdfjs_require__(161),M=__w_pdfjs_require__(162),y=__w_pdfjs_require__(141),N=__w_pdfjs_require__(165),X=__w_pdfjs_require__(149),z=__w_pdfjs_require__(168),Y=__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.Card=Card$1,exports.DynamicCarousel=_sfc_main$I,exports.DynamicForm=_sfc_main$o,exports.IndicatorColor=IndicatorColor$1,exports.SectionSpinner=SectionSpinner,exports.SectionsContainer=SectionsContainer,exports.StateIndicator=StateIndicator,exports.WidgetsIndex=WidgetsIndex,exports.WinIconButton=WinIconButton,exports.default=W2WSharedUi,exports.useDragAndDrop=useDragAndDrop,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
85
+ `}setFont(j){const O=this.current,_=this.commonObjs.get(j[0]);let cl=j[1];O.font=_,this.embedFonts&&!_.missingFile&&!this.embeddedFonts[_.loadedName]&&(this.addFontStyle(_),this.embeddedFonts[_.loadedName]=_),O.fontMatrix=_.fontMatrix||W.FONT_IDENTITY_MATRIX;let tl="normal";_.black?tl="900":_.bold&&(tl="bold");const E=_.italic?"italic":"normal";cl<0?(cl=-cl,O.fontDirection=-1):O.fontDirection=1,O.fontSize=cl,O.fontFamily=_.loadedName,O.fontWeight=tl,O.fontStyle=E,O.tspan=this.svgFactory.createElement("svg:tspan"),O.tspan.setAttributeNS(null,"y",X(-O.y)),O.xcoords=[],O.ycoords=[]}endText(){var j;const O=this.current;O.textRenderingMode&W.TextRenderingMode.ADD_TO_PATH_FLAG&&(j=O.txtElement)!==null&&j!==void 0&&j.hasChildNodes()&&(O.element=O.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(j){j>0&&(this.current.lineWidth=j)}setLineCap(j){this.current.lineCap=R[j]}setLineJoin(j){this.current.lineJoin=g[j]}setMiterLimit(j){this.current.miterLimit=j}setStrokeAlpha(j){this.current.strokeAlpha=j}setStrokeRGBColor(j,O,_){this.current.strokeColor=W.Util.makeHexColor(j,O,_)}setFillAlpha(j){this.current.fillAlpha=j}setFillRGBColor(j,O,_){this.current.fillColor=W.Util.makeHexColor(j,O,_),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(j){this.current.strokeColor=this._makeColorN_Pattern(j)}setFillColorN(j){this.current.fillColor=this._makeColorN_Pattern(j)}shadingFill(j){const O=this.viewport.width,_=this.viewport.height,cl=W.Util.inverseTransform(this.transformMatrix),tl=W.Util.applyTransform([0,0],cl),E=W.Util.applyTransform([0,_],cl),il=W.Util.applyTransform([O,0],cl),al=W.Util.applyTransform([O,_],cl),Nl=Math.min(tl[0],E[0],il[0],al[0]),nl=Math.min(tl[1],E[1],il[1],al[1]),Sl=Math.max(tl[0],E[0],il[0],al[0]),P=Math.max(tl[1],E[1],il[1],al[1]),Q=this.svgFactory.createElement("svg:rect");Q.setAttributeNS(null,"x",Nl),Q.setAttributeNS(null,"y",nl),Q.setAttributeNS(null,"width",Sl-Nl),Q.setAttributeNS(null,"height",P-nl),Q.setAttributeNS(null,"fill",this._makeShadingPattern(j)),this.current.fillAlpha<1&&Q.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(Q)}_makeColorN_Pattern(j){return j[0]==="TilingPattern"?this._makeTilingPattern(j):this._makeShadingPattern(j)}_makeTilingPattern(j){const O=j[1],_=j[2],cl=j[3]||W.IDENTITY_MATRIX,[tl,E,il,al]=j[4],Nl=j[5],nl=j[6],Sl=j[7],P="shading"+K++,[Q,q,ll,B]=W.Util.normalizeRect([...W.Util.applyTransform([tl,E],cl),...W.Util.applyTransform([il,al],cl)]),[F,el]=W.Util.singularValueDecompose2dScale(cl),dl=Nl*F,Zl=nl*el,Wl=this.svgFactory.createElement("svg:pattern");Wl.setAttributeNS(null,"id",P),Wl.setAttributeNS(null,"patternUnits","userSpaceOnUse"),Wl.setAttributeNS(null,"width",dl),Wl.setAttributeNS(null,"height",Zl),Wl.setAttributeNS(null,"x",`${Q}`),Wl.setAttributeNS(null,"y",`${q}`);const Gl=this.svg,Il=this.transformMatrix,xl=this.current.fillColor,bl=this.current.strokeColor,Ol=this.svgFactory.create(ll-Q,B-q);if(this.svg=Ol,this.transformMatrix=cl,Sl===2){const _l=W.Util.makeHexColor(...O);this.current.fillColor=_l,this.current.strokeColor=_l}return this.executeOpTree(this.convertOpList(_)),this.svg=Gl,this.transformMatrix=Il,this.current.fillColor=xl,this.current.strokeColor=bl,Wl.append(Ol.childNodes[0]),this.defs.append(Wl),`url(#${P})`}_makeShadingPattern(j){switch(typeof j=="string"&&(j=this.objs.get(j)),j[0]){case"RadialAxial":const O="shading"+K++,_=j[3];let cl;switch(j[1]){case"axial":const tl=j[4],E=j[5];cl=this.svgFactory.createElement("svg:linearGradient"),cl.setAttributeNS(null,"id",O),cl.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),cl.setAttributeNS(null,"x1",tl[0]),cl.setAttributeNS(null,"y1",tl[1]),cl.setAttributeNS(null,"x2",E[0]),cl.setAttributeNS(null,"y2",E[1]);break;case"radial":const il=j[4],al=j[5],Nl=j[6],nl=j[7];cl=this.svgFactory.createElement("svg:radialGradient"),cl.setAttributeNS(null,"id",O),cl.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),cl.setAttributeNS(null,"cx",al[0]),cl.setAttributeNS(null,"cy",al[1]),cl.setAttributeNS(null,"r",nl),cl.setAttributeNS(null,"fx",il[0]),cl.setAttributeNS(null,"fy",il[1]),cl.setAttributeNS(null,"fr",Nl);break;default:throw new Error(`Unknown RadialAxial type: ${j[1]}`)}for(const tl of _){const E=this.svgFactory.createElement("svg:stop");E.setAttributeNS(null,"offset",tl[0]),E.setAttributeNS(null,"stop-color",tl[1]),cl.append(E)}return this.defs.append(cl),`url(#${O})`;case"Mesh":return(0,W.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${j[0]}`)}}setDash(j,O){this.current.dashArray=j,this.current.dashPhase=O}constructPath(j,O){const _=this.current;let cl=_.x,tl=_.y,E=[],il=0;for(const al of j)switch(0|al){case W.OPS.rectangle:cl=O[il++],tl=O[il++];const Nl=cl+O[il++],nl=tl+O[il++];E.push("M",X(cl),X(tl),"L",X(Nl),X(tl),"L",X(Nl),X(nl),"L",X(cl),X(nl),"Z");break;case W.OPS.moveTo:cl=O[il++],tl=O[il++],E.push("M",X(cl),X(tl));break;case W.OPS.lineTo:cl=O[il++],tl=O[il++],E.push("L",X(cl),X(tl));break;case W.OPS.curveTo:cl=O[il+4],tl=O[il+5],E.push("C",X(O[il]),X(O[il+1]),X(O[il+2]),X(O[il+3]),X(cl),X(tl)),il+=6;break;case W.OPS.curveTo2:E.push("C",X(cl),X(tl),X(O[il]),X(O[il+1]),X(O[il+2]),X(O[il+3])),cl=O[il+2],tl=O[il+3],il+=4;break;case W.OPS.curveTo3:cl=O[il+2],tl=O[il+3],E.push("C",X(O[il]),X(O[il+1]),X(cl),X(tl),X(cl),X(tl)),il+=4;break;case W.OPS.closePath:E.push("Z")}E=E.join(" "),_.path&&j.length>0&&j[0]!==W.OPS.rectangle&&j[0]!==W.OPS.moveTo?E=_.path.getAttributeNS(null,"d")+E:(_.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(_.path)),_.path.setAttributeNS(null,"d",E),_.path.setAttributeNS(null,"fill","none"),_.element=_.path,_.setCurrentPoint(cl,tl)}endPath(){const j=this.current;if(j.path=null,!this.pendingClip)return;if(!j.element){this.pendingClip=null;return}const O="clippath"+C++,_=this.svgFactory.createElement("svg:clipPath");_.setAttributeNS(null,"id",O),_.setAttributeNS(null,"transform",z(this.transformMatrix));const cl=j.element.cloneNode(!0);if(this.pendingClip==="evenodd"?cl.setAttributeNS(null,"clip-rule","evenodd"):cl.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,_.append(cl),this.defs.append(_),j.activeClipUrl){j.clipGroup=null;for(const tl of this.extraStack)tl.clipGroup=null;_.setAttributeNS(null,"clip-path",j.activeClipUrl)}j.activeClipUrl=`url(#${O})`,this.tgrp=null}clip(j){this.pendingClip=j}closePath(){const j=this.current;if(j.path){const O=`${j.path.getAttributeNS(null,"d")}Z`;j.path.setAttributeNS(null,"d",O)}}setLeading(j){this.current.leading=-j}setTextRise(j){this.current.textRise=j}setTextRenderingMode(j){this.current.textRenderingMode=j}setHScale(j){this.current.textHScale=j/100}setRenderingIntent(j){}setFlatness(j){}setGState(j){for(const[O,_]of j)switch(O){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(_);break;case"CA":this.setStrokeAlpha(_);break;case"ca":this.setFillAlpha(_);break;default:(0,W.warn)(`Unimplemented graphic state operator ${O}`)}}fill(){const j=this.current;j.element&&(j.element.setAttributeNS(null,"fill",j.fillColor),j.element.setAttributeNS(null,"fill-opacity",j.fillAlpha),this.endPath())}stroke(){const j=this.current;j.element&&(this._setStrokeAttributes(j.element),j.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(j){let O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const _=this.current;let cl=_.dashArray;O!==1&&cl.length>0&&(cl=cl.map(function(tl){return O*tl})),j.setAttributeNS(null,"stroke",_.strokeColor),j.setAttributeNS(null,"stroke-opacity",_.strokeAlpha),j.setAttributeNS(null,"stroke-miterlimit",X(_.miterLimit)),j.setAttributeNS(null,"stroke-linecap",_.lineCap),j.setAttributeNS(null,"stroke-linejoin",_.lineJoin),j.setAttributeNS(null,"stroke-width",X(O*_.lineWidth)+"px"),j.setAttributeNS(null,"stroke-dasharray",cl.map(X).join(" ")),j.setAttributeNS(null,"stroke-dashoffset",X(O*_.dashPhase)+"px")}eoFill(){var j;(j=this.current.element)===null||j===void 0||j.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){var j;(j=this.current.element)===null||j===void 0||j.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const j=this.svgFactory.createElement("svg:rect");j.setAttributeNS(null,"x","0"),j.setAttributeNS(null,"y","0"),j.setAttributeNS(null,"width","1px"),j.setAttributeNS(null,"height","1px"),j.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(j)}paintImageXObject(j){const O=this.getObject(j);O?this.paintInlineImageXObject(O):(0,W.warn)(`Dependent image with object ID ${j} is not ready yet`)}paintInlineImageXObject(j,O){const _=j.width,cl=j.height,tl=U(j,this.forceDataSchema,!!O),E=this.svgFactory.createElement("svg:rect");E.setAttributeNS(null,"x","0"),E.setAttributeNS(null,"y","0"),E.setAttributeNS(null,"width",X(_)),E.setAttributeNS(null,"height",X(cl)),this.current.element=E,this.clip("nonzero");const il=this.svgFactory.createElement("svg:image");il.setAttributeNS(D,"xlink:href",tl),il.setAttributeNS(null,"x","0"),il.setAttributeNS(null,"y",X(-cl)),il.setAttributeNS(null,"width",X(_)+"px"),il.setAttributeNS(null,"height",X(cl)+"px"),il.setAttributeNS(null,"transform",`scale(${X(1/_)} ${X(-1/cl)})`),O?O.append(il):this._ensureTransformGroup().append(il)}paintImageMaskXObject(j){const O=this.getObject(j.data,j);if(O.bitmap){(0,W.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");return}const _=this.current,cl=O.width,tl=O.height,E=_.fillColor;_.maskId="mask"+v++;const il=this.svgFactory.createElement("svg:mask");il.setAttributeNS(null,"id",_.maskId);const al=this.svgFactory.createElement("svg:rect");al.setAttributeNS(null,"x","0"),al.setAttributeNS(null,"y","0"),al.setAttributeNS(null,"width",X(cl)),al.setAttributeNS(null,"height",X(tl)),al.setAttributeNS(null,"fill",E),al.setAttributeNS(null,"mask",`url(#${_.maskId})`),this.defs.append(il),this._ensureTransformGroup().append(al),this.paintInlineImageXObject(O,il)}paintFormXObjectBegin(j,O){if(Array.isArray(j)&&j.length===6&&this.transform(j[0],j[1],j[2],j[3],j[4],j[5]),O){const _=O[2]-O[0],cl=O[3]-O[1],tl=this.svgFactory.createElement("svg:rect");tl.setAttributeNS(null,"x",O[0]),tl.setAttributeNS(null,"y",O[1]),tl.setAttributeNS(null,"width",X(_)),tl.setAttributeNS(null,"height",X(cl)),this.current.element=tl,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(j){const O=this.svgFactory.create(j.width,j.height),_=this.svgFactory.createElement("svg:defs");O.append(_),this.defs=_;const cl=this.svgFactory.createElement("svg:g");return cl.setAttributeNS(null,"transform",z(j.transform)),O.append(cl),this.svg=cl,O}_ensureClipGroup(){if(!this.current.clipGroup){const j=this.svgFactory.createElement("svg:g");j.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(j),this.current.clipGroup=j}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",z(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 u=__webpack_module_cache__[s];if(u!==void 0)return u.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 u.AbortException}}),Object.defineProperty(s,"AnnotationEditorLayer",{enumerable:!0,get:function(){return M.AnnotationEditorLayer}}),Object.defineProperty(s,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return u.AnnotationEditorParamsType}}),Object.defineProperty(s,"AnnotationEditorType",{enumerable:!0,get:function(){return u.AnnotationEditorType}}),Object.defineProperty(s,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return y.AnnotationEditorUIManager}}),Object.defineProperty(s,"AnnotationLayer",{enumerable:!0,get:function(){return N.AnnotationLayer}}),Object.defineProperty(s,"AnnotationMode",{enumerable:!0,get:function(){return u.AnnotationMode}}),Object.defineProperty(s,"CMapCompressionType",{enumerable:!0,get:function(){return u.CMapCompressionType}}),Object.defineProperty(s,"FeatureTest",{enumerable:!0,get:function(){return u.FeatureTest}}),Object.defineProperty(s,"GlobalWorkerOptions",{enumerable:!0,get:function(){return X.GlobalWorkerOptions}}),Object.defineProperty(s,"InvalidPDFException",{enumerable:!0,get:function(){return u.InvalidPDFException}}),Object.defineProperty(s,"MissingPDFException",{enumerable:!0,get:function(){return u.MissingPDFException}}),Object.defineProperty(s,"OPS",{enumerable:!0,get:function(){return u.OPS}}),Object.defineProperty(s,"PDFDataRangeTransport",{enumerable:!0,get:function(){return o.PDFDataRangeTransport}}),Object.defineProperty(s,"PDFDateString",{enumerable:!0,get:function(){return r.PDFDateString}}),Object.defineProperty(s,"PDFWorker",{enumerable:!0,get:function(){return o.PDFWorker}}),Object.defineProperty(s,"PasswordResponses",{enumerable:!0,get:function(){return u.PasswordResponses}}),Object.defineProperty(s,"PermissionFlag",{enumerable:!0,get:function(){return u.PermissionFlag}}),Object.defineProperty(s,"PixelsPerInch",{enumerable:!0,get:function(){return r.PixelsPerInch}}),Object.defineProperty(s,"PromiseCapability",{enumerable:!0,get:function(){return u.PromiseCapability}}),Object.defineProperty(s,"RenderingCancelledException",{enumerable:!0,get:function(){return r.RenderingCancelledException}}),Object.defineProperty(s,"SVGGraphics",{enumerable:!0,get:function(){return z.SVGGraphics}}),Object.defineProperty(s,"UnexpectedResponseException",{enumerable:!0,get:function(){return u.UnexpectedResponseException}}),Object.defineProperty(s,"Util",{enumerable:!0,get:function(){return u.Util}}),Object.defineProperty(s,"VerbosityLevel",{enumerable:!0,get:function(){return u.VerbosityLevel}}),Object.defineProperty(s,"XfaLayer",{enumerable:!0,get:function(){return Y.XfaLayer}}),Object.defineProperty(s,"build",{enumerable:!0,get:function(){return o.build}}),Object.defineProperty(s,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return u.createValidAbsoluteUrl}}),Object.defineProperty(s,"getDocument",{enumerable:!0,get:function(){return o.getDocument}}),Object.defineProperty(s,"getFilenameFromUrl",{enumerable:!0,get:function(){return r.getFilenameFromUrl}}),Object.defineProperty(s,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return r.getPdfFilenameFromUrl}}),Object.defineProperty(s,"getXfaPageViewport",{enumerable:!0,get:function(){return r.getXfaPageViewport}}),Object.defineProperty(s,"isDataScheme",{enumerable:!0,get:function(){return r.isDataScheme}}),Object.defineProperty(s,"isPdfFile",{enumerable:!0,get:function(){return r.isPdfFile}}),Object.defineProperty(s,"loadScript",{enumerable:!0,get:function(){return r.loadScript}}),Object.defineProperty(s,"normalizeUnicode",{enumerable:!0,get:function(){return u.normalizeUnicode}}),Object.defineProperty(s,"renderTextLayer",{enumerable:!0,get:function(){return W.renderTextLayer}}),Object.defineProperty(s,"setLayerDimensions",{enumerable:!0,get:function(){return r.setLayerDimensions}}),Object.defineProperty(s,"shadow",{enumerable:!0,get:function(){return u.shadow}}),Object.defineProperty(s,"updateTextLayer",{enumerable:!0,get:function(){return W.updateTextLayer}}),Object.defineProperty(s,"version",{enumerable:!0,get:function(){return o.version}});var u=__w_pdfjs_require__(1),o=__w_pdfjs_require__(138),r=__w_pdfjs_require__(142),W=__w_pdfjs_require__(161),M=__w_pdfjs_require__(162),y=__w_pdfjs_require__(141),N=__w_pdfjs_require__(165),X=__w_pdfjs_require__(149),z=__w_pdfjs_require__(168),Y=__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.Card=Card$1,exports.DynamicCarousel=_sfc_main$I,exports.DynamicForm=_sfc_main$o,exports.IndicatorColor=IndicatorColor$1,exports.ProductPrice=ProductPrice,exports.ProductProps=_sfc_main$b,exports.ProductTag=ProductTag,exports.SectionSpinner=SectionSpinner,exports.SectionsContainer=SectionsContainer,exports.StateIndicator=StateIndicator,exports.WidgetsIndex=WidgetsIndex,exports.WinIconButton=WinIconButton,exports.default=W2WSharedUi,exports.useDragAndDrop=useDragAndDrop,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});